import type { ApiContext } from "./context.js"; import type { Paginated } from "./http/pagination.js"; import type { Commit as BaseCommit } from "../generated/types.js"; export type Commit = BaseCommit & { author?: { name?: string; slug?: string; displayName?: string; }; }; export interface ListCommitsParams { project?: string; repository: string; branch?: string; author?: string; limit?: number; start?: number; } export interface GetCommitParams { project?: string; repository: string; commitId: string; } export interface CompareRefsParams { project?: string; repository: string; from?: string; to?: string; limit?: number; start?: number; } export declare function commitsApi(ctx: ApiContext): { /** * `author` filters the fetched page in memory because Bitbucket has no * author query on this endpoint, so `size` reports the matches on that * page rather than the server-side total. */ list({ project, repository, branch, author, limit, start, }: ListCommitsParams): Promise>; get({ project, repository, commitId, }: GetCommitParams): Promise>; compare({ project, repository, from, to, limit, start, }: CompareRefsParams): Promise>>; }; export type CommitsApi = ReturnType;