@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,388 +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
- registerWorkflowTransitionPropertiesValidationSchemas,
10
- type WorkflowTransitionProperty,
11
- } from "../models/workflow-transition-properties";
12
- import { validationSchemaStorage } from "../validation-schema-storage";
13
- /**
14
- * This resource represents workflow transition properties, which provides for
15
- * storing custom data against a workflow transition. Use it to get, create, and
16
- * delete workflow transition properties as well as get a list of property keys
17
- * for a workflow transition. Workflow transition properties are a type of [entity
18
- * property](https://developer.atlassian.com/cloud/jira/platform/jira-entity-properties/).
19
- */
20
- export class WorkflowTransitionPropertiesService extends CommonHttpService {
21
- /**
22
- * Adds a property to a workflow transition. Transition properties are used to
23
- * change the behavior of a transition. For more information, see [Transition
24
- * properties](https://confluence.atlassian.com/x/zIhKLg#Advancedworkflowconfiguration-transitionproperties)
25
- * and [Workflow properties](https://confluence.atlassian.com/x/JYlKLg).
26
- *
27
- * **[Permissions](#permissions) required:** *Administer Jira* [global
28
- * permission](https://confluence.atlassian.com/x/x4dKLg).
29
- *
30
- * @returns 200 response
31
- *
32
- * example: {
33
- * "key": "jira.i18n.title",
34
- * "value": "some.title",
35
- * "id": "jira.i18n.title"
36
- * }
37
- * @path {POST} /rest/api/3/workflow/transitions/{transitionId}/properties
38
- * @scopes-current manage:jira-configuration
39
- * @scopes-beta write:workflow.property:jira, read:workflow.property:jira
40
- */
41
- createWorkflowTransitionProperty({
42
- transitionId,
43
- key,
44
- workflowName,
45
- workflowMode,
46
- workflowTransitionProperty,
47
- }: {
48
- /**
49
- * The ID of the transition. To get the ID, view the workflow in text mode in the
50
- * Jira admin settings. The ID is shown next to the transition.
51
- */
52
- transitionId: number;
53
- /**
54
- * The key of the property being added, also known as the name of the property.
55
- * Set this to the same value as the `key` defined in the request body.
56
- */
57
- key: string;
58
- /** The name of the workflow that the transition belongs to. */
59
- workflowName: string;
60
- /**
61
- * The workflow status. Set to *live* for inactive workflows or *draft* for draft
62
- * workflows. Active workflows cannot be edited.
63
- */
64
- workflowMode?: "live" | "draft";
65
- /**
66
- * @example {
67
- * "value": "createissue"
68
- * }
69
- */
70
- workflowTransitionProperty: WorkflowTransitionProperty;
71
- }): Promise<WorkflowTransitionProperty> {
72
- return this.getClientInstance()
73
- .request({
74
- path: "/rest/api/3/workflow/transitions/{transitionId}/properties",
75
- method: "POST",
76
- pathParams: {
77
- transitionId,
78
- },
79
- query: {
80
- key,
81
- workflowName,
82
- workflowMode,
83
- },
84
- headers: {
85
- "Content-Type": "application/json",
86
- },
87
- body: workflowTransitionProperty,
88
- })
89
- .then(
90
- this.getClientInstance().responseHandler({
91
- 200: {
92
- "application/json": "json",
93
- },
94
- }),
95
- )
96
- .then(
97
- commonHttpClient.castResponse<{
98
- status: 200;
99
- mediaType: "application/json";
100
- body: WorkflowTransitionProperty;
101
- }>(),
102
- )
103
- .then(
104
- validationSchemaStorage.validator(
105
- "WorkflowTransitionPropertiesService.createWorkflowTransitionProperty.response",
106
- ),
107
- )
108
- .then(commonHttpClient.getBody);
109
- }
110
- /**
111
- * Deletes a property from a workflow transition. Transition properties are used
112
- * to change the behavior of a transition. For more information, see [Transition
113
- * properties](https://confluence.atlassian.com/x/zIhKLg#Advancedworkflowconfiguration-transitionproperties)
114
- * and [Workflow properties](https://confluence.atlassian.com/x/JYlKLg).
115
- *
116
- * **[Permissions](#permissions) required:** *Administer Jira* [global
117
- * permission](https://confluence.atlassian.com/x/x4dKLg).
118
- *
119
- * @path {DELETE} /rest/api/3/workflow/transitions/{transitionId}/properties
120
- * @scopes-current manage:jira-configuration
121
- * @scopes-beta delete:workflow.property:jira
122
- */
123
- deleteWorkflowTransitionProperty({
124
- transitionId,
125
- key,
126
- workflowName,
127
- workflowMode,
128
- }: {
129
- /**
130
- * The ID of the transition. To get the ID, view the workflow in text mode in the
131
- * Jira admin settings. The ID is shown next to the transition.
132
- */
133
- transitionId: number;
134
- /**
135
- * The name of the transition property to delete, also known as the name of the
136
- * property.
137
- */
138
- key: string;
139
- /** The name of the workflow that the transition belongs to. */
140
- workflowName: string;
141
- /**
142
- * The workflow status. Set to `live` for inactive workflows or `draft` for draft
143
- * workflows. Active workflows cannot be edited.
144
- */
145
- workflowMode?: "live" | "draft";
146
- }): Promise<void> {
147
- return this.getClientInstance()
148
- .request({
149
- path: "/rest/api/3/workflow/transitions/{transitionId}/properties",
150
- method: "DELETE",
151
- pathParams: {
152
- transitionId,
153
- },
154
- query: {
155
- key,
156
- workflowName,
157
- workflowMode,
158
- },
159
- })
160
- .then(commonHttpClient.discardResult);
161
- }
162
- /**
163
- * Returns the properties on a workflow transition. Transition properties are used
164
- * to change the behavior of a transition. For more information, see [Transition
165
- * properties](https://confluence.atlassian.com/x/zIhKLg#Advancedworkflowconfiguration-transitionproperties)
166
- * and [Workflow properties](https://confluence.atlassian.com/x/JYlKLg).
167
- *
168
- * **[Permissions](#permissions) required:** *Administer Jira* [global
169
- * permission](https://confluence.atlassian.com/x/x4dKLg).
170
- *
171
- * @returns 200 response
172
- *
173
- * example: [
174
- * {
175
- * "id": "jira.i18n.title",
176
- * "key": "jira.i18n.title",
177
- * "value": "some.title"
178
- * },
179
- * {
180
- * "id": "jira.permission",
181
- * "key": "jira.permission",
182
- * "value": "createissue"
183
- * }
184
- * ]
185
- * @path {GET} /rest/api/3/workflow/transitions/{transitionId}/properties
186
- * @scopes-current manage:jira-configuration
187
- * @scopes-beta read:workflow.property:jira
188
- */
189
- getWorkflowTransitionProperties({
190
- transitionId,
191
- includeReservedKeys,
192
- key,
193
- workflowName,
194
- workflowMode,
195
- }: {
196
- /**
197
- * The ID of the transition. To get the ID, view the workflow in text mode in the
198
- * Jira administration console. The ID is shown next to the transition.
199
- */
200
- transitionId: number;
201
- /**
202
- * Some properties with keys that have the *jira.* prefix are reserved, which
203
- * means they are not editable. To include these properties in the results, set
204
- * this parameter to *true*.
205
- */
206
- includeReservedKeys?: boolean;
207
- /**
208
- * The key of the property being returned, also known as the name of the property.
209
- * If this parameter is not specified, all properties on the transition are
210
- * returned.
211
- */
212
- key?: string;
213
- /** The name of the workflow that the transition belongs to. */
214
- workflowName: string;
215
- /**
216
- * The workflow status. Set to *live* for active and inactive workflows, or
217
- * *draft* for draft workflows.
218
- */
219
- workflowMode?: "live" | "draft";
220
- }): Promise<WorkflowTransitionProperty> {
221
- return this.getClientInstance()
222
- .request({
223
- path: "/rest/api/3/workflow/transitions/{transitionId}/properties",
224
- method: "GET",
225
- pathParams: {
226
- transitionId,
227
- },
228
- query: {
229
- includeReservedKeys,
230
- key,
231
- workflowName,
232
- workflowMode,
233
- },
234
- })
235
- .then(
236
- this.getClientInstance().responseHandler({
237
- 200: {
238
- "application/json": "json",
239
- },
240
- }),
241
- )
242
- .then(
243
- commonHttpClient.castResponse<{
244
- status: 200;
245
- mediaType: "application/json";
246
- body: WorkflowTransitionProperty;
247
- }>(),
248
- )
249
- .then(
250
- validationSchemaStorage.validator(
251
- "WorkflowTransitionPropertiesService.getWorkflowTransitionProperties.response",
252
- ),
253
- )
254
- .then(commonHttpClient.getBody);
255
- }
256
- /**
257
- * Updates a workflow transition by changing the property value. Trying to update
258
- * a property that does not exist results in a new property being added to the
259
- * transition. Transition properties are used to change the behavior of a
260
- * transition. For more information, see [Transition
261
- * properties](https://confluence.atlassian.com/x/zIhKLg#Advancedworkflowconfiguration-transitionproperties)
262
- * and [Workflow properties](https://confluence.atlassian.com/x/JYlKLg).
263
- *
264
- * **[Permissions](#permissions) required:** *Administer Jira* [global
265
- * permission](https://confluence.atlassian.com/x/x4dKLg).
266
- *
267
- * @returns 200 response
268
- *
269
- * example: {
270
- * "key": "jira.i18n.title",
271
- * "value": "some.title",
272
- * "id": "jira.i18n.title"
273
- * }
274
- * @path {PUT} /rest/api/3/workflow/transitions/{transitionId}/properties
275
- * @scopes-current manage:jira-configuration
276
- * @scopes-beta write:workflow.property:jira, read:workflow.property:jira
277
- */
278
- updateWorkflowTransitionProperty({
279
- transitionId,
280
- key,
281
- workflowName,
282
- workflowMode,
283
- workflowTransitionProperty,
284
- }: {
285
- /**
286
- * The ID of the transition. To get the ID, view the workflow in text mode in the
287
- * Jira admin settings. The ID is shown next to the transition.
288
- */
289
- transitionId: number;
290
- /**
291
- * The key of the property being updated, also known as the name of the property.
292
- * Set this to the same value as the `key` defined in the request body.
293
- */
294
- key: string;
295
- /** The name of the workflow that the transition belongs to. */
296
- workflowName: string;
297
- /**
298
- * The workflow status. Set to `live` for inactive workflows or `draft` for draft
299
- * workflows. Active workflows cannot be edited.
300
- */
301
- workflowMode?: "live" | "draft";
302
- /**
303
- * @example {
304
- * "value": "createissue"
305
- * }
306
- */
307
- workflowTransitionProperty: WorkflowTransitionProperty;
308
- }): Promise<WorkflowTransitionProperty> {
309
- return this.getClientInstance()
310
- .request({
311
- path: "/rest/api/3/workflow/transitions/{transitionId}/properties",
312
- method: "PUT",
313
- pathParams: {
314
- transitionId,
315
- },
316
- query: {
317
- key,
318
- workflowName,
319
- workflowMode,
320
- },
321
- headers: {
322
- "Content-Type": "application/json",
323
- },
324
- body: workflowTransitionProperty,
325
- })
326
- .then(
327
- this.getClientInstance().responseHandler({
328
- 200: {
329
- "application/json": "json",
330
- },
331
- }),
332
- )
333
- .then(
334
- commonHttpClient.castResponse<{
335
- status: 200;
336
- mediaType: "application/json";
337
- body: WorkflowTransitionProperty;
338
- }>(),
339
- )
340
- .then(
341
- validationSchemaStorage.validator(
342
- "WorkflowTransitionPropertiesService.updateWorkflowTransitionProperty.response",
343
- ),
344
- )
345
- .then(commonHttpClient.getBody);
346
- }
347
- static initialize() {
348
- validationSchemaStorage.registerExtensible(
349
- "WorkflowTransitionPropertiesService.getWorkflowTransitionProperties.response",
350
- z
351
- .object({
352
- status: z.literal(200),
353
- mediaType: z.literal("application/json"),
354
- body: validationSchemaStorage.lazy("WorkflowTransitionProperty"),
355
- })
356
- .describe(
357
- "WorkflowTransitionPropertiesService.getWorkflowTransitionProperties.response",
358
- ),
359
- );
360
- validationSchemaStorage.registerExtensible(
361
- "WorkflowTransitionPropertiesService.updateWorkflowTransitionProperty.response",
362
- z
363
- .object({
364
- status: z.literal(200),
365
- mediaType: z.literal("application/json"),
366
- body: validationSchemaStorage.lazy("WorkflowTransitionProperty"),
367
- })
368
- .describe(
369
- "WorkflowTransitionPropertiesService.updateWorkflowTransitionProperty.response",
370
- ),
371
- );
372
- validationSchemaStorage.registerExtensible(
373
- "WorkflowTransitionPropertiesService.createWorkflowTransitionProperty.response",
374
- z
375
- .object({
376
- status: z.literal(200),
377
- mediaType: z.literal("application/json"),
378
- body: validationSchemaStorage.lazy("WorkflowTransitionProperty"),
379
- })
380
- .describe(
381
- "WorkflowTransitionPropertiesService.createWorkflowTransitionProperty.response",
382
- ),
383
- );
384
- validationSchemaStorage.registerOnce([
385
- registerWorkflowTransitionPropertiesValidationSchemas,
386
- ]);
387
- }
388
- }