@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,741 +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 Incident and Post-Incident Review (PIR) data with
11
- * Jira Software. These APIs are available to Atlassian Connect
12
- * apps. To use these APIs you must have the Operations 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
- *
18
- * The Operations module allows third-party providers to add incident and PIR
19
- * information through a public REST API.
20
- *
21
- * Supplied incident information will be presented in the Incidents page in Jira
22
- * Software, and as a link to any issues created via the Incidents Page.
23
- *
24
- * This module also provides actions, one which allows Jira to provide a direct
25
- * link to the operations provider where the user can create a post-incident
26
- * review and two which allow Jira to search for relevant workspaces and devops
27
- * components.
28
- *
29
- * Note that the module key and name are not private and therefore should not
30
- * contain any sensitive or personally identifiable information.
31
- *
32
- * ## Example Module
33
- *
34
- * An example can also be found at
35
- * [jira-data-provider-sample-addon](https://bitbucket.org/atlassianlabs/jira-data-provider-sample-addon/src/master/),
36
- * which has an `atlassian-connect.json`.
37
- *
38
- * ```
39
- * {
40
- * "modules": {
41
- * "jiraOperationsInfoProvider": {
42
- * "homeUrl": "https://my-operations-provider.com",
43
- * "logoUrl": "https://my-operations-provider.com/images/logo.svg",
44
- * "documentationUrl":
45
- * "https://my-operations-provider.com/docs/jira-integration",
46
- * "actions": {
47
- * "fetchWorkspaces": {
48
- * "templateUrl": "/workspaces/list"
49
- * },
50
- * "searchContainers": {
51
- * "templateUrl": "/containers/search"
52
- * },
53
- * "createPostIncidentReview": {
54
- * "url":
55
- * "https://my-operations-provider.com/my-workspace/create-post-incident-review?affected-component={component-id}&incident={incident-id}
56
- * }
57
- * },
58
- * "name": {
59
- * "value": "My Operations Provider"
60
- * },
61
- * "key": "operations-integration"
62
- * }
63
- * }
64
- * }
65
- * ```
66
- *
67
- * ### Properties
68
- *
69
- * | Property | type | Description
70
- *
71
- * | Required |
72
- * |------------------|---------------|-------------------------------------------------------------------------------------------------------------------------------------------------|----------|
73
- * | key | string | A key to identify this module. Must match
74
- * `^[a-zA-Z0-9-]+$` pattern, with a max length of 100
75
- * | Yes |
76
- * | name | object (i18N) | A human readable name. This object
77
- * supports
78
- * [internationalization](https://developer.atlassian.com/cloud/jira/software/internationalization/).
79
- * | Yes |
80
- * | homeUrl | string | URL to the provider’s homepage
81
- *
82
- * | Yes |
83
- * | logoUrl | string | Optional URL to the provider’s logo, which
84
- * will be displayed in the UI
85
- * | |
86
- * | documentationUrl | string | Optional URL to documentation about the
87
- * provider’s Jira integration
88
- * | |
89
- * | actions | object | Actions the can be used by Jira to improve
90
- * the integrated experience
91
- * | Yes |
92
- *
93
- * ### Actions object
94
- *
95
- * | Property | type | Description
96
- *
97
- * | Required |
98
- * |------------------------|--------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|
99
- * | fetchWorkspaces | object | An action defined by the provider to allow Jira to
100
- * retrieve details about operations workspaces via a post endpoint.
101
- *
102
- * | Yes |
103
- * | searchContainers | object | An action defined by the provider to allow Jira
104
- * to search using details about devops components via a get endpoint.
105
- *
106
- * | Yes |
107
- * | createPostIncidentReview | object | An action defined by the provider to
108
- * allow Jira to create a new Post-Incident Review object via a post endpoint.
109
- *
110
- * | |
111
- */
112
- export class OperationsService extends CommonHttpService {
113
- /**
114
- * Bulk delete all Entties that match the given request.
115
- *
116
- * One or more query params must be supplied to specify Properties to delete by.
117
- * If more than one Property is provided, data will be deleted that matches ALL of
118
- * the Properties (e.g. treated as an AND).
119
- * See the documentation for the submitEntity operation for more details.
120
- *
121
- * e.g. DELETE /bulkByProperties?accountId=account-123&createdBy=user-456
122
- *
123
- * Deletion is performed asynchronously. The getIncidentById operation can be used
124
- * to confirm that data has been deleted successfully (if needed).
125
- *
126
- * Only Connect apps that define the `jiraOperationsInfoProvider` module can
127
- * access this resource.
128
- * This resource requires the 'DELETE' scope for Connect apps.
129
- *
130
- * @path {DELETE} /rest/operations/1.0/bulkByProperties
131
- */
132
- deleteEntityByProperty({
133
- authorization,
134
- }: {
135
- /**
136
- * All requests must be signed with a Connect JWT token that corresponds to the
137
- * Provider app installed in Jira.
138
- *
139
- * If the JWT token corresponds to an app that does not define Operations
140
- * Information module it will be rejected with a 403.
141
- *
142
- * See https://developer.atlassian.com/blog/2015/01/understanding-jwt/ for more
143
- * details.
144
- */
145
- authorization: string;
146
- }): Promise<void> {
147
- return this.getClientInstance()
148
- .request({
149
- path: "/rest/operations/1.0/bulkByProperties",
150
- method: "DELETE",
151
- headers: {
152
- Authorization: authorization,
153
- },
154
- })
155
- .then(commonHttpClient.discardResult);
156
- }
157
- /**
158
- * Delete the Incident data currently stored for the given ID.
159
- *
160
- * Deletion is performed asynchronously. The getIncidentById operation can be used
161
- * to confirm that data has been deleted successfully (if needed).
162
- *
163
- * Only Connect apps that define the `jiraOperationsInfoProvider` module can
164
- * access this resource.
165
- * This resource requires the 'DELETE' scope for Connect apps.
166
- *
167
- * @path {DELETE} /rest/operations/1.0/incidents/{incidentId}
168
- */
169
- deleteIncidentById({
170
- incidentId,
171
- authorization,
172
- }: {
173
- /** The ID of the Incident to delete. */
174
- incidentId: string;
175
- /**
176
- * All requests must be signed with a Connect JWT token that corresponds to the
177
- * Provider app installed in Jira.
178
- *
179
- * If the JWT token corresponds to an app that does not define Operations
180
- * Information module it will be rejected with a 403.
181
- *
182
- * See https://developer.atlassian.com/blog/2015/01/understanding-jwt/ for more
183
- * details.
184
- */
185
- authorization: string;
186
- }): Promise<void> {
187
- return this.getClientInstance()
188
- .request({
189
- path: "/rest/operations/1.0/incidents/{incidentId}",
190
- method: "DELETE",
191
- pathParams: {
192
- incidentId,
193
- },
194
- headers: {
195
- Authorization: authorization,
196
- },
197
- })
198
- .then(commonHttpClient.discardResult);
199
- }
200
- /**
201
- * Delete the Review data currently stored for the given ID.
202
- *
203
- * Deletion is performed asynchronously. The getReviewById operation can be used
204
- * to confirm that data has been deleted successfully (if needed).
205
- *
206
- * Only Connect apps that define the `jiraOperationsInfoProvider` module can
207
- * access this resource.
208
- * This resource requires the 'DELETE' scope for Connect apps.
209
- *
210
- * @path {DELETE} /rest/operations/1.0/post-incident-reviews/{reviewId}
211
- */
212
- deleteReviewById({
213
- reviewId,
214
- authorization,
215
- }: {
216
- /** The ID of the Review to delete. */
217
- reviewId: string;
218
- /**
219
- * All requests must be signed with a Connect JWT token that corresponds to the
220
- * Provider app installed in Jira.
221
- *
222
- * If the JWT token corresponds to an app that does not define Operations
223
- * Information module it will be rejected with a 403.
224
- *
225
- * See https://developer.atlassian.com/blog/2015/01/understanding-jwt/ for more
226
- * details.
227
- */
228
- authorization: string;
229
- }): Promise<void> {
230
- return this.getClientInstance()
231
- .request({
232
- path: "/rest/operations/1.0/post-incident-reviews/{reviewId}",
233
- method: "DELETE",
234
- pathParams: {
235
- reviewId,
236
- },
237
- headers: {
238
- Authorization: authorization,
239
- },
240
- })
241
- .then(commonHttpClient.discardResult);
242
- }
243
- /**
244
- * Bulk delete all Operations Workspaces that match the given request.
245
- *
246
- * Only Connect apps that define the `jiraOperationsInfoProvider` module can
247
- * access this resource.
248
- * This resource requires the 'DELETE' scope for Connect apps.
249
- *
250
- * e.g. DELETE /bulk?workspaceIds=111-222-333,444-555-666
251
- *
252
- * @path {DELETE} /rest/operations/1.0/linkedWorkspaces/bulk
253
- */
254
- deleteWorkspaces({
255
- authorization,
256
- }: {
257
- /**
258
- * All requests must be signed with a Connect JWT token that corresponds to the
259
- * Provider app installed in Jira.
260
- *
261
- * If the JWT token corresponds to an app that does not define the Operations
262
- * module it will be rejected with a 403.
263
- *
264
- * See https://developer.atlassian.com/blog/2015/01/understanding-jwt/ for more
265
- * details.
266
- */
267
- authorization: string;
268
- }): Promise<void> {
269
- return this.getClientInstance()
270
- .request({
271
- path: "/rest/operations/1.0/linkedWorkspaces/bulk",
272
- method: "DELETE",
273
- headers: {
274
- Authorization: authorization,
275
- },
276
- })
277
- .then(commonHttpClient.discardResult);
278
- }
279
- /**
280
- * Retrieve the currently stored Incident data for the given ID.
281
- *
282
- * The result will be what is currently stored, ignoring any pending updates or
283
- * deletes.
284
- *
285
- * Only Connect apps that define the `jiraOperationsInfoProvider` module can
286
- * access this resource.
287
- * This resource requires the 'READ' scope for Connect apps.
288
- *
289
- * @returns The Incident data currently stored for the given ID.
290
- * @path {GET} /rest/operations/1.0/incidents/{incidentId}
291
- */
292
- getIncidentById({
293
- incidentId,
294
- authorization,
295
- }: {
296
- /** The ID of the Incident to fetch. */
297
- incidentId: string;
298
- /**
299
- * All requests must be signed with a Connect JWT token that corresponds to the
300
- * Provider app installed in Jira.
301
- *
302
- * If the JWT token corresponds to an app that does not define Operations
303
- * Information module it will be rejected with a 403.
304
- *
305
- * See https://developer.atlassian.com/blog/2015/01/understanding-jwt/ for more
306
- * details.
307
- */
308
- authorization: string;
309
- }): Promise<unknown> {
310
- return this.getClientInstance()
311
- .request({
312
- path: "/rest/operations/1.0/incidents/{incidentId}",
313
- method: "GET",
314
- pathParams: {
315
- incidentId,
316
- },
317
- headers: {
318
- Authorization: authorization,
319
- },
320
- })
321
- .then(
322
- this.getClientInstance().responseHandler({
323
- 200: {
324
- "application/json": "json",
325
- },
326
- }),
327
- )
328
- .then(
329
- commonHttpClient.castResponse<{
330
- status: 200;
331
- mediaType: "application/json";
332
- body: unknown;
333
- }>(),
334
- )
335
- .then(
336
- validationSchemaStorage.validator(
337
- "OperationsService.getIncidentById.response",
338
- ),
339
- )
340
- .then(commonHttpClient.getBody);
341
- }
342
- /**
343
- * Retrieve the currently stored Review data for the given ID.
344
- *
345
- * The result will be what is currently stored, ignoring any pending updates or
346
- * deletes.
347
- *
348
- * Only Connect apps that define the `jiraOperationsInfoProvider` module can
349
- * access this resource.
350
- * This resource requires the 'READ' scope for Connect apps.
351
- *
352
- * @returns The Review data currently stored for the given ID.
353
- * @path {GET} /rest/operations/1.0/post-incident-reviews/{reviewId}
354
- */
355
- getReviewById({
356
- reviewId,
357
- authorization,
358
- }: {
359
- /** The ID of the Review to fetch. */
360
- reviewId: string;
361
- /**
362
- * All requests must be signed with a Connect JWT token that corresponds to the
363
- * Provider app installed in Jira.
364
- *
365
- * If the JWT token corresponds to an app that does not define Operations
366
- * Information module it will be rejected with a 403.
367
- *
368
- * See https://developer.atlassian.com/blog/2015/01/understanding-jwt/ for more
369
- * details.
370
- */
371
- authorization: string;
372
- }): Promise<unknown> {
373
- return this.getClientInstance()
374
- .request({
375
- path: "/rest/operations/1.0/post-incident-reviews/{reviewId}",
376
- method: "GET",
377
- pathParams: {
378
- reviewId,
379
- },
380
- headers: {
381
- Authorization: authorization,
382
- },
383
- })
384
- .then(
385
- this.getClientInstance().responseHandler({
386
- 200: {
387
- "application/json": "json",
388
- },
389
- }),
390
- )
391
- .then(
392
- commonHttpClient.castResponse<{
393
- status: 200;
394
- mediaType: "application/json";
395
- body: unknown;
396
- }>(),
397
- )
398
- .then(
399
- validationSchemaStorage.validator(
400
- "OperationsService.getReviewById.response",
401
- ),
402
- )
403
- .then(commonHttpClient.getBody);
404
- }
405
- /**
406
- * Retrieve the either all Operations Workspace IDs associated with the Jira site
407
- * or a specific Operations Workspace ID for the given ID.
408
- *
409
- * The result will be what is currently stored, ignoring any pending updates or
410
- * deletes.
411
- *
412
- * e.g. GET /workspace?workspaceId=111-222-333
413
- *
414
- * Only Connect apps that define the `jiraOperationsInfoProvider` module can
415
- * access this resource.
416
- * This resource requires the 'READ' scope for Connect apps.
417
- *
418
- * @returns Either the ID provided if stored or a list of available IDs.
419
- * @path {GET} /rest/operations/1.0/linkedWorkspaces
420
- */
421
- getWorkspaces({
422
- authorization,
423
- }: {
424
- /**
425
- * All requests must be signed with a Connect JWT token that corresponds to the
426
- * Provider app installed in Jira.
427
- *
428
- * If the JWT token corresponds to an app that does not define the Operations
429
- * Information module it will be rejected with a 403.
430
- *
431
- * See https://developer.atlassian.com/blog/2015/01/understanding-jwt/ for more
432
- * details.
433
- */
434
- authorization: string;
435
- }): Promise<unknown> {
436
- return this.getClientInstance()
437
- .request({
438
- path: "/rest/operations/1.0/linkedWorkspaces",
439
- method: "GET",
440
- headers: {
441
- Authorization: authorization,
442
- },
443
- })
444
- .then(
445
- this.getClientInstance().responseHandler({
446
- 200: {
447
- "application/json": "json",
448
- },
449
- }),
450
- )
451
- .then(
452
- commonHttpClient.castResponse<{
453
- status: 200;
454
- mediaType: "application/json";
455
- body: unknown;
456
- }>(),
457
- )
458
- .then(
459
- validationSchemaStorage.validator(
460
- "OperationsService.getWorkspaces.response",
461
- ),
462
- )
463
- .then(commonHttpClient.getBody);
464
- }
465
- /**
466
- * Update / insert Incident or Review data.
467
- *
468
- * Incidents and reviews are identified by their ID, and existing Incident and
469
- * Review data for the same ID will be replaced if it exists and the
470
- * updateSequenceNumber of existing data is less than the incoming data.
471
- *
472
- * Submissions are performed asynchronously. Submitted data will eventually be
473
- * available in Jira; most updates are available within a short period of time,
474
- * but may take some time during peak load and/or maintenance times. The
475
- * getIncidentById or getReviewById operation can be used to confirm that data has
476
- * been stored successfully (if needed).
477
- *
478
- * In the case of multiple Incidents and Reviews being submitted in one request,
479
- * each is validated individually prior to submission. Details of which entities
480
- * failed submission (if any) are available in the response object.
481
- *
482
- * A maximum of 1000 incidents can be submitted in one request.
483
- *
484
- * Only Connect apps that define the `jiraOperationsInfoProvider` module can
485
- * access this resource.
486
- * This resource requires the 'WRITE' scope for Connect apps.
487
- *
488
- * @returns Submission accepted. Each submitted Incident that is of a valid format will be
489
- * eventually available in Jira.
490
- *
491
- * Details of which Incidents were submitted and which failed submission (due to
492
- * data format problems etc.) are available in the response object.
493
- * @path {POST} /rest/operations/1.0/bulk
494
- */
495
- submitEntity({
496
- authorization,
497
- requestBody,
498
- }: {
499
- /**
500
- * All requests must be signed with a Connect JWT token that corresponds to the
501
- * Provider app installed in Jira.
502
- *
503
- * If the JWT token corresponds to an app that does not define the Operations
504
- * Information module it will be rejected with a 403.
505
- *
506
- * See https://developer.atlassian.com/blog/2015/01/understanding-jwt/ for more
507
- * details.
508
- */
509
- authorization: string;
510
- /** Incident data to submit. */
511
- requestBody:
512
- | ({
513
- /**
514
- * Properties
515
- *
516
- * Properties assigned to incidents/components/review data that can then be used
517
- * for delete / query operations.
518
- *
519
- * Examples might be an account or user ID that can then be used to clean up data
520
- * if an account is removed from the Provider system.
521
- *
522
- * Properties are supplied as key/value pairs, and a maximum of 5 properties can
523
- * be supplied, keys cannot contain ':' or start with '_'.
524
- *
525
- * @example {
526
- * "accountId": "account-234",
527
- * "projectId": "project-123"
528
- * }
529
- */
530
- properties?: {
531
- [key: string]: string;
532
- };
533
- /**
534
- * ProviderMetadata
535
- *
536
- * Information about the provider. This is useful for auditing, logging, debugging,
537
- * and other internal uses. It is not considered private information. Hence, it
538
- * may not contain personally
539
- * identifiable information.
540
- */
541
- providerMetadata?: {
542
- /**
543
- * An optional name of the source of the incidents.
544
- *
545
- * @example Atlassian Operations Platform 2.1.0
546
- */
547
- product?: string;
548
- };
549
- incidents?: unknown[];
550
- } & {
551
- [key: string]: unknown;
552
- })
553
- | ({
554
- /**
555
- * Properties
556
- *
557
- * Properties assigned to incidents/components/review data that can then be used
558
- * for delete / query operations.
559
- *
560
- * Examples might be an account or user ID that can then be used to clean up data
561
- * if an account is removed from the Provider system.
562
- *
563
- * Properties are supplied as key/value pairs, and a maximum of 5 properties can
564
- * be supplied, keys cannot contain ':' or start with '_'.
565
- *
566
- * @example {
567
- * "accountId": "account-234",
568
- * "projectId": "project-123"
569
- * }
570
- */
571
- properties?: {
572
- [key: string]: string;
573
- };
574
- /**
575
- * ProviderMetadata
576
- *
577
- * Information about the provider. This is useful for auditing, logging, debugging,
578
- * and other internal uses. It is not considered private information. Hence, it
579
- * may not contain personally
580
- * identifiable information.
581
- */
582
- providerMetadata?: {
583
- /**
584
- * An optional name of the source of the incidents.
585
- *
586
- * @example Atlassian Operations Platform 2.1.0
587
- */
588
- product?: string;
589
- };
590
- reviews?: unknown[];
591
- } & {
592
- [key: string]: unknown;
593
- });
594
- }): Promise<unknown> {
595
- return this.getClientInstance()
596
- .request({
597
- path: "/rest/operations/1.0/bulk",
598
- method: "POST",
599
- headers: {
600
- Authorization: authorization,
601
- "Content-Type": "application/json",
602
- },
603
- body: requestBody,
604
- })
605
- .then(
606
- this.getClientInstance().responseHandler({
607
- 202: {
608
- "application/json": "json",
609
- },
610
- }),
611
- )
612
- .then(
613
- commonHttpClient.castResponse<{
614
- status: 202;
615
- mediaType: "application/json";
616
- body: unknown;
617
- }>(),
618
- )
619
- .then(
620
- validationSchemaStorage.validator(
621
- "OperationsService.submitEntity.response",
622
- ),
623
- )
624
- .then(commonHttpClient.getBody);
625
- }
626
- /**
627
- * Insert Operations Workspace IDs to establish a relationship between them and
628
- * the Jira site the app is installed in. If a relationship between the Workspace
629
- * ID and Jira already exists then the workspace ID will be ignored and Jira will
630
- * process the rest of the entries.
631
- *
632
- * Only Connect apps that define the `jiraOperationsInfoProvider` module can
633
- * access this resource.
634
- * This resource requires the 'WRITE' scope for Connect apps.
635
- *
636
- * @returns Submission accepted. Each submitted Operations Workspace ID will be linked to
637
- * Jira.
638
- * @path {POST} /rest/operations/1.0/linkedWorkspaces/bulk
639
- */
640
- submitOperationsWorkspaces({
641
- authorization,
642
- requestBody,
643
- }: {
644
- /**
645
- * All requests must be signed with a Connect JWT token that corresponds to the
646
- * Provider app installed in Jira.
647
- *
648
- * If the JWT token corresponds to an app that does not define the Operations
649
- * module it will be rejected with a 403.
650
- *
651
- * See https://developer.atlassian.com/blog/2015/01/understanding-jwt/ for more
652
- * details.
653
- */
654
- authorization: string;
655
- /** Operations Workspace ids to submit. */
656
- requestBody: unknown;
657
- }): Promise<unknown> {
658
- return this.getClientInstance()
659
- .request({
660
- path: "/rest/operations/1.0/linkedWorkspaces/bulk",
661
- method: "POST",
662
- headers: {
663
- Authorization: authorization,
664
- "Content-Type": "application/json",
665
- },
666
- body: requestBody,
667
- })
668
- .then(
669
- this.getClientInstance().responseHandler({
670
- 202: {
671
- "application/json": "json",
672
- },
673
- }),
674
- )
675
- .then(
676
- commonHttpClient.castResponse<{
677
- status: 202;
678
- mediaType: "application/json";
679
- body: unknown;
680
- }>(),
681
- )
682
- .then(
683
- validationSchemaStorage.validator(
684
- "OperationsService.submitOperationsWorkspaces.response",
685
- ),
686
- )
687
- .then(commonHttpClient.getBody);
688
- }
689
- static initialize() {
690
- validationSchemaStorage.registerExtensible(
691
- "OperationsService.submitEntity.response",
692
- z
693
- .object({
694
- status: z.literal(202),
695
- mediaType: z.literal("application/json"),
696
- body: z.unknown(),
697
- })
698
- .describe("OperationsService.submitEntity.response"),
699
- );
700
- validationSchemaStorage.registerExtensible(
701
- "OperationsService.getIncidentById.response",
702
- z
703
- .object({
704
- status: z.literal(200),
705
- mediaType: z.literal("application/json"),
706
- body: z.unknown(),
707
- })
708
- .describe("OperationsService.getIncidentById.response"),
709
- );
710
- validationSchemaStorage.registerExtensible(
711
- "OperationsService.getWorkspaces.response",
712
- z
713
- .object({
714
- status: z.literal(200),
715
- mediaType: z.literal("application/json"),
716
- body: z.unknown(),
717
- })
718
- .describe("OperationsService.getWorkspaces.response"),
719
- );
720
- validationSchemaStorage.registerExtensible(
721
- "OperationsService.submitOperationsWorkspaces.response",
722
- z
723
- .object({
724
- status: z.literal(202),
725
- mediaType: z.literal("application/json"),
726
- body: z.unknown(),
727
- })
728
- .describe("OperationsService.submitOperationsWorkspaces.response"),
729
- );
730
- validationSchemaStorage.registerExtensible(
731
- "OperationsService.getReviewById.response",
732
- z
733
- .object({
734
- status: z.literal(200),
735
- mediaType: z.literal("application/json"),
736
- body: z.unknown(),
737
- })
738
- .describe("OperationsService.getReviewById.response"),
739
- );
740
- }
741
- }