@resolution/jira-api-client 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/package.json +10 -3
- package/.eslintrc.js +0 -3
- package/config/api-typescript-generator.config.ts +0 -91
- package/config/compare-schemas.ts +0 -307
- package/src/index.ts +0 -47
- package/src/openapi/platform/base-jira-platform-api-client.ts +0 -2298
- package/src/openapi/platform/core/common-http-client.ts +0 -723
- package/src/openapi/platform/core/common-http-service.ts +0 -22
- package/src/openapi/platform/core/common-validation-schema-storage.ts +0 -105
- package/src/openapi/platform/models/announcement-banner.ts +0 -59
- package/src/openapi/platform/models/app-data-policies.ts +0 -79
- package/src/openapi/platform/models/app-migration.ts +0 -172
- package/src/openapi/platform/models/app-properties.ts +0 -32
- package/src/openapi/platform/models/audit-records.ts +0 -140
- package/src/openapi/platform/models/avatars.ts +0 -48
- package/src/openapi/platform/models/classification-levels.ts +0 -58
- package/src/openapi/platform/models/common.ts +0 -2669
- package/src/openapi/platform/models/dashboards.ts +0 -849
- package/src/openapi/platform/models/dynamic-modules.ts +0 -121
- package/src/openapi/platform/models/filter-sharing.ts +0 -103
- package/src/openapi/platform/models/filters.ts +0 -319
- package/src/openapi/platform/models/group-and-user-picker.ts +0 -85
- package/src/openapi/platform/models/groups.ts +0 -247
- package/src/openapi/platform/models/issue-attachments.ts +0 -290
- package/src/openapi/platform/models/issue-comment-properties.ts +0 -27
- package/src/openapi/platform/models/issue-comments.ts +0 -91
- package/src/openapi/platform/models/issue-custom-field-configuration-apps.ts +0 -96
- package/src/openapi/platform/models/issue-custom-field-contexts.ts +0 -1072
- package/src/openapi/platform/models/issue-custom-field-options-apps.ts +0 -273
- package/src/openapi/platform/models/issue-custom-field-options.ts +0 -283
- package/src/openapi/platform/models/issue-custom-field-values-apps.ts +0 -118
- package/src/openapi/platform/models/issue-field-configurations.ts +0 -435
- package/src/openapi/platform/models/issue-fields.ts +0 -392
- package/src/openapi/platform/models/issue-link-types.ts +0 -28
- package/src/openapi/platform/models/issue-links.ts +0 -185
- package/src/openapi/platform/models/issue-notification-schemes.ts +0 -370
- package/src/openapi/platform/models/issue-priorities.ts +0 -196
- package/src/openapi/platform/models/issue-properties.ts +0 -259
- package/src/openapi/platform/models/issue-remote-links.ts +0 -207
- package/src/openapi/platform/models/issue-resolutions.ts +0 -180
- package/src/openapi/platform/models/issue-search.ts +0 -367
- package/src/openapi/platform/models/issue-security-level.ts +0 -76
- package/src/openapi/platform/models/issue-security-schemes.ts +0 -496
- package/src/openapi/platform/models/issue-type-schemes.ts +0 -290
- package/src/openapi/platform/models/issue-type-screen-schemes.ts +0 -286
- package/src/openapi/platform/models/issue-types.ts +0 -66
- package/src/openapi/platform/models/issue-votes.ts +0 -38
- package/src/openapi/platform/models/issue-watchers.ts +0 -67
- package/src/openapi/platform/models/issue-worklogs.ts +0 -190
- package/src/openapi/platform/models/issues.ts +0 -1268
- package/src/openapi/platform/models/jira-expressions.ts +0 -578
- package/src/openapi/platform/models/jira-settings.ts +0 -118
- package/src/openapi/platform/models/jql-functions-apps.ts +0 -128
- package/src/openapi/platform/models/jql.ts +0 -783
- package/src/openapi/platform/models/labels.ts +0 -42
- package/src/openapi/platform/models/license-metrics.ts +0 -68
- package/src/openapi/platform/models/myself.ts +0 -29
- package/src/openapi/platform/models/permission-schemes.ts +0 -89
- package/src/openapi/platform/models/permissions.ts +0 -308
- package/src/openapi/platform/models/priority-schemes.ts +0 -527
- package/src/openapi/platform/models/project-avatars.ts +0 -29
- package/src/openapi/platform/models/project-classification-levels.ts +0 -24
- package/src/openapi/platform/models/project-components.ts +0 -231
- package/src/openapi/platform/models/project-email.ts +0 -27
- package/src/openapi/platform/models/project-features.ts +0 -78
- package/src/openapi/platform/models/project-permission-schemes.ts +0 -43
- package/src/openapi/platform/models/project-role-actors.ts +0 -107
- package/src/openapi/platform/models/project-roles.ts +0 -76
- package/src/openapi/platform/models/project-types.ts +0 -36
- package/src/openapi/platform/models/project-versions.ts +0 -216
- package/src/openapi/platform/models/projects.ts +0 -429
- package/src/openapi/platform/models/screen-schemes.ts +0 -192
- package/src/openapi/platform/models/screen-tab-fields.ts +0 -45
- package/src/openapi/platform/models/screens.ts +0 -171
- package/src/openapi/platform/models/server-info.ts +0 -100
- package/src/openapi/platform/models/service-registry.ts +0 -68
- package/src/openapi/platform/models/status.ts +0 -229
- package/src/openapi/platform/models/time-tracking.ts +0 -38
- package/src/openapi/platform/models/ui-modifications-apps.ts +0 -229
- package/src/openapi/platform/models/user-search.ts +0 -69
- package/src/openapi/platform/models/users.ts +0 -121
- package/src/openapi/platform/models/webhooks.ts +0 -307
- package/src/openapi/platform/models/workflow-scheme-drafts.ts +0 -58
- package/src/openapi/platform/models/workflow-scheme-project-associations.ts +0 -68
- package/src/openapi/platform/models/workflow-schemes.ts +0 -545
- package/src/openapi/platform/models/workflow-transition-properties.ts +0 -33
- package/src/openapi/platform/models/workflow-transition-rules.ts +0 -261
- package/src/openapi/platform/models/workflows.ts +0 -1943
- package/src/openapi/platform/services/announcement-banner-service.ts +0 -142
- package/src/openapi/platform/services/app-data-policies-service.ts +0 -136
- package/src/openapi/platform/services/app-migration-service.ts +0 -289
- package/src/openapi/platform/services/app-properties-service.ts +0 -441
- package/src/openapi/platform/services/application-roles-service.ts +0 -247
- package/src/openapi/platform/services/audit-records-service.ts +0 -164
- package/src/openapi/platform/services/avatars-service.ts +0 -769
- package/src/openapi/platform/services/classification-levels-service.ts +0 -131
- package/src/openapi/platform/services/dashboards-service.ts +0 -1721
- package/src/openapi/platform/services/dynamic-modules-service.ts +0 -127
- package/src/openapi/platform/services/filter-sharing-service.ts +0 -687
- package/src/openapi/platform/services/filters-service.ts +0 -1901
- package/src/openapi/platform/services/group-and-user-picker-service.ts +0 -224
- package/src/openapi/platform/services/groups-service.ts +0 -751
- package/src/openapi/platform/services/issue-attachments-service.ts +0 -900
- package/src/openapi/platform/services/issue-comment-properties-service.ts +0 -324
- package/src/openapi/platform/services/issue-comments-service.ts +0 -812
- package/src/openapi/platform/services/issue-custom-field-configuration-apps-service.ts +0 -277
- package/src/openapi/platform/services/issue-custom-field-contexts-service.ts +0 -1339
- package/src/openapi/platform/services/issue-custom-field-options-apps-service.ts +0 -994
- package/src/openapi/platform/services/issue-custom-field-options-service.ts +0 -651
- package/src/openapi/platform/services/issue-custom-field-values-apps-service.ts +0 -201
- package/src/openapi/platform/services/issue-field-configurations-service.ts +0 -1294
- package/src/openapi/platform/services/issue-fields-service.ts +0 -837
- package/src/openapi/platform/services/issue-link-types-service.ts +0 -360
- package/src/openapi/platform/services/issue-links-service.ts +0 -345
- package/src/openapi/platform/services/issue-navigator-settings-service.ts +0 -119
- package/src/openapi/platform/services/issue-notification-schemes-service.ts +0 -1209
- package/src/openapi/platform/services/issue-priorities-service.ts +0 -575
- package/src/openapi/platform/services/issue-properties-service.ts +0 -606
- package/src/openapi/platform/services/issue-remote-links-service.ts +0 -597
- package/src/openapi/platform/services/issue-resolutions-service.ts +0 -534
- package/src/openapi/platform/services/issue-search-service.ts +0 -1139
- package/src/openapi/platform/services/issue-security-level-service.ts +0 -250
- package/src/openapi/platform/services/issue-security-schemes-service.ts +0 -1240
- package/src/openapi/platform/services/issue-type-properties-service.ts +0 -325
- package/src/openapi/platform/services/issue-type-schemes-service.ts +0 -940
- package/src/openapi/platform/services/issue-type-screen-schemes-service.ts +0 -994
- package/src/openapi/platform/services/issue-types-service.ts +0 -679
- package/src/openapi/platform/services/issue-votes-service.ts +0 -221
- package/src/openapi/platform/services/issue-watchers-service.ts +0 -331
- package/src/openapi/platform/services/issue-worklog-properties-service.ts +0 -348
- package/src/openapi/platform/services/issue-worklogs-service.ts +0 -1089
- package/src/openapi/platform/services/issues-service.ts +0 -3346
- package/src/openapi/platform/services/jira-expressions-service.ts +0 -407
- package/src/openapi/platform/services/jira-settings-service.ts +0 -415
- package/src/openapi/platform/services/jql-functions-apps-service.ts +0 -219
- package/src/openapi/platform/services/jql-service.ts +0 -896
- package/src/openapi/platform/services/labels-service.ts +0 -89
- package/src/openapi/platform/services/license-metrics-service.ts +0 -216
- package/src/openapi/platform/services/myself-service.ts +0 -520
- package/src/openapi/platform/services/permission-schemes-service.ts +0 -926
- package/src/openapi/platform/services/permissions-service.ts +0 -407
- package/src/openapi/platform/services/priority-schemes-service.ts +0 -1001
- package/src/openapi/platform/services/project-avatars-service.ts +0 -341
- package/src/openapi/platform/services/project-categories-service.ts +0 -318
- package/src/openapi/platform/services/project-classification-levels-service.ts +0 -232
- package/src/openapi/platform/services/project-components-service.ts +0 -1332
- package/src/openapi/platform/services/project-email-service.ts +0 -161
- package/src/openapi/platform/services/project-features-service.ts +0 -207
- package/src/openapi/platform/services/project-key-and-name-validation-service.ts +0 -200
- package/src/openapi/platform/services/project-permission-schemes-service.ts +0 -384
- package/src/openapi/platform/services/project-properties-service.ts +0 -320
- package/src/openapi/platform/services/project-role-actors-service.ts +0 -627
- package/src/openapi/platform/services/project-roles-service.ts +0 -867
- package/src/openapi/platform/services/project-types-service.ts +0 -297
- package/src/openapi/platform/services/project-versions-service.ts +0 -1287
- package/src/openapi/platform/services/projects-service.ts +0 -2196
- package/src/openapi/platform/services/screen-schemes-service.ts +0 -334
- package/src/openapi/platform/services/screen-tab-fields-service.ts +0 -276
- package/src/openapi/platform/services/screen-tabs-service.ts +0 -421
- package/src/openapi/platform/services/screens-service.ts +0 -528
- package/src/openapi/platform/services/server-info-service.ts +0 -88
- package/src/openapi/platform/services/service-registry-service.ts +0 -89
- package/src/openapi/platform/services/status-service.ts +0 -498
- package/src/openapi/platform/services/tasks-service.ts +0 -159
- package/src/openapi/platform/services/time-tracking-service.ts +0 -386
- package/src/openapi/platform/services/ui-modifications-apps-service.ts +0 -403
- package/src/openapi/platform/services/user-properties-service.ts +0 -413
- package/src/openapi/platform/services/user-search-service.ts +0 -1214
- package/src/openapi/platform/services/users-service.ts +0 -1108
- package/src/openapi/platform/services/webhooks-service.ts +0 -458
- package/src/openapi/platform/services/workflow-scheme-drafts-service.ts +0 -1313
- package/src/openapi/platform/services/workflow-scheme-project-associations-service.ts +0 -189
- package/src/openapi/platform/services/workflow-schemes-service.ts +0 -1617
- package/src/openapi/platform/services/workflow-status-categories-service.ts +0 -151
- package/src/openapi/platform/services/workflow-statuses-service.ts +0 -176
- package/src/openapi/platform/services/workflow-transition-properties-service.ts +0 -388
- package/src/openapi/platform/services/workflow-transition-rules-service.ts +0 -485
- package/src/openapi/platform/services/workflows-service.ts +0 -3477
- package/src/openapi/platform/validation-schema-storage.ts +0 -186
- package/src/openapi/software/base-jira-software-api-client.ts +0 -447
- package/src/openapi/software/core/common-http-client.ts +0 -723
- package/src/openapi/software/core/common-http-service.ts +0 -22
- package/src/openapi/software/core/common-validation-schema-storage.ts +0 -105
- package/src/openapi/software/models/board.ts +0 -918
- package/src/openapi/software/services/backlog-service.ts +0 -160
- package/src/openapi/software/services/board-service.ts +0 -4189
- package/src/openapi/software/services/builds-service.ts +0 -571
- package/src/openapi/software/services/deployments-service.ts +0 -403
- package/src/openapi/software/services/dev-ops-components-service.ts +0 -371
- package/src/openapi/software/services/development-information-service.ts +0 -2357
- package/src/openapi/software/services/epic-service.ts +0 -854
- package/src/openapi/software/services/feature-flags-service.ts +0 -303
- package/src/openapi/software/services/issue-service.ts +0 -529
- package/src/openapi/software/services/operations-service.ts +0 -741
- package/src/openapi/software/services/remote-links-service.ts +0 -653
- package/src/openapi/software/services/security-information-service.ts +0 -495
- package/src/openapi/software/services/sprint-service.ts +0 -969
- package/src/openapi/software/validation-schema-storage.ts +0 -186
- package/tsconfig.build.json +0 -7
- package/tsconfig.json +0 -4
|
@@ -1,571 +0,0 @@
|
|
|
1
|
-
// DO NOT EDIT!
|
|
2
|
-
// This file is generated by "api-typescript-generator".
|
|
3
|
-
// To update this file run "yarn build:openapi".
|
|
4
|
-
import { z } from "zod";
|
|
5
|
-
|
|
6
|
-
import * as commonHttpClient from "../core/common-http-client";
|
|
7
|
-
import { CommonHttpService } from "../core/common-http-service";
|
|
8
|
-
import { validationSchemaStorage } from "../validation-schema-storage";
|
|
9
|
-
/**
|
|
10
|
-
* APIs related to integrating builds data with Jira Software. These APIs
|
|
11
|
-
* are available to Atlassian Connect apps. To use these APIs you must
|
|
12
|
-
* have the Build module see
|
|
13
|
-
* https://developer.atlassian.com/cloud/jira/software/modules/build/
|
|
14
|
-
* in your app's descriptor. They are also related to integrating Jira
|
|
15
|
-
* Software Cloud with on-premises tools using
|
|
16
|
-
* OAuth 2.0 credentials, see
|
|
17
|
-
* https://developer.atlassian.com/cloud/jira/software/integrate-jsw-cloud-with-onpremises-tools/.
|
|
18
|
-
*/
|
|
19
|
-
export class BuildsService extends CommonHttpService {
|
|
20
|
-
/**
|
|
21
|
-
* Delete the build data currently stored for the given `pipelineId` and
|
|
22
|
-
* `buildNumber` combination.
|
|
23
|
-
*
|
|
24
|
-
* Deletion is performed asynchronously. The `getBuildByKey` operation can be used
|
|
25
|
-
* to confirm that data has been
|
|
26
|
-
* deleted successfully (if needed).
|
|
27
|
-
*
|
|
28
|
-
* Only Connect apps that define the `jiraBuildInfoProvider` module, and
|
|
29
|
-
* on-premise integrations, can access this resource.
|
|
30
|
-
* This resource requires the 'DELETE' scope for Connect apps.
|
|
31
|
-
*
|
|
32
|
-
* @path {DELETE} /rest/builds/0.1/pipelines/{pipelineId}/builds/{buildNumber}
|
|
33
|
-
*/
|
|
34
|
-
deleteBuildByKey({
|
|
35
|
-
pipelineId,
|
|
36
|
-
buildNumber,
|
|
37
|
-
updateSequenceNumber,
|
|
38
|
-
authorization,
|
|
39
|
-
}: {
|
|
40
|
-
/** The `pipelineId` of the build to delete. */
|
|
41
|
-
pipelineId: string;
|
|
42
|
-
/** The `buildNumber` of the build to delete. */
|
|
43
|
-
buildNumber: number;
|
|
44
|
-
/**
|
|
45
|
-
* This parameter usage is no longer supported.
|
|
46
|
-
*
|
|
47
|
-
* An optional `_updateSequenceNumber` to use to control deletion.
|
|
48
|
-
*
|
|
49
|
-
* Only stored data with an `updateSequenceNumber` less than or equal to that
|
|
50
|
-
* provided will be deleted.
|
|
51
|
-
* This can be used help ensure submit/delete requests are applied correctly if
|
|
52
|
-
* issued close together.
|
|
53
|
-
*
|
|
54
|
-
* @deprecated
|
|
55
|
-
*/
|
|
56
|
-
updateSequenceNumber?: number;
|
|
57
|
-
/**
|
|
58
|
-
* All requests must be signed with either a Connect JWT token or OAuth token for
|
|
59
|
-
* an on-premise integration that corresponds to an app installed in Jira.
|
|
60
|
-
*
|
|
61
|
-
* If the Connect JWT token corresponds to an app that does not define
|
|
62
|
-
* `jiraBuildInfoProvider` module it will be rejected with a 403.
|
|
63
|
-
*
|
|
64
|
-
* See https://developer.atlassian.com/blog/2015/01/understanding-jwt/ for more
|
|
65
|
-
* details about Connect JWT tokens.
|
|
66
|
-
* See
|
|
67
|
-
* https://developer.atlassian.com/cloud/jira/software/integrate-jsw-cloud-with-onpremises-tools/
|
|
68
|
-
* for details about on-premise integrations.
|
|
69
|
-
*/
|
|
70
|
-
authorization: string;
|
|
71
|
-
}): Promise<void> {
|
|
72
|
-
return this.getClientInstance()
|
|
73
|
-
.request({
|
|
74
|
-
path: "/rest/builds/0.1/pipelines/{pipelineId}/builds/{buildNumber}",
|
|
75
|
-
method: "DELETE",
|
|
76
|
-
pathParams: {
|
|
77
|
-
pipelineId,
|
|
78
|
-
buildNumber,
|
|
79
|
-
},
|
|
80
|
-
query: {
|
|
81
|
-
_updateSequenceNumber: updateSequenceNumber,
|
|
82
|
-
},
|
|
83
|
-
headers: {
|
|
84
|
-
Authorization: authorization,
|
|
85
|
-
},
|
|
86
|
-
})
|
|
87
|
-
.then(commonHttpClient.discardResult);
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* Bulk delete all builds data that match the given request.
|
|
91
|
-
*
|
|
92
|
-
* One or more query params must be supplied to specify Properties to delete by.
|
|
93
|
-
* Optional param `_updateSequenceNumber` is no longer supported.
|
|
94
|
-
* If more than one Property is provided, data will be deleted that matches ALL of
|
|
95
|
-
* the
|
|
96
|
-
* Properties (e.g. treated as an AND).
|
|
97
|
-
*
|
|
98
|
-
* See the documentation for the `submitBuilds` operation for more details.
|
|
99
|
-
*
|
|
100
|
-
* e.g. DELETE /bulkByProperties?accountId=account-123&repoId=repo-345
|
|
101
|
-
*
|
|
102
|
-
* Deletion is performed asynchronously. The `getBuildByKey` operation can be used
|
|
103
|
-
* to confirm that data has been
|
|
104
|
-
* deleted successfully (if needed).
|
|
105
|
-
*
|
|
106
|
-
* Only Connect apps that define the `jiraBuildInfoProvider` module, and
|
|
107
|
-
* on-premise integrations, can access this resource.
|
|
108
|
-
* This resource requires the 'DELETE' scope for Connect apps.
|
|
109
|
-
*
|
|
110
|
-
* @path {DELETE} /rest/builds/0.1/bulkByProperties
|
|
111
|
-
*/
|
|
112
|
-
deleteBuildsByProperty({
|
|
113
|
-
updateSequenceNumber,
|
|
114
|
-
authorization,
|
|
115
|
-
}: {
|
|
116
|
-
/**
|
|
117
|
-
* This parameter usage is no longer supported.
|
|
118
|
-
*
|
|
119
|
-
* An optional `_updateSequenceNumber` to use to control deletion.
|
|
120
|
-
*
|
|
121
|
-
* Only stored data with an `updateSequenceNumber` less than or equal to that
|
|
122
|
-
* provided will be deleted.
|
|
123
|
-
* This can be used help ensure submit/delete requests are applied correctly if
|
|
124
|
-
* issued close together.
|
|
125
|
-
*
|
|
126
|
-
* If not provided, all stored data that matches the request will be deleted.
|
|
127
|
-
*
|
|
128
|
-
* @deprecated
|
|
129
|
-
*/
|
|
130
|
-
updateSequenceNumber?: number;
|
|
131
|
-
/**
|
|
132
|
-
* All requests must be signed with either a Connect JWT token or OAuth token for
|
|
133
|
-
* an on-premise integration that corresponds to an app installed in Jira.
|
|
134
|
-
*
|
|
135
|
-
* If the Connect JWT token corresponds to an app that does not define
|
|
136
|
-
* `jiraBuildInfoProvider` module it will be rejected with a 403.
|
|
137
|
-
*
|
|
138
|
-
* See https://developer.atlassian.com/blog/2015/01/understanding-jwt/ for more
|
|
139
|
-
* details about Connect JWT tokens.
|
|
140
|
-
* See
|
|
141
|
-
* https://developer.atlassian.com/cloud/jira/software/integrate-jsw-cloud-with-onpremises-tools/
|
|
142
|
-
* for details about on-premise integrations.
|
|
143
|
-
*/
|
|
144
|
-
authorization: string;
|
|
145
|
-
}): Promise<void> {
|
|
146
|
-
return this.getClientInstance()
|
|
147
|
-
.request({
|
|
148
|
-
path: "/rest/builds/0.1/bulkByProperties",
|
|
149
|
-
method: "DELETE",
|
|
150
|
-
query: {
|
|
151
|
-
_updateSequenceNumber: updateSequenceNumber,
|
|
152
|
-
},
|
|
153
|
-
headers: {
|
|
154
|
-
Authorization: authorization,
|
|
155
|
-
},
|
|
156
|
-
})
|
|
157
|
-
.then(commonHttpClient.discardResult);
|
|
158
|
-
}
|
|
159
|
-
/**
|
|
160
|
-
* Retrieve the currently stored build data for the given `pipelineId` and
|
|
161
|
-
* `buildNumber` combination.
|
|
162
|
-
*
|
|
163
|
-
* The result will be what is currently stored, ignoring any pending updates or
|
|
164
|
-
* deletes.
|
|
165
|
-
*
|
|
166
|
-
* Only Connect apps that define the `jiraBuildInfoProvider` module, and
|
|
167
|
-
* on-premise integrations, can access this resource.
|
|
168
|
-
* This resource requires the 'READ' scope for Connect apps.
|
|
169
|
-
*
|
|
170
|
-
* @returns The build data currently stored for the given key.
|
|
171
|
-
* @path {GET} /rest/builds/0.1/pipelines/{pipelineId}/builds/{buildNumber}
|
|
172
|
-
*/
|
|
173
|
-
getBuildByKey({
|
|
174
|
-
pipelineId,
|
|
175
|
-
buildNumber,
|
|
176
|
-
authorization,
|
|
177
|
-
}: {
|
|
178
|
-
/** The `pipelineId` of the build. */
|
|
179
|
-
pipelineId: string;
|
|
180
|
-
/** The `buildNumber` of the build. */
|
|
181
|
-
buildNumber: number;
|
|
182
|
-
/**
|
|
183
|
-
* All requests must be signed with either a Connect JWT token or OAuth token for
|
|
184
|
-
* an on-premise integration that corresponds to an app installed in Jira.
|
|
185
|
-
*
|
|
186
|
-
* If the Connect JWT token corresponds to an app that does not define
|
|
187
|
-
* `jiraBuildInfoProvider` module it will be rejected with a 403.
|
|
188
|
-
*
|
|
189
|
-
* See https://developer.atlassian.com/blog/2015/01/understanding-jwt/ for more
|
|
190
|
-
* details about Connect JWT tokens.
|
|
191
|
-
* See
|
|
192
|
-
* https://developer.atlassian.com/cloud/jira/software/integrate-jsw-cloud-with-onpremises-tools/
|
|
193
|
-
* for details about on-premise integrations.
|
|
194
|
-
*/
|
|
195
|
-
authorization: string;
|
|
196
|
-
}): Promise<unknown> {
|
|
197
|
-
return this.getClientInstance()
|
|
198
|
-
.request({
|
|
199
|
-
path: "/rest/builds/0.1/pipelines/{pipelineId}/builds/{buildNumber}",
|
|
200
|
-
method: "GET",
|
|
201
|
-
pathParams: {
|
|
202
|
-
pipelineId,
|
|
203
|
-
buildNumber,
|
|
204
|
-
},
|
|
205
|
-
headers: {
|
|
206
|
-
Authorization: authorization,
|
|
207
|
-
},
|
|
208
|
-
})
|
|
209
|
-
.then(
|
|
210
|
-
this.getClientInstance().responseHandler({
|
|
211
|
-
200: {
|
|
212
|
-
"application/json": "json",
|
|
213
|
-
},
|
|
214
|
-
}),
|
|
215
|
-
)
|
|
216
|
-
.then(
|
|
217
|
-
commonHttpClient.castResponse<{
|
|
218
|
-
status: 200;
|
|
219
|
-
mediaType: "application/json";
|
|
220
|
-
body: unknown;
|
|
221
|
-
}>(),
|
|
222
|
-
)
|
|
223
|
-
.then(
|
|
224
|
-
validationSchemaStorage.validator(
|
|
225
|
-
"BuildsService.getBuildByKey.response",
|
|
226
|
-
),
|
|
227
|
-
)
|
|
228
|
-
.then(commonHttpClient.getBody);
|
|
229
|
-
}
|
|
230
|
-
/**
|
|
231
|
-
* Update / insert builds data.
|
|
232
|
-
*
|
|
233
|
-
* Builds are identified by the combination of `pipelineId` and `buildNumber`, and
|
|
234
|
-
* existing build data for the same
|
|
235
|
-
* build will be replaced if it exists and the `updateSequenceNumber` of the
|
|
236
|
-
* existing data is less than the
|
|
237
|
-
* incoming data.
|
|
238
|
-
*
|
|
239
|
-
* Submissions are performed asynchronously. Submitted data will eventually be
|
|
240
|
-
* available in Jira; most updates are
|
|
241
|
-
* available within a short period of time, but may take some time during peak
|
|
242
|
-
* load and/or maintenance times.
|
|
243
|
-
* The `getBuildByKey` operation can be used to confirm that data has been stored
|
|
244
|
-
* successfully (if needed).
|
|
245
|
-
*
|
|
246
|
-
* In the case of multiple builds being submitted in one request, each is
|
|
247
|
-
* validated individually prior to
|
|
248
|
-
* submission. Details of which build failed submission (if any) are available in
|
|
249
|
-
* the response object.
|
|
250
|
-
*
|
|
251
|
-
* Only Connect apps that define the `jiraBuildInfoProvider` module, and
|
|
252
|
-
* on-premise integrations, can access this resource.
|
|
253
|
-
* This resource requires the 'WRITE' scope for Connect apps.
|
|
254
|
-
*
|
|
255
|
-
* @returns Submission accepted. Each submitted build that is of a valid format will be
|
|
256
|
-
* eventually available in Jira.
|
|
257
|
-
*
|
|
258
|
-
* Details of which builds were submitted and which failed submission (due to data
|
|
259
|
-
* format problems etc.)
|
|
260
|
-
* are available in the response object.
|
|
261
|
-
* @path {POST} /rest/builds/0.1/bulk
|
|
262
|
-
*/
|
|
263
|
-
submitBuilds({
|
|
264
|
-
authorization,
|
|
265
|
-
requestBody,
|
|
266
|
-
}: {
|
|
267
|
-
/**
|
|
268
|
-
* All requests must be signed with either a Connect JWT token or OAuth token for
|
|
269
|
-
* an on-premise integration that corresponds to an app installed in Jira.
|
|
270
|
-
*
|
|
271
|
-
* If the Connect JWT token corresponds to an app that does not define
|
|
272
|
-
* `jiraBuildInfoProvider` module it will be rejected with a 403.
|
|
273
|
-
*
|
|
274
|
-
* See https://developer.atlassian.com/blog/2015/01/understanding-jwt/ for more
|
|
275
|
-
* details about Connect JWT tokens.
|
|
276
|
-
* See
|
|
277
|
-
* https://developer.atlassian.com/cloud/jira/software/integrate-jsw-cloud-with-onpremises-tools/
|
|
278
|
-
* for details about on-premise integrations.
|
|
279
|
-
*/
|
|
280
|
-
authorization: string;
|
|
281
|
-
/** Builds data to submit. */
|
|
282
|
-
requestBody: {
|
|
283
|
-
/**
|
|
284
|
-
* Properties
|
|
285
|
-
*
|
|
286
|
-
* Properties assigned to build data that can then be used for delete / query
|
|
287
|
-
* operations.
|
|
288
|
-
*
|
|
289
|
-
* Examples might be an account or user ID that can then be used to clean up data
|
|
290
|
-
* if an account is removed from
|
|
291
|
-
* the Provider system.
|
|
292
|
-
*
|
|
293
|
-
* Note that these properties will never be returned with build data. They are not
|
|
294
|
-
* intended for use as
|
|
295
|
-
* metadata to associate with a build. Internally they are stored as a hash so
|
|
296
|
-
* that personal information etc.
|
|
297
|
-
* is never stored within Jira.
|
|
298
|
-
*
|
|
299
|
-
* Properties are supplied as key/value pairs, a maximum of 5 properties can be
|
|
300
|
-
* supplied, and keys must not
|
|
301
|
-
* contain ':' or start with '_'.
|
|
302
|
-
*
|
|
303
|
-
* @example {
|
|
304
|
-
* "accountId": "account-234",
|
|
305
|
-
* "projectId": "project-123"
|
|
306
|
-
* }
|
|
307
|
-
*/
|
|
308
|
-
properties?: {
|
|
309
|
-
[key: string]: string;
|
|
310
|
-
};
|
|
311
|
-
/**
|
|
312
|
-
* A list of builds to submit to Jira.
|
|
313
|
-
*
|
|
314
|
-
* Each build may be associated with one or more Jira issue keys, and will be
|
|
315
|
-
* associated with any properties
|
|
316
|
-
* included in this request.
|
|
317
|
-
*/
|
|
318
|
-
builds: unknown[];
|
|
319
|
-
/**
|
|
320
|
-
* ProviderMetadata
|
|
321
|
-
*
|
|
322
|
-
* Information about the provider. This is useful for auditing, logging, debugging,
|
|
323
|
-
* and other internal uses. It is not considered private information. Hence, it
|
|
324
|
-
* may not contain personally
|
|
325
|
-
* identifiable information.
|
|
326
|
-
*/
|
|
327
|
-
providerMetadata?: {
|
|
328
|
-
/**
|
|
329
|
-
* An optional name of the source of the builds data.
|
|
330
|
-
*
|
|
331
|
-
* @example Bamboo 6.10.2
|
|
332
|
-
*/
|
|
333
|
-
product?: string;
|
|
334
|
-
} & {
|
|
335
|
-
[key: string]: unknown;
|
|
336
|
-
};
|
|
337
|
-
} & {
|
|
338
|
-
[key: string]: unknown;
|
|
339
|
-
};
|
|
340
|
-
}): Promise<
|
|
341
|
-
{
|
|
342
|
-
/**
|
|
343
|
-
* The keys of builds that have been accepted for submission. A build key is a
|
|
344
|
-
* composite key that consists of
|
|
345
|
-
* `pipelineId` and `buildNumber`.
|
|
346
|
-
*
|
|
347
|
-
* A build may be rejected if it was only associated with unknown issue keys, or
|
|
348
|
-
* if the submitted data for that
|
|
349
|
-
* build does not match the required schema.
|
|
350
|
-
*
|
|
351
|
-
* Note that a build that isn't updated due to it's `updateSequenceNumber` being
|
|
352
|
-
* out of order is not
|
|
353
|
-
* considered a failed submission.
|
|
354
|
-
*/
|
|
355
|
-
acceptedBuilds?: ({
|
|
356
|
-
/**
|
|
357
|
-
* An ID that relates a sequence of builds. Depending on your system this might be
|
|
358
|
-
* a project ID, pipeline ID,
|
|
359
|
-
* plan key etc. - whatever logical unit you use to group a sequence of builds.
|
|
360
|
-
*
|
|
361
|
-
* The combination of `pipelineId` and `buildNumber` must uniquely identify the
|
|
362
|
-
* build.
|
|
363
|
-
*
|
|
364
|
-
* @example my-build-plan
|
|
365
|
-
*/
|
|
366
|
-
pipelineId: string;
|
|
367
|
-
/**
|
|
368
|
-
* Identifies a build within the sequence of builds identified by the build
|
|
369
|
-
* `pipelineId`.
|
|
370
|
-
*
|
|
371
|
-
* Used to identify the 'most recent' build in that sequence of builds.
|
|
372
|
-
*
|
|
373
|
-
* The combination of `pipelineId` and `buildNumber` must uniquely identify the
|
|
374
|
-
* build.
|
|
375
|
-
*
|
|
376
|
-
* @example 16
|
|
377
|
-
*/
|
|
378
|
-
buildNumber: number;
|
|
379
|
-
} & {
|
|
380
|
-
[key: string]: unknown;
|
|
381
|
-
})[];
|
|
382
|
-
/**
|
|
383
|
-
* Details of builds that have not been accepted for submission.
|
|
384
|
-
*
|
|
385
|
-
* A build may be rejected if it was only associated with unknown issue keys, or
|
|
386
|
-
* if the submitted data for the
|
|
387
|
-
* build does not match the required schema.
|
|
388
|
-
*/
|
|
389
|
-
rejectedBuilds?: ({
|
|
390
|
-
/**
|
|
391
|
-
* BuildKey
|
|
392
|
-
*
|
|
393
|
-
* Fields that uniquely reference a build.
|
|
394
|
-
*/
|
|
395
|
-
key: {
|
|
396
|
-
/**
|
|
397
|
-
* An ID that relates a sequence of builds. Depending on your system this might be
|
|
398
|
-
* a project ID, pipeline ID,
|
|
399
|
-
* plan key etc. - whatever logical unit you use to group a sequence of builds.
|
|
400
|
-
*
|
|
401
|
-
* The combination of `pipelineId` and `buildNumber` must uniquely identify the
|
|
402
|
-
* build.
|
|
403
|
-
*
|
|
404
|
-
* @example my-build-plan
|
|
405
|
-
*/
|
|
406
|
-
pipelineId: string;
|
|
407
|
-
/**
|
|
408
|
-
* Identifies a build within the sequence of builds identified by the build
|
|
409
|
-
* `pipelineId`.
|
|
410
|
-
*
|
|
411
|
-
* Used to identify the 'most recent' build in that sequence of builds.
|
|
412
|
-
*
|
|
413
|
-
* The combination of `pipelineId` and `buildNumber` must uniquely identify the
|
|
414
|
-
* build.
|
|
415
|
-
*
|
|
416
|
-
* @example 16
|
|
417
|
-
*/
|
|
418
|
-
buildNumber: number;
|
|
419
|
-
} & {
|
|
420
|
-
[key: string]: unknown;
|
|
421
|
-
};
|
|
422
|
-
/** The error messages for the rejected build */
|
|
423
|
-
errors: ({
|
|
424
|
-
/** A human-readable message describing the error. */
|
|
425
|
-
message: string;
|
|
426
|
-
/**
|
|
427
|
-
* An optional trace ID that can be used by Jira developers to locate the source
|
|
428
|
-
* of the error.
|
|
429
|
-
*/
|
|
430
|
-
errorTraceId?: string;
|
|
431
|
-
} & {
|
|
432
|
-
[key: string]: unknown;
|
|
433
|
-
})[];
|
|
434
|
-
} & {
|
|
435
|
-
[key: string]: unknown;
|
|
436
|
-
})[];
|
|
437
|
-
/**
|
|
438
|
-
* Issue keys that are not known on this Jira instance (if any).
|
|
439
|
-
*
|
|
440
|
-
* These may be invalid keys (e.g. `UTF-8` is sometimes incorrectly identified as
|
|
441
|
-
* a Jira issue key), or they
|
|
442
|
-
* may be for projects that no longer exist.
|
|
443
|
-
*
|
|
444
|
-
* If a build has been associated with issue keys other than those in this array
|
|
445
|
-
* it will still be stored against
|
|
446
|
-
* those valid keys. If a build was only associated with issue keys deemed to be
|
|
447
|
-
* invalid it won't be persisted.
|
|
448
|
-
*/
|
|
449
|
-
unknownIssueKeys?: string[];
|
|
450
|
-
} & {
|
|
451
|
-
[key: string]: unknown;
|
|
452
|
-
}
|
|
453
|
-
> {
|
|
454
|
-
return this.getClientInstance()
|
|
455
|
-
.request({
|
|
456
|
-
path: "/rest/builds/0.1/bulk",
|
|
457
|
-
method: "POST",
|
|
458
|
-
headers: {
|
|
459
|
-
Authorization: authorization,
|
|
460
|
-
"Content-Type": "application/json",
|
|
461
|
-
},
|
|
462
|
-
body: requestBody,
|
|
463
|
-
})
|
|
464
|
-
.then(
|
|
465
|
-
this.getClientInstance().responseHandler({
|
|
466
|
-
202: {
|
|
467
|
-
"application/json": "json",
|
|
468
|
-
},
|
|
469
|
-
}),
|
|
470
|
-
)
|
|
471
|
-
.then(
|
|
472
|
-
commonHttpClient.castResponse<{
|
|
473
|
-
status: 202;
|
|
474
|
-
mediaType: "application/json";
|
|
475
|
-
body: {
|
|
476
|
-
acceptedBuilds?: ({
|
|
477
|
-
pipelineId: string;
|
|
478
|
-
buildNumber: number;
|
|
479
|
-
} & {
|
|
480
|
-
[key: string]: unknown;
|
|
481
|
-
})[];
|
|
482
|
-
rejectedBuilds?: ({
|
|
483
|
-
key: {
|
|
484
|
-
pipelineId: string;
|
|
485
|
-
buildNumber: number;
|
|
486
|
-
} & {
|
|
487
|
-
[key: string]: unknown;
|
|
488
|
-
};
|
|
489
|
-
errors: ({
|
|
490
|
-
message: string;
|
|
491
|
-
errorTraceId?: string;
|
|
492
|
-
} & {
|
|
493
|
-
[key: string]: unknown;
|
|
494
|
-
})[];
|
|
495
|
-
} & {
|
|
496
|
-
[key: string]: unknown;
|
|
497
|
-
})[];
|
|
498
|
-
unknownIssueKeys?: string[];
|
|
499
|
-
} & {
|
|
500
|
-
[key: string]: unknown;
|
|
501
|
-
};
|
|
502
|
-
}>(),
|
|
503
|
-
)
|
|
504
|
-
.then(
|
|
505
|
-
validationSchemaStorage.validator(
|
|
506
|
-
"BuildsService.submitBuilds.response",
|
|
507
|
-
),
|
|
508
|
-
)
|
|
509
|
-
.then(commonHttpClient.getBody);
|
|
510
|
-
}
|
|
511
|
-
static initialize() {
|
|
512
|
-
validationSchemaStorage.registerExtensible(
|
|
513
|
-
"BuildsService.submitBuilds.response",
|
|
514
|
-
z
|
|
515
|
-
.object({
|
|
516
|
-
status: z.literal(202),
|
|
517
|
-
mediaType: z.literal("application/json"),
|
|
518
|
-
body: z
|
|
519
|
-
.object({
|
|
520
|
-
acceptedBuilds: z
|
|
521
|
-
.array(
|
|
522
|
-
z
|
|
523
|
-
.object({
|
|
524
|
-
pipelineId: z.string().max(255),
|
|
525
|
-
buildNumber: z.number().int(),
|
|
526
|
-
})
|
|
527
|
-
.catchall(z.unknown()),
|
|
528
|
-
)
|
|
529
|
-
.optional(),
|
|
530
|
-
rejectedBuilds: z
|
|
531
|
-
.array(
|
|
532
|
-
z
|
|
533
|
-
.object({
|
|
534
|
-
key: z
|
|
535
|
-
.object({
|
|
536
|
-
pipelineId: z.string().max(255),
|
|
537
|
-
buildNumber: z.number().int(),
|
|
538
|
-
})
|
|
539
|
-
.catchall(z.unknown()),
|
|
540
|
-
errors: z.array(
|
|
541
|
-
z
|
|
542
|
-
.object({
|
|
543
|
-
message: z.string(),
|
|
544
|
-
errorTraceId: z.string().optional(),
|
|
545
|
-
})
|
|
546
|
-
.catchall(z.unknown()),
|
|
547
|
-
),
|
|
548
|
-
})
|
|
549
|
-
.catchall(z.unknown()),
|
|
550
|
-
)
|
|
551
|
-
.optional(),
|
|
552
|
-
unknownIssueKeys: z
|
|
553
|
-
.array(z.string().regex(new RegExp("^\\w{1,255}-\\d{1,255}$")))
|
|
554
|
-
.optional(),
|
|
555
|
-
})
|
|
556
|
-
.catchall(z.unknown()),
|
|
557
|
-
})
|
|
558
|
-
.describe("BuildsService.submitBuilds.response"),
|
|
559
|
-
);
|
|
560
|
-
validationSchemaStorage.registerExtensible(
|
|
561
|
-
"BuildsService.getBuildByKey.response",
|
|
562
|
-
z
|
|
563
|
-
.object({
|
|
564
|
-
status: z.literal(200),
|
|
565
|
-
mediaType: z.literal("application/json"),
|
|
566
|
-
body: z.unknown(),
|
|
567
|
-
})
|
|
568
|
-
.describe("BuildsService.getBuildByKey.response"),
|
|
569
|
-
);
|
|
570
|
-
}
|
|
571
|
-
}
|