@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,1294 +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 AssociateFieldConfigurationsWithIssueTypesRequest,
10
- type FieldConfiguration,
11
- type FieldConfigurationDetails,
12
- type FieldConfigurationItemsDetails,
13
- type FieldConfigurationScheme,
14
- type FieldConfigurationSchemeProjectAssociation,
15
- type IssueTypeIdsToRemove,
16
- type PageBeanFieldConfigurationDetails,
17
- type PageBeanFieldConfigurationIssueTypeItem,
18
- type PageBeanFieldConfigurationItem,
19
- type PageBeanFieldConfigurationScheme,
20
- type PageBeanFieldConfigurationSchemeProjects,
21
- registerIssueFieldConfigurationsValidationSchemas,
22
- type UpdateFieldConfigurationSchemeDetails,
23
- } from "../models/issue-field-configurations";
24
- import { validationSchemaStorage } from "../validation-schema-storage";
25
- /**
26
- * This resource represents issue field configurations. Use it to get, set, and
27
- * delete field configurations and field configuration schemes.
28
- */
29
- export class IssueFieldConfigurationsService extends CommonHttpService {
30
- /**
31
- * Assigns a field configuration scheme to a project. If the field configuration
32
- * scheme ID is `null`, the operation assigns the default field configuration
33
- * scheme.
34
- *
35
- * Field configuration schemes can only be assigned to classic projects.
36
- *
37
- * **[Permissions](#permissions) required:** *Administer Jira* [global
38
- * permission](https://confluence.atlassian.com/x/x4dKLg).
39
- *
40
- * @returns Returned if the request is successful.
41
- * @path {PUT} /rest/api/3/fieldconfigurationscheme/project
42
- * @scopes-current manage:jira-configuration
43
- * @scopes-beta write:field-configuration-scheme:jira
44
- */
45
- assignFieldConfigurationSchemeToProject({
46
- fieldConfigurationSchemeProjectAssociation,
47
- }: {
48
- /**
49
- * @example {
50
- * "fieldConfigurationSchemeId": "10000",
51
- * "projectId": "10000"
52
- * }
53
- */
54
- fieldConfigurationSchemeProjectAssociation: FieldConfigurationSchemeProjectAssociation;
55
- }): Promise<void> {
56
- return this.getClientInstance()
57
- .request({
58
- path: "/rest/api/3/fieldconfigurationscheme/project",
59
- method: "PUT",
60
- headers: {
61
- "Content-Type": "application/json",
62
- },
63
- body: fieldConfigurationSchemeProjectAssociation,
64
- })
65
- .then(
66
- this.getClientInstance().responseHandler({
67
- 204: {
68
- "application/json": "json",
69
- },
70
- }),
71
- )
72
- .then(
73
- commonHttpClient.castResponse<{
74
- status: 204;
75
- mediaType: "application/json";
76
- body: void;
77
- }>(),
78
- )
79
- .then(
80
- validationSchemaStorage.validator(
81
- "IssueFieldConfigurationsService.assignFieldConfigurationSchemeToProject.response",
82
- ),
83
- )
84
- .then(commonHttpClient.getBody);
85
- }
86
- /**
87
- * Creates a field configuration. The field configuration is created with the same
88
- * field properties as the default configuration, with all the fields being
89
- * optional.
90
- *
91
- * This operation can only create configurations for use in company-managed
92
- * (classic) projects.
93
- *
94
- * **[Permissions](#permissions) required:** *Administer Jira* [global
95
- * permission](https://confluence.atlassian.com/x/x4dKLg).
96
- *
97
- * @returns Returned if the request is successful.
98
- *
99
- * example: {
100
- * "description": "My field configuration description",
101
- * "id": 10001,
102
- * "name": "My Field Configuration"
103
- * }
104
- * @path {POST} /rest/api/3/fieldconfiguration
105
- * @scopes-current manage:jira-configuration
106
- * @scopes-beta read:field-configuration:jira, write:field-configuration:jira
107
- */
108
- createFieldConfiguration({
109
- fieldConfigurationDetails,
110
- }: {
111
- /**
112
- * @example {
113
- * "description": "My field configuration description",
114
- * "name": "My Field Configuration"
115
- * }
116
- */
117
- fieldConfigurationDetails: FieldConfigurationDetails;
118
- }): Promise<FieldConfiguration> {
119
- return this.getClientInstance()
120
- .request({
121
- path: "/rest/api/3/fieldconfiguration",
122
- method: "POST",
123
- headers: {
124
- "Content-Type": "application/json",
125
- },
126
- body: fieldConfigurationDetails,
127
- })
128
- .then(
129
- this.getClientInstance().responseHandler({
130
- 200: {
131
- "application/json": "json",
132
- },
133
- }),
134
- )
135
- .then(
136
- commonHttpClient.castResponse<{
137
- status: 200;
138
- mediaType: "application/json";
139
- body: FieldConfiguration;
140
- }>(),
141
- )
142
- .then(
143
- validationSchemaStorage.validator(
144
- "IssueFieldConfigurationsService.createFieldConfiguration.response",
145
- ),
146
- )
147
- .then(commonHttpClient.getBody);
148
- }
149
- /**
150
- * Creates a field configuration scheme.
151
- *
152
- * This operation can only create field configuration schemes used in
153
- * company-managed (classic) projects.
154
- *
155
- * **[Permissions](#permissions) required:** *Administer Jira* [global
156
- * permission](https://confluence.atlassian.com/x/x4dKLg).
157
- *
158
- * @returns Returned if the request is successful.
159
- *
160
- * example: {
161
- * "id": "10002",
162
- * "name": "Field Configuration Scheme for software related projects",
163
- * "description": "We can use this one for software projects."
164
- * }
165
- * @path {POST} /rest/api/3/fieldconfigurationscheme
166
- * @scopes-current manage:jira-configuration
167
- * @scopes-beta write:field-configuration-scheme:jira, read:field-configuration-scheme:jira
168
- */
169
- createFieldConfigurationScheme({
170
- updateFieldConfigurationSchemeDetails,
171
- }: {
172
- /**
173
- * The details of the field configuration scheme.
174
- *
175
- * @example {
176
- * "description": "We can use this one for software projects.",
177
- * "name": "Field Configuration Scheme for software related projects"
178
- * }
179
- */
180
- updateFieldConfigurationSchemeDetails: UpdateFieldConfigurationSchemeDetails;
181
- }): Promise<FieldConfigurationScheme> {
182
- return this.getClientInstance()
183
- .request({
184
- path: "/rest/api/3/fieldconfigurationscheme",
185
- method: "POST",
186
- headers: {
187
- "Content-Type": "application/json",
188
- },
189
- body: updateFieldConfigurationSchemeDetails,
190
- })
191
- .then(
192
- this.getClientInstance().responseHandler({
193
- 201: {
194
- "application/json": "json",
195
- },
196
- }),
197
- )
198
- .then(
199
- commonHttpClient.castResponse<{
200
- status: 201;
201
- mediaType: "application/json";
202
- body: FieldConfigurationScheme;
203
- }>(),
204
- )
205
- .then(
206
- validationSchemaStorage.validator(
207
- "IssueFieldConfigurationsService.createFieldConfigurationScheme.response",
208
- ),
209
- )
210
- .then(commonHttpClient.getBody);
211
- }
212
- /**
213
- * Deletes a field configuration.
214
- *
215
- * This operation can only delete configurations used in company-managed (classic)
216
- * projects.
217
- *
218
- * **[Permissions](#permissions) required:** *Administer Jira* [global
219
- * permission](https://confluence.atlassian.com/x/x4dKLg).
220
- *
221
- * @returns Returned if the request is successful.
222
- * @path {DELETE} /rest/api/3/fieldconfiguration/{id}
223
- * @scopes-current manage:jira-configuration
224
- * @scopes-beta delete:field-configuration:jira
225
- */
226
- deleteFieldConfiguration({
227
- id,
228
- }: {
229
- /** The ID of the field configuration. */
230
- id: number;
231
- }): Promise<void> {
232
- return this.getClientInstance()
233
- .request({
234
- path: "/rest/api/3/fieldconfiguration/{id}",
235
- method: "DELETE",
236
- pathParams: {
237
- id,
238
- },
239
- })
240
- .then(
241
- this.getClientInstance().responseHandler({
242
- 204: {
243
- "application/json": "json",
244
- },
245
- }),
246
- )
247
- .then(
248
- commonHttpClient.castResponse<{
249
- status: 204;
250
- mediaType: "application/json";
251
- body: void;
252
- }>(),
253
- )
254
- .then(
255
- validationSchemaStorage.validator(
256
- "IssueFieldConfigurationsService.deleteFieldConfiguration.response",
257
- ),
258
- )
259
- .then(commonHttpClient.getBody);
260
- }
261
- /**
262
- * Deletes a field configuration scheme.
263
- *
264
- * This operation can only delete field configuration schemes used in
265
- * company-managed (classic) projects.
266
- *
267
- * **[Permissions](#permissions) required:** *Administer Jira* [global
268
- * permission](https://confluence.atlassian.com/x/x4dKLg).
269
- *
270
- * @returns Returned if the request is successful.
271
- * @path {DELETE} /rest/api/3/fieldconfigurationscheme/{id}
272
- * @scopes-current manage:jira-configuration
273
- * @scopes-beta delete:field-configuration-scheme:jira
274
- */
275
- deleteFieldConfigurationScheme({
276
- id,
277
- }: {
278
- /** The ID of the field configuration scheme. */
279
- id: number;
280
- }): Promise<void> {
281
- return this.getClientInstance()
282
- .request({
283
- path: "/rest/api/3/fieldconfigurationscheme/{id}",
284
- method: "DELETE",
285
- pathParams: {
286
- id,
287
- },
288
- })
289
- .then(
290
- this.getClientInstance().responseHandler({
291
- 204: {
292
- "application/json": "json",
293
- },
294
- }),
295
- )
296
- .then(
297
- commonHttpClient.castResponse<{
298
- status: 204;
299
- mediaType: "application/json";
300
- body: void;
301
- }>(),
302
- )
303
- .then(
304
- validationSchemaStorage.validator(
305
- "IssueFieldConfigurationsService.deleteFieldConfigurationScheme.response",
306
- ),
307
- )
308
- .then(commonHttpClient.getBody);
309
- }
310
- /**
311
- * Returns a [paginated](#pagination) list of field configurations. The list can
312
- * be for all field configurations or a subset determined by any combination of
313
- * these criteria:
314
- *
315
- * * a list of field configuration item IDs.
316
- * * whether the field configuration is a default.
317
- * * whether the field configuration name or description contains a query string.
318
- *
319
- * Only field configurations used in company-managed (classic) projects are
320
- * returned.
321
- *
322
- * **[Permissions](#permissions) required:** *Administer Jira* [global
323
- * permission](https://confluence.atlassian.com/x/x4dKLg).
324
- *
325
- * @returns Returned if the request is successful.
326
- *
327
- * example: {
328
- * "isLast": true,
329
- * "maxResults": 50,
330
- * "startAt": 0,
331
- * "total": 2,
332
- * "values": [
333
- * {
334
- * "id": 10000,
335
- * "name": "Default Field Configuration",
336
- * "description": "The default field configuration description",
337
- * "isDefault": true
338
- * },
339
- * {
340
- * "id": 10001,
341
- * "name": "My Field Configuration",
342
- * "description": "My field configuration description"
343
- * }
344
- * ]
345
- * }
346
- * @path {GET} /rest/api/3/fieldconfiguration
347
- * @scopes-current manage:jira-configuration
348
- * @scopes-beta read:field-configuration:jira
349
- */
350
- getAllFieldConfigurations({
351
- startAt,
352
- maxResults,
353
- id,
354
- isDefault,
355
- query,
356
- }: {
357
- /** The index of the first item to return in a page of results (page offset). */
358
- startAt?: number;
359
- /** The maximum number of items to return per page. */
360
- maxResults?: number;
361
- /**
362
- * The list of field configuration IDs. To include multiple IDs, provide an
363
- * ampersand-separated list. For example, `id=10000&id=10001`.
364
- */
365
- id?: number[];
366
- /** If *true* returns default field configurations only. */
367
- isDefault?: boolean;
368
- /**
369
- * The query string used to match against field configuration names and
370
- * descriptions.
371
- */
372
- query?: string;
373
- }): Promise<PageBeanFieldConfigurationDetails> {
374
- return this.getClientInstance()
375
- .request({
376
- path: "/rest/api/3/fieldconfiguration",
377
- method: "GET",
378
- query: {
379
- startAt,
380
- maxResults,
381
- id,
382
- isDefault,
383
- query,
384
- },
385
- })
386
- .then(
387
- this.getClientInstance().responseHandler({
388
- 200: {
389
- "application/json": "json",
390
- },
391
- }),
392
- )
393
- .then(
394
- commonHttpClient.castResponse<{
395
- status: 200;
396
- mediaType: "application/json";
397
- body: PageBeanFieldConfigurationDetails;
398
- }>(),
399
- )
400
- .then(
401
- validationSchemaStorage.validator(
402
- "IssueFieldConfigurationsService.getAllFieldConfigurations.response",
403
- ),
404
- )
405
- .then(commonHttpClient.getBody);
406
- }
407
- /**
408
- * Returns a [paginated](#pagination) list of field configuration schemes.
409
- *
410
- * Only field configuration schemes used in classic projects are returned.
411
- *
412
- * **[Permissions](#permissions) required:** *Administer Jira* [global
413
- * permission](https://confluence.atlassian.com/x/x4dKLg).
414
- *
415
- * @returns Returned if the request is successful.
416
- *
417
- * example: {
418
- * "isLast": true,
419
- * "maxResults": 10,
420
- * "startAt": 0,
421
- * "total": 3,
422
- * "values": [
423
- * {
424
- * "id": "10000",
425
- * "name": "Field Configuration Scheme for Bugs",
426
- * "description": "This field configuration scheme is for bugs only."
427
- * },
428
- * {
429
- * "id": "10001",
430
- * "name": "Field Configuration Scheme for software related projects",
431
- * "description": "We can use this one for software projects."
432
- * },
433
- * {
434
- * "id": "10002",
435
- * "name": "Field Configuration Scheme for Epics",
436
- * "description": "Use this one for Epic issue type."
437
- * }
438
- * ]
439
- * }
440
- * @path {GET} /rest/api/3/fieldconfigurationscheme
441
- * @scopes-current manage:jira-configuration
442
- * @scopes-beta read:field-configuration-scheme:jira
443
- */
444
- getAllFieldConfigurationSchemes({
445
- startAt,
446
- maxResults,
447
- id,
448
- }: {
449
- /** The index of the first item to return in a page of results (page offset). */
450
- startAt?: number;
451
- /** The maximum number of items to return per page. */
452
- maxResults?: number;
453
- /**
454
- * The list of field configuration scheme IDs. To include multiple IDs, provide an
455
- * ampersand-separated list. For example, `id=10000&id=10001`.
456
- */
457
- id?: number[];
458
- }): Promise<PageBeanFieldConfigurationScheme> {
459
- return this.getClientInstance()
460
- .request({
461
- path: "/rest/api/3/fieldconfigurationscheme",
462
- method: "GET",
463
- query: {
464
- startAt,
465
- maxResults,
466
- id,
467
- },
468
- })
469
- .then(
470
- this.getClientInstance().responseHandler({
471
- 200: {
472
- "application/json": "json",
473
- },
474
- }),
475
- )
476
- .then(
477
- commonHttpClient.castResponse<{
478
- status: 200;
479
- mediaType: "application/json";
480
- body: PageBeanFieldConfigurationScheme;
481
- }>(),
482
- )
483
- .then(
484
- validationSchemaStorage.validator(
485
- "IssueFieldConfigurationsService.getAllFieldConfigurationSchemes.response",
486
- ),
487
- )
488
- .then(commonHttpClient.getBody);
489
- }
490
- /**
491
- * Returns a [paginated](#pagination) list of all fields for a configuration.
492
- *
493
- * Only the fields from configurations used in company-managed (classic) projects
494
- * are returned.
495
- *
496
- * **[Permissions](#permissions) required:** *Administer Jira* [global
497
- * permission](https://confluence.atlassian.com/x/x4dKLg).
498
- *
499
- * @returns Returned if the request is successful.
500
- *
501
- * example: {
502
- * "isLast": true,
503
- * "maxResults": 50,
504
- * "startAt": 0,
505
- * "total": 2,
506
- * "values": [
507
- * {
508
- * "description": "For example operating system, software platform and/or
509
- * hardware specifications (include as appropriate for the issue).",
510
- * "id": "environment",
511
- * "isHidden": false,
512
- * "isRequired": false
513
- * },
514
- * {
515
- * "id": "description",
516
- * "isHidden": false,
517
- * "isRequired": false
518
- * }
519
- * ]
520
- * }
521
- * @path {GET} /rest/api/3/fieldconfiguration/{id}/fields
522
- * @scopes-current manage:jira-configuration
523
- * @scopes-beta read:field-configuration:jira
524
- */
525
- getFieldConfigurationItems({
526
- id,
527
- startAt,
528
- maxResults,
529
- }: {
530
- /** The ID of the field configuration. */
531
- id: number;
532
- /** The index of the first item to return in a page of results (page offset). */
533
- startAt?: number;
534
- /** The maximum number of items to return per page. */
535
- maxResults?: number;
536
- }): Promise<PageBeanFieldConfigurationItem> {
537
- return this.getClientInstance()
538
- .request({
539
- path: "/rest/api/3/fieldconfiguration/{id}/fields",
540
- method: "GET",
541
- pathParams: {
542
- id,
543
- },
544
- query: {
545
- startAt,
546
- maxResults,
547
- },
548
- })
549
- .then(
550
- this.getClientInstance().responseHandler({
551
- 200: {
552
- "application/json": "json",
553
- },
554
- }),
555
- )
556
- .then(
557
- commonHttpClient.castResponse<{
558
- status: 200;
559
- mediaType: "application/json";
560
- body: PageBeanFieldConfigurationItem;
561
- }>(),
562
- )
563
- .then(
564
- validationSchemaStorage.validator(
565
- "IssueFieldConfigurationsService.getFieldConfigurationItems.response",
566
- ),
567
- )
568
- .then(commonHttpClient.getBody);
569
- }
570
- /**
571
- * Returns a [paginated](#pagination) list of field configuration issue type items.
572
- *
573
- * Only items used in classic projects are returned.
574
- *
575
- * **[Permissions](#permissions) required:** *Administer Jira* [global
576
- * permission](https://confluence.atlassian.com/x/x4dKLg).
577
- *
578
- * @returns Returned if the request is successful.
579
- *
580
- * example: {
581
- * "isLast": true,
582
- * "maxResults": 100,
583
- * "startAt": 0,
584
- * "total": 5,
585
- * "values": [
586
- * {
587
- * "fieldConfigurationSchemeId": "10020",
588
- * "issueTypeId": "10000",
589
- * "fieldConfigurationId": "10010"
590
- * },
591
- * {
592
- * "fieldConfigurationSchemeId": "10020",
593
- * "issueTypeId": "10001",
594
- * "fieldConfigurationId": "10010"
595
- * },
596
- * {
597
- * "fieldConfigurationSchemeId": "10021",
598
- * "issueTypeId": "10002",
599
- * "fieldConfigurationId": "10000"
600
- * },
601
- * {
602
- * "fieldConfigurationSchemeId": "10022",
603
- * "issueTypeId": "default",
604
- * "fieldConfigurationId": "10011"
605
- * },
606
- * {
607
- * "fieldConfigurationSchemeId": "10023",
608
- * "issueTypeId": "default",
609
- * "fieldConfigurationId": "10000"
610
- * }
611
- * ]
612
- * }
613
- * @path {GET} /rest/api/3/fieldconfigurationscheme/mapping
614
- * @scopes-current manage:jira-configuration
615
- * @scopes-beta read:field-configuration-scheme:jira
616
- */
617
- getFieldConfigurationSchemeMappings({
618
- startAt,
619
- maxResults,
620
- fieldConfigurationSchemeId,
621
- }: {
622
- /** The index of the first item to return in a page of results (page offset). */
623
- startAt?: number;
624
- /** The maximum number of items to return per page. */
625
- maxResults?: number;
626
- /**
627
- * The list of field configuration scheme IDs. To include multiple field
628
- * configuration schemes separate IDs with ampersand:
629
- * `fieldConfigurationSchemeId=10000&fieldConfigurationSchemeId=10001`.
630
- */
631
- fieldConfigurationSchemeId?: number[];
632
- }): Promise<PageBeanFieldConfigurationIssueTypeItem> {
633
- return this.getClientInstance()
634
- .request({
635
- path: "/rest/api/3/fieldconfigurationscheme/mapping",
636
- method: "GET",
637
- query: {
638
- startAt,
639
- maxResults,
640
- fieldConfigurationSchemeId,
641
- },
642
- })
643
- .then(
644
- this.getClientInstance().responseHandler({
645
- 200: {
646
- "application/json": "json",
647
- },
648
- }),
649
- )
650
- .then(
651
- commonHttpClient.castResponse<{
652
- status: 200;
653
- mediaType: "application/json";
654
- body: PageBeanFieldConfigurationIssueTypeItem;
655
- }>(),
656
- )
657
- .then(
658
- validationSchemaStorage.validator(
659
- "IssueFieldConfigurationsService.getFieldConfigurationSchemeMappings.response",
660
- ),
661
- )
662
- .then(commonHttpClient.getBody);
663
- }
664
- /**
665
- * Returns a [paginated](#pagination) list of field configuration schemes and, for
666
- * each scheme, a list of the projects that use it.
667
- *
668
- * The list is sorted by field configuration scheme ID. The first item contains
669
- * the list of project IDs assigned to the default field configuration scheme.
670
- *
671
- * Only field configuration schemes used in classic projects are returned.
672
- *
673
- * **[Permissions](#permissions) required:** *Administer Jira* [global
674
- * permission](https://confluence.atlassian.com/x/x4dKLg).
675
- *
676
- * @returns Returned if the request is successful.
677
- *
678
- * example: {
679
- * "isLast": true,
680
- * "maxResults": 50,
681
- * "startAt": 0,
682
- * "total": 5,
683
- * "values": [
684
- * {
685
- * "projectIds": [
686
- * "10",
687
- * "11"
688
- * ]
689
- * },
690
- * {
691
- * "fieldConfigurationScheme": {
692
- * "id": "10002",
693
- * "name": "Field Configuration Scheme for software related projects",
694
- * "description": "We can use this one for software projects."
695
- * },
696
- * "projectIds": [
697
- * "12",
698
- * "13",
699
- * "14"
700
- * ]
701
- * }
702
- * ]
703
- * }
704
- * @path {GET} /rest/api/3/fieldconfigurationscheme/project
705
- * @scopes-current manage:jira-configuration
706
- * @scopes-beta read:field-configuration-scheme:jira
707
- */
708
- getFieldConfigurationSchemeProjectMapping({
709
- startAt,
710
- maxResults,
711
- projectId,
712
- }: {
713
- /** The index of the first item to return in a page of results (page offset). */
714
- startAt?: number;
715
- /** The maximum number of items to return per page. */
716
- maxResults?: number;
717
- /**
718
- * The list of project IDs. To include multiple projects, separate IDs with
719
- * ampersand: `projectId=10000&projectId=10001`.
720
- */
721
- projectId: number[];
722
- }): Promise<PageBeanFieldConfigurationSchemeProjects> {
723
- return this.getClientInstance()
724
- .request({
725
- path: "/rest/api/3/fieldconfigurationscheme/project",
726
- method: "GET",
727
- query: {
728
- startAt,
729
- maxResults,
730
- projectId,
731
- },
732
- })
733
- .then(
734
- this.getClientInstance().responseHandler({
735
- 200: {
736
- "application/json": "json",
737
- },
738
- }),
739
- )
740
- .then(
741
- commonHttpClient.castResponse<{
742
- status: 200;
743
- mediaType: "application/json";
744
- body: PageBeanFieldConfigurationSchemeProjects;
745
- }>(),
746
- )
747
- .then(
748
- validationSchemaStorage.validator(
749
- "IssueFieldConfigurationsService.getFieldConfigurationSchemeProjectMapping.response",
750
- ),
751
- )
752
- .then(commonHttpClient.getBody);
753
- }
754
- /**
755
- * Removes issue types from the field configuration scheme.
756
- *
757
- * This operation can only modify field configuration schemes used in
758
- * company-managed (classic) projects.
759
- *
760
- * **[Permissions](#permissions) required:** *Administer Jira* [global
761
- * permission](https://confluence.atlassian.com/x/x4dKLg).
762
- *
763
- * @returns Returned if the request is successful.
764
- * @path {POST} /rest/api/3/fieldconfigurationscheme/{id}/mapping/delete
765
- * @scopes-current manage:jira-configuration
766
- * @scopes-beta write:field-configuration-scheme:jira
767
- */
768
- removeIssueTypesFromGlobalFieldConfigurationScheme({
769
- id,
770
- issueTypeIdsToRemove,
771
- }: {
772
- /** The ID of the field configuration scheme. */
773
- id: number;
774
- /**
775
- * The issue type IDs to remove.
776
- *
777
- * @example {
778
- * "issueTypeIds": [
779
- * "10000",
780
- * "10001",
781
- * "10002"
782
- * ]
783
- * }
784
- */
785
- issueTypeIdsToRemove: IssueTypeIdsToRemove;
786
- }): Promise<void> {
787
- return this.getClientInstance()
788
- .request({
789
- path: "/rest/api/3/fieldconfigurationscheme/{id}/mapping/delete",
790
- method: "POST",
791
- pathParams: {
792
- id,
793
- },
794
- headers: {
795
- "Content-Type": "application/json",
796
- },
797
- body: issueTypeIdsToRemove,
798
- })
799
- .then(
800
- this.getClientInstance().responseHandler({
801
- 204: {
802
- "application/json": "json",
803
- },
804
- }),
805
- )
806
- .then(
807
- commonHttpClient.castResponse<{
808
- status: 204;
809
- mediaType: "application/json";
810
- body: void;
811
- }>(),
812
- )
813
- .then(
814
- validationSchemaStorage.validator(
815
- "IssueFieldConfigurationsService.removeIssueTypesFromGlobalFieldConfigurationScheme.response",
816
- ),
817
- )
818
- .then(commonHttpClient.getBody);
819
- }
820
- /**
821
- * Assigns issue types to field configurations on field configuration scheme.
822
- *
823
- * This operation can only modify field configuration schemes used in
824
- * company-managed (classic) projects.
825
- *
826
- * **[Permissions](#permissions) required:** *Administer Jira* [global
827
- * permission](https://confluence.atlassian.com/x/x4dKLg).
828
- *
829
- * @returns Returned if the request is successful.
830
- * @path {PUT} /rest/api/3/fieldconfigurationscheme/{id}/mapping
831
- * @scopes-current manage:jira-configuration
832
- * @scopes-beta write:field-configuration-scheme:jira, read:field-configuration-scheme:jira
833
- */
834
- setFieldConfigurationSchemeMapping({
835
- id,
836
- associateFieldConfigurationsWithIssueTypesRequest,
837
- }: {
838
- /** The ID of the field configuration scheme. */
839
- id: number;
840
- /**
841
- * @example {
842
- * "mappings": [
843
- * {
844
- * "fieldConfigurationId": "10000",
845
- * "issueTypeId": "default"
846
- * },
847
- * {
848
- * "fieldConfigurationId": "10002",
849
- * "issueTypeId": "10001"
850
- * },
851
- * {
852
- * "fieldConfigurationId": "10001",
853
- * "issueTypeId": "10002"
854
- * }
855
- * ]
856
- * }
857
- */
858
- associateFieldConfigurationsWithIssueTypesRequest: AssociateFieldConfigurationsWithIssueTypesRequest;
859
- }): Promise<void> {
860
- return this.getClientInstance()
861
- .request({
862
- path: "/rest/api/3/fieldconfigurationscheme/{id}/mapping",
863
- method: "PUT",
864
- pathParams: {
865
- id,
866
- },
867
- headers: {
868
- "Content-Type": "application/json",
869
- },
870
- body: associateFieldConfigurationsWithIssueTypesRequest,
871
- })
872
- .then(
873
- this.getClientInstance().responseHandler({
874
- 204: {
875
- "application/json": "json",
876
- },
877
- }),
878
- )
879
- .then(
880
- commonHttpClient.castResponse<{
881
- status: 204;
882
- mediaType: "application/json";
883
- body: void;
884
- }>(),
885
- )
886
- .then(
887
- validationSchemaStorage.validator(
888
- "IssueFieldConfigurationsService.setFieldConfigurationSchemeMapping.response",
889
- ),
890
- )
891
- .then(commonHttpClient.getBody);
892
- }
893
- /**
894
- * Updates a field configuration. The name and the description provided in the
895
- * request override the existing values.
896
- *
897
- * This operation can only update configurations used in company-managed (classic)
898
- * projects.
899
- *
900
- * **[Permissions](#permissions) required:** *Administer Jira* [global
901
- * permission](https://confluence.atlassian.com/x/x4dKLg).
902
- *
903
- * @returns Returned if the request is successful.
904
- * @path {PUT} /rest/api/3/fieldconfiguration/{id}
905
- * @scopes-current manage:jira-configuration
906
- * @scopes-beta write:field-configuration:jira
907
- */
908
- updateFieldConfiguration({
909
- id,
910
- fieldConfigurationDetails,
911
- }: {
912
- /** The ID of the field configuration. */
913
- id: number;
914
- /**
915
- * @example {
916
- * "description": "A brand new description",
917
- * "name": "My Modified Field Configuration"
918
- * }
919
- */
920
- fieldConfigurationDetails: FieldConfigurationDetails;
921
- }): Promise<void> {
922
- return this.getClientInstance()
923
- .request({
924
- path: "/rest/api/3/fieldconfiguration/{id}",
925
- method: "PUT",
926
- pathParams: {
927
- id,
928
- },
929
- headers: {
930
- "Content-Type": "application/json",
931
- },
932
- body: fieldConfigurationDetails,
933
- })
934
- .then(
935
- this.getClientInstance().responseHandler({
936
- 204: {
937
- "application/json": "json",
938
- },
939
- }),
940
- )
941
- .then(
942
- commonHttpClient.castResponse<{
943
- status: 204;
944
- mediaType: "application/json";
945
- body: void;
946
- }>(),
947
- )
948
- .then(
949
- validationSchemaStorage.validator(
950
- "IssueFieldConfigurationsService.updateFieldConfiguration.response",
951
- ),
952
- )
953
- .then(commonHttpClient.getBody);
954
- }
955
- /**
956
- * Updates fields in a field configuration. The properties of the field
957
- * configuration fields provided override the existing values.
958
- *
959
- * This operation can only update field configurations used in company-managed
960
- * (classic) projects.
961
- *
962
- * The operation can set the renderer for text fields to the default text renderer
963
- * (`text-renderer`) or wiki style renderer (`wiki-renderer`). However, the
964
- * renderer cannot be updated for fields using the autocomplete renderer
965
- * (`autocomplete-renderer`).
966
- *
967
- * **[Permissions](#permissions) required:** *Administer Jira* [global
968
- * permission](https://confluence.atlassian.com/x/x4dKLg).
969
- *
970
- * @returns Returned if the request is successful.
971
- * @path {PUT} /rest/api/3/fieldconfiguration/{id}/fields
972
- * @scopes-current manage:jira-configuration
973
- * @scopes-beta write:field-configuration:jira
974
- */
975
- updateFieldConfigurationItems({
976
- id,
977
- fieldConfigurationItemsDetails,
978
- }: {
979
- /** The ID of the field configuration. */
980
- id: number;
981
- /**
982
- * @example {
983
- * "fieldConfigurationItems": [
984
- * {
985
- * "description": "The new description of this item.",
986
- * "id": "customfield_10012",
987
- * "isHidden": false
988
- * },
989
- * {
990
- * "id": "customfield_10011",
991
- * "isRequired": true
992
- * },
993
- * {
994
- * "description": "Another new description.",
995
- * "id": "customfield_10010",
996
- * "isHidden": false,
997
- * "isRequired": false,
998
- * "renderer": "wiki-renderer"
999
- * }
1000
- * ]
1001
- * }
1002
- */
1003
- fieldConfigurationItemsDetails: FieldConfigurationItemsDetails;
1004
- }): Promise<void> {
1005
- return this.getClientInstance()
1006
- .request({
1007
- path: "/rest/api/3/fieldconfiguration/{id}/fields",
1008
- method: "PUT",
1009
- pathParams: {
1010
- id,
1011
- },
1012
- headers: {
1013
- "Content-Type": "application/json",
1014
- },
1015
- body: fieldConfigurationItemsDetails,
1016
- })
1017
- .then(
1018
- this.getClientInstance().responseHandler({
1019
- 204: {
1020
- "application/json": "json",
1021
- },
1022
- }),
1023
- )
1024
- .then(
1025
- commonHttpClient.castResponse<{
1026
- status: 204;
1027
- mediaType: "application/json";
1028
- body: void;
1029
- }>(),
1030
- )
1031
- .then(
1032
- validationSchemaStorage.validator(
1033
- "IssueFieldConfigurationsService.updateFieldConfigurationItems.response",
1034
- ),
1035
- )
1036
- .then(commonHttpClient.getBody);
1037
- }
1038
- /**
1039
- * Updates a field configuration scheme.
1040
- *
1041
- * This operation can only update field configuration schemes used in
1042
- * company-managed (classic) projects.
1043
- *
1044
- * **[Permissions](#permissions) required:** *Administer Jira* [global
1045
- * permission](https://confluence.atlassian.com/x/x4dKLg).
1046
- *
1047
- * @returns Returned if the request is successful.
1048
- * @path {PUT} /rest/api/3/fieldconfigurationscheme/{id}
1049
- * @scopes-current manage:jira-configuration
1050
- * @scopes-beta write:field-configuration-scheme:jira
1051
- */
1052
- updateFieldConfigurationScheme({
1053
- id,
1054
- updateFieldConfigurationSchemeDetails,
1055
- }: {
1056
- /** The ID of the field configuration scheme. */
1057
- id: number;
1058
- /**
1059
- * The details of the field configuration scheme.
1060
- *
1061
- * @example {
1062
- * "description": "We can use this one for software projects.",
1063
- * "name": "Field Configuration Scheme for software related projects"
1064
- * }
1065
- */
1066
- updateFieldConfigurationSchemeDetails: UpdateFieldConfigurationSchemeDetails;
1067
- }): Promise<void> {
1068
- return this.getClientInstance()
1069
- .request({
1070
- path: "/rest/api/3/fieldconfigurationscheme/{id}",
1071
- method: "PUT",
1072
- pathParams: {
1073
- id,
1074
- },
1075
- headers: {
1076
- "Content-Type": "application/json",
1077
- },
1078
- body: updateFieldConfigurationSchemeDetails,
1079
- })
1080
- .then(
1081
- this.getClientInstance().responseHandler({
1082
- 204: {
1083
- "application/json": "json",
1084
- },
1085
- }),
1086
- )
1087
- .then(
1088
- commonHttpClient.castResponse<{
1089
- status: 204;
1090
- mediaType: "application/json";
1091
- body: void;
1092
- }>(),
1093
- )
1094
- .then(
1095
- validationSchemaStorage.validator(
1096
- "IssueFieldConfigurationsService.updateFieldConfigurationScheme.response",
1097
- ),
1098
- )
1099
- .then(commonHttpClient.getBody);
1100
- }
1101
- static initialize() {
1102
- validationSchemaStorage.registerExtensible(
1103
- "IssueFieldConfigurationsService.getAllFieldConfigurations.response",
1104
- z
1105
- .object({
1106
- status: z.literal(200),
1107
- mediaType: z.literal("application/json"),
1108
- body: validationSchemaStorage.lazy(
1109
- "PageBeanFieldConfigurationDetails",
1110
- ),
1111
- })
1112
- .describe(
1113
- "IssueFieldConfigurationsService.getAllFieldConfigurations.response",
1114
- ),
1115
- );
1116
- validationSchemaStorage.registerExtensible(
1117
- "IssueFieldConfigurationsService.createFieldConfiguration.response",
1118
- z
1119
- .object({
1120
- status: z.literal(200),
1121
- mediaType: z.literal("application/json"),
1122
- body: validationSchemaStorage.lazy("FieldConfiguration"),
1123
- })
1124
- .describe(
1125
- "IssueFieldConfigurationsService.createFieldConfiguration.response",
1126
- ),
1127
- );
1128
- validationSchemaStorage.registerExtensible(
1129
- "IssueFieldConfigurationsService.updateFieldConfiguration.response",
1130
- z
1131
- .object({
1132
- status: z.literal(204),
1133
- mediaType: z.literal("application/json"),
1134
- body: z.unknown(),
1135
- })
1136
- .describe(
1137
- "IssueFieldConfigurationsService.updateFieldConfiguration.response",
1138
- ),
1139
- );
1140
- validationSchemaStorage.registerExtensible(
1141
- "IssueFieldConfigurationsService.deleteFieldConfiguration.response",
1142
- z
1143
- .object({
1144
- status: z.literal(204),
1145
- mediaType: z.literal("application/json"),
1146
- body: z.unknown(),
1147
- })
1148
- .describe(
1149
- "IssueFieldConfigurationsService.deleteFieldConfiguration.response",
1150
- ),
1151
- );
1152
- validationSchemaStorage.registerExtensible(
1153
- "IssueFieldConfigurationsService.getFieldConfigurationItems.response",
1154
- z
1155
- .object({
1156
- status: z.literal(200),
1157
- mediaType: z.literal("application/json"),
1158
- body: validationSchemaStorage.lazy("PageBeanFieldConfigurationItem"),
1159
- })
1160
- .describe(
1161
- "IssueFieldConfigurationsService.getFieldConfigurationItems.response",
1162
- ),
1163
- );
1164
- validationSchemaStorage.registerExtensible(
1165
- "IssueFieldConfigurationsService.updateFieldConfigurationItems.response",
1166
- z
1167
- .object({
1168
- status: z.literal(204),
1169
- mediaType: z.literal("application/json"),
1170
- body: z.unknown(),
1171
- })
1172
- .describe(
1173
- "IssueFieldConfigurationsService.updateFieldConfigurationItems.response",
1174
- ),
1175
- );
1176
- validationSchemaStorage.registerExtensible(
1177
- "IssueFieldConfigurationsService.getAllFieldConfigurationSchemes.response",
1178
- z
1179
- .object({
1180
- status: z.literal(200),
1181
- mediaType: z.literal("application/json"),
1182
- body: validationSchemaStorage.lazy(
1183
- "PageBeanFieldConfigurationScheme",
1184
- ),
1185
- })
1186
- .describe(
1187
- "IssueFieldConfigurationsService.getAllFieldConfigurationSchemes.response",
1188
- ),
1189
- );
1190
- validationSchemaStorage.registerExtensible(
1191
- "IssueFieldConfigurationsService.createFieldConfigurationScheme.response",
1192
- z
1193
- .object({
1194
- status: z.literal(201),
1195
- mediaType: z.literal("application/json"),
1196
- body: validationSchemaStorage.lazy("FieldConfigurationScheme"),
1197
- })
1198
- .describe(
1199
- "IssueFieldConfigurationsService.createFieldConfigurationScheme.response",
1200
- ),
1201
- );
1202
- validationSchemaStorage.registerExtensible(
1203
- "IssueFieldConfigurationsService.updateFieldConfigurationScheme.response",
1204
- z
1205
- .object({
1206
- status: z.literal(204),
1207
- mediaType: z.literal("application/json"),
1208
- body: z.unknown(),
1209
- })
1210
- .describe(
1211
- "IssueFieldConfigurationsService.updateFieldConfigurationScheme.response",
1212
- ),
1213
- );
1214
- validationSchemaStorage.registerExtensible(
1215
- "IssueFieldConfigurationsService.deleteFieldConfigurationScheme.response",
1216
- z
1217
- .object({
1218
- status: z.literal(204),
1219
- mediaType: z.literal("application/json"),
1220
- body: z.unknown(),
1221
- })
1222
- .describe(
1223
- "IssueFieldConfigurationsService.deleteFieldConfigurationScheme.response",
1224
- ),
1225
- );
1226
- validationSchemaStorage.registerExtensible(
1227
- "IssueFieldConfigurationsService.setFieldConfigurationSchemeMapping.response",
1228
- z
1229
- .object({
1230
- status: z.literal(204),
1231
- mediaType: z.literal("application/json"),
1232
- body: z.unknown(),
1233
- })
1234
- .describe(
1235
- "IssueFieldConfigurationsService.setFieldConfigurationSchemeMapping.response",
1236
- ),
1237
- );
1238
- validationSchemaStorage.registerExtensible(
1239
- "IssueFieldConfigurationsService.removeIssueTypesFromGlobalFieldConfigurationScheme.response",
1240
- z
1241
- .object({
1242
- status: z.literal(204),
1243
- mediaType: z.literal("application/json"),
1244
- body: z.unknown(),
1245
- })
1246
- .describe(
1247
- "IssueFieldConfigurationsService.removeIssueTypesFromGlobalFieldConfigurationScheme.response",
1248
- ),
1249
- );
1250
- validationSchemaStorage.registerExtensible(
1251
- "IssueFieldConfigurationsService.getFieldConfigurationSchemeMappings.response",
1252
- z
1253
- .object({
1254
- status: z.literal(200),
1255
- mediaType: z.literal("application/json"),
1256
- body: validationSchemaStorage.lazy(
1257
- "PageBeanFieldConfigurationIssueTypeItem",
1258
- ),
1259
- })
1260
- .describe(
1261
- "IssueFieldConfigurationsService.getFieldConfigurationSchemeMappings.response",
1262
- ),
1263
- );
1264
- validationSchemaStorage.registerExtensible(
1265
- "IssueFieldConfigurationsService.getFieldConfigurationSchemeProjectMapping.response",
1266
- z
1267
- .object({
1268
- status: z.literal(200),
1269
- mediaType: z.literal("application/json"),
1270
- body: validationSchemaStorage.lazy(
1271
- "PageBeanFieldConfigurationSchemeProjects",
1272
- ),
1273
- })
1274
- .describe(
1275
- "IssueFieldConfigurationsService.getFieldConfigurationSchemeProjectMapping.response",
1276
- ),
1277
- );
1278
- validationSchemaStorage.registerExtensible(
1279
- "IssueFieldConfigurationsService.assignFieldConfigurationSchemeToProject.response",
1280
- z
1281
- .object({
1282
- status: z.literal(204),
1283
- mediaType: z.literal("application/json"),
1284
- body: z.unknown(),
1285
- })
1286
- .describe(
1287
- "IssueFieldConfigurationsService.assignFieldConfigurationSchemeToProject.response",
1288
- ),
1289
- );
1290
- validationSchemaStorage.registerOnce([
1291
- registerIssueFieldConfigurationsValidationSchemas,
1292
- ]);
1293
- }
1294
- }