import { z } from 'zod'; import { RepositoriesResponseSchema, PaginatedCommitsSchema, type ListRepositoriesParams, type GetRepositoryParams, type ListCommitsParams, type Repository, type CreateBranchParams, type BranchRef, type GetFileContentParams, type ListBranchesParams, type BranchesResponse } from './vendor.atlassian.repositories.types.js'; /** * List repositories for a workspace * @param {string} workspace - Workspace name or UUID * @param {ListRepositoriesParams} [params={}] - Optional parameters * @param {string} [params.q] - Query string to filter repositories * @param {string} [params.sort] - Property to sort by (e.g., 'name', '-created_on') * @param {number} [params.page] - Page number for pagination * @param {number} [params.pagelen] - Number of items per page * @returns {Promise} Response containing repositories * @example * ```typescript * // List repositories in a workspace, filtered and sorted * const response = await listRepositories('myworkspace', { * q: 'name~"api"', * sort: 'name', * pagelen: 25 * }); * ``` */ declare function list(params: ListRepositoriesParams): Promise>; /** * Get detailed information about a specific Bitbucket repository * * Retrieves comprehensive details about a single repository. * * @async * @memberof VendorAtlassianRepositoriesService * @param {GetRepositoryParams} params - Parameters for the request * @param {string} params.workspace - The workspace slug * @param {string} params.repo_slug - The repository slug * @returns {Promise} Promise containing the detailed repository information * @throws {Error} If Atlassian credentials are missing or API request fails * @example * // Get repository details * const repository = await get({ * workspace: 'my-workspace', * repo_slug: 'my-repo' * }); */ declare function get(params: GetRepositoryParams): Promise; /** * Lists commits for a specific repository and optional revision/path. * * @param params Parameters including workspace, repo slug, and optional filters. * @returns Promise resolving to paginated commit data. * @throws {Error} If workspace or repo_slug are missing, or if credentials are not found. */ declare function listCommits(params: ListCommitsParams): Promise>; /** * Creates a new branch in the specified repository. * * @param params Parameters including workspace, repo slug, new branch name, and source target. * @returns Promise resolving to details about the newly created branch reference. * @throws {Error} If required parameters are missing or API request fails. */ declare function createBranch(params: CreateBranchParams): Promise; /** * Get the content of a file from a repository. * * This retrieves the raw content of a file at the specified path from a repository at a specific commit. * * @param {GetFileContentParams} params - Parameters for the request * @param {string} params.workspace - The workspace slug or UUID * @param {string} params.repo_slug - The repository slug or UUID * @param {string} params.commit - The commit, branch name, or tag to get the file from * @param {string} params.path - The file path within the repository * @returns {Promise} Promise containing the file content as a string * @throws {Error} If parameters are invalid, credentials are missing, or API request fails * @example * // Get README.md content from the main branch * const fileContent = await getFileContent({ * workspace: 'my-workspace', * repo_slug: 'my-repo', * commit: 'main', * path: 'README.md' * }); */ declare function getFileContent(params: GetFileContentParams): Promise; /** * Lists branches for a specific repository. * * @param params Parameters including workspace, repo slug, and optional filters. * @returns Promise resolving to paginated branches data. * @throws {Error} If workspace or repo_slug are missing, or if credentials are not found. */ declare function listBranches(params: ListBranchesParams): Promise; declare const _default: { list: typeof list; get: typeof get; listCommits: typeof listCommits; createBranch: typeof createBranch; getFileContent: typeof getFileContent; listBranches: typeof listBranches; }; export default _default;