@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,485 +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 PageBeanWorkflowTransitionRules,
10
- registerWorkflowTransitionRulesValidationSchemas,
11
- type WorkflowsWithTransitionRulesDetails,
12
- type WorkflowTransitionRulesUpdate,
13
- type WorkflowTransitionRulesUpdateErrors,
14
- } from "../models/workflow-transition-rules";
15
- import { validationSchemaStorage } from "../validation-schema-storage";
16
- /**
17
- * This resource represents workflow transition rules. Workflow transition rules
18
- * define a Connect or a Forge app routine, such as a [workflow post
19
- * functions](https://developer.atlassian.com/cloud/jira/platform/modules/workflow-post-function/)
20
- * that is executed in association with the workflow. Use it to read and modify
21
- * configuration of workflow transition rules.
22
- */
23
- export class WorkflowTransitionRulesService extends CommonHttpService {
24
- /**
25
- * Deletes workflow transition rules from one or more workflows. These rule types
26
- * are supported:
27
- *
28
- * * [post
29
- * functions](https://developer.atlassian.com/cloud/jira/platform/modules/workflow-post-function/)
30
- * *
31
- * [conditions](https://developer.atlassian.com/cloud/jira/platform/modules/workflow-condition/)
32
- * *
33
- * [validators](https://developer.atlassian.com/cloud/jira/platform/modules/workflow-validator/)
34
- *
35
- * Only rules created by the calling Connect app can be deleted.
36
- *
37
- * **[Permissions](#permissions) required:** Only Connect apps can use this
38
- * operation.
39
- *
40
- * @returns Returned if the request is successful.
41
- *
42
- * example: {
43
- * "updateResults": [
44
- * {
45
- * "workflowId": {
46
- * "name": "Workflow with one rule not updated",
47
- * "draft": false
48
- * },
49
- * "ruleUpdateErrors": {
50
- * "example-rule-id": [
51
- * "The rule with this id does not exist: example-rule-id"
52
- * ]
53
- * },
54
- * "updateErrors": []
55
- * },
56
- * {
57
- * "workflowId": {
58
- * "name": "Workflow with all rules successfully updated",
59
- * "draft": true
60
- * },
61
- * "ruleUpdateErrors": {},
62
- * "updateErrors": []
63
- * },
64
- * {
65
- * "workflowId": {
66
- * "name": "Non-existing workflow",
67
- * "draft": false
68
- * },
69
- * "ruleUpdateErrors": {},
70
- * "updateErrors": [
71
- * "Workflow not found: WorkflowIdBean{name=Non-existing workflow,
72
- * draft=false}"
73
- * ]
74
- * }
75
- * ]
76
- * }
77
- * @path {PUT} /rest/api/3/workflow/rule/config/delete
78
- */
79
- deleteWorkflowTransitionRuleConfigurations({
80
- workflowsWithTransitionRulesDetails,
81
- }: {
82
- /**
83
- * @example {
84
- * "workflows": [
85
- * {
86
- * "workflowId": {
87
- * "draft": false,
88
- * "name": "Internal support workflow"
89
- * },
90
- * "workflowRuleIds": [
91
- * "b4d6cbdc-59f5-11e9-8647-d663bd873d93",
92
- * "d663bd873d93-59f5-11e9-8647-b4d6cbdc",
93
- * "11e9-59f5-b4d6cbdc-8647-d663bd873d93"
94
- * ]
95
- * }
96
- * ]
97
- * }
98
- */
99
- workflowsWithTransitionRulesDetails: WorkflowsWithTransitionRulesDetails;
100
- }): Promise<WorkflowTransitionRulesUpdateErrors> {
101
- return this.getClientInstance()
102
- .request({
103
- path: "/rest/api/3/workflow/rule/config/delete",
104
- method: "PUT",
105
- headers: {
106
- "Content-Type": "application/json",
107
- },
108
- body: workflowsWithTransitionRulesDetails,
109
- })
110
- .then(
111
- this.getClientInstance().responseHandler({
112
- 200: {
113
- "application/json": "json",
114
- },
115
- }),
116
- )
117
- .then(
118
- commonHttpClient.castResponse<{
119
- status: 200;
120
- mediaType: "application/json";
121
- body: WorkflowTransitionRulesUpdateErrors;
122
- }>(),
123
- )
124
- .then(
125
- validationSchemaStorage.validator(
126
- "WorkflowTransitionRulesService.deleteWorkflowTransitionRuleConfigurations.response",
127
- ),
128
- )
129
- .then(commonHttpClient.getBody);
130
- }
131
- /**
132
- * Returns a [paginated](#pagination) list of workflows with transition rules. The
133
- * workflows can be filtered to return only those containing workflow transition
134
- * rules:
135
- *
136
- * * of one or more transition rule types, such as [workflow post
137
- * functions](https://developer.atlassian.com/cloud/jira/platform/modules/workflow-post-function/).
138
- * * matching one or more transition rule keys.
139
- *
140
- * Only workflows containing transition rules created by the calling
141
- * [Connect](https://developer.atlassian.com/cloud/jira/platform/index/#connect-apps)
142
- * or
143
- * [Forge](https://developer.atlassian.com/cloud/jira/platform/index/#forge-apps)
144
- * app are returned.
145
- *
146
- * Due to server-side optimizations, workflows with an empty list of rules may be
147
- * returned; these workflows can be ignored.
148
- *
149
- * **[Permissions](#permissions) required:** Only
150
- * [Connect](https://developer.atlassian.com/cloud/jira/platform/index/#connect-apps)
151
- * or
152
- * [Forge](https://developer.atlassian.com/cloud/jira/platform/index/#forge-apps)
153
- * apps can use this operation.
154
- *
155
- * @returns Returned if the request is successful.
156
- *
157
- * example: {
158
- * "isLast": true,
159
- * "maxResults": 10,
160
- * "startAt": 0,
161
- * "total": 1,
162
- * "values": [
163
- * {
164
- * "workflowId": {
165
- * "name": "My Workflow name",
166
- * "draft": false
167
- * },
168
- * "postFunctions": [
169
- * {
170
- * "id": "b4d6cbdc-59f5-11e9-8647-d663bd873d93",
171
- * "key": "postfunction-key",
172
- * "configuration": {
173
- * "value": "{ \"color\": \"red\" }",
174
- * "disabled": false,
175
- * "tag": "Sample tag"
176
- * },
177
- * "transition": {
178
- * "id": 1,
179
- * "name": "Open"
180
- * }
181
- * }
182
- * ],
183
- * "conditions": [
184
- * {
185
- * "id": "d663bd873d93-59f5-11e9-8647-b4d6cbdc",
186
- * "key": "condition-key",
187
- * "configuration": {
188
- * "value": "{ \"size\": \"medium\" }",
189
- * "disabled": false,
190
- * "tag": "Another tag"
191
- * },
192
- * "transition": {
193
- * "id": 1,
194
- * "name": "Open"
195
- * }
196
- * }
197
- * ],
198
- * "validators": [
199
- * {
200
- * "id": "11e9-59f5-b4d6cbdc-8647-d663bd873d93",
201
- * "key": "validator-key",
202
- * "configuration": {
203
- * "value": "\"{ \\\"shape\\\": \\\"square\\\" }\"",
204
- * "disabled": false
205
- * },
206
- * "transition": {
207
- * "id": 1,
208
- * "name": "Open"
209
- * }
210
- * }
211
- * ]
212
- * }
213
- * ]
214
- * }
215
- * @path {GET} /rest/api/3/workflow/rule/config
216
- * @scopes-current manage:jira-configuration
217
- * @scopes-beta read:workflow:jira
218
- */
219
- getWorkflowTransitionRuleConfigurations({
220
- startAt,
221
- maxResults,
222
- types,
223
- keys,
224
- workflowNames,
225
- withTags,
226
- draft,
227
- expand,
228
- }: {
229
- /** The index of the first item to return in a page of results (page offset). */
230
- startAt?: number;
231
- /** The maximum number of items to return per page. */
232
- maxResults?: number;
233
- /** The types of the transition rules to return. */
234
- types: ("postfunction" | "condition" | "validator")[];
235
- /**
236
- * The transition rule class keys, as defined in the Connect or the Forge app
237
- * descriptor, of the transition rules to return.
238
- */
239
- keys?: string[];
240
- /** The list of workflow names to filter by. */
241
- workflowNames?: string[];
242
- /** The list of `tags` to filter by. */
243
- withTags?: string[];
244
- /**
245
- * Whether draft or published workflows are returned. If not provided, both
246
- * workflow types are returned.
247
- */
248
- draft?: boolean;
249
- /**
250
- * Use [expand](#expansion) to include additional information in the response.
251
- * This parameter accepts `transition`, which, for each rule, returns information
252
- * about the transition the rule is assigned to.
253
- */
254
- expand?: string;
255
- }): Promise<PageBeanWorkflowTransitionRules> {
256
- return this.getClientInstance()
257
- .request({
258
- path: "/rest/api/3/workflow/rule/config",
259
- method: "GET",
260
- query: {
261
- startAt,
262
- maxResults,
263
- types,
264
- keys,
265
- workflowNames,
266
- withTags,
267
- draft,
268
- expand,
269
- },
270
- })
271
- .then(
272
- this.getClientInstance().responseHandler({
273
- 200: {
274
- "application/json": "json",
275
- },
276
- }),
277
- )
278
- .then(
279
- commonHttpClient.castResponse<{
280
- status: 200;
281
- mediaType: "application/json";
282
- body: PageBeanWorkflowTransitionRules;
283
- }>(),
284
- )
285
- .then(
286
- validationSchemaStorage.validator(
287
- "WorkflowTransitionRulesService.getWorkflowTransitionRuleConfigurations.response",
288
- ),
289
- )
290
- .then(commonHttpClient.getBody);
291
- }
292
- /**
293
- * Updates configuration of workflow transition rules. The following rule types
294
- * are supported:
295
- *
296
- * * [post
297
- * functions](https://developer.atlassian.com/cloud/jira/platform/modules/workflow-post-function/)
298
- * *
299
- * [conditions](https://developer.atlassian.com/cloud/jira/platform/modules/workflow-condition/)
300
- * *
301
- * [validators](https://developer.atlassian.com/cloud/jira/platform/modules/workflow-validator/)
302
- *
303
- * Only rules created by the calling
304
- * [Connect](https://developer.atlassian.com/cloud/jira/platform/index/#connect-apps)
305
- * or
306
- * [Forge](https://developer.atlassian.com/cloud/jira/platform/index/#forge-apps)
307
- * app can be updated.
308
- *
309
- * To assist with app migration, this operation can be used to:
310
- *
311
- * * Disable a rule.
312
- * * Add a `tag`. Use this to filter rules in the [Get workflow transition rule
313
- * configurations](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-workflow-transition-rules/#api-rest-api-3-workflow-rule-config-get).
314
- *
315
- * Rules are enabled if the `disabled` parameter is not provided.
316
- *
317
- * **[Permissions](#permissions) required:** Only
318
- * [Connect](https://developer.atlassian.com/cloud/jira/platform/index/#connect-apps)
319
- * or
320
- * [Forge](https://developer.atlassian.com/cloud/jira/platform/index/#forge-apps)
321
- * apps can use this operation.
322
- *
323
- * @returns Returned if the request is successful.
324
- *
325
- * example: {
326
- * "updateResults": [
327
- * {
328
- * "workflowId": {
329
- * "name": "Workflow with one rule not updated",
330
- * "draft": false
331
- * },
332
- * "ruleUpdateErrors": {
333
- * "example-rule-id": [
334
- * "The rule with this id does not exist: example-rule-id"
335
- * ]
336
- * },
337
- * "updateErrors": []
338
- * },
339
- * {
340
- * "workflowId": {
341
- * "name": "Workflow with all rules successfully updated",
342
- * "draft": true
343
- * },
344
- * "ruleUpdateErrors": {},
345
- * "updateErrors": []
346
- * },
347
- * {
348
- * "workflowId": {
349
- * "name": "Non-existing workflow",
350
- * "draft": false
351
- * },
352
- * "ruleUpdateErrors": {},
353
- * "updateErrors": [
354
- * "Workflow not found: WorkflowIdBean{name=Non-existing workflow,
355
- * draft=false}"
356
- * ]
357
- * }
358
- * ]
359
- * }
360
- * @path {PUT} /rest/api/3/workflow/rule/config
361
- * @scopes-current manage:jira-configuration
362
- * @scopes-beta write:workflow:jira
363
- */
364
- updateWorkflowTransitionRuleConfigurations({
365
- workflowTransitionRulesUpdate,
366
- }: {
367
- /**
368
- * @example {
369
- * "workflows": [
370
- * {
371
- * "conditions": [
372
- * {
373
- * "configuration": {
374
- * "disabled": false,
375
- * "tag": "Another tag",
376
- * "value": "{ \"size\": \"medium\" }"
377
- * },
378
- * "id": "d663bd873d93-59f5-11e9-8647-b4d6cbdc"
379
- * }
380
- * ],
381
- * "postFunctions": [
382
- * {
383
- * "configuration": {
384
- * "disabled": false,
385
- * "tag": "Sample tag",
386
- * "value": "{ \"color\": \"red\" }"
387
- * },
388
- * "id": "b4d6cbdc-59f5-11e9-8647-d663bd873d93"
389
- * }
390
- * ],
391
- * "validators": [
392
- * {
393
- * "configuration": {
394
- * "disabled": false,
395
- * "value": "{ \"shape\": \"square\" }"
396
- * },
397
- * "id": "11e9-59f5-b4d6cbdc-8647-d663bd873d93"
398
- * }
399
- * ],
400
- * "workflowId": {
401
- * "draft": false,
402
- * "name": "My Workflow name"
403
- * }
404
- * }
405
- * ]
406
- * }
407
- */
408
- workflowTransitionRulesUpdate: WorkflowTransitionRulesUpdate;
409
- }): Promise<WorkflowTransitionRulesUpdateErrors> {
410
- return this.getClientInstance()
411
- .request({
412
- path: "/rest/api/3/workflow/rule/config",
413
- method: "PUT",
414
- headers: {
415
- "Content-Type": "application/json",
416
- },
417
- body: workflowTransitionRulesUpdate,
418
- })
419
- .then(
420
- this.getClientInstance().responseHandler({
421
- 200: {
422
- "application/json": "json",
423
- },
424
- }),
425
- )
426
- .then(
427
- commonHttpClient.castResponse<{
428
- status: 200;
429
- mediaType: "application/json";
430
- body: WorkflowTransitionRulesUpdateErrors;
431
- }>(),
432
- )
433
- .then(
434
- validationSchemaStorage.validator(
435
- "WorkflowTransitionRulesService.updateWorkflowTransitionRuleConfigurations.response",
436
- ),
437
- )
438
- .then(commonHttpClient.getBody);
439
- }
440
- static initialize() {
441
- validationSchemaStorage.registerExtensible(
442
- "WorkflowTransitionRulesService.getWorkflowTransitionRuleConfigurations.response",
443
- z
444
- .object({
445
- status: z.literal(200),
446
- mediaType: z.literal("application/json"),
447
- body: validationSchemaStorage.lazy("PageBeanWorkflowTransitionRules"),
448
- })
449
- .describe(
450
- "WorkflowTransitionRulesService.getWorkflowTransitionRuleConfigurations.response",
451
- ),
452
- );
453
- validationSchemaStorage.registerExtensible(
454
- "WorkflowTransitionRulesService.updateWorkflowTransitionRuleConfigurations.response",
455
- z
456
- .object({
457
- status: z.literal(200),
458
- mediaType: z.literal("application/json"),
459
- body: validationSchemaStorage.lazy(
460
- "WorkflowTransitionRulesUpdateErrors",
461
- ),
462
- })
463
- .describe(
464
- "WorkflowTransitionRulesService.updateWorkflowTransitionRuleConfigurations.response",
465
- ),
466
- );
467
- validationSchemaStorage.registerExtensible(
468
- "WorkflowTransitionRulesService.deleteWorkflowTransitionRuleConfigurations.response",
469
- z
470
- .object({
471
- status: z.literal(200),
472
- mediaType: z.literal("application/json"),
473
- body: validationSchemaStorage.lazy(
474
- "WorkflowTransitionRulesUpdateErrors",
475
- ),
476
- })
477
- .describe(
478
- "WorkflowTransitionRulesService.deleteWorkflowTransitionRuleConfigurations.response",
479
- ),
480
- );
481
- validationSchemaStorage.registerOnce([
482
- registerWorkflowTransitionRulesValidationSchemas,
483
- ]);
484
- }
485
- }