UNPKG

@esm-js/jira.js

Version:

A comprehensive JavaScript/TypeScript library designed for both Node.JS and browsers, facilitating seamless interaction with the Atlassian Jira API.

1,179 lines (1,105 loc) 3.69 MB
import { z } from 'zod'; import { AxiosError, AxiosRequestConfig, AxiosResponse } from 'axios'; import { Readable } from 'node:stream'; interface CreateBoard$1 { name: string; type: 'kanban' | 'scrum' | 'agility' | string; filterId: number; location?: { type?: 'project' | 'user' | string; projectKeyOrId?: string; }; } interface CreateSprint { name: string; startDate?: string; endDate?: string; originBoardId: number; goal?: string; } interface DeleteBoard { /** ID of the board to be deleted */ boardId: number; } interface DeleteBoardProperty { /** The id of the board from which the property will be removed. */ boardId: string; /** The key of the property to remove. */ propertyKey: string; } interface DeleteBuildByKey { /** The `pipelineId` of the build to delete. */ pipelineId: string; /** The `buildNumber` of the build to delete. */ buildNumber: number; /** * Only stored data with an `updateSequenceNumber` less than or equal to that provided will be deleted. This can be * used help ensure submit/delete requests are applied correctly if issued close together. */ updateSequenceNumber?: number; } interface DeleteBuildsByProperty { /** * Only stored data with an `updateSequenceNumber` less than or equal to that provided will be deleted. This can be * used help ensure submit/delete requests are applied correctly if issued close together. * * If not provided, all stored data that matches the request will be deleted. */ updateSequenceNumber?: number; } interface DeleteByProperties { /** * An optional property to use to control deletion. Only stored data with an updateSequenceId less than or equal to * that provided will be deleted. This can be used to help ensure submit/delete requests are applied correctly if they * are issued close together. */ updateSequenceId?: number; } interface DeleteDeploymentByKey { /** The ID of the deployment's pipeline. */ pipelineId: string; /** The ID of the deployment's environment. */ environmentId: string; /** The deployment's deploymentSequenceNumber. */ deploymentSequenceNumber: number; /** * Only stored data with an `updateSequenceNumber` less than or equal to that provided will be deleted. This can be * used help ensure submit/delete requests are applied correctly if issued close together. */ updateSequenceNumber?: number; } interface DeleteDeploymentsByProperty { /** * Only stored data with an `updateSequenceNumber` less than or equal to that provided will be deleted. This can be * used help ensure submit/delete requests are applied correctly if issued close together. * * If not provided, all stored data that matches the request will be deleted. */ updateSequenceNumber?: number; } interface DeleteEntity { repositoryId: string; entityType: 'commit' | 'branch' | 'pull_request' | string; entityId: string; /** * An optional property to use to control deletion. Only stored data with an updateSequenceId less than or equal to * that provided will be deleted. This can be used to help ensure submit/delete requests are applied correctly if they * are issued close together. */ updateSequenceId?: number; } interface DeleteFeatureFlagById { /** The ID of the Feature Flag to delete. */ featureFlagId: string; /** * Only stored data with an `updateSequenceId` less than or equal to that provided will be deleted. This can be used * help ensure submit/delete requests are applied correctly if issued close together. */ updateSequenceId?: number; } interface DeleteFeatureFlagsByProperty { /** * Only stored data with an `updateSequenceId` less than or equal to that provided will be deleted. This can be used * help ensure submit/delete requests are applied correctly if issued close together. * * If not provided, all stored data that matches the request will be deleted. */ updateSequenceId?: number; } interface DeleteLinkedWorkspaces { /** The IDs of Security Workspaces to delete to this Jira site. */ workspaceIds: string[]; } interface DeleteProperty$1 { /** The ID of the sprint from which the property will be removed. */ sprintId: string; /** The key of the property to remove. */ propertyKey: string; } interface DeleteRemoteLinkById { /** The ID of the Remote Link to fetch. */ remoteLinkId: string; /** * Only stored data with an `updateSequenceNumber` less than or equal to that provided will be deleted. This can be * used help ensure submit/delete requests are applied correctly if issued close together. */ updateSequenceNumber?: number; } interface DeleteRemoteLinksByProperty { /** * Only stored data with an `updateSequenceNumber` less than or equal to that provided will be deleted. This can be * used help ensure submit/delete requests are applied correctly if issued close together. * * If not provided, all stored data that matches the request will be deleted. */ updateSequenceNumber?: number; /** * Free-form query parameters to specify which properties to delete by. Properties refer to the arbitrary information * the provider tagged Remote Links with previously. * * For example, if the provider previously tagged a remote link with accountId: "properties": { "accountId": * "account-123" } * * And now they want to delete Remote Links in bulk by that specific accountId as follows: e.g. DELETE * /bulkByProperties?accountId=account-123 */ params?: unknown; } interface DeleteRepository { /** The ID of repository to delete */ repositoryId: string; /** * An optional property to use to control deletion. Only stored data with an updateSequenceId less than or equal to * that provided will be deleted. This can be used to help ensure submit/delete requests are applied correctly if they * are issued close together. */ updateSequenceId?: number; } interface DeleteSprint { /** The ID of the sprint to delete. */ sprintId: number; } interface DeleteVulnerabilitiesByProperty extends Record<string, any> { accountId?: string; createdBy?: string; } interface DeleteVulnerabilityById { /** The ID of the Vulnerability to delete. */ vulnerabilityId: string; } interface EstimateIssueForBoard { /** The ID or key of the requested issue. */ issueIdOrKey: string; /** The ID of the board required to determine which field is used for estimation. */ boardId?: number; value?: string; } interface ExistsByProperties$1 { /** An optional property. Filters out entities and repositories which have updateSequenceId greater than specified. */ updateSequenceId?: number; } interface GetAllBoards$1 { /** * The starting index of the returned boards. Base index: 0. See the 'Pagination' section at the top of this page for * more details. */ startAt?: number; /** * The maximum number of boards to return per page. See the 'Pagination' section at the top of this page for more * details. */ maxResults?: number; /** Filters results to boards of the specified types. Valid values: scrum, kanban, simple. */ type?: string; /** Filters results to boards that match or partially match the specified name. */ name?: string; /** * Filters results to boards that are relevant to a project. Relevance means that the jql filter defined in board * contains a reference to a project. */ projectKeyOrId?: string; accountIdLocation?: string; projectLocation?: string; /** Appends private boards to the end of the list. The name and type fields are excluded for security reasons. */ includePrivate?: boolean; /** If set to true, negate filters used for querying by location. By default false. */ negateLocationFiltering?: boolean; /** Ordering of the results by a given field. If not provided, values will not be sorted. Valid values: name. */ orderBy?: 'name' | '-name' | '+name' | string; /** List of fields to expand for each board. Valid values: admins, permissions. */ expand?: string; /** Filters results to boards that are relevant to a filter. Not supported for next-gen boards. */ filterId?: number; /** * Filters results to boards that are relevant to a project types. Support Jira Software, Jira Service Management. * Valid values: software, service_desk. By default software. */ projectTypeLocation?: string[]; } interface GetAllQuickFilters$1 { /** The ID of the board that contains the requested quick filters. */ boardId: number; /** * The starting index of the returned quick filters. Base index: 0. See the 'Pagination' section at the top of this * page for more details. */ startAt?: number; /** * The maximum number of sprints to return per page. See the 'Pagination' section at the top of this page for more * details. */ maxResults?: number; } interface GetAllSprints { /** The ID of the board that contains the requested sprints. */ boardId: number; /** * The starting index of the returned sprints. Base index: 0. See the 'Pagination' section at the top of this page for * more details. */ startAt?: number; /** * The maximum number of sprints to return per page. See the 'Pagination' section at the top of this page for more * details. */ maxResults?: number; /** * Filters results to sprints in specified states. Valid values: future, active, closed. You can define multiple * states separated by commas, e.g. state=active,closed */ state?: string; } interface GetAllVersions { /** The ID of the board that contains the requested versions. */ boardId: number; /** * The starting index of the returned versions. Base index: 0. See the 'Pagination' section at the top of this page * for more details. */ startAt?: number; /** * The maximum number of versions to return per page. See the 'Pagination' section at the top of this page for more * details. */ maxResults?: number; /** Filters results to versions that are either released or unreleased. Valid values: true, false. */ released?: string; } interface GetBoard$1 { /** The ID of the requested board. */ boardId: number; } interface GetBoardByFilterId$1 { /** * The starting index of the returned boards. Base index: 0. See the 'Pagination' section at the top of this page for * more details. */ startAt?: number; /** * The maximum number of boards to return per page. Default: 50. See the 'Pagination' section at the top of this page * for more details. */ maxResults?: number; /** Filters results to boards that are relevant to a filter. Not supported for next-gen boards. */ filterId: number; } interface GetBoardIssuesForEpic { /** The ID of the board that contains the requested issues. */ boardId: number; /** The ID of the epic that contains the requested issues. */ epicId: number; /** * The starting index of the returned issues. Base index: 0. See the 'Pagination' section at the top of this page for * more details. */ startAt?: number; /** * The maximum number of issues to return per page. Default: 50. See the 'Pagination' section at the top of this page * for more details. Note, the total number of issues returned is limited by the property * 'jira.search.views.default.max' in your Jira instance. If you exceed this limit, your results will be truncated. */ maxResults?: number; /** * Filters results using a JQL query. If you define an order in your JQL query, it will override the default order of * the returned issues. */ jql?: string; /** Specifies whether to validate the JQL query or not. Default: true. */ validateQuery?: boolean; /** The list of fields to return for each issue. By default, all navigable and Agile fields are returned. */ fields?: string[]; /** A comma-separated list of the parameters to expand. */ expand?: string; } interface GetBoardIssuesForSprint { /** The ID of the board that contains requested issues. */ boardId: number; /** The ID of the sprint that contains requested issues. */ sprintId: number; /** * The starting index of the returned issues. Base index: 0. See the 'Pagination' section at the top of this page for * more details. */ startAt?: number; /** * The maximum number of issues to return per page. See the 'Pagination' section at the top of this page for more * details. Note, the total number of issues returned is limited by the property 'jira.search.views.default.max' in * your Jira instance. If you exceed this limit, your results will be truncated. */ maxResults?: number; /** * Filters results using a JQL query. If you define an order in your JQL query, it will override the default order of * the returned issues. Note that `username` and `userkey` can't be used as search terms for this parameter due to * privacy reasons. Use `accountId` instead. */ jql?: string; /** Specifies whether to validate the JQL query or not. Default: true. */ validateQuery?: boolean; /** The list of fields to return for each issue. By default, all navigable and Agile fields are returned. */ fields?: string[]; /** A comma-separated list of the parameters to expand. */ expand?: string; } interface GetBoardProperty { /** The ID of the board from which the property will be returned. */ boardId: string; /** The key of the property to return. */ propertyKey: string; } interface GetBoardPropertyKeys { /** The ID of the board from which property keys will be returned. */ boardId: string; } interface GetBuildByKey$1 { /** The `pipelineId` of the build. */ pipelineId: string; /** The `buildNumber` of the build. */ buildNumber: number; } interface GetConfiguration$1 { /** The ID of the board for which configuration is requested. */ boardId: number; } interface GetDeploymentByKey$1 { /** The ID of the deployment's pipeline. */ pipelineId: string; /** The ID of the deployment's environment. */ environmentId: string; /** The deployment's deploymentSequenceNumber. */ deploymentSequenceNumber: number; } interface GetDeploymentGatingStatusByKey$1 { /** The ID of the Deployment's pipeline. */ pipelineId: string; /** The ID of the Deployment's environment. */ environmentId: string; /** The Deployment's deploymentSequenceNumber. */ deploymentSequenceNumber: number; } interface GetEpic { /** The id or key of the requested epic. */ epicIdOrKey: string; } interface GetEpics { /** The ID of the board that contains the requested epics. */ boardId: number; /** * The starting index of the returned epics. Base index: 0. See the 'Pagination' section at the top of this page for * more details. */ startAt?: number; /** * The maximum number of epics to return per page. See the 'Pagination' section at the top of this page for more * details. */ maxResults?: number; /** Filters results to epics that are either done or not done. Valid values: true, false. */ done?: string; } interface GetFeatureFlagById$1 { /** The ID of the Feature Flag to fetch. */ featureFlagId: string; } interface GetFeaturesForBoard$1 { boardId: number; } interface GetIssue$2 { /** The ID or key of the requested issue. */ issueIdOrKey: string; /** The list of fields to return for each issue. By default, all navigable and Agile fields are returned. */ fields?: string[]; /** A comma-separated list of the parameters to expand. */ expand?: string; /** A boolean indicating whether the issue retrieved by this method should be added to the current user's issue history */ updateHistory?: boolean; } interface GetIssueEstimationForBoard { /** The ID or key of the requested issue. */ issueIdOrKey: string; /** The ID of the board required to determine which field is used for estimation. */ boardId?: number; } interface GetIssuesForBacklog { /** The ID of the board that has the backlog containing the requested issues. */ boardId: number; /** * The starting index of the returned issues. Base index: 0. See the 'Pagination' section at the top of this page for * more details. */ startAt?: number; /** * The maximum number of issues to return per page. Default: 50. See the 'Pagination' section at the top of this page * for more details. Note, the total number of issues returned is limited by the property * 'jira.search.views.default.max' in your Jira instance. If you exceed this limit, your results will be truncated. */ maxResults?: number; /** * Filters results using a JQL query. If you define an order in your JQL query, it will override the default order of * the returned issues. Note that `username` and `userkey` can't be used as search terms for this parameter due to * privacy reasons. Use `accountId` instead. */ jql?: string; /** Specifies whether to validate the JQL query or not. Default: true. */ validateQuery?: boolean; /** The list of fields to return for each issue. By default, all navigable and Agile fields are returned. */ fields?: string[]; /** This parameter is currently not used. */ expand?: string; } interface GetIssuesForBoard { /** The ID of the board that contains the requested issues. */ boardId: number; /** * The starting index of the returned issues. Base index: 0. See the 'Pagination' section at the top of this page for * more details. */ startAt?: number; /** * The maximum number of issues to return per page. See the 'Pagination' section at the top of this page for more * details. Note, the total number of issues returned is limited by the property 'jira.search.views.default.max' in * your Jira instance. If you exceed this limit, your results will be truncated. */ maxResults?: number; /** * Filters results using a JQL query. If you define an order in your JQL query, it will override the default order of * the returned issues. Note that `username` and `userkey` can't be used as search terms for this parameter due to * privacy reasons. Use `accountId` instead. */ jql?: string; /** Specifies whether to validate the JQL query or not. Default: true. */ validateQuery?: boolean; /** The list of fields to return for each issue. By default, all navigable and Agile fields are returned. */ fields?: string[]; /** This parameter is currently not used. */ expand?: string; } interface GetIssuesForEpic { /** The id or key of the epic that contains the requested issues. */ epicIdOrKey: string; /** * The starting index of the returned issues. Base index: 0. See the 'Pagination' section at the top of this page for * more details. */ startAt?: number; /** * The maximum number of issues to return per page. Default: 50. See the 'Pagination' section at the top of this page * for more details. Note, the total number of issues returned is limited by the property * 'jira.search.views.default.max' in your Jira instance. If you exceed this limit, your results will be truncated. */ maxResults?: number; /** * Filters results using a JQL query. If you define an order in your JQL query, it will override the default order of * the returned issues. Note that `username` and `userkey` can't be used as search terms for this parameter due to * privacy reasons. Use `accountId` instead. */ jql?: string; /** Specifies whether to validate the JQL query or not. Default: true. */ validateQuery?: boolean; /** The list of fields to return for each issue. By default, all navigable and Agile fields are returned. */ fields?: string[]; /** A comma-separated list of the parameters to expand. */ expand?: string; } interface GetIssuesForSprint { /** The ID of the sprint that contains the requested issues. */ sprintId: number; /** * The starting index of the returned issues. Base index: 0. See the 'Pagination' section at the top of this page for * more details. */ startAt?: number; /** * The maximum number of issues to return per page. See the 'Pagination' section at the top of this page for more * details. Note, the total number of issues returned is limited by the property 'jira.search.views.default.max' in * your Jira instance. If you exceed this limit, your results will be truncated. */ maxResults?: number; /** * Filters results using a JQL query. If you define an order in your JQL query, it will override the default order of * the returned issues. Note that `username` and `userkey` can't be used as search terms for this parameter due to * privacy reasons. Use `accountId` instead. */ jql?: string; /** Specifies whether to validate the JQL query or not. Default: true. */ validateQuery?: boolean; /** The list of fields to return for each issue. By default, all navigable and Agile fields are returned. */ fields?: string[]; /** A comma-separated list of the parameters to expand. */ expand?: string; } interface GetIssuesWithoutEpic { /** * The starting index of the returned issues. Base index: 0. See the 'Pagination' section at the top of this page for * more details. */ startAt?: number; /** * The maximum number of issues to return per page. See the 'Pagination' section at the top of this page for more * details. Note, the total number of issues returned is limited by the property 'jira.search.views.default.max' in * your Jira instance. If you exceed this limit, your results will be truncated. */ maxResults?: number; /** * Filters results using a JQL query. If you define an order in your JQL query, it will override the default order of * the returned issues. */ jql?: string; /** Specifies whether to validate the JQL query or not. Default: true. */ validateQuery?: boolean; /** The list of fields to return for each issue. By default, all navigable and Agile fields are returned. */ fields?: string[]; /** A comma-separated list of the parameters to expand. */ expand?: string; } interface GetIssuesWithoutEpicForBoard { /** The ID of the board that contains the requested issues. */ boardId: number; /** * The starting index of the returned issues. Base index: 0. See the 'Pagination' section at the top of this page for * more details. */ startAt?: number; /** * The maximum number of issues to return per page. See the 'Pagination' section at the top of this page for more * details. Note, the total number of issues returned is limited by the property 'jira.search.views.default.max' in * your Jira instance. If you exceed this limit, your results will be truncated. */ maxResults?: number; /** * Filters results using a JQL query. If you define an order in your JQL query, it will override the default order of * the returned issues. Note that `username` and `userkey` can't be used as search terms for this parameter due to * privacy reasons. Use `accountId` instead. */ jql?: string; /** Specifies whether to validate the JQL query or not. Default: true. */ validateQuery?: boolean; /** The list of fields to return for each issue. By default, all navigable and Agile fields are returned. */ fields?: string[]; /** A comma-separated list of the parameters to expand. */ expand?: string; } interface GetLinkedWorkspaceById$1 { /** The ID of the workspace to fetch. */ workspaceId: string; } interface GetProjects { /** The ID of the board that contains returned projects. */ boardId: number; /** * The starting index of the returned projects. Base index: 0. See the 'Pagination' section at the top of this page * for more details. */ startAt?: number; /** * The maximum number of projects to return per page. See the 'Pagination' section at the top of this page for more * details. */ maxResults?: number; } interface GetProjectsFull { /** The ID of the board that contains returned projects. */ boardId: number; } interface GetPropertiesKeys$1 { /** The ID of the sprint from which property keys will be returned. */ sprintId: string; } interface GetProperty$1 { /** The ID of the sprint from which the property will be returned. */ sprintId: string; /** The key of the property to return. */ propertyKey: string; } interface GetQuickFilter$1 { boardId: number; /** The ID of the requested quick filter. */ quickFilterId: number; } interface GetRemoteLinkById$1 { /** The ID of the Remote Link to fetch. */ remoteLinkId: string; } interface GetReportsForBoard$1 { boardId: number; } interface GetRepository$1 { /** The ID of repository to fetch */ repositoryId: string; } interface GetSprint { /** The ID of the requested sprint. */ sprintId: number; } interface GetVulnerabilityById$1 { /** The ID of the Vulnerability to fetch. */ vulnerabilityId: string; } interface MoveIssuesToBacklog { issues: string[]; } interface MoveIssuesToBacklogForBoard { boardId: number; issues?: string[]; rankBeforeIssue?: string; rankAfterIssue?: string; rankCustomFieldId?: number; } interface MoveIssuesToBoard { boardId: number; issues: string[]; rankBeforeIssue?: string; rankAfterIssue?: string; rankCustomFieldId?: number; } interface MoveIssuesToEpic { /** The id or key of the epic that you want to assign issues to. */ epicIdOrKey: string; issues?: string[]; } interface MoveIssuesToSprintAndRank { /** The ID of the sprint that you want to assign issues to. */ sprintId: number; issues: string[]; rankBeforeIssue?: string; rankAfterIssue?: string; rankCustomFieldId?: number; } interface PartiallyUpdateEpic { /** The id or key of the epic to update. */ epicIdOrKey: string; name?: string; summary?: string; color?: { key?: 'color_1' | 'color_2' | 'color_3' | 'color_4' | 'color_5' | 'color_6' | 'color_7' | 'color_8' | 'color_9' | 'color_10' | 'color_11' | 'color_12' | 'color_13' | 'color_14' | string; }; done?: boolean; } interface PartiallyUpdateSprint { /** The ID of the sprint to update. */ sprintId: number; id?: number; self?: string; state?: string; name?: string; startDate?: string | Date; endDate?: string | Date; completeDate?: string; createdDate?: string; originBoardId?: number; goal?: string; } interface RankEpics { /** The id or key of the epic to rank. */ epicIdOrKey: string; rankBeforeEpic?: string; rankAfterEpic?: string; rankCustomFieldId?: number; } interface RankIssues { issues?: string[]; rankBeforeIssue?: string; rankAfterIssue?: string; rankCustomFieldId?: number; } interface RemoveIssuesFromEpic { issues?: string[]; } interface SetBoardProperty { /** The ID of the board on which the property will be set. */ boardId: string; /** The key of the board's property. The maximum length of the key is 255 bytes. */ propertyKey: string; } interface SetProperty$1 { /** The ID of the sprint on which the property will be set. */ sprintId: string; /** The key of the sprint's property. The maximum length of the key is 255 bytes. */ propertyKey: string; } interface StoreDevelopmentInformation$1 { /** * List of repositories containing development information. Must not contain duplicates. Maximum number of entities * across all repositories is 1000. */ repositories?: { /** The name of this repository. Max length is 255 characters. */ name: string; /** Description of this repository. Max length is 1024 characters. */ description?: string; /** The ID of the repository this repository was forked from, if it's a fork. Max length is 1024 characters. */ forkOf?: string; /** The URL of this repository. Max length is 2000 characters. */ url: string; /** * List of commits to update in this repository. Must not contain duplicate entity IDs. Maximum number of commits is * 400 */ commits?: { /** * The identifier or hash of the commit. Will be used for cross entity linking. Must be unique for all commits * within a repository, i.e., only one commit can have ID 'X' in repository 'Y'. But adding, e.g., a branch with * ID 'X' to repository 'Y' is acceptable. Only alphanumeric characters, and '~.-_', are allowed. Max length is * 1024 characters */ id: string; /** List of issues keys that this entity is associated with. They must be valid Jira issue keys. */ issueKeys: string[]; /** * An ID used to apply an ordering to updates for this entity in the case of out-of-order receipt of update * requests. This can be any monotonically increasing number. A suggested implementation is to use epoch millis * from the provider system, but other alternatives are valid (e.g. a provider could store a counter against each * entity and increment that on each update to Jira). Updates for an entity that are received with an * updateSqeuenceId lower than what is currently stored will be ignored. */ updateSequenceId: number; /** The set of flags for this commit */ flags?: ('MERGE_COMMIT' | string)[]; /** * The commit message. Max length is 1024 characters. If anything longer is supplied, it will be truncated down to * 1024 characters. */ message: string; /** Describes the author of a particular entity */ author: { /** The email address of the user. Used to associate the user with a Jira user. Max length is 255 characters. */ email?: string; }; /** The total number of files added, removed, or modified by this commit */ fileCount: number; /** The URL of this commit. Max length is 2000 characters. */ url: string; /** * List of file changes. Max number of files is 10. Currently, only the first 5 files are shown (sorted by path) * in the UI. This UI behavior may change without notice. */ files?: { /** The path of the file. Max length is 1024 characters. */ path: string; /** The URL of this file. Max length is 2000 characters. */ url: string; /** The operation performed on this file */ changeType: 'ADDED' | 'COPIED' | 'DELETED' | 'MODIFIED' | 'MOVED' | 'UNKNOWN' | string; /** Number of lines added to the file */ linesAdded: number; /** Number of lines removed from the file */ linesRemoved: number; }[]; /** The author timestamp of this commit. Formatted as a UTC ISO 8601 date time format. */ authorTimestamp: string; /** Shortened identifier for this commit, used for display. Max length is 255 characters. */ displayId: string; }[]; /** * List of branches to update in this repository. Must not contain duplicate entity IDs. Maximum number of branches * is 400. */ branches?: { /** * The ID of this entity. Will be used for cross entity linking. Must be unique by entity type within a * repository, i.e., only one commit can have ID 'X' in repository 'Y'. But adding, e.g., a branch with ID 'X' to * repository 'Y' is acceptable. Only alphanumeric characters, and '~.-_', are allowed. Max length is 1024 * characters. */ id: string; /** List of issues keys that this entity is associated with. They must be valid Jira issue keys. */ issueKeys: string[]; /** * An ID used to apply an ordering to updates for this entity in the case of out-of-order receipt of update * requests. This can be any monotonically increasing number. A suggested implementation is to use epoch millis * from the provider system, but other alternatives are valid (e.g. a provider could store a counter against each * entity and increment that on each update to Jira). Updates for an entity that are received with an * updateSqeuenceId lower than what is currently stored will be ignored. */ updateSequenceId: number; /** The name of the branch. Max length is 512 characters. */ name: string; /** Represents a commit in the version control system. */ lastCommit: { /** * The identifier or hash of the commit. Will be used for cross entity linking. Must be unique for all commits * within a repository, i.e., only one commit can have ID 'X' in repository 'Y'. But adding, e.g., a branch with * ID 'X' to repository 'Y' is acceptable. Only alphanumeric characters, and '~.-_', are allowed. Max length is * 1024 characters */ id: string; /** List of issues keys that this entity is associated with. They must be valid Jira issue keys. */ issueKeys: string[]; /** * An ID used to apply an ordering to updates for this entity in the case of out-of-order receipt of update * requests. This can be any monotonically increasing number. A suggested implementation is to use epoch millis * from the provider system, but other alternatives are valid (e.g. a provider could store a counter against * each entity and increment that on each update to Jira). Updates for an entity that are received with an * updateSqeuenceId lower than what is currently stored will be ignored. */ updateSequenceId: number; /** The set of flags for this commit */ flags?: ('MERGE_COMMIT' | string)[]; /** * The commit message. Max length is 1024 characters. If anything longer is supplied, it will be truncated down * to 1024 characters. */ message: string; /** Describes the author of a particular entity */ author: { /** The email address of the user. Used to associate the user with a Jira user. Max length is 255 characters. */ email?: string; }; /** The total number of files added, removed, or modified by this commit */ fileCount: number; /** The URL of this commit. Max length is 2000 characters. */ url: string; /** * List of file changes. Max number of files is 10. Currently, only the first 5 files are shown (sorted by path) * in the UI. This UI behavior may change without notice. */ files?: { /** The path of the file. Max length is 1024 characters. */ path: string; /** The URL of this file. Max length is 2000 characters. */ url: string; /** The operation performed on this file */ changeType: 'ADDED' | 'COPIED' | 'DELETED' | 'MODIFIED' | 'MOVED' | 'UNKNOWN' | string; /** Number of lines added to the file */ linesAdded: number; /** Number of lines removed from the file */ linesRemoved: number; }[]; /** The author timestamp of this commit. Formatted as a UTC ISO 8601 date time format. */ authorTimestamp: string; /** Shortened identifier for this commit, used for display. Max length is 255 characters. */ displayId: string; }; /** The URL of the page for creating a pull request from this branch. Max length is 2000 characters. */ createPullRequestUrl?: string; /** The URL of the branch. Max length is 2000 characters. */ url: string; }[]; /** * List of pull requests to update in this repository. Must not contain duplicate entity IDs. Maximum number of pull * requests is 400 */ pullRequests?: { /** * The ID of this entity. Will be used for cross entity linking. Must be unique by entity type within a * repository, i.e., only one commit can have ID 'X' in repository 'Y'. But adding, e.g., a branch with ID 'X' to * repository 'Y' is acceptable. Only alphanumeric characters, and '~.-_', are allowed. Max length is 1024 * characters */ id: string; /** List of issues keys that this entity is associated with. They must be valid Jira issue keys. */ issueKeys: string[]; /** * An ID used to apply an ordering to updates for this entity in the case of out-of-order receipt of update * requests. This can be any monotonically increasing number. A suggested implementation is to use epoch millis * from the provider system, but other alternatives are valid (e.g. a provider could store a counter against each * entity and increment that on each update to Jira). Updates for an entity that are received with an * updateSqeuenceId lower than what is currently stored will be ignored. */ updateSequenceId: number; /** * The status of the pull request. In the case of concurrent updates, priority is given in the order OPEN, MERGED, * DECLINED, DRAFT, UNKNOWN */ status: 'OPEN' | 'MERGED' | 'DECLINED' | 'DRAFT' | 'UNKNOWN' | string; /** Title of the pull request. Max length is 1024 characters. */ title: string; /** Describes the author of a particular entity */ author: { /** The email address of the user. Used to associate the user with a Jira user. Max length is 255 characters. */ email?: string; }; /** The number of comments on the pull request */ commentCount: number; /** The name of the source branch of this PR. Max length is 255 characters. */ sourceBranch: string; /** * The url of the source branch of this PR. This is used to match this PR against the branch. Max length is 2000 * characters. */ sourceBranchUrl?: string; /** The most recent update to this PR. Formatted as a UTC ISO 8601 date time format. */ lastUpdate: string; /** The name of destination branch of this PR. Max length is 255 characters. */ destinationBranch?: string; /** The url of the destination branch of this PR. Max length is 2000 characters. */ destinationBranchUrl?: string; /** The list of reviewers of this pull request */ reviewers?: { /** The approval status of this reviewer, default is UNAPPROVED. */ approvalStatus?: 'APPROVED' | 'NEEDSWORK' | 'UNAPPROVED' | string; /** The email address of this reviewer. Max length is 254 characters. */ email?: string; /** The Atlassian Account ID (AAID) of this reviewer. Max length is 128 characters. */ accountId?: string; }[]; /** The URL of this pull request. Max length is 2000 characters. */ url: string; /** Shortened identifier for this pull request, used for display. Max length is 255 characters. */ displayId: string; /** The number of tasks on the pull request */ taskCount?: number; }[]; /** The URL of the avatar for this repository. Max length is 2000 characters. */ avatar?: string; /** Description of the avatar for this repository. Max length is 1024 characters. */ avatarDescription?: string; /** * The ID of this entity. Will be used for cross entity linking. Must be unique by entity type within a repository, * i.e., only one commit can have ID 'X' in repository 'Y'. But adding, e.g., a branch with ID 'X' to repository 'Y' * is acceptable. Only alphanumeric characters, and '~.-_', are allowed. Max length is 1024 characters. */ id: string; /** * An ID used to apply an ordering to updates for this entity in the case of out-of-order receipt of update * requests. This can be any monotonically increasing number. A suggested implementation is to use epoch millis from * the provider system, but other alternatives are valid (e.g. a provider could store a counter against each entity * and increment that on each update to Jira). Updates for an entity that are received with an updateSqeuenceId * lower than what is currently stored will be ignored. */ updateSequenceId: number; }[]; /** Flag to prevent automatic issue transitions and smart commits being fired, default is false. */ preventTransitions?: boolean; /** * Indicates the operation being performed by the provider system when sending this data. "NORMAL" - Data received * during normal operation (e.g. a user pushing a branch). "BACKFILL" - Data received while backfilling existing data * (e.g. indexing a newly connected account). Default is "NORMAL". Please note that "BACKFILL" operations have a much * higher rate-limiting threshold but are also processed slower in comparison to "NORMAL" operations. */ operationType?: 'NORMAL' | 'BACKFILL' | string; /** * Arbitrary properties to tag the submitted repositories with. These properties can be used for delete operations to * e.g. clean up all development information associated with an account in the event that the account is removed from * the provider system. Note that these properties will never be returned with repository or entity data. They are not * intended for use as metadata to associate with a repository. Maximum length of each key or value is 255 characters. * Maximum allowed number of properties key/value pairs is 5. Properties keys cannot start with '_' character. * Properties keys cannot contain ':' character. */ properties?: unknown; /** * Information about the provider. This is useful for auditing, logging, debugging, and other internal uses. It is not * considered private information. Hence, it may not contain personally identifiable information. */ providerMetadata?: { /** An optional name of the source of the development information data. */ product?: string; }; } interface SubmitBuilds$1 { /** * Properties assigned to build data that can then be used for delete / query operations. * * Examples might be an account or user ID that can then be used to clean up data if an account is removed from the * Provider system. * * Note that these properties will never be returned with build data. They are not intended for use as metadata to * associate with a build. Internally they are stored as a hash so that personal information etc. is never stored * within Jira. * * Properties are supplied as key/value pairs, a maximum of 5 properties can be supplied, and keys must not contain * ':' or start with '_'. */ properties?: unknown; /** * A list of builds to submit to Jira. * * Each build may be associated with one or more Jira issue keys, and will be associated with any properties included * in this request. */ builds?: { /** * The schema version used for this data. * * Placeholder to support potential schema changes in the future. */ schemaVersion?: '1.0' | string; /** * An ID that relates a sequence of builds. Depending on your use case this might be a project ID, pipeline ID, plan * key etc. - whatever logical unit you use to group a sequence of builds. * * The combination of `pipelineId` and `buildNumber` must uniquely identify a build you have provided. */ pipelineId: string; /** * Identifies a build within the sequence of builds identified by the build `pipelineId`. * * Used to identify the 'most recent' build in that sequence of builds. * * The combination of `pipelineId` and `buildNumber` must uniquely identify a build you have provided. */ buildNumber: number; /** * A number used to apply an order to the updates to the build, as identified by `pipelineId` and `buildNumber`, in * the case of out-of-order receipt of update requests. * * It must be a monotonically increasing number. For example, epoch time could be one way to generate the * `updateSequenceNumber`. * * Updates for a build that is received with an `updateSqeuenceNumber` less than or equal to what is currently * stored will be ignored. */ updateSequenceNumber: number; /** * The human-readable name for the build. * * Will be shown in the UI. */ displayName: string; /** * An optional description to attach to this build. * * This may be anything that makes sense in your system. */ description?: string; /** A human-readable string that to provide information about the build. */ label?: string; /** The URL to this build in your system. */ url: string; /** * The state of a build. * * `pending` - The build is queued, or some manual action is required. `in_progress` - The build is currently * running. `successful` - The build completed successfully. `failed` - The build failed. `cancelled` - The build * has been cancelled or stopped. `unknown` - The build is in an unknown state. */ state: 'pending' | 'in_progress' | 'successful' | 'failed' | 'cancelled' | 'unknown' | string; /** The last-updated timestamp to present to the user as a summary of the state of the build. */ lastUpdated: string; /** * The Jira issue keys to associate the build information with. * * You are free to associate issue keys in any way you like. However, we recommend that you use the name of the * branch the build was executed on, and extract issue keys from that name using a simple regex. This has the * advantage that it provides an intuitive association of builds to issue keys. */ issueKeys: string[]; /** Information about tests that were executed during a build. */ testInfo?: { /** The total number of tests considered during a build. */ totalNumber: number; /** The number of tests that passed during a build. */ numberPassed: number; /** The number of tests that failed during a build. */ numberFailed: number; /** The number of tests that were skipped during a build. */ numberSkipped?: number; }; /** Optional information that links a build to a commit, branch etc. */ references?: { /** Details about the commit the build was run against. */ commit?: { /** The ID of the commit. E.g. for a Git repository this would be the SHA1 hash. */ id: string; /** * An identifier for the repository containing the commit. * * In most cases this should be the URL of the repository in the SCM provider. * * For cases where the build was executed against a local repository etc. this should be some identifier that is * unique to that repository. */ repositoryUri: string; }; /** Details about the ref the build was run on. */ ref?: { /** The name of the ref the build ran on */