@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,575 +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 Priority,
10
- registerCommonValidationSchemas,
11
- } from "../models/common";
12
- import {
13
- type CreatePriorityDetails,
14
- type PageBeanPriority,
15
- type PriorityId,
16
- registerIssuePrioritiesValidationSchemas,
17
- type ReorderIssuePriorities,
18
- type SetDefaultPriorityRequest,
19
- type UpdatePriorityDetails,
20
- } from "../models/issue-priorities";
21
- import { validationSchemaStorage } from "../validation-schema-storage";
22
- /**
23
- * This resource represents issue priorities. Use it to get, create and update
24
- * issue priorities and details for individual issue priorities.
25
- */
26
- export class IssuePrioritiesService extends CommonHttpService {
27
- /**
28
- * Creates an issue priority.
29
- *
30
- * **[Permissions](#permissions) required:** *Administer Jira* [global
31
- * permission](https://confluence.atlassian.com/x/x4dKLg).
32
- *
33
- * @returns Returned if the request is successful.
34
- *
35
- * example: {
36
- * "id": "10001"
37
- * }
38
- * @path {POST} /rest/api/3/priority
39
- */
40
- createPriority({
41
- createPriorityDetails,
42
- }: {
43
- /**
44
- * @example {
45
- * "description": "My priority description",
46
- * "iconUrl": "images/icons/priorities/major.png",
47
- * "name": "My new priority",
48
- * "statusColor": "#ABCDEF"
49
- * }
50
- */
51
- createPriorityDetails: CreatePriorityDetails;
52
- }): Promise<PriorityId> {
53
- return this.getClientInstance()
54
- .request({
55
- path: "/rest/api/3/priority",
56
- method: "POST",
57
- headers: {
58
- "Content-Type": "application/json",
59
- },
60
- body: createPriorityDetails,
61
- })
62
- .then(
63
- this.getClientInstance().responseHandler({
64
- 201: {
65
- "application/json": "json",
66
- },
67
- }),
68
- )
69
- .then(
70
- commonHttpClient.castResponse<{
71
- status: 201;
72
- mediaType: "application/json";
73
- body: PriorityId;
74
- }>(),
75
- )
76
- .then(
77
- validationSchemaStorage.validator(
78
- "IssuePrioritiesService.createPriority.response",
79
- ),
80
- )
81
- .then(commonHttpClient.getBody);
82
- }
83
- /**
84
- * Deletes an issue priority.
85
- *
86
- * This operation is [asynchronous](#async). Follow the `location` link in the
87
- * response to determine the status of the task and use [Get
88
- * task](#api-rest-api-3-task-taskId-get) to obtain subsequent updates.
89
- *
90
- * **[Permissions](#permissions) required:** *Administer Jira* [global
91
- * permission](https://confluence.atlassian.com/x/x4dKLg).
92
- *
93
- * @path {DELETE} /rest/api/3/priority/{id}
94
- */
95
- deletePriority({
96
- id,
97
- }: {
98
- /** The ID of the issue priority. */
99
- id: string;
100
- }): Promise<void> {
101
- return this.getClientInstance()
102
- .request({
103
- path: "/rest/api/3/priority/{id}",
104
- method: "DELETE",
105
- pathParams: {
106
- id,
107
- },
108
- })
109
- .then(commonHttpClient.discardResult);
110
- }
111
- /**
112
- * Returns the list of all issue priorities.
113
- *
114
- * **[Permissions](#permissions) required:** Permission to access Jira.
115
- *
116
- * @deprecated
117
- * @returns Returned if the request is successful.
118
- *
119
- * example: [
120
- * {
121
- * "description": "Major loss of function.",
122
- * "iconUrl":
123
- * "https://your-domain.atlassian.net/images/icons/priorities/major.png",
124
- * "id": "1",
125
- * "name": "Major",
126
- * "self": "https://your-domain.atlassian.net/rest/api/3/priority/3",
127
- * "statusColor": "#009900"
128
- * },
129
- * {
130
- * "description": "Very little impact.",
131
- * "iconUrl":
132
- * "https://your-domain.atlassian.net/images/icons/priorities/trivial.png",
133
- * "id": "2",
134
- * "name": "Trivial",
135
- * "self": "https://your-domain.atlassian.net/rest/api/3/priority/5",
136
- * "statusColor": "#cfcfcf"
137
- * }
138
- * ]
139
- * @path {GET} /rest/api/3/priority
140
- * @scopes-current read:jira-work
141
- * @scopes-beta read:priority:jira
142
- */
143
- getPriorities(): Promise<Priority[]> {
144
- return this.getClientInstance()
145
- .request({
146
- path: "/rest/api/3/priority",
147
- method: "GET",
148
- })
149
- .then(
150
- this.getClientInstance().responseHandler({
151
- 200: {
152
- "application/json": "json",
153
- },
154
- }),
155
- )
156
- .then(
157
- commonHttpClient.castResponse<{
158
- status: 200;
159
- mediaType: "application/json";
160
- body: Priority[];
161
- }>(),
162
- )
163
- .then(
164
- validationSchemaStorage.validator(
165
- "IssuePrioritiesService.getPriorities.response",
166
- ),
167
- )
168
- .then(commonHttpClient.getBody);
169
- }
170
- /**
171
- * Returns an issue priority.
172
- *
173
- * **[Permissions](#permissions) required:** Permission to access Jira.
174
- *
175
- * @returns Returned if the request is successful.
176
- *
177
- * example: {
178
- * "description": "Major loss of function.",
179
- * "iconUrl":
180
- * "https://your-domain.atlassian.net/images/icons/priorities/major.png",
181
- * "id": "1",
182
- * "name": "Major",
183
- * "self": "https://your-domain.atlassian.net/rest/api/3/priority/3",
184
- * "statusColor": "#009900"
185
- * }
186
- * @path {GET} /rest/api/3/priority/{id}
187
- * @scopes-current read:jira-work
188
- * @scopes-beta read:priority:jira
189
- */
190
- getPriority({
191
- id,
192
- }: {
193
- /** The ID of the issue priority. */
194
- id: string;
195
- }): Promise<Priority> {
196
- return this.getClientInstance()
197
- .request({
198
- path: "/rest/api/3/priority/{id}",
199
- method: "GET",
200
- pathParams: {
201
- id,
202
- },
203
- })
204
- .then(
205
- this.getClientInstance().responseHandler({
206
- 200: {
207
- "application/json": "json",
208
- },
209
- }),
210
- )
211
- .then(
212
- commonHttpClient.castResponse<{
213
- status: 200;
214
- mediaType: "application/json";
215
- body: Priority;
216
- }>(),
217
- )
218
- .then(
219
- validationSchemaStorage.validator(
220
- "IssuePrioritiesService.getPriority.response",
221
- ),
222
- )
223
- .then(commonHttpClient.getBody);
224
- }
225
- /**
226
- * Changes the order of issue priorities.
227
- *
228
- * **[Permissions](#permissions) required:** *Administer Jira* [global
229
- * permission](https://confluence.atlassian.com/x/x4dKLg).
230
- *
231
- * @returns Returned if the request is successful.
232
- * @path {PUT} /rest/api/3/priority/move
233
- */
234
- movePriorities({
235
- reorderIssuePriorities,
236
- }: {
237
- /**
238
- * @example {
239
- * "after": "10003",
240
- * "ids": [
241
- * "10004",
242
- * "10005"
243
- * ]
244
- * }
245
- */
246
- reorderIssuePriorities: ReorderIssuePriorities;
247
- }): Promise<void> {
248
- return this.getClientInstance()
249
- .request({
250
- path: "/rest/api/3/priority/move",
251
- method: "PUT",
252
- headers: {
253
- "Content-Type": "application/json",
254
- },
255
- body: reorderIssuePriorities,
256
- })
257
- .then(
258
- this.getClientInstance().responseHandler({
259
- 204: {
260
- "application/json": "json",
261
- },
262
- }),
263
- )
264
- .then(
265
- commonHttpClient.castResponse<{
266
- status: 204;
267
- mediaType: "application/json";
268
- body: void;
269
- }>(),
270
- )
271
- .then(
272
- validationSchemaStorage.validator(
273
- "IssuePrioritiesService.movePriorities.response",
274
- ),
275
- )
276
- .then(commonHttpClient.getBody);
277
- }
278
- /**
279
- * Returns a [paginated](#pagination) list of priorities. The list can contain all
280
- * priorities or a subset determined by any combination of these criteria:
281
- *
282
- * * a list of priority IDs. Any invalid priority IDs are ignored.
283
- * * a list of project IDs. Only priorities that are available in these projects
284
- * will be returned. Any invalid project IDs are ignored.
285
- * * whether the field configuration is a default. This returns priorities from
286
- * company-managed (classic) projects only, as there is no concept of default
287
- * priorities in team-managed projects.
288
- *
289
- * **[Permissions](#permissions) required:** Permission to access Jira.
290
- *
291
- * @deprecated
292
- * @returns Returned if the request is successful.
293
- *
294
- * example: {
295
- * "isLast": true,
296
- * "maxResults": 50,
297
- * "startAt": 0,
298
- * "total": 2,
299
- * "values": [
300
- * {
301
- * "description": "Major loss of function.",
302
- * "iconUrl":
303
- * "https://your-domain.atlassian.net/images/icons/priorities/major.png",
304
- * "id": "1",
305
- * "isDefault": true,
306
- * "name": "Major",
307
- * "self": "https://your-domain.atlassian.net/rest/api/3/priority/3",
308
- * "statusColor": "#009900"
309
- * },
310
- * {
311
- * "description": "Very little impact.",
312
- * "iconUrl":
313
- * "https://your-domain.atlassian.net/images/icons/priorities/trivial.png",
314
- * "id": "2",
315
- * "isDefault": false,
316
- * "name": "Trivial",
317
- * "self": "https://your-domain.atlassian.net/rest/api/3/priority/5",
318
- * "statusColor": "#cfcfcf"
319
- * }
320
- * ]
321
- * }
322
- * @path {GET} /rest/api/3/priority/search
323
- */
324
- searchPriorities({
325
- startAt,
326
- maxResults,
327
- id,
328
- projectId,
329
- priorityName,
330
- onlyDefault,
331
- expand,
332
- }: {
333
- /** The index of the first item to return in a page of results (page offset). */
334
- startAt?: string;
335
- /** The maximum number of items to return per page. */
336
- maxResults?: string;
337
- /**
338
- * The list of priority IDs. To include multiple IDs, provide an
339
- * ampersand-separated list. For example, `id=2&id=3`.
340
- */
341
- id?: string[];
342
- /**
343
- * The list of projects IDs. To include multiple IDs, provide an
344
- * ampersand-separated list. For example, `projectId=10010&projectId=10111`.
345
- */
346
- projectId?: string[];
347
- /** The name of priority to search for. */
348
- priorityName?: string;
349
- /** Whether only the default priority is returned. */
350
- onlyDefault?: boolean;
351
- /**
352
- * Use `schemes` to return the associated priority schemes for each priority.
353
- * Limited to returning first 15 priority schemes per priority.
354
- */
355
- expand?: string;
356
- }): Promise<PageBeanPriority> {
357
- return this.getClientInstance()
358
- .request({
359
- path: "/rest/api/3/priority/search",
360
- method: "GET",
361
- query: {
362
- startAt,
363
- maxResults,
364
- id,
365
- projectId,
366
- priorityName,
367
- onlyDefault,
368
- expand,
369
- },
370
- })
371
- .then(
372
- this.getClientInstance().responseHandler({
373
- 200: {
374
- "application/json": "json",
375
- },
376
- }),
377
- )
378
- .then(
379
- commonHttpClient.castResponse<{
380
- status: 200;
381
- mediaType: "application/json";
382
- body: PageBeanPriority;
383
- }>(),
384
- )
385
- .then(
386
- validationSchemaStorage.validator(
387
- "IssuePrioritiesService.searchPriorities.response",
388
- ),
389
- )
390
- .then(commonHttpClient.getBody);
391
- }
392
- /**
393
- * Sets default issue priority.
394
- *
395
- * **[Permissions](#permissions) required:** *Administer Jira* [global
396
- * permission](https://confluence.atlassian.com/x/x4dKLg).
397
- *
398
- * @returns Returned if the request is successful.
399
- * @path {PUT} /rest/api/3/priority/default
400
- */
401
- setDefaultPriority({
402
- setDefaultPriorityRequest,
403
- }: {
404
- /**
405
- * @example {
406
- * "id": "3"
407
- * }
408
- */
409
- setDefaultPriorityRequest: SetDefaultPriorityRequest;
410
- }): Promise<void> {
411
- return this.getClientInstance()
412
- .request({
413
- path: "/rest/api/3/priority/default",
414
- method: "PUT",
415
- headers: {
416
- "Content-Type": "application/json",
417
- },
418
- body: setDefaultPriorityRequest,
419
- })
420
- .then(
421
- this.getClientInstance().responseHandler({
422
- 204: {
423
- "application/json": "json",
424
- },
425
- }),
426
- )
427
- .then(
428
- commonHttpClient.castResponse<{
429
- status: 204;
430
- mediaType: "application/json";
431
- body: void;
432
- }>(),
433
- )
434
- .then(
435
- validationSchemaStorage.validator(
436
- "IssuePrioritiesService.setDefaultPriority.response",
437
- ),
438
- )
439
- .then(commonHttpClient.getBody);
440
- }
441
- /**
442
- * Updates an issue priority.
443
- *
444
- * **[Permissions](#permissions) required:** *Administer Jira* [global
445
- * permission](https://confluence.atlassian.com/x/x4dKLg).
446
- *
447
- * @returns Returned if the request is successful.
448
- * @path {PUT} /rest/api/3/priority/{id}
449
- */
450
- updatePriority({
451
- id,
452
- updatePriorityDetails,
453
- }: {
454
- /** The ID of the issue priority. */
455
- id: string;
456
- /**
457
- * @example {
458
- * "description": "My updated priority description",
459
- * "iconUrl": "images/icons/priorities/minor.png",
460
- * "name": "My updated priority",
461
- * "statusColor": "#123456"
462
- * }
463
- */
464
- updatePriorityDetails: UpdatePriorityDetails;
465
- }): Promise<void> {
466
- return this.getClientInstance()
467
- .request({
468
- path: "/rest/api/3/priority/{id}",
469
- method: "PUT",
470
- pathParams: {
471
- id,
472
- },
473
- headers: {
474
- "Content-Type": "application/json",
475
- },
476
- body: updatePriorityDetails,
477
- })
478
- .then(
479
- this.getClientInstance().responseHandler({
480
- 204: {
481
- "application/json": "json",
482
- },
483
- }),
484
- )
485
- .then(
486
- commonHttpClient.castResponse<{
487
- status: 204;
488
- mediaType: "application/json";
489
- body: void;
490
- }>(),
491
- )
492
- .then(
493
- validationSchemaStorage.validator(
494
- "IssuePrioritiesService.updatePriority.response",
495
- ),
496
- )
497
- .then(commonHttpClient.getBody);
498
- }
499
- static initialize() {
500
- validationSchemaStorage.registerExtensible(
501
- "IssuePrioritiesService.getPriorities.response",
502
- z
503
- .object({
504
- status: z.literal(200),
505
- mediaType: z.literal("application/json"),
506
- body: z.array(validationSchemaStorage.lazy("Priority")),
507
- })
508
- .describe("IssuePrioritiesService.getPriorities.response"),
509
- );
510
- validationSchemaStorage.registerExtensible(
511
- "IssuePrioritiesService.createPriority.response",
512
- z
513
- .object({
514
- status: z.literal(201),
515
- mediaType: z.literal("application/json"),
516
- body: validationSchemaStorage.lazy("PriorityId"),
517
- })
518
- .describe("IssuePrioritiesService.createPriority.response"),
519
- );
520
- validationSchemaStorage.registerExtensible(
521
- "IssuePrioritiesService.getPriority.response",
522
- z
523
- .object({
524
- status: z.literal(200),
525
- mediaType: z.literal("application/json"),
526
- body: validationSchemaStorage.lazy("Priority"),
527
- })
528
- .describe("IssuePrioritiesService.getPriority.response"),
529
- );
530
- validationSchemaStorage.registerExtensible(
531
- "IssuePrioritiesService.updatePriority.response",
532
- z
533
- .object({
534
- status: z.literal(204),
535
- mediaType: z.literal("application/json"),
536
- body: z.unknown(),
537
- })
538
- .describe("IssuePrioritiesService.updatePriority.response"),
539
- );
540
- validationSchemaStorage.registerExtensible(
541
- "IssuePrioritiesService.setDefaultPriority.response",
542
- z
543
- .object({
544
- status: z.literal(204),
545
- mediaType: z.literal("application/json"),
546
- body: z.unknown(),
547
- })
548
- .describe("IssuePrioritiesService.setDefaultPriority.response"),
549
- );
550
- validationSchemaStorage.registerExtensible(
551
- "IssuePrioritiesService.movePriorities.response",
552
- z
553
- .object({
554
- status: z.literal(204),
555
- mediaType: z.literal("application/json"),
556
- body: z.unknown(),
557
- })
558
- .describe("IssuePrioritiesService.movePriorities.response"),
559
- );
560
- validationSchemaStorage.registerExtensible(
561
- "IssuePrioritiesService.searchPriorities.response",
562
- z
563
- .object({
564
- status: z.literal(200),
565
- mediaType: z.literal("application/json"),
566
- body: validationSchemaStorage.lazy("PageBeanPriority"),
567
- })
568
- .describe("IssuePrioritiesService.searchPriorities.response"),
569
- );
570
- validationSchemaStorage.registerOnce([
571
- registerCommonValidationSchemas,
572
- registerIssuePrioritiesValidationSchemas,
573
- ]);
574
- }
575
- }