@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,403 +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 CreateUiModificationDetails,
10
- type PageBeanUiModificationDetails,
11
- registerUiModificationsAppsValidationSchemas,
12
- type UiModificationIdentifiers,
13
- type UpdateUiModificationDetails,
14
- } from "../models/ui-modifications-apps";
15
- import { validationSchemaStorage } from "../validation-schema-storage";
16
- /**
17
- * UI modifications is a feature available for **Forge apps only**. It enables
18
- * Forge apps to control how selected Jira fields behave on the following views:
19
- * global issue create, issue view. For example: hide specific fields, set them as
20
- * required, etc.
21
- */
22
- export class UiModificationsAppsService extends CommonHttpService {
23
- /**
24
- * Creates a UI modification. UI modification can only be created by Forge apps.
25
- *
26
- * Each app can define up to 3000 UI modifications. Each UI modification can
27
- * define up to 1000 contexts. The same context can be assigned to maximum 100 UI
28
- * modifications.
29
- *
30
- * **[Permissions](#permissions) required:**
31
- *
32
- * * *None* if the UI modification is created without contexts.
33
- * * *Browse projects* [project
34
- * permission](https://confluence.atlassian.com/x/yodKLg) for one or more
35
- * projects, if the UI modification is created with contexts.
36
- *
37
- * @returns Returned if the UI modification is created.
38
- *
39
- * example: {
40
- * "id": "d7dbda8a-6239-4b63-8e13-a5ef975c8e61",
41
- * "self":
42
- * "https://api.atlassian.com/ex/jira/{cloudid}/rest/api/2/uiModifications/d7dbda8a-6239-4b63-8e13-a5ef975c8e61"
43
- * }
44
- * @path {POST} /rest/api/3/uiModifications
45
- */
46
- createUiModification({
47
- createUiModificationDetails,
48
- }: {
49
- /**
50
- * Details of the UI modification.
51
- *
52
- * @example {
53
- * "contexts": [
54
- * {
55
- * "issueTypeId": "10000",
56
- * "projectId": "10000",
57
- * "viewType": "GIC"
58
- * },
59
- * {
60
- * "issueTypeId": "10001",
61
- * "projectId": "10000",
62
- * "viewType": "IssueView"
63
- * },
64
- * {
65
- * "issueTypeId": "10002",
66
- * "projectId": "10000",
67
- * "viewType": null
68
- * }
69
- * ],
70
- * "data": "{field: 'Story Points', config: {hidden: false}}",
71
- * "description": "Reveals Story Points field when any Sprint is selected.",
72
- * "name": "Reveal Story Points"
73
- * }
74
- */
75
- createUiModificationDetails: CreateUiModificationDetails;
76
- }): Promise<UiModificationIdentifiers> {
77
- return this.getClientInstance()
78
- .request({
79
- path: "/rest/api/3/uiModifications",
80
- method: "POST",
81
- headers: {
82
- "Content-Type": "application/json",
83
- },
84
- body: createUiModificationDetails,
85
- })
86
- .then(
87
- this.getClientInstance().responseHandler({
88
- 201: {
89
- "application/json": "json",
90
- },
91
- }),
92
- )
93
- .then(
94
- commonHttpClient.castResponse<{
95
- status: 201;
96
- mediaType: "application/json";
97
- body: UiModificationIdentifiers;
98
- }>(),
99
- )
100
- .then(
101
- validationSchemaStorage.validator(
102
- "UiModificationsAppsService.createUiModification.response",
103
- ),
104
- )
105
- .then(commonHttpClient.getBody);
106
- }
107
- /**
108
- * Deletes a UI modification. All the contexts that belong to the UI modification
109
- * are deleted too. UI modification can only be deleted by Forge apps.
110
- *
111
- * **[Permissions](#permissions) required:** None.
112
- *
113
- * @returns Returned if the UI modification is deleted.
114
- * @path {DELETE} /rest/api/3/uiModifications/{uiModificationId}
115
- */
116
- deleteUiModification({
117
- uiModificationId,
118
- }: {
119
- /** The ID of the UI modification. */
120
- uiModificationId: string;
121
- }): Promise<void> {
122
- return this.getClientInstance()
123
- .request({
124
- path: "/rest/api/3/uiModifications/{uiModificationId}",
125
- method: "DELETE",
126
- pathParams: {
127
- uiModificationId,
128
- },
129
- })
130
- .then(
131
- this.getClientInstance().responseHandler({
132
- 204: {
133
- "application/json": "json",
134
- },
135
- }),
136
- )
137
- .then(
138
- commonHttpClient.castResponse<{
139
- status: 204;
140
- mediaType: "application/json";
141
- body: void;
142
- }>(),
143
- )
144
- .then(
145
- validationSchemaStorage.validator(
146
- "UiModificationsAppsService.deleteUiModification.response",
147
- ),
148
- )
149
- .then(commonHttpClient.getBody);
150
- }
151
- /**
152
- * Gets UI modifications. UI modifications can only be retrieved by Forge apps.
153
- *
154
- * **[Permissions](#permissions) required:** None.
155
- *
156
- * @returns Returned if the request is successful.
157
- *
158
- * example: {
159
- * "isLast": true,
160
- * "maxResults": 100,
161
- * "startAt": 0,
162
- * "total": 3,
163
- * "values": [
164
- * {
165
- * "id": "d7dbda8a-6239-4b63-8e13-a5ef975c8e61",
166
- * "name": "Reveal Story Points",
167
- * "description": "Reveals Story Points field when any Sprint is selected.",
168
- * "self":
169
- * "https://api.atlassian.com/ex/jira/{cloudid}/rest/api/2/uiModifications/d7dbda8a-6239-4b63-8e13-a5ef975c8e61",
170
- * "data": "{field: 'Story Points', config: {hidden: false}}",
171
- * "contexts": [
172
- * {
173
- * "id": "1533537a-bda3-4ac6-8481-846128cd9ef4",
174
- * "projectId": "10000",
175
- * "issueTypeId": "10000",
176
- * "viewType": "GIC",
177
- * "isAvailable": true
178
- * },
179
- * {
180
- * "id": "c016fefa-6eb3-40c9-8596-4c4ef273e67c",
181
- * "projectId": "10000",
182
- * "issueTypeId": "10001",
183
- * "viewType": "IssueView",
184
- * "isAvailable": true
185
- * }
186
- * ]
187
- * },
188
- * {
189
- * "id": "e4fe8db5-f82f-416b-a3aa-b260b55da577",
190
- * "name": "Set Assignee",
191
- * "description": "Sets the Assignee field automatically.",
192
- * "self":
193
- * "https://api.atlassian.com/ex/jira/{cloudid}/rest/api/2/uiModifications/e4fe8db5-f82f-416b-a3aa-b260b55da577",
194
- * "contexts": [
195
- * {
196
- * "id": "8b3740f9-8780-4958-8228-69dcfbda11d9",
197
- * "projectId": "10000",
198
- * "issueTypeId": "10000",
199
- * "viewType": "GIC",
200
- * "isAvailable": true
201
- * }
202
- * ]
203
- * },
204
- * {
205
- * "id": "1453f993-79ce-4389-a36d-eb72d5c85dd6",
206
- * "name": "Hide Labels",
207
- * "description": "Hides Labels if any component is provided.",
208
- * "self":
209
- * "https://api.atlassian.com/ex/jira/{cloudid}/rest/api/2/uiModifications/1453f993-79ce-4389-a36d-eb72d5c85dd6",
210
- * "contexts": []
211
- * },
212
- * {
213
- * "id": "d3f4097e-8d8e-451e-9fb6-27c3c8c3bfff",
214
- * "name": "Wildcard example",
215
- * "description": "This context is applied to all issue types",
216
- * "self":
217
- * "https://api.atlassian.com/ex/jira/{cloudid}/rest/api/2/uiModifications/d3f4097e-8d8e-451e-9fb6-27c3c8c3bfff",
218
- * "contexts": [
219
- * {
220
- * "id": "521f2181-5d5e-46ea-9fc9-871bbf245b8b",
221
- * "projectId": "10000",
222
- * "issueTypeId": null,
223
- * "viewType": "GIC",
224
- * "isAvailable": true
225
- * }
226
- * ]
227
- * }
228
- * ]
229
- * }
230
- * @path {GET} /rest/api/3/uiModifications
231
- */
232
- getUiModifications({
233
- startAt,
234
- maxResults,
235
- expand,
236
- }: {
237
- /** The index of the first item to return in a page of results (page offset). */
238
- startAt?: number;
239
- /** The maximum number of items to return per page. */
240
- maxResults?: number;
241
- /**
242
- * Use expand to include additional information in the response. This parameter
243
- * accepts a comma-separated list. Expand options include:
244
- *
245
- * * `data` Returns UI modification data.
246
- * * `contexts` Returns UI modification contexts.
247
- */
248
- expand?: string;
249
- }): Promise<PageBeanUiModificationDetails> {
250
- return this.getClientInstance()
251
- .request({
252
- path: "/rest/api/3/uiModifications",
253
- method: "GET",
254
- query: {
255
- startAt,
256
- maxResults,
257
- expand,
258
- },
259
- })
260
- .then(
261
- this.getClientInstance().responseHandler({
262
- 200: {
263
- "application/json": "json",
264
- },
265
- }),
266
- )
267
- .then(
268
- commonHttpClient.castResponse<{
269
- status: 200;
270
- mediaType: "application/json";
271
- body: PageBeanUiModificationDetails;
272
- }>(),
273
- )
274
- .then(
275
- validationSchemaStorage.validator(
276
- "UiModificationsAppsService.getUiModifications.response",
277
- ),
278
- )
279
- .then(commonHttpClient.getBody);
280
- }
281
- /**
282
- * Updates a UI modification. UI modification can only be updated by Forge apps.
283
- *
284
- * Each UI modification can define up to 1000 contexts. The same context can be
285
- * assigned to maximum 100 UI modifications.
286
- *
287
- * **[Permissions](#permissions) required:**
288
- *
289
- * * *None* if the UI modification is created without contexts.
290
- * * *Browse projects* [project
291
- * permission](https://confluence.atlassian.com/x/yodKLg) for one or more
292
- * projects, if the UI modification is created with contexts.
293
- *
294
- * @returns Returned if the UI modification is updated.
295
- * @path {PUT} /rest/api/3/uiModifications/{uiModificationId}
296
- */
297
- updateUiModification({
298
- uiModificationId,
299
- updateUiModificationDetails,
300
- }: {
301
- /** The ID of the UI modification. */
302
- uiModificationId: string;
303
- /**
304
- * Details of the UI modification.
305
- *
306
- * @example {
307
- * "contexts": [
308
- * {
309
- * "issueTypeId": "10000",
310
- * "projectId": "10000",
311
- * "viewType": "GIC"
312
- * },
313
- * {
314
- * "issueTypeId": "10001",
315
- * "projectId": "10000",
316
- * "viewType": "IssueView"
317
- * }
318
- * ],
319
- * "data": "{field: 'Story Points', config: {hidden: true}}",
320
- * "name": "Updated Reveal Story Points"
321
- * }
322
- */
323
- updateUiModificationDetails: UpdateUiModificationDetails;
324
- }): Promise<void> {
325
- return this.getClientInstance()
326
- .request({
327
- path: "/rest/api/3/uiModifications/{uiModificationId}",
328
- method: "PUT",
329
- pathParams: {
330
- uiModificationId,
331
- },
332
- headers: {
333
- "Content-Type": "application/json",
334
- },
335
- body: updateUiModificationDetails,
336
- })
337
- .then(
338
- this.getClientInstance().responseHandler({
339
- 204: {
340
- "application/json": "json",
341
- },
342
- }),
343
- )
344
- .then(
345
- commonHttpClient.castResponse<{
346
- status: 204;
347
- mediaType: "application/json";
348
- body: void;
349
- }>(),
350
- )
351
- .then(
352
- validationSchemaStorage.validator(
353
- "UiModificationsAppsService.updateUiModification.response",
354
- ),
355
- )
356
- .then(commonHttpClient.getBody);
357
- }
358
- static initialize() {
359
- validationSchemaStorage.registerExtensible(
360
- "UiModificationsAppsService.getUiModifications.response",
361
- z
362
- .object({
363
- status: z.literal(200),
364
- mediaType: z.literal("application/json"),
365
- body: validationSchemaStorage.lazy("PageBeanUiModificationDetails"),
366
- })
367
- .describe("UiModificationsAppsService.getUiModifications.response"),
368
- );
369
- validationSchemaStorage.registerExtensible(
370
- "UiModificationsAppsService.createUiModification.response",
371
- z
372
- .object({
373
- status: z.literal(201),
374
- mediaType: z.literal("application/json"),
375
- body: validationSchemaStorage.lazy("UiModificationIdentifiers"),
376
- })
377
- .describe("UiModificationsAppsService.createUiModification.response"),
378
- );
379
- validationSchemaStorage.registerExtensible(
380
- "UiModificationsAppsService.updateUiModification.response",
381
- z
382
- .object({
383
- status: z.literal(204),
384
- mediaType: z.literal("application/json"),
385
- body: z.unknown(),
386
- })
387
- .describe("UiModificationsAppsService.updateUiModification.response"),
388
- );
389
- validationSchemaStorage.registerExtensible(
390
- "UiModificationsAppsService.deleteUiModification.response",
391
- z
392
- .object({
393
- status: z.literal(204),
394
- mediaType: z.literal("application/json"),
395
- body: z.unknown(),
396
- })
397
- .describe("UiModificationsAppsService.deleteUiModification.response"),
398
- );
399
- validationSchemaStorage.registerOnce([
400
- registerUiModificationsAppsValidationSchemas,
401
- ]);
402
- }
403
- }