export type ClientOptions = { baseUrl: 'https://api.mesa.dev/v1' | (string & {}); }; export type WhoamiData = { body?: never; path?: never; query?: never; url: '/whoami'; }; export type WhoamiErrors = { /** * Invalid request */ 400: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Unauthorized */ 401: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Forbidden */ 403: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Not found */ 404: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Not acceptable */ 406: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Conflict */ 409: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Internal error */ 500: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; }; export type WhoamiError = WhoamiErrors[keyof WhoamiErrors]; export type WhoamiResponses = { /** * Caller identity */ 200: { org: { id: string; slug: string; name: string; }; key_id: string | null; scopes: Array; }; }; export type WhoamiResponse = WhoamiResponses[keyof WhoamiResponses]; export type ListWebhookTargetsData = { body?: never; path: { org: string; }; query?: { /** * Opaque pagination cursor from a previous response */ cursor?: string; /** * Maximum number of items to return (max 200) */ limit?: number; }; url: '/{org}/webhook-targets'; }; export type ListWebhookTargetsErrors = { /** * Invalid request */ 400: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Unauthorized */ 401: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Forbidden */ 403: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Not found */ 404: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Not acceptable */ 406: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Conflict */ 409: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Internal error */ 500: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; }; export type ListWebhookTargetsError = ListWebhookTargetsErrors[keyof ListWebhookTargetsErrors]; export type ListWebhookTargetsResponses = { /** * Webhook target list */ 200: { /** * Cursor for the next page, or null when no more results remain */ next_cursor: string | null; /** * Whether another page of results is available */ has_more: boolean; webhook_targets: Array<{ id: string; name: string | null; url: string; events: Array<'repo.created' | 'repo.updated' | 'repo.deleted' | 'bookmark.created' | 'bookmark.deleted' | 'bookmark.moved' | 'bookmark.merged' | 'change.created' | 'change.evolved' | 'push' | 'sync.queued' | 'sync.in_progress' | 'sync.completed' | 'sync.failed'>; repo_ids: Array | null; created_at: string; updated_at: string; }>; }; }; export type ListWebhookTargetsResponse = ListWebhookTargetsResponses[keyof ListWebhookTargetsResponses]; export type CreateWebhookTargetData = { body: { name?: string; url: string; events?: Array<'repo.created' | 'repo.updated' | 'repo.deleted' | 'bookmark.created' | 'bookmark.deleted' | 'bookmark.moved' | 'bookmark.merged' | 'change.created' | 'change.evolved' | 'push' | 'sync.queued' | 'sync.in_progress' | 'sync.completed' | 'sync.failed'>; repo_ids?: Array; }; path: { org: string; }; query?: never; url: '/{org}/webhook-targets'; }; export type CreateWebhookTargetErrors = { /** * Invalid request */ 400: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Unauthorized */ 401: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Forbidden */ 403: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Not found */ 404: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Not acceptable */ 406: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Conflict */ 409: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Internal error */ 500: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; }; export type CreateWebhookTargetError = CreateWebhookTargetErrors[keyof CreateWebhookTargetErrors]; export type CreateWebhookTargetResponses = { /** * Webhook target created */ 201: { id: string; name: string | null; url: string; events: Array<'repo.created' | 'repo.updated' | 'repo.deleted' | 'bookmark.created' | 'bookmark.deleted' | 'bookmark.moved' | 'bookmark.merged' | 'change.created' | 'change.evolved' | 'push' | 'sync.queued' | 'sync.in_progress' | 'sync.completed' | 'sync.failed'>; repo_ids: Array | null; created_at: string; updated_at: string; secret: string; }; }; export type CreateWebhookTargetResponse = CreateWebhookTargetResponses[keyof CreateWebhookTargetResponses]; export type DeleteWebhookTargetData = { body?: never; path: { org: string; webhookTargetId: string; }; query?: never; url: '/{org}/webhook-targets/{webhookTargetId}'; }; export type DeleteWebhookTargetErrors = { /** * Invalid request */ 400: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Unauthorized */ 401: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Forbidden */ 403: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Not found */ 404: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Not acceptable */ 406: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Conflict */ 409: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Internal error */ 500: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; }; export type DeleteWebhookTargetError = DeleteWebhookTargetErrors[keyof DeleteWebhookTargetErrors]; export type DeleteWebhookTargetResponses = { /** * Webhook target deleted */ 200: { success: true; }; }; export type DeleteWebhookTargetResponse = DeleteWebhookTargetResponses[keyof DeleteWebhookTargetResponses]; export type GetWebhookTargetData = { body?: never; path: { org: string; webhookTargetId: string; }; query?: never; url: '/{org}/webhook-targets/{webhookTargetId}'; }; export type GetWebhookTargetErrors = { /** * Invalid request */ 400: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Unauthorized */ 401: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Forbidden */ 403: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Not found */ 404: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Not acceptable */ 406: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Conflict */ 409: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Internal error */ 500: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; }; export type GetWebhookTargetError = GetWebhookTargetErrors[keyof GetWebhookTargetErrors]; export type GetWebhookTargetResponses = { /** * Webhook target */ 200: { id: string; name: string | null; url: string; events: Array<'repo.created' | 'repo.updated' | 'repo.deleted' | 'bookmark.created' | 'bookmark.deleted' | 'bookmark.moved' | 'bookmark.merged' | 'change.created' | 'change.evolved' | 'push' | 'sync.queued' | 'sync.in_progress' | 'sync.completed' | 'sync.failed'>; repo_ids: Array | null; created_at: string; updated_at: string; }; }; export type GetWebhookTargetResponse = GetWebhookTargetResponses[keyof GetWebhookTargetResponses]; export type UpdateWebhookTargetData = { body: { name?: string | null; url?: string; events?: Array<'repo.created' | 'repo.updated' | 'repo.deleted' | 'bookmark.created' | 'bookmark.deleted' | 'bookmark.moved' | 'bookmark.merged' | 'change.created' | 'change.evolved' | 'push' | 'sync.queued' | 'sync.in_progress' | 'sync.completed' | 'sync.failed'>; repo_ids?: Array | null; }; path: { org: string; webhookTargetId: string; }; query?: never; url: '/{org}/webhook-targets/{webhookTargetId}'; }; export type UpdateWebhookTargetErrors = { /** * Invalid request */ 400: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Unauthorized */ 401: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Forbidden */ 403: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Not found */ 404: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Not acceptable */ 406: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Conflict */ 409: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Internal error */ 500: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; }; export type UpdateWebhookTargetError = UpdateWebhookTargetErrors[keyof UpdateWebhookTargetErrors]; export type UpdateWebhookTargetResponses = { /** * Webhook target updated */ 200: { id: string; name: string | null; url: string; events: Array<'repo.created' | 'repo.updated' | 'repo.deleted' | 'bookmark.created' | 'bookmark.deleted' | 'bookmark.moved' | 'bookmark.merged' | 'change.created' | 'change.evolved' | 'push' | 'sync.queued' | 'sync.in_progress' | 'sync.completed' | 'sync.failed'>; repo_ids: Array | null; created_at: string; updated_at: string; }; }; export type UpdateWebhookTargetResponse = UpdateWebhookTargetResponses[keyof UpdateWebhookTargetResponses]; export type ListReposData = { body?: never; path: { org: string; }; query?: { /** * Opaque pagination cursor from a previous response */ cursor?: string; /** * Maximum number of items to return (max 200) */ limit?: number; /** * Repository tag filter as a JSON-encoded structured filter object. */ tags?: string; }; url: '/{org}/repos'; }; export type ListReposErrors = { /** * Invalid request */ 400: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Unauthorized */ 401: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Forbidden */ 403: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Not found */ 404: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Not acceptable */ 406: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Conflict */ 409: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Internal error */ 500: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; }; export type ListReposError = ListReposErrors[keyof ListReposErrors]; export type ListReposResponses = { /** * Repository list */ 200: { /** * Cursor for the next page, or null when no more results remain */ next_cursor: string | null; /** * Whether another page of results is available */ has_more: boolean; repos: Array<{ id: string; org: string; name: string; default_bookmark: string; /** * Current change id at the default bookmark tip. On empty repositories this is the virtual root change id (zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz). */ head_change_id: string; /** * Upstream remote configured for this repository, or null if none is configured. */ upstream: { url: string; /** * Kind of credentials stored for this upstream, or null if it is public. Auth payloads are write-only — secrets are never returned. */ auth_kind: 'token' | 'username_password' | null; /** * Most recent sync for this upstream, or null if no sync has started yet. */ latest_sync: { id: string; repo_id: string; direction: 'pull' | 'push'; status: 'queued' | 'in_progress' | 'completed' | 'failed'; attempt: number; ref_globs: { branches: string; tags: string; }; stats: { refs: Array<{ name: string; before: string | null; after: string; outcome: 'updated' | 'unchanged' | 'filtered' | 'rejected'; }>; } | null; error: string | null; created_at: string; started_at: string | null; finished_at: string | null; } | null; } | null; created_at: string; tags: { [key: string]: string; }; }>; }; }; export type ListReposResponse = ListReposResponses[keyof ListReposResponses]; export type CreateRepoData = { body: { name?: string; default_bookmark?: string; /** * Repository tags. Keys must not start with "$" (reserved for tag filter operators). */ tags?: { [key: string]: string; }; /** * Optional upstream remote to add at create time. Equivalent to creating the repo and then PATCHing it with the same `upstream` value. */ upstream?: { url: string; /** * Authentication for the upstream remote. On PATCH: omit to leave any existing credential unchanged, pass `null` to clear and make the upstream public, pass an object to set/replace. On POST, both omit and `null` create a public upstream. */ auth?: { kind: 'token'; token: string; token_username?: string; } | { kind: 'username_password'; username: string; password: string; } | null; }; }; path: { org: string; }; query?: never; url: '/{org}/repos'; }; export type CreateRepoErrors = { /** * Invalid request */ 400: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Unauthorized */ 401: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Forbidden */ 403: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Not found */ 404: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Not acceptable */ 406: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Conflict */ 409: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Internal error */ 500: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; }; export type CreateRepoError = CreateRepoErrors[keyof CreateRepoErrors]; export type CreateRepoResponses = { /** * Repository created */ 201: { id: string; org: string; name: string; default_bookmark: string; /** * Current change id at the default bookmark tip. On empty repositories this is the virtual root change id (zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz). */ head_change_id: string; /** * Upstream remote configured for this repository, or null if none is configured. */ upstream: { url: string; /** * Kind of credentials stored for this upstream, or null if it is public. Auth payloads are write-only — secrets are never returned. */ auth_kind: 'token' | 'username_password' | null; /** * Most recent sync for this upstream, or null if no sync has started yet. */ latest_sync: { id: string; repo_id: string; direction: 'pull' | 'push'; status: 'queued' | 'in_progress' | 'completed' | 'failed'; attempt: number; ref_globs: { branches: string; tags: string; }; stats: { refs: Array<{ name: string; before: string | null; after: string; outcome: 'updated' | 'unchanged' | 'filtered' | 'rejected'; }>; } | null; error: string | null; created_at: string; started_at: string | null; finished_at: string | null; } | null; } | null; created_at: string; tags: { [key: string]: string; }; }; }; export type CreateRepoResponse = CreateRepoResponses[keyof CreateRepoResponses]; export type ListRepoUpstreamSyncsData = { body?: never; path: { /** * Organization slug */ org: string; /** * Repository name */ repo: string; }; query?: { /** * Opaque pagination cursor from a previous response */ cursor?: string; /** * Maximum number of items to return (max 200) */ limit?: number; }; url: '/{org}/{repo}/upstream/syncs'; }; export type ListRepoUpstreamSyncsErrors = { /** * Invalid request */ 400: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Unauthorized */ 401: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Forbidden */ 403: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Not found */ 404: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Not acceptable */ 406: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Conflict */ 409: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Internal error */ 500: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; }; export type ListRepoUpstreamSyncsError = ListRepoUpstreamSyncsErrors[keyof ListRepoUpstreamSyncsErrors]; export type ListRepoUpstreamSyncsResponses = { /** * Sync list */ 200: { /** * Cursor for the next page, or null when no more results remain */ next_cursor: string | null; /** * Whether another page of results is available */ has_more: boolean; syncs: Array<{ id: string; repo_id: string; direction: 'pull' | 'push'; status: 'queued' | 'in_progress' | 'completed' | 'failed'; attempt: number; ref_globs: { branches: string; tags: string; }; stats: { refs: Array<{ name: string; before: string | null; after: string; outcome: 'updated' | 'unchanged' | 'filtered' | 'rejected'; }>; } | null; error: string | null; created_at: string; started_at: string | null; finished_at: string | null; }>; }; }; export type ListRepoUpstreamSyncsResponse = ListRepoUpstreamSyncsResponses[keyof ListRepoUpstreamSyncsResponses]; export type SyncUpstreamData = { body: { /** * Direction to sync between the repository and its upstream. */ direction: 'pull' | 'push'; /** * Branch and tag glob filters for this sync. Omit to sync all branches and tags. */ ref_globs?: { branches: string; tags?: string; } | { branches?: string; tags: string; }; }; path: { /** * Organization slug */ org: string; /** * Repository name */ repo: string; }; query?: never; url: '/{org}/{repo}/upstream/syncs'; }; export type SyncUpstreamErrors = { /** * Invalid request */ 400: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Unauthorized */ 401: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Forbidden */ 403: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Not found */ 404: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Not acceptable */ 406: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Conflict */ 409: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Internal error */ 500: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; }; export type SyncUpstreamError = SyncUpstreamErrors[keyof SyncUpstreamErrors]; export type SyncUpstreamResponses = { /** * Sync enqueued */ 201: { id: string; repo_id: string; direction: 'pull' | 'push'; status: 'queued' | 'in_progress' | 'completed' | 'failed'; attempt: number; ref_globs: { branches: string; tags: string; }; stats: { refs: Array<{ name: string; before: string | null; after: string; outcome: 'updated' | 'unchanged' | 'filtered' | 'rejected'; }>; } | null; error: string | null; created_at: string; started_at: string | null; finished_at: string | null; }; }; export type SyncUpstreamResponse = SyncUpstreamResponses[keyof SyncUpstreamResponses]; export type GetRepoUpstreamSyncData = { body?: never; path: { /** * Organization slug */ org: string; /** * Repository name */ repo: string; /** * Sync id */ syncId: string; }; query?: never; url: '/{org}/{repo}/upstream/syncs/{syncId}'; }; export type GetRepoUpstreamSyncErrors = { /** * Invalid request */ 400: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Unauthorized */ 401: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Forbidden */ 403: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Not found */ 404: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Not acceptable */ 406: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Conflict */ 409: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Internal error */ 500: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; }; export type GetRepoUpstreamSyncError = GetRepoUpstreamSyncErrors[keyof GetRepoUpstreamSyncErrors]; export type GetRepoUpstreamSyncResponses = { /** * Sync */ 200: { id: string; repo_id: string; direction: 'pull' | 'push'; status: 'queued' | 'in_progress' | 'completed' | 'failed'; attempt: number; ref_globs: { branches: string; tags: string; }; stats: { refs: Array<{ name: string; before: string | null; after: string; outcome: 'updated' | 'unchanged' | 'filtered' | 'rejected'; }>; } | null; error: string | null; created_at: string; started_at: string | null; finished_at: string | null; }; }; export type GetRepoUpstreamSyncResponse = GetRepoUpstreamSyncResponses[keyof GetRepoUpstreamSyncResponses]; export type DeleteRepoData = { body?: never; path: { /** * Organization slug */ org: string; /** * Repository name */ repo: string; }; query?: never; url: '/{org}/{repo}'; }; export type DeleteRepoErrors = { /** * Invalid request */ 400: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Unauthorized */ 401: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Forbidden */ 403: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Not found */ 404: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Not acceptable */ 406: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Conflict */ 409: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Internal error */ 500: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; }; export type DeleteRepoError = DeleteRepoErrors[keyof DeleteRepoErrors]; export type DeleteRepoResponses = { /** * Repository deleted */ 200: { success: true; }; }; export type DeleteRepoResponse = DeleteRepoResponses[keyof DeleteRepoResponses]; export type GetRepoData = { body?: never; path: { /** * Organization slug */ org: string; /** * Repository name */ repo: string; }; query?: never; url: '/{org}/{repo}'; }; export type GetRepoErrors = { /** * Invalid request */ 400: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Unauthorized */ 401: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Forbidden */ 403: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Not found */ 404: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Not acceptable */ 406: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Conflict */ 409: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Internal error */ 500: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; }; export type GetRepoError = GetRepoErrors[keyof GetRepoErrors]; export type GetRepoResponses = { /** * Repository */ 200: { id: string; org: string; name: string; default_bookmark: string; /** * Current change id at the default bookmark tip. On empty repositories this is the virtual root change id (zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz). */ head_change_id: string; /** * Upstream remote configured for this repository, or null if none is configured. */ upstream: { url: string; /** * Kind of credentials stored for this upstream, or null if it is public. Auth payloads are write-only — secrets are never returned. */ auth_kind: 'token' | 'username_password' | null; /** * Most recent sync for this upstream, or null if no sync has started yet. */ latest_sync: { id: string; repo_id: string; direction: 'pull' | 'push'; status: 'queued' | 'in_progress' | 'completed' | 'failed'; attempt: number; ref_globs: { branches: string; tags: string; }; stats: { refs: Array<{ name: string; before: string | null; after: string; outcome: 'updated' | 'unchanged' | 'filtered' | 'rejected'; }>; } | null; error: string | null; created_at: string; started_at: string | null; finished_at: string | null; } | null; } | null; created_at: string; tags: { [key: string]: string; }; }; }; export type GetRepoResponse = GetRepoResponses[keyof GetRepoResponses]; export type UpdateRepoData = { body: { name?: string; default_bookmark?: string; /** * Tag patch: string values set tags, null removes them. Keys must not start with "$" (reserved for tag filter operators). */ tags?: { [key: string]: string | null; }; /** * Set, replace, or remove the upstream remote. Pass an object to attach or update. Pass `null` to remove. Omit to leave unchanged. */ upstream?: { url: string; /** * Authentication for the upstream remote. On PATCH: omit to leave any existing credential unchanged, pass `null` to clear and make the upstream public, pass an object to set/replace. On POST, both omit and `null` create a public upstream. */ auth?: { kind: 'token'; token: string; token_username?: string; } | { kind: 'username_password'; username: string; password: string; } | null; } | null; }; path: { /** * Organization slug */ org: string; /** * Repository name */ repo: string; }; query?: never; url: '/{org}/{repo}'; }; export type UpdateRepoErrors = { /** * Invalid request */ 400: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Unauthorized */ 401: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Forbidden */ 403: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Not found */ 404: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Not acceptable */ 406: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Conflict */ 409: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Internal error */ 500: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; }; export type UpdateRepoError = UpdateRepoErrors[keyof UpdateRepoErrors]; export type UpdateRepoResponses = { /** * Repository updated */ 200: { id: string; org: string; name: string; default_bookmark: string; /** * Current change id at the default bookmark tip. On empty repositories this is the virtual root change id (zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz). */ head_change_id: string; /** * Upstream remote configured for this repository, or null if none is configured. */ upstream: { url: string; /** * Kind of credentials stored for this upstream, or null if it is public. Auth payloads are write-only — secrets are never returned. */ auth_kind: 'token' | 'username_password' | null; /** * Most recent sync for this upstream, or null if no sync has started yet. */ latest_sync: { id: string; repo_id: string; direction: 'pull' | 'push'; status: 'queued' | 'in_progress' | 'completed' | 'failed'; attempt: number; ref_globs: { branches: string; tags: string; }; stats: { refs: Array<{ name: string; before: string | null; after: string; outcome: 'updated' | 'unchanged' | 'filtered' | 'rejected'; }>; } | null; error: string | null; created_at: string; started_at: string | null; finished_at: string | null; } | null; } | null; created_at: string; tags: { [key: string]: string; }; }; }; export type UpdateRepoResponse = UpdateRepoResponses[keyof UpdateRepoResponses]; export type BulkUpdateRepoTagsData = { body: { repo_ids: Array; action: 'set' | 'remove'; /** * Tag key. Keys must not start with "$" (reserved for tag filter operators). */ key: string; value?: string; }; path: { org: string; }; query?: never; url: '/{org}/repos/tags'; }; export type BulkUpdateRepoTagsErrors = { /** * Invalid request */ 400: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Unauthorized */ 401: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Forbidden */ 403: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Not found */ 404: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Not acceptable */ 406: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Conflict */ 409: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Internal error */ 500: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; }; export type BulkUpdateRepoTagsError = BulkUpdateRepoTagsErrors[keyof BulkUpdateRepoTagsErrors]; export type BulkUpdateRepoTagsResponses = { /** * Updated count */ 200: { updated: number; }; }; export type BulkUpdateRepoTagsResponse = BulkUpdateRepoTagsResponses[keyof BulkUpdateRepoTagsResponses]; export type GetContentData = { body?: never; path: { /** * Organization slug */ org: string; /** * Repository name */ repo: string; }; query?: { /** * Change id to read content from. Defaults to the current change at the default bookmark tip. You may also pass the virtual root change id (zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz) to read the empty tree. */ change_id?: string; path?: string; /** * Directory traversal depth: 0 for directory metadata only, 1 for direct children, up to 10 */ depth?: number; /** * Filter directory `entries[]` to rows whose metadata matches. Pass one param per key as a deepObject: `?metadata[]=`, repeatable. Multiple keys are AND-ed (an entry must match every pair to survive; exact-value match). Ignored when the resolved path is a file or symlink. Example: `?metadata[tag]=archived&metadata[lang]=en`. */ metadata?: { [key: string]: string; }; }; url: '/{org}/{repo}/content'; }; export type GetContentErrors = { /** * Invalid request */ 400: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Unauthorized */ 401: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Forbidden */ 403: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Not found */ 404: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Not acceptable */ 406: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Conflict */ 409: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Internal error */ 500: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; }; export type GetContentError = GetContentErrors[keyof GetContentErrors]; export type GetContentResponses = { /** * Content response */ 200: { type: 'file'; name: string; path: string; sha: string; is_conflicted?: boolean; size: number; encoding: 'base64'; content: string; /** * POSIX file mode for a regular file */ mode: '100644' | '100755'; /** * Metadata attached to this path. Values are UTF-8 strings. Always reflects current values; not snapshotted with change_id. */ metadata?: { [key: string]: string; }; } | { type: 'symlink'; name: string; path: string; sha: string; is_conflicted?: boolean; size: number; encoding: 'base64'; content: string; /** * POSIX file mode for a symlink */ mode: '120000'; /** * Metadata attached to this path. Values are UTF-8 strings. Always reflects current values; not snapshotted with change_id. */ metadata?: { [key: string]: string; }; } | { type: 'dir'; name: string; path: string; sha: string; /** * Number of direct children in this directory */ child_count: number; entries: Array<{ type: 'file'; name: string; path: string; sha: string; size: number; /** * POSIX file mode for a regular file */ mode: '100644' | '100755'; /** * Metadata attached to this entry. Values are UTF-8 strings. Always reflects current values; not snapshotted with change_id. */ metadata?: { [key: string]: string; }; } | { type: 'symlink'; name: string; path: string; sha: string; size: number; /** * POSIX file mode for a symlink */ mode: '120000'; /** * Metadata attached to this entry. Values are UTF-8 strings. Always reflects current values; not snapshotted with change_id. */ metadata?: { [key: string]: string; }; } | { type: 'dir'; name: string; path: string; sha: string; /** * Metadata attached to this entry. Values are UTF-8 strings. Always reflects current values; not snapshotted with change_id. */ metadata?: { [key: string]: string; }; }>; /** * Metadata attached to this directory itself. Values are UTF-8 strings. Always reflects current values; not snapshotted with change_id. For per-entry metadata of children, see `entries[].metadata`. */ metadata?: { [key: string]: string; }; }; }; export type GetContentResponse = GetContentResponses[keyof GetContentResponses]; export type ListBookmarksData = { body?: never; path: { /** * Organization slug */ org: string; /** * Repository name */ repo: string; }; query?: { /** * Opaque pagination cursor from a previous response */ cursor?: string; /** * Maximum number of items to return (max 200) */ limit?: number; /** * Glob pattern matched against bookmark names. Supports '*' and '?' wildcards. */ glob?: string; }; url: '/{org}/{repo}/bookmarks'; }; export type ListBookmarksErrors = { /** * Invalid request */ 400: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Unauthorized */ 401: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Forbidden */ 403: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Not found */ 404: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Not acceptable */ 406: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Conflict */ 409: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Internal error */ 500: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; }; export type ListBookmarksError = ListBookmarksErrors[keyof ListBookmarksErrors]; export type ListBookmarksResponses = { /** * Bookmark list */ 200: { /** * Cursor for the next page, or null when no more results remain */ next_cursor: string | null; /** * Whether another page of results is available */ has_more: boolean; bookmarks: Array<{ name: string; /** * Change id the bookmark points to. When a bookmark points at the empty tree this is the virtual root change id (zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz). */ change_id: string; is_default: boolean; }>; }; }; export type ListBookmarksResponse = ListBookmarksResponses[keyof ListBookmarksResponses]; export type CreateBookmarkData = { body: { name: string; /** * Change id to point the new bookmark at. This may be the virtual root change id (zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz). */ change_id: string; }; path: { /** * Organization slug */ org: string; /** * Repository name */ repo: string; }; query?: never; url: '/{org}/{repo}/bookmarks'; }; export type CreateBookmarkErrors = { /** * Invalid request */ 400: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Unauthorized */ 401: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Forbidden */ 403: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Not found */ 404: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Not acceptable */ 406: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Conflict */ 409: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Internal error */ 500: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; }; export type CreateBookmarkError = CreateBookmarkErrors[keyof CreateBookmarkErrors]; export type CreateBookmarkResponses = { /** * Bookmark created */ 201: { name: string; /** * Change id the bookmark points to. When a bookmark points at the empty tree this is the virtual root change id (zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz). */ change_id: string; is_default: boolean; }; }; export type CreateBookmarkResponse = CreateBookmarkResponses[keyof CreateBookmarkResponses]; export type DeleteBookmarkData = { body?: never; path: { /** * Organization slug */ org: string; /** * Repository name */ repo: string; bookmark: string; }; query?: never; url: '/{org}/{repo}/bookmarks/{bookmark}'; }; export type DeleteBookmarkErrors = { /** * Invalid request */ 400: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Unauthorized */ 401: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Forbidden */ 403: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Not found */ 404: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Not acceptable */ 406: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Conflict */ 409: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Internal error */ 500: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; }; export type DeleteBookmarkError = DeleteBookmarkErrors[keyof DeleteBookmarkErrors]; export type DeleteBookmarkResponses = { /** * Bookmark deleted */ 200: { success: true; }; }; export type DeleteBookmarkResponse = DeleteBookmarkResponses[keyof DeleteBookmarkResponses]; export type GetBookmarkData = { body?: never; path: { /** * Organization slug */ org: string; /** * Repository name */ repo: string; bookmark: string; }; query?: never; url: '/{org}/{repo}/bookmarks/{bookmark}'; }; export type GetBookmarkErrors = { /** * Invalid request */ 400: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Unauthorized */ 401: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Forbidden */ 403: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Not found */ 404: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Not acceptable */ 406: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Conflict */ 409: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Internal error */ 500: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; }; export type GetBookmarkError = GetBookmarkErrors[keyof GetBookmarkErrors]; export type GetBookmarkResponses = { /** * Bookmark */ 200: { name: string; /** * Change id the bookmark points to. When a bookmark points at the empty tree this is the virtual root change id (zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz). */ change_id: string; is_default: boolean; }; }; export type GetBookmarkResponse = GetBookmarkResponses[keyof GetBookmarkResponses]; export type MoveBookmarkData = { body: { /** * Change to move the bookmark to. This may be the virtual root change id (zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz). */ change_id: string; /** * Allow moving the bookmark backwards or sideways. Defaults to false. */ allow_backwards?: boolean; }; path: { /** * Organization slug */ org: string; /** * Repository name */ repo: string; bookmark: string; }; query?: never; url: '/{org}/{repo}/bookmarks/{bookmark}'; }; export type MoveBookmarkErrors = { /** * Invalid request */ 400: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Unauthorized */ 401: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Forbidden */ 403: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Not found */ 404: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Not acceptable */ 406: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Conflict */ 409: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Internal error */ 500: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; }; export type MoveBookmarkError = MoveBookmarkErrors[keyof MoveBookmarkErrors]; export type MoveBookmarkResponses = { /** * Bookmark moved */ 200: { name: string; /** * Change id the bookmark points to. When a bookmark points at the empty tree this is the virtual root change id (zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz). */ change_id: string; is_default: boolean; from_change_id: string | null; }; }; export type MoveBookmarkResponse = MoveBookmarkResponses[keyof MoveBookmarkResponses]; export type MergeBookmarkData = { body: { /** * The bookmark being merged into. Usually main. This bookmark is updated to the resulting merge point. */ target: string; /** * The bookmark that has changes to merge into target. */ source: string; /** * Whether to delete the source bookmark after a successful merge */ delete_source?: boolean; /** * When true, a merge that produces textual conflicts is accepted and the target bookmark is moved to a conflicted merge commit. When false (default), the merge is rejected server-side with MERGE_CONFLICT and nothing is persisted. */ allow_conflicted?: boolean; /** * Description for the resulting merge change. Omit to use the generated merge description; empty string is allowed and means no description. */ message?: string; /** * A single caller-supplied resolution. Whole-file variants carry `content` OR `take` (not both); per-hunk variants carry `hunks`. Whole-file replaces the merged content at `path`. Per-hunk requires all hunks for the path to be resolved. */ resolutions?: Array<{ /** * Repository-relative path of the file to resolve. */ path: string; /** * Base64-encoded replacement bytes. Mutually exclusive with `take`. Use this for hand-edited content, or when the resolution is neither side of the conflict verbatim. */ content?: string; /** * Pick one side of the conflict as the resolution without round-tripping its bytes through the client. The server reads the selected side directly. Mutually exclusive with `content`. If the selected side has no content at this path (an add/delete conflict where that side deleted or never added the file), the resolution deletes the path from the merge output. */ take?: 'target' | 'source'; /** * Only base64 is supported today. */ encoding?: 'base64'; } | { /** * Repository-relative path of the file whose hunks are being resolved. */ path: string; /** * Per-hunk replacements. The set must cover every hunk returned for this path in the prior MERGE_CONFLICT error, otherwise the merge re-raises the conflict. */ hunks: Array<{ /** * Must match a `hunk_id` from a prior MERGE_CONFLICT error response for the containing path. */ hunk_id: string; /** * Base64-encoded replacement bytes. Mutually exclusive with `take`. */ content?: string; /** * Pick one side (`target` or `source`) as this hunk's resolution. The server uses the already-materialized side bytes for this specific conflict span. Mutually exclusive with `content`. */ take?: 'target' | 'source'; encoding?: 'base64'; }>; }>; }; path: { /** * Organization slug */ org: string; /** * Repository name */ repo: string; }; query?: never; url: '/{org}/{repo}/bookmarks/merge'; }; export type MergeBookmarkErrors = { /** * Invalid request */ 400: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Unauthorized */ 401: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Forbidden */ 403: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Not found */ 404: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Not acceptable */ 406: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Conflict */ 409: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Internal error */ 500: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; }; export type MergeBookmarkError = MergeBookmarkErrors[keyof MergeBookmarkErrors]; export type MergeBookmarkResponses = { /** * Merge result */ 200: { /** * The type of merge that was performed. `no_op` when target and source point to the same commit; `merge_commit` otherwise — every divergent merge creates an explicit merge commit (JJ model). */ merge_type: 'merge_commit' | 'no_op'; is_conflicted: boolean; /** * The commit OID the target bookmark now points to */ commit_oid: string; /** * The JJ change ID the target bookmark points to after the merge. */ change_id: string; /** * The target bookmark that was merged into */ target: string; /** * The source bookmark that was merged from */ source: string; /** * Whether the source bookmark was deleted after merge */ source_deleted: boolean; }; }; export type MergeBookmarkResponse = MergeBookmarkResponses[keyof MergeBookmarkResponses]; export type ListChangesData = { body?: never; path: { /** * Organization slug */ org: string; /** * Repository name */ repo: string; }; query?: { /** * Opaque pagination cursor from a previous response */ cursor?: string; /** * Maximum number of items to return (max 200) */ limit?: number; bookmark?: string; }; url: '/{org}/{repo}/changes'; }; export type ListChangesErrors = { /** * Invalid request */ 400: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Unauthorized */ 401: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Forbidden */ 403: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Not found */ 404: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Not acceptable */ 406: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Conflict */ 409: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Internal error */ 500: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; }; export type ListChangesError = ListChangesErrors[keyof ListChangesErrors]; export type ListChangesResponses = { /** * Change list */ 200: { /** * Cursor for the next page, or null when no more results remain */ next_cursor: string | null; /** * Whether another page of results is available */ has_more: boolean; changes: Array<{ id: string; current_commit_oid: string; /** * True when the change current commit still contains unresolved conflicts */ is_conflicted: boolean; /** * Current change description. Empty string means the change has no description. */ message: string; /** * Deprecated. The first entry of `authors`, with `authored_at` as its date. Use `authors` and `authored_at` instead. * * @deprecated */ author: { name: string; email: string; date?: string; }; /** * Complete ordered commit attribution. Every listed author is an equal contributor; only the virtual root has an empty list. */ authors: Array<{ name: string; email: string | null; }>; /** * Shared authored timestamp at native Git whole-second precision; the virtual root uses the Unix epoch. */ authored_at: string; /** * Committer signature; the virtual root uses an empty signature at the Unix epoch. */ committer: { name: string; email: string; date?: string; }; /** * Parent change IDs for this change */ parents: Array; created_at: string; updated_at: string; }>; }; }; export type ListChangesResponse = ListChangesResponses[keyof ListChangesResponses]; export type CreateChangeData = { body: { /** * Description for the newly created change. When optional, omit to create the change with no description; empty string is allowed and also means no description. */ message?: string; author?: { name: string; email: string; date?: string; }; committer?: { name: string; email: string; date?: string; }; files?: Array<{ path: string; content: string; encoding?: 'base64'; action?: 'upsert'; mode?: '100644' | '100755'; } | { path: string; action: 'delete'; }>; /** * Change to create the new change on top of. Use the virtual root change id (zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz) to create the first change in an empty repository. */ base_change_id: string; }; path: { /** * Organization slug */ org: string; /** * Repository name */ repo: string; }; query?: never; url: '/{org}/{repo}/changes'; }; export type CreateChangeErrors = { /** * Invalid request */ 400: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Unauthorized */ 401: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Forbidden */ 403: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Not found */ 404: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Not acceptable */ 406: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Conflict */ 409: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Internal error */ 500: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; }; export type CreateChangeError = CreateChangeErrors[keyof CreateChangeErrors]; export type CreateChangeResponses = { /** * Change created */ 201: { id: string; current_commit_oid: string; /** * True when the change current commit still contains unresolved conflicts */ is_conflicted: boolean; /** * Current change description. Empty string means the change has no description. */ message: string; /** * Deprecated. The first entry of `authors`, with `authored_at` as its date. Use `authors` and `authored_at` instead. * * @deprecated */ author: { name: string; email: string; date?: string; }; /** * Complete ordered commit attribution. Every listed author is an equal contributor; only the virtual root has an empty list. */ authors: Array<{ name: string; email: string | null; }>; /** * Shared authored timestamp at native Git whole-second precision; the virtual root uses the Unix epoch. */ authored_at: string; /** * Committer signature; the virtual root uses an empty signature at the Unix epoch. */ committer: { name: string; email: string; date?: string; }; /** * Parent change IDs for this change */ parents: Array; created_at: string; updated_at: string; }; }; export type CreateChangeResponse = CreateChangeResponses[keyof CreateChangeResponses]; export type GetChangeData = { body?: never; path: { /** * Organization slug */ org: string; /** * Repository name */ repo: string; change_id: string; }; query?: never; url: '/{org}/{repo}/changes/{change_id}'; }; export type GetChangeErrors = { /** * Invalid request */ 400: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Unauthorized */ 401: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Forbidden */ 403: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Not found */ 404: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Not acceptable */ 406: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Conflict */ 409: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Internal error */ 500: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; }; export type GetChangeError = GetChangeErrors[keyof GetChangeErrors]; export type GetChangeResponses = { /** * Change */ 200: { id: string; current_commit_oid: string; /** * True when the change current commit still contains unresolved conflicts */ is_conflicted: boolean; /** * Current change description. Empty string means the change has no description. */ message: string; /** * Deprecated. The first entry of `authors`, with `authored_at` as its date. Use `authors` and `authored_at` instead. * * @deprecated */ author: { name: string; email: string; date?: string; }; /** * Complete ordered commit attribution. Every listed author is an equal contributor; only the virtual root has an empty list. */ authors: Array<{ name: string; email: string | null; }>; /** * Shared authored timestamp at native Git whole-second precision; the virtual root uses the Unix epoch. */ authored_at: string; /** * Committer signature; the virtual root uses an empty signature at the Unix epoch. */ committer: { name: string; email: string; date?: string; }; /** * Parent change IDs for this change */ parents: Array; created_at: string; updated_at: string; files: Array; conflicts: Array; }; }; export type GetChangeResponse = GetChangeResponses[keyof GetChangeResponses]; export type UpdateChangeData = { body: { /** * Replacement change description. Omit to preserve the existing description; pass an empty string to clear it. */ message?: string; author?: { name: string; email: string; date?: string; }; committer?: { name: string; email: string; date?: string; }; files?: Array<{ path: string; content: string; encoding?: 'base64'; action?: 'upsert'; mode?: '100644' | '100755'; } | { path: string; action: 'delete'; }>; base_commit_oid?: string; /** * A single caller-supplied resolution. Whole-file variants carry `content` OR `take` (not both); per-hunk variants carry `hunks`. Whole-file replaces the merged content at `path`. Per-hunk requires all hunks for the path to be resolved. */ resolutions?: Array<{ /** * Repository-relative path of the file to resolve. */ path: string; /** * Base64-encoded replacement bytes. Mutually exclusive with `take`. Use this for hand-edited content, or when the resolution is neither side of the conflict verbatim. */ content?: string; /** * Pick one side of the conflict as the resolution without round-tripping its bytes through the client. The server reads the selected side directly. Mutually exclusive with `content`. If the selected side has no content at this path (an add/delete conflict where that side deleted or never added the file), the resolution deletes the path from the merge output. */ take?: 'target' | 'source'; /** * Only base64 is supported today. */ encoding?: 'base64'; } | { /** * Repository-relative path of the file whose hunks are being resolved. */ path: string; /** * Per-hunk replacements. The set must cover every hunk returned for this path in the prior MERGE_CONFLICT error, otherwise the merge re-raises the conflict. */ hunks: Array<{ /** * Must match a `hunk_id` from a prior MERGE_CONFLICT error response for the containing path. */ hunk_id: string; /** * Base64-encoded replacement bytes. Mutually exclusive with `take`. */ content?: string; /** * Pick one side (`target` or `source`) as this hunk's resolution. The server uses the already-materialized side bytes for this specific conflict span. Mutually exclusive with `content`. */ take?: 'target' | 'source'; encoding?: 'base64'; }>; }>; }; path: { /** * Organization slug */ org: string; /** * Repository name */ repo: string; change_id: string; }; query?: never; url: '/{org}/{repo}/changes/{change_id}'; }; export type UpdateChangeErrors = { /** * Invalid request */ 400: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Unauthorized */ 401: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Forbidden */ 403: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Not found */ 404: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Not acceptable */ 406: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Conflict */ 409: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Internal error */ 500: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; }; export type UpdateChangeError = UpdateChangeErrors[keyof UpdateChangeErrors]; export type UpdateChangeResponses = { /** * Change updated */ 200: { id: string; current_commit_oid: string; /** * True when the change current commit still contains unresolved conflicts */ is_conflicted: boolean; /** * Current change description. Empty string means the change has no description. */ message: string; /** * Deprecated. The first entry of `authors`, with `authored_at` as its date. Use `authors` and `authored_at` instead. * * @deprecated */ author: { name: string; email: string; date?: string; }; /** * Complete ordered commit attribution. Every listed author is an equal contributor; only the virtual root has an empty list. */ authors: Array<{ name: string; email: string | null; }>; /** * Shared authored timestamp at native Git whole-second precision; the virtual root uses the Unix epoch. */ authored_at: string; /** * Committer signature; the virtual root uses an empty signature at the Unix epoch. */ committer: { name: string; email: string; date?: string; }; /** * Parent change IDs for this change */ parents: Array; created_at: string; updated_at: string; }; }; export type UpdateChangeResponse = UpdateChangeResponses[keyof UpdateChangeResponses]; export type GetDiffData = { body?: never; path: { /** * Organization slug */ org: string; /** * Repository name */ repo: string; }; query: { /** * Base change id for the diff. Use the virtual root change id (zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz) to diff from the empty tree. */ base_change_id: string; /** * Head change id for the diff. Use the virtual root change id (zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz) to diff against the empty tree. */ head_change_id: string; conflicts?: 'include' | 'only' | 'exclude'; }; url: '/{org}/{repo}/diff'; }; export type GetDiffErrors = { /** * Invalid request */ 400: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Unauthorized */ 401: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Forbidden */ 403: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Not found */ 404: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Not acceptable */ 406: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Conflict */ 409: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Internal error */ 500: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; }; export type GetDiffError = GetDiffErrors[keyof GetDiffErrors]; export type GetDiffResponses = { /** * Diff response */ 200: { base_change_id: string; head_change_id: string; stats: { entries: number; additions: number; deletions: number; changes: number; conflicted_entries: number; conflicted_hunks: number; }; /** * True when the response hit the server entry limit and is incomplete */ truncated: boolean; /** * Changed entries only. Unchanged paths are omitted from this list */ entries: Array<{ path: string; /** * How the entry changed between the base and head changes */ status: 'added' | 'modified' | 'deleted' | 'renamed'; old_path: string | null; /** * Approximate size in bytes of the changed entry content, not the textual diff */ size_bytes?: number; /** * True when either side of the diff for this entry is still conflicted */ is_conflicted: boolean; /** * Why textual hunk data is unavailable for this changed entry: binary content, entry too large, or omitted because the diff hit file limits */ omitted_reason: 'binary' | 'too_large' | 'file_limit' | null; /** * Structured textual diff hunks, or null when omitted_reason is set */ hunks: Array<{ old_start: number; old_lines: number; new_start: number; new_lines: number; lines: Array<{ kind: 'context' | 'added' | 'deleted' | 'annotation'; text: string; }>; }> | null; conflict_hunks: Array<{ hunk_id: string; old_start: number; old_lines: number; new_start: number; new_lines: number; target: { /** * Base64-encoded raw bytes for this side of the conflicted hunk */ content: string; } | null; base: { /** * Base64-encoded raw bytes for this side of the conflicted hunk */ content: string; } | null; source: { /** * Base64-encoded raw bytes for this side of the conflicted hunk */ content: string; } | null; }> | null; }>; conflicted_entries: Array<{ path: string; /** * Per-hunk conflict detail. Empty when omitted_reason is set or the conflict is non-textual (add/delete). */ hunks: Array<{ hunk_id: string; old_start: number; old_lines: number; new_start: number; new_lines: number; target: { /** * Base64-encoded raw bytes for this side of the conflicted hunk */ content: string; } | null; base: { /** * Base64-encoded raw bytes for this side of the conflicted hunk */ content: string; } | null; source: { /** * Base64-encoded raw bytes for this side of the conflicted hunk */ content: string; } | null; }>; /** * Approximate size in bytes of the largest side of the conflict. Informational when omitted_reason is set. */ size_bytes?: number; /** * Why hunks are unavailable for this conflicted entry: binary content or per-side content exceeded the response size budget. When set, fetch file bytes via GET /content against the target or source change to compose a whole-file resolution. */ omitted_reason?: 'binary' | 'too_large' | null; }>; }; }; export type GetDiffResponse = GetDiffResponses[keyof GetDiffResponses]; export type GetOrgData = { body?: never; path: { org: string; }; query?: never; url: '/{org}'; }; export type GetOrgErrors = { /** * Invalid request */ 400: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Unauthorized */ 401: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Forbidden */ 403: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Not found */ 404: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Not acceptable */ 406: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Conflict */ 409: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; /** * Internal error */ 500: { error: { code: string; message: string; details?: { [key: string]: unknown; }; /** * Support correlation id attached to 5xx responses; quote it when reporting an issue */ trace_id?: string; }; }; }; export type GetOrgError = GetOrgErrors[keyof GetOrgErrors]; export type GetOrgResponses = { /** * Organization summary */ 200: { created_at: string; num_repos: number; }; }; export type GetOrgResponse = GetOrgResponses[keyof GetOrgResponses]; //# sourceMappingURL=types.gen.d.ts.map