@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.
Files changed (201) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/package.json +10 -3
  3. package/.eslintrc.js +0 -3
  4. package/config/api-typescript-generator.config.ts +0 -91
  5. package/config/compare-schemas.ts +0 -307
  6. package/src/index.ts +0 -47
  7. package/src/openapi/platform/base-jira-platform-api-client.ts +0 -2298
  8. package/src/openapi/platform/core/common-http-client.ts +0 -723
  9. package/src/openapi/platform/core/common-http-service.ts +0 -22
  10. package/src/openapi/platform/core/common-validation-schema-storage.ts +0 -105
  11. package/src/openapi/platform/models/announcement-banner.ts +0 -59
  12. package/src/openapi/platform/models/app-data-policies.ts +0 -79
  13. package/src/openapi/platform/models/app-migration.ts +0 -172
  14. package/src/openapi/platform/models/app-properties.ts +0 -32
  15. package/src/openapi/platform/models/audit-records.ts +0 -140
  16. package/src/openapi/platform/models/avatars.ts +0 -48
  17. package/src/openapi/platform/models/classification-levels.ts +0 -58
  18. package/src/openapi/platform/models/common.ts +0 -2669
  19. package/src/openapi/platform/models/dashboards.ts +0 -849
  20. package/src/openapi/platform/models/dynamic-modules.ts +0 -121
  21. package/src/openapi/platform/models/filter-sharing.ts +0 -103
  22. package/src/openapi/platform/models/filters.ts +0 -319
  23. package/src/openapi/platform/models/group-and-user-picker.ts +0 -85
  24. package/src/openapi/platform/models/groups.ts +0 -247
  25. package/src/openapi/platform/models/issue-attachments.ts +0 -290
  26. package/src/openapi/platform/models/issue-comment-properties.ts +0 -27
  27. package/src/openapi/platform/models/issue-comments.ts +0 -91
  28. package/src/openapi/platform/models/issue-custom-field-configuration-apps.ts +0 -96
  29. package/src/openapi/platform/models/issue-custom-field-contexts.ts +0 -1072
  30. package/src/openapi/platform/models/issue-custom-field-options-apps.ts +0 -273
  31. package/src/openapi/platform/models/issue-custom-field-options.ts +0 -283
  32. package/src/openapi/platform/models/issue-custom-field-values-apps.ts +0 -118
  33. package/src/openapi/platform/models/issue-field-configurations.ts +0 -435
  34. package/src/openapi/platform/models/issue-fields.ts +0 -392
  35. package/src/openapi/platform/models/issue-link-types.ts +0 -28
  36. package/src/openapi/platform/models/issue-links.ts +0 -185
  37. package/src/openapi/platform/models/issue-notification-schemes.ts +0 -370
  38. package/src/openapi/platform/models/issue-priorities.ts +0 -196
  39. package/src/openapi/platform/models/issue-properties.ts +0 -259
  40. package/src/openapi/platform/models/issue-remote-links.ts +0 -207
  41. package/src/openapi/platform/models/issue-resolutions.ts +0 -180
  42. package/src/openapi/platform/models/issue-search.ts +0 -367
  43. package/src/openapi/platform/models/issue-security-level.ts +0 -76
  44. package/src/openapi/platform/models/issue-security-schemes.ts +0 -496
  45. package/src/openapi/platform/models/issue-type-schemes.ts +0 -290
  46. package/src/openapi/platform/models/issue-type-screen-schemes.ts +0 -286
  47. package/src/openapi/platform/models/issue-types.ts +0 -66
  48. package/src/openapi/platform/models/issue-votes.ts +0 -38
  49. package/src/openapi/platform/models/issue-watchers.ts +0 -67
  50. package/src/openapi/platform/models/issue-worklogs.ts +0 -190
  51. package/src/openapi/platform/models/issues.ts +0 -1268
  52. package/src/openapi/platform/models/jira-expressions.ts +0 -578
  53. package/src/openapi/platform/models/jira-settings.ts +0 -118
  54. package/src/openapi/platform/models/jql-functions-apps.ts +0 -128
  55. package/src/openapi/platform/models/jql.ts +0 -783
  56. package/src/openapi/platform/models/labels.ts +0 -42
  57. package/src/openapi/platform/models/license-metrics.ts +0 -68
  58. package/src/openapi/platform/models/myself.ts +0 -29
  59. package/src/openapi/platform/models/permission-schemes.ts +0 -89
  60. package/src/openapi/platform/models/permissions.ts +0 -308
  61. package/src/openapi/platform/models/priority-schemes.ts +0 -527
  62. package/src/openapi/platform/models/project-avatars.ts +0 -29
  63. package/src/openapi/platform/models/project-classification-levels.ts +0 -24
  64. package/src/openapi/platform/models/project-components.ts +0 -231
  65. package/src/openapi/platform/models/project-email.ts +0 -27
  66. package/src/openapi/platform/models/project-features.ts +0 -78
  67. package/src/openapi/platform/models/project-permission-schemes.ts +0 -43
  68. package/src/openapi/platform/models/project-role-actors.ts +0 -107
  69. package/src/openapi/platform/models/project-roles.ts +0 -76
  70. package/src/openapi/platform/models/project-types.ts +0 -36
  71. package/src/openapi/platform/models/project-versions.ts +0 -216
  72. package/src/openapi/platform/models/projects.ts +0 -429
  73. package/src/openapi/platform/models/screen-schemes.ts +0 -192
  74. package/src/openapi/platform/models/screen-tab-fields.ts +0 -45
  75. package/src/openapi/platform/models/screens.ts +0 -171
  76. package/src/openapi/platform/models/server-info.ts +0 -100
  77. package/src/openapi/platform/models/service-registry.ts +0 -68
  78. package/src/openapi/platform/models/status.ts +0 -229
  79. package/src/openapi/platform/models/time-tracking.ts +0 -38
  80. package/src/openapi/platform/models/ui-modifications-apps.ts +0 -229
  81. package/src/openapi/platform/models/user-search.ts +0 -69
  82. package/src/openapi/platform/models/users.ts +0 -121
  83. package/src/openapi/platform/models/webhooks.ts +0 -307
  84. package/src/openapi/platform/models/workflow-scheme-drafts.ts +0 -58
  85. package/src/openapi/platform/models/workflow-scheme-project-associations.ts +0 -68
  86. package/src/openapi/platform/models/workflow-schemes.ts +0 -545
  87. package/src/openapi/platform/models/workflow-transition-properties.ts +0 -33
  88. package/src/openapi/platform/models/workflow-transition-rules.ts +0 -261
  89. package/src/openapi/platform/models/workflows.ts +0 -1943
  90. package/src/openapi/platform/services/announcement-banner-service.ts +0 -142
  91. package/src/openapi/platform/services/app-data-policies-service.ts +0 -136
  92. package/src/openapi/platform/services/app-migration-service.ts +0 -289
  93. package/src/openapi/platform/services/app-properties-service.ts +0 -441
  94. package/src/openapi/platform/services/application-roles-service.ts +0 -247
  95. package/src/openapi/platform/services/audit-records-service.ts +0 -164
  96. package/src/openapi/platform/services/avatars-service.ts +0 -769
  97. package/src/openapi/platform/services/classification-levels-service.ts +0 -131
  98. package/src/openapi/platform/services/dashboards-service.ts +0 -1721
  99. package/src/openapi/platform/services/dynamic-modules-service.ts +0 -127
  100. package/src/openapi/platform/services/filter-sharing-service.ts +0 -687
  101. package/src/openapi/platform/services/filters-service.ts +0 -1901
  102. package/src/openapi/platform/services/group-and-user-picker-service.ts +0 -224
  103. package/src/openapi/platform/services/groups-service.ts +0 -751
  104. package/src/openapi/platform/services/issue-attachments-service.ts +0 -900
  105. package/src/openapi/platform/services/issue-comment-properties-service.ts +0 -324
  106. package/src/openapi/platform/services/issue-comments-service.ts +0 -812
  107. package/src/openapi/platform/services/issue-custom-field-configuration-apps-service.ts +0 -277
  108. package/src/openapi/platform/services/issue-custom-field-contexts-service.ts +0 -1339
  109. package/src/openapi/platform/services/issue-custom-field-options-apps-service.ts +0 -994
  110. package/src/openapi/platform/services/issue-custom-field-options-service.ts +0 -651
  111. package/src/openapi/platform/services/issue-custom-field-values-apps-service.ts +0 -201
  112. package/src/openapi/platform/services/issue-field-configurations-service.ts +0 -1294
  113. package/src/openapi/platform/services/issue-fields-service.ts +0 -837
  114. package/src/openapi/platform/services/issue-link-types-service.ts +0 -360
  115. package/src/openapi/platform/services/issue-links-service.ts +0 -345
  116. package/src/openapi/platform/services/issue-navigator-settings-service.ts +0 -119
  117. package/src/openapi/platform/services/issue-notification-schemes-service.ts +0 -1209
  118. package/src/openapi/platform/services/issue-priorities-service.ts +0 -575
  119. package/src/openapi/platform/services/issue-properties-service.ts +0 -606
  120. package/src/openapi/platform/services/issue-remote-links-service.ts +0 -597
  121. package/src/openapi/platform/services/issue-resolutions-service.ts +0 -534
  122. package/src/openapi/platform/services/issue-search-service.ts +0 -1139
  123. package/src/openapi/platform/services/issue-security-level-service.ts +0 -250
  124. package/src/openapi/platform/services/issue-security-schemes-service.ts +0 -1240
  125. package/src/openapi/platform/services/issue-type-properties-service.ts +0 -325
  126. package/src/openapi/platform/services/issue-type-schemes-service.ts +0 -940
  127. package/src/openapi/platform/services/issue-type-screen-schemes-service.ts +0 -994
  128. package/src/openapi/platform/services/issue-types-service.ts +0 -679
  129. package/src/openapi/platform/services/issue-votes-service.ts +0 -221
  130. package/src/openapi/platform/services/issue-watchers-service.ts +0 -331
  131. package/src/openapi/platform/services/issue-worklog-properties-service.ts +0 -348
  132. package/src/openapi/platform/services/issue-worklogs-service.ts +0 -1089
  133. package/src/openapi/platform/services/issues-service.ts +0 -3346
  134. package/src/openapi/platform/services/jira-expressions-service.ts +0 -407
  135. package/src/openapi/platform/services/jira-settings-service.ts +0 -415
  136. package/src/openapi/platform/services/jql-functions-apps-service.ts +0 -219
  137. package/src/openapi/platform/services/jql-service.ts +0 -896
  138. package/src/openapi/platform/services/labels-service.ts +0 -89
  139. package/src/openapi/platform/services/license-metrics-service.ts +0 -216
  140. package/src/openapi/platform/services/myself-service.ts +0 -520
  141. package/src/openapi/platform/services/permission-schemes-service.ts +0 -926
  142. package/src/openapi/platform/services/permissions-service.ts +0 -407
  143. package/src/openapi/platform/services/priority-schemes-service.ts +0 -1001
  144. package/src/openapi/platform/services/project-avatars-service.ts +0 -341
  145. package/src/openapi/platform/services/project-categories-service.ts +0 -318
  146. package/src/openapi/platform/services/project-classification-levels-service.ts +0 -232
  147. package/src/openapi/platform/services/project-components-service.ts +0 -1332
  148. package/src/openapi/platform/services/project-email-service.ts +0 -161
  149. package/src/openapi/platform/services/project-features-service.ts +0 -207
  150. package/src/openapi/platform/services/project-key-and-name-validation-service.ts +0 -200
  151. package/src/openapi/platform/services/project-permission-schemes-service.ts +0 -384
  152. package/src/openapi/platform/services/project-properties-service.ts +0 -320
  153. package/src/openapi/platform/services/project-role-actors-service.ts +0 -627
  154. package/src/openapi/platform/services/project-roles-service.ts +0 -867
  155. package/src/openapi/platform/services/project-types-service.ts +0 -297
  156. package/src/openapi/platform/services/project-versions-service.ts +0 -1287
  157. package/src/openapi/platform/services/projects-service.ts +0 -2196
  158. package/src/openapi/platform/services/screen-schemes-service.ts +0 -334
  159. package/src/openapi/platform/services/screen-tab-fields-service.ts +0 -276
  160. package/src/openapi/platform/services/screen-tabs-service.ts +0 -421
  161. package/src/openapi/platform/services/screens-service.ts +0 -528
  162. package/src/openapi/platform/services/server-info-service.ts +0 -88
  163. package/src/openapi/platform/services/service-registry-service.ts +0 -89
  164. package/src/openapi/platform/services/status-service.ts +0 -498
  165. package/src/openapi/platform/services/tasks-service.ts +0 -159
  166. package/src/openapi/platform/services/time-tracking-service.ts +0 -386
  167. package/src/openapi/platform/services/ui-modifications-apps-service.ts +0 -403
  168. package/src/openapi/platform/services/user-properties-service.ts +0 -413
  169. package/src/openapi/platform/services/user-search-service.ts +0 -1214
  170. package/src/openapi/platform/services/users-service.ts +0 -1108
  171. package/src/openapi/platform/services/webhooks-service.ts +0 -458
  172. package/src/openapi/platform/services/workflow-scheme-drafts-service.ts +0 -1313
  173. package/src/openapi/platform/services/workflow-scheme-project-associations-service.ts +0 -189
  174. package/src/openapi/platform/services/workflow-schemes-service.ts +0 -1617
  175. package/src/openapi/platform/services/workflow-status-categories-service.ts +0 -151
  176. package/src/openapi/platform/services/workflow-statuses-service.ts +0 -176
  177. package/src/openapi/platform/services/workflow-transition-properties-service.ts +0 -388
  178. package/src/openapi/platform/services/workflow-transition-rules-service.ts +0 -485
  179. package/src/openapi/platform/services/workflows-service.ts +0 -3477
  180. package/src/openapi/platform/validation-schema-storage.ts +0 -186
  181. package/src/openapi/software/base-jira-software-api-client.ts +0 -447
  182. package/src/openapi/software/core/common-http-client.ts +0 -723
  183. package/src/openapi/software/core/common-http-service.ts +0 -22
  184. package/src/openapi/software/core/common-validation-schema-storage.ts +0 -105
  185. package/src/openapi/software/models/board.ts +0 -918
  186. package/src/openapi/software/services/backlog-service.ts +0 -160
  187. package/src/openapi/software/services/board-service.ts +0 -4189
  188. package/src/openapi/software/services/builds-service.ts +0 -571
  189. package/src/openapi/software/services/deployments-service.ts +0 -403
  190. package/src/openapi/software/services/dev-ops-components-service.ts +0 -371
  191. package/src/openapi/software/services/development-information-service.ts +0 -2357
  192. package/src/openapi/software/services/epic-service.ts +0 -854
  193. package/src/openapi/software/services/feature-flags-service.ts +0 -303
  194. package/src/openapi/software/services/issue-service.ts +0 -529
  195. package/src/openapi/software/services/operations-service.ts +0 -741
  196. package/src/openapi/software/services/remote-links-service.ts +0 -653
  197. package/src/openapi/software/services/security-information-service.ts +0 -495
  198. package/src/openapi/software/services/sprint-service.ts +0 -969
  199. package/src/openapi/software/validation-schema-storage.ts +0 -186
  200. package/tsconfig.build.json +0 -7
  201. package/tsconfig.json +0 -4
@@ -1,403 +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 deployments data with Jira Software. These APIs
11
- * are available to Atlassian Connect apps. To use these APIs you must
12
- * have the Deployment module see
13
- * https://developer.atlassian.com/cloud/jira/software/modules/deployment/
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 DeploymentsService extends CommonHttpService {
20
- /**
21
- * Delete the currently stored deployment data for the given `pipelineId`,
22
- * `environmentId` and `deploymentSequenceNumber` combination.
23
- *
24
- * Deletion is performed asynchronously. The `getDeploymentByKey` operation can be
25
- * used to confirm that data has been deleted successfully (if needed).
26
- *
27
- * Only Connect apps that define the `jiraDeploymentInfoProvider` module, and
28
- * on-premise integrations, can access this resource.
29
- * This resource requires the 'DELETE' scope for Connect apps.
30
- *
31
- * @path {DELETE}
32
- * /rest/deployments/0.1/pipelines/{pipelineId}/environments/{environmentId}/deployments/{deploymentSequenceNumber}
33
- */
34
- deleteDeploymentByKey({
35
- pipelineId,
36
- environmentId,
37
- deploymentSequenceNumber,
38
- updateSequenceNumber,
39
- authorization,
40
- }: {
41
- /** The ID of the deployment's pipeline. */
42
- pipelineId: string;
43
- /** The ID of the deployment's environment. */
44
- environmentId: string;
45
- /** The deployment's deploymentSequenceNumber. */
46
- deploymentSequenceNumber: number;
47
- /**
48
- * This parameter usage is no longer supported.
49
- *
50
- * An optional `_updateSequenceNumber` to use to control deletion.
51
- *
52
- * Only stored data with an `updateSequenceNumber` less than or equal to that
53
- * provided will be deleted.
54
- * This can be used help ensure submit/delete requests are applied correctly if
55
- * issued close together.
56
- *
57
- * @deprecated
58
- */
59
- updateSequenceNumber?: number;
60
- /**
61
- * All requests must be signed with either a Connect JWT token or OAuth token for
62
- * an on-premise integration that corresponds to an app installed in Jira.
63
- *
64
- * If the Connect JWT token corresponds to an app that does not define
65
- * `jiraDeploymentInfoProvider` module it will be rejected with a 403.
66
- *
67
- * See https://developer.atlassian.com/blog/2015/01/understanding-jwt/ for more
68
- * details about Connect JWT tokens.
69
- * See
70
- * https://developer.atlassian.com/cloud/jira/software/integrate-jsw-cloud-with-onpremises-tools/
71
- * for details about on-premise integrations.
72
- */
73
- authorization: string;
74
- }): Promise<void> {
75
- return this.getClientInstance()
76
- .request({
77
- path: "/rest/deployments/0.1/pipelines/{pipelineId}/environments/{environmentId}/deployments/{deploymentSequenceNumber}",
78
- method: "DELETE",
79
- pathParams: {
80
- pipelineId,
81
- environmentId,
82
- deploymentSequenceNumber,
83
- },
84
- query: {
85
- _updateSequenceNumber: updateSequenceNumber,
86
- },
87
- headers: {
88
- Authorization: authorization,
89
- },
90
- })
91
- .then(commonHttpClient.discardResult);
92
- }
93
- /**
94
- * Bulk delete all deployments that match the given request.
95
- *
96
- * One or more query params must be supplied to specify the Properties to delete
97
- * by. Optional param `_updateSequenceNumber` is no longer supported.
98
- * If more than one Property is provided, data will be deleted that matches ALL of
99
- * the Properties (i.e. treated as AND).
100
- * See the documentation for the `submitDeployments` operation for more details.
101
- *
102
- * Example operation: DELETE
103
- * /bulkByProperties?accountId=account-123&createdBy=user-456
104
- *
105
- * Deletion is performed asynchronously. The `getDeploymentByKey` operation can be
106
- * used to confirm that data has been deleted successfully (if needed).
107
- *
108
- * Only Connect apps that define the `jiraDeploymentInfoProvider` module, and
109
- * on-premise integrations, can access this resource.
110
- * This resource requires the 'DELETE' scope for Connect apps.
111
- *
112
- * @path {DELETE} /rest/deployments/0.1/bulkByProperties
113
- */
114
- deleteDeploymentsByProperty({
115
- updateSequenceNumber,
116
- authorization,
117
- }: {
118
- /**
119
- * This parameter usage is no longer supported.
120
- *
121
- * An optional `updateSequenceNumber` to use to control deletion.
122
- *
123
- * Only stored data with an `updateSequenceNumber` less than or equal to that
124
- * provided will be deleted.
125
- * This can be used help ensure submit/delete requests are applied correctly if
126
- * issued close together.
127
- *
128
- * If not provided, all stored data that matches the request will be deleted.
129
- *
130
- * @deprecated
131
- */
132
- updateSequenceNumber?: number;
133
- /**
134
- * All requests must be signed with either a Connect JWT token or OAuth token for
135
- * an on-premise integration that corresponds to an app installed in Jira.
136
- *
137
- * If the Connect JWT token corresponds to an app that does not define
138
- * `jiraDeploymentInfoProvider` module it will be rejected with a 403.
139
- *
140
- * See https://developer.atlassian.com/blog/2015/01/understanding-jwt/ for more
141
- * details about Connect JWT tokens.
142
- * See
143
- * https://developer.atlassian.com/cloud/jira/software/integrate-jsw-cloud-with-onpremises-tools/
144
- * for details about on-premise integrations.
145
- */
146
- authorization: string;
147
- }): Promise<void> {
148
- return this.getClientInstance()
149
- .request({
150
- path: "/rest/deployments/0.1/bulkByProperties",
151
- method: "DELETE",
152
- query: {
153
- _updateSequenceNumber: updateSequenceNumber,
154
- },
155
- headers: {
156
- Authorization: authorization,
157
- },
158
- })
159
- .then(commonHttpClient.discardResult);
160
- }
161
- /**
162
- * Retrieve the currently stored deployment data for the given `pipelineId`,
163
- * `environmentId` and `deploymentSequenceNumber` combination.
164
- *
165
- * The result will be what is currently stored, ignoring any pending updates or
166
- * deletes.
167
- *
168
- * Only Connect apps that define the `jiraDeploymentInfoProvider` module, and
169
- * on-premise integrations, can access this resource.
170
- * This resource requires the 'READ' scope for Connect apps.
171
- *
172
- * @returns The deployment data currently stored for the given ID.
173
- * @path {GET}
174
- * /rest/deployments/0.1/pipelines/{pipelineId}/environments/{environmentId}/deployments/{deploymentSequenceNumber}
175
- */
176
- getDeploymentByKey({
177
- pipelineId,
178
- environmentId,
179
- deploymentSequenceNumber,
180
- authorization,
181
- }: {
182
- /** The ID of the deployment's pipeline. */
183
- pipelineId: string;
184
- /** The ID of the deployment's environment. */
185
- environmentId: string;
186
- /** The deployment's deploymentSequenceNumber. */
187
- deploymentSequenceNumber: number;
188
- /**
189
- * All requests must be signed with either a Connect JWT token or OAuth token for
190
- * an on-premise integration that corresponds to an app installed in Jira.
191
- *
192
- * If the Connect JWT token corresponds to an app that does not define
193
- * `jiraDeploymentInfoProvider` module it will be rejected with a 403.
194
- *
195
- * See https://developer.atlassian.com/blog/2015/01/understanding-jwt/ for more
196
- * details about Connect JWT tokens.
197
- * See
198
- * https://developer.atlassian.com/cloud/jira/software/integrate-jsw-cloud-with-onpremises-tools/
199
- * for details about on-premise integrations.
200
- */
201
- authorization: string;
202
- }): Promise<unknown> {
203
- return this.getClientInstance()
204
- .request({
205
- path: "/rest/deployments/0.1/pipelines/{pipelineId}/environments/{environmentId}/deployments/{deploymentSequenceNumber}",
206
- method: "GET",
207
- pathParams: {
208
- pipelineId,
209
- environmentId,
210
- deploymentSequenceNumber,
211
- },
212
- headers: {
213
- Authorization: authorization,
214
- },
215
- })
216
- .then(
217
- this.getClientInstance().responseHandler({
218
- 200: {
219
- "application/json": "json",
220
- },
221
- }),
222
- )
223
- .then(
224
- commonHttpClient.castResponse<{
225
- status: 200;
226
- mediaType: "application/json";
227
- body: unknown;
228
- }>(),
229
- )
230
- .then(
231
- validationSchemaStorage.validator(
232
- "DeploymentsService.getDeploymentByKey.response",
233
- ),
234
- )
235
- .then(commonHttpClient.getBody);
236
- }
237
- /**
238
- * Retrieve the Deployment gating status for the given `pipelineId +
239
- * environmentId + deploymentSequenceNumber` combination.
240
- * Only apps that define the `jiraDeploymentInfoProvider` module can access this
241
- * resource. This resource requires the 'READ' scope.
242
- *
243
- * @returns The current gating status for the given Deployment
244
- * @path {GET}
245
- * /rest/deployments/0.1/pipelines/{pipelineId}/environments/{environmentId}/deployments/{deploymentSequenceNumber}/gating-status
246
- */
247
- getDeploymentGatingStatusByKey({
248
- pipelineId,
249
- environmentId,
250
- deploymentSequenceNumber,
251
- }: {
252
- /** The ID of the Deployment's pipeline. */
253
- pipelineId: string;
254
- /** The ID of the Deployment's environment. */
255
- environmentId: string;
256
- /** The Deployment's deploymentSequenceNumber. */
257
- deploymentSequenceNumber: number;
258
- }): Promise<unknown> {
259
- return this.getClientInstance()
260
- .request({
261
- path: "/rest/deployments/0.1/pipelines/{pipelineId}/environments/{environmentId}/deployments/{deploymentSequenceNumber}/gating-status",
262
- method: "GET",
263
- pathParams: {
264
- pipelineId,
265
- environmentId,
266
- deploymentSequenceNumber,
267
- },
268
- })
269
- .then(
270
- this.getClientInstance().responseHandler({
271
- 200: {
272
- "application/json": "json",
273
- },
274
- }),
275
- )
276
- .then(
277
- commonHttpClient.castResponse<{
278
- status: 200;
279
- mediaType: "application/json";
280
- body: unknown;
281
- }>(),
282
- )
283
- .then(
284
- validationSchemaStorage.validator(
285
- "DeploymentsService.getDeploymentGatingStatusByKey.response",
286
- ),
287
- )
288
- .then(commonHttpClient.getBody);
289
- }
290
- /**
291
- * Update / insert deployment data.
292
- *
293
- * Deployments are identified by the combination of `pipelineId`, `environmentId`
294
- * and `deploymentSequenceNumber`, and existing deployment data for the same
295
- * deployment will be replaced if it exists and the `updateSequenceNumber` of
296
- * existing data is less than the incoming data.
297
- *
298
- * Submissions are processed asynchronously. Submitted data will eventually be
299
- * available in Jira. Most updates are available within a short period of time,
300
- * but may take some time during peak load and/or maintenance times. The
301
- * `getDeploymentByKey` operation can be used to confirm that data has been stored
302
- * successfully (if needed).
303
- *
304
- * In the case of multiple deployments being submitted in one request, each is
305
- * validated individually prior to submission. Details of which deployments failed
306
- * submission (if any) are available in the response object.
307
- *
308
- * Only Connect apps that define the `jiraDeploymentInfoProvider` module, and
309
- * on-premise integrations, can access this resource.
310
- * This resource requires the 'WRITE' scope for Connect apps.
311
- *
312
- * @returns Submission accepted. Each submitted deployment that is of a valid format will
313
- * eventually be available in Jira.
314
- *
315
- * Details of which deployments were submitted and which failed submission (due to
316
- * data format problems etc.) are available in the response object.
317
- * @path {POST} /rest/deployments/0.1/bulk
318
- */
319
- submitDeployments({
320
- authorization,
321
- requestBody,
322
- }: {
323
- /**
324
- * All requests must be signed with either a Connect JWT token or OAuth token for
325
- * an on-premise integration that corresponds to an app installed in Jira.
326
- *
327
- * If the Connect JWT token corresponds to an app that does not define
328
- * `jiraDeploymentInfoProvider` module it will be rejected with a 403.
329
- *
330
- * See https://developer.atlassian.com/blog/2015/01/understanding-jwt/ for more
331
- * details about Connect JWT tokens.
332
- * See
333
- * https://developer.atlassian.com/cloud/jira/software/integrate-jsw-cloud-with-onpremises-tools/
334
- * for details about on-premise integrations.
335
- */
336
- authorization: string;
337
- /** Deployment data to submit. */
338
- requestBody: unknown;
339
- }): Promise<unknown> {
340
- return this.getClientInstance()
341
- .request({
342
- path: "/rest/deployments/0.1/bulk",
343
- method: "POST",
344
- headers: {
345
- Authorization: authorization,
346
- "Content-Type": "application/json",
347
- },
348
- body: requestBody,
349
- })
350
- .then(
351
- this.getClientInstance().responseHandler({
352
- 202: {
353
- "application/json": "json",
354
- },
355
- }),
356
- )
357
- .then(
358
- commonHttpClient.castResponse<{
359
- status: 202;
360
- mediaType: "application/json";
361
- body: unknown;
362
- }>(),
363
- )
364
- .then(
365
- validationSchemaStorage.validator(
366
- "DeploymentsService.submitDeployments.response",
367
- ),
368
- )
369
- .then(commonHttpClient.getBody);
370
- }
371
- static initialize() {
372
- validationSchemaStorage.registerExtensible(
373
- "DeploymentsService.submitDeployments.response",
374
- z
375
- .object({
376
- status: z.literal(202),
377
- mediaType: z.literal("application/json"),
378
- body: z.unknown(),
379
- })
380
- .describe("DeploymentsService.submitDeployments.response"),
381
- );
382
- validationSchemaStorage.registerExtensible(
383
- "DeploymentsService.getDeploymentByKey.response",
384
- z
385
- .object({
386
- status: z.literal(200),
387
- mediaType: z.literal("application/json"),
388
- body: z.unknown(),
389
- })
390
- .describe("DeploymentsService.getDeploymentByKey.response"),
391
- );
392
- validationSchemaStorage.registerExtensible(
393
- "DeploymentsService.getDeploymentGatingStatusByKey.response",
394
- z
395
- .object({
396
- status: z.literal(200),
397
- mediaType: z.literal("application/json"),
398
- body: z.unknown(),
399
- })
400
- .describe("DeploymentsService.getDeploymentGatingStatusByKey.response"),
401
- );
402
- }
403
- }