UNPKG

bitbucket

Version:

Bitbucket API client for Browser and Node.js

2,310 lines (2,300 loc) 138 kB
import { APIClient as BareAPIClient, Options as BareOptions, Plugin } from '../src/client/types' import { Routes } from '../src/plugins/register-endpoints/types' import { PaginatedResponseData, Response } from '../src/request/types' import { AuthOptions } from '../src/plugins/auth/types' interface Options extends BareOptions { auth?: AuthOptions notice?: boolean } type AsyncResponse<T> = Promise<Response<T>> export interface APIClient extends BareAPIClient { hasNextPage(data: PaginatedResponseData<any>): boolean getNextPage<T>(data: PaginatedResponseData<T>): Response<T> hasPreviousPage(data: PaginatedResponseData<any>): boolean getPreviousPage<T>(data: PaginatedResponseData<T>): Response<T> registerEndpoints(routes: Routes): void } export interface APIClientFactory<APIClient> { new (options?: Options): APIClient (options?: Options): APIClient plugins(plugins: Plugin[]): APIClientFactory<APIClient> } export namespace Schema { export type Any = any export type AnyObject = { [key: string]: any } export type Branch = Ref & { [k: string]: any } export type Commit = BaseCommit & { participants?: Participant[] repository?: Repository [k: string]: any } export type BaseCommit = Object & { author?: Author date?: string hash?: string message?: string parents?: BaseCommit[] summary?: { html?: string markup?: 'markdown' | 'creole' | 'plaintext' raw?: string } [k: string]: any } export type Author = Object & { raw?: string user?: Account [k: string]: any } export type Account = Object & { account_status?: string created_on?: string display_name?: string has_2fa_enabled?: boolean links?: { avatar?: { href?: string name?: string } followers?: { href?: string name?: string } following?: { href?: string name?: string } html?: { href?: string name?: string } repositories?: { href?: string name?: string } self?: { href?: string name?: string } } nickname?: string username?: string uuid?: string website?: string [k: string]: any } export type Participant = Object & { approved?: boolean participated_on?: string role?: 'PARTICIPANT' | 'REVIEWER' user?: User [k: string]: any } export type User = Account & { account_id?: string is_staff?: boolean [k: string]: any } export type Repository = Object & { created_on?: string description?: string fork_policy?: 'allow_forks' | 'no_public_forks' | 'no_forks' full_name?: string has_issues?: boolean has_wiki?: boolean is_private?: boolean language?: string links?: { avatar?: { href?: string name?: string } clone?: { href?: string name?: string }[] commits?: { href?: string name?: string } downloads?: { href?: string name?: string } forks?: { href?: string name?: string } hooks?: { href?: string name?: string } html?: { href?: string name?: string } pullrequests?: { href?: string name?: string } self?: { href?: string name?: string } watchers?: { href?: string name?: string } } mainbranch?: Branch name?: string owner?: Account parent?: Repository project?: Project scm?: 'hg' | 'git' size?: number updated_on?: string uuid?: string [k: string]: any } export type Project = Object & { created_on?: string description?: string is_private?: boolean key?: string links?: { avatar?: { href?: string name?: string } html?: { href?: string name?: string } } name?: string owner?: Team updated_on?: string uuid?: string [k: string]: any } export type Team = Account & { [k: string]: any } export type BranchingModel = Object & { branch_types?: | [] | [ { kind: 'feature' | 'bugfix' | 'release' | 'hotfix' prefix: string } ] | [ { kind: 'feature' | 'bugfix' | 'release' | 'hotfix' prefix: string }, { kind: 'feature' | 'bugfix' | 'release' | 'hotfix' prefix: string } ] | [ { kind: 'feature' | 'bugfix' | 'release' | 'hotfix' prefix: string }, { kind: 'feature' | 'bugfix' | 'release' | 'hotfix' prefix: string }, { kind: 'feature' | 'bugfix' | 'release' | 'hotfix' prefix: string } ] | [ { kind: 'feature' | 'bugfix' | 'release' | 'hotfix' prefix: string }, { kind: 'feature' | 'bugfix' | 'release' | 'hotfix' prefix: string }, { kind: 'feature' | 'bugfix' | 'release' | 'hotfix' prefix: string }, { kind: 'feature' | 'bugfix' | 'release' | 'hotfix' prefix: string } ] development?: { branch?: Branch name: string use_mainbranch: boolean } production?: { branch?: Branch name: string use_mainbranch: boolean } [k: string]: any } export type BranchingModelSettings = Object & { branch_types?: | [] | [ { enabled?: boolean kind: 'feature' | 'bugfix' | 'release' | 'hotfix' prefix?: string } ] | [ { enabled?: boolean kind: 'feature' | 'bugfix' | 'release' | 'hotfix' prefix?: string }, { enabled?: boolean kind: 'feature' | 'bugfix' | 'release' | 'hotfix' prefix?: string } ] | [ { enabled?: boolean kind: 'feature' | 'bugfix' | 'release' | 'hotfix' prefix?: string }, { enabled?: boolean kind: 'feature' | 'bugfix' | 'release' | 'hotfix' prefix?: string }, { enabled?: boolean kind: 'feature' | 'bugfix' | 'release' | 'hotfix' prefix?: string } ] | [ { enabled?: boolean kind: 'feature' | 'bugfix' | 'release' | 'hotfix' prefix?: string }, { enabled?: boolean kind: 'feature' | 'bugfix' | 'release' | 'hotfix' prefix?: string }, { enabled?: boolean kind: 'feature' | 'bugfix' | 'release' | 'hotfix' prefix?: string }, { enabled?: boolean kind: 'feature' | 'bugfix' | 'release' | 'hotfix' prefix?: string } ] development?: { is_valid?: boolean name?: string use_mainbranch?: boolean } links?: { self?: { href?: string name?: string } } production?: { enabled?: boolean is_valid?: boolean name?: string use_mainbranch?: boolean } [k: string]: any } export type Branchrestriction = Object & { branch_match_kind: 'branching_model' | 'glob' branch_type?: | 'feature' | 'bugfix' | 'release' | 'hotfix' | 'development' | 'production' groups?: Group[] id?: number kind: | 'require_tasks_to_be_completed' | 'force' | 'restrict_merges' | 'enforce_merge_checks' | 'require_approvals_to_merge' | 'delete' | 'require_all_dependencies_merged' | 'push' | 'require_passing_builds_to_merge' | 'reset_pullrequest_approvals_on_change' | 'require_default_reviewer_approvals_to_merge' links?: { self?: { href?: string name?: string } } pattern: string users?: Account[] value?: number [k: string]: any } export type Group = Object & { full_slug?: string links?: { html?: { href?: string name?: string } self?: { href?: string name?: string } } members?: number name?: string owner?: Account slug?: string [k: string]: any } export type CommitComment = Comment & { commit?: Commit [k: string]: any } export type Comment = Object & { content?: { html?: string markup?: 'markdown' | 'creole' | 'plaintext' raw?: string } created_on?: string deleted?: boolean id?: number inline?: { from?: number path: string to?: number } links?: { code?: { href?: string name?: string } html?: { href?: string name?: string } self?: { href?: string name?: string } } parent?: Comment updated_on?: string user?: User [k: string]: any } export type Commitstatus = Object & { created_on?: string description?: string key?: string links?: { commit?: { href?: string name?: string } self?: { href?: string name?: string } } name?: string refname?: string state?: 'SUCCESSFUL' | 'FAILED' | 'INPROGRESS' | 'STOPPED' updated_on?: string url?: string uuid?: string [k: string]: any } export type Component = Object & { id?: number links?: { self?: { href?: string name?: string } } name?: string [k: string]: any } export type DeployKey = Object & { added_on?: string comment?: string key?: string label?: string last_used?: string links?: { self?: { href?: string name?: string } } owner?: Account repository?: Repository [k: string]: any } export type Deployment = Object & { environment?: DeploymentEnvironment release?: DeploymentRelease state?: DeploymentState uuid?: string [k: string]: any } export type DeploymentEnvironment = Object & { name?: string uuid?: string [k: string]: any } export type DeploymentRelease = Object & { commit?: Commit created_on?: string name?: string url?: string uuid?: string [k: string]: any } export type DeploymentState = Object & { [k: string]: any } export type DeploymentVariable = Object & { key?: string secured?: boolean uuid?: string value?: string [k: string]: any } export type Issue = Object & { assignee?: User component?: Component content?: { html?: string markup?: 'markdown' | 'creole' | 'plaintext' raw?: string } created_on?: string edited_on?: string id?: number kind?: 'bug' | 'enhancement' | 'proposal' | 'task' links?: { attachments?: { href?: string name?: string } comments?: { href?: string name?: string } html?: { href?: string name?: string } self?: { href?: string name?: string } vote?: { href?: string name?: string } watch?: { href?: string name?: string } } milestone?: Milestone priority?: 'trivial' | 'minor' | 'major' | 'critical' | 'blocker' reporter?: User repository?: Repository state?: | 'new' | 'open' | 'resolved' | 'on hold' | 'invalid' | 'duplicate' | 'wontfix' | 'closed' title?: string updated_on?: string version?: Version votes?: number [k: string]: any } export type Milestone = Object & { id?: number links?: { self?: { href?: string name?: string } } name?: string [k: string]: any } export type Version = Object & { id?: number links?: { self?: { href?: string name?: string } } name?: string [k: string]: any } export type IssueComment = Comment & { issue?: Issue [k: string]: any } export type IssueAttachment = Object & { links?: { self?: { href?: string name?: string } } name?: string [k: string]: any } export type PipelineKnownHost = Object & { hostname?: string public_key?: PipelineSshPublicKey uuid?: string [k: string]: any } export type PipelineSshPublicKey = Object & { key?: string key_type?: string md5_fingerprint?: string sha256_fingerprint?: string [k: string]: any } export type PipelineScheduleExecution = Object & { [k: string]: any } export type PipelineSchedule = Object & { created_on?: string cron_pattern?: string enabled?: boolean selector?: PipelineSelector target?: PipelineTarget updated_on?: string uuid?: string [k: string]: any } export type PipelineSelector = Object & { pattern?: string type?: 'branches' | 'tags' | 'bookmarks' | 'default' | 'custom' [k: string]: any } export type PipelineTarget = Object & { [k: string]: any } export type PipelineStep = Object & { completed_on?: string image?: PipelineImage script_commands?: PipelineCommand[] setup_commands?: PipelineCommand[] started_on?: string state?: PipelineStepState uuid?: string [k: string]: any } export type PipelineStepState = Object & { [k: string]: any } export type PipelineVariable = Object & { key?: string secured?: boolean uuid?: string value?: string [k: string]: any } export type Pipeline = Object & { build_number?: number build_seconds_used?: number completed_on?: string created_on?: string creator?: Account repository?: Repository state?: PipelineState target?: PipelineTarget trigger?: PipelineTrigger uuid?: string [k: string]: any } export type PipelineState = Object & { [k: string]: any } export type PipelineTrigger = Object & { [k: string]: any } export type PullrequestComment = Comment & { pullrequest?: Pullrequest [k: string]: any } export type Pullrequest = Object & { author?: Account close_source_branch?: boolean closed_by?: Account comment_count?: number created_on?: string destination?: PullrequestEndpoint id?: number links?: { activity?: { href?: string name?: string } approve?: { href?: string name?: string } comments?: { href?: string name?: string } commits?: { href?: string name?: string } decline?: { href?: string name?: string } diff?: { href?: string name?: string } diffstat?: { href?: string name?: string } html?: { href?: string name?: string } merge?: { href?: string name?: string } self?: { href?: string name?: string } } merge_commit?: { hash?: string } participants?: Participant[] reason?: string rendered?: { description?: { html?: string markup?: 'markdown' | 'creole' | 'plaintext' raw?: string } reason?: { html?: string markup?: 'markdown' | 'creole' | 'plaintext' raw?: string } title?: { html?: string markup?: 'markdown' | 'creole' | 'plaintext' raw?: string } } reviewers?: Account[] source?: PullrequestEndpoint state?: 'MERGED' | 'SUPERSEDED' | 'OPEN' | 'DECLINED' summary?: { html?: string markup?: 'markdown' | 'creole' | 'plaintext' raw?: string } task_count?: number title?: string updated_on?: string [k: string]: any } export type SnippetComment = Object & { links?: { html?: { href?: string name?: string } self?: { href?: string name?: string } } snippet?: Snippet [k: string]: any } export type Snippet = Object & { created_on?: string creator?: Account id?: number is_private?: boolean owner?: Account scm?: 'hg' | 'git' title?: string updated_on?: string [k: string]: any } export type SnippetCommit = BaseCommit & { links?: { diff?: { href?: string name?: string } html?: { href?: string name?: string } self?: { href?: string name?: string } } snippet?: Snippet [k: string]: any } export type SshAccountKey = SshKey & { owner?: Account [k: string]: any } export type SshKey = Object & { comment?: string created_on?: string key?: string label?: string last_used?: string links?: { self?: { href?: string name?: string } } uuid?: string [k: string]: any } export type Tag = Ref & { date?: string message?: string tagger?: Author [k: string]: any } export type WebhookSubscription = Object & { active?: boolean created_at?: string description?: string events?: ( | 'pullrequest:unapproved' | 'issue:comment_created' | 'pullrequest:approved' | 'repo:created' | 'repo:deleted' | 'repo:imported' | 'pullrequest:comment_updated' | 'issue:updated' | 'project:updated' | 'pullrequest:comment_created' | 'repo:commit_status_updated' | 'pullrequest:updated' | 'issue:created' | 'repo:fork' | 'pullrequest:comment_deleted' | 'repo:commit_status_created' | 'repo:updated' | 'pullrequest:rejected' | 'pullrequest:fulfilled' | 'repo:push' | 'pullrequest:created' | 'repo:transfer' | 'repo:commit_comment_created')[] subject?: Object subject_type?: 'workspace' | 'user' | 'repository' | 'team' url?: string uuid?: string [k: string]: any } export type PipelineBuildNumber = Object & { next?: number [k: string]: any } export type PipelineSshKeyPair = Object & { private_key?: string public_key?: string [k: string]: any } export type PipelinesConfig = Object & { enabled?: boolean repository?: Repository [k: string]: any } export interface Ref { links?: { commits?: { href?: string name?: string } html?: { href?: string name?: string } self?: { href?: string name?: string } } name?: string target?: Commit type: string [k: string]: any } export interface Object { type: string [k: string]: any } export interface Error { error?: { data?: { [k: string]: any } detail?: string message: string } type: string [k: string]: any } export interface IssueChange { changes?: { assignee?: { new?: string old?: string } component?: { new?: string old?: string } content?: { new?: string old?: string } kind?: { new?: string old?: string } milestone?: { new?: string old?: string } priority?: { new?: string old?: string } state?: { new?: string old?: string } title?: { new?: string old?: string } version?: { new?: string old?: string } } created_on?: string issue?: Issue links?: { issue?: { href?: string name?: string } self?: { href?: string name?: string } } message?: { html?: string markup?: 'markdown' | 'creole' | 'plaintext' raw?: string } name?: string type: string user?: User [k: string]: any } export interface IssueJobStatus { count?: number pct?: number phase?: string status?: 'ACCEPTED' | 'STARTED' | 'RUNNING' | 'FAILURE' total?: number type?: string } export interface PaginatedBranches { next?: string page?: number pagelen?: number previous?: string size?: number values?: Branch[] } export interface PaginatedBranchrestrictions { next?: string page?: number pagelen?: number previous?: string size?: number values?: Branchrestriction[] } export interface PaginatedCommitComments { next?: string page?: number pagelen?: number previous?: string size?: number values?: CommitComment[] } export interface PaginatedCommitstatuses { next?: string page?: number pagelen?: number previous?: string size?: number values?: Commitstatus[] } export interface PaginatedComponents { next?: string page?: number pagelen?: number previous?: string size?: number values?: Component[] } export interface PaginatedDeployKeys { next?: string page?: number pagelen?: number previous?: string size?: number values?: DeployKey[] } export interface PaginatedDeploymentVariable { next?: string page?: number pagelen?: number previous?: string size?: number values?: DeploymentVariable[] [k: string]: any } export interface PaginatedDeployments { next?: string page?: number pagelen?: number previous?: string size?: number values?: Deployment[] [k: string]: any } export interface PaginatedDiffstats { next?: string page?: number pagelen?: number previous?: string size?: number values?: Diffstat[] } export interface Diffstat { lines_added?: number lines_removed?: number new?: CommitFile old?: CommitFile status?: 'added' | 'removed' | 'modified' | 'renamed' type: string [k: string]: any } export interface CommitFile { attributes?: 'link' | 'executable' | 'subrepository' | 'binary' | 'lfs' commit?: Commit path?: string type: string [k: string]: any } export interface PaginatedEnvironments { next?: string page?: number pagelen?: number previous?: string size?: number values?: DeploymentEnvironment[] [k: string]: any } export interface PaginatedFiles { next?: string page?: number pagelen?: number previous?: string size?: number values?: CommitFile[] } export interface PaginatedHookEvents { next?: string page?: number pagelen?: number previous?: string size?: number values?: HookEvent[] } export interface HookEvent { category?: string description?: string event?: | 'pullrequest:unapproved' | 'issue:comment_created' | 'pullrequest:approved' | 'repo:created' | 'repo:deleted' | 'repo:imported' | 'pullrequest:comment_updated' | 'issue:updated' | 'project:updated' | 'pullrequest:comment_created' | 'repo:commit_status_updated' | 'pullrequest:updated' | 'issue:created' | 'repo:fork' | 'pullrequest:comment_deleted' | 'repo:commit_status_created' | 'repo:updated' | 'pullrequest:rejected' | 'pullrequest:fulfilled' | 'repo:push' | 'pullrequest:created' | 'repo:transfer' | 'repo:commit_comment_created' label?: string } export interface PaginatedIssueAttachments { next?: string page?: number pagelen?: number previous?: string size?: number values?: IssueAttachment[] } export interface PaginatedIssueComments { next?: string page?: number pagelen?: number previous?: string size?: number values?: IssueComment[] } export interface PaginatedIssues { next?: string page?: number pagelen?: number previous?: string size?: number values?: Issue[] } export interface PaginatedLogEntries { next?: string page?: number pagelen?: number previous?: string size?: number values?: IssueChange[] } export interface PaginatedMilestones { next?: string page?: number pagelen?: number previous?: string size?: number values?: Milestone[] } export interface PaginatedPipelineKnownHosts { next?: string page?: number pagelen?: number previous?: string size?: number values?: PipelineKnownHost[] [k: string]: any } export interface PaginatedPipelineScheduleExecutions { next?: string page?: number pagelen?: number previous?: string size?: number values?: PipelineScheduleExecution[] [k: string]: any } export interface PaginatedPipelineSchedules { next?: string page?: number pagelen?: number previous?: string size?: number values?: PipelineSchedule[] [k: string]: any } export interface PaginatedPipelineSteps { next?: string page?: number pagelen?: number previous?: string size?: number values?: PipelineStep[] [k: string]: any } export interface PipelineImage { email?: string name?: string password?: string username?: string [k: string]: any } export interface PipelineCommand { command?: string name?: string [k: string]: any } export interface PaginatedPipelineVariables { next?: string page?: number pagelen?: number previous?: string size?: number values?: PipelineVariable[] [k: string]: any } export interface PaginatedPipelines { next?: string page?: number pagelen?: number previous?: string size?: number values?: Pipeline[] [k: string]: any } export interface PaginatedProjects { next?: string page?: number pagelen?: number previous?: string size?: number values?: Project[] } export interface PaginatedPullrequestComments { next?: string page?: number pagelen?: number previous?: string size?: number values?: PullrequestComment[] } export interface PullrequestEndpoint { branch?: { default_merge_strategy?: string merge_strategies?: ('merge_commit' | 'squash' | 'fast_forward')[] name?: string } commit?: { hash?: string } repository?: Repository } export interface PaginatedPullrequests { next?: string page?: number pagelen?: number previous?: string size?: number values?: Pullrequest[] } export interface PaginatedRefs { next?: string page?: number pagelen?: number previous?: string size?: number values?: Ref[] } export interface PaginatedRepositories { next?: string page?: number pagelen?: number previous?: string size?: number values?: Repository[] } export interface PaginatedRepositoryPermissions { next?: string page?: number pagelen?: number previous?: string size?: number values?: RepositoryPermission[] } export interface RepositoryPermission { permission?: 'admin' | 'write' | 'read' repository?: Repository type: string user?: User [k: string]: any } export interface PaginatedSnippetComments { next?: string page?: number pagelen?: number previous?: string size?: number values?: SnippetComment[] } export interface PaginatedSnippetCommit { next?: string page?: number pagelen?: number previous?: string size?: number values?: SnippetCommit[] } export interface PaginatedSnippets { next?: string page?: number pagelen?: number previous?: string size?: number values?: Snippet[] } export interface PaginatedSshUserKeys { next?: string page?: number pagelen?: number previous?: string size?: number values?: SshAccountKey[] } export interface PaginatedTags { next?: string page?: number pagelen?: number previous?: string size?: number values?: Tag[] } export interface PaginatedTeamPermissions { next?: string page?: number pagelen?: number previous?: string size?: number values?: TeamPermission[] } export interface TeamPermission { permission?: 'admin' | 'collaborator' team?: Team type: string user?: User [k: string]: any } export interface PaginatedTeams { next?: string page?: number pagelen?: number previous?: string size?: number values?: Team[] } export interface PaginatedTreeentries { next?: string page?: number pagelen?: number previous?: string size?: number values?: Treeentry[] } export interface Treeentry { commit?: Commit path?: string type: string [k: string]: any } export interface PaginatedUsers { next?: string page?: number pagelen?: number previous?: string size?: number values?: User[] } export interface PaginatedVersions { next?: string page?: number pagelen?: number previous?: string size?: number values?: Version[] } export interface PaginatedWebhookSubscriptions { next?: string page?: number pagelen?: number previous?: string size?: number values?: WebhookSubscription[] } export interface PullrequestMergeParameters { close_source_branch?: boolean merge_strategy?: 'merge_commit' | 'squash' | 'fast_forward' message?: string type: string [k: string]: any } export interface SearchResultPage { next?: string page?: number pagelen?: number previous?: string query_substituted?: boolean size?: number values?: SearchCodeSearchResult[] [k: string]: any } export interface SearchCodeSearchResult { content_match_count?: number content_matches?: SearchContentMatch[] file?: CommitFile path_matches?: SearchSegment[] type?: string [k: string]: any } export interface SearchContentMatch { lines?: SearchLine[] [k: string]: any } export interface SearchLine { line?: number segments?: SearchSegment[] [k: string]: any } export interface SearchSegment { match?: boolean text?: string [k: string]: any } export interface SubjectTypes { repository?: { events?: { href?: string name?: string } } team?: { events?: { href?: string name?: string } } user?: { events?: { href?: string name?: string } } } } export namespace Params { export type Empty = {} export type BranchingModelGet = { repo_slug: string workspace: string fields?: string } export type BranchingModelGetSettings = { repo_slug: string workspace: string fields?: string } export type BranchingModelUpdateSettings = { _body?: Schema.BranchingModelSettings repo_slug: string workspace: string } export type BranchrestrictionsCreate = { _body: Schema.Branchrestriction repo_slug: string workspace: string } export type BranchrestrictionsDelete = { id: string repo_slug: string workspace: string } export type BranchrestrictionsGet = { id: string repo_slug: string workspace: string fields?: string } export type BranchrestrictionsList = { kind?: string pattern?: string repo_slug: string workspace: string page?: string pagelen?: number q?: string sort?: string fields?: string } export type BranchrestrictionsUpdate = { _body: Schema.Branchrestriction id: string repo_slug: string workspace: string } export type CommitsCreateApproval = { node: string repo_slug: string workspace: string } export type CommitsCreateComment = { _body: Schema.CommitComment node: string repo_slug: string workspace: string } export type CommitsDeleteApproval = { node: string repo_slug: string workspace: string } export type CommitsGet = { node: string repo_slug: string workspace: string fields?: string } export type CommitsGetComment = { comment_id: number node: string repo_slug: string workspace: string fields?: string } export type CommitsGetDiff = { binary?: boolean context?: number ignore_whitespace?: boolean path?: string repo_slug: string spec: string workspace: string fields?: string } export type CommitsGetPatch = { repo_slug: string spec: string workspace: string fields?: string } export type CommitsList = { exclude?: string include?: string repo_slug: string workspace: string page?: string pagelen?: number q?: string sort?: string fields?: string } export type CommitsListAlt = { exclude?: string include?: string repo_slug: string workspace: string page?: string pagelen?: number q?: string sort?: string } export type CommitsListAt = { exclude?: string include?: string repo_slug: string revision: string workspace: string page?: string pagelen?: number q?: string sort?: string fields?: string } export type CommitsListAtAlt = { exclude?: string include?: string repo_slug: string revision: string workspace: string page?: string pagelen?: number q?: string sort?: string } export type CommitsListComments = { node: string repo_slug: string workspace: string page?: string pagelen?: number q?: string sort?: string fields?: string } export type CommitstatusesCreateBuildStatus = { _body?: Schema.Commitstatus node: string repo_slug: string workspace: string } export type CommitstatusesGetBuildStatus = { key: string node: string repo_slug: string workspace: string fields?: string } export type CommitstatusesList = { node: string repo_slug: string workspace: string page?: string pagelen?: number q?: string sort?: string fields?: string } export type CommitstatusesListPullRequestStatuses = { pull_request_id: number repo_slug: string workspace: string page?: string pagelen?: number q?: string sort?: string fields?: string } export type CommitstatusesUpdateBuildStatus = { _body?: Schema.Commitstatus key: string node: string repo_slug: string workspace: string } export type DeployCreateKey = { key: string label: string repo_slug: string workspace: string } export type DeployDeleteKey = { key_id: string repo_slug: string workspace: string } export type DeployGetKey = { key_id: string repo_slug: string workspace: string fields?: string } export type DeployListKeys = { repo_slug: string workspace: string page?: string pagelen?: number q?: string sort?: string fields?: string } export type DeployUpdateKey = { key_id: string repo_slug: string workspace: string } export type DeploymentsGet = { deployment_uuid: string repo_slug: string workspace: string fields?: string } export type DeploymentsGetEnvironment = { environment_uuid: string repo_slug: string workspace: string fields?: string } export type DeploymentsList = { repo_slug: string workspace: string page?: string pagelen?: number q?: string sort?: string fields?: string } export type DeploymentsListEnvironments = { repo_slug: string workspace: string page?: string pagelen?: number q?: string sort?: string fields?: string } export type DeploymentsUpdateEnvironment = { _body: any environment_uuid: string repo_slug: string workspace: string } export type DownloadsCreate = { _body: FormData repo_slug: string workspace: string } export type DownloadsDelete = { filename: string repo_slug: string workspace: string } export type DownloadsGet = { filename: string repo_slug: string workspace: string fields?: string } export type DownloadsList = { repo_slug: string workspace: string page?: string pagelen?: number q?: string sort?: string fields?: string } export type HookEventsGetAllSubjectTypes = { fields?: string } export type HookEventsList = { subject_type: 'workspace' | 'user' | 'repository' | 'team' page?: string pagelen?: number q?: string sort?: string fields?: string } export type IssueTrackerCreate = { _body: Schema.Issue repo_slug: string workspace: string } export type IssueTrackerCreateAttachments = { _body: FormData issue_id: number repo_slug: string workspace: string } export type IssueTrackerCreateChange = { _body: Schema.IssueChange issue_id: string repo_slug: string workspace: string } export type IssueTrackerCreateComment = { _body: Schema.IssueComment issue_id: string repo_slug: string workspace: string } export type IssueTrackerCreateVote = { issue_id: string repo_slug: string workspace: string } export type IssueTrackerCreateWatch = { issue_id: string repo_slug: string workspace: string } export type IssueTrackerDelete = { issue_id: string repo_slug: string workspace: string } export type IssueTrackerDeleteAttachment = { issue_id: string path: string repo_slug: string workspace: string } export type IssueTrackerDeleteComment = { _body: Schema.IssueComment comment_id: string issue_id: string repo_slug: string workspace: string } export type IssueTrackerDeleteVote = { issue_id: string repo_slug: string workspace: string } export type IssueTrackerDeleteWatch = { issue_id: string repo_slug: string workspace: string } export type IssueTrackerGet = { issue_id: string repo_slug: string workspace: string fields?: string } export type IssueTrackerGetAttachment = { issue_id: string path: string repo_slug: string workspace: string fields?: string } export type IssueTrackerGetChange = { change_id: string issue_id: string repo_slug: string workspace: string fields?: string } export type IssueTrackerGetComment = { comment_id: string issue_id: string repo_slug: string workspace: string fields?: string } export type IssueTrackerGetComponent = { component_id: number repo_slug: string workspace: string fields?: string } export type IssueTrackerGetMilestone = { milestone_id: number repo_slug: string workspace: string fields?: string } export type IssueTrackerGetVersion = { repo_slug: string version_id: number workspace: string fields?: string } export type IssueTrackerGetVote = { issue_id: string repo_slug: string workspace: string fields?: string } export type IssueTrackerGetWatch = { issue_id: string repo_slug: string workspace: string fields?: string } export type IssueTrackerList = { repo_slug: string workspace: string page?: string pagelen?: number q?: string sort?: string fields?: string } export type IssueTrackerListAttachments = { issue_id: number repo_slug: string workspace: string page?: string pagelen?: number q?: string sort?: string fields?: string } export type IssueTrackerListChanges = { issue_id: string repo_slug: string workspace: string page?: string pagelen?: number q?: string sort?: string fields?: string } export type IssueTrackerListComments = { issue_id: string repo_slug: string workspace: string page?: string pagelen?: number q?: string sort?: string fields?: string } export type IssueTrackerListComponents = { repo_slug: string workspace: string page?: string pagelen?: number q?: string sort?: string fields?: string } export type IssueTrackerListMilestones = { repo_slug: string workspace: string page?: string pagelen?: number q?: string sort?: string fields?: string } export type IssueTrackerListVersions = { repo_slug: string workspace: string page?: string pagelen?: number q?: string sort?: string fields?: string } export type IssueTrackerUpdate = { _body: Schema.Issue issue_id: string repo_slug: string workspace: string } export type IssueTrackerUpdateComment = { _body: Schema.IssueComment comment_id: string issue_id: string repo_slug: string workspace: string } export type PipelinesCreate = { _body: Schema.Pipeline repo_slug: string workspace: string } export type PipelinesCreateDeploymentVariable = { _body: Schema.DeploymentVariable environment_uuid: string repo_slug: string variable_uuid: string workspace: string } export type PipelinesCreateKnownHost = { _body: Schema.PipelineKnownHost repo_slug: string workspace: string } export type PipelinesCreateSchedule = { _body: Schema.PipelineSchedule repo_slug: string workspace: string } export type PipelinesCreateVariable = { _body: Schema.PipelineVariable repo_slug: string workspace: string } export type PipelinesCreateVariableForTeam = { _body?: Schema.PipelineVariable username: string } export type PipelinesCreateVariableForUser = { _body?: Schema.PipelineVariable username: string } export type PipelinesDeleteDeploymentVariable = { environment_uuid: string repo_slug: string variable_uuid: string workspace: string } export type PipelinesDeleteKnownHost = { known_host_uuid: string repo_slug: string workspace: string } export type PipelinesDeleteSchedule = { repo_slug: string schedule_uuid: string workspace: string } export type PipelinesDeleteSshKeyPair = { repo_slug: string workspace: string } export type PipelinesDeleteVariable = { repo_slug: string variable_uuid: string workspace: string } export type PipelinesDeleteVariableForTeam = { username: string variable_uuid: string } export type PipelinesDeleteVariableForUser = { username: string variable_uuid: string } export type PipelinesGet = { pipeline_uuid: string repo_slug: string workspace: string fields?: string } export type PipelinesGetConfig = { repo_slug: string workspace: string fields?: string } export type PipelinesGetKnownHost = { known_host_uuid: string repo_slug: string workspace: string fields?: string } export type PipelinesGetSchedule = { repo_slug: string schedule_uuid: string workspace: string fields?: string } export type PipelinesGetSshKeyPair = { repo_slug: string workspace: string fields?: string } export type PipelinesGetStep = { pipeline_uuid: string repo_slug: string step_uuid: string workspace: string fields?: string } export type PipelinesGetStepLog = { pipeline_uuid: string repo_slug: string step_uuid: string workspace: string fields?: string } export type PipelinesGetVariable = { repo_slug: string variable_uuid: string workspace: string fields?: string } export type PipelinesGetVariableForTeam = { username: string variable_uuid: string fields?: string } export type PipelinesGetVariableForUser = { username: string variable_uuid: string fields?: string } export type PipelinesList = { repo_slug: string workspace: string page?: string pagelen?: number q?: string sort?: string fields?: string } export type PipelinesListDeploymentVariables = { environment_uuid: string repo_slug: string workspace: string page?: string pagelen?: number q?: string sort?: string fields?: string } export type PipelinesListKnownHosts = { repo_slug: string workspace: string page?: string pagelen?: number q?: string sort?: string fields?: string } export type PipelinesListScheduleExecutions = { repo_slug: string workspace: string page?: string pagelen?: number q?: string sort?: string fields?: string } export type PipelinesListSchedules = { repo_slug: string workspace: string page?: string pagelen?: number q?: string sort?: string fields?: string } export type PipelinesListSteps = { pipeline_uuid: string repo_slug: string workspace: string page?: string pagelen?: number q?: string sort?: string fields?: string } export type PipelinesListVariablesForRepo = { repo_slug: string workspace: string page?: string pagelen?: number q?: string sort?: string fields?: string } export type PipelinesListVariablesForTeam = { username: string page?: string pagelen?: number q?: string sort?: string fields?: string } export type PipelinesListVariablesForUser = { username: string page?: string pagelen?: number q?: string sort?: string fields?: string } export type PipelinesStop = { pipeline_uuid: string repo_slug: string workspace: string } export type PipelinesUpdateBuildNumber = { _body: Schema.PipelineBuildNumber repo_slug: string workspace: string } export type PipelinesUpdateConfig = { _body: Schema.PipelinesConfig repo_slug: string workspace: string } export type PipelinesUpdateDeploymentVariable = { _body: Schema.DeploymentVariable environment_uuid: string repo_slug: string variable_uuid: string workspace: string } export type PipelinesUpdateKnownHost = { _body: Schema.PipelineKnownHost known_host_uuid: string repo_slug: string workspace: string } export type PipelinesUpdateSchedule = { _body: Schema.PipelineSchedule repo_slug: string schedule_uuid: string workspace: string } export type PipelinesUpdateSshKeyPair = { _body: Schema.PipelineSshKeyPair repo_slug: string workspace: string } export type PipelinesUpdateVariable = { _body: Schema.PipelineVariable repo_slug: string variable_uuid: string workspace: string } export type PipelinesUpdateVariableForTeam = { _body: Schema.PipelineVariable username: string variable_uuid: string } export type PipelinesUpdateVariableForUser = { _body: Schema.PipelineVariable username: string variable_uuid: string } export type ProjectsCreateForTeam = { _body: Schema.Project username: string } export type ProjectsDeleteForTeam = { project_key: string username: string } export type ProjectsGetForTeam = { project_key: string username: string fields?: string } export type ProjectsListForTeam = { username: string page?: string pagelen?: number q?: string sort?: string fields?: string } export type ProjectsUpdateForTeam = { _body: Schema.Project project_key: string username: string } export type PullrequestsAddDefaultReviewer = { repo_slug: string target_username: string workspace: string } export type PullrequestsCreate = { _body?: Schema.Pullrequest repo_slug: string workspace: string } export type PullrequestsCreateApproval = { pull_request_id: string repo_slug: string workspace: string } export type PullrequestsCreateComment = { _body: Schema.PullrequestComment pull_request_id: number repo_slug: string workspace: string } export type PullrequestsDecline = { pull_request_id: string repo_slug: string workspace: string } export type PullrequestsDeleteApproval = { pull_request_id: string repo_slug: string workspace: string } export type PullrequestsDeleteComment = { comment_id: string pull_request_id: string repo_slug: string workspace: string } export type PullrequestsDeleteDefaultReviewer = { repo_slug: string target_username: string workspace: string } export type PullrequestsGet = { pull_request_id: number repo_slug: string workspace: string fields?: string } export type PullrequestsGetComment = { comment_id: string pull_request_id: string repo_slug: string workspace: string fields?: string } export type PullrequestsGetDefaultReviewer = { repo_slug: string target_username: string workspace: string fields?: string } export type PullrequestsGetDiff = { pull_request_id: string repo_slug: string workspace: string fields?: string } export type PullrequestsGetDiffStat = { pull_request_id: string repo_slug: string wo