@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,940 +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 type { IssueTypeIds } from "../models/common";
9
- import {
10
- type IssueTypeSchemeDetails,
11
- type IssueTypeSchemeId,
12
- type IssueTypeSchemeProjectAssociation,
13
- type IssueTypeSchemeUpdateDetails,
14
- type OrderOfIssueTypes,
15
- type PageBeanIssueTypeScheme,
16
- type PageBeanIssueTypeSchemeMapping,
17
- type PageBeanIssueTypeSchemeProjects,
18
- registerIssueTypeSchemesValidationSchemas,
19
- } from "../models/issue-type-schemes";
20
- import { validationSchemaStorage } from "../validation-schema-storage";
21
- /**
22
- * This resource represents issue type schemes in classic projects. Use it to:
23
- *
24
- * * get issue type schemes and a list of the projects that use them.
25
- * * associate issue type schemes with projects.
26
- * * add issue types to issue type schemes.
27
- * * delete issue types from issue type schemes.
28
- * * create, update, and delete issue type schemes.
29
- * * change the order of issue types in issue type schemes.
30
- */
31
- export class IssueTypeSchemesService extends CommonHttpService {
32
- /**
33
- * Adds issue types to an issue type scheme.
34
- *
35
- * The added issue types are appended to the issue types list.
36
- *
37
- * If any of the issue types exist in the issue type scheme, the operation fails
38
- * and no issue types are added.
39
- *
40
- * **[Permissions](#permissions) required:** *Administer Jira* [global
41
- * permission](https://confluence.atlassian.com/x/x4dKLg).
42
- *
43
- * @returns Returned if the request is successful.
44
- * @path {PUT} /rest/api/3/issuetypescheme/{issueTypeSchemeId}/issuetype
45
- * @scopes-current manage:jira-configuration
46
- * @scopes-beta write:issue-type-scheme:jira
47
- */
48
- addIssueTypesToIssueTypeScheme({
49
- issueTypeSchemeId,
50
- issueTypeIds,
51
- }: {
52
- /** The ID of the issue type scheme. */
53
- issueTypeSchemeId: number;
54
- /**
55
- * @example {
56
- * "issueTypeIds": [
57
- * "10000",
58
- * "10002",
59
- * "10003"
60
- * ]
61
- * }
62
- */
63
- issueTypeIds: IssueTypeIds;
64
- }): Promise<void> {
65
- return this.getClientInstance()
66
- .request({
67
- path: "/rest/api/3/issuetypescheme/{issueTypeSchemeId}/issuetype",
68
- method: "PUT",
69
- pathParams: {
70
- issueTypeSchemeId,
71
- },
72
- headers: {
73
- "Content-Type": "application/json",
74
- },
75
- body: issueTypeIds,
76
- })
77
- .then(
78
- this.getClientInstance().responseHandler({
79
- 204: {
80
- "application/json": "json",
81
- },
82
- }),
83
- )
84
- .then(
85
- commonHttpClient.castResponse<{
86
- status: 204;
87
- mediaType: "application/json";
88
- body: void;
89
- }>(),
90
- )
91
- .then(
92
- validationSchemaStorage.validator(
93
- "IssueTypeSchemesService.addIssueTypesToIssueTypeScheme.response",
94
- ),
95
- )
96
- .then(commonHttpClient.getBody);
97
- }
98
- /**
99
- * Assigns an issue type scheme to a project.
100
- *
101
- * If any issues in the project are assigned issue types not present in the new
102
- * scheme, the operation will fail. To complete the assignment those issues must
103
- * be updated to use issue types in the new scheme.
104
- *
105
- * Issue type schemes can only be assigned to classic projects.
106
- *
107
- * **[Permissions](#permissions) required:** *Administer Jira* [global
108
- * permission](https://confluence.atlassian.com/x/x4dKLg).
109
- *
110
- * @returns Returned if the request is successful.
111
- * @path {PUT} /rest/api/3/issuetypescheme/project
112
- * @scopes-current manage:jira-configuration
113
- * @scopes-beta write:issue-type-scheme:jira, write:project:jira
114
- */
115
- assignIssueTypeSchemeToProject({
116
- issueTypeSchemeProjectAssociation,
117
- }: {
118
- /**
119
- * @example {
120
- * "issueTypeSchemeId": "10000",
121
- * "projectId": "10000"
122
- * }
123
- */
124
- issueTypeSchemeProjectAssociation: IssueTypeSchemeProjectAssociation;
125
- }): Promise<void> {
126
- return this.getClientInstance()
127
- .request({
128
- path: "/rest/api/3/issuetypescheme/project",
129
- method: "PUT",
130
- headers: {
131
- "Content-Type": "application/json",
132
- },
133
- body: issueTypeSchemeProjectAssociation,
134
- })
135
- .then(
136
- this.getClientInstance().responseHandler({
137
- 204: {
138
- "application/json": "json",
139
- },
140
- }),
141
- )
142
- .then(
143
- commonHttpClient.castResponse<{
144
- status: 204;
145
- mediaType: "application/json";
146
- body: void;
147
- }>(),
148
- )
149
- .then(
150
- validationSchemaStorage.validator(
151
- "IssueTypeSchemesService.assignIssueTypeSchemeToProject.response",
152
- ),
153
- )
154
- .then(commonHttpClient.getBody);
155
- }
156
- /**
157
- * Creates an issue type scheme.
158
- *
159
- * **[Permissions](#permissions) required:** *Administer Jira* [global
160
- * permission](https://confluence.atlassian.com/x/x4dKLg).
161
- *
162
- * @returns Returned if the request is successful.
163
- *
164
- * example: {
165
- * "issueTypeSchemeId": "10010"
166
- * }
167
- * @path {POST} /rest/api/3/issuetypescheme
168
- * @scopes-current manage:jira-configuration
169
- * @scopes-beta write:issue-type-scheme:jira
170
- */
171
- createIssueTypeScheme({
172
- issueTypeSchemeDetails,
173
- }: {
174
- /**
175
- * @example {
176
- * "defaultIssueTypeId": "10002",
177
- * "description": "A collection of issue types suited to use in a kanban style
178
- * project.",
179
- * "issueTypeIds": [
180
- * "10001",
181
- * "10002",
182
- * "10003"
183
- * ],
184
- * "name": "Kanban Issue Type Scheme"
185
- * }
186
- */
187
- issueTypeSchemeDetails: IssueTypeSchemeDetails;
188
- }): Promise<IssueTypeSchemeId> {
189
- return this.getClientInstance()
190
- .request({
191
- path: "/rest/api/3/issuetypescheme",
192
- method: "POST",
193
- headers: {
194
- "Content-Type": "application/json",
195
- },
196
- body: issueTypeSchemeDetails,
197
- })
198
- .then(
199
- this.getClientInstance().responseHandler({
200
- 201: {
201
- "application/json": "json",
202
- },
203
- }),
204
- )
205
- .then(
206
- commonHttpClient.castResponse<{
207
- status: 201;
208
- mediaType: "application/json";
209
- body: IssueTypeSchemeId;
210
- }>(),
211
- )
212
- .then(
213
- validationSchemaStorage.validator(
214
- "IssueTypeSchemesService.createIssueTypeScheme.response",
215
- ),
216
- )
217
- .then(commonHttpClient.getBody);
218
- }
219
- /**
220
- * Deletes an issue type scheme.
221
- *
222
- * Only issue type schemes used in classic projects can be deleted.
223
- *
224
- * Any projects assigned to the scheme are reassigned to the default issue type
225
- * scheme.
226
- *
227
- * **[Permissions](#permissions) required:** *Administer Jira* [global
228
- * permission](https://confluence.atlassian.com/x/x4dKLg).
229
- *
230
- * @returns Returned if the issue type scheme is deleted.
231
- * @path {DELETE} /rest/api/3/issuetypescheme/{issueTypeSchemeId}
232
- * @scopes-current manage:jira-configuration
233
- * @scopes-beta delete:issue-type-scheme:jira, write:project:jira
234
- */
235
- deleteIssueTypeScheme({
236
- issueTypeSchemeId,
237
- }: {
238
- /** The ID of the issue type scheme. */
239
- issueTypeSchemeId: number;
240
- }): Promise<void> {
241
- return this.getClientInstance()
242
- .request({
243
- path: "/rest/api/3/issuetypescheme/{issueTypeSchemeId}",
244
- method: "DELETE",
245
- pathParams: {
246
- issueTypeSchemeId,
247
- },
248
- })
249
- .then(
250
- this.getClientInstance().responseHandler({
251
- 204: {
252
- "application/json": "json",
253
- },
254
- }),
255
- )
256
- .then(
257
- commonHttpClient.castResponse<{
258
- status: 204;
259
- mediaType: "application/json";
260
- body: void;
261
- }>(),
262
- )
263
- .then(
264
- validationSchemaStorage.validator(
265
- "IssueTypeSchemesService.deleteIssueTypeScheme.response",
266
- ),
267
- )
268
- .then(commonHttpClient.getBody);
269
- }
270
- /**
271
- * Returns a [paginated](#pagination) list of issue type schemes.
272
- *
273
- * Only issue type schemes used in classic projects are returned.
274
- *
275
- * **[Permissions](#permissions) required:** *Administer Jira* [global
276
- * permission](https://confluence.atlassian.com/x/x4dKLg).
277
- *
278
- * @returns Returned if the request is successful.
279
- *
280
- * example: {
281
- * "isLast": true,
282
- * "maxResults": 100,
283
- * "startAt": 0,
284
- * "total": 3,
285
- * "values": [
286
- * {
287
- * "id": "10000",
288
- * "name": "Default Issue Type Scheme",
289
- * "description": "Default issue type scheme is the list of global issue
290
- * types. All newly created issue types will automatically be added to this
291
- * scheme.",
292
- * "defaultIssueTypeId": "10003",
293
- * "isDefault": true
294
- * },
295
- * {
296
- * "id": "10001",
297
- * "name": "SUP: Kanban Issue Type Scheme",
298
- * "description": "A collection of issue types suited to use in a kanban
299
- * style project.",
300
- * "projects": {
301
- * "isLast": true,
302
- * "maxResults": 100,
303
- * "startAt": 0,
304
- * "total": 1,
305
- * "values": [
306
- * {
307
- * "avatarUrls": {
308
- * "16x16": "secure/projectavatar?size=xsmall&pid=10000",
309
- * "24x24": "secure/projectavatar?size=small&pid=10000",
310
- * "32x32": "secure/projectavatar?size=medium&pid=10000",
311
- * "48x48": "secure/projectavatar?size=large&pid=10000"
312
- * },
313
- * "id": "10000",
314
- * "key": "EX",
315
- * "name": "Example",
316
- * "projectCategory": {
317
- * "description": "Project category description",
318
- * "id": "10000",
319
- * "name": "A project category"
320
- * },
321
- * "projectTypeKey": "ProjectTypeKey{key='software'}",
322
- * "self": "project/EX",
323
- * "simplified": false
324
- * }
325
- * ]
326
- * }
327
- * },
328
- * {
329
- * "id": "10002",
330
- * "name": "HR: Scrum issue type scheme",
331
- * "description": "",
332
- * "defaultIssueTypeId": "10004",
333
- * "issueTypes": {
334
- * "isLast": true,
335
- * "maxResults": 100,
336
- * "startAt": 0,
337
- * "total": 1,
338
- * "values": [
339
- * {
340
- * "description": "Improvement Issue Type",
341
- * "hierarchyLevel": -1,
342
- * "iconUrl": "www.example.com",
343
- * "id": "1000L",
344
- * "name": "Improvements",
345
- * "subtask": true
346
- * }
347
- * ]
348
- * }
349
- * }
350
- * ]
351
- * }
352
- * @path {GET} /rest/api/3/issuetypescheme
353
- * @scopes-current manage:jira-configuration
354
- * @scopes-beta read:issue-type-scheme:jira
355
- */
356
- getAllIssueTypeSchemes({
357
- startAt,
358
- maxResults,
359
- id,
360
- orderBy,
361
- expand,
362
- queryString,
363
- }: {
364
- /** The index of the first item to return in a page of results (page offset). */
365
- startAt?: number;
366
- /** The maximum number of items to return per page. */
367
- maxResults?: number;
368
- /**
369
- * The list of issue type schemes IDs. To include multiple IDs, provide an
370
- * ampersand-separated list. For example, `id=10000&id=10001`.
371
- */
372
- id?: number[];
373
- /**
374
- * [Order](#ordering) the results by a field:
375
- *
376
- * * `name` Sorts by issue type scheme name.
377
- * * `id` Sorts by issue type scheme ID.
378
- */
379
- orderBy?: "name" | "-name" | "+name" | "id" | "-id" | "+id";
380
- /**
381
- * Use [expand](#expansion) to include additional information in the response.
382
- * This parameter accepts a comma-separated list. Expand options include:
383
- *
384
- * * `projects` For each issue type schemes, returns information about the
385
- * projects the issue type scheme is assigned to.
386
- * * `issueTypes` For each issue type schemes, returns information about the
387
- * issueTypes the issue type scheme have.
388
- */
389
- expand?: string;
390
- /**
391
- * String used to perform a case-insensitive partial match with issue type scheme
392
- * name.
393
- */
394
- queryString?: string;
395
- }): Promise<PageBeanIssueTypeScheme> {
396
- return this.getClientInstance()
397
- .request({
398
- path: "/rest/api/3/issuetypescheme",
399
- method: "GET",
400
- query: {
401
- startAt,
402
- maxResults,
403
- id,
404
- orderBy,
405
- expand,
406
- queryString,
407
- },
408
- })
409
- .then(
410
- this.getClientInstance().responseHandler({
411
- 200: {
412
- "application/json": "json",
413
- },
414
- }),
415
- )
416
- .then(
417
- commonHttpClient.castResponse<{
418
- status: 200;
419
- mediaType: "application/json";
420
- body: PageBeanIssueTypeScheme;
421
- }>(),
422
- )
423
- .then(
424
- validationSchemaStorage.validator(
425
- "IssueTypeSchemesService.getAllIssueTypeSchemes.response",
426
- ),
427
- )
428
- .then(commonHttpClient.getBody);
429
- }
430
- /**
431
- * Returns a [paginated](#pagination) list of issue type schemes and, for each
432
- * issue type scheme, a list of the projects that use it.
433
- *
434
- * Only issue type schemes used in classic projects are returned.
435
- *
436
- * **[Permissions](#permissions) required:** *Administer Jira* [global
437
- * permission](https://confluence.atlassian.com/x/x4dKLg).
438
- *
439
- * @returns Returned if the request is successful.
440
- *
441
- * example: {
442
- * "isLast": true,
443
- * "maxResults": 100,
444
- * "startAt": 0,
445
- * "total": 3,
446
- * "values": [
447
- * {
448
- * "issueTypeScheme": {
449
- * "id": "10000",
450
- * "name": "Default Issue Type Scheme",
451
- * "description": "Default issue type scheme is the list of global issue
452
- * types. All newly created issue types will automatically be added to this
453
- * scheme.",
454
- * "defaultIssueTypeId": "10003",
455
- * "isDefault": true
456
- * },
457
- * "projectIds": [
458
- * "10000",
459
- * "10001"
460
- * ]
461
- * },
462
- * {
463
- * "issueTypeScheme": {
464
- * "id": "10001",
465
- * "name": "SUP: Kanban Issue Type Scheme",
466
- * "description": "A collection of issue types suited to use in a kanban
467
- * style project."
468
- * },
469
- * "projectIds": [
470
- * "10002"
471
- * ]
472
- * },
473
- * {
474
- * "issueTypeScheme": {
475
- * "id": "10002",
476
- * "name": "HR: Scrum issue type scheme",
477
- * "description": "",
478
- * "defaultIssueTypeId": "10004",
479
- * "issueTypes": {
480
- * "isLast": true,
481
- * "maxResults": 100,
482
- * "startAt": 0,
483
- * "total": 1,
484
- * "values": [
485
- * {
486
- * "description": "Improvement Issue Type",
487
- * "hierarchyLevel": -1,
488
- * "iconUrl": "www.example.com",
489
- * "id": "1000L",
490
- * "name": "Improvements",
491
- * "subtask": true
492
- * }
493
- * ]
494
- * }
495
- * },
496
- * "projectIds": [
497
- * "10003",
498
- * "10004",
499
- * "10005"
500
- * ]
501
- * }
502
- * ]
503
- * }
504
- * @path {GET} /rest/api/3/issuetypescheme/project
505
- * @scopes-current manage:jira-configuration
506
- * @scopes-beta read:issue-type-scheme:jira
507
- */
508
- getIssueTypeSchemeForProjects({
509
- startAt,
510
- maxResults,
511
- projectId,
512
- }: {
513
- /** The index of the first item to return in a page of results (page offset). */
514
- startAt?: number;
515
- /** The maximum number of items to return per page. */
516
- maxResults?: number;
517
- /**
518
- * The list of project IDs. To include multiple project IDs, provide an
519
- * ampersand-separated list. For example, `projectId=10000&projectId=10001`.
520
- */
521
- projectId: number[];
522
- }): Promise<PageBeanIssueTypeSchemeProjects> {
523
- return this.getClientInstance()
524
- .request({
525
- path: "/rest/api/3/issuetypescheme/project",
526
- method: "GET",
527
- query: {
528
- startAt,
529
- maxResults,
530
- projectId,
531
- },
532
- })
533
- .then(
534
- this.getClientInstance().responseHandler({
535
- 200: {
536
- "application/json": "json",
537
- },
538
- }),
539
- )
540
- .then(
541
- commonHttpClient.castResponse<{
542
- status: 200;
543
- mediaType: "application/json";
544
- body: PageBeanIssueTypeSchemeProjects;
545
- }>(),
546
- )
547
- .then(
548
- validationSchemaStorage.validator(
549
- "IssueTypeSchemesService.getIssueTypeSchemeForProjects.response",
550
- ),
551
- )
552
- .then(commonHttpClient.getBody);
553
- }
554
- /**
555
- * Returns a [paginated](#pagination) list of issue type scheme items.
556
- *
557
- * Only issue type scheme items used in classic projects are returned.
558
- *
559
- * **[Permissions](#permissions) required:** *Administer Jira* [global
560
- * permission](https://confluence.atlassian.com/x/x4dKLg).
561
- *
562
- * @returns Returned if the request is successful.
563
- *
564
- * example: {
565
- * "isLast": true,
566
- * "maxResults": 100,
567
- * "startAt": 0,
568
- * "total": 4,
569
- * "values": [
570
- * {
571
- * "issueTypeSchemeId": "10000",
572
- * "issueTypeId": "10000"
573
- * },
574
- * {
575
- * "issueTypeSchemeId": "10000",
576
- * "issueTypeId": "10001"
577
- * },
578
- * {
579
- * "issueTypeSchemeId": "10000",
580
- * "issueTypeId": "10002"
581
- * },
582
- * {
583
- * "issueTypeSchemeId": "10001",
584
- * "issueTypeId": "10000"
585
- * }
586
- * ]
587
- * }
588
- * @path {GET} /rest/api/3/issuetypescheme/mapping
589
- * @scopes-current manage:jira-configuration
590
- * @scopes-beta read:issue-type-scheme:jira
591
- */
592
- getIssueTypeSchemesMapping({
593
- startAt,
594
- maxResults,
595
- issueTypeSchemeId,
596
- }: {
597
- /** The index of the first item to return in a page of results (page offset). */
598
- startAt?: number;
599
- /** The maximum number of items to return per page. */
600
- maxResults?: number;
601
- /**
602
- * The list of issue type scheme IDs. To include multiple IDs, provide an
603
- * ampersand-separated list. For example,
604
- * `issueTypeSchemeId=10000&issueTypeSchemeId=10001`.
605
- */
606
- issueTypeSchemeId?: number[];
607
- }): Promise<PageBeanIssueTypeSchemeMapping> {
608
- return this.getClientInstance()
609
- .request({
610
- path: "/rest/api/3/issuetypescheme/mapping",
611
- method: "GET",
612
- query: {
613
- startAt,
614
- maxResults,
615
- issueTypeSchemeId,
616
- },
617
- })
618
- .then(
619
- this.getClientInstance().responseHandler({
620
- 200: {
621
- "application/json": "json",
622
- },
623
- }),
624
- )
625
- .then(
626
- commonHttpClient.castResponse<{
627
- status: 200;
628
- mediaType: "application/json";
629
- body: PageBeanIssueTypeSchemeMapping;
630
- }>(),
631
- )
632
- .then(
633
- validationSchemaStorage.validator(
634
- "IssueTypeSchemesService.getIssueTypeSchemesMapping.response",
635
- ),
636
- )
637
- .then(commonHttpClient.getBody);
638
- }
639
- /**
640
- * Removes an issue type from an issue type scheme.
641
- *
642
- * This operation cannot remove:
643
- *
644
- * * any issue type used by issues.
645
- * * any issue types from the default issue type scheme.
646
- * * the last standard issue type from an issue type scheme.
647
- *
648
- * **[Permissions](#permissions) required:** *Administer Jira* [global
649
- * permission](https://confluence.atlassian.com/x/x4dKLg).
650
- *
651
- * @returns Returned if the request is successful.
652
- * @path {DELETE} /rest/api/3/issuetypescheme/{issueTypeSchemeId}/issuetype/{issueTypeId}
653
- * @scopes-current manage:jira-configuration
654
- * @scopes-beta write:issue-type-scheme:jira
655
- */
656
- removeIssueTypeFromIssueTypeScheme({
657
- issueTypeSchemeId,
658
- issueTypeId,
659
- }: {
660
- /** The ID of the issue type scheme. */
661
- issueTypeSchemeId: number;
662
- /** The ID of the issue type. */
663
- issueTypeId: number;
664
- }): Promise<void> {
665
- return this.getClientInstance()
666
- .request({
667
- path: "/rest/api/3/issuetypescheme/{issueTypeSchemeId}/issuetype/{issueTypeId}",
668
- method: "DELETE",
669
- pathParams: {
670
- issueTypeSchemeId,
671
- issueTypeId,
672
- },
673
- })
674
- .then(
675
- this.getClientInstance().responseHandler({
676
- 204: {
677
- "application/json": "json",
678
- },
679
- }),
680
- )
681
- .then(
682
- commonHttpClient.castResponse<{
683
- status: 204;
684
- mediaType: "application/json";
685
- body: void;
686
- }>(),
687
- )
688
- .then(
689
- validationSchemaStorage.validator(
690
- "IssueTypeSchemesService.removeIssueTypeFromIssueTypeScheme.response",
691
- ),
692
- )
693
- .then(commonHttpClient.getBody);
694
- }
695
- /**
696
- * Changes the order of issue types in an issue type scheme.
697
- *
698
- * The request body parameters must meet the following requirements:
699
- *
700
- * * all of the issue types must belong to the issue type scheme.
701
- * * either `after` or `position` must be provided.
702
- * * the issue type in `after` must not be in the issue type list.
703
- *
704
- * **[Permissions](#permissions) required:** *Administer Jira* [global
705
- * permission](https://confluence.atlassian.com/x/x4dKLg).
706
- *
707
- * @returns Returned if the request is successful.
708
- * @path {PUT} /rest/api/3/issuetypescheme/{issueTypeSchemeId}/issuetype/move
709
- * @scopes-current manage:jira-configuration
710
- * @scopes-beta write:issue-type-scheme:jira
711
- */
712
- reorderIssueTypesInIssueTypeScheme({
713
- issueTypeSchemeId,
714
- orderOfIssueTypes,
715
- }: {
716
- /** The ID of the issue type scheme. */
717
- issueTypeSchemeId: number;
718
- /**
719
- * @example {
720
- * "after": "10008",
721
- * "issueTypeIds": [
722
- * "10001",
723
- * "10004",
724
- * "10002"
725
- * ]
726
- * }
727
- */
728
- orderOfIssueTypes: OrderOfIssueTypes;
729
- }): Promise<void> {
730
- return this.getClientInstance()
731
- .request({
732
- path: "/rest/api/3/issuetypescheme/{issueTypeSchemeId}/issuetype/move",
733
- method: "PUT",
734
- pathParams: {
735
- issueTypeSchemeId,
736
- },
737
- headers: {
738
- "Content-Type": "application/json",
739
- },
740
- body: orderOfIssueTypes,
741
- })
742
- .then(
743
- this.getClientInstance().responseHandler({
744
- 204: {
745
- "application/json": "json",
746
- },
747
- }),
748
- )
749
- .then(
750
- commonHttpClient.castResponse<{
751
- status: 204;
752
- mediaType: "application/json";
753
- body: void;
754
- }>(),
755
- )
756
- .then(
757
- validationSchemaStorage.validator(
758
- "IssueTypeSchemesService.reorderIssueTypesInIssueTypeScheme.response",
759
- ),
760
- )
761
- .then(commonHttpClient.getBody);
762
- }
763
- /**
764
- * Updates an issue type scheme.
765
- *
766
- * **[Permissions](#permissions) required:** *Administer Jira* [global
767
- * permission](https://confluence.atlassian.com/x/x4dKLg).
768
- *
769
- * @returns Returned if the request is successful.
770
- * @path {PUT} /rest/api/3/issuetypescheme/{issueTypeSchemeId}
771
- * @scopes-current manage:jira-configuration
772
- * @scopes-beta write:issue-type-scheme:jira
773
- */
774
- updateIssueTypeScheme({
775
- issueTypeSchemeId,
776
- issueTypeSchemeUpdateDetails,
777
- }: {
778
- /** The ID of the issue type scheme. */
779
- issueTypeSchemeId: number;
780
- /**
781
- * @example {
782
- * "defaultIssueTypeId": "10002",
783
- * "description": "A collection of issue types suited to use in a kanban style
784
- * project.",
785
- * "name": "Kanban Issue Type Scheme"
786
- * }
787
- */
788
- issueTypeSchemeUpdateDetails: IssueTypeSchemeUpdateDetails;
789
- }): Promise<void> {
790
- return this.getClientInstance()
791
- .request({
792
- path: "/rest/api/3/issuetypescheme/{issueTypeSchemeId}",
793
- method: "PUT",
794
- pathParams: {
795
- issueTypeSchemeId,
796
- },
797
- headers: {
798
- "Content-Type": "application/json",
799
- },
800
- body: issueTypeSchemeUpdateDetails,
801
- })
802
- .then(
803
- this.getClientInstance().responseHandler({
804
- 204: {
805
- "application/json": "json",
806
- },
807
- }),
808
- )
809
- .then(
810
- commonHttpClient.castResponse<{
811
- status: 204;
812
- mediaType: "application/json";
813
- body: void;
814
- }>(),
815
- )
816
- .then(
817
- validationSchemaStorage.validator(
818
- "IssueTypeSchemesService.updateIssueTypeScheme.response",
819
- ),
820
- )
821
- .then(commonHttpClient.getBody);
822
- }
823
- static initialize() {
824
- validationSchemaStorage.registerExtensible(
825
- "IssueTypeSchemesService.getAllIssueTypeSchemes.response",
826
- z
827
- .object({
828
- status: z.literal(200),
829
- mediaType: z.literal("application/json"),
830
- body: validationSchemaStorage.lazy("PageBeanIssueTypeScheme"),
831
- })
832
- .describe("IssueTypeSchemesService.getAllIssueTypeSchemes.response"),
833
- );
834
- validationSchemaStorage.registerExtensible(
835
- "IssueTypeSchemesService.createIssueTypeScheme.response",
836
- z
837
- .object({
838
- status: z.literal(201),
839
- mediaType: z.literal("application/json"),
840
- body: validationSchemaStorage.lazy("IssueTypeSchemeId"),
841
- })
842
- .describe("IssueTypeSchemesService.createIssueTypeScheme.response"),
843
- );
844
- validationSchemaStorage.registerExtensible(
845
- "IssueTypeSchemesService.updateIssueTypeScheme.response",
846
- z
847
- .object({
848
- status: z.literal(204),
849
- mediaType: z.literal("application/json"),
850
- body: z.unknown(),
851
- })
852
- .describe("IssueTypeSchemesService.updateIssueTypeScheme.response"),
853
- );
854
- validationSchemaStorage.registerExtensible(
855
- "IssueTypeSchemesService.deleteIssueTypeScheme.response",
856
- z
857
- .object({
858
- status: z.literal(204),
859
- mediaType: z.literal("application/json"),
860
- body: z.unknown(),
861
- })
862
- .describe("IssueTypeSchemesService.deleteIssueTypeScheme.response"),
863
- );
864
- validationSchemaStorage.registerExtensible(
865
- "IssueTypeSchemesService.addIssueTypesToIssueTypeScheme.response",
866
- z
867
- .object({
868
- status: z.literal(204),
869
- mediaType: z.literal("application/json"),
870
- body: z.unknown(),
871
- })
872
- .describe(
873
- "IssueTypeSchemesService.addIssueTypesToIssueTypeScheme.response",
874
- ),
875
- );
876
- validationSchemaStorage.registerExtensible(
877
- "IssueTypeSchemesService.removeIssueTypeFromIssueTypeScheme.response",
878
- z
879
- .object({
880
- status: z.literal(204),
881
- mediaType: z.literal("application/json"),
882
- body: z.unknown(),
883
- })
884
- .describe(
885
- "IssueTypeSchemesService.removeIssueTypeFromIssueTypeScheme.response",
886
- ),
887
- );
888
- validationSchemaStorage.registerExtensible(
889
- "IssueTypeSchemesService.reorderIssueTypesInIssueTypeScheme.response",
890
- z
891
- .object({
892
- status: z.literal(204),
893
- mediaType: z.literal("application/json"),
894
- body: z.unknown(),
895
- })
896
- .describe(
897
- "IssueTypeSchemesService.reorderIssueTypesInIssueTypeScheme.response",
898
- ),
899
- );
900
- validationSchemaStorage.registerExtensible(
901
- "IssueTypeSchemesService.getIssueTypeSchemesMapping.response",
902
- z
903
- .object({
904
- status: z.literal(200),
905
- mediaType: z.literal("application/json"),
906
- body: validationSchemaStorage.lazy("PageBeanIssueTypeSchemeMapping"),
907
- })
908
- .describe(
909
- "IssueTypeSchemesService.getIssueTypeSchemesMapping.response",
910
- ),
911
- );
912
- validationSchemaStorage.registerExtensible(
913
- "IssueTypeSchemesService.getIssueTypeSchemeForProjects.response",
914
- z
915
- .object({
916
- status: z.literal(200),
917
- mediaType: z.literal("application/json"),
918
- body: validationSchemaStorage.lazy("PageBeanIssueTypeSchemeProjects"),
919
- })
920
- .describe(
921
- "IssueTypeSchemesService.getIssueTypeSchemeForProjects.response",
922
- ),
923
- );
924
- validationSchemaStorage.registerExtensible(
925
- "IssueTypeSchemesService.assignIssueTypeSchemeToProject.response",
926
- z
927
- .object({
928
- status: z.literal(204),
929
- mediaType: z.literal("application/json"),
930
- body: z.unknown(),
931
- })
932
- .describe(
933
- "IssueTypeSchemesService.assignIssueTypeSchemeToProject.response",
934
- ),
935
- );
936
- validationSchemaStorage.registerOnce([
937
- registerIssueTypeSchemesValidationSchemas,
938
- ]);
939
- }
940
- }