import type { ApiContext } from "./context.js"; import type { Paginated } from "./http/pagination.js"; export interface ListRepositoriesParams { project?: string; limit?: number; start?: number; } export interface BrowseParams { project?: string; repository: string; path?: string; branch?: string; limit?: number; } export interface GetFileParams { project?: string; repository: string; filePath: string; branch?: string; limit?: number; start?: number; } export interface GetBlameParams { project?: string; repository: string; filePath: string; branch?: string; } export interface UploadAttachmentParams { project?: string; repository: string; fileName: string; data: Blob; } export interface AttachmentRefParams { project?: string; repository: string; attachmentId: string; } export interface AttachmentDownload { data: Buffer; contentType: string; size: number; } export interface Attachment { id: string; url: string; links: { self: { href: string; }; attachment: { href: string; }; }; } export interface EditFileParams { project?: string; repository: string; filePath: string; branch: string; content: string; message: string; sourceCommitId?: string; sourceBranch?: string; } export interface CreateRepositoryParams { project?: string; name: string; description?: string; defaultBranch?: string; } export interface DeleteRepositoryParams { project?: string; repository: string; } export declare function repositoriesApi(ctx: ApiContext): { list({ project, limit, start, }: ListRepositoriesParams): Promise>>; browse({ project, repository, path, branch, limit, }: BrowseParams): Promise; getFile({ project, repository, filePath, branch, limit, start, }: GetFileParams): Promise; getBlame({ project, repository, filePath, branch, }: GetBlameParams): Promise; uploadAttachment({ project, repository, fileName, data, }: UploadAttachmentParams): Promise; downloadAttachment({ project, repository, attachmentId, }: AttachmentRefParams): Promise; deleteAttachment({ project, repository, attachmentId, }: AttachmentRefParams): Promise<{ deleted: true; attachmentId: string; }>; editFile({ project, repository, filePath, branch, content, message, sourceCommitId, sourceBranch, }: EditFileParams): Promise; create({ project, name, description, defaultBranch, }: CreateRepositoryParams): Promise>; delete({ project, repository, }: DeleteRepositoryParams): Promise<{ deleted: true; repository: string; }>; }; export type RepositoriesApi = ReturnType;