@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,653 +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 Remote Links data with Jira Software. These APIs
11
- * are available to Atlassian Connect
12
- * apps. To use these APIs you must have the Remote Link 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 Remote Link module allows third-party providers to add a generic link
19
- * through a public REST API and associate it with Jira issues or services.
20
- *
21
- * Supplied remote link information will be presented in the right sidebar of the
22
- * new Jira issue view under Releases.
23
- *
24
- * This module also provides actions, which allows users to perform an action on
25
- * the remote link.
26
- *
27
- * Note that the module key and name are not private and should therefore not
28
- * contain any sensitive or personally identifiable information.
29
- *
30
- * ## Example Module
31
- *
32
- * An example can also be found at
33
- * [jira-data-provider-sample-addon](https://bitbucket.org/atlassianlabs/jira-data-provider-sample-addon/src/master/),
34
- * which has an `atlassian-connect.json`.
35
- *
36
- * ```
37
- * {
38
- * "modules": {
39
- * "jiraRemoteLinkInfoProvider": {
40
- * "homeUrl": "https://my-remotelink-provider.com",
41
- * "logoUrl": "https://my-remotelink-provider.com/images/logo.svg",
42
- * "documentationUrl":
43
- * "https://my-remotelink-provider.com/docs/jira-integration",
44
- * "actions": [
45
- * {
46
- * "actionId": "action-1",
47
- * "actionLabel": {
48
- * "value": {
49
- * "value": "Acknowledge"
50
- * }
51
- * },
52
- * "templateUrl": "https://my-remotelink-provider.com/ack/{ack-id}"
53
- * }
54
- * ],
55
- * "name": {
56
- * "value": "My Remote Link Provider"
57
- * },
58
- * "key": "remotelink-integration"
59
- * }
60
- * }
61
- * }
62
- * ```
63
- *
64
- * ### Properties
65
- *
66
- * | Property | type | Description
67
- *
68
- * | Required |
69
- * |------------------|---------------|-------------------------------------------------------------------------------------------------------------------------------------------------|----------|
70
- * | key | string | A key to identify this module. Must match
71
- * `^[a-zA-Z0-9-]+$` pattern, with a max length of 100
72
- * | Yes |
73
- * | name | object (i18N) | A human readable name. This object
74
- * supports
75
- * [internationalization](https://developer.atlassian.com/cloud/jira/software/internationalization/).
76
- * | Yes |
77
- * | homeUrl | string | URL to the provider’s homepage
78
- *
79
- * | Yes |
80
- * | logoUrl | string | Optional URL to the provider’s logo, which
81
- * will be displayed in the UI
82
- * | |
83
- * | documentationUrl | string | Optional URL to documentation about the
84
- * provider’s Jira integration
85
- * | |
86
- * | actions | object | Optional actions that can be performed by
87
- * Jira users on the remote link
88
- *
89
- * ### Actions object
90
- *
91
- * | Property | type | Description
92
- *
93
- * | Required |
94
- * |-------------|--------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|
95
- * | actionId | string | A key to identify a specific action. Used for
96
- * associating a specific Remote link to an action of this ID. <br> The actionId
97
- * of an action must be unique across all actions.
98
- * | Yes |
99
- * | actionLabel | object | The actionLabel of an Action is shown visibly to the
100
- * User alongside the Remote Link.
101
- *
102
- * | Yes |
103
- * | templateUrl | string | The templateUrl of an Action is a template where
104
- * strings can be substituted into the URL for a specific Remote Link. <br>
105
- * Strings used in the templateUrl must be passed in via an attribute map when
106
- * associating an action with a remote link. | Yes |
107
- *
108
- * ### ActionLabel Object
109
- *
110
- * | Property | type | Description
111
- *
112
- * | Required |
113
- * |----------|---------------|-----------------------------------------------------------------------------------------------------------------------------------------------------|----------|
114
- * | value | object (i18n) | The label shown on the UI. This object supports
115
- * [internationalization](https://developer.atlassian.com/cloud/jira/software/internationalization/).
116
- * | Yes |
117
- */
118
- export class RemoteLinksService extends CommonHttpService {
119
- /**
120
- * Delete the Remote Link data currently stored for the given ID.
121
- *
122
- * Deletion is performed asynchronously. The `getRemoteLinkById` operation can be
123
- * used to confirm that data has been
124
- * deleted successfully (if needed).
125
- *
126
- * Only Connect apps that define the `jiraRemoteLinkInfoProvider` module, and
127
- * on-premise integrations, can access this resource.
128
- * This resource requires the 'DELETE' scope for Connect apps.
129
- *
130
- * @path {DELETE} /rest/remotelinks/1.0/remotelink/{remoteLinkId}
131
- */
132
- deleteRemoteLinkById({
133
- remoteLinkId,
134
- updateSequenceNumber,
135
- authorization,
136
- }: {
137
- /** The ID of the Remote Link to fetch. */
138
- remoteLinkId: string;
139
- /**
140
- * This parameter usage is no longer supported.
141
- *
142
- * An optional `_updateSequenceNumber` to use to control deletion.
143
- *
144
- * Only stored data with an `updateSequenceNumber` less than or equal to that
145
- * provided will be deleted.
146
- * This can be used help ensure submit/delete requests are applied correctly if
147
- * issued close together.
148
- *
149
- * @deprecated
150
- */
151
- updateSequenceNumber?: number;
152
- /**
153
- * All requests must be signed with either a Connect JWT token or OAuth token for
154
- * an on-premise integration that
155
- * corresponds to an app installed in Jira.
156
- *
157
- * If the Connect JWT token corresponds to an app that does not define
158
- * `jiraRemoteLinkInfoProvider` module it will be rejected with a 403.
159
- *
160
- * See https://developer.atlassian.com/blog/2015/01/understanding-jwt/ for more
161
- * details about Connect JWT tokens.
162
- * See
163
- * https://developer.atlassian.com/cloud/jira/software/integrate-jsw-cloud-with-onpremises-tools/
164
- * for details about on-premise integrations.
165
- */
166
- authorization: string;
167
- }): Promise<void> {
168
- return this.getClientInstance()
169
- .request({
170
- path: "/rest/remotelinks/1.0/remotelink/{remoteLinkId}",
171
- method: "DELETE",
172
- pathParams: {
173
- remoteLinkId,
174
- },
175
- query: {
176
- _updateSequenceNumber: updateSequenceNumber,
177
- },
178
- headers: {
179
- Authorization: authorization,
180
- },
181
- })
182
- .then(commonHttpClient.discardResult);
183
- }
184
- /**
185
- * Bulk delete all Remote Links data that match the given request.
186
- *
187
- * One or more query params must be supplied to specify Properties to delete by.
188
- * Optional param `_updateSequenceNumber` is no longer supported. If more than one
189
- * Property is provided,
190
- * data will be deleted that matches ALL of the Properties (e.g. treated as an
191
- * AND).
192
- *
193
- * See the documentation for the `submitRemoteLinks` operation for more details.
194
- *
195
- * e.g. DELETE /bulkByProperties?accountId=account-123&repoId=repo-345
196
- *
197
- * Deletion is performed asynchronously. The `getRemoteLinkById` operation can be
198
- * used to confirm that data has been
199
- * deleted successfully (if needed).
200
- *
201
- * Only Connect apps that define the `jiraRemoteLinkInfoProvider` module, and
202
- * on-premise integrations, can access this resource.
203
- * This resource requires the 'DELETE' scope for Connect apps.
204
- *
205
- * @path {DELETE} /rest/remotelinks/1.0/bulkByProperties
206
- */
207
- deleteRemoteLinksByProperty({
208
- updateSequenceNumber,
209
- params,
210
- authorization,
211
- }: {
212
- /**
213
- * This parameter usage is no longer supported.
214
- *
215
- * An optional `_updateSequenceNumber` to use to control deletion.
216
- *
217
- * Only stored data with an `updateSequenceNumber` less than or equal to that
218
- * provided will be deleted.
219
- * This can be used help ensure submit/delete requests are applied correctly if
220
- * issued close together.
221
- *
222
- * If not provided, all stored data that matches the request will be deleted.
223
- *
224
- * @deprecated
225
- */
226
- updateSequenceNumber?: number;
227
- /**
228
- * Free-form query parameters to specify which properties to delete by. Properties
229
- * refer to the arbitrary
230
- * information the provider tagged Remote Links with previously.
231
- *
232
- * For example, if the provider previously tagged a remote link with accountId:
233
- * "properties": {
234
- * "accountId": "account-123"
235
- * }
236
- *
237
- * And now they want to delete Remote Links in bulk by that specific accountId as
238
- * follows:
239
- * e.g. DELETE /bulkByProperties?accountId=account-123
240
- */
241
- params?: {
242
- [key: string]: unknown;
243
- };
244
- /**
245
- * All requests must be signed with either a Connect JWT token or OAuth token for
246
- * an on-premise integration that
247
- * corresponds to an app installed in Jira.
248
- *
249
- * If the Connect JWT token corresponds to an app that does not define
250
- * `jiraRemoteLinkInfoProvider` module it will be rejected with a 403.
251
- *
252
- * See https://developer.atlassian.com/blog/2015/01/understanding-jwt/ for more
253
- * details about Connect JWT tokens.
254
- * See
255
- * https://developer.atlassian.com/cloud/jira/software/integrate-jsw-cloud-with-onpremises-tools/
256
- * for details about on-premise integrations.
257
- */
258
- authorization: string;
259
- }): Promise<void> {
260
- return this.getClientInstance()
261
- .request({
262
- path: "/rest/remotelinks/1.0/bulkByProperties",
263
- method: "DELETE",
264
- query: {
265
- _updateSequenceNumber: updateSequenceNumber,
266
- params,
267
- },
268
- headers: {
269
- Authorization: authorization,
270
- },
271
- })
272
- .then(commonHttpClient.discardResult);
273
- }
274
- /**
275
- * Retrieve the currently stored Remote Link data for the given ID.
276
- *
277
- * The result will be what is currently stored, ignoring any pending updates or
278
- * deletes.
279
- *
280
- * Only Connect apps that define the `jiraRemoteLinkInfoProvider` module, and
281
- * on-premise integrations, can access this resource.
282
- * This resource requires the 'READ' scope for Connect apps.
283
- *
284
- * @returns The Remote Link data currently stored for the given ID.
285
- * @path {GET} /rest/remotelinks/1.0/remotelink/{remoteLinkId}
286
- */
287
- getRemoteLinkById({
288
- remoteLinkId,
289
- authorization,
290
- }: {
291
- /** The ID of the Remote Link to fetch. */
292
- remoteLinkId: string;
293
- /**
294
- * All requests must be signed with either a Connect JWT token or OAuth token for
295
- * an on-premise integration that
296
- * corresponds to an app installed in Jira.
297
- *
298
- * If the Connect JWT token corresponds to an app that does not define
299
- * `jiraRemoteLinkInfoProvider` module it will be rejected with a 403.
300
- *
301
- * See https://developer.atlassian.com/blog/2015/01/understanding-jwt/ for more
302
- * details about Connect JWT tokens.
303
- * See
304
- * https://developer.atlassian.com/cloud/jira/software/integrate-jsw-cloud-with-onpremises-tools/
305
- * for details about on-premise integrations.
306
- */
307
- authorization: string;
308
- }): Promise<unknown> {
309
- return this.getClientInstance()
310
- .request({
311
- path: "/rest/remotelinks/1.0/remotelink/{remoteLinkId}",
312
- method: "GET",
313
- pathParams: {
314
- remoteLinkId,
315
- },
316
- headers: {
317
- Authorization: authorization,
318
- },
319
- })
320
- .then(
321
- this.getClientInstance().responseHandler({
322
- 200: {
323
- "application/json": "json",
324
- },
325
- }),
326
- )
327
- .then(
328
- commonHttpClient.castResponse<{
329
- status: 200;
330
- mediaType: "application/json";
331
- body: unknown;
332
- }>(),
333
- )
334
- .then(
335
- validationSchemaStorage.validator(
336
- "RemoteLinksService.getRemoteLinkById.response",
337
- ),
338
- )
339
- .then(commonHttpClient.getBody);
340
- }
341
- /**
342
- * Update / insert Remote Link data.
343
- *
344
- * Remote Links are identified by their ID, existing Remote Link data for the same
345
- * ID will be replaced if it
346
- * exists and the updateSequenceId of existing data is less than the incoming data.
347
- *
348
- * Submissions are performed asynchronously. Submitted data will eventually be
349
- * available in Jira; most updates are
350
- * available within a short period of time, but may take some time during peak
351
- * load and/or maintenance times.
352
- * The `getRemoteLinkById` operation can be used to confirm that data has been
353
- * stored successfully (if needed).
354
- *
355
- * In the case of multiple Remote Links being submitted in one request, each is
356
- * validated individually prior to
357
- * submission. Details of which Remote LInk failed submission (if any) are
358
- * available in the response object.
359
- *
360
- * Only Connect apps that define the `jiraRemoteLinkInfoProvider` module can
361
- * access this resource. This resource
362
- * requires the 'WRITE' scope for Connect apps.
363
- *
364
- * @returns Submission accepted. Each submitted Remote Link that is of a valid format will
365
- * be eventually available in
366
- * Jira.
367
- *
368
- * Details of which Remote Links were submitted and which failed submission (due
369
- * to data format problems etc.)
370
- * are available in the response object.
371
- * @path {POST} /rest/remotelinks/1.0/bulk
372
- */
373
- submitRemoteLinks({
374
- authorization,
375
- requestBody,
376
- }: {
377
- /**
378
- * All requests must be signed with a Connect JWT token that corresponds to an app
379
- * installed in Jira.
380
- *
381
- * If the Connect JWT token corresponds to an app that does not define
382
- * `jiraRemoteLinkInfoProvider` module it will be rejected with a 403.
383
- *
384
- * See https://developer.atlassian.com/blog/2015/01/understanding-jwt/ for more
385
- * details about Connect JWT tokens.
386
- * See
387
- * https://developer.atlassian.com/cloud/jira/software/integrate-jsw-cloud-with-onpremises-tools/
388
- * for details about on-premise integrations.
389
- */
390
- authorization: string;
391
- /** Remote Links data to submit. */
392
- requestBody: {
393
- /**
394
- * Properties
395
- *
396
- * Properties assigned to Remote Link data that can then be used for delete /
397
- * query operations.
398
- *
399
- * Examples might be an account or user ID that can then be used to clean up data
400
- * if an account is removed from
401
- * the Provider system.
402
- *
403
- * Properties are supplied as key/value pairs, a maximum of 5 properties can be
404
- * supplied, and keys must not
405
- * contain ':' or start with '_'.
406
- *
407
- * @example {
408
- * "accountId": "account-234",
409
- * "projectId": "project-123"
410
- * }
411
- */
412
- properties?: {
413
- [key: string]: string;
414
- };
415
- /**
416
- * A list of Remote Links to submit to Jira.
417
- *
418
- * Each Remote Link may be associated with one or more Jira issue keys, and will
419
- * be associated with any properties
420
- * included in this request.
421
- */
422
- remoteLinks: unknown[];
423
- /**
424
- * ProviderMetadata
425
- *
426
- * Information about the provider. This is useful for auditing, logging,
427
- * debugging, and other internal uses. It is
428
- * not considered private information. Hence, it may not contain personally
429
- * identifiable information.
430
- */
431
- providerMetadata?: {
432
- /**
433
- * An optional name of the source of the Remote Links data.
434
- *
435
- * @example Opsgenie 6.10.2
436
- */
437
- product?: string;
438
- } & {
439
- [key: string]: unknown;
440
- };
441
- } & {
442
- [key: string]: unknown;
443
- };
444
- }): Promise<
445
- {
446
- /**
447
- * The IDs of Remote Links that have been accepted for submission.
448
- *
449
- * A Remote Link may be rejected if it was only associated with unknown issue
450
- * keys, unknown service IDs, or if
451
- * the submitted data for that Remote Link does not match the required schema.
452
- *
453
- * Note that a Remote Link that isn't updated due to it's `updateSequenceNumber`
454
- * being out of order is not
455
- * considered a failed submission.
456
- *
457
- * @example [
458
- * "111-222-333",
459
- * "444-555-666"
460
- * ]
461
- */
462
- acceptedRemoteLinks?: string[];
463
- /**
464
- * Details of Remote Links that have not been accepted for submission, usually due
465
- * to a problem with the request data.
466
- *
467
- * A Remote Link may be rejected if it was only associated with unknown issue
468
- * keys, unknown service IDs, or
469
- * if the submitted data for the Remote Link does not match the required schema.
470
- *
471
- * The object (if present) will be keyed by Remote Link ID and include any errors
472
- * associated with that
473
- * Remote Link that have prevented it being submitted.
474
- */
475
- rejectedRemoteLinks?: {
476
- [key: string]: ({
477
- /** A human-readable message describing the error. */
478
- message: string;
479
- /**
480
- * An optional trace ID that can be used by Jira developers to locate the source
481
- * of the error.
482
- */
483
- errorTraceId?: string;
484
- } & {
485
- [key: string]: unknown;
486
- })[];
487
- };
488
- /**
489
- * Issue keys or services IDs or keys that are not known on this Jira instance (if
490
- * any).
491
- */
492
- unknownAssociations?: (
493
- | ({
494
- /**
495
- * Defines the asssociation type.
496
- *
497
- * @example issueKeys
498
- */
499
- associationType: "issueKeys";
500
- /**
501
- * The Jira issue keys to associate the Remote Link information with.
502
- *
503
- * The number of values counted across all associationTypes (issueKeys,
504
- * issueIdOrKeys and serviceIdOrKeys) must not exceed a limit of 500.
505
- */
506
- values: string[];
507
- } & {
508
- [key: string]: unknown;
509
- })
510
- | ({
511
- /**
512
- * Defines the asssociation type.
513
- *
514
- * @example serviceIdOrKeys
515
- */
516
- associationType: "serviceIdOrKeys";
517
- /**
518
- * The service id or keys to associate the Remote Link information with.
519
- *
520
- * The number of values counted across all associationTypes (issueKeys,
521
- * issueIdOrKeys and serviceIdOrKeys) must not exceed a limit of 500.
522
- */
523
- values: string[];
524
- } & {
525
- [key: string]: unknown;
526
- })
527
- )[];
528
- } & {
529
- [key: string]: unknown;
530
- }
531
- > {
532
- return this.getClientInstance()
533
- .request({
534
- path: "/rest/remotelinks/1.0/bulk",
535
- method: "POST",
536
- headers: {
537
- Authorization: authorization,
538
- "Content-Type": "application/json",
539
- },
540
- body: requestBody,
541
- })
542
- .then(
543
- this.getClientInstance().responseHandler({
544
- 202: {
545
- "application/json": "json",
546
- },
547
- }),
548
- )
549
- .then(
550
- commonHttpClient.castResponse<{
551
- status: 202;
552
- mediaType: "application/json";
553
- body: {
554
- acceptedRemoteLinks?: string[];
555
- rejectedRemoteLinks?: {
556
- [key: string]: ({
557
- message: string;
558
- errorTraceId?: string;
559
- } & {
560
- [key: string]: unknown;
561
- })[];
562
- };
563
- unknownAssociations?: (
564
- | ({
565
- associationType: "issueKeys";
566
- values: string[];
567
- } & {
568
- [key: string]: unknown;
569
- })
570
- | ({
571
- associationType: "serviceIdOrKeys";
572
- values: string[];
573
- } & {
574
- [key: string]: unknown;
575
- })
576
- )[];
577
- } & {
578
- [key: string]: unknown;
579
- };
580
- }>(),
581
- )
582
- .then(
583
- validationSchemaStorage.validator(
584
- "RemoteLinksService.submitRemoteLinks.response",
585
- ),
586
- )
587
- .then(commonHttpClient.getBody);
588
- }
589
- static initialize() {
590
- validationSchemaStorage.registerExtensible(
591
- "RemoteLinksService.submitRemoteLinks.response",
592
- z
593
- .object({
594
- status: z.literal(202),
595
- mediaType: z.literal("application/json"),
596
- body: z
597
- .object({
598
- acceptedRemoteLinks: z.array(z.string()).optional(),
599
- rejectedRemoteLinks: z
600
- .object({})
601
- .catchall(
602
- z.array(
603
- z
604
- .object({
605
- message: z.string(),
606
- errorTraceId: z.string().optional(),
607
- })
608
- .catchall(z.unknown()),
609
- ),
610
- )
611
- .optional(),
612
- unknownAssociations: z
613
- .array(
614
- z.union([
615
- z
616
- .object({
617
- associationType: z.enum(["issueKeys"]),
618
- values: z
619
- .array(
620
- z
621
- .string()
622
- .regex(new RegExp("^\\w{1,255}-\\d{1,255}$")),
623
- )
624
- .min(1)
625
- .max(500),
626
- })
627
- .catchall(z.unknown()),
628
- z
629
- .object({
630
- associationType: z.enum(["serviceIdOrKeys"]),
631
- values: z.array(z.string().max(255)).min(1).max(500),
632
- })
633
- .catchall(z.unknown()),
634
- ]),
635
- )
636
- .optional(),
637
- })
638
- .catchall(z.unknown()),
639
- })
640
- .describe("RemoteLinksService.submitRemoteLinks.response"),
641
- );
642
- validationSchemaStorage.registerExtensible(
643
- "RemoteLinksService.getRemoteLinkById.response",
644
- z
645
- .object({
646
- status: z.literal(200),
647
- mediaType: z.literal("application/json"),
648
- body: z.unknown(),
649
- })
650
- .describe("RemoteLinksService.getRemoteLinkById.response"),
651
- );
652
- }
653
- }