@gohcltech/bitbucket-mcp
Version:
Bitbucket integration for Claude via Model Context Protocol
104 lines • 4.58 kB
TypeScript
/**
* @fileoverview Repository-specific HTTP client for Bitbucket API operations.
*
* This module provides repository-related functionality including:
* - Listing repositories in a workspace
* - Getting detailed repository information
* - Creating new repositories
* - Updating repository settings
* - Deleting repositories
*
*/
import { BaseClient, BitbucketApiResponse } from './base-client.js';
import { Repository } from '../types/repository/index.js';
/**
* HTTP client for Bitbucket repository operations.
*
* Provides methods for managing repositories within workspaces including
* CRUD operations and repository configuration management.
*/
export declare class RepositoryClient extends BaseClient {
/**
* Retrieves all repositories in a workspace.
*
* @param workspaceSlug - Unique identifier for the workspace
* @returns Promise resolving to paginated repository list
* @throws {AuthenticationError} If not authenticated
* @throws {BitbucketApiError} If workspace not found or request fails
*/
getRepositories(workspaceSlug: string): Promise<BitbucketApiResponse<Repository>>;
/**
* Retrieves all repositories in a workspace (all pages).
*
* This method automatically handles pagination to return all repositories
* across multiple pages. Use this when you need a complete list of repositories.
*
* @param workspaceSlug - Unique identifier for the workspace
* @returns Promise resolving to array of all repositories
* @throws {AuthenticationError} If not authenticated
* @throws {BitbucketApiError} If workspace not found or request fails
*/
getAllRepositories(workspaceSlug: string): Promise<Repository[]>;
/**
* Retrieves details for a specific repository.
*
* @param workspaceSlug - Unique identifier for the workspace
* @param repoSlug - Unique identifier for the repository
* @returns Promise resolving to repository details
* @throws {AuthenticationError} If not authenticated
* @throws {BitbucketApiError} If repository not found or request fails
*/
getRepository(workspaceSlug: string, repoSlug: string): Promise<Repository>;
/**
* Creates a new repository in the specified workspace.
*
* @param workspaceSlug - Unique identifier for the workspace
* @param name - Name for the new repository
* @param payload - Repository configuration (privacy, description, etc.)
* @returns Promise resolving to created repository details
* @throws {AuthenticationError} If not authenticated
* @throws {BitbucketApiError} If creation fails or name conflicts exist
*/
createRepository(workspaceSlug: string, name: string, payload: any): Promise<Repository>;
/**
* Updates an existing repository's settings and metadata.
*
* Allows modification of repository properties including:
* - Name and description
* - Privacy settings (public/private)
* - Fork policies
* - Issue and wiki settings
* - Website URL and language
*
* @param workspaceSlug - Unique identifier for the workspace
* @param repoSlug - Current unique identifier for the repository
* @param payload - Repository update data (only specified fields will be updated)
* @returns Promise resolving to the updated repository data
* @throws {AuthenticationError} If not authenticated
* @throws {BitbucketApiError} If repository not found or update fails
*/
updateRepository(workspaceSlug: string, repoSlug: string, payload: Partial<{
name: string;
description: string;
is_private: boolean;
fork_policy: 'allow_forks' | 'no_public_forks' | 'no_forks';
website: string | null;
language: string;
has_issues: boolean;
has_wiki: boolean;
}>): Promise<Repository>;
/**
* Deletes a repository permanently.
*
* WARNING: This operation is irreversible and will delete all repository data,
* including code, issues, pull requests, and commit history.
*
* @param workspaceSlug - Unique identifier for the workspace
* @param repoSlug - Unique identifier for the repository to delete
* @returns Promise that resolves when deletion is complete
* @throws {AuthenticationError} If not authenticated
* @throws {BitbucketApiError} If repository not found or deletion fails
*/
deleteRepository(workspaceSlug: string, repoSlug: string): Promise<void>;
}
//# sourceMappingURL=repository-client.d.ts.map