@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,1209 +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 {
9
- type NotificationScheme,
10
- registerCommonValidationSchemas,
11
- } from "../models/common";
12
- import {
13
- type AddNotificationsDetails,
14
- type CreateNotificationSchemeDetails,
15
- type NotificationSchemeId,
16
- type PageBeanNotificationScheme,
17
- type PageBeanNotificationSchemeAndProjectMappingJsonBean,
18
- registerIssueNotificationSchemesValidationSchemas,
19
- type UpdateNotificationSchemeDetails,
20
- } from "../models/issue-notification-schemes";
21
- import { validationSchemaStorage } from "../validation-schema-storage";
22
- /**
23
- * This resource represents notification schemes, lists of events and the
24
- * recipients who will receive notifications for those events. Use it to get
25
- * details of a notification scheme and a list of notification schemes.
26
- *
27
- * ### About notification schemes ###
28
- *
29
- * A notification scheme is a list of events and recipients who will receive
30
- * notifications for those events. The list is contained within the
31
- * `notificationSchemeEvents` object and contains pairs of `events` and
32
- * `notifications`:
33
- *
34
- * * `event` Identifies the type of event. The events can be [Jira system
35
- * events](https://support.atlassian.com/jira-cloud-administration/docs/configure-notification-schemes/)
36
- * (see the *Events* section) or [custom
37
- * events](https://support.atlassian.com/jira-cloud-administration/docs/add-a-custom-event/).
38
- * * `notifications` Identifies the
39
- * [recipients](https://confluence.atlassian.com/x/8YdKLg#Creatinganotificationscheme-recipientsRecipients)
40
- * of notifications for each event. Recipients can be any of the following types:
41
- *
42
- * * `CurrentAssignee`
43
- * * `Reporter`
44
- * * `CurrentUser`
45
- * * `ProjectLead`
46
- * * `ComponentLead`
47
- * * `User` (the `parameter` is the user key)
48
- * * `Group` (the `parameter` is the group name)
49
- * * `ProjectRole` (the `parameter` is the project role ID)
50
- * * `EmailAddress` *(deprecated)*
51
- * * `AllWatchers`
52
- * * `UserCustomField` (the `parameter` is the ID of the custom field)
53
- * * `GroupCustomField`(the `parameter` is the ID of the custom field)
54
- */
55
- export class IssueNotificationSchemesService extends CommonHttpService {
56
- /**
57
- * Adds notifications to a notification scheme. You can add up to 1000
58
- * notifications per request.
59
- *
60
- * *Deprecated: The notification type `EmailAddress` is no longer supported in
61
- * Cloud. Refer to the
62
- * [changelog](https://developer.atlassian.com/cloud/jira/platform/changelog/#CHANGE-1031)
63
- * for more details.*
64
- *
65
- * **[Permissions](#permissions) required:** *Administer Jira* [global
66
- * permission](https://confluence.atlassian.com/x/x4dKLg).
67
- *
68
- * @returns Returned if the request is successful.
69
- * @path {PUT} /rest/api/3/notificationscheme/{id}/notification
70
- */
71
- addNotifications({
72
- id,
73
- addNotificationsDetails,
74
- }: {
75
- /** The ID of the notification scheme. */
76
- id: string;
77
- /**
78
- * @example {
79
- * "notificationSchemeEvents": [
80
- * {
81
- * "event": {
82
- * "id": "1"
83
- * },
84
- * "notifications": [
85
- * {
86
- * "notificationType": "Group",
87
- * "parameter": "jira-administrators"
88
- * }
89
- * ]
90
- * }
91
- * ]
92
- * }
93
- */
94
- addNotificationsDetails: AddNotificationsDetails;
95
- }): Promise<void> {
96
- return this.getClientInstance()
97
- .request({
98
- path: "/rest/api/3/notificationscheme/{id}/notification",
99
- method: "PUT",
100
- pathParams: {
101
- id,
102
- },
103
- headers: {
104
- "Content-Type": "application/json",
105
- },
106
- body: addNotificationsDetails,
107
- })
108
- .then(
109
- this.getClientInstance().responseHandler({
110
- 204: {
111
- "application/json": "json",
112
- },
113
- }),
114
- )
115
- .then(
116
- commonHttpClient.castResponse<{
117
- status: 204;
118
- mediaType: "application/json";
119
- body: void;
120
- }>(),
121
- )
122
- .then(
123
- validationSchemaStorage.validator(
124
- "IssueNotificationSchemesService.addNotifications.response",
125
- ),
126
- )
127
- .then(commonHttpClient.getBody);
128
- }
129
- /**
130
- * Creates a notification scheme with notifications. You can create up to 1000
131
- * notifications per request.
132
- *
133
- * **[Permissions](#permissions) required:** *Administer Jira* [global
134
- * permission](https://confluence.atlassian.com/x/x4dKLg).
135
- *
136
- * @returns Returned if the request is successful.
137
- *
138
- * example: {
139
- * "id": "10001"
140
- * }
141
- * @path {POST} /rest/api/3/notificationscheme
142
- */
143
- createNotificationScheme({
144
- createNotificationSchemeDetails,
145
- }: {
146
- /**
147
- * @example {
148
- * "description": "My new scheme description",
149
- * "name": "My new notification scheme",
150
- * "notificationSchemeEvents": [
151
- * {
152
- * "event": {
153
- * "id": "1"
154
- * },
155
- * "notifications": [
156
- * {
157
- * "notificationType": "Group",
158
- * "parameter": "jira-administrators"
159
- * }
160
- * ]
161
- * }
162
- * ]
163
- * }
164
- */
165
- createNotificationSchemeDetails: CreateNotificationSchemeDetails;
166
- }): Promise<NotificationSchemeId> {
167
- return this.getClientInstance()
168
- .request({
169
- path: "/rest/api/3/notificationscheme",
170
- method: "POST",
171
- headers: {
172
- "Content-Type": "application/json",
173
- },
174
- body: createNotificationSchemeDetails,
175
- })
176
- .then(
177
- this.getClientInstance().responseHandler({
178
- 201: {
179
- "application/json": "json",
180
- },
181
- }),
182
- )
183
- .then(
184
- commonHttpClient.castResponse<{
185
- status: 201;
186
- mediaType: "application/json";
187
- body: NotificationSchemeId;
188
- }>(),
189
- )
190
- .then(
191
- validationSchemaStorage.validator(
192
- "IssueNotificationSchemesService.createNotificationScheme.response",
193
- ),
194
- )
195
- .then(commonHttpClient.getBody);
196
- }
197
- /**
198
- * Deletes a notification scheme.
199
- *
200
- * **[Permissions](#permissions) required:** *Administer Jira* [global
201
- * permission](https://confluence.atlassian.com/x/x4dKLg).
202
- *
203
- * @returns Returned if the request is successful.
204
- * @path {DELETE} /rest/api/3/notificationscheme/{notificationSchemeId}
205
- */
206
- deleteNotificationScheme({
207
- notificationSchemeId,
208
- }: {
209
- /** The ID of the notification scheme. */
210
- notificationSchemeId: string;
211
- }): Promise<void> {
212
- return this.getClientInstance()
213
- .request({
214
- path: "/rest/api/3/notificationscheme/{notificationSchemeId}",
215
- method: "DELETE",
216
- pathParams: {
217
- notificationSchemeId,
218
- },
219
- })
220
- .then(
221
- this.getClientInstance().responseHandler({
222
- 204: {
223
- "application/json": "json",
224
- },
225
- }),
226
- )
227
- .then(
228
- commonHttpClient.castResponse<{
229
- status: 204;
230
- mediaType: "application/json";
231
- body: void;
232
- }>(),
233
- )
234
- .then(
235
- validationSchemaStorage.validator(
236
- "IssueNotificationSchemesService.deleteNotificationScheme.response",
237
- ),
238
- )
239
- .then(commonHttpClient.getBody);
240
- }
241
- /**
242
- * Returns a [notification scheme](https://confluence.atlassian.com/x/8YdKLg),
243
- * including the list of events and the recipients who will receive notifications
244
- * for those events.
245
- *
246
- * **[Permissions](#permissions) required:** Permission to access Jira, however,
247
- * the user must have permission to administer at least one project associated
248
- * with the notification scheme.
249
- *
250
- * @returns Returned if the request is successful.
251
- *
252
- * example: {
253
- * "description": "description",
254
- * "expand": "notificationSchemeEvents,user,group,projectRole,field,all",
255
- * "id": 10100,
256
- * "name": "notification scheme name",
257
- * "notificationSchemeEvents": [
258
- * {
259
- * "event": {
260
- * "description": "Event published when an issue is created",
261
- * "id": 1,
262
- * "name": "Issue created"
263
- * },
264
- * "notifications": [
265
- * {
266
- * "expand": "group",
267
- * "group": {
268
- * "groupId": "276f955c-63d7-42c8-9520-92d01dca0625",
269
- * "name": "jira-administrators",
270
- * "self":
271
- * "https://your-domain.atlassian.net/rest/api/3/group?groupId=276f955c-63d7-42c8-9520-92d01dca0625"
272
- * },
273
- * "id": 1,
274
- * "notificationType": "Group",
275
- * "parameter": "jira-administrators",
276
- * "recipient": "276f955c-63d7-42c8-9520-92d01dca0625"
277
- * },
278
- * {
279
- * "id": 2,
280
- * "notificationType": "CurrentAssignee"
281
- * },
282
- * {
283
- * "expand": "projectRole",
284
- * "id": 3,
285
- * "notificationType": "ProjectRole",
286
- * "parameter": "10360",
287
- * "projectRole": {
288
- * "self":
289
- * "https://your-domain.atlassian.net/rest/api/3/project/MKY/role/10360",
290
- * "name": "Developers",
291
- * "id": 10360,
292
- * "description": "A project role that represents developers in a
293
- * project",
294
- * "actors": [
295
- * {
296
- * "actorGroup": {
297
- * "name": "jira-developers",
298
- * "displayName": "jira-developers",
299
- * "groupId": "952d12c3-5b5b-4d04-bb32-44d383afc4b2"
300
- * },
301
- * "displayName": "jira-developers",
302
- * "id": 10240,
303
- * "name": "jira-developers",
304
- * "type": "atlassian-group-role-actor"
305
- * },
306
- * {
307
- * "actorUser": {
308
- * "accountId": "5b10a2844c20165700ede21g"
309
- * },
310
- * "displayName": "Mia Krystof",
311
- * "id": 10241,
312
- * "type": "atlassian-user-role-actor"
313
- * }
314
- * ],
315
- * "scope": {
316
- * "project": {
317
- * "id": "10000",
318
- * "key": "KEY",
319
- * "name": "Next Gen Project"
320
- * },
321
- * "type": "PROJECT"
322
- * }
323
- * },
324
- * "recipient": "10360"
325
- * },
326
- * {
327
- * "emailAddress": "rest-developer@atlassian.com",
328
- * "id": 4,
329
- * "notificationType": "EmailAddress",
330
- * "parameter": "rest-developer@atlassian.com",
331
- * "recipient": "rest-developer@atlassian.com"
332
- * },
333
- * {
334
- * "expand": "user",
335
- * "id": 5,
336
- * "notificationType": "User",
337
- * "parameter": "5b10a2844c20165700ede21g",
338
- * "recipient": "5b10a2844c20165700ede21g",
339
- * "user": {
340
- * "accountId": "5b10a2844c20165700ede21g",
341
- * "active": false,
342
- * "displayName": "Mia Krystof",
343
- * "self":
344
- * "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
345
- * }
346
- * },
347
- * {
348
- * "expand": "field",
349
- * "field": {
350
- * "clauseNames": [
351
- * "cf[10101]",
352
- * "New custom field"
353
- * ],
354
- * "custom": true,
355
- * "id": "customfield_10101",
356
- * "key": "customfield_10101",
357
- * "name": "New custom field",
358
- * "navigable": true,
359
- * "orderable": true,
360
- * "schema": {
361
- * "custom":
362
- * "com.atlassian.jira.plugin.system.customfieldtypes:project",
363
- * "customId": 10101,
364
- * "type": "project"
365
- * },
366
- * "searchable": true,
367
- * "untranslatedName": "New custom field"
368
- * },
369
- * "id": 6,
370
- * "notificationType": "GroupCustomField",
371
- * "parameter": "customfield_10101",
372
- * "recipient": "customfield_10101"
373
- * }
374
- * ]
375
- * },
376
- * {
377
- * "event": {
378
- * "description": "Custom event that is published together with an issue
379
- * created event",
380
- * "id": 20,
381
- * "name": "Custom event",
382
- * "templateEvent": {
383
- * "description": "Event published when an issue is created",
384
- * "id": 1,
385
- * "name": "Issue created"
386
- * }
387
- * },
388
- * "notifications": [
389
- * {
390
- * "expand": "group",
391
- * "group": {
392
- * "groupId": "276f955c-63d7-42c8-9520-92d01dca0625",
393
- * "name": "jira-administrators",
394
- * "self":
395
- * "https://your-domain.atlassian.net/rest/api/3/group?groupId=276f955c-63d7-42c8-9520-92d01dca0625"
396
- * },
397
- * "id": 1,
398
- * "notificationType": "Group",
399
- * "parameter": "jira-administrators",
400
- * "recipient": "276f955c-63d7-42c8-9520-92d01dca0625"
401
- * },
402
- * {
403
- * "id": 2,
404
- * "notificationType": "CurrentAssignee"
405
- * },
406
- * {
407
- * "expand": "projectRole",
408
- * "id": 3,
409
- * "notificationType": "ProjectRole",
410
- * "parameter": "10360",
411
- * "projectRole": {
412
- * "self":
413
- * "https://your-domain.atlassian.net/rest/api/3/project/MKY/role/10360",
414
- * "name": "Developers",
415
- * "id": 10360,
416
- * "description": "A project role that represents developers in a
417
- * project",
418
- * "actors": [
419
- * {
420
- * "actorGroup": {
421
- * "name": "jira-developers",
422
- * "displayName": "jira-developers",
423
- * "groupId": "952d12c3-5b5b-4d04-bb32-44d383afc4b2"
424
- * },
425
- * "displayName": "jira-developers",
426
- * "id": 10240,
427
- * "name": "jira-developers",
428
- * "type": "atlassian-group-role-actor"
429
- * },
430
- * {
431
- * "actorUser": {
432
- * "accountId": "5b10a2844c20165700ede21g"
433
- * },
434
- * "displayName": "Mia Krystof",
435
- * "id": 10241,
436
- * "type": "atlassian-user-role-actor"
437
- * }
438
- * ],
439
- * "scope": {
440
- * "project": {
441
- * "id": "10000",
442
- * "key": "KEY",
443
- * "name": "Next Gen Project"
444
- * },
445
- * "type": "PROJECT"
446
- * }
447
- * },
448
- * "recipient": "10360"
449
- * },
450
- * {
451
- * "emailAddress": "rest-developer@atlassian.com",
452
- * "id": 4,
453
- * "notificationType": "EmailAddress",
454
- * "parameter": "rest-developer@atlassian.com",
455
- * "recipient": "rest-developer@atlassian.com"
456
- * },
457
- * {
458
- * "expand": "user",
459
- * "id": 5,
460
- * "notificationType": "User",
461
- * "parameter": "5b10a2844c20165700ede21g",
462
- * "recipient": "5b10a2844c20165700ede21g",
463
- * "user": {
464
- * "accountId": "5b10a2844c20165700ede21g",
465
- * "active": false,
466
- * "displayName": "Mia Krystof",
467
- * "self":
468
- * "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
469
- * }
470
- * },
471
- * {
472
- * "expand": "field",
473
- * "field": {
474
- * "clauseNames": [
475
- * "cf[10101]",
476
- * "New custom field"
477
- * ],
478
- * "custom": true,
479
- * "id": "customfield_10101",
480
- * "key": "customfield_10101",
481
- * "name": "New custom field",
482
- * "navigable": true,
483
- * "orderable": true,
484
- * "schema": {
485
- * "custom":
486
- * "com.atlassian.jira.plugin.system.customfieldtypes:project",
487
- * "customId": 10101,
488
- * "type": "project"
489
- * },
490
- * "searchable": true,
491
- * "untranslatedName": "New custom field"
492
- * },
493
- * "id": 6,
494
- * "notificationType": "GroupCustomField",
495
- * "parameter": "customfield_10101",
496
- * "recipient": "customfield_10101"
497
- * }
498
- * ]
499
- * }
500
- * ],
501
- * "projects": [
502
- * 10001,
503
- * 10002
504
- * ],
505
- * "self": "https://your-domain.atlassian.net/rest/api/3/notificationscheme"
506
- * }
507
- * @path {GET} /rest/api/3/notificationscheme/{id}
508
- * @scopes-current manage:jira-configuration
509
- * @scopes-beta read:field:jira, read:notification-scheme:jira, read:project:jira,
510
- * read:project-role:jira, read:user:jira, read:avatar:jira,
511
- * read:field-configuration:jira, read:group:jira, read:project-category:jira
512
- */
513
- getNotificationScheme({
514
- id,
515
- expand,
516
- }: {
517
- /**
518
- * The ID of the notification scheme. Use [Get notification schemes
519
- * paginated](#api-rest-api-3-notificationscheme-get) to get a list of
520
- * notification scheme IDs.
521
- */
522
- id: number;
523
- /**
524
- * Use [expand](#expansion) to include additional information in the response.
525
- * This parameter accepts a comma-separated list. Expand options include:
526
- *
527
- * * `all` Returns all expandable information
528
- * * `field` Returns information about any custom fields assigned to receive an
529
- * event
530
- * * `group` Returns information about any groups assigned to receive an event
531
- * * `notificationSchemeEvents` Returns a list of event associations. This list
532
- * is returned for all expandable information
533
- * * `projectRole` Returns information about any project roles assigned to
534
- * receive an event
535
- * * `user` Returns information about any users assigned to receive an event
536
- */
537
- expand?: string;
538
- }): Promise<NotificationScheme> {
539
- return this.getClientInstance()
540
- .request({
541
- path: "/rest/api/3/notificationscheme/{id}",
542
- method: "GET",
543
- pathParams: {
544
- id,
545
- },
546
- query: {
547
- expand,
548
- },
549
- })
550
- .then(
551
- this.getClientInstance().responseHandler({
552
- 200: {
553
- "application/json": "json",
554
- },
555
- }),
556
- )
557
- .then(
558
- commonHttpClient.castResponse<{
559
- status: 200;
560
- mediaType: "application/json";
561
- body: NotificationScheme;
562
- }>(),
563
- )
564
- .then(
565
- validationSchemaStorage.validator(
566
- "IssueNotificationSchemesService.getNotificationScheme.response",
567
- ),
568
- )
569
- .then(commonHttpClient.getBody);
570
- }
571
- /**
572
- * Returns a [paginated](#pagination) list of [notification
573
- * schemes](https://confluence.atlassian.com/x/8YdKLg) ordered by the display name.
574
- *
575
- * *Note that you should allow for events without recipients to appear in
576
- * responses.*
577
- *
578
- * **[Permissions](#permissions) required:** Permission to access Jira, however,
579
- * the user must have permission to administer at least one project associated
580
- * with a notification scheme for it to be returned.
581
- *
582
- * @returns Returned if the request is successful. Only returns notification schemes that
583
- * the user has permission to access. An empty list is returned if the user lacks
584
- * permission to access all notification schemes.
585
- *
586
- * example: {
587
- * "isLast": false,
588
- * "maxResults": 6,
589
- * "startAt": 1,
590
- * "total": 5,
591
- * "values": [
592
- * {
593
- * "description": "description",
594
- * "expand": "notificationSchemeEvents,user,group,projectRole,field,all",
595
- * "id": 10100,
596
- * "name": "notification scheme name",
597
- * "notificationSchemeEvents": [
598
- * {
599
- * "event": {
600
- * "description": "Event published when an issue is created",
601
- * "id": 1,
602
- * "name": "Issue created"
603
- * },
604
- * "notifications": [
605
- * {
606
- * "expand": "group",
607
- * "group": {
608
- * "groupId": "276f955c-63d7-42c8-9520-92d01dca0625",
609
- * "name": "jira-administrators",
610
- * "self":
611
- * "https://your-domain.atlassian.net/rest/api/3/group?groupId=276f955c-63d7-42c8-9520-92d01dca0625"
612
- * },
613
- * "id": 1,
614
- * "notificationType": "Group",
615
- * "parameter": "jira-administrators",
616
- * "recipient": "276f955c-63d7-42c8-9520-92d01dca0625"
617
- * },
618
- * {
619
- * "id": 2,
620
- * "notificationType": "CurrentAssignee"
621
- * },
622
- * {
623
- * "expand": "projectRole",
624
- * "id": 3,
625
- * "notificationType": "ProjectRole",
626
- * "parameter": "10360",
627
- * "projectRole": {
628
- * "self":
629
- * "https://your-domain.atlassian.net/rest/api/3/project/MKY/role/10360",
630
- * "name": "Developers",
631
- * "id": 10360,
632
- * "description": "A project role that represents developers in a
633
- * project",
634
- * "actors": [
635
- * {
636
- * "actorGroup": {
637
- * "name": "jira-developers",
638
- * "displayName": "jira-developers",
639
- * "groupId": "952d12c3-5b5b-4d04-bb32-44d383afc4b2"
640
- * },
641
- * "displayName": "jira-developers",
642
- * "id": 10240,
643
- * "name": "jira-developers",
644
- * "type": "atlassian-group-role-actor"
645
- * },
646
- * {
647
- * "actorUser": {
648
- * "accountId": "5b10a2844c20165700ede21g"
649
- * },
650
- * "displayName": "Mia Krystof",
651
- * "id": 10241,
652
- * "type": "atlassian-user-role-actor"
653
- * }
654
- * ],
655
- * "scope": {
656
- * "project": {
657
- * "id": "10000",
658
- * "key": "KEY",
659
- * "name": "Next Gen Project"
660
- * },
661
- * "type": "PROJECT"
662
- * }
663
- * },
664
- * "recipient": "10360"
665
- * },
666
- * {
667
- * "emailAddress": "rest-developer@atlassian.com",
668
- * "id": 4,
669
- * "notificationType": "EmailAddress",
670
- * "parameter": "rest-developer@atlassian.com",
671
- * "recipient": "rest-developer@atlassian.com"
672
- * },
673
- * {
674
- * "expand": "user",
675
- * "id": 5,
676
- * "notificationType": "User",
677
- * "parameter": "5b10a2844c20165700ede21g",
678
- * "recipient": "5b10a2844c20165700ede21g",
679
- * "user": {
680
- * "accountId": "5b10a2844c20165700ede21g",
681
- * "active": false,
682
- * "displayName": "Mia Krystof",
683
- * "self":
684
- * "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
685
- * }
686
- * },
687
- * {
688
- * "expand": "field",
689
- * "field": {
690
- * "clauseNames": [
691
- * "cf[10101]",
692
- * "New custom field"
693
- * ],
694
- * "custom": true,
695
- * "id": "customfield_10101",
696
- * "key": "customfield_10101",
697
- * "name": "New custom field",
698
- * "navigable": true,
699
- * "orderable": true,
700
- * "schema": {
701
- * "custom":
702
- * "com.atlassian.jira.plugin.system.customfieldtypes:project",
703
- * "customId": 10101,
704
- * "type": "project"
705
- * },
706
- * "searchable": true,
707
- * "untranslatedName": "New custom field"
708
- * },
709
- * "id": 6,
710
- * "notificationType": "GroupCustomField",
711
- * "parameter": "customfield_10101",
712
- * "recipient": "customfield_10101"
713
- * }
714
- * ]
715
- * },
716
- * {
717
- * "event": {
718
- * "description": "Custom event that is published together with an
719
- * issue created event",
720
- * "id": 20,
721
- * "name": "Custom event",
722
- * "templateEvent": {
723
- * "description": "Event published when an issue is created",
724
- * "id": 1,
725
- * "name": "Issue created"
726
- * }
727
- * },
728
- * "notifications": [
729
- * {
730
- * "expand": "group",
731
- * "group": {
732
- * "groupId": "276f955c-63d7-42c8-9520-92d01dca0625",
733
- * "name": "jira-administrators",
734
- * "self":
735
- * "https://your-domain.atlassian.net/rest/api/3/group?groupId=276f955c-63d7-42c8-9520-92d01dca0625"
736
- * },
737
- * "id": 1,
738
- * "notificationType": "Group",
739
- * "parameter": "jira-administrators",
740
- * "recipient": "276f955c-63d7-42c8-9520-92d01dca0625"
741
- * },
742
- * {
743
- * "id": 2,
744
- * "notificationType": "CurrentAssignee"
745
- * },
746
- * {
747
- * "expand": "projectRole",
748
- * "id": 3,
749
- * "notificationType": "ProjectRole",
750
- * "parameter": "10360",
751
- * "projectRole": {
752
- * "self":
753
- * "https://your-domain.atlassian.net/rest/api/3/project/MKY/role/10360",
754
- * "name": "Developers",
755
- * "id": 10360,
756
- * "description": "A project role that represents developers in a
757
- * project",
758
- * "actors": [
759
- * {
760
- * "actorGroup": {
761
- * "name": "jira-developers",
762
- * "displayName": "jira-developers",
763
- * "groupId": "952d12c3-5b5b-4d04-bb32-44d383afc4b2"
764
- * },
765
- * "displayName": "jira-developers",
766
- * "id": 10240,
767
- * "name": "jira-developers",
768
- * "type": "atlassian-group-role-actor"
769
- * },
770
- * {
771
- * "actorUser": {
772
- * "accountId": "5b10a2844c20165700ede21g"
773
- * },
774
- * "displayName": "Mia Krystof",
775
- * "id": 10241,
776
- * "type": "atlassian-user-role-actor"
777
- * }
778
- * ],
779
- * "scope": {
780
- * "project": {
781
- * "id": "10000",
782
- * "key": "KEY",
783
- * "name": "Next Gen Project"
784
- * },
785
- * "type": "PROJECT"
786
- * }
787
- * },
788
- * "recipient": "10360"
789
- * },
790
- * {
791
- * "emailAddress": "rest-developer@atlassian.com",
792
- * "id": 4,
793
- * "notificationType": "EmailAddress",
794
- * "parameter": "rest-developer@atlassian.com",
795
- * "recipient": "rest-developer@atlassian.com"
796
- * },
797
- * {
798
- * "expand": "user",
799
- * "id": 5,
800
- * "notificationType": "User",
801
- * "parameter": "5b10a2844c20165700ede21g",
802
- * "recipient": "5b10a2844c20165700ede21g",
803
- * "user": {
804
- * "accountId": "5b10a2844c20165700ede21g",
805
- * "active": false,
806
- * "displayName": "Mia Krystof",
807
- * "self":
808
- * "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
809
- * }
810
- * },
811
- * {
812
- * "expand": "field",
813
- * "field": {
814
- * "clauseNames": [
815
- * "cf[10101]",
816
- * "New custom field"
817
- * ],
818
- * "custom": true,
819
- * "id": "customfield_10101",
820
- * "key": "customfield_10101",
821
- * "name": "New custom field",
822
- * "navigable": true,
823
- * "orderable": true,
824
- * "schema": {
825
- * "custom":
826
- * "com.atlassian.jira.plugin.system.customfieldtypes:project",
827
- * "customId": 10101,
828
- * "type": "project"
829
- * },
830
- * "searchable": true,
831
- * "untranslatedName": "New custom field"
832
- * },
833
- * "id": 6,
834
- * "notificationType": "GroupCustomField",
835
- * "parameter": "customfield_10101",
836
- * "recipient": "customfield_10101"
837
- * }
838
- * ]
839
- * }
840
- * ],
841
- * "projects": [
842
- * 10001,
843
- * 10002
844
- * ],
845
- * "self": "https://your-domain.atlassian.net/rest/api/3/notificationscheme"
846
- * }
847
- * ]
848
- * }
849
- * @path {GET} /rest/api/3/notificationscheme
850
- * @scopes-current manage:jira-configuration
851
- * @scopes-beta read:field:jira, read:notification-scheme:jira, read:project:jira,
852
- * read:project-role:jira, read:user:jira, read:avatar:jira, read:group:jira,
853
- * read:project-category:jira, read:field-configuration:jira
854
- */
855
- getNotificationSchemes({
856
- startAt,
857
- maxResults,
858
- id,
859
- projectId,
860
- onlyDefault,
861
- expand,
862
- }: {
863
- /** The index of the first item to return in a page of results (page offset). */
864
- startAt?: string;
865
- /** The maximum number of items to return per page. */
866
- maxResults?: string;
867
- /** The list of notification schemes IDs to be filtered by */
868
- id?: string[];
869
- /** The list of projects IDs to be filtered by */
870
- projectId?: string[];
871
- /**
872
- * When set to true, returns only the default notification scheme. If you provide
873
- * project IDs not associated with the default, returns an empty page. The default
874
- * value is false.
875
- */
876
- onlyDefault?: boolean;
877
- /**
878
- * Use [expand](#expansion) to include additional information in the response.
879
- * This parameter accepts a comma-separated list. Expand options include:
880
- *
881
- * * `all` Returns all expandable information
882
- * * `field` Returns information about any custom fields assigned to receive an
883
- * event
884
- * * `group` Returns information about any groups assigned to receive an event
885
- * * `notificationSchemeEvents` Returns a list of event associations. This list
886
- * is returned for all expandable information
887
- * * `projectRole` Returns information about any project roles assigned to
888
- * receive an event
889
- * * `user` Returns information about any users assigned to receive an event
890
- */
891
- expand?: string;
892
- }): Promise<PageBeanNotificationScheme> {
893
- return this.getClientInstance()
894
- .request({
895
- path: "/rest/api/3/notificationscheme",
896
- method: "GET",
897
- query: {
898
- startAt,
899
- maxResults,
900
- id,
901
- projectId,
902
- onlyDefault,
903
- expand,
904
- },
905
- })
906
- .then(
907
- this.getClientInstance().responseHandler({
908
- 200: {
909
- "application/json": "json",
910
- },
911
- }),
912
- )
913
- .then(
914
- commonHttpClient.castResponse<{
915
- status: 200;
916
- mediaType: "application/json";
917
- body: PageBeanNotificationScheme;
918
- }>(),
919
- )
920
- .then(
921
- validationSchemaStorage.validator(
922
- "IssueNotificationSchemesService.getNotificationSchemes.response",
923
- ),
924
- )
925
- .then(commonHttpClient.getBody);
926
- }
927
- /**
928
- * Returns a [paginated](#pagination) mapping of project that have notification
929
- * scheme assigned. You can provide either one or multiple notification scheme IDs
930
- * or project IDs to filter by. If you don't provide any, this will return a list
931
- * of all mappings. Note that only company-managed (classic) projects are
932
- * supported. This is because team-managed projects don't have a concept of a
933
- * default notification scheme. The mappings are ordered by projectId.
934
- *
935
- * **[Permissions](#permissions) required:** Permission to access Jira.
936
- *
937
- * @returns Returned if the request is successful.
938
- *
939
- * example: {
940
- * "isLast": true,
941
- * "maxResults": 50,
942
- * "startAt": 0,
943
- * "total": 4,
944
- * "values": [
945
- * {
946
- * "notificationSchemeId": "10001",
947
- * "projectId": "100001"
948
- * }
949
- * ]
950
- * }
951
- * @path {GET} /rest/api/3/notificationscheme/project
952
- * @scopes-current manage:jira-configuration
953
- * @scopes-beta read:notification-scheme:jira, read:project:jira
954
- */
955
- getNotificationSchemeToProjectMappings({
956
- startAt,
957
- maxResults,
958
- notificationSchemeId,
959
- projectId,
960
- }: {
961
- /** The index of the first item to return in a page of results (page offset). */
962
- startAt?: string;
963
- /** The maximum number of items to return per page. */
964
- maxResults?: string;
965
- /** The list of notifications scheme IDs to be filtered out */
966
- notificationSchemeId?: string[];
967
- /** The list of project IDs to be filtered out */
968
- projectId?: string[];
969
- }): Promise<PageBeanNotificationSchemeAndProjectMappingJsonBean> {
970
- return this.getClientInstance()
971
- .request({
972
- path: "/rest/api/3/notificationscheme/project",
973
- method: "GET",
974
- query: {
975
- startAt,
976
- maxResults,
977
- notificationSchemeId,
978
- projectId,
979
- },
980
- })
981
- .then(
982
- this.getClientInstance().responseHandler({
983
- 200: {
984
- "application/json": "json",
985
- },
986
- }),
987
- )
988
- .then(
989
- commonHttpClient.castResponse<{
990
- status: 200;
991
- mediaType: "application/json";
992
- body: PageBeanNotificationSchemeAndProjectMappingJsonBean;
993
- }>(),
994
- )
995
- .then(
996
- validationSchemaStorage.validator(
997
- "IssueNotificationSchemesService.getNotificationSchemeToProjectMappings.response",
998
- ),
999
- )
1000
- .then(commonHttpClient.getBody);
1001
- }
1002
- /**
1003
- * Removes a notification from a notification scheme.
1004
- *
1005
- * **[Permissions](#permissions) required:** *Administer Jira* [global
1006
- * permission](https://confluence.atlassian.com/x/x4dKLg).
1007
- *
1008
- * @returns Returned if the request is successful.
1009
- * @path {DELETE}
1010
- * /rest/api/3/notificationscheme/{notificationSchemeId}/notification/{notificationId}
1011
- */
1012
- removeNotificationFromNotificationScheme({
1013
- notificationSchemeId,
1014
- notificationId,
1015
- }: {
1016
- /** The ID of the notification scheme. */
1017
- notificationSchemeId: string;
1018
- /** The ID of the notification. */
1019
- notificationId: string;
1020
- }): Promise<void> {
1021
- return this.getClientInstance()
1022
- .request({
1023
- path: "/rest/api/3/notificationscheme/{notificationSchemeId}/notification/{notificationId}",
1024
- method: "DELETE",
1025
- pathParams: {
1026
- notificationSchemeId,
1027
- notificationId,
1028
- },
1029
- })
1030
- .then(
1031
- this.getClientInstance().responseHandler({
1032
- 204: {
1033
- "application/json": "json",
1034
- },
1035
- }),
1036
- )
1037
- .then(
1038
- commonHttpClient.castResponse<{
1039
- status: 204;
1040
- mediaType: "application/json";
1041
- body: void;
1042
- }>(),
1043
- )
1044
- .then(
1045
- validationSchemaStorage.validator(
1046
- "IssueNotificationSchemesService.removeNotificationFromNotificationScheme.response",
1047
- ),
1048
- )
1049
- .then(commonHttpClient.getBody);
1050
- }
1051
- /**
1052
- * Updates a notification scheme.
1053
- *
1054
- * **[Permissions](#permissions) required:** *Administer Jira* [global
1055
- * permission](https://confluence.atlassian.com/x/x4dKLg).
1056
- *
1057
- * @returns Returned if the request is successful.
1058
- * @path {PUT} /rest/api/3/notificationscheme/{id}
1059
- */
1060
- updateNotificationScheme({
1061
- id,
1062
- updateNotificationSchemeDetails,
1063
- }: {
1064
- /** The ID of the notification scheme. */
1065
- id: string;
1066
- /**
1067
- * @example {
1068
- * "description": "My updated notification scheme description",
1069
- * "name": "My updated notification scheme"
1070
- * }
1071
- */
1072
- updateNotificationSchemeDetails: UpdateNotificationSchemeDetails;
1073
- }): Promise<void> {
1074
- return this.getClientInstance()
1075
- .request({
1076
- path: "/rest/api/3/notificationscheme/{id}",
1077
- method: "PUT",
1078
- pathParams: {
1079
- id,
1080
- },
1081
- headers: {
1082
- "Content-Type": "application/json",
1083
- },
1084
- body: updateNotificationSchemeDetails,
1085
- })
1086
- .then(
1087
- this.getClientInstance().responseHandler({
1088
- 204: {
1089
- "application/json": "json",
1090
- },
1091
- }),
1092
- )
1093
- .then(
1094
- commonHttpClient.castResponse<{
1095
- status: 204;
1096
- mediaType: "application/json";
1097
- body: void;
1098
- }>(),
1099
- )
1100
- .then(
1101
- validationSchemaStorage.validator(
1102
- "IssueNotificationSchemesService.updateNotificationScheme.response",
1103
- ),
1104
- )
1105
- .then(commonHttpClient.getBody);
1106
- }
1107
- static initialize() {
1108
- validationSchemaStorage.registerExtensible(
1109
- "IssueNotificationSchemesService.getNotificationSchemes.response",
1110
- z
1111
- .object({
1112
- status: z.literal(200),
1113
- mediaType: z.literal("application/json"),
1114
- body: validationSchemaStorage.lazy("PageBeanNotificationScheme"),
1115
- })
1116
- .describe(
1117
- "IssueNotificationSchemesService.getNotificationSchemes.response",
1118
- ),
1119
- );
1120
- validationSchemaStorage.registerExtensible(
1121
- "IssueNotificationSchemesService.createNotificationScheme.response",
1122
- z
1123
- .object({
1124
- status: z.literal(201),
1125
- mediaType: z.literal("application/json"),
1126
- body: validationSchemaStorage.lazy("NotificationSchemeId"),
1127
- })
1128
- .describe(
1129
- "IssueNotificationSchemesService.createNotificationScheme.response",
1130
- ),
1131
- );
1132
- validationSchemaStorage.registerExtensible(
1133
- "IssueNotificationSchemesService.getNotificationScheme.response",
1134
- z
1135
- .object({
1136
- status: z.literal(200),
1137
- mediaType: z.literal("application/json"),
1138
- body: validationSchemaStorage.lazy("NotificationScheme"),
1139
- })
1140
- .describe(
1141
- "IssueNotificationSchemesService.getNotificationScheme.response",
1142
- ),
1143
- );
1144
- validationSchemaStorage.registerExtensible(
1145
- "IssueNotificationSchemesService.updateNotificationScheme.response",
1146
- z
1147
- .object({
1148
- status: z.literal(204),
1149
- mediaType: z.literal("application/json"),
1150
- body: z.unknown(),
1151
- })
1152
- .describe(
1153
- "IssueNotificationSchemesService.updateNotificationScheme.response",
1154
- ),
1155
- );
1156
- validationSchemaStorage.registerExtensible(
1157
- "IssueNotificationSchemesService.addNotifications.response",
1158
- z
1159
- .object({
1160
- status: z.literal(204),
1161
- mediaType: z.literal("application/json"),
1162
- body: z.unknown(),
1163
- })
1164
- .describe("IssueNotificationSchemesService.addNotifications.response"),
1165
- );
1166
- validationSchemaStorage.registerExtensible(
1167
- "IssueNotificationSchemesService.deleteNotificationScheme.response",
1168
- z
1169
- .object({
1170
- status: z.literal(204),
1171
- mediaType: z.literal("application/json"),
1172
- body: z.unknown(),
1173
- })
1174
- .describe(
1175
- "IssueNotificationSchemesService.deleteNotificationScheme.response",
1176
- ),
1177
- );
1178
- validationSchemaStorage.registerExtensible(
1179
- "IssueNotificationSchemesService.removeNotificationFromNotificationScheme.response",
1180
- z
1181
- .object({
1182
- status: z.literal(204),
1183
- mediaType: z.literal("application/json"),
1184
- body: z.unknown(),
1185
- })
1186
- .describe(
1187
- "IssueNotificationSchemesService.removeNotificationFromNotificationScheme.response",
1188
- ),
1189
- );
1190
- validationSchemaStorage.registerExtensible(
1191
- "IssueNotificationSchemesService.getNotificationSchemeToProjectMappings.response",
1192
- z
1193
- .object({
1194
- status: z.literal(200),
1195
- mediaType: z.literal("application/json"),
1196
- body: validationSchemaStorage.lazy(
1197
- "PageBeanNotificationSchemeAndProjectMappingJsonBean",
1198
- ),
1199
- })
1200
- .describe(
1201
- "IssueNotificationSchemesService.getNotificationSchemeToProjectMappings.response",
1202
- ),
1203
- );
1204
- validationSchemaStorage.registerOnce([
1205
- registerIssueNotificationSchemesValidationSchemas,
1206
- registerCommonValidationSchemas,
1207
- ]);
1208
- }
1209
- }