export interface PullRequest { /** * The id number that identifies the pull request. */ readonly id: number; /** * The name of the pull request. */ readonly title: string; /** * The description of the pull request. */ readonly description: string; /** * The status of the pull request. */ readonly state: string; /** * The creator of the pull request. */ readonly author: User; /** * Information about the source of the pull request. It contains the following nested elements: ** branch: the name of the branch ** commit: the SHA1 of the branch head ** repository: the representation of the repository with the branch */ readonly source: Source; /** * Information about the destination of the pull request. It contains the following nested elements: ** branch: the name of the branch ** commit: the SHA1 of the branch head ** repository: the representation of the repository with the branch */ readonly destination: Source; /** * The SHA1 of the commit when the pull request merges. */ readonly merge_commit: string | null; /** * A list of participants part of the pull request. */ readonly participants: Participant[]; /** * A list of reviewers on the pull request. */ readonly reviewers: User[]; /** * true or false to indicate whether Bitbucket should close the source branch after the pull requests is successfully merged. Only use this parameter when the source and destination are in the same repo. */ readonly close_source_branch: boolean; /** * The user who closes the pull request, either by merging or declining it. */ readonly closed_by: User | null; /** * The reason the pull request is declined (if necessary). */ readonly reason: string; /** * The date and time (in ISO 8601 format) the pull request was created. */ readonly created_on: string; /** * The date and time (in ISO 8601 format) the pull request was last updated. */ readonly updated_on: string; /** * Links to representations of the pull request in the API or on Bitbucket. */ readonly links: Links; readonly rendered: Record; readonly type: 'pullrequest'; readonly summary: Content; readonly comment_count: number; readonly task_count: number; } export interface RepositoryShort { /** * Links to representations of the repository in the API or on Bitbucket. */ readonly links: Links; /** * The property type. In this case, repository. */ readonly type: 'repository'; /** * The name of the repository. */ readonly name: string; /** * The workspace and repository slugs joined with a '/'. */ readonly full_name: string; /** * The universally unique identifier of the repository. */ readonly uuid: string; } export interface Repository extends RepositoryShort { /** * The workspace that contains the repository. */ readonly workspace?: Workspace; /** * The project that contains the repository (if one does). */ readonly project?: Project; /** * The URL to the repository's website when the code is hosted for a specific website. */ readonly website: string | null; /** * The type repository: Git (git) or Mercurial (hg). */ readonly scm: 'git' | 'hg'; /** * true or false to indicate whether the repository is private. */ readonly is_private: boolean; /** * Owner of the repository. */ readonly owner?: User; } export interface Fork extends Repository { readonly has_wiki: boolean; readonly size: number; readonly slug: string; readonly state: string | null; readonly parent: RepositoryShort; readonly has_issues: boolean; readonly properties: any; readonly language: string; readonly fork_policy: string; readonly mainbranch: any; readonly updated_on: string; readonly created_on: string; readonly override_settings: any; } export interface Project { /** * The property type. In this case, project. */ readonly type: 'project'; /** * The Name of the project. */ readonly name: string; /** * The universally unique identifier of the user or team. */ readonly uuid: string; /** * Links to representations of the project's avatar or the project on Bitbucket. */ readonly links?: Links; /** * The Key of the project. */ readonly key: string; } export interface Workspace { /** * Always “workspace”. */ readonly type: 'workspace'; /** * The workspace slug used in URLs. */ readonly slug: string; /** * The workspace name. */ readonly name: string; /** * The universally unique identifier of the workspace. */ readonly uuid: string; /** * Links to representations of the workspace in the API or on Bitbucket. */ readonly links: Links; } export interface User { readonly display_name: string; readonly uuid: string; readonly links: Links; readonly nickname: string; readonly type: 'user'; readonly account_id: string; } interface Participant { readonly participated_on: string; readonly state: string; readonly role: string; readonly user: User; readonly type: 'participant'; readonly approved: boolean; } export interface Comment { /** * The id number of the comment. */ readonly id: number; /** * The id number of the comment's parent comment. */ readonly parent?: { readonly id: number; }; /** * The actual comment. It contains the following nested elements: ** raw: the raw text as the user typed it ** markup: the markup language used ** html: the rendered HTML version of the markup */ readonly content: Content; /** * An indication of whether the comment is an inline code comment. It contains the following nested elements: ** to: the line number of the new version in the diff that the comment was made on (the "green" line). null if the line does not exist in the new version ** from: the line number of the old version in the diff that the comment was made on (the "red" line). null if the line does not exist in the old version ** path: the name of the file the comment was made on * Inline comments also have an additional link (rel: "code") in the links section that points to the raw file diff. */ readonly inline?: { readonly to: number | null; readonly from: number | null; readonly path: string; readonly outdated?: boolean; readonly context_lines?: string; }; /** * The date and time (in ISO 8601 format) the issue was created. */ readonly created_on: string; /** * The date and time (in ISO 8601 format) the issue was last updated. */ readonly updated_on: string; /** * Links to representations of the comment in the API or on Bitbucket. */ readonly links: Links; readonly deleted?: boolean; readonly type?: string; readonly pullrequest?: { readonly type: string; readonly id: number; readonly links: Links; readonly title: string; }; readonly user?: User; readonly commit?: CommitShort; } export interface CommitShort { readonly hash: string; readonly type: 'commit'; readonly message?: string; readonly links: Links; } export interface Commit extends CommitShort { readonly rendered?: any; readonly author: Author; readonly summary?: Content; readonly parents?: Commit[]; readonly date: string; readonly properties?: any; } export interface CommitStatus { /** * The name of the commit status. */ readonly name: string; /** * The description of the commit status. */ readonly description: string; /** * The commit status, which is either INPROGRESS, SUCCESSFUL, or FAILED. */ readonly state: 'INPROGRESS' | 'SUCCESSFUL' | 'FAILED'; /** * The key that the system or vendor provides to distinguish the status from other statuses associated with the same commit. */ readonly key: string; /** * The URL to the vendor or system that produces the status. */ readonly url: string; /** * The type of commit status. Currently, Bitbucket can only associate commit statuses with a build, so the only supported type is build. */ readonly type: string; /** * The date and time (in ISO 8601 format) the commit status was created. */ readonly created_on: string; /** * The date and time (in ISO 8601 format) the commit status was last updated. */ readonly updated_on: string; /** * Links to representations of the commit and commit status in the API or on Bitbucket. */ readonly links: Links; readonly repository?: RepositoryShort; readonly refname?: string; readonly commit?: Commit; } interface Author { readonly raw: string; readonly type: string; readonly user: User; } export interface Approval { /** * When the approval was created. */ readonly date: string; /** * The user who created the approval. */ readonly user: User; } export interface ChangeRequest { /** * When the change request was created. */ readonly date: string; /** * The user who created the change request. */ readonly user: User; } export interface Push { /** * This property contains an array with all the references that the push updated. */ readonly changes: PushChange[]; } export interface UpdateChange { /** * The new Name of the repository and its old name. */ readonly name?: NewAndOld; /** * The new Website for the repository and its old website. */ readonly website?: NewAndOld; /** * The new Language for the repository and its old language. */ readonly language?: NewAndOld; /** * new and old links to the repository's avatar (avatar), the repository in the API (self), and the repository in Bitbucket (html). */ readonly links?: { readonly new: Links; readonly old: Links; }; /** * The new Description of the repository and its old description. */ readonly description?: NewAndOld; /** * The new and old full name of the repository, which includes its team or user account name, a slash (/), and the repository name. */ readonly full_name?: NewAndOld; /** * The new and old slug for the repository. */ readonly slug?: NewAndOld; /** * The new and old fork policy for the repository. */ readonly fork_policy?: NewAndOld; readonly project?: { readonly old: Project; readonly new: Project; }; readonly main_branch?: { readonly old: { readonly name: string; readonly type: string; }; readonly new: { readonly name: string; readonly type: string; }; }; } interface NewAndOld { readonly new: string; readonly old: string; } interface PushChange { /** * An object containing information about the state of the reference after the push. When a branch is deleted, new is null. */ readonly new: RefrenceState; /** * An object containing information about the state of the reference before the push. When a branch is created, old is null. */ readonly old: RefrenceState; /** * Links to the change on Bitbucket (html), in the API (commits), and in the form of a diff (diff). */ readonly links: Links; /** * true or false to indicate whether the reference is new. */ readonly created: boolean; /** * true or false to indicate whether the reference is old. */ readonly closed: boolean; /** * true or false to indicate whether the push was forced. */ readonly forced: boolean; /** * true or false to indicate whether Bitbucket truncated the commits array in this payload. The array is truncated when more than 5 commits were pushed. In that case, the commits array includes only the most recent 5 commits. */ readonly truncated: boolean; /** * An array containing up to 5 of the most recent commits pushed to the reference. The array for a push with more than 5 commits is truncated, which is indicated by the truncated property. In addition to new commits, the array might also include the following commits: ** Commits that have not been pushed for this reference–If someone created the reference recently, it could have commits that have been pushed to the repository, but they have not been pushed to this specific reference. If that is the case, the array includes these previously pushed commits as well. For example, if you create a new feature branch off of a master branch with a lot of commits, and then you push a single commit to it, the array in the payload contains 5 commits that are all new to the feature branch. These commits include the single commit you just made and the 4 most recent commits of the master branch. ** Commits that have been force pushed–When you perform a rebase followed by a force push, the commits of the old reference are replaced with all the commits in the new reference. As a result, the array includes the commits part of the new reference. The array does not include commits that are deleted during a rebase or a force push. */ readonly commits: Commit[]; } interface RefrenceState { /** * The type of reference with the change. ** branch, or tag for Git repositories. ** named_branch, bookmark or tag for Mercurial repositories. */ readonly type: 'branch' | 'tag' | 'named_branch' | 'bookmark'; /** * The name of the branch, tag, named branch, or bookmark. */ readonly name: string; /** * The details of the most recent commit after the push. */ readonly target: Target; /** * Links to the reference in the API (self and commits) and on Bitbucket (html). */ readonly links: Links; readonly default_merge_strategy: string; readonly merge_strategies: string[]; } interface Target { readonly type: string; readonly hash: string; readonly rendered: any; readonly author: Author; readonly summary: Content; readonly parents: Commit[]; readonly date: string; readonly message: string; readonly links: Links; readonly properties: any; } declare type Links = Record; interface Href { readonly href: string; } interface Content { readonly raw: string; readonly html: string; readonly markup: string; readonly type?: string; } interface Source { readonly commit: Commit; readonly branch: { readonly name: string; }; readonly repository: Repository; } export interface Issue { /** * The id number of the issue. */ readonly id: number; /** * The component of the issue. */ readonly component: string | null; /** * The title of the issue. */ readonly title: string; /** * The description of the issue. */ readonly content: Content; /** * The priority category of the issue. */ readonly priority: string; /** * The status of the issue. */ readonly state: string; /** * The milestone reached with the issue. */ readonly milestone: { readonly name: string; } | null; /** * The type of issue. */ readonly type: string; /** * The version number associated with the issue. */ readonly version: { readonly name: string; } | null; /** * The date and time (in ISO 8601 format) the issue was created. */ readonly created_on: string; /** * The date and time (in ISO 8601 format) the issue was last updated. */ readonly updated_on: string; /** * Links to representations of the issue in the API or on Bitbucket. */ readonly links: Links; readonly reporter: User; readonly assignee: User | null; readonly edited_on: string | null; readonly kind: string; readonly votes: number; readonly watches: number; } export declare type Changes = Record; interface IssueChanges { readonly old?: any; readonly new?: any; readonly type?: string; readonly links?: Links; readonly name?: string; } export {}; //# sourceMappingURL=types.d.ts.map