@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,371 +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 Dev Ops Components affected by Incident data with
11
- * Jira Software. These APIs are available to Atlassian Connect
12
- * apps. To use these APIs you must have the DevOps Component module in your app's
13
- * descriptor. Read more about Jira Software modules
14
- * [here](https://developer.atlassian.com/cloud/jira/software/about-jira-modules/).
15
- *
16
- * # Module
17
- * The DevOps Component module allows third-party providers to add devops
18
- * components through a public REST API.
19
- *
20
- * Supplied devops components information will be used by the Connection Manager
21
- * tab in Jira to allow users to associate devops components with Jira projects.
22
- * All incident and PIR information related to that devops component will be
23
- * presented in the Incidents page in Jira Software, and as a link to any issues
24
- * created via the Incidents Page.
25
- *
26
- * This module also provides actions, two will be used by Jira to let the provider
27
- * know when the devops component has been associated or disassociated with a Jira
28
- * project, and two can be used by the Provider to associate a devops component
29
- * with a Jira Issue.
30
- *
31
- * Note that the module key and name are not private and therefore should not
32
- * contain any sensitive or personally identifiable information.
33
- *
34
- * ## Example Module
35
- *
36
- * An example can also be found at
37
- * [jira-data-provider-sample-addon](https://bitbucket.org/atlassianlabs/jira-data-provider-sample-addon/src/master/),
38
- * which has an `atlassian-connect.json`.
39
- *
40
- * ```
41
- * {
42
- * "modules": {
43
- * "jiraDevOpsComponentProvider": {
44
- * "homeUrl": "https://my-operations-provider.com",
45
- * "logoUrl": "https://my-operations-provider.com/images/logo.svg",
46
- * "documentationUrl":
47
- * "https://my-operations-provider.com/docs/jira-integration",
48
- * "actions": {
49
- * "associateEntity": {
50
- * "templateUrl": "/components/associate"
51
- * },
52
- * "disassociateEntity": {
53
- * "templateUrl": "/components/disassociate"
54
- * },
55
- * "onEntityAssociated": {
56
- * "templateUrl": "/components/associate"
57
- * },
58
- * "onEntityDisassociated": {
59
- * "templateUrl": "/components/disassociate"
60
- * }
61
- * },
62
- * "name": {
63
- * "value": "My DevOps Component Provider"
64
- * },
65
- * "key": "devops-component-integration"
66
- * }
67
- * }
68
- * }
69
- * ```
70
- *
71
- * ### Properties
72
- *
73
- * | Property | type | Description
74
- *
75
- * | Required |
76
- * |------------------|---------------|-------------------------------------------------------------------------------------------------------------------------------------------------|----------|
77
- * | key | string | A key to identify this module. Must match
78
- * `^[a-zA-Z0-9-]+$` pattern, with a max length of 100
79
- * | Yes |
80
- * | name | object (i18N) | A human readable name. This object
81
- * supports
82
- * [internationalization](https://developer.atlassian.com/cloud/jira/software/internationalization/).
83
- * | Yes |
84
- * | homeUrl | string | URL to the provider’s homepage
85
- *
86
- * | Yes |
87
- * | logoUrl | string | Optional URL to the provider’s logo, which
88
- * will be displayed in the UI
89
- * | |
90
- * | documentationUrl | string | Optional URL to documentation about the
91
- * provider’s Jira integration
92
- * | |
93
- * | actions | object | Actions the can be used by Jira to improve
94
- * the integrated experience
95
- * | Yes |
96
- *
97
- * ### Actions object
98
- *
99
- * | Property | type | Description
100
- *
101
- * | Required |
102
- * |------------------------|--------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|
103
- * | associateEntity | object | An action defined by the provider to allow Jira to
104
- * retrieve details about operations workspaces via a post endpoint.
105
- *
106
- * | Yes |
107
- * | disassociateEntity | object | An action defined by the provider to allow Jira
108
- * to search using details about operations workspaces via a get endpoint.
109
- *
110
- * | Yes |
111
- * | onEntityAssociated | object | An action defined by the provider to allow Jira
112
- * to create a new operations container via a post endpoint.
113
- *
114
- * | |
115
- * | onEntityDisassociated | object | An action defined by the provider to allow
116
- * Jira to create a new Post-Incident Review object via a post endpoint.
117
- *
118
- * | |
119
- */
120
- export class DevOpsComponentsService extends CommonHttpService {
121
- /**
122
- * Delete the Component data currently stored for the given ID.
123
- *
124
- * Deletion is performed asynchronously. The getComponentById operation can be
125
- * used to confirm that data has been deleted successfully (if needed).
126
- *
127
- * Only Connect apps that define the `jiraDevOpsComponentProvider` module can
128
- * access this resource.
129
- * This resource requires the 'DELETE' scope for Connect apps.
130
- *
131
- * @path {DELETE} /rest/devopscomponents/1.0/{componentId}
132
- */
133
- deleteComponentById({
134
- componentId,
135
- authorization,
136
- }: {
137
- /** The ID of the Component to delete. */
138
- componentId: string;
139
- /**
140
- * All requests must be signed with a Connect JWT token that corresponds to the
141
- * Provider app installed in Jira.
142
- *
143
- * If the JWT token corresponds to an app that does not define Operations
144
- * Information module it will be rejected with a 403.
145
- *
146
- * See https://developer.atlassian.com/blog/2015/01/understanding-jwt/ for more
147
- * details.
148
- */
149
- authorization: string;
150
- }): Promise<void> {
151
- return this.getClientInstance()
152
- .request({
153
- path: "/rest/devopscomponents/1.0/{componentId}",
154
- method: "DELETE",
155
- pathParams: {
156
- componentId,
157
- },
158
- headers: {
159
- Authorization: authorization,
160
- },
161
- })
162
- .then(commonHttpClient.discardResult);
163
- }
164
- /**
165
- * Bulk delete all Components that match the given request.
166
- *
167
- * One or more query params must be supplied to specify Properties to delete by.
168
- * If more than one Property is provided, data will be deleted that matches ALL of
169
- * the Properties (e.g. treated as an AND).
170
- * See the documentation for the submitComponents operation for more details.
171
- *
172
- * e.g. DELETE /bulkByProperties?accountId=account-123&createdBy=user-456
173
- *
174
- * Deletion is performed asynchronously. The getComponentById operation can be
175
- * used to confirm that data has been deleted successfully (if needed).
176
- *
177
- * Only Connect apps that define the `jiraDevOpsComponentProvider` module can
178
- * access this resource.
179
- * This resource requires the 'DELETE' scope for Connect apps.
180
- *
181
- * @path {DELETE} /rest/devopscomponents/1.0/bulkByProperties
182
- */
183
- deleteComponentsByProperty({
184
- authorization,
185
- }: {
186
- /**
187
- * All requests must be signed with a Connect JWT token that corresponds to the
188
- * Provider app installed in Jira.
189
- *
190
- * If the JWT token corresponds to an app that does not define the Operations
191
- * Information module it will be rejected with a 403.
192
- *
193
- * See https://developer.atlassian.com/blog/2015/01/understanding-jwt/ for more
194
- * details.
195
- */
196
- authorization: string;
197
- }): Promise<void> {
198
- return this.getClientInstance()
199
- .request({
200
- path: "/rest/devopscomponents/1.0/bulkByProperties",
201
- method: "DELETE",
202
- headers: {
203
- Authorization: authorization,
204
- },
205
- })
206
- .then(commonHttpClient.discardResult);
207
- }
208
- /**
209
- * Retrieve the currently stored Component data for the given ID.
210
- *
211
- * The result will be what is currently stored, ignoring any pending updates or
212
- * deletes.
213
- *
214
- * Only Connect apps that define the `jiraDevOpsComponentProvider` module can
215
- * access this resource.
216
- * This resource requires the 'READ' scope for Connect apps.
217
- *
218
- * @returns The Component data currently stored for the given ID.
219
- * @path {GET} /rest/devopscomponents/1.0/{componentId}
220
- */
221
- getComponentById({
222
- componentId,
223
- authorization,
224
- }: {
225
- /** The ID of the Component to fetch. */
226
- componentId: string;
227
- /**
228
- * All requests must be signed with a Connect JWT token that corresponds to the
229
- * Provider app installed in Jira.
230
- *
231
- * If the JWT token corresponds to an app that does not define Operations
232
- * Information module it will be rejected with a 403.
233
- *
234
- * See https://developer.atlassian.com/blog/2015/01/understanding-jwt/ for more
235
- * details.
236
- */
237
- authorization: string;
238
- }): Promise<unknown> {
239
- return this.getClientInstance()
240
- .request({
241
- path: "/rest/devopscomponents/1.0/{componentId}",
242
- method: "GET",
243
- pathParams: {
244
- componentId,
245
- },
246
- headers: {
247
- Authorization: authorization,
248
- },
249
- })
250
- .then(
251
- this.getClientInstance().responseHandler({
252
- 200: {
253
- "application/json": "json",
254
- },
255
- }),
256
- )
257
- .then(
258
- commonHttpClient.castResponse<{
259
- status: 200;
260
- mediaType: "application/json";
261
- body: unknown;
262
- }>(),
263
- )
264
- .then(
265
- validationSchemaStorage.validator(
266
- "DevOpsComponentsService.getComponentById.response",
267
- ),
268
- )
269
- .then(commonHttpClient.getBody);
270
- }
271
- /**
272
- * Update / insert DevOps Component data.
273
- *
274
- * Components are identified by their ID, and existing Component data for the same
275
- * ID will be replaced if it exists and the updateSequenceNumber of existing data
276
- * is less than the incoming data.
277
- *
278
- * Submissions are performed asynchronously. Submitted data will eventually be
279
- * available in Jira; most updates are available within a short period of time,
280
- * but may take some time during peak load and/or maintenance times. The
281
- * getComponentById operation can be used to confirm that data has been stored
282
- * successfully (if needed).
283
- *
284
- * In the case of multiple Components being submitted in one request, each is
285
- * validated individually prior to submission. Details of which Components failed
286
- * submission (if any) are available in the response object.
287
- *
288
- * A maximum of 1000 components can be submitted in one request.
289
- *
290
- * Only Connect apps that define the `jiraDevOpsComponentProvider` module can
291
- * access this resource.
292
- * This resource requires the 'WRITE' scope for Connect apps.
293
- *
294
- * @returns Submission accepted. Each submitted Component that is of a valid format will be
295
- * eventually available in Jira.
296
- * Details of which Components were submitted and which failed submission (due to
297
- * data format problems etc.) are available in the response object.
298
- * @path {POST} /rest/devopscomponents/1.0/bulk
299
- */
300
- submitComponents({
301
- authorization,
302
- requestBody,
303
- }: {
304
- /**
305
- * All requests must be signed with a Connect JWT token that corresponds to the
306
- * Provider app installed in Jira.
307
- *
308
- * If the JWT token corresponds to an app that does not define the DevOps
309
- * Information module it will be rejected with a 403.
310
- *
311
- * See https://developer.atlassian.com/blog/2015/01/understanding-jwt/ for more
312
- * details.
313
- */
314
- authorization: string;
315
- /** DevOps Component data to submit. */
316
- requestBody: unknown;
317
- }): Promise<unknown> {
318
- return this.getClientInstance()
319
- .request({
320
- path: "/rest/devopscomponents/1.0/bulk",
321
- method: "POST",
322
- headers: {
323
- Authorization: authorization,
324
- "Content-Type": "application/json",
325
- },
326
- body: requestBody,
327
- })
328
- .then(
329
- this.getClientInstance().responseHandler({
330
- 202: {
331
- "application/json": "json",
332
- },
333
- }),
334
- )
335
- .then(
336
- commonHttpClient.castResponse<{
337
- status: 202;
338
- mediaType: "application/json";
339
- body: unknown;
340
- }>(),
341
- )
342
- .then(
343
- validationSchemaStorage.validator(
344
- "DevOpsComponentsService.submitComponents.response",
345
- ),
346
- )
347
- .then(commonHttpClient.getBody);
348
- }
349
- static initialize() {
350
- validationSchemaStorage.registerExtensible(
351
- "DevOpsComponentsService.getComponentById.response",
352
- z
353
- .object({
354
- status: z.literal(200),
355
- mediaType: z.literal("application/json"),
356
- body: z.unknown(),
357
- })
358
- .describe("DevOpsComponentsService.getComponentById.response"),
359
- );
360
- validationSchemaStorage.registerExtensible(
361
- "DevOpsComponentsService.submitComponents.response",
362
- z
363
- .object({
364
- status: z.literal(202),
365
- mediaType: z.literal("application/json"),
366
- body: z.unknown(),
367
- })
368
- .describe("DevOpsComponentsService.submitComponents.response"),
369
- );
370
- }
371
- }