@resolution/jira-api-client 0.4.2 → 0.4.5

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 (327) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/README.md +4 -0
  3. package/lib/openapi/platform/BaseJiraPlatformApiClient.d.ts +28 -4
  4. package/lib/openapi/platform/BaseJiraPlatformApiClient.js +24 -1
  5. package/lib/openapi/platform/BaseJiraPlatformApiClient.js.map +1 -1
  6. package/lib/openapi/platform/models/common.d.ts +6 -0
  7. package/lib/openapi/platform/models/common.js +12 -1
  8. package/lib/openapi/platform/models/common.js.map +1 -1
  9. package/lib/openapi/platform/models/dynamicModules.d.ts +0 -9
  10. package/lib/openapi/platform/models/dynamicModules.js +0 -6
  11. package/lib/openapi/platform/models/dynamicModules.js.map +1 -1
  12. package/lib/openapi/platform/models/issueBulkOperations.d.ts +547 -0
  13. package/lib/openapi/platform/models/issueBulkOperations.js +437 -0
  14. package/lib/openapi/platform/models/issueBulkOperations.js.map +1 -0
  15. package/lib/openapi/platform/services/AnnouncementBannerService.d.ts +3 -3
  16. package/lib/openapi/platform/services/AnnouncementBannerService.js +65 -62
  17. package/lib/openapi/platform/services/AnnouncementBannerService.js.map +1 -1
  18. package/lib/openapi/platform/services/AppDataPoliciesService.d.ts +4 -4
  19. package/lib/openapi/platform/services/AppDataPoliciesService.js +70 -67
  20. package/lib/openapi/platform/services/AppDataPoliciesService.js.map +1 -1
  21. package/lib/openapi/platform/services/AppMigrationService.d.ts +6 -6
  22. package/lib/openapi/platform/services/AppMigrationService.js +139 -136
  23. package/lib/openapi/platform/services/AppMigrationService.js.map +1 -1
  24. package/lib/openapi/platform/services/AppPropertiesService.d.ts +12 -12
  25. package/lib/openapi/platform/services/AppPropertiesService.js +254 -251
  26. package/lib/openapi/platform/services/AppPropertiesService.js.map +1 -1
  27. package/lib/openapi/platform/services/ApplicationRolesService.d.ts +3 -3
  28. package/lib/openapi/platform/services/ApplicationRolesService.js +177 -174
  29. package/lib/openapi/platform/services/ApplicationRolesService.js.map +1 -1
  30. package/lib/openapi/platform/services/AuditRecordsService.d.ts +7 -7
  31. package/lib/openapi/platform/services/AuditRecordsService.js +97 -94
  32. package/lib/openapi/platform/services/AuditRecordsService.js.map +1 -1
  33. package/lib/openapi/platform/services/AvatarsService.d.ts +25 -31
  34. package/lib/openapi/platform/services/AvatarsService.js +412 -415
  35. package/lib/openapi/platform/services/AvatarsService.js.map +1 -1
  36. package/lib/openapi/platform/services/ClassificationLevelsService.d.ts +4 -4
  37. package/lib/openapi/platform/services/ClassificationLevelsService.js +79 -76
  38. package/lib/openapi/platform/services/ClassificationLevelsService.js.map +1 -1
  39. package/lib/openapi/platform/services/DashboardsService.d.ts +62 -50
  40. package/lib/openapi/platform/services/DashboardsService.js +983 -974
  41. package/lib/openapi/platform/services/DashboardsService.js.map +1 -1
  42. package/lib/openapi/platform/services/DynamicModulesService.d.ts +6 -6
  43. package/lib/openapi/platform/services/DynamicModulesService.js +68 -65
  44. package/lib/openapi/platform/services/DynamicModulesService.js.map +1 -1
  45. package/lib/openapi/platform/services/FilterSharingService.d.ts +11 -11
  46. package/lib/openapi/platform/services/FilterSharingService.js +512 -509
  47. package/lib/openapi/platform/services/FilterSharingService.js.map +1 -1
  48. package/lib/openapi/platform/services/FiltersService.d.ts +50 -50
  49. package/lib/openapi/platform/services/FiltersService.js +1262 -1259
  50. package/lib/openapi/platform/services/FiltersService.js.map +1 -1
  51. package/lib/openapi/platform/services/GroupAndUserPickerService.d.ts +10 -10
  52. package/lib/openapi/platform/services/GroupAndUserPickerService.js +112 -109
  53. package/lib/openapi/platform/services/GroupAndUserPickerService.js.map +1 -1
  54. package/lib/openapi/platform/services/GroupsService.d.ts +46 -46
  55. package/lib/openapi/platform/services/GroupsService.js +385 -382
  56. package/lib/openapi/platform/services/GroupsService.js.map +1 -1
  57. package/lib/openapi/platform/services/IssueAttachmentsService.d.ts +20 -20
  58. package/lib/openapi/platform/services/IssueAttachmentsService.js +644 -641
  59. package/lib/openapi/platform/services/IssueAttachmentsService.js.map +1 -1
  60. package/lib/openapi/platform/services/IssueBulkOperationsService.d.ts +325 -0
  61. package/lib/openapi/platform/services/IssueBulkOperationsService.js +353 -0
  62. package/lib/openapi/platform/services/IssueBulkOperationsService.js.map +1 -0
  63. package/lib/openapi/platform/services/IssueCommentPropertiesService.d.ts +8 -8
  64. package/lib/openapi/platform/services/IssueCommentPropertiesService.js +187 -184
  65. package/lib/openapi/platform/services/IssueCommentPropertiesService.js.map +1 -1
  66. package/lib/openapi/platform/services/IssueCommentsService.d.ts +22 -22
  67. package/lib/openapi/platform/services/IssueCommentsService.js +507 -504
  68. package/lib/openapi/platform/services/IssueCommentsService.js.map +1 -1
  69. package/lib/openapi/platform/services/IssueCustomFieldConfigurationAppsService.d.ts +11 -11
  70. package/lib/openapi/platform/services/IssueCustomFieldConfigurationAppsService.js +126 -123
  71. package/lib/openapi/platform/services/IssueCustomFieldConfigurationAppsService.js.map +1 -1
  72. package/lib/openapi/platform/services/IssueCustomFieldContextsService.d.ts +42 -42
  73. package/lib/openapi/platform/services/IssueCustomFieldContextsService.js +748 -745
  74. package/lib/openapi/platform/services/IssueCustomFieldContextsService.js.map +1 -1
  75. package/lib/openapi/platform/services/IssueCustomFieldOptionsAppsService.d.ts +28 -28
  76. package/lib/openapi/platform/services/IssueCustomFieldOptionsAppsService.js +535 -532
  77. package/lib/openapi/platform/services/IssueCustomFieldOptionsAppsService.js.map +1 -1
  78. package/lib/openapi/platform/services/IssueCustomFieldOptionsService.d.ts +20 -20
  79. package/lib/openapi/platform/services/IssueCustomFieldOptionsService.js +358 -355
  80. package/lib/openapi/platform/services/IssueCustomFieldOptionsService.js.map +1 -1
  81. package/lib/openapi/platform/services/IssueCustomFieldValuesAppsService.d.ts +6 -6
  82. package/lib/openapi/platform/services/IssueCustomFieldValuesAppsService.js +86 -83
  83. package/lib/openapi/platform/services/IssueCustomFieldValuesAppsService.js.map +1 -1
  84. package/lib/openapi/platform/services/IssueFieldConfigurationsService.d.ts +45 -45
  85. package/lib/openapi/platform/services/IssueFieldConfigurationsService.js +689 -686
  86. package/lib/openapi/platform/services/IssueFieldConfigurationsService.js.map +1 -1
  87. package/lib/openapi/platform/services/IssueFieldsService.d.ts +32 -32
  88. package/lib/openapi/platform/services/IssueFieldsService.js +484 -481
  89. package/lib/openapi/platform/services/IssueFieldsService.js.map +1 -1
  90. package/lib/openapi/platform/services/IssueLinkTypesService.d.ts +9 -9
  91. package/lib/openapi/platform/services/IssueLinkTypesService.js +212 -209
  92. package/lib/openapi/platform/services/IssueLinkTypesService.js.map +1 -1
  93. package/lib/openapi/platform/services/IssueLinksService.d.ts +6 -6
  94. package/lib/openapi/platform/services/IssueLinksService.js +230 -227
  95. package/lib/openapi/platform/services/IssueLinksService.js.map +1 -1
  96. package/lib/openapi/platform/services/IssueNavigatorSettingsService.d.ts +3 -3
  97. package/lib/openapi/platform/services/IssueNavigatorSettingsService.js +72 -69
  98. package/lib/openapi/platform/services/IssueNavigatorSettingsService.js.map +1 -1
  99. package/lib/openapi/platform/services/IssueNotificationSchemesService.d.ts +27 -27
  100. package/lib/openapi/platform/services/IssueNotificationSchemesService.js +816 -813
  101. package/lib/openapi/platform/services/IssueNotificationSchemesService.js.map +1 -1
  102. package/lib/openapi/platform/services/IssuePrioritiesService.d.ts +22 -22
  103. package/lib/openapi/platform/services/IssuePrioritiesService.js +307 -304
  104. package/lib/openapi/platform/services/IssuePrioritiesService.js.map +1 -1
  105. package/lib/openapi/platform/services/IssuePropertiesService.d.ts +16 -16
  106. package/lib/openapi/platform/services/IssuePropertiesService.js +390 -387
  107. package/lib/openapi/platform/services/IssuePropertiesService.js.map +1 -1
  108. package/lib/openapi/platform/services/IssueRemoteLinksService.d.ts +13 -13
  109. package/lib/openapi/platform/services/IssueRemoteLinksService.js +368 -365
  110. package/lib/openapi/platform/services/IssueRemoteLinksService.js.map +1 -1
  111. package/lib/openapi/platform/services/IssueResolutionsService.d.ts +19 -19
  112. package/lib/openapi/platform/services/IssueResolutionsService.js +283 -280
  113. package/lib/openapi/platform/services/IssueResolutionsService.js.map +1 -1
  114. package/lib/openapi/platform/services/IssueSearchService.d.ts +24 -24
  115. package/lib/openapi/platform/services/IssueSearchService.js +826 -823
  116. package/lib/openapi/platform/services/IssueSearchService.js.map +1 -1
  117. package/lib/openapi/platform/services/IssueSecurityLevelService.d.ts +8 -8
  118. package/lib/openapi/platform/services/IssueSecurityLevelService.js +137 -134
  119. package/lib/openapi/platform/services/IssueSecurityLevelService.js.map +1 -1
  120. package/lib/openapi/platform/services/IssueSecuritySchemesService.d.ts +51 -51
  121. package/lib/openapi/platform/services/IssueSecuritySchemesService.js +610 -607
  122. package/lib/openapi/platform/services/IssueSecuritySchemesService.js.map +1 -1
  123. package/lib/openapi/platform/services/IssueTypePropertiesService.d.ts +8 -8
  124. package/lib/openapi/platform/services/IssueTypePropertiesService.js +175 -172
  125. package/lib/openapi/platform/services/IssueTypePropertiesService.js.map +1 -1
  126. package/lib/openapi/platform/services/IssueTypeSchemesService.d.ts +31 -31
  127. package/lib/openapi/platform/services/IssueTypeSchemesService.js +527 -524
  128. package/lib/openapi/platform/services/IssueTypeSchemesService.js.map +1 -1
  129. package/lib/openapi/platform/services/IssueTypeScreenSchemesService.d.ts +36 -36
  130. package/lib/openapi/platform/services/IssueTypeScreenSchemesService.js +508 -505
  131. package/lib/openapi/platform/services/IssueTypeScreenSchemesService.js.map +1 -1
  132. package/lib/openapi/platform/services/IssueTypesService.d.ts +22 -28
  133. package/lib/openapi/platform/services/IssueTypesService.js +424 -427
  134. package/lib/openapi/platform/services/IssueTypesService.js.map +1 -1
  135. package/lib/openapi/platform/services/IssueVotesService.d.ts +6 -6
  136. package/lib/openapi/platform/services/IssueVotesService.js +148 -145
  137. package/lib/openapi/platform/services/IssueVotesService.js.map +1 -1
  138. package/lib/openapi/platform/services/IssueWatchersService.d.ts +10 -10
  139. package/lib/openapi/platform/services/IssueWatchersService.js +197 -194
  140. package/lib/openapi/platform/services/IssueWatchersService.js.map +1 -1
  141. package/lib/openapi/platform/services/IssueWorklogPropertiesService.d.ts +8 -8
  142. package/lib/openapi/platform/services/IssueWorklogPropertiesService.js +199 -196
  143. package/lib/openapi/platform/services/IssueWorklogPropertiesService.js.map +1 -1
  144. package/lib/openapi/platform/services/IssueWorklogsService.d.ts +44 -44
  145. package/lib/openapi/platform/services/IssueWorklogsService.js +636 -633
  146. package/lib/openapi/platform/services/IssueWorklogsService.js.map +1 -1
  147. package/lib/openapi/platform/services/IssuesService.d.ts +71 -71
  148. package/lib/openapi/platform/services/IssuesService.js +1856 -1853
  149. package/lib/openapi/platform/services/IssuesService.js.map +1 -1
  150. package/lib/openapi/platform/services/JiraExpressionsService.d.ts +6 -6
  151. package/lib/openapi/platform/services/JiraExpressionsService.js +238 -235
  152. package/lib/openapi/platform/services/JiraExpressionsService.js.map +1 -1
  153. package/lib/openapi/platform/services/JiraSettingsService.d.ts +9 -9
  154. package/lib/openapi/platform/services/JiraSettingsService.js +279 -276
  155. package/lib/openapi/platform/services/JiraSettingsService.js.map +1 -1
  156. package/lib/openapi/platform/services/JqlFunctionsAppsService.d.ts +8 -8
  157. package/lib/openapi/platform/services/JqlFunctionsAppsService.js +107 -104
  158. package/lib/openapi/platform/services/JqlFunctionsAppsService.js.map +1 -1
  159. package/lib/openapi/platform/services/JqlService.d.ts +15 -15
  160. package/lib/openapi/platform/services/JqlService.js +635 -632
  161. package/lib/openapi/platform/services/JqlService.js.map +1 -1
  162. package/lib/openapi/platform/services/LabelsService.d.ts +4 -4
  163. package/lib/openapi/platform/services/LabelsService.js +41 -38
  164. package/lib/openapi/platform/services/LabelsService.js.map +1 -1
  165. package/lib/openapi/platform/services/LicenseMetricsService.d.ts +4 -4
  166. package/lib/openapi/platform/services/LicenseMetricsService.js +120 -117
  167. package/lib/openapi/platform/services/LicenseMetricsService.js.map +1 -1
  168. package/lib/openapi/platform/services/MyselfService.d.ts +14 -14
  169. package/lib/openapi/platform/services/MyselfService.js +321 -318
  170. package/lib/openapi/platform/services/MyselfService.js.map +1 -1
  171. package/lib/openapi/platform/services/PermissionSchemesService.d.ts +25 -25
  172. package/lib/openapi/platform/services/PermissionSchemesService.js +548 -545
  173. package/lib/openapi/platform/services/PermissionSchemesService.js.map +1 -1
  174. package/lib/openapi/platform/services/PermissionsService.d.ts +15 -15
  175. package/lib/openapi/platform/services/PermissionsService.js +235 -232
  176. package/lib/openapi/platform/services/PermissionsService.js.map +1 -1
  177. package/lib/openapi/platform/services/PrioritySchemesService.d.ts +34 -34
  178. package/lib/openapi/platform/services/PrioritySchemesService.js +571 -568
  179. package/lib/openapi/platform/services/PrioritySchemesService.js.map +1 -1
  180. package/lib/openapi/platform/services/ProjectAvatarsService.d.ts +11 -11
  181. package/lib/openapi/platform/services/ProjectAvatarsService.js +213 -210
  182. package/lib/openapi/platform/services/ProjectAvatarsService.js.map +1 -1
  183. package/lib/openapi/platform/services/ProjectCategoriesService.d.ts +9 -9
  184. package/lib/openapi/platform/services/ProjectCategoriesService.js +180 -177
  185. package/lib/openapi/platform/services/ProjectCategoriesService.js.map +1 -1
  186. package/lib/openapi/platform/services/ProjectClassificationLevelsService.d.ts +6 -6
  187. package/lib/openapi/platform/services/ProjectClassificationLevelsService.js +125 -122
  188. package/lib/openapi/platform/services/ProjectClassificationLevelsService.js.map +1 -1
  189. package/lib/openapi/platform/services/ProjectComponentsService.d.ts +28 -28
  190. package/lib/openapi/platform/services/ProjectComponentsService.js +1009 -1006
  191. package/lib/openapi/platform/services/ProjectComponentsService.js.map +1 -1
  192. package/lib/openapi/platform/services/ProjectEmailService.d.ts +4 -4
  193. package/lib/openapi/platform/services/ProjectEmailService.js +78 -75
  194. package/lib/openapi/platform/services/ProjectEmailService.js.map +1 -1
  195. package/lib/openapi/platform/services/ProjectFeaturesService.d.ts +4 -4
  196. package/lib/openapi/platform/services/ProjectFeaturesService.js +119 -116
  197. package/lib/openapi/platform/services/ProjectFeaturesService.js.map +1 -1
  198. package/lib/openapi/platform/services/ProjectKeyAndNameValidationService.d.ts +8 -8
  199. package/lib/openapi/platform/services/ProjectKeyAndNameValidationService.js +100 -97
  200. package/lib/openapi/platform/services/ProjectKeyAndNameValidationService.js.map +1 -1
  201. package/lib/openapi/platform/services/ProjectPermissionSchemesService.d.ts +10 -10
  202. package/lib/openapi/platform/services/ProjectPermissionSchemesService.js +199 -196
  203. package/lib/openapi/platform/services/ProjectPermissionSchemesService.js.map +1 -1
  204. package/lib/openapi/platform/services/ProjectPropertiesService.d.ts +8 -8
  205. package/lib/openapi/platform/services/ProjectPropertiesService.js +172 -169
  206. package/lib/openapi/platform/services/ProjectPropertiesService.js.map +1 -1
  207. package/lib/openapi/platform/services/ProjectRoleActorsService.d.ts +18 -18
  208. package/lib/openapi/platform/services/ProjectRoleActorsService.js +362 -359
  209. package/lib/openapi/platform/services/ProjectRoleActorsService.js.map +1 -1
  210. package/lib/openapi/platform/services/ProjectRolesService.d.ts +21 -21
  211. package/lib/openapi/platform/services/ProjectRolesService.js +576 -573
  212. package/lib/openapi/platform/services/ProjectRolesService.js.map +1 -1
  213. package/lib/openapi/platform/services/ProjectTypesService.d.ts +6 -6
  214. package/lib/openapi/platform/services/ProjectTypesService.js +173 -170
  215. package/lib/openapi/platform/services/ProjectTypesService.js.map +1 -1
  216. package/lib/openapi/platform/services/ProjectVersionsService.d.ts +40 -40
  217. package/lib/openapi/platform/services/ProjectVersionsService.js +751 -748
  218. package/lib/openapi/platform/services/ProjectVersionsService.js.map +1 -1
  219. package/lib/openapi/platform/services/ProjectsService.d.ts +49 -49
  220. package/lib/openapi/platform/services/ProjectsService.js +1597 -1594
  221. package/lib/openapi/platform/services/ProjectsService.js.map +1 -1
  222. package/lib/openapi/platform/services/ScreenSchemesService.d.ts +14 -14
  223. package/lib/openapi/platform/services/ScreenSchemesService.js +177 -174
  224. package/lib/openapi/platform/services/ScreenSchemesService.js.map +1 -1
  225. package/lib/openapi/platform/services/ScreenTabFieldsService.d.ts +9 -9
  226. package/lib/openapi/platform/services/ScreenTabFieldsService.js +144 -141
  227. package/lib/openapi/platform/services/ScreenTabFieldsService.js.map +1 -1
  228. package/lib/openapi/platform/services/ScreenTabsService.d.ts +17 -17
  229. package/lib/openapi/platform/services/ScreenTabsService.js +229 -226
  230. package/lib/openapi/platform/services/ScreenTabsService.js.map +1 -1
  231. package/lib/openapi/platform/services/ScreensService.d.ts +23 -23
  232. package/lib/openapi/platform/services/ScreensService.js +281 -278
  233. package/lib/openapi/platform/services/ScreensService.js.map +1 -1
  234. package/lib/openapi/platform/services/ServerInfoService.d.ts +1 -1
  235. package/lib/openapi/platform/services/ServerInfoService.js +51 -48
  236. package/lib/openapi/platform/services/ServerInfoService.js.map +1 -1
  237. package/lib/openapi/platform/services/ServiceRegistryService.d.ts +2 -2
  238. package/lib/openapi/platform/services/ServiceRegistryService.js +30 -27
  239. package/lib/openapi/platform/services/ServiceRegistryService.js.map +1 -1
  240. package/lib/openapi/platform/services/StatusService.d.ts +17 -17
  241. package/lib/openapi/platform/services/StatusService.js +271 -268
  242. package/lib/openapi/platform/services/StatusService.js.map +1 -1
  243. package/lib/openapi/platform/services/TasksService.d.ts +4 -4
  244. package/lib/openapi/platform/services/TasksService.js +93 -90
  245. package/lib/openapi/platform/services/TasksService.js.map +1 -1
  246. package/lib/openapi/platform/services/TimeTrackingService.d.ts +7 -7
  247. package/lib/openapi/platform/services/TimeTrackingService.js +190 -187
  248. package/lib/openapi/platform/services/TimeTrackingService.js.map +1 -1
  249. package/lib/openapi/platform/services/UiModificationsAppsService.d.ts +11 -11
  250. package/lib/openapi/platform/services/UiModificationsAppsService.js +214 -211
  251. package/lib/openapi/platform/services/UiModificationsAppsService.js.map +1 -1
  252. package/lib/openapi/platform/services/UserPropertiesService.d.ts +20 -20
  253. package/lib/openapi/platform/services/UserPropertiesService.js +196 -193
  254. package/lib/openapi/platform/services/UserPropertiesService.js.map +1 -1
  255. package/lib/openapi/platform/services/UserSearchService.d.ts +61 -61
  256. package/lib/openapi/platform/services/UserSearchService.js +709 -706
  257. package/lib/openapi/platform/services/UserSearchService.js.map +1 -1
  258. package/lib/openapi/platform/services/UsersService.d.ts +51 -51
  259. package/lib/openapi/platform/services/UsersService.js +637 -634
  260. package/lib/openapi/platform/services/UsersService.js.map +1 -1
  261. package/lib/openapi/platform/services/WebhooksService.d.ts +14 -14
  262. package/lib/openapi/platform/services/WebhooksService.js +262 -259
  263. package/lib/openapi/platform/services/WebhooksService.js.map +1 -1
  264. package/lib/openapi/platform/services/WorkflowSchemeDraftsService.d.ts +30 -30
  265. package/lib/openapi/platform/services/WorkflowSchemeDraftsService.js +861 -858
  266. package/lib/openapi/platform/services/WorkflowSchemeDraftsService.js.map +1 -1
  267. package/lib/openapi/platform/services/WorkflowSchemeProjectAssociationsService.d.ts +4 -4
  268. package/lib/openapi/platform/services/WorkflowSchemeProjectAssociationsService.js +98 -95
  269. package/lib/openapi/platform/services/WorkflowSchemeProjectAssociationsService.js.map +1 -1
  270. package/lib/openapi/platform/services/WorkflowSchemesService.d.ts +45 -45
  271. package/lib/openapi/platform/services/WorkflowSchemesService.js +899 -896
  272. package/lib/openapi/platform/services/WorkflowSchemesService.js.map +1 -1
  273. package/lib/openapi/platform/services/WorkflowStatusCategoriesService.d.ts +3 -3
  274. package/lib/openapi/platform/services/WorkflowStatusCategoriesService.js +82 -79
  275. package/lib/openapi/platform/services/WorkflowStatusCategoriesService.js.map +1 -1
  276. package/lib/openapi/platform/services/WorkflowStatusesService.d.ts +3 -3
  277. package/lib/openapi/platform/services/WorkflowStatusesService.js +110 -107
  278. package/lib/openapi/platform/services/WorkflowStatusesService.js.map +1 -1
  279. package/lib/openapi/platform/services/WorkflowTransitionPropertiesService.d.ts +14 -14
  280. package/lib/openapi/platform/services/WorkflowTransitionPropertiesService.js +182 -179
  281. package/lib/openapi/platform/services/WorkflowTransitionPropertiesService.js.map +1 -1
  282. package/lib/openapi/platform/services/WorkflowTransitionRulesService.d.ts +13 -13
  283. package/lib/openapi/platform/services/WorkflowTransitionRulesService.js +283 -280
  284. package/lib/openapi/platform/services/WorkflowTransitionRulesService.js.map +1 -1
  285. package/lib/openapi/platform/services/WorkflowsService.d.ts +33 -33
  286. package/lib/openapi/platform/services/WorkflowsService.js +2451 -2448
  287. package/lib/openapi/platform/services/WorkflowsService.js.map +1 -1
  288. package/lib/openapi/software/services/BacklogService.d.ts +4 -4
  289. package/lib/openapi/software/services/BacklogService.js +81 -78
  290. package/lib/openapi/software/services/BacklogService.js.map +1 -1
  291. package/lib/openapi/software/services/BoardService.d.ts +124 -124
  292. package/lib/openapi/software/services/BoardService.js +2048 -2045
  293. package/lib/openapi/software/services/BoardService.js.map +1 -1
  294. package/lib/openapi/software/services/BuildsService.d.ts +10 -10
  295. package/lib/openapi/software/services/BuildsService.js +164 -161
  296. package/lib/openapi/software/services/BuildsService.js.map +1 -1
  297. package/lib/openapi/software/services/DeploymentsService.d.ts +12 -12
  298. package/lib/openapi/software/services/DeploymentsService.js +192 -189
  299. package/lib/openapi/software/services/DeploymentsService.js.map +1 -1
  300. package/lib/openapi/software/services/DevOpsComponentsService.d.ts +8 -8
  301. package/lib/openapi/software/services/DevOpsComponentsService.js +145 -142
  302. package/lib/openapi/software/services/DevOpsComponentsService.js.map +1 -1
  303. package/lib/openapi/software/services/DevelopmentInformationService.d.ts +16 -16
  304. package/lib/openapi/software/services/DevelopmentInformationService.js +178 -175
  305. package/lib/openapi/software/services/DevelopmentInformationService.js.map +1 -1
  306. package/lib/openapi/software/services/EpicService.d.ts +26 -26
  307. package/lib/openapi/software/services/EpicService.js +597 -594
  308. package/lib/openapi/software/services/EpicService.js.map +1 -1
  309. package/lib/openapi/software/services/FeatureFlagsService.d.ts +10 -10
  310. package/lib/openapi/software/services/FeatureFlagsService.js +151 -148
  311. package/lib/openapi/software/services/FeatureFlagsService.js.map +1 -1
  312. package/lib/openapi/software/services/IssueService.d.ts +13 -13
  313. package/lib/openapi/software/services/IssueService.js +359 -356
  314. package/lib/openapi/software/services/IssueService.js.map +1 -1
  315. package/lib/openapi/software/services/OperationsService.d.ts +24 -24
  316. package/lib/openapi/software/services/OperationsService.js +301 -298
  317. package/lib/openapi/software/services/OperationsService.js.map +1 -1
  318. package/lib/openapi/software/services/RemoteLinksService.d.ts +15 -15
  319. package/lib/openapi/software/services/RemoteLinksService.js +160 -157
  320. package/lib/openapi/software/services/RemoteLinksService.js.map +1 -1
  321. package/lib/openapi/software/services/SecurityInformationService.d.ts +16 -16
  322. package/lib/openapi/software/services/SecurityInformationService.js +262 -259
  323. package/lib/openapi/software/services/SecurityInformationService.js.map +1 -1
  324. package/lib/openapi/software/services/SprintService.d.ts +33 -33
  325. package/lib/openapi/software/services/SprintService.js +594 -591
  326. package/lib/openapi/software/services/SprintService.js.map +1 -1
  327. package/package.json +4 -3
@@ -21,2454 +21,2457 @@ const validationSchemaStorage_1 = require("../validationSchemaStorage");
21
21
  * @see https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-workflows
22
22
  */
23
23
  class WorkflowsService extends CommonHttpService_1.CommonHttpService {
24
- /**
25
- * Creates a workflow. You can define transition rules using the shapes detailed
26
- * in the following sections. If no transitional rules are specified the default
27
- * system transition rules are used. Note: This only applies to company-managed
28
- * scoped workflows. Use [bulk create
29
- * workflows](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-workflows/#api-rest-api-3-workflows-create-post)
30
- * to create both team and company-managed scoped workflows.
31
- *
32
- * #### Conditions ####
33
- *
34
- * Conditions enable workflow rules that govern whether a transition can execute.
35
- *
36
- * ##### Always false condition #####
37
- *
38
- * A condition that always fails.
39
- *
40
- * {
41
- * "type": "AlwaysFalseCondition"
42
- * }
43
- *
44
- * ##### Block transition until approval #####
45
- *
46
- * A condition that blocks issue transition if there is a pending approval.
47
- *
48
- * {
49
- * "type": "BlockInProgressApprovalCondition"
50
- * }
51
- *
52
- * ##### Compare number custom field condition #####
53
- *
54
- * A condition that allows transition if a comparison between a number custom
55
- * field and a value is true.
56
- *
57
- * {
58
- * "type": "CompareNumberCFCondition",
59
- * "configuration": {
60
- * "comparator": "=",
61
- * "fieldId": "customfield_10029",
62
- * "fieldValue": 2
63
- * }
64
- * }
65
- *
66
- * * `comparator` One of the supported comparator: `=`, `>`, and `<`.
67
- * * `fieldId` The custom numeric field ID. Allowed field types:
68
- *
69
- * * `com.atlassian.jira.plugin.system.customfieldtypes:float`
70
- * * `com.pyxis.greenhopper.jira:jsw-story-points`
71
- * * `fieldValue` The value for comparison.
72
- *
73
- * ##### Hide from user condition #####
74
- *
75
- * A condition that hides a transition from users. The transition can only be
76
- * triggered from a workflow function or REST API operation.
77
- *
78
- * {
79
- * "type": "RemoteOnlyCondition"
80
- * }
81
- *
82
- * ##### Only assignee condition #####
83
- *
84
- * A condition that allows only the assignee to execute a transition.
85
- *
86
- * {
87
- * "type": "AllowOnlyAssignee"
88
- * }
89
- *
90
- * ##### Only Bamboo notifications workflow condition (deprecated) #####
91
- *
92
- * A condition that makes the transition available only to Bamboo build
93
- * notifications.
94
- *
95
- * {
96
- * "type": "OnlyBambooNotificationsCondition"
97
- * }
98
- *
99
- * ##### Only reporter condition #####
100
- *
101
- * A condition that allows only the reporter to execute a transition.
102
- *
103
- * {
104
- * "type": "AllowOnlyReporter"
105
- * }
106
- *
107
- * ##### Permission condition #####
108
- *
109
- * A condition that allows only users with a permission to execute a transition.
110
- *
111
- * {
112
- * "type": "PermissionCondition",
113
- * "configuration": {
114
- * "permissionKey": "BROWSE_PROJECTS"
115
- * }
116
- * }
117
- *
118
- * * `permissionKey` The permission required to perform the transition. Allowed
119
- * values:
120
- * [built-in](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-permission-schemes/#built-in-permissions)
121
- * or app defined permissions.
122
- *
123
- * ##### Previous status condition #####
124
- *
125
- * A condition that allows a transition based on whether an issue has or has not
126
- * transitioned through a status.
127
- *
128
- * {
129
- * "type": "PreviousStatusCondition",
130
- * "configuration": {
131
- * "ignoreLoopTransitions": true,
132
- * "includeCurrentStatus": true,
133
- * "mostRecentStatusOnly": true,
134
- * "reverseCondition": true,
135
- * "previousStatus": {
136
- * "id": "5"
137
- * }
138
- * }
139
- * }
140
- *
141
- * By default this condition allows the transition if the status, as defined by
142
- * its ID in the `previousStatus` object, matches any previous issue status,
143
- * unless:
144
- *
145
- * * `ignoreLoopTransitions` is `true`, then loop transitions (from and to the
146
- * same status) are ignored.
147
- * * `includeCurrentStatus` is `true`, then the current issue status is also
148
- * checked.
149
- * * `mostRecentStatusOnly` is `true`, then only the issue's preceding status
150
- * (the one immediately before the current status) is checked.
151
- * * `reverseCondition` is `true`, then the status must not be present.
152
- *
153
- * ##### Separation of duties condition #####
154
- *
155
- * A condition that prevents a user to perform the transition, if the user has
156
- * already performed a transition on the issue.
157
- *
158
- * {
159
- * "type": "SeparationOfDutiesCondition",
160
- * "configuration": {
161
- * "fromStatus": {
162
- * "id": "5"
163
- * },
164
- * "toStatus": {
165
- * "id": "6"
166
- * }
167
- * }
168
- * }
169
- *
170
- * * `fromStatus` OPTIONAL. An object containing the ID of the source status of
171
- * the transition that is blocked. If omitted any transition to `toStatus` is
172
- * blocked.
173
- * * `toStatus` An object containing the ID of the target status of the
174
- * transition that is blocked.
175
- *
176
- * ##### Subtask blocking condition #####
177
- *
178
- * A condition that blocks transition on a parent issue if any of its subtasks are
179
- * in any of one or more statuses.
180
- *
181
- * {
182
- * "type": "SubTaskBlockingCondition",
183
- * "configuration": {
184
- * "statuses": [
185
- * {
186
- * "id": "1"
187
- * },
188
- * {
189
- * "id": "3"
190
- * }
191
- * ]
192
- * }
193
- * }
194
- *
195
- * * `statuses` A list of objects containing status IDs.
196
- *
197
- * ##### User is in any group condition #####
198
- *
199
- * A condition that allows users belonging to any group from a list of groups to
200
- * execute a transition.
201
- *
202
- * {
203
- * "type": "UserInAnyGroupCondition",
204
- * "configuration": {
205
- * "groups": [
206
- * "administrators",
207
- * "atlassian-addons-admin"
208
- * ]
209
- * }
210
- * }
211
- *
212
- * * `groups` A list of group names.
213
- *
214
- * ##### User is in any project role condition #####
215
- *
216
- * A condition that allows only users with at least one project roles from a list
217
- * of project roles to execute a transition.
218
- *
219
- * {
220
- * "type": "InAnyProjectRoleCondition",
221
- * "configuration": {
222
- * "projectRoles": [
223
- * {
224
- * "id": "10002"
225
- * },
226
- * {
227
- * "id": "10003"
228
- * },
229
- * {
230
- * "id": "10012"
231
- * },
232
- * {
233
- * "id": "10013"
234
- * }
235
- * ]
236
- * }
237
- * }
238
- *
239
- * * `projectRoles` A list of objects containing project role IDs.
240
- *
241
- * ##### User is in custom field condition #####
242
- *
243
- * A condition that allows only users listed in a given custom field to execute
244
- * the transition.
245
- *
246
- * {
247
- * "type": "UserIsInCustomFieldCondition",
248
- * "configuration": {
249
- * "allowUserInField": false,
250
- * "fieldId": "customfield_10010"
251
- * }
252
- * }
253
- *
254
- * * `allowUserInField` If `true` only a user who is listed in `fieldId` can
255
- * perform the transition, otherwise, only a user who is not listed in `fieldId`
256
- * can perform the transition.
257
- * * `fieldId` The ID of the field containing the list of users.
258
- *
259
- * ##### User is in group condition #####
260
- *
261
- * A condition that allows users belonging to a group to execute a transition.
262
- *
263
- * {
264
- * "type": "UserInGroupCondition",
265
- * "configuration": {
266
- * "group": "administrators"
267
- * }
268
- * }
269
- *
270
- * * `group` The name of the group.
271
- *
272
- * ##### User is in group custom field condition #####
273
- *
274
- * A condition that allows users belonging to a group specified in a custom field
275
- * to execute a transition.
276
- *
277
- * {
278
- * "type": "InGroupCFCondition",
279
- * "configuration": {
280
- * "fieldId": "customfield_10012"
281
- * }
282
- * }
283
- *
284
- * * `fieldId` The ID of the field. Allowed field types:
285
- *
286
- * * `com.atlassian.jira.plugin.system.customfieldtypes:multigrouppicker`
287
- * * `com.atlassian.jira.plugin.system.customfieldtypes:grouppicker`
288
- * * `com.atlassian.jira.plugin.system.customfieldtypes:select`
289
- * * `com.atlassian.jira.plugin.system.customfieldtypes:multiselect`
290
- * * `com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons`
291
- * * `com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes`
292
- * * `com.pyxis.greenhopper.jira:gh-epic-status`
293
- *
294
- * ##### User is in project role condition #####
295
- *
296
- * A condition that allows users with a project role to execute a transition.
297
- *
298
- * {
299
- * "type": "InProjectRoleCondition",
300
- * "configuration": {
301
- * "projectRole": {
302
- * "id": "10002"
303
- * }
304
- * }
305
- * }
306
- *
307
- * * `projectRole` An object containing the ID of a project role.
308
- *
309
- * ##### Value field condition #####
310
- *
311
- * A conditions that allows a transition to execute if the value of a field is
312
- * equal to a constant value or simply set.
313
- *
314
- * {
315
- * "type": "ValueFieldCondition",
316
- * "configuration": {
317
- * "fieldId": "assignee",
318
- * "fieldValue":
319
- * "qm:6e1ecee6-8e64-4db6-8c85-916bb3275f51:54b56885-2bd2-4381-8239-78263442520f",
320
- * "comparisonType": "NUMBER",
321
- * "comparator": "="
322
- * }
323
- * }
324
- *
325
- * * `fieldId` The ID of a field used in the comparison.
326
- * * `fieldValue` The expected value of the field.
327
- * * `comparisonType` The type of the comparison. Allowed values: `STRING`,
328
- * `NUMBER`, `DATE`, `DATE_WITHOUT_TIME`, or `OPTIONID`.
329
- * * `comparator` One of the supported comparator: `>`, `>=`, `=`, `<=`, `<`,
330
- * `!=`.
331
- *
332
- * **Notes:**
333
- *
334
- * * If you choose the comparison type `STRING`, only `=` and `!=` are valid
335
- * options.
336
- * * You may leave `fieldValue` empty when comparison type is `!=` to indicate
337
- * that a value is required in the field.
338
- * * For date fields without time format values as `yyyy-MM-dd`, and for those
339
- * with time as `yyyy-MM-dd HH:mm`. For example, for July 16 2021 use
340
- * `2021-07-16`, for 8:05 AM use `2021-07-16 08:05`, and for 4 PM: `2021-07-16
341
- * 16:00`.
342
- *
343
- * #### Validators ####
344
- *
345
- * Validators check that any input made to the transition is valid before the
346
- * transition is performed.
347
- *
348
- * ##### Date field validator #####
349
- *
350
- * A validator that compares two dates.
351
- *
352
- * {
353
- * "type": "DateFieldValidator",
354
- * "configuration": {
355
- * "comparator": ">",
356
- * "date1": "updated",
357
- * "date2": "created",
358
- * "expression": "1d",
359
- * "includeTime": true
360
- * }
361
- * }
362
- *
363
- * * `comparator` One of the supported comparator: `>`, `>=`, `=`, `<=`, `<`, or
364
- * `!=`.
365
- * * `date1` The date field to validate. Allowed field types:
366
- *
367
- * * `com.atlassian.jira.plugin.system.customfieldtypes:datepicker`
368
- * * `com.atlassian.jira.plugin.system.customfieldtypes:datetime`
369
- * * `com.atlassian.jpo:jpo-custom-field-baseline-end`
370
- * * `com.atlassian.jpo:jpo-custom-field-baseline-start`
371
- * * `duedate`
372
- * * `created`
373
- * * `updated`
374
- * * `resolutiondate`
375
- * * `date2` The second date field. Required, if `expression` is not passed.
376
- * Allowed field types:
377
- *
378
- * * `com.atlassian.jira.plugin.system.customfieldtypes:datepicker`
379
- * * `com.atlassian.jira.plugin.system.customfieldtypes:datetime`
380
- * * `com.atlassian.jpo:jpo-custom-field-baseline-end`
381
- * * `com.atlassian.jpo:jpo-custom-field-baseline-start`
382
- * * `duedate`
383
- * * `created`
384
- * * `updated`
385
- * * `resolutiondate`
386
- * * `expression` An expression specifying an offset. Required, if `date2` is
387
- * not passed. Offsets are built with a number, with `-` as prefix for the past,
388
- * and one of these time units: `d` for day, `w` for week, `m` for month, or `y`
389
- * for year. For example, -2d means two days into the past and 1w means one week
390
- * into the future. The `now` keyword enables a comparison with the current date.
391
- * * `includeTime` If `true`, then the time part of the data is included for the
392
- * comparison. If the field doesn't have a time part, 00:00:00 is used.
393
- *
394
- * ##### Windows date validator #####
395
- *
396
- * A validator that checks that a date falls on or after a reference date and
397
- * before or on the reference date plus a number of days.
398
- *
399
- * {
400
- * "type": "WindowsDateValidator",
401
- * "configuration": {
402
- * "date1": "customfield_10009",
403
- * "date2": "created",
404
- * "windowsDays": 5
405
- * }
406
- * }
407
- *
408
- * * `date1` The date field to validate. Allowed field types:
409
- *
410
- * * `com.atlassian.jira.plugin.system.customfieldtypes:datepicker`
411
- * * `com.atlassian.jira.plugin.system.customfieldtypes:datetime`
412
- * * `com.atlassian.jpo:jpo-custom-field-baseline-end`
413
- * * `com.atlassian.jpo:jpo-custom-field-baseline-start`
414
- * * `duedate`
415
- * * `created`
416
- * * `updated`
417
- * * `resolutiondate`
418
- * * `date2` The reference date. Allowed field types:
419
- *
420
- * * `com.atlassian.jira.plugin.system.customfieldtypes:datepicker`
421
- * * `com.atlassian.jira.plugin.system.customfieldtypes:datetime`
422
- * * `com.atlassian.jpo:jpo-custom-field-baseline-end`
423
- * * `com.atlassian.jpo:jpo-custom-field-baseline-start`
424
- * * `duedate`
425
- * * `created`
426
- * * `updated`
427
- * * `resolutiondate`
428
- * * `windowsDays` A positive integer indicating a number of days.
429
- *
430
- * ##### Field required validator #####
431
- *
432
- * A validator that checks fields are not empty. By default, if a field is not
433
- * included in the current context it's ignored and not validated.
434
- *
435
- * {
436
- * "type": "FieldRequiredValidator",
437
- * "configuration": {
438
- * "ignoreContext": true,
439
- * "errorMessage": "Hey",
440
- * "fieldIds": [
441
- * "versions",
442
- * "customfield_10037",
443
- * "customfield_10003"
444
- * ]
445
- * }
446
- * }
447
- *
448
- * * `ignoreContext` If `true`, then the context is ignored and all the fields
449
- * are validated.
450
- * * `errorMessage` OPTIONAL. The error message displayed when one or more
451
- * fields are empty. A default error message is shown if an error message is not
452
- * provided.
453
- * * `fieldIds` The list of fields to validate.
454
- *
455
- * ##### Field changed validator #####
456
- *
457
- * A validator that checks that a field value is changed. However, this validation
458
- * can be ignored for users from a list of groups.
459
- *
460
- * {
461
- * "type": "FieldChangedValidator",
462
- * "configuration": {
463
- * "fieldId": "comment",
464
- * "errorMessage": "Hey",
465
- * "exemptedGroups": [
466
- * "administrators",
467
- * "atlassian-addons-admin"
468
- * ]
469
- * }
470
- * }
471
- *
472
- * * `fieldId` The ID of a field.
473
- * * `errorMessage` OPTIONAL. The error message displayed if the field is not
474
- * changed. A default error message is shown if the error message is not provided.
475
- * * `exemptedGroups` OPTIONAL. The list of groups.
476
- *
477
- * ##### Field has single value validator #####
478
- *
479
- * A validator that checks that a multi-select field has only one value.
480
- * Optionally, the validation can ignore values copied from subtasks.
481
- *
482
- * {
483
- * "type": "FieldHasSingleValueValidator",
484
- * "configuration": {
485
- * "fieldId": "attachment,
486
- * "excludeSubtasks": true
487
- * }
488
- * }
489
- *
490
- * * `fieldId` The ID of a field.
491
- * * `excludeSubtasks` If `true`, then values copied from subtasks are ignored.
492
- *
493
- * ##### Parent status validator #####
494
- *
495
- * A validator that checks the status of the parent issue of a subtask. Ìf the
496
- * issue is not a subtask, no validation is performed.
497
- *
498
- * {
499
- * "type": "ParentStatusValidator",
500
- * "configuration": {
501
- * "parentStatuses": [
502
- * {
503
- * "id":"1"
504
- * },
505
- * {
506
- * "id":"2"
507
- * }
508
- * ]
509
- * }
510
- * }
511
- *
512
- * * `parentStatus` The list of required parent issue statuses.
513
- *
514
- * ##### Permission validator #####
515
- *
516
- * A validator that checks the user has a permission.
517
- *
518
- * {
519
- * "type": "PermissionValidator",
520
- * "configuration": {
521
- * "permissionKey": "ADMINISTER_PROJECTS"
522
- * }
523
- * }
524
- *
525
- * * `permissionKey` The permission required to perform the transition. Allowed
526
- * values:
527
- * [built-in](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-permission-schemes/#built-in-permissions)
528
- * or app defined permissions.
529
- *
530
- * ##### Previous status validator #####
531
- *
532
- * A validator that checks if the issue has held a status.
533
- *
534
- * {
535
- * "type": "PreviousStatusValidator",
536
- * "configuration": {
537
- * "mostRecentStatusOnly": false,
538
- * "previousStatus": {
539
- * "id": "15"
540
- * }
541
- * }
542
- * }
543
- *
544
- * * `mostRecentStatusOnly` If `true`, then only the issue's preceding status
545
- * (the one immediately before the current status) is checked.
546
- * * `previousStatus` An object containing the ID of an issue status.
547
- *
548
- * ##### Regular expression validator #####
549
- *
550
- * A validator that checks the content of a field against a regular expression.
551
- *
552
- * {
553
- * "type": "RegexpFieldValidator",
554
- * "configuration": {
555
- * "regExp": "[0-9]",
556
- * "fieldId": "customfield_10029"
557
- * }
558
- * }
559
- *
560
- * * `regExp`A regular expression.
561
- * * `fieldId` The ID of a field. Allowed field types:
562
- *
563
- * * `com.atlassian.jira.plugin.system.customfieldtypes:select`
564
- * * `com.atlassian.jira.plugin.system.customfieldtypes:multiselect`
565
- * * `com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons`
566
- * * `com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes`
567
- * * `com.atlassian.jira.plugin.system.customfieldtypes:textarea`
568
- * * `com.atlassian.jira.plugin.system.customfieldtypes:textfield`
569
- * * `com.atlassian.jira.plugin.system.customfieldtypes:url`
570
- * * `com.atlassian.jira.plugin.system.customfieldtypes:float`
571
- * * `com.pyxis.greenhopper.jira:jsw-story-points`
572
- * * `com.pyxis.greenhopper.jira:gh-epic-status`
573
- * * `description`
574
- * * `summary`
575
- *
576
- * ##### User permission validator #####
577
- *
578
- * A validator that checks if a user has a permission. Obsolete. You may encounter
579
- * this validator when getting transition rules and can pass it when updating or
580
- * creating rules, for example, when you want to duplicate the rules from a
581
- * workflow on a new workflow.
582
- *
583
- * {
584
- * "type": "UserPermissionValidator",
585
- * "configuration": {
586
- * "permissionKey": "BROWSE_PROJECTS",
587
- * "nullAllowed": false,
588
- * "username": "TestUser"
589
- * }
590
- * }
591
- *
592
- * * `permissionKey` The permission to be validated. Allowed values:
593
- * [built-in](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-permission-schemes/#built-in-permissions)
594
- * or app defined permissions.
595
- * * `nullAllowed` If `true`, allows the transition when `username` is empty.
596
- * * `username` The username to validate against the `permissionKey`.
597
- *
598
- * #### Post functions ####
599
- *
600
- * Post functions carry out any additional processing required after a Jira
601
- * workflow transition is executed.
602
- *
603
- * ##### Fire issue event function #####
604
- *
605
- * A post function that fires an event that is processed by the listeners.
606
- *
607
- * {
608
- * "type": "FireIssueEventFunction",
609
- * "configuration": {
610
- * "event": {
611
- * "id":"1"
612
- * }
613
- * }
614
- * }
615
- *
616
- * **Note:** If provided, this post function overrides the default
617
- * `FireIssueEventFunction`. Can be included once in a transition.
618
- *
619
- * * `event` An object containing the ID of the issue event.
620
- *
621
- * ##### Update issue status #####
622
- *
623
- * A post function that sets issue status to the linked status of the destination
624
- * workflow status.
625
- *
626
- * {
627
- * "type": "UpdateIssueStatusFunction"
628
- * }
629
- *
630
- * **Note:** This post function is a default function in global and directed
631
- * transitions. It can only be added to the initial transition and can only be
632
- * added once.
633
- *
634
- * ##### Create comment #####
635
- *
636
- * A post function that adds a comment entered during the transition to an issue.
637
- *
638
- * {
639
- * "type": "CreateCommentFunction"
640
- * }
641
- *
642
- * **Note:** This post function is a default function in global and directed
643
- * transitions. It can only be added to the initial transition and can only be
644
- * added once.
645
- *
646
- * ##### Store issue #####
647
- *
648
- * A post function that stores updates to an issue.
649
- *
650
- * {
651
- * "type": "IssueStoreFunction"
652
- * }
653
- *
654
- * **Note:** This post function can only be added to the initial transition and
655
- * can only be added once.
656
- *
657
- * ##### Assign to current user function #####
658
- *
659
- * A post function that assigns the issue to the current user if the current user
660
- * has the `ASSIGNABLE_USER` permission.
661
- *
662
- * {
663
- * "type": "AssignToCurrentUserFunction"
664
- * }
665
- *
666
- * **Note:** This post function can be included once in a transition.
667
- *
668
- * ##### Assign to lead function #####
669
- *
670
- * A post function that assigns the issue to the project or component lead
671
- * developer.
672
- *
673
- * {
674
- * "type": "AssignToLeadFunction"
675
- * }
676
- *
677
- * **Note:** This post function can be included once in a transition.
678
- *
679
- * ##### Assign to reporter function #####
680
- *
681
- * A post function that assigns the issue to the reporter.
682
- *
683
- * {
684
- * "type": "AssignToReporterFunction"
685
- * }
686
- *
687
- * **Note:** This post function can be included once in a transition.
688
- *
689
- * ##### Clear field value function #####
690
- *
691
- * A post function that clears the value from a field.
692
- *
693
- * {
694
- * "type": "ClearFieldValuePostFunction",
695
- * "configuration": {
696
- * "fieldId": "assignee"
697
- * }
698
- * }
699
- *
700
- * * `fieldId` The ID of the field.
701
- *
702
- * ##### Copy value from other field function #####
703
- *
704
- * A post function that copies the value of one field to another, either within an
705
- * issue or from parent to subtask.
706
- *
707
- * {
708
- * "type": "CopyValueFromOtherFieldPostFunction",
709
- * "configuration": {
710
- * "sourceFieldId": "assignee",
711
- * "destinationFieldId": "creator",
712
- * "copyType": "same"
713
- * }
714
- * }
715
- *
716
- * * `sourceFieldId` The ID of the source field.
717
- * * `destinationFieldId` The ID of the destination field.
718
- * * `copyType` Use `same` to copy the value from a field inside the issue, or
719
- * `parent` to copy the value from the parent issue.
720
- *
721
- * ##### Create Crucible review workflow function (deprecated) #####
722
- *
723
- * A post function that creates a Crucible review for all unreviewed code for the
724
- * issue.
725
- *
726
- * {
727
- * "type": "CreateCrucibleReviewWorkflowFunction"
728
- * }
729
- *
730
- * **Note:** This post function can be included once in a transition.
731
- *
732
- * ##### Set issue security level based on user's project role function #####
733
- *
734
- * A post function that sets the issue's security level if the current user has a
735
- * project role.
736
- *
737
- * {
738
- * "type": "SetIssueSecurityFromRoleFunction",
739
- * "configuration": {
740
- * "projectRole": {
741
- * "id":"10002"
742
- * },
743
- * "issueSecurityLevel": {
744
- * "id":"10000"
745
- * }
746
- * }
747
- * }
748
- *
749
- * * `projectRole` An object containing the ID of the project role.
750
- * * `issueSecurityLevel` OPTIONAL. The object containing the ID of the security
751
- * level. If not passed, then the security level is set to `none`.
752
- *
753
- * ##### Trigger a webhook function #####
754
- *
755
- * A post function that triggers a webhook.
756
- *
757
- * {
758
- * "type": "TriggerWebhookFunction",
759
- * "configuration": {
760
- * "webhook": {
761
- * "id": "1"
762
- * }
763
- * }
764
- * }
765
- *
766
- * * `webhook` An object containing the ID of the webhook listener to trigger.
767
- *
768
- * ##### Update issue custom field function #####
769
- *
770
- * A post function that updates the content of an issue custom field.
771
- *
772
- * {
773
- * "type": "UpdateIssueCustomFieldPostFunction",
774
- * "configuration": {
775
- * "mode": "append",
776
- * "fieldId": "customfield_10003",
777
- * "fieldValue": "yikes"
778
- * }
779
- * }
780
- *
781
- * * `mode` Use `replace` to override the field content with `fieldValue` or
782
- * `append` to add `fieldValue` to the end of the field content.
783
- * * `fieldId` The ID of the field.
784
- * * `fieldValue` The update content.
785
- *
786
- * ##### Update issue field function #####
787
- *
788
- * A post function that updates a simple issue field.
789
- *
790
- * {
791
- * "type": "UpdateIssueFieldFunction",
792
- * "configuration": {
793
- * "fieldId": "assignee",
794
- * "fieldValue": "5f0c277e70b8a90025a00776"
795
- * }
796
- * }
797
- *
798
- * * `fieldId` The ID of the field. Allowed field types:
799
- *
800
- * * `assignee`
801
- * * `description`
802
- * * `environment`
803
- * * `priority`
804
- * * `resolution`
805
- * * `summary`
806
- * * `timeoriginalestimate`
807
- * * `timeestimate`
808
- * * `timespent`
809
- * * `fieldValue` The update value.
810
- * * If the `fieldId` is `assignee`, the `fieldValue` should be one of these
811
- * values:
812
- *
813
- * * an account ID.
814
- * * `automatic`.
815
- * * a blank string, which sets the value to `unassigned`.
816
- *
817
- * #### Connect rules ####
818
- *
819
- * Connect rules are conditions, validators, and post functions of a transition
820
- * that are registered by Connect apps. To create a rule registered by the app,
821
- * the app must be enabled and the rule's module must exist.
822
- *
823
- * {
824
- * "type": "appKey__moduleKey",
825
- * "configuration": {
826
- * "value":"{\"isValid\":\"true\"}"
827
- * }
828
- * }
829
- *
830
- * * `type` A Connect rule key in a form of `appKey__moduleKey`.
831
- * * `value` The stringified JSON configuration of a Connect rule.
832
- *
833
- * #### Forge rules ####
834
- *
835
- * Forge transition rules are not yet supported.
836
- *
837
- * **[Permissions](#permissions) required:** *Administer Jira* [global
838
- * permission](https://confluence.atlassian.com/x/x4dKLg).
839
- *
840
- * @deprecated
841
- * @returns Returned if the workflow is created.
842
- *
843
- * example: {
844
- * "entityId": "d7178e8d-bf6c-4c0c-9e90-758a0b965b67",
845
- * "name": "Workflow 1"
846
- * }
847
- * @path {POST} /rest/api/3/workflow
848
- * @scopes-current manage:jira-configuration
849
- * @scopes-beta write:workflow:jira, read:workflow:jira
850
- * @see https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-workflows#api-rest-api-3-workflow-post
851
- */
852
- createWorkflow({ createWorkflowDetails, }) {
853
- return this.getClientInstance()
854
- .request({
855
- path: "/rest/api/3/workflow",
856
- method: "POST",
857
- headers: {
858
- "Content-Type": "application/json",
859
- },
860
- body: createWorkflowDetails,
861
- })
862
- .then(this.getClientInstance().responseHandler({
863
- 201: {
864
- "application/json": "json",
865
- },
866
- }))
867
- .then(commonHttpClient.castResponse())
868
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("WorkflowsService.createWorkflow.response"))
869
- .then(commonHttpClient.getBody);
870
- }
871
- /**
872
- * Create workflows and related statuses.
873
- *
874
- * **[Permissions](#permissions) required:**
875
- *
876
- * * *Administer Jira* project permission to create all, including
877
- * global-scoped, workflows
878
- * * *Administer projects* project permissions to create project-scoped workflows
879
- *
880
- * @returns Returned if the request is successful.
881
- *
882
- * example: {
883
- * "statuses": [
884
- * {
885
- * "description": "",
886
- * "id": "10001",
887
- * "name": "To Do",
888
- * "scope": {
889
- * "type": "GLOBAL"
890
- * },
891
- * "statusCategory": "TODO",
892
- * "statusReference": "10001",
893
- * "usages": []
894
- * },
895
- * {
896
- * "description": "",
897
- * "id": "10002",
898
- * "name": "In Progress",
899
- * "scope": {
900
- * "type": "GLOBAL"
901
- * },
902
- * "statusCategory": "IN_PROGRESS",
903
- * "statusReference": "10002",
904
- * "usages": []
905
- * },
906
- * {
907
- * "description": "",
908
- * "id": "10003",
909
- * "name": "Done",
910
- * "scope": {
911
- * "type": "GLOBAL"
912
- * },
913
- * "statusCategory": "DONE",
914
- * "statusReference": "10003",
915
- * "usages": []
916
- * }
917
- * ],
918
- * "workflows": [
919
- * {
920
- * "description": "",
921
- * "id": "b9ff2384-d3b6-4d4e-9509-3ee19f607168",
922
- * "isEditable": true,
923
- * "name": "Software workflow 1",
924
- * "scope": {
925
- * "type": "GLOBAL"
926
- * },
927
- * "startPointLayout": {
928
- * "x": -100.00030899047852,
929
- * "y": -153.00020599365234
930
- * },
931
- * "statuses": [
932
- * {
933
- * "deprecated": false,
934
- * "layout": {
935
- * "x": 114.99993896484375,
936
- * "y": -16
937
- * },
938
- * "properties": {},
939
- * "statusReference": "10001"
940
- * },
941
- * {
942
- * "deprecated": false,
943
- * "layout": {
944
- * "x": 317.0000915527344,
945
- * "y": -16
946
- * },
947
- * "properties": {},
948
- * "statusReference": "10002"
949
- * },
950
- * {
951
- * "deprecated": false,
952
- * "layout": {
953
- * "x": 508.000244140625,
954
- * "y": -16
955
- * },
956
- * "properties": {},
957
- * "statusReference": "10003"
958
- * }
959
- * ],
960
- * "transitions": [
961
- * {
962
- * "actions": [],
963
- * "description": "",
964
- * "from": [],
965
- * "id": "31",
966
- * "name": "Done",
967
- * "properties": {},
968
- * "to": {
969
- * "statusReference": "10003"
970
- * },
971
- * "triggers": [],
972
- * "type": "GLOBAL",
973
- * "validators": []
974
- * },
975
- * {
976
- * "actions": [],
977
- * "description": "",
978
- * "from": [],
979
- * "id": "11",
980
- * "name": "To Do",
981
- * "properties": {},
982
- * "to": {
983
- * "statusReference": "10001"
984
- * },
985
- * "triggers": [],
986
- * "type": "GLOBAL",
987
- * "validators": []
988
- * },
989
- * {
990
- * "actions": [],
991
- * "description": "",
992
- * "from": [],
993
- * "id": "21",
994
- * "name": "In Progress",
995
- * "properties": {},
996
- * "to": {
997
- * "statusReference": "10002"
998
- * },
999
- * "triggers": [],
1000
- * "type": "GLOBAL",
1001
- * "validators": []
1002
- * },
1003
- * {
1004
- * "actions": [],
1005
- * "description": "",
1006
- * "from": [],
1007
- * "id": "1",
1008
- * "name": "Create",
1009
- * "properties": {},
1010
- * "to": {
1011
- * "statusReference": "10001"
1012
- * },
1013
- * "triggers": [],
1014
- * "type": "INITIAL",
1015
- * "validators": []
1016
- * }
1017
- * ],
1018
- * "usages": [],
1019
- * "version": {
1020
- * "id": "f010ac1b-3dd3-43a3-aa66-0ee8a447f76e",
1021
- * "versionNumber": 0
1022
- * }
1023
- * }
1024
- * ]
1025
- * }
1026
- * @path {POST} /rest/api/3/workflows/create
1027
- * @scopes-current manage:jira-configuration
1028
- * @scopes-beta write:workflow:jira
1029
- * @see https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-workflows#api-rest-api-3-workflows-create-post
1030
- */
1031
- createWorkflows({ workflowCreateRequest, }) {
1032
- return this.getClientInstance()
1033
- .request({
1034
- path: "/rest/api/3/workflows/create",
1035
- method: "POST",
1036
- headers: {
1037
- "Content-Type": "application/json",
1038
- },
1039
- body: workflowCreateRequest,
1040
- })
1041
- .then(this.getClientInstance().responseHandler({
1042
- 200: {
1043
- "application/json": "json",
1044
- },
1045
- }))
1046
- .then(commonHttpClient.castResponse())
1047
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("WorkflowsService.createWorkflows.response"))
1048
- .then(commonHttpClient.getBody);
1049
- }
1050
- /**
1051
- * Deletes a workflow.
1052
- *
1053
- * The workflow cannot be deleted if it is:
1054
- *
1055
- * * an active workflow.
1056
- * * a system workflow.
1057
- * * associated with any workflow scheme.
1058
- * * associated with any draft workflow scheme.
1059
- *
1060
- * **[Permissions](#permissions) required:** *Administer Jira* [global
1061
- * permission](https://confluence.atlassian.com/x/x4dKLg).
1062
- *
1063
- * @path {DELETE} /rest/api/3/workflow/{entityId}
1064
- * @scopes-current manage:jira-configuration
1065
- * @scopes-beta delete:workflow:jira
1066
- * @see https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-workflows#api-rest-api-3-workflow-entityid-delete
1067
- */
1068
- deleteInactiveWorkflow({ entityId, }) {
1069
- return this.getClientInstance()
1070
- .request({
1071
- path: "/rest/api/3/workflow/{entityId}",
1072
- method: "DELETE",
1073
- pathParams: {
1074
- entityId,
1075
- },
1076
- })
1077
- .then(commonHttpClient.discardResult);
1078
- }
1079
- /**
1080
- * Returns all workflows in Jira or a workflow. Deprecated, use [Get workflows
1081
- * paginated](#api-rest-api-3-workflow-search-get).
1082
- *
1083
- * If the `workflowName` parameter is specified, the workflow is returned as an
1084
- * object (not in an array). Otherwise, an array of workflow objects is returned.
1085
- *
1086
- * **[Permissions](#permissions) required:** *Administer Jira* [global
1087
- * permission](https://confluence.atlassian.com/x/x4dKLg).
1088
- *
1089
- * @deprecated
1090
- * @returns Returned if the request is successful.
1091
- *
1092
- * example: [
1093
- * {
1094
- * "default": true,
1095
- * "description": "A classic Jira workflow",
1096
- * "lastModifiedDate": "01-01-2011",
1097
- * "lastModifiedUser": "admin",
1098
- * "lastModifiedUserAccountId": "5b10a2844c20165700ede21g",
1099
- * "name": "classic workflow",
1100
- * "steps": 5
1101
- * }
1102
- * ]
1103
- * @path {GET} /rest/api/3/workflow
1104
- * @scopes-current manage:jira-configuration
1105
- * @scopes-beta read:workflow:jira, read:project:jira, read:project-category:jira,
1106
- * read:avatar:jira
1107
- * @see https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-workflows#api-rest-api-3-workflow-get
1108
- */
1109
- getAllWorkflows({ workflowName, } = {}) {
1110
- return this.getClientInstance()
1111
- .request({
1112
- path: "/rest/api/3/workflow",
1113
- method: "GET",
1114
- query: {
1115
- workflowName,
1116
- },
1117
- })
1118
- .then(this.getClientInstance().responseHandler({
1119
- 200: {
1120
- "application/json": "json",
1121
- },
1122
- }))
1123
- .then(commonHttpClient.castResponse())
1124
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("WorkflowsService.getAllWorkflows.response"))
1125
- .then(commonHttpClient.getBody);
1126
- }
1127
- /**
1128
- * Returns a [paginated](#pagination) list of published classic workflows. When
1129
- * workflow names are specified, details of those workflows are returned.
1130
- * Otherwise, all published classic workflows are returned.
1131
- *
1132
- * This operation does not return next-gen workflows.
1133
- *
1134
- * **[Permissions](#permissions) required:** *Administer Jira* [global
1135
- * permission](https://confluence.atlassian.com/x/x4dKLg).
1136
- *
1137
- * @returns Returned if the request is successful.
1138
- *
1139
- * example: {
1140
- * "isLast": false,
1141
- * "maxResults": 1,
1142
- * "startAt": 0,
1143
- * "total": 5,
1144
- * "values": [
1145
- * {
1146
- * "id": {
1147
- * "name": "SCRUM Workflow",
1148
- * "entityId": "5ed312c5-f7a6-4a78-a1f6-8ff7f307d063"
1149
- * },
1150
- * "description": "A workflow used for Software projects in the SCRUM
1151
- * methodology",
1152
- * "transitions": [
1153
- * {
1154
- * "id": "5",
1155
- * "name": "In Progress",
1156
- * "description": "Start working on the issue.",
1157
- * "from": [
1158
- * "10",
1159
- * "13"
1160
- * ],
1161
- * "to": "14",
1162
- * "type": "directed",
1163
- * "screen": {
1164
- * "id": "10000",
1165
- * "name": "Issue screen"
1166
- * },
1167
- * "rules": {
1168
- * "conditionsTree": {
1169
- * "nodeType": "compound",
1170
- * "operator": "AND",
1171
- * "conditions": [
1172
- * {
1173
- * "nodeType": "simple",
1174
- * "type": "PermissionCondition",
1175
- * "configuration": {
1176
- * "permissionKey": "WORK_ON_ISSUES"
1177
- * }
1178
- * },
1179
- * {
1180
- * "nodeType": "simple",
1181
- * "type": "PermissionCondition",
1182
- * "configuration": {
1183
- * "permissionKey": "RESOLVE_ISSUES"
1184
- * }
1185
- * }
1186
- * ]
1187
- * },
1188
- * "validators": [
1189
- * {
1190
- * "type": "FieldRequiredValidator",
1191
- * "configuration": {
1192
- * "errorMessage": "A custom error message",
1193
- * "fields": [
1194
- * "description",
1195
- * "assignee"
1196
- * ],
1197
- * "ignoreContext": true
1198
- * }
1199
- * }
1200
- * ],
1201
- * "postFunctions": [
1202
- * {
1203
- * "type": "UpdateIssueStatusFunction"
1204
- * },
1205
- * {
1206
- * "type": "GenerateChangeHistoryFunction"
1207
- * },
1208
- * {
1209
- * "type": "FireIssueEventFunction"
1210
- * }
1211
- * ]
1212
- * },
1213
- * "properties": {
1214
- * "jira.fieldscreen.id": 1
1215
- * }
1216
- * }
1217
- * ],
1218
- * "statuses": [
1219
- * {
1220
- * "id": "3",
1221
- * "name": "In Progress",
1222
- * "properties": {
1223
- * "issueEditable": false,
1224
- * "jira.issue.editable": "false"
1225
- * }
1226
- * }
1227
- * ],
1228
- * "isDefault": false,
1229
- * "schemes": [
1230
- * {
1231
- * "id": "10001",
1232
- * "name": "Test Workflow Scheme"
1233
- * }
1234
- * ],
1235
- * "projects": [
1236
- * {
1237
- * "avatarUrls": {
1238
- * "16x16": "secure/projectavatar?size=xsmall&pid=10000",
1239
- * "24x24": "secure/projectavatar?size=small&pid=10000",
1240
- * "32x32": "secure/projectavatar?size=medium&pid=10000",
1241
- * "48x48": "secure/projectavatar?size=large&pid=10000"
1242
- * },
1243
- * "id": "10000",
1244
- * "key": "EX",
1245
- * "name": "Example",
1246
- * "projectCategory": {
1247
- * "description": "Project category description",
1248
- * "id": "10000",
1249
- * "name": "A project category"
1250
- * },
1251
- * "projectTypeKey": "ProjectTypeKey{key='software'}",
1252
- * "self": "project/EX",
1253
- * "simplified": false
1254
- * }
1255
- * ],
1256
- * "hasDraftWorkflow": true,
1257
- * "operations": {
1258
- * "canEdit": true,
1259
- * "canDelete": false
1260
- * },
1261
- * "created": "2018-12-10T16:30:15.000+0000",
1262
- * "updated": "2018-12-11T11:45:13.000+0000"
1263
- * }
1264
- * ]
1265
- * }
1266
- * @path {GET} /rest/api/3/workflow/search
1267
- * @scopes-current manage:jira-project
1268
- * @scopes-beta read:group:jira, read:issue-security-level:jira, read:project-role:jira,
1269
- * read:screen:jira, read:status:jira, read:user:jira, read:workflow:jira,
1270
- * read:webhook:jira, read:avatar:jira, read:project-category:jira,
1271
- * read:project:jira
1272
- * @see https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-workflows#api-rest-api-3-workflow-search-get
1273
- */
1274
- getWorkflowsPaginated({ startAt, maxResults, workflowName, expand, queryString, orderBy, isActive, } = {}) {
1275
- return this.getClientInstance()
1276
- .request({
1277
- path: "/rest/api/3/workflow/search",
1278
- method: "GET",
1279
- query: {
1280
- startAt,
1281
- maxResults,
1282
- workflowName,
1283
- expand,
1284
- queryString,
1285
- orderBy,
1286
- isActive,
1287
- },
1288
- })
1289
- .then(this.getClientInstance().responseHandler({
1290
- 200: {
1291
- "application/json": "json",
1292
- },
1293
- }))
1294
- .then(commonHttpClient.castResponse())
1295
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("WorkflowsService.getWorkflowsPaginated.response"))
1296
- .then(commonHttpClient.getBody);
1297
- }
1298
- /**
1299
- * Returns a list of workflows and related statuses by providing workflow names,
1300
- * workflow IDs, or project and issue types.
1301
- *
1302
- * **[Permissions](#permissions) required:**
1303
- *
1304
- * * *Administer Jira* global permission to access all, including
1305
- * project-scoped, workflows
1306
- * * At least one of the *Administer projects* and *View (read-only) workflow*
1307
- * project permissions to access project-scoped workflows
1308
- *
1309
- * @returns Returned if the request is successful.
1310
- *
1311
- * example: {
1312
- * "statuses": [
1313
- * {
1314
- * "description": "",
1315
- * "id": "10001",
1316
- * "name": "To Do",
1317
- * "scope": {
1318
- * "type": "GLOBAL"
1319
- * },
1320
- * "statusCategory": "TODO",
1321
- * "statusReference": "10001",
1322
- * "usages": []
1323
- * },
1324
- * {
1325
- * "description": "",
1326
- * "id": "10002",
1327
- * "name": "In Progress",
1328
- * "scope": {
1329
- * "type": "GLOBAL"
1330
- * },
1331
- * "statusCategory": "IN_PROGRESS",
1332
- * "statusReference": "10002",
1333
- * "usages": []
1334
- * },
1335
- * {
1336
- * "description": "",
1337
- * "id": "10003",
1338
- * "name": "Done",
1339
- * "scope": {
1340
- * "type": "GLOBAL"
1341
- * },
1342
- * "statusCategory": "DONE",
1343
- * "statusReference": "10003",
1344
- * "usages": []
1345
- * }
1346
- * ],
1347
- * "workflows": [
1348
- * {
1349
- * "description": "",
1350
- * "id": "b9ff2384-d3b6-4d4e-9509-3ee19f607168",
1351
- * "isEditable": true,
1352
- * "name": "Workflow 1",
1353
- * "scope": {
1354
- * "type": "GLOBAL"
1355
- * },
1356
- * "startPointLayout": {
1357
- * "x": -100.00030899047852,
1358
- * "y": -153.00020599365234
1359
- * },
1360
- * "statuses": [
1361
- * {
1362
- * "deprecated": false,
1363
- * "layout": {
1364
- * "x": 114.99993896484375,
1365
- * "y": -16
1366
- * },
1367
- * "properties": {},
1368
- * "statusReference": "10001"
1369
- * },
1370
- * {
1371
- * "deprecated": false,
1372
- * "layout": {
1373
- * "x": 317.0000915527344,
1374
- * "y": -16
1375
- * },
1376
- * "properties": {},
1377
- * "statusReference": "10002"
1378
- * },
1379
- * {
1380
- * "deprecated": false,
1381
- * "layout": {
1382
- * "x": 508.000244140625,
1383
- * "y": -16
1384
- * },
1385
- * "properties": {},
1386
- * "statusReference": "10003"
1387
- * }
1388
- * ],
1389
- * "transitions": [
1390
- * {
1391
- * "actions": [],
1392
- * "description": "",
1393
- * "from": [],
1394
- * "id": "31",
1395
- * "name": "Done",
1396
- * "properties": {},
1397
- * "to": {
1398
- * "statusReference": "10003"
1399
- * },
1400
- * "triggers": [],
1401
- * "type": "GLOBAL",
1402
- * "validators": []
1403
- * },
1404
- * {
1405
- * "actions": [],
1406
- * "description": "",
1407
- * "from": [],
1408
- * "id": "11",
1409
- * "name": "To Do",
1410
- * "properties": {},
1411
- * "to": {
1412
- * "statusReference": "10001"
1413
- * },
1414
- * "triggers": [],
1415
- * "type": "GLOBAL",
1416
- * "validators": []
1417
- * },
1418
- * {
1419
- * "actions": [],
1420
- * "description": "",
1421
- * "from": [],
1422
- * "id": "21",
1423
- * "name": "In Progress",
1424
- * "properties": {},
1425
- * "to": {
1426
- * "statusReference": "10002"
1427
- * },
1428
- * "triggers": [],
1429
- * "type": "GLOBAL",
1430
- * "validators": []
1431
- * },
1432
- * {
1433
- * "actions": [],
1434
- * "description": "",
1435
- * "from": [],
1436
- * "id": "1",
1437
- * "name": "Create",
1438
- * "properties": {},
1439
- * "to": {
1440
- * "statusReference": "10001"
1441
- * },
1442
- * "triggers": [],
1443
- * "type": "INITIAL",
1444
- * "validators": []
1445
- * }
1446
- * ],
1447
- * "usages": [],
1448
- * "version": {
1449
- * "id": "f010ac1b-3dd3-43a3-aa66-0ee8a447f76e",
1450
- * "versionNumber": 0
1451
- * }
1452
- * }
1453
- * ]
1454
- * }
1455
- * @path {POST} /rest/api/3/workflows
1456
- * @scopes-current manage:jira-configuration
1457
- * @scopes-beta read:workflow:jira
1458
- * @see https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-workflows#api-rest-api-3-workflows-post
1459
- */
1460
- readWorkflows({ expand, workflowReadRequest, }) {
1461
- return this.getClientInstance()
1462
- .request({
1463
- path: "/rest/api/3/workflows",
1464
- method: "POST",
1465
- query: {
1466
- expand,
1467
- },
1468
- headers: {
1469
- "Content-Type": "application/json",
1470
- },
1471
- body: workflowReadRequest,
1472
- })
1473
- .then(this.getClientInstance().responseHandler({
1474
- 200: {
1475
- "application/json": "json",
1476
- },
1477
- }))
1478
- .then(commonHttpClient.castResponse())
1479
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("WorkflowsService.readWorkflows.response"))
1480
- .then(commonHttpClient.getBody);
1481
- }
1482
- /**
1483
- * Update workflows and related statuses.
1484
- *
1485
- * **[Permissions](#permissions) required:**
1486
- *
1487
- * * *Administer Jira* project permission to create all, including
1488
- * global-scoped, workflows
1489
- * * *Administer projects* project permissions to create project-scoped workflows
1490
- *
1491
- * @returns Returned if the request is successful.
1492
- *
1493
- * example: {
1494
- * "statuses": [
1495
- * {
1496
- * "description": "",
1497
- * "id": "10001",
1498
- * "name": "To Do",
1499
- * "scope": {
1500
- * "type": "GLOBAL"
1501
- * },
1502
- * "statusCategory": "TODO",
1503
- * "statusReference": "10001",
1504
- * "usages": []
1505
- * },
1506
- * {
1507
- * "description": "",
1508
- * "id": "10002",
1509
- * "name": "In Progress",
1510
- * "scope": {
1511
- * "type": "GLOBAL"
1512
- * },
1513
- * "statusCategory": "IN_PROGRESS",
1514
- * "statusReference": "10002",
1515
- * "usages": []
1516
- * },
1517
- * {
1518
- * "description": "",
1519
- * "id": "10003",
1520
- * "name": "Done",
1521
- * "scope": {
1522
- * "type": "GLOBAL"
1523
- * },
1524
- * "statusCategory": "DONE",
1525
- * "statusReference": "10003",
1526
- * "usages": []
1527
- * }
1528
- * ],
1529
- * "taskId": "10001",
1530
- * "workflows": [
1531
- * {
1532
- * "description": "",
1533
- * "id": "b9ff2384-d3b6-4d4e-9509-3ee19f607168",
1534
- * "isEditable": true,
1535
- * "name": "Software workflow 1",
1536
- * "scope": {
1537
- * "type": "GLOBAL"
1538
- * },
1539
- * "startPointLayout": {
1540
- * "x": -100.00030899047852,
1541
- * "y": -153.00020599365234
1542
- * },
1543
- * "statuses": [
1544
- * {
1545
- * "deprecated": false,
1546
- * "layout": {
1547
- * "x": 114.99993896484375,
1548
- * "y": -16
1549
- * },
1550
- * "properties": {},
1551
- * "statusReference": "10001"
1552
- * },
1553
- * {
1554
- * "deprecated": false,
1555
- * "layout": {
1556
- * "x": 317.0000915527344,
1557
- * "y": -16
1558
- * },
1559
- * "properties": {},
1560
- * "statusReference": "10002"
1561
- * },
1562
- * {
1563
- * "deprecated": false,
1564
- * "layout": {
1565
- * "x": 508.000244140625,
1566
- * "y": -16
1567
- * },
1568
- * "properties": {},
1569
- * "statusReference": "10003"
1570
- * }
1571
- * ],
1572
- * "transitions": [
1573
- * {
1574
- * "actions": [],
1575
- * "description": "",
1576
- * "from": [],
1577
- * "id": "31",
1578
- * "name": "Done",
1579
- * "properties": {},
1580
- * "to": {
1581
- * "statusReference": "10003"
1582
- * },
1583
- * "triggers": [],
1584
- * "type": "GLOBAL",
1585
- * "validators": []
1586
- * },
1587
- * {
1588
- * "actions": [],
1589
- * "description": "",
1590
- * "from": [],
1591
- * "id": "11",
1592
- * "name": "To Do",
1593
- * "properties": {},
1594
- * "to": {
1595
- * "statusReference": "10001"
1596
- * },
1597
- * "triggers": [],
1598
- * "type": "GLOBAL",
1599
- * "validators": []
1600
- * },
1601
- * {
1602
- * "actions": [],
1603
- * "description": "",
1604
- * "from": [],
1605
- * "id": "21",
1606
- * "name": "In Progress",
1607
- * "properties": {},
1608
- * "to": {
1609
- * "statusReference": "10002"
1610
- * },
1611
- * "triggers": [],
1612
- * "type": "GLOBAL",
1613
- * "validators": []
1614
- * },
1615
- * {
1616
- * "actions": [],
1617
- * "description": "",
1618
- * "from": [],
1619
- * "id": "1",
1620
- * "name": "Create",
1621
- * "properties": {},
1622
- * "to": {
1623
- * "statusReference": "10001"
1624
- * },
1625
- * "triggers": [],
1626
- * "type": "INITIAL",
1627
- * "validators": []
1628
- * }
1629
- * ],
1630
- * "usages": [],
1631
- * "version": {
1632
- * "id": "f010ac1b-3dd3-43a3-aa66-0ee8a447f76e",
1633
- * "versionNumber": 0
1634
- * }
1635
- * }
1636
- * ]
1637
- * }
1638
- * @path {POST} /rest/api/3/workflows/update
1639
- * @scopes-current manage:jira-configuration
1640
- * @scopes-beta write:workflow:jira
1641
- * @see https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-workflows#api-rest-api-3-workflows-update-post
1642
- */
1643
- updateWorkflows({ expand, workflowUpdateRequest, }) {
1644
- return this.getClientInstance()
1645
- .request({
1646
- path: "/rest/api/3/workflows/update",
1647
- method: "POST",
1648
- query: {
1649
- expand,
1650
- },
1651
- headers: {
1652
- "Content-Type": "application/json",
1653
- },
1654
- body: workflowUpdateRequest,
1655
- })
1656
- .then(this.getClientInstance().responseHandler({
1657
- 200: {
1658
- "application/json": "json",
1659
- },
1660
- }))
1661
- .then(commonHttpClient.castResponse())
1662
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("WorkflowsService.updateWorkflows.response"))
1663
- .then(commonHttpClient.getBody);
1664
- }
1665
- /**
1666
- * Validate the payload for bulk create workflows.
1667
- *
1668
- * **[Permissions](#permissions) required:**
1669
- *
1670
- * * *Administer Jira* project permission to create all, including
1671
- * global-scoped, workflows
1672
- * * *Administer projects* project permissions to create project-scoped workflows
1673
- *
1674
- * @returns Returned if the request is successful.
1675
- *
1676
- * example: {
1677
- * "errors": [
1678
- * {
1679
- * "code": "NON_UNIQUE_STATUS_NAME",
1680
- * "elementReference": {
1681
- * "statusReference": "1f0443ff-47e4-4306-9c26-0af696059a43"
1682
- * },
1683
- * "level": "ERROR",
1684
- * "message": "You must use a unique status name.",
1685
- * "type": "STATUS"
1686
- * }
1687
- * ]
1688
- * }
1689
- * @path {POST} /rest/api/3/workflows/create/validation
1690
- * @scopes-current manage:jira-configuration
1691
- * @scopes-beta write:workflow:jira
1692
- * @see https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-workflows#api-rest-api-3-workflows-create-validation-post
1693
- */
1694
- validateCreateWorkflows({ workflowCreateValidateRequest, }) {
1695
- return this.getClientInstance()
1696
- .request({
1697
- path: "/rest/api/3/workflows/create/validation",
1698
- method: "POST",
1699
- headers: {
1700
- "Content-Type": "application/json",
1701
- },
1702
- body: workflowCreateValidateRequest,
1703
- })
1704
- .then(this.getClientInstance().responseHandler({
1705
- 200: {
1706
- "application/json": "json",
1707
- },
1708
- }))
1709
- .then(commonHttpClient.castResponse())
1710
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("WorkflowsService.validateCreateWorkflows.response"))
1711
- .then(commonHttpClient.getBody);
1712
- }
1713
- /**
1714
- * Validate the payload for bulk update workflows.
1715
- *
1716
- * **[Permissions](#permissions) required:**
1717
- *
1718
- * * *Administer Jira* project permission to create all, including
1719
- * global-scoped, workflows
1720
- * * *Administer projects* project permissions to create project-scoped workflows
1721
- *
1722
- * @returns Returned if the request is successful.
1723
- *
1724
- * example: {
1725
- * "errors": [
1726
- * {
1727
- * "code": "NON_UNIQUE_STATUS_NAME",
1728
- * "elementReference": {
1729
- * "statusReference": "1f0443ff-47e4-4306-9c26-0af696059a43"
1730
- * },
1731
- * "level": "ERROR",
1732
- * "message": "You must use a unique status name.",
1733
- * "type": "STATUS"
1734
- * }
1735
- * ]
1736
- * }
1737
- * @path {POST} /rest/api/3/workflows/update/validation
1738
- * @scopes-current manage:jira-configuration
1739
- * @scopes-beta write:workflow:jira
1740
- * @see https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-workflows#api-rest-api-3-workflows-update-validation-post
1741
- */
1742
- validateUpdateWorkflows({ workflowUpdateValidateRequestBean, }) {
1743
- return this.getClientInstance()
1744
- .request({
1745
- path: "/rest/api/3/workflows/update/validation",
1746
- method: "POST",
1747
- headers: {
1748
- "Content-Type": "application/json",
1749
- },
1750
- body: workflowUpdateValidateRequestBean,
1751
- })
1752
- .then(this.getClientInstance().responseHandler({
1753
- 200: {
1754
- "application/json": "json",
1755
- },
1756
- }))
1757
- .then(commonHttpClient.castResponse())
1758
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("WorkflowsService.validateUpdateWorkflows.response"))
1759
- .then(commonHttpClient.getBody);
1760
- }
1761
- /**
1762
- * Get the list of workflow capabilities for a specific workflow using either the
1763
- * workflow ID, or the project and issue type ID pair. The response includes the
1764
- * scope of the workflow, defined as global/project-based, and a list of project
1765
- * types that the workflow is scoped to. It also includes all rules organised into
1766
- * their broad categories (conditions, validators, actions, triggers, screens) as
1767
- * well as the source location (Atlassian-provided, Connect, Forge).
1768
- *
1769
- * **[Permissions](#permissions) required:**
1770
- *
1771
- * * *Administer Jira* project permission to access all, including
1772
- * global-scoped, workflows
1773
- * * *Administer projects* project permissions to access project-scoped workflows
1774
- *
1775
- * The current list of Atlassian-provided rules:
1776
- *
1777
- * #### Validators ####
1778
- *
1779
- * A validator rule that checks if a user has the required permissions to execute
1780
- * the transition in the workflow.
1781
- *
1782
- * ##### Permission validator #####
1783
- *
1784
- * A validator rule that checks if a user has the required permissions to execute
1785
- * the transition in the workflow.
1786
- *
1787
- * {
1788
- * "ruleKey": "system:check-permission-validator",
1789
- * "parameters": {
1790
- * "permissionKey": "ADMINISTER_PROJECTS"
1791
- * }
1792
- * }
1793
- *
1794
- * Parameters:
1795
- *
1796
- * * `permissionKey` The permission required to perform the transition. Allowed
1797
- * values: [built-in Jira
1798
- * permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-permission-schemes/#built-in-permissions).
1799
- *
1800
- * ##### Parent or child blocking validator #####
1801
- *
1802
- * A validator to block the child issue\\u2019s transition depending on the parent
1803
- * issue\\u2019s status.
1804
- *
1805
- * {
1806
- * "ruleKey" : "system:parent-or-child-blocking-validator"
1807
- * "parameters" : {
1808
- * "blocker" : "PARENT"
1809
- * "statusIds" : "1,2,3"
1810
- * }
1811
- * }
1812
- *
1813
- * Parameters:
1814
- *
1815
- * * `blocker` currently only supports `PARENT`.
1816
- * * `statusIds` a comma-separated list of status IDs.
1817
- *
1818
- * ##### Previous status validator #####
1819
- *
1820
- * A validator that checks if an issue has transitioned through specified previous
1821
- * status(es) before allowing the current transition to occur.
1822
- *
1823
- * {
1824
- * "ruleKey": "system:previous-status-validator",
1825
- * "parameters": {
1826
- * "previousStatusIds": "10014",
1827
- * "mostRecentStatusOnly": "true"
1828
- * }
1829
- * }
1830
- *
1831
- * Parameters:
1832
- *
1833
- * * `previousStatusIds` a comma-separated list of status IDs, currently only
1834
- * support one ID.
1835
- * * `mostRecentStatusOnly` when `true` only considers the most recent status
1836
- * for the condition evaluation. Allowed values: `true`, `false`.
1837
- *
1838
- * ##### Validate a field value #####
1839
- *
1840
- * A validation that ensures a specific field's value meets the defined criteria
1841
- * before allowing an issue to transition in the workflow.
1842
- *
1843
- * Depending on the rule type, the result will vary:
1844
- *
1845
- * ###### Field required ######
1846
- *
1847
- * {
1848
- * "ruleKey": "system:validate-field-value",
1849
- * "parameters": {
1850
- * "ruleType": "fieldRequired",
1851
- * "fieldsRequired": "assignee",
1852
- * "ignoreContext": "true",
1853
- * "errorMessage": "An assignee must be set!"
1854
- * }
1855
- * }
1856
- *
1857
- * Parameters:
1858
- *
1859
- * * `fieldsRequired` the ID of the field that is required. For a custom field,
1860
- * it would look like `customfield_123`.
1861
- * * `ignoreContext` controls the impact of context settings on field
1862
- * validation. When set to `true`, the validator doesn't check a required field if
1863
- * its context isn't configured for the current issue. When set to `false`, the
1864
- * validator requires a field even if its context is invalid. Allowed values:
1865
- * `true`, `false`.
1866
- * * `errorMessage` is the error message to display if the user does not provide
1867
- * a value during the transition. A default error message will be shown if you
1868
- * don't provide one (Optional).
1869
- *
1870
- * ###### Field changed ######
1871
- *
1872
- * {
1873
- * "ruleKey": "system:validate-field-value",
1874
- * "parameters": {
1875
- * "ruleType": "fieldChanged",
1876
- * "groupsExemptFromValidation": "6862ac20-8672-4f68-896d-4854f5efb79e",
1877
- * "fieldKey": "versions",
1878
- * "errorMessage": "Affect versions must be modified before transition"
1879
- * }
1880
- * }
1881
- *
1882
- * Parameters:
1883
- *
1884
- * * `groupsExemptFromValidation` a comma-separated list of group IDs to be
1885
- * exempt from the validation.
1886
- * * `fieldKey` the ID of the field that has changed. For a custom field, it
1887
- * would look like `customfield_123`.
1888
- * * `errorMessage` the error message to display if the user does not provide a
1889
- * value during the transition. A default error message will be shown if you don't
1890
- * provide one (Optional).
1891
- *
1892
- * ###### Field has a single value ######
1893
- *
1894
- * {
1895
- * "ruleKey": "system:validate-field-value",
1896
- * "parameters": {
1897
- * "ruleType": "fieldHasSingleValue",
1898
- * "fieldKey": "created",
1899
- * "excludeSubtasks": "true"
1900
- * }
1901
- * }
1902
- *
1903
- * Parameters:
1904
- *
1905
- * * `fieldKey` the ID of the field to validate. For a custom field, it would
1906
- * look like `customfield_123`.
1907
- * * `excludeSubtasks` Option to exclude values copied from sub-tasks. Allowed
1908
- * values: `true`, `false`.
1909
- *
1910
- * ###### Field matches regular expression ######
1911
- *
1912
- * {
1913
- * "ruleKey": "system:validate-field-value",
1914
- * "parameters": {
1915
- * "ruleType": "fieldMatchesRegularExpression",
1916
- * "regexp": "[0-9]{4}",
1917
- * "fieldKey": "description"
1918
- * }
1919
- * }
1920
- *
1921
- * Parameters:
1922
- *
1923
- * * `regexp` the regular expression used to validate the field\\u2019s content.
1924
- * * `fieldKey` the ID of the field to validate. For a custom field, it would
1925
- * look like `customfield_123`.
1926
- *
1927
- * ###### Date field comparison ######
1928
- *
1929
- * {
1930
- * "ruleKey": "system:validate-field-value",
1931
- * "parameters": {
1932
- * "ruleType": "dateFieldComparison",
1933
- * "date1FieldKey": "duedate",
1934
- * "date2FieldKey": "customfield_10054",
1935
- * "includeTime": "true",
1936
- * "conditionSelected": ">="
1937
- * }
1938
- * }
1939
- *
1940
- * Parameters:
1941
- *
1942
- * * `date1FieldKey` the ID of the first field to compare. For a custom field,
1943
- * it would look like `customfield_123`.
1944
- * * `date2FieldKey` the ID of the second field to compare. For a custom field,
1945
- * it would look like `customfield_123`.
1946
- * * `includeTime` if `true`, compares both date and time. Allowed values:
1947
- * `true`, `false`.
1948
- * * `conditionSelected` the condition to compare with. Allowed values: `>`,
1949
- * `>=`, `=`, `<=`, `<`, `!=`.
1950
- *
1951
- * ###### Date range comparison ######
1952
- *
1953
- * {
1954
- * "ruleKey": "system:validate-field-value",
1955
- * "parameters": {
1956
- * "ruleType": "windowDateComparison",
1957
- * "date1FieldKey": "customfield_10009",
1958
- * "date2FieldKey": "customfield_10054",
1959
- * "numberOfDays": "3"
1960
- * }
1961
- * }
1962
- *
1963
- * Parameters:
1964
- *
1965
- * * `date1FieldKey` the ID of the first field to compare. For a custom field,
1966
- * it would look like `customfield_123`.
1967
- * * `date2FieldKey` the ID of the second field to compare. For a custom field,
1968
- * it would look like `customfield_123`.
1969
- * * `numberOfDays` maximum number of days past the reference date
1970
- * (`date2FieldKey`) to pass validation.
1971
- *
1972
- * This rule is composed by aggregating the following legacy rules:
1973
- *
1974
- * * FieldRequiredValidator
1975
- * * FieldChangedValidator
1976
- * * FieldHasSingleValueValidator
1977
- * * RegexpFieldValidator
1978
- * * DateFieldValidator
1979
- * * WindowsDateValidator
1980
- *
1981
- * ##### Proforma: Forms attached validator #####
1982
- *
1983
- * Validates that one or more forms are attached to the issue.
1984
- *
1985
- * {
1986
- * "ruleKey" : "system:proforma-forms-attached"
1987
- * "parameters" : {}
1988
- * }
1989
- *
1990
- * ##### Proforma: Forms submitted validator #####
1991
- *
1992
- * Validates that all forms attached to the issue have been submitted.
1993
- *
1994
- * {
1995
- * "ruleKey" : "system:proforma-forms-submitted"
1996
- * "parameters" : {}
1997
- * }
1998
- *
1999
- * #### Conditions ####
2000
- *
2001
- * Conditions enable workflow rules that govern whether a transition can execute.
2002
- *
2003
- * ##### Check field value #####
2004
- *
2005
- * A condition rule evaluates as true if a specific field's value meets the
2006
- * defined criteria. This rule ensures that an issue can only transition to the
2007
- * next step in the workflow if the field's value matches the desired condition.
2008
- *
2009
- * {
2010
- * "ruleKey": "system:check-field-value",
2011
- * "parameters": {
2012
- * "fieldId": "description",
2013
- * "fieldValue": "[\"Done\"]",
2014
- * "comparator": "=",
2015
- * "comparisonType": "STRING"
2016
- * }
2017
- * }
2018
- *
2019
- * Parameters:
2020
- *
2021
- * * `fieldId` The ID of the field to check the value of. For non-system fields,
2022
- * it will look like `customfield_123`. Note: `fieldId` is used interchangeably
2023
- * with the idea of `fieldKey` here, they refer to the same field.
2024
- * * `fieldValue` the list of values to check against the field\\u2019s value.
2025
- * * `comparator` The comparison logic. Allowed values: `>`, `>=`, `=`, `<=`,
2026
- * `<`, `!=`.
2027
- * * `comparisonType` The type of data being compared. Allowed values: `STRING`,
2028
- * `NUMBER`, `DATE`, `DATE_WITHOUT_TIME`, `OPTIONID`.
2029
- *
2030
- * ##### Restrict issue transition #####
2031
- *
2032
- * This rule ensures that issue transitions are restricted based on user accounts,
2033
- * roles, group memberships, and permissions, maintaining control over who can
2034
- * transition an issue. This condition evaluates as `true` if any of the following
2035
- * criteria is met.
2036
- *
2037
- * {
2038
- * "ruleKey": "system:restrict-issue-transition",
2039
- * "parameters": {
2040
- * "accountIds": "allow-reporter,5e68ac137d64450d01a77fa0",
2041
- * "roleIds": "10002,10004",
2042
- * "groupIds": "703ff44a-7dc8-4f4b-9aa6-a65bf3574fa4",
2043
- * "permissionKeys": "ADMINISTER_PROJECTS",
2044
- * "groupCustomFields": "customfield_10028",
2045
- * "allowUserCustomFields":
2046
- * "customfield_10072,customfield_10144,customfield_10007",
2047
- * "denyUserCustomFields": "customfield_10107"
2048
- * }
2049
- * }
2050
- *
2051
- * Parameters:
2052
- *
2053
- * * `accountIds` a comma-separated list of the user account IDs. It also allows
2054
- * generic values like: `allow-assignee`, `allow-reporter`, and `accountIds` Note:
2055
- * This is only supported in team-managed projects
2056
- * * `roleIds` a comma-separated list of role IDs.
2057
- * * `groupIds` a comma-separated list of group IDs.
2058
- * * `permissionKeys` a comma-separated list of permission keys. Allowed values:
2059
- * [built-in Jira
2060
- * permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-permission-schemes/#built-in-permissions).
2061
- * * `groupCustomFields` a comma-separated list of group custom field IDs.
2062
- * * `allowUserCustomFields` a comma-separated list of user custom field IDs to
2063
- * allow for issue transition.
2064
- * * `denyUserCustomFields` a comma-separated list of user custom field IDs to
2065
- * deny for issue transition.
2066
- *
2067
- * This rule is composed by aggregating the following legacy rules:
2068
- *
2069
- * * AllowOnlyAssignee
2070
- * * AllowOnlyReporter
2071
- * * InAnyProjectRoleCondition
2072
- * * InProjectRoleCondition
2073
- * * UserInAnyGroupCondition
2074
- * * UserInGroupCondition
2075
- * * PermissionCondtion
2076
- * * InGroupCFCondition
2077
- * * UserIsInCustomFieldCondition
2078
- *
2079
- * ##### Previous status condition #####
2080
- *
2081
- * A condition that evaluates based on an issue's previous status(es) and specific
2082
- * criteria.
2083
- *
2084
- * {
2085
- * "ruleKey" : "system:previous-status-condition"
2086
- * "parameters" : {
2087
- * "previousStatusIds" : "10004",
2088
- * "not": "true",
2089
- * "mostRecentStatusOnly" : "true",
2090
- * "includeCurrentStatus": "true",
2091
- * "ignoreLoopTransitions": "true"
2092
- * }
2093
- * }
2094
- *
2095
- * Parameters:
2096
- *
2097
- * * `previousStatusIds` a comma-separated list of status IDs, current only
2098
- * support one ID.
2099
- * * `not` indicates if the condition should be reversed. When `true` it checks
2100
- * that the issue has not been in the selected statuses. Allowed values: `true`,
2101
- * `false`.
2102
- * * `mostRecentStatusOnly` when true only considers the most recent status for
2103
- * the condition evaluation. Allowed values: `true`, `false`.
2104
- * * `includeCurrentStatus` includes the current status when evaluating if the
2105
- * issue has been through the selected statuses. Allowed values: `true`, `false`.
2106
- * * `ignoreLoopTransitions` ignore loop transitions. Allowed values: `true`,
2107
- * `false`.
2108
- *
2109
- * ##### Parent or child blocking condition #####
2110
- *
2111
- * A condition to block the parent\\u2019s issue transition depending on the
2112
- * child\\u2019s issue status.
2113
- *
2114
- * {
2115
- * "ruleKey" : "system:parent-or-child-blocking-condition"
2116
- * "parameters" : {
2117
- * "blocker" : "CHILD",
2118
- * "statusIds" : "1,2,3"
2119
- * }
2120
- * }
2121
- *
2122
- * Parameters:
2123
- *
2124
- * * `blocker` currently only supports `CHILD`.
2125
- * * `statusIds` a comma-separated list of status IDs.
2126
- *
2127
- * ##### Separation of duties #####
2128
- *
2129
- * A condition preventing the user from performing, if the user has already
2130
- * performed a transition on the issue.
2131
- *
2132
- * {
2133
- * "ruleKey": "system:separation-of-duties",
2134
- * "parameters": {
2135
- * "fromStatusId": "10161",
2136
- * "toStatusId": "10160"
2137
- * }
2138
- * }
2139
- *
2140
- * Parameters:
2141
- *
2142
- * * `fromStatusId` represents the status ID from which the issue is
2143
- * transitioning. It ensures that the user performing the current transition has
2144
- * not performed any actions when the issue was in the specified status.
2145
- * * `toStatusId` represents the status ID to which the issue is transitioning.
2146
- * It ensures that the user performing the current transition is not the same user
2147
- * who has previously transitioned the issue.
2148
- *
2149
- * ##### Restrict transitions #####
2150
- *
2151
- * A condition preventing all users from transitioning the issue can also
2152
- * optionally include APIs as well.
2153
- *
2154
- * {
2155
- * "ruleKey": "system:restrict-from-all-users",
2156
- * "parameters": {
2157
- * "restrictMode": "users"
2158
- * }
2159
- * }
2160
- *
2161
- * Parameters:
2162
- *
2163
- * * `restrictMode` restricts the issue transition including/excluding APIs.
2164
- * Allowed values: `"users"`, `"usersAndAPI"`.
2165
- *
2166
- * ##### Jira Service Management block until approved #####
2167
- *
2168
- * Block an issue transition until approval. Note: This is only supported in
2169
- * team-managed projects.
2170
- *
2171
- * {
2172
- * "ruleKey": "system:jsd-approvals-block-until-approved",
2173
- * "parameters": {
2174
- * "approvalConfigurationJson": "{"statusExternalUuid...}"
2175
- * }
2176
- * }
2177
- *
2178
- * Parameters:
2179
- *
2180
- * * `approvalConfigurationJson` a stringified JSON holding the Jira Service
2181
- * Management approval configuration.
2182
- *
2183
- * ##### Jira Service Management block until rejected #####
2184
- *
2185
- * Block an issue transition until rejected. Note: This is only supported in
2186
- * team-managed projects.
2187
- *
2188
- * {
2189
- * "ruleKey": "system:jsd-approvals-block-until-rejected",
2190
- * "parameters": {
2191
- * "approvalConfigurationJson": "{"statusExternalUuid...}"
2192
- * }
2193
- * }
2194
- *
2195
- * Parameters:
2196
- *
2197
- * * `approvalConfigurationJson` a stringified JSON holding the Jira Service
2198
- * Management approval configuration.
2199
- *
2200
- * ##### Block in progress approval #####
2201
- *
2202
- * Condition to block issue transition if there is pending approval. Note: This is
2203
- * only supported in company-managed projects.
2204
- *
2205
- * {
2206
- * "ruleKey": "system:block-in-progress-approval",
2207
- * "parameters": {}
2208
- * }
2209
- *
2210
- * #### Post functions ####
2211
- *
2212
- * Post functions carry out any additional processing required after a workflow
2213
- * transition is executed.
2214
- *
2215
- * ##### Change assignee #####
2216
- *
2217
- * A post function rule that changes the assignee of an issue after a transition.
2218
- *
2219
- * {
2220
- * "ruleKey": "system:change-assignee",
2221
- * "parameters": {
2222
- * "type": "to-selected-user",
2223
- * "accountId": "example-account-id"
2224
- * }
2225
- * }
2226
- *
2227
- * Parameters:
2228
- *
2229
- * * `type` the parameter used to determine the new assignee. Allowed values:
2230
- * `to-selected-user`, `to-unassigned`, `to-current-user`, `to-current-user`,
2231
- * `to-default-user`, `to-default-user`
2232
- * * `accountId` the account ID of the user to assign the issue to. This
2233
- * parameter is required only when the type is `"to-selected-user"`.
2234
- *
2235
- * ##### Copy field value #####
2236
- *
2237
- * A post function that automates the process of copying values between fields
2238
- * during a specific transition, ensuring data consistency and reducing manual
2239
- * effort.
2240
- *
2241
- * {
2242
- * "ruleKey": "system:copy-value-from-other-field",
2243
- * "parameters": {
2244
- * "sourceFieldKey": "description",
2245
- * "targetFieldKey": "components",
2246
- * "issueSource": "SAME"
2247
- * }
2248
- * }
2249
- *
2250
- * Parameters:
2251
- *
2252
- * * `sourceFieldKey` the field key to copy from. For a custom field, it would
2253
- * look like `customfield_123`
2254
- * * `targetFieldKey` the field key to copy to. For a custom field, it would
2255
- * look like `customfield_123`
2256
- * * `issueSource` `SAME` or `PARENT`. Defaults to `SAME` if no value is
2257
- * provided.
2258
- *
2259
- * ##### Update field #####
2260
- *
2261
- * A post function that updates or appends a specific field with the given value.
2262
- *
2263
- * {
2264
- * "ruleKey": "system:update-field",
2265
- * "parameters": {
2266
- * "field": "customfield_10056",
2267
- * "value": "asdf",
2268
- * "mode": "append"
2269
- * }
2270
- * }
2271
- *
2272
- * Parameters:
2273
- *
2274
- * * `field` the ID of the field to update. For a custom field, it would look
2275
- * like `customfield_123`
2276
- * * `value` the value to update the field with.
2277
- * * `mode` `append` or `replace`. Determines if a value will be appended to the
2278
- * current value, or if the current value will be replaced.
2279
- *
2280
- * ##### Trigger webhook #####
2281
- *
2282
- * A post function that automatically triggers a predefined webhook when a
2283
- * transition occurs in the workflow.
2284
- *
2285
- * {
2286
- * "ruleKey": "system:trigger-webhook",
2287
- * "parameters": {
2288
- * "webhookId": "1"
2289
- * }
2290
- * }
2291
- *
2292
- * Parameters:
2293
- *
2294
- * * `webhookId` the ID of the webhook.
2295
- *
2296
- * #### Screen ####
2297
- *
2298
- * ##### Remind people to update fields #####
2299
- *
2300
- * A screen rule that prompts users to update a specific field when they interact
2301
- * with an issue screen during a transition. This rule is useful for ensuring that
2302
- * users provide or modify necessary information before moving an issue to the
2303
- * next step in the workflow.
2304
- *
2305
- * {
2306
- * "ruleKey": "system:remind-people-to-update-fields",
2307
- * "params": {
2308
- * "remindingFieldIds": "assignee,customfield_10025",
2309
- * "remindingMessage": "The message",
2310
- * "remindingAlwaysAsk": "true"
2311
- * }
2312
- * }
2313
- *
2314
- * Parameters:
2315
- *
2316
- * * `remindingFieldIds` a comma-separated list of field IDs. Note: `fieldId` is
2317
- * used interchangeably with the idea of `fieldKey` here, they refer to the same
2318
- * field.
2319
- * * `remindingMessage` the message to display when prompting the users to
2320
- * update the fields.
2321
- * * `remindingAlwaysAsk` always remind to update fields. Allowed values:
2322
- * `true`, `false`.
2323
- *
2324
- * ##### Shared transition screen #####
2325
- *
2326
- * A common screen that is shared between transitions in a workflow.
2327
- *
2328
- * {
2329
- * "ruleKey": "system:transition-screen",
2330
- * "params": {
2331
- * "screenId": "3"
2332
- * }
2333
- * }
2334
- *
2335
- * Parameters:
2336
- *
2337
- * * `screenId` the ID of the screen.
2338
- *
2339
- * #### Connect & Forge ####
2340
- *
2341
- * ##### Connect rules #####
2342
- *
2343
- * Validator/Condition/Post function for Connect app.
2344
- *
2345
- * {
2346
- * "ruleKey": "connect:expression-validator",
2347
- * "parameters": {
2348
- * "appKey": "com.atlassian.app",
2349
- * "config": "",
2350
- * "id": "90ce590f-e90c-4cd3-8281-165ce41f2ac3",
2351
- * "disabled": "false",
2352
- * "tag": ""
2353
- * }
2354
- * }
2355
- *
2356
- * Parameters:
2357
- *
2358
- * * `ruleKey` Validator: `connect:expression-validator`, Condition:
2359
- * `connect:expression-condition`, and Post function:
2360
- * `connect:remote-workflow-function`
2361
- * * `appKey` the reference to the Connect app
2362
- * * `config` a JSON payload string describing the configuration
2363
- * * `id` the ID of the rule
2364
- * * `disabled` determine if the Connect app is disabled. Allowed values:
2365
- * `true`, `false`.
2366
- * * `tag` additional tags for the Connect app
2367
- *
2368
- * ##### Forge rules #####
2369
- *
2370
- * Validator/Condition/Post function for Forge app.
2371
- *
2372
- * {
2373
- * "ruleKey": "forge:expression-validator",
2374
- * "parameters": {
2375
- * "key":
2376
- * "ari:cloud:ecosystem::extension/{appId}/{environmentId}/static/{moduleKey}",
2377
- * "config": "{"searchString":"workflow validator"}",
2378
- * "id": "a865ddf6-bb3f-4a7b-9540-c2f8b3f9f6c2"
2379
- * }
2380
- * }
2381
- *
2382
- * Parameters:
2383
- *
2384
- * * `ruleKey` Validator: `forge:expression-validator`, Condition:
2385
- * `forge:expression-condition`, and Post function: `forge:workflow-post-function`
2386
- * * `key` the identifier for the Forge app
2387
- * * `config` the persistent stringified JSON configuration for the Forge rule
2388
- * * `id` the ID of the Forge rule
2389
- *
2390
- * @returns Returned if the request is successful.
2391
- *
2392
- * example: {
2393
- * "connectRules": [
2394
- * {
2395
- * "addonKey": "com.atlassian.jira.refapp",
2396
- * "createUrl": "/validators/jira-expression/create?id={validator.id}",
2397
- * "description": "Validates if the given Jira expression is true.",
2398
- * "editUrl": "/validators/jira-expression/edit?id={validator.id}",
2399
- * "moduleKey": "jiraExpressionValidator",
2400
- * "name": "Jira expression validator (by APPNAME)",
2401
- * "ruleKey": "connect:expression-validator",
2402
- * "ruleType": "Validator",
2403
- * "viewUrl": "/validators/jira-expression/view?id={validator.id}"
2404
- * }
2405
- * ],
2406
- * "editorScope": "GLOBAL",
2407
- * "forgeRules": [
2408
- * {
2409
- * "description": "A Jira workflow validator example.",
2410
- * "id":
2411
- * "ari:cloud:ecosystem::extension/9df6d15f-1bbe-443e-be08-150309e8dbb0/f6a3bed3-737f-4e7a-8942-130df302b749/static/workflow-validator-example-workflow-validator",
2412
- * "name": "workflow-validator",
2413
- * "ruleKey": "forge:expression-validator",
2414
- * "ruleType": "Validator"
2415
- * }
2416
- * ],
2417
- * "projectTypes": [
2418
- * "software",
2419
- * "business"
2420
- * ],
2421
- * "systemRules": [
2422
- * {
2423
- * "description": "Automatically assign a request to someone after moving
2424
- * the request using a particular transition.",
2425
- * "incompatibleRuleKeys": [],
2426
- * "isAvailableForInitialTransition": true,
2427
- * "isVisible": true,
2428
- * "name": "Assign a request",
2429
- * "ruleKey": "system:change-assignee",
2430
- * "ruleType": "Function"
2431
- * }
2432
- * ],
2433
- * "triggerRules": [
2434
- * {
2435
- * "availableTypes": [
2436
- * {
2437
- * "description": "Automatically transitions the issue when a related
2438
- * branch is created in a connected repository",
2439
- * "name": "Branch created",
2440
- * "type":
2441
- * "com.atlassian.jira.plugins.jira-development-integration-plugin:branch-created-trigger"
2442
- * }
2443
- * ],
2444
- * "ruleKey": "system:development-triggers"
2445
- * }
2446
- * ]
2447
- * }
2448
- * @path {GET} /rest/api/3/workflows/capabilities
2449
- * @scopes-current manage:jira-configuration
2450
- * @scopes-beta read:workflow:jira
2451
- * @see https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-workflows#api-rest-api-3-workflows-capabilities-get
2452
- */
2453
- workflowCapabilities({ workflowId, projectId, issueTypeId, } = {}) {
2454
- return this.getClientInstance()
2455
- .request({
2456
- path: "/rest/api/3/workflows/capabilities",
2457
- method: "GET",
2458
- query: {
2459
- workflowId,
2460
- projectId,
2461
- issueTypeId,
2462
- },
2463
- })
2464
- .then(this.getClientInstance().responseHandler({
2465
- 200: {
2466
- "application/json": "json",
2467
- },
2468
- }))
2469
- .then(commonHttpClient.castResponse())
2470
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("WorkflowsService.workflowCapabilities.response"))
2471
- .then(commonHttpClient.getBody);
24
+ constructor() {
25
+ super(...arguments);
26
+ /**
27
+ * Creates a workflow. You can define transition rules using the shapes detailed
28
+ * in the following sections. If no transitional rules are specified the default
29
+ * system transition rules are used. Note: This only applies to company-managed
30
+ * scoped workflows. Use [bulk create
31
+ * workflows](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-workflows/#api-rest-api-3-workflows-create-post)
32
+ * to create both team and company-managed scoped workflows.
33
+ *
34
+ * #### Conditions ####
35
+ *
36
+ * Conditions enable workflow rules that govern whether a transition can execute.
37
+ *
38
+ * ##### Always false condition #####
39
+ *
40
+ * A condition that always fails.
41
+ *
42
+ * {
43
+ * "type": "AlwaysFalseCondition"
44
+ * }
45
+ *
46
+ * ##### Block transition until approval #####
47
+ *
48
+ * A condition that blocks issue transition if there is a pending approval.
49
+ *
50
+ * {
51
+ * "type": "BlockInProgressApprovalCondition"
52
+ * }
53
+ *
54
+ * ##### Compare number custom field condition #####
55
+ *
56
+ * A condition that allows transition if a comparison between a number custom
57
+ * field and a value is true.
58
+ *
59
+ * {
60
+ * "type": "CompareNumberCFCondition",
61
+ * "configuration": {
62
+ * "comparator": "=",
63
+ * "fieldId": "customfield_10029",
64
+ * "fieldValue": 2
65
+ * }
66
+ * }
67
+ *
68
+ * * `comparator` One of the supported comparator: `=`, `>`, and `<`.
69
+ * * `fieldId` The custom numeric field ID. Allowed field types:
70
+ *
71
+ * * `com.atlassian.jira.plugin.system.customfieldtypes:float`
72
+ * * `com.pyxis.greenhopper.jira:jsw-story-points`
73
+ * * `fieldValue` The value for comparison.
74
+ *
75
+ * ##### Hide from user condition #####
76
+ *
77
+ * A condition that hides a transition from users. The transition can only be
78
+ * triggered from a workflow function or REST API operation.
79
+ *
80
+ * {
81
+ * "type": "RemoteOnlyCondition"
82
+ * }
83
+ *
84
+ * ##### Only assignee condition #####
85
+ *
86
+ * A condition that allows only the assignee to execute a transition.
87
+ *
88
+ * {
89
+ * "type": "AllowOnlyAssignee"
90
+ * }
91
+ *
92
+ * ##### Only Bamboo notifications workflow condition (deprecated) #####
93
+ *
94
+ * A condition that makes the transition available only to Bamboo build
95
+ * notifications.
96
+ *
97
+ * {
98
+ * "type": "OnlyBambooNotificationsCondition"
99
+ * }
100
+ *
101
+ * ##### Only reporter condition #####
102
+ *
103
+ * A condition that allows only the reporter to execute a transition.
104
+ *
105
+ * {
106
+ * "type": "AllowOnlyReporter"
107
+ * }
108
+ *
109
+ * ##### Permission condition #####
110
+ *
111
+ * A condition that allows only users with a permission to execute a transition.
112
+ *
113
+ * {
114
+ * "type": "PermissionCondition",
115
+ * "configuration": {
116
+ * "permissionKey": "BROWSE_PROJECTS"
117
+ * }
118
+ * }
119
+ *
120
+ * * `permissionKey` The permission required to perform the transition. Allowed
121
+ * values:
122
+ * [built-in](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-permission-schemes/#built-in-permissions)
123
+ * or app defined permissions.
124
+ *
125
+ * ##### Previous status condition #####
126
+ *
127
+ * A condition that allows a transition based on whether an issue has or has not
128
+ * transitioned through a status.
129
+ *
130
+ * {
131
+ * "type": "PreviousStatusCondition",
132
+ * "configuration": {
133
+ * "ignoreLoopTransitions": true,
134
+ * "includeCurrentStatus": true,
135
+ * "mostRecentStatusOnly": true,
136
+ * "reverseCondition": true,
137
+ * "previousStatus": {
138
+ * "id": "5"
139
+ * }
140
+ * }
141
+ * }
142
+ *
143
+ * By default this condition allows the transition if the status, as defined by
144
+ * its ID in the `previousStatus` object, matches any previous issue status,
145
+ * unless:
146
+ *
147
+ * * `ignoreLoopTransitions` is `true`, then loop transitions (from and to the
148
+ * same status) are ignored.
149
+ * * `includeCurrentStatus` is `true`, then the current issue status is also
150
+ * checked.
151
+ * * `mostRecentStatusOnly` is `true`, then only the issue's preceding status
152
+ * (the one immediately before the current status) is checked.
153
+ * * `reverseCondition` is `true`, then the status must not be present.
154
+ *
155
+ * ##### Separation of duties condition #####
156
+ *
157
+ * A condition that prevents a user to perform the transition, if the user has
158
+ * already performed a transition on the issue.
159
+ *
160
+ * {
161
+ * "type": "SeparationOfDutiesCondition",
162
+ * "configuration": {
163
+ * "fromStatus": {
164
+ * "id": "5"
165
+ * },
166
+ * "toStatus": {
167
+ * "id": "6"
168
+ * }
169
+ * }
170
+ * }
171
+ *
172
+ * * `fromStatus` OPTIONAL. An object containing the ID of the source status of
173
+ * the transition that is blocked. If omitted any transition to `toStatus` is
174
+ * blocked.
175
+ * * `toStatus` An object containing the ID of the target status of the
176
+ * transition that is blocked.
177
+ *
178
+ * ##### Subtask blocking condition #####
179
+ *
180
+ * A condition that blocks transition on a parent issue if any of its subtasks are
181
+ * in any of one or more statuses.
182
+ *
183
+ * {
184
+ * "type": "SubTaskBlockingCondition",
185
+ * "configuration": {
186
+ * "statuses": [
187
+ * {
188
+ * "id": "1"
189
+ * },
190
+ * {
191
+ * "id": "3"
192
+ * }
193
+ * ]
194
+ * }
195
+ * }
196
+ *
197
+ * * `statuses` A list of objects containing status IDs.
198
+ *
199
+ * ##### User is in any group condition #####
200
+ *
201
+ * A condition that allows users belonging to any group from a list of groups to
202
+ * execute a transition.
203
+ *
204
+ * {
205
+ * "type": "UserInAnyGroupCondition",
206
+ * "configuration": {
207
+ * "groups": [
208
+ * "administrators",
209
+ * "atlassian-addons-admin"
210
+ * ]
211
+ * }
212
+ * }
213
+ *
214
+ * * `groups` A list of group names.
215
+ *
216
+ * ##### User is in any project role condition #####
217
+ *
218
+ * A condition that allows only users with at least one project roles from a list
219
+ * of project roles to execute a transition.
220
+ *
221
+ * {
222
+ * "type": "InAnyProjectRoleCondition",
223
+ * "configuration": {
224
+ * "projectRoles": [
225
+ * {
226
+ * "id": "10002"
227
+ * },
228
+ * {
229
+ * "id": "10003"
230
+ * },
231
+ * {
232
+ * "id": "10012"
233
+ * },
234
+ * {
235
+ * "id": "10013"
236
+ * }
237
+ * ]
238
+ * }
239
+ * }
240
+ *
241
+ * * `projectRoles` A list of objects containing project role IDs.
242
+ *
243
+ * ##### User is in custom field condition #####
244
+ *
245
+ * A condition that allows only users listed in a given custom field to execute
246
+ * the transition.
247
+ *
248
+ * {
249
+ * "type": "UserIsInCustomFieldCondition",
250
+ * "configuration": {
251
+ * "allowUserInField": false,
252
+ * "fieldId": "customfield_10010"
253
+ * }
254
+ * }
255
+ *
256
+ * * `allowUserInField` If `true` only a user who is listed in `fieldId` can
257
+ * perform the transition, otherwise, only a user who is not listed in `fieldId`
258
+ * can perform the transition.
259
+ * * `fieldId` The ID of the field containing the list of users.
260
+ *
261
+ * ##### User is in group condition #####
262
+ *
263
+ * A condition that allows users belonging to a group to execute a transition.
264
+ *
265
+ * {
266
+ * "type": "UserInGroupCondition",
267
+ * "configuration": {
268
+ * "group": "administrators"
269
+ * }
270
+ * }
271
+ *
272
+ * * `group` The name of the group.
273
+ *
274
+ * ##### User is in group custom field condition #####
275
+ *
276
+ * A condition that allows users belonging to a group specified in a custom field
277
+ * to execute a transition.
278
+ *
279
+ * {
280
+ * "type": "InGroupCFCondition",
281
+ * "configuration": {
282
+ * "fieldId": "customfield_10012"
283
+ * }
284
+ * }
285
+ *
286
+ * * `fieldId` The ID of the field. Allowed field types:
287
+ *
288
+ * * `com.atlassian.jira.plugin.system.customfieldtypes:multigrouppicker`
289
+ * * `com.atlassian.jira.plugin.system.customfieldtypes:grouppicker`
290
+ * * `com.atlassian.jira.plugin.system.customfieldtypes:select`
291
+ * * `com.atlassian.jira.plugin.system.customfieldtypes:multiselect`
292
+ * * `com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons`
293
+ * * `com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes`
294
+ * * `com.pyxis.greenhopper.jira:gh-epic-status`
295
+ *
296
+ * ##### User is in project role condition #####
297
+ *
298
+ * A condition that allows users with a project role to execute a transition.
299
+ *
300
+ * {
301
+ * "type": "InProjectRoleCondition",
302
+ * "configuration": {
303
+ * "projectRole": {
304
+ * "id": "10002"
305
+ * }
306
+ * }
307
+ * }
308
+ *
309
+ * * `projectRole` An object containing the ID of a project role.
310
+ *
311
+ * ##### Value field condition #####
312
+ *
313
+ * A conditions that allows a transition to execute if the value of a field is
314
+ * equal to a constant value or simply set.
315
+ *
316
+ * {
317
+ * "type": "ValueFieldCondition",
318
+ * "configuration": {
319
+ * "fieldId": "assignee",
320
+ * "fieldValue":
321
+ * "qm:6e1ecee6-8e64-4db6-8c85-916bb3275f51:54b56885-2bd2-4381-8239-78263442520f",
322
+ * "comparisonType": "NUMBER",
323
+ * "comparator": "="
324
+ * }
325
+ * }
326
+ *
327
+ * * `fieldId` The ID of a field used in the comparison.
328
+ * * `fieldValue` The expected value of the field.
329
+ * * `comparisonType` The type of the comparison. Allowed values: `STRING`,
330
+ * `NUMBER`, `DATE`, `DATE_WITHOUT_TIME`, or `OPTIONID`.
331
+ * * `comparator` One of the supported comparator: `>`, `>=`, `=`, `<=`, `<`,
332
+ * `!=`.
333
+ *
334
+ * **Notes:**
335
+ *
336
+ * * If you choose the comparison type `STRING`, only `=` and `!=` are valid
337
+ * options.
338
+ * * You may leave `fieldValue` empty when comparison type is `!=` to indicate
339
+ * that a value is required in the field.
340
+ * * For date fields without time format values as `yyyy-MM-dd`, and for those
341
+ * with time as `yyyy-MM-dd HH:mm`. For example, for July 16 2021 use
342
+ * `2021-07-16`, for 8:05 AM use `2021-07-16 08:05`, and for 4 PM: `2021-07-16
343
+ * 16:00`.
344
+ *
345
+ * #### Validators ####
346
+ *
347
+ * Validators check that any input made to the transition is valid before the
348
+ * transition is performed.
349
+ *
350
+ * ##### Date field validator #####
351
+ *
352
+ * A validator that compares two dates.
353
+ *
354
+ * {
355
+ * "type": "DateFieldValidator",
356
+ * "configuration": {
357
+ * "comparator": ">",
358
+ * "date1": "updated",
359
+ * "date2": "created",
360
+ * "expression": "1d",
361
+ * "includeTime": true
362
+ * }
363
+ * }
364
+ *
365
+ * * `comparator` One of the supported comparator: `>`, `>=`, `=`, `<=`, `<`, or
366
+ * `!=`.
367
+ * * `date1` The date field to validate. Allowed field types:
368
+ *
369
+ * * `com.atlassian.jira.plugin.system.customfieldtypes:datepicker`
370
+ * * `com.atlassian.jira.plugin.system.customfieldtypes:datetime`
371
+ * * `com.atlassian.jpo:jpo-custom-field-baseline-end`
372
+ * * `com.atlassian.jpo:jpo-custom-field-baseline-start`
373
+ * * `duedate`
374
+ * * `created`
375
+ * * `updated`
376
+ * * `resolutiondate`
377
+ * * `date2` The second date field. Required, if `expression` is not passed.
378
+ * Allowed field types:
379
+ *
380
+ * * `com.atlassian.jira.plugin.system.customfieldtypes:datepicker`
381
+ * * `com.atlassian.jira.plugin.system.customfieldtypes:datetime`
382
+ * * `com.atlassian.jpo:jpo-custom-field-baseline-end`
383
+ * * `com.atlassian.jpo:jpo-custom-field-baseline-start`
384
+ * * `duedate`
385
+ * * `created`
386
+ * * `updated`
387
+ * * `resolutiondate`
388
+ * * `expression` An expression specifying an offset. Required, if `date2` is
389
+ * not passed. Offsets are built with a number, with `-` as prefix for the past,
390
+ * and one of these time units: `d` for day, `w` for week, `m` for month, or `y`
391
+ * for year. For example, -2d means two days into the past and 1w means one week
392
+ * into the future. The `now` keyword enables a comparison with the current date.
393
+ * * `includeTime` If `true`, then the time part of the data is included for the
394
+ * comparison. If the field doesn't have a time part, 00:00:00 is used.
395
+ *
396
+ * ##### Windows date validator #####
397
+ *
398
+ * A validator that checks that a date falls on or after a reference date and
399
+ * before or on the reference date plus a number of days.
400
+ *
401
+ * {
402
+ * "type": "WindowsDateValidator",
403
+ * "configuration": {
404
+ * "date1": "customfield_10009",
405
+ * "date2": "created",
406
+ * "windowsDays": 5
407
+ * }
408
+ * }
409
+ *
410
+ * * `date1` The date field to validate. Allowed field types:
411
+ *
412
+ * * `com.atlassian.jira.plugin.system.customfieldtypes:datepicker`
413
+ * * `com.atlassian.jira.plugin.system.customfieldtypes:datetime`
414
+ * * `com.atlassian.jpo:jpo-custom-field-baseline-end`
415
+ * * `com.atlassian.jpo:jpo-custom-field-baseline-start`
416
+ * * `duedate`
417
+ * * `created`
418
+ * * `updated`
419
+ * * `resolutiondate`
420
+ * * `date2` The reference date. Allowed field types:
421
+ *
422
+ * * `com.atlassian.jira.plugin.system.customfieldtypes:datepicker`
423
+ * * `com.atlassian.jira.plugin.system.customfieldtypes:datetime`
424
+ * * `com.atlassian.jpo:jpo-custom-field-baseline-end`
425
+ * * `com.atlassian.jpo:jpo-custom-field-baseline-start`
426
+ * * `duedate`
427
+ * * `created`
428
+ * * `updated`
429
+ * * `resolutiondate`
430
+ * * `windowsDays` A positive integer indicating a number of days.
431
+ *
432
+ * ##### Field required validator #####
433
+ *
434
+ * A validator that checks fields are not empty. By default, if a field is not
435
+ * included in the current context it's ignored and not validated.
436
+ *
437
+ * {
438
+ * "type": "FieldRequiredValidator",
439
+ * "configuration": {
440
+ * "ignoreContext": true,
441
+ * "errorMessage": "Hey",
442
+ * "fieldIds": [
443
+ * "versions",
444
+ * "customfield_10037",
445
+ * "customfield_10003"
446
+ * ]
447
+ * }
448
+ * }
449
+ *
450
+ * * `ignoreContext` If `true`, then the context is ignored and all the fields
451
+ * are validated.
452
+ * * `errorMessage` OPTIONAL. The error message displayed when one or more
453
+ * fields are empty. A default error message is shown if an error message is not
454
+ * provided.
455
+ * * `fieldIds` The list of fields to validate.
456
+ *
457
+ * ##### Field changed validator #####
458
+ *
459
+ * A validator that checks that a field value is changed. However, this validation
460
+ * can be ignored for users from a list of groups.
461
+ *
462
+ * {
463
+ * "type": "FieldChangedValidator",
464
+ * "configuration": {
465
+ * "fieldId": "comment",
466
+ * "errorMessage": "Hey",
467
+ * "exemptedGroups": [
468
+ * "administrators",
469
+ * "atlassian-addons-admin"
470
+ * ]
471
+ * }
472
+ * }
473
+ *
474
+ * * `fieldId` The ID of a field.
475
+ * * `errorMessage` OPTIONAL. The error message displayed if the field is not
476
+ * changed. A default error message is shown if the error message is not provided.
477
+ * * `exemptedGroups` OPTIONAL. The list of groups.
478
+ *
479
+ * ##### Field has single value validator #####
480
+ *
481
+ * A validator that checks that a multi-select field has only one value.
482
+ * Optionally, the validation can ignore values copied from subtasks.
483
+ *
484
+ * {
485
+ * "type": "FieldHasSingleValueValidator",
486
+ * "configuration": {
487
+ * "fieldId": "attachment,
488
+ * "excludeSubtasks": true
489
+ * }
490
+ * }
491
+ *
492
+ * * `fieldId` The ID of a field.
493
+ * * `excludeSubtasks` If `true`, then values copied from subtasks are ignored.
494
+ *
495
+ * ##### Parent status validator #####
496
+ *
497
+ * A validator that checks the status of the parent issue of a subtask. Ìf the
498
+ * issue is not a subtask, no validation is performed.
499
+ *
500
+ * {
501
+ * "type": "ParentStatusValidator",
502
+ * "configuration": {
503
+ * "parentStatuses": [
504
+ * {
505
+ * "id":"1"
506
+ * },
507
+ * {
508
+ * "id":"2"
509
+ * }
510
+ * ]
511
+ * }
512
+ * }
513
+ *
514
+ * * `parentStatus` The list of required parent issue statuses.
515
+ *
516
+ * ##### Permission validator #####
517
+ *
518
+ * A validator that checks the user has a permission.
519
+ *
520
+ * {
521
+ * "type": "PermissionValidator",
522
+ * "configuration": {
523
+ * "permissionKey": "ADMINISTER_PROJECTS"
524
+ * }
525
+ * }
526
+ *
527
+ * * `permissionKey` The permission required to perform the transition. Allowed
528
+ * values:
529
+ * [built-in](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-permission-schemes/#built-in-permissions)
530
+ * or app defined permissions.
531
+ *
532
+ * ##### Previous status validator #####
533
+ *
534
+ * A validator that checks if the issue has held a status.
535
+ *
536
+ * {
537
+ * "type": "PreviousStatusValidator",
538
+ * "configuration": {
539
+ * "mostRecentStatusOnly": false,
540
+ * "previousStatus": {
541
+ * "id": "15"
542
+ * }
543
+ * }
544
+ * }
545
+ *
546
+ * * `mostRecentStatusOnly` If `true`, then only the issue's preceding status
547
+ * (the one immediately before the current status) is checked.
548
+ * * `previousStatus` An object containing the ID of an issue status.
549
+ *
550
+ * ##### Regular expression validator #####
551
+ *
552
+ * A validator that checks the content of a field against a regular expression.
553
+ *
554
+ * {
555
+ * "type": "RegexpFieldValidator",
556
+ * "configuration": {
557
+ * "regExp": "[0-9]",
558
+ * "fieldId": "customfield_10029"
559
+ * }
560
+ * }
561
+ *
562
+ * * `regExp`A regular expression.
563
+ * * `fieldId` The ID of a field. Allowed field types:
564
+ *
565
+ * * `com.atlassian.jira.plugin.system.customfieldtypes:select`
566
+ * * `com.atlassian.jira.plugin.system.customfieldtypes:multiselect`
567
+ * * `com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons`
568
+ * * `com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes`
569
+ * * `com.atlassian.jira.plugin.system.customfieldtypes:textarea`
570
+ * * `com.atlassian.jira.plugin.system.customfieldtypes:textfield`
571
+ * * `com.atlassian.jira.plugin.system.customfieldtypes:url`
572
+ * * `com.atlassian.jira.plugin.system.customfieldtypes:float`
573
+ * * `com.pyxis.greenhopper.jira:jsw-story-points`
574
+ * * `com.pyxis.greenhopper.jira:gh-epic-status`
575
+ * * `description`
576
+ * * `summary`
577
+ *
578
+ * ##### User permission validator #####
579
+ *
580
+ * A validator that checks if a user has a permission. Obsolete. You may encounter
581
+ * this validator when getting transition rules and can pass it when updating or
582
+ * creating rules, for example, when you want to duplicate the rules from a
583
+ * workflow on a new workflow.
584
+ *
585
+ * {
586
+ * "type": "UserPermissionValidator",
587
+ * "configuration": {
588
+ * "permissionKey": "BROWSE_PROJECTS",
589
+ * "nullAllowed": false,
590
+ * "username": "TestUser"
591
+ * }
592
+ * }
593
+ *
594
+ * * `permissionKey` The permission to be validated. Allowed values:
595
+ * [built-in](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-permission-schemes/#built-in-permissions)
596
+ * or app defined permissions.
597
+ * * `nullAllowed` If `true`, allows the transition when `username` is empty.
598
+ * * `username` The username to validate against the `permissionKey`.
599
+ *
600
+ * #### Post functions ####
601
+ *
602
+ * Post functions carry out any additional processing required after a Jira
603
+ * workflow transition is executed.
604
+ *
605
+ * ##### Fire issue event function #####
606
+ *
607
+ * A post function that fires an event that is processed by the listeners.
608
+ *
609
+ * {
610
+ * "type": "FireIssueEventFunction",
611
+ * "configuration": {
612
+ * "event": {
613
+ * "id":"1"
614
+ * }
615
+ * }
616
+ * }
617
+ *
618
+ * **Note:** If provided, this post function overrides the default
619
+ * `FireIssueEventFunction`. Can be included once in a transition.
620
+ *
621
+ * * `event` An object containing the ID of the issue event.
622
+ *
623
+ * ##### Update issue status #####
624
+ *
625
+ * A post function that sets issue status to the linked status of the destination
626
+ * workflow status.
627
+ *
628
+ * {
629
+ * "type": "UpdateIssueStatusFunction"
630
+ * }
631
+ *
632
+ * **Note:** This post function is a default function in global and directed
633
+ * transitions. It can only be added to the initial transition and can only be
634
+ * added once.
635
+ *
636
+ * ##### Create comment #####
637
+ *
638
+ * A post function that adds a comment entered during the transition to an issue.
639
+ *
640
+ * {
641
+ * "type": "CreateCommentFunction"
642
+ * }
643
+ *
644
+ * **Note:** This post function is a default function in global and directed
645
+ * transitions. It can only be added to the initial transition and can only be
646
+ * added once.
647
+ *
648
+ * ##### Store issue #####
649
+ *
650
+ * A post function that stores updates to an issue.
651
+ *
652
+ * {
653
+ * "type": "IssueStoreFunction"
654
+ * }
655
+ *
656
+ * **Note:** This post function can only be added to the initial transition and
657
+ * can only be added once.
658
+ *
659
+ * ##### Assign to current user function #####
660
+ *
661
+ * A post function that assigns the issue to the current user if the current user
662
+ * has the `ASSIGNABLE_USER` permission.
663
+ *
664
+ * {
665
+ * "type": "AssignToCurrentUserFunction"
666
+ * }
667
+ *
668
+ * **Note:** This post function can be included once in a transition.
669
+ *
670
+ * ##### Assign to lead function #####
671
+ *
672
+ * A post function that assigns the issue to the project or component lead
673
+ * developer.
674
+ *
675
+ * {
676
+ * "type": "AssignToLeadFunction"
677
+ * }
678
+ *
679
+ * **Note:** This post function can be included once in a transition.
680
+ *
681
+ * ##### Assign to reporter function #####
682
+ *
683
+ * A post function that assigns the issue to the reporter.
684
+ *
685
+ * {
686
+ * "type": "AssignToReporterFunction"
687
+ * }
688
+ *
689
+ * **Note:** This post function can be included once in a transition.
690
+ *
691
+ * ##### Clear field value function #####
692
+ *
693
+ * A post function that clears the value from a field.
694
+ *
695
+ * {
696
+ * "type": "ClearFieldValuePostFunction",
697
+ * "configuration": {
698
+ * "fieldId": "assignee"
699
+ * }
700
+ * }
701
+ *
702
+ * * `fieldId` The ID of the field.
703
+ *
704
+ * ##### Copy value from other field function #####
705
+ *
706
+ * A post function that copies the value of one field to another, either within an
707
+ * issue or from parent to subtask.
708
+ *
709
+ * {
710
+ * "type": "CopyValueFromOtherFieldPostFunction",
711
+ * "configuration": {
712
+ * "sourceFieldId": "assignee",
713
+ * "destinationFieldId": "creator",
714
+ * "copyType": "same"
715
+ * }
716
+ * }
717
+ *
718
+ * * `sourceFieldId` The ID of the source field.
719
+ * * `destinationFieldId` The ID of the destination field.
720
+ * * `copyType` Use `same` to copy the value from a field inside the issue, or
721
+ * `parent` to copy the value from the parent issue.
722
+ *
723
+ * ##### Create Crucible review workflow function (deprecated) #####
724
+ *
725
+ * A post function that creates a Crucible review for all unreviewed code for the
726
+ * issue.
727
+ *
728
+ * {
729
+ * "type": "CreateCrucibleReviewWorkflowFunction"
730
+ * }
731
+ *
732
+ * **Note:** This post function can be included once in a transition.
733
+ *
734
+ * ##### Set issue security level based on user's project role function #####
735
+ *
736
+ * A post function that sets the issue's security level if the current user has a
737
+ * project role.
738
+ *
739
+ * {
740
+ * "type": "SetIssueSecurityFromRoleFunction",
741
+ * "configuration": {
742
+ * "projectRole": {
743
+ * "id":"10002"
744
+ * },
745
+ * "issueSecurityLevel": {
746
+ * "id":"10000"
747
+ * }
748
+ * }
749
+ * }
750
+ *
751
+ * * `projectRole` An object containing the ID of the project role.
752
+ * * `issueSecurityLevel` OPTIONAL. The object containing the ID of the security
753
+ * level. If not passed, then the security level is set to `none`.
754
+ *
755
+ * ##### Trigger a webhook function #####
756
+ *
757
+ * A post function that triggers a webhook.
758
+ *
759
+ * {
760
+ * "type": "TriggerWebhookFunction",
761
+ * "configuration": {
762
+ * "webhook": {
763
+ * "id": "1"
764
+ * }
765
+ * }
766
+ * }
767
+ *
768
+ * * `webhook` An object containing the ID of the webhook listener to trigger.
769
+ *
770
+ * ##### Update issue custom field function #####
771
+ *
772
+ * A post function that updates the content of an issue custom field.
773
+ *
774
+ * {
775
+ * "type": "UpdateIssueCustomFieldPostFunction",
776
+ * "configuration": {
777
+ * "mode": "append",
778
+ * "fieldId": "customfield_10003",
779
+ * "fieldValue": "yikes"
780
+ * }
781
+ * }
782
+ *
783
+ * * `mode` Use `replace` to override the field content with `fieldValue` or
784
+ * `append` to add `fieldValue` to the end of the field content.
785
+ * * `fieldId` The ID of the field.
786
+ * * `fieldValue` The update content.
787
+ *
788
+ * ##### Update issue field function #####
789
+ *
790
+ * A post function that updates a simple issue field.
791
+ *
792
+ * {
793
+ * "type": "UpdateIssueFieldFunction",
794
+ * "configuration": {
795
+ * "fieldId": "assignee",
796
+ * "fieldValue": "5f0c277e70b8a90025a00776"
797
+ * }
798
+ * }
799
+ *
800
+ * * `fieldId` The ID of the field. Allowed field types:
801
+ *
802
+ * * `assignee`
803
+ * * `description`
804
+ * * `environment`
805
+ * * `priority`
806
+ * * `resolution`
807
+ * * `summary`
808
+ * * `timeoriginalestimate`
809
+ * * `timeestimate`
810
+ * * `timespent`
811
+ * * `fieldValue` The update value.
812
+ * * If the `fieldId` is `assignee`, the `fieldValue` should be one of these
813
+ * values:
814
+ *
815
+ * * an account ID.
816
+ * * `automatic`.
817
+ * * a blank string, which sets the value to `unassigned`.
818
+ *
819
+ * #### Connect rules ####
820
+ *
821
+ * Connect rules are conditions, validators, and post functions of a transition
822
+ * that are registered by Connect apps. To create a rule registered by the app,
823
+ * the app must be enabled and the rule's module must exist.
824
+ *
825
+ * {
826
+ * "type": "appKey__moduleKey",
827
+ * "configuration": {
828
+ * "value":"{\"isValid\":\"true\"}"
829
+ * }
830
+ * }
831
+ *
832
+ * * `type` A Connect rule key in a form of `appKey__moduleKey`.
833
+ * * `value` The stringified JSON configuration of a Connect rule.
834
+ *
835
+ * #### Forge rules ####
836
+ *
837
+ * Forge transition rules are not yet supported.
838
+ *
839
+ * **[Permissions](#permissions) required:** *Administer Jira* [global
840
+ * permission](https://confluence.atlassian.com/x/x4dKLg).
841
+ *
842
+ * @deprecated
843
+ * @returns Returned if the workflow is created.
844
+ *
845
+ * example: {
846
+ * "entityId": "d7178e8d-bf6c-4c0c-9e90-758a0b965b67",
847
+ * "name": "Workflow 1"
848
+ * }
849
+ * @path {POST} /rest/api/3/workflow
850
+ * @scopes-current manage:jira-configuration
851
+ * @scopes-beta write:workflow:jira, read:workflow:jira
852
+ * @see https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-workflows#api-rest-api-3-workflow-post
853
+ */
854
+ this.createWorkflow = ({ createWorkflowDetails, }) => {
855
+ return this.getClientInstance()
856
+ .request({
857
+ path: "/rest/api/3/workflow",
858
+ method: "POST",
859
+ headers: {
860
+ "Content-Type": "application/json",
861
+ },
862
+ body: createWorkflowDetails,
863
+ })
864
+ .then(this.getClientInstance().responseHandler({
865
+ 201: {
866
+ "application/json": "json",
867
+ },
868
+ }))
869
+ .then(commonHttpClient.castResponse())
870
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("WorkflowsService.createWorkflow.response"))
871
+ .then(commonHttpClient.getBody);
872
+ };
873
+ /**
874
+ * Create workflows and related statuses.
875
+ *
876
+ * **[Permissions](#permissions) required:**
877
+ *
878
+ * * *Administer Jira* project permission to create all, including
879
+ * global-scoped, workflows
880
+ * * *Administer projects* project permissions to create project-scoped workflows
881
+ *
882
+ * @returns Returned if the request is successful.
883
+ *
884
+ * example: {
885
+ * "statuses": [
886
+ * {
887
+ * "description": "",
888
+ * "id": "10001",
889
+ * "name": "To Do",
890
+ * "scope": {
891
+ * "type": "GLOBAL"
892
+ * },
893
+ * "statusCategory": "TODO",
894
+ * "statusReference": "10001",
895
+ * "usages": []
896
+ * },
897
+ * {
898
+ * "description": "",
899
+ * "id": "10002",
900
+ * "name": "In Progress",
901
+ * "scope": {
902
+ * "type": "GLOBAL"
903
+ * },
904
+ * "statusCategory": "IN_PROGRESS",
905
+ * "statusReference": "10002",
906
+ * "usages": []
907
+ * },
908
+ * {
909
+ * "description": "",
910
+ * "id": "10003",
911
+ * "name": "Done",
912
+ * "scope": {
913
+ * "type": "GLOBAL"
914
+ * },
915
+ * "statusCategory": "DONE",
916
+ * "statusReference": "10003",
917
+ * "usages": []
918
+ * }
919
+ * ],
920
+ * "workflows": [
921
+ * {
922
+ * "description": "",
923
+ * "id": "b9ff2384-d3b6-4d4e-9509-3ee19f607168",
924
+ * "isEditable": true,
925
+ * "name": "Software workflow 1",
926
+ * "scope": {
927
+ * "type": "GLOBAL"
928
+ * },
929
+ * "startPointLayout": {
930
+ * "x": -100.00030899047852,
931
+ * "y": -153.00020599365234
932
+ * },
933
+ * "statuses": [
934
+ * {
935
+ * "deprecated": false,
936
+ * "layout": {
937
+ * "x": 114.99993896484375,
938
+ * "y": -16
939
+ * },
940
+ * "properties": {},
941
+ * "statusReference": "10001"
942
+ * },
943
+ * {
944
+ * "deprecated": false,
945
+ * "layout": {
946
+ * "x": 317.0000915527344,
947
+ * "y": -16
948
+ * },
949
+ * "properties": {},
950
+ * "statusReference": "10002"
951
+ * },
952
+ * {
953
+ * "deprecated": false,
954
+ * "layout": {
955
+ * "x": 508.000244140625,
956
+ * "y": -16
957
+ * },
958
+ * "properties": {},
959
+ * "statusReference": "10003"
960
+ * }
961
+ * ],
962
+ * "transitions": [
963
+ * {
964
+ * "actions": [],
965
+ * "description": "",
966
+ * "from": [],
967
+ * "id": "31",
968
+ * "name": "Done",
969
+ * "properties": {},
970
+ * "to": {
971
+ * "statusReference": "10003"
972
+ * },
973
+ * "triggers": [],
974
+ * "type": "GLOBAL",
975
+ * "validators": []
976
+ * },
977
+ * {
978
+ * "actions": [],
979
+ * "description": "",
980
+ * "from": [],
981
+ * "id": "11",
982
+ * "name": "To Do",
983
+ * "properties": {},
984
+ * "to": {
985
+ * "statusReference": "10001"
986
+ * },
987
+ * "triggers": [],
988
+ * "type": "GLOBAL",
989
+ * "validators": []
990
+ * },
991
+ * {
992
+ * "actions": [],
993
+ * "description": "",
994
+ * "from": [],
995
+ * "id": "21",
996
+ * "name": "In Progress",
997
+ * "properties": {},
998
+ * "to": {
999
+ * "statusReference": "10002"
1000
+ * },
1001
+ * "triggers": [],
1002
+ * "type": "GLOBAL",
1003
+ * "validators": []
1004
+ * },
1005
+ * {
1006
+ * "actions": [],
1007
+ * "description": "",
1008
+ * "from": [],
1009
+ * "id": "1",
1010
+ * "name": "Create",
1011
+ * "properties": {},
1012
+ * "to": {
1013
+ * "statusReference": "10001"
1014
+ * },
1015
+ * "triggers": [],
1016
+ * "type": "INITIAL",
1017
+ * "validators": []
1018
+ * }
1019
+ * ],
1020
+ * "usages": [],
1021
+ * "version": {
1022
+ * "id": "f010ac1b-3dd3-43a3-aa66-0ee8a447f76e",
1023
+ * "versionNumber": 0
1024
+ * }
1025
+ * }
1026
+ * ]
1027
+ * }
1028
+ * @path {POST} /rest/api/3/workflows/create
1029
+ * @scopes-current manage:jira-configuration
1030
+ * @scopes-beta write:workflow:jira
1031
+ * @see https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-workflows#api-rest-api-3-workflows-create-post
1032
+ */
1033
+ this.createWorkflows = ({ workflowCreateRequest, }) => {
1034
+ return this.getClientInstance()
1035
+ .request({
1036
+ path: "/rest/api/3/workflows/create",
1037
+ method: "POST",
1038
+ headers: {
1039
+ "Content-Type": "application/json",
1040
+ },
1041
+ body: workflowCreateRequest,
1042
+ })
1043
+ .then(this.getClientInstance().responseHandler({
1044
+ 200: {
1045
+ "application/json": "json",
1046
+ },
1047
+ }))
1048
+ .then(commonHttpClient.castResponse())
1049
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("WorkflowsService.createWorkflows.response"))
1050
+ .then(commonHttpClient.getBody);
1051
+ };
1052
+ /**
1053
+ * Deletes a workflow.
1054
+ *
1055
+ * The workflow cannot be deleted if it is:
1056
+ *
1057
+ * * an active workflow.
1058
+ * * a system workflow.
1059
+ * * associated with any workflow scheme.
1060
+ * * associated with any draft workflow scheme.
1061
+ *
1062
+ * **[Permissions](#permissions) required:** *Administer Jira* [global
1063
+ * permission](https://confluence.atlassian.com/x/x4dKLg).
1064
+ *
1065
+ * @path {DELETE} /rest/api/3/workflow/{entityId}
1066
+ * @scopes-current manage:jira-configuration
1067
+ * @scopes-beta delete:workflow:jira
1068
+ * @see https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-workflows#api-rest-api-3-workflow-entityid-delete
1069
+ */
1070
+ this.deleteInactiveWorkflow = ({ entityId, }) => {
1071
+ return this.getClientInstance()
1072
+ .request({
1073
+ path: "/rest/api/3/workflow/{entityId}",
1074
+ method: "DELETE",
1075
+ pathParams: {
1076
+ entityId,
1077
+ },
1078
+ })
1079
+ .then(commonHttpClient.discardResult);
1080
+ };
1081
+ /**
1082
+ * Returns all workflows in Jira or a workflow. Deprecated, use [Get workflows
1083
+ * paginated](#api-rest-api-3-workflow-search-get).
1084
+ *
1085
+ * If the `workflowName` parameter is specified, the workflow is returned as an
1086
+ * object (not in an array). Otherwise, an array of workflow objects is returned.
1087
+ *
1088
+ * **[Permissions](#permissions) required:** *Administer Jira* [global
1089
+ * permission](https://confluence.atlassian.com/x/x4dKLg).
1090
+ *
1091
+ * @deprecated
1092
+ * @returns Returned if the request is successful.
1093
+ *
1094
+ * example: [
1095
+ * {
1096
+ * "default": true,
1097
+ * "description": "A classic Jira workflow",
1098
+ * "lastModifiedDate": "01-01-2011",
1099
+ * "lastModifiedUser": "admin",
1100
+ * "lastModifiedUserAccountId": "5b10a2844c20165700ede21g",
1101
+ * "name": "classic workflow",
1102
+ * "steps": 5
1103
+ * }
1104
+ * ]
1105
+ * @path {GET} /rest/api/3/workflow
1106
+ * @scopes-current manage:jira-configuration
1107
+ * @scopes-beta read:workflow:jira, read:project:jira, read:project-category:jira,
1108
+ * read:avatar:jira
1109
+ * @see https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-workflows#api-rest-api-3-workflow-get
1110
+ */
1111
+ this.getAllWorkflows = ({ workflowName, } = {}) => {
1112
+ return this.getClientInstance()
1113
+ .request({
1114
+ path: "/rest/api/3/workflow",
1115
+ method: "GET",
1116
+ query: {
1117
+ workflowName,
1118
+ },
1119
+ })
1120
+ .then(this.getClientInstance().responseHandler({
1121
+ 200: {
1122
+ "application/json": "json",
1123
+ },
1124
+ }))
1125
+ .then(commonHttpClient.castResponse())
1126
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("WorkflowsService.getAllWorkflows.response"))
1127
+ .then(commonHttpClient.getBody);
1128
+ };
1129
+ /**
1130
+ * Returns a [paginated](#pagination) list of published classic workflows. When
1131
+ * workflow names are specified, details of those workflows are returned.
1132
+ * Otherwise, all published classic workflows are returned.
1133
+ *
1134
+ * This operation does not return next-gen workflows.
1135
+ *
1136
+ * **[Permissions](#permissions) required:** *Administer Jira* [global
1137
+ * permission](https://confluence.atlassian.com/x/x4dKLg).
1138
+ *
1139
+ * @returns Returned if the request is successful.
1140
+ *
1141
+ * example: {
1142
+ * "isLast": false,
1143
+ * "maxResults": 1,
1144
+ * "startAt": 0,
1145
+ * "total": 5,
1146
+ * "values": [
1147
+ * {
1148
+ * "id": {
1149
+ * "name": "SCRUM Workflow",
1150
+ * "entityId": "5ed312c5-f7a6-4a78-a1f6-8ff7f307d063"
1151
+ * },
1152
+ * "description": "A workflow used for Software projects in the SCRUM
1153
+ * methodology",
1154
+ * "transitions": [
1155
+ * {
1156
+ * "id": "5",
1157
+ * "name": "In Progress",
1158
+ * "description": "Start working on the issue.",
1159
+ * "from": [
1160
+ * "10",
1161
+ * "13"
1162
+ * ],
1163
+ * "to": "14",
1164
+ * "type": "directed",
1165
+ * "screen": {
1166
+ * "id": "10000",
1167
+ * "name": "Issue screen"
1168
+ * },
1169
+ * "rules": {
1170
+ * "conditionsTree": {
1171
+ * "nodeType": "compound",
1172
+ * "operator": "AND",
1173
+ * "conditions": [
1174
+ * {
1175
+ * "nodeType": "simple",
1176
+ * "type": "PermissionCondition",
1177
+ * "configuration": {
1178
+ * "permissionKey": "WORK_ON_ISSUES"
1179
+ * }
1180
+ * },
1181
+ * {
1182
+ * "nodeType": "simple",
1183
+ * "type": "PermissionCondition",
1184
+ * "configuration": {
1185
+ * "permissionKey": "RESOLVE_ISSUES"
1186
+ * }
1187
+ * }
1188
+ * ]
1189
+ * },
1190
+ * "validators": [
1191
+ * {
1192
+ * "type": "FieldRequiredValidator",
1193
+ * "configuration": {
1194
+ * "errorMessage": "A custom error message",
1195
+ * "fields": [
1196
+ * "description",
1197
+ * "assignee"
1198
+ * ],
1199
+ * "ignoreContext": true
1200
+ * }
1201
+ * }
1202
+ * ],
1203
+ * "postFunctions": [
1204
+ * {
1205
+ * "type": "UpdateIssueStatusFunction"
1206
+ * },
1207
+ * {
1208
+ * "type": "GenerateChangeHistoryFunction"
1209
+ * },
1210
+ * {
1211
+ * "type": "FireIssueEventFunction"
1212
+ * }
1213
+ * ]
1214
+ * },
1215
+ * "properties": {
1216
+ * "jira.fieldscreen.id": 1
1217
+ * }
1218
+ * }
1219
+ * ],
1220
+ * "statuses": [
1221
+ * {
1222
+ * "id": "3",
1223
+ * "name": "In Progress",
1224
+ * "properties": {
1225
+ * "issueEditable": false,
1226
+ * "jira.issue.editable": "false"
1227
+ * }
1228
+ * }
1229
+ * ],
1230
+ * "isDefault": false,
1231
+ * "schemes": [
1232
+ * {
1233
+ * "id": "10001",
1234
+ * "name": "Test Workflow Scheme"
1235
+ * }
1236
+ * ],
1237
+ * "projects": [
1238
+ * {
1239
+ * "avatarUrls": {
1240
+ * "16x16": "secure/projectavatar?size=xsmall&pid=10000",
1241
+ * "24x24": "secure/projectavatar?size=small&pid=10000",
1242
+ * "32x32": "secure/projectavatar?size=medium&pid=10000",
1243
+ * "48x48": "secure/projectavatar?size=large&pid=10000"
1244
+ * },
1245
+ * "id": "10000",
1246
+ * "key": "EX",
1247
+ * "name": "Example",
1248
+ * "projectCategory": {
1249
+ * "description": "Project category description",
1250
+ * "id": "10000",
1251
+ * "name": "A project category"
1252
+ * },
1253
+ * "projectTypeKey": "ProjectTypeKey{key='software'}",
1254
+ * "self": "project/EX",
1255
+ * "simplified": false
1256
+ * }
1257
+ * ],
1258
+ * "hasDraftWorkflow": true,
1259
+ * "operations": {
1260
+ * "canEdit": true,
1261
+ * "canDelete": false
1262
+ * },
1263
+ * "created": "2018-12-10T16:30:15.000+0000",
1264
+ * "updated": "2018-12-11T11:45:13.000+0000"
1265
+ * }
1266
+ * ]
1267
+ * }
1268
+ * @path {GET} /rest/api/3/workflow/search
1269
+ * @scopes-current manage:jira-project
1270
+ * @scopes-beta read:group:jira, read:issue-security-level:jira, read:project-role:jira,
1271
+ * read:screen:jira, read:status:jira, read:user:jira, read:workflow:jira,
1272
+ * read:webhook:jira, read:avatar:jira, read:project-category:jira,
1273
+ * read:project:jira
1274
+ * @see https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-workflows#api-rest-api-3-workflow-search-get
1275
+ */
1276
+ this.getWorkflowsPaginated = ({ startAt, maxResults, workflowName, expand, queryString, orderBy, isActive, } = {}) => {
1277
+ return this.getClientInstance()
1278
+ .request({
1279
+ path: "/rest/api/3/workflow/search",
1280
+ method: "GET",
1281
+ query: {
1282
+ startAt,
1283
+ maxResults,
1284
+ workflowName,
1285
+ expand,
1286
+ queryString,
1287
+ orderBy,
1288
+ isActive,
1289
+ },
1290
+ })
1291
+ .then(this.getClientInstance().responseHandler({
1292
+ 200: {
1293
+ "application/json": "json",
1294
+ },
1295
+ }))
1296
+ .then(commonHttpClient.castResponse())
1297
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("WorkflowsService.getWorkflowsPaginated.response"))
1298
+ .then(commonHttpClient.getBody);
1299
+ };
1300
+ /**
1301
+ * Returns a list of workflows and related statuses by providing workflow names,
1302
+ * workflow IDs, or project and issue types.
1303
+ *
1304
+ * **[Permissions](#permissions) required:**
1305
+ *
1306
+ * * *Administer Jira* global permission to access all, including
1307
+ * project-scoped, workflows
1308
+ * * At least one of the *Administer projects* and *View (read-only) workflow*
1309
+ * project permissions to access project-scoped workflows
1310
+ *
1311
+ * @returns Returned if the request is successful.
1312
+ *
1313
+ * example: {
1314
+ * "statuses": [
1315
+ * {
1316
+ * "description": "",
1317
+ * "id": "10001",
1318
+ * "name": "To Do",
1319
+ * "scope": {
1320
+ * "type": "GLOBAL"
1321
+ * },
1322
+ * "statusCategory": "TODO",
1323
+ * "statusReference": "10001",
1324
+ * "usages": []
1325
+ * },
1326
+ * {
1327
+ * "description": "",
1328
+ * "id": "10002",
1329
+ * "name": "In Progress",
1330
+ * "scope": {
1331
+ * "type": "GLOBAL"
1332
+ * },
1333
+ * "statusCategory": "IN_PROGRESS",
1334
+ * "statusReference": "10002",
1335
+ * "usages": []
1336
+ * },
1337
+ * {
1338
+ * "description": "",
1339
+ * "id": "10003",
1340
+ * "name": "Done",
1341
+ * "scope": {
1342
+ * "type": "GLOBAL"
1343
+ * },
1344
+ * "statusCategory": "DONE",
1345
+ * "statusReference": "10003",
1346
+ * "usages": []
1347
+ * }
1348
+ * ],
1349
+ * "workflows": [
1350
+ * {
1351
+ * "description": "",
1352
+ * "id": "b9ff2384-d3b6-4d4e-9509-3ee19f607168",
1353
+ * "isEditable": true,
1354
+ * "name": "Workflow 1",
1355
+ * "scope": {
1356
+ * "type": "GLOBAL"
1357
+ * },
1358
+ * "startPointLayout": {
1359
+ * "x": -100.00030899047852,
1360
+ * "y": -153.00020599365234
1361
+ * },
1362
+ * "statuses": [
1363
+ * {
1364
+ * "deprecated": false,
1365
+ * "layout": {
1366
+ * "x": 114.99993896484375,
1367
+ * "y": -16
1368
+ * },
1369
+ * "properties": {},
1370
+ * "statusReference": "10001"
1371
+ * },
1372
+ * {
1373
+ * "deprecated": false,
1374
+ * "layout": {
1375
+ * "x": 317.0000915527344,
1376
+ * "y": -16
1377
+ * },
1378
+ * "properties": {},
1379
+ * "statusReference": "10002"
1380
+ * },
1381
+ * {
1382
+ * "deprecated": false,
1383
+ * "layout": {
1384
+ * "x": 508.000244140625,
1385
+ * "y": -16
1386
+ * },
1387
+ * "properties": {},
1388
+ * "statusReference": "10003"
1389
+ * }
1390
+ * ],
1391
+ * "transitions": [
1392
+ * {
1393
+ * "actions": [],
1394
+ * "description": "",
1395
+ * "from": [],
1396
+ * "id": "31",
1397
+ * "name": "Done",
1398
+ * "properties": {},
1399
+ * "to": {
1400
+ * "statusReference": "10003"
1401
+ * },
1402
+ * "triggers": [],
1403
+ * "type": "GLOBAL",
1404
+ * "validators": []
1405
+ * },
1406
+ * {
1407
+ * "actions": [],
1408
+ * "description": "",
1409
+ * "from": [],
1410
+ * "id": "11",
1411
+ * "name": "To Do",
1412
+ * "properties": {},
1413
+ * "to": {
1414
+ * "statusReference": "10001"
1415
+ * },
1416
+ * "triggers": [],
1417
+ * "type": "GLOBAL",
1418
+ * "validators": []
1419
+ * },
1420
+ * {
1421
+ * "actions": [],
1422
+ * "description": "",
1423
+ * "from": [],
1424
+ * "id": "21",
1425
+ * "name": "In Progress",
1426
+ * "properties": {},
1427
+ * "to": {
1428
+ * "statusReference": "10002"
1429
+ * },
1430
+ * "triggers": [],
1431
+ * "type": "GLOBAL",
1432
+ * "validators": []
1433
+ * },
1434
+ * {
1435
+ * "actions": [],
1436
+ * "description": "",
1437
+ * "from": [],
1438
+ * "id": "1",
1439
+ * "name": "Create",
1440
+ * "properties": {},
1441
+ * "to": {
1442
+ * "statusReference": "10001"
1443
+ * },
1444
+ * "triggers": [],
1445
+ * "type": "INITIAL",
1446
+ * "validators": []
1447
+ * }
1448
+ * ],
1449
+ * "usages": [],
1450
+ * "version": {
1451
+ * "id": "f010ac1b-3dd3-43a3-aa66-0ee8a447f76e",
1452
+ * "versionNumber": 0
1453
+ * }
1454
+ * }
1455
+ * ]
1456
+ * }
1457
+ * @path {POST} /rest/api/3/workflows
1458
+ * @scopes-current manage:jira-configuration
1459
+ * @scopes-beta read:workflow:jira
1460
+ * @see https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-workflows#api-rest-api-3-workflows-post
1461
+ */
1462
+ this.readWorkflows = ({ expand, workflowReadRequest, }) => {
1463
+ return this.getClientInstance()
1464
+ .request({
1465
+ path: "/rest/api/3/workflows",
1466
+ method: "POST",
1467
+ query: {
1468
+ expand,
1469
+ },
1470
+ headers: {
1471
+ "Content-Type": "application/json",
1472
+ },
1473
+ body: workflowReadRequest,
1474
+ })
1475
+ .then(this.getClientInstance().responseHandler({
1476
+ 200: {
1477
+ "application/json": "json",
1478
+ },
1479
+ }))
1480
+ .then(commonHttpClient.castResponse())
1481
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("WorkflowsService.readWorkflows.response"))
1482
+ .then(commonHttpClient.getBody);
1483
+ };
1484
+ /**
1485
+ * Update workflows and related statuses.
1486
+ *
1487
+ * **[Permissions](#permissions) required:**
1488
+ *
1489
+ * * *Administer Jira* project permission to create all, including
1490
+ * global-scoped, workflows
1491
+ * * *Administer projects* project permissions to create project-scoped workflows
1492
+ *
1493
+ * @returns Returned if the request is successful.
1494
+ *
1495
+ * example: {
1496
+ * "statuses": [
1497
+ * {
1498
+ * "description": "",
1499
+ * "id": "10001",
1500
+ * "name": "To Do",
1501
+ * "scope": {
1502
+ * "type": "GLOBAL"
1503
+ * },
1504
+ * "statusCategory": "TODO",
1505
+ * "statusReference": "10001",
1506
+ * "usages": []
1507
+ * },
1508
+ * {
1509
+ * "description": "",
1510
+ * "id": "10002",
1511
+ * "name": "In Progress",
1512
+ * "scope": {
1513
+ * "type": "GLOBAL"
1514
+ * },
1515
+ * "statusCategory": "IN_PROGRESS",
1516
+ * "statusReference": "10002",
1517
+ * "usages": []
1518
+ * },
1519
+ * {
1520
+ * "description": "",
1521
+ * "id": "10003",
1522
+ * "name": "Done",
1523
+ * "scope": {
1524
+ * "type": "GLOBAL"
1525
+ * },
1526
+ * "statusCategory": "DONE",
1527
+ * "statusReference": "10003",
1528
+ * "usages": []
1529
+ * }
1530
+ * ],
1531
+ * "taskId": "10001",
1532
+ * "workflows": [
1533
+ * {
1534
+ * "description": "",
1535
+ * "id": "b9ff2384-d3b6-4d4e-9509-3ee19f607168",
1536
+ * "isEditable": true,
1537
+ * "name": "Software workflow 1",
1538
+ * "scope": {
1539
+ * "type": "GLOBAL"
1540
+ * },
1541
+ * "startPointLayout": {
1542
+ * "x": -100.00030899047852,
1543
+ * "y": -153.00020599365234
1544
+ * },
1545
+ * "statuses": [
1546
+ * {
1547
+ * "deprecated": false,
1548
+ * "layout": {
1549
+ * "x": 114.99993896484375,
1550
+ * "y": -16
1551
+ * },
1552
+ * "properties": {},
1553
+ * "statusReference": "10001"
1554
+ * },
1555
+ * {
1556
+ * "deprecated": false,
1557
+ * "layout": {
1558
+ * "x": 317.0000915527344,
1559
+ * "y": -16
1560
+ * },
1561
+ * "properties": {},
1562
+ * "statusReference": "10002"
1563
+ * },
1564
+ * {
1565
+ * "deprecated": false,
1566
+ * "layout": {
1567
+ * "x": 508.000244140625,
1568
+ * "y": -16
1569
+ * },
1570
+ * "properties": {},
1571
+ * "statusReference": "10003"
1572
+ * }
1573
+ * ],
1574
+ * "transitions": [
1575
+ * {
1576
+ * "actions": [],
1577
+ * "description": "",
1578
+ * "from": [],
1579
+ * "id": "31",
1580
+ * "name": "Done",
1581
+ * "properties": {},
1582
+ * "to": {
1583
+ * "statusReference": "10003"
1584
+ * },
1585
+ * "triggers": [],
1586
+ * "type": "GLOBAL",
1587
+ * "validators": []
1588
+ * },
1589
+ * {
1590
+ * "actions": [],
1591
+ * "description": "",
1592
+ * "from": [],
1593
+ * "id": "11",
1594
+ * "name": "To Do",
1595
+ * "properties": {},
1596
+ * "to": {
1597
+ * "statusReference": "10001"
1598
+ * },
1599
+ * "triggers": [],
1600
+ * "type": "GLOBAL",
1601
+ * "validators": []
1602
+ * },
1603
+ * {
1604
+ * "actions": [],
1605
+ * "description": "",
1606
+ * "from": [],
1607
+ * "id": "21",
1608
+ * "name": "In Progress",
1609
+ * "properties": {},
1610
+ * "to": {
1611
+ * "statusReference": "10002"
1612
+ * },
1613
+ * "triggers": [],
1614
+ * "type": "GLOBAL",
1615
+ * "validators": []
1616
+ * },
1617
+ * {
1618
+ * "actions": [],
1619
+ * "description": "",
1620
+ * "from": [],
1621
+ * "id": "1",
1622
+ * "name": "Create",
1623
+ * "properties": {},
1624
+ * "to": {
1625
+ * "statusReference": "10001"
1626
+ * },
1627
+ * "triggers": [],
1628
+ * "type": "INITIAL",
1629
+ * "validators": []
1630
+ * }
1631
+ * ],
1632
+ * "usages": [],
1633
+ * "version": {
1634
+ * "id": "f010ac1b-3dd3-43a3-aa66-0ee8a447f76e",
1635
+ * "versionNumber": 0
1636
+ * }
1637
+ * }
1638
+ * ]
1639
+ * }
1640
+ * @path {POST} /rest/api/3/workflows/update
1641
+ * @scopes-current manage:jira-configuration
1642
+ * @scopes-beta write:workflow:jira
1643
+ * @see https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-workflows#api-rest-api-3-workflows-update-post
1644
+ */
1645
+ this.updateWorkflows = ({ expand, workflowUpdateRequest, }) => {
1646
+ return this.getClientInstance()
1647
+ .request({
1648
+ path: "/rest/api/3/workflows/update",
1649
+ method: "POST",
1650
+ query: {
1651
+ expand,
1652
+ },
1653
+ headers: {
1654
+ "Content-Type": "application/json",
1655
+ },
1656
+ body: workflowUpdateRequest,
1657
+ })
1658
+ .then(this.getClientInstance().responseHandler({
1659
+ 200: {
1660
+ "application/json": "json",
1661
+ },
1662
+ }))
1663
+ .then(commonHttpClient.castResponse())
1664
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("WorkflowsService.updateWorkflows.response"))
1665
+ .then(commonHttpClient.getBody);
1666
+ };
1667
+ /**
1668
+ * Validate the payload for bulk create workflows.
1669
+ *
1670
+ * **[Permissions](#permissions) required:**
1671
+ *
1672
+ * * *Administer Jira* project permission to create all, including
1673
+ * global-scoped, workflows
1674
+ * * *Administer projects* project permissions to create project-scoped workflows
1675
+ *
1676
+ * @returns Returned if the request is successful.
1677
+ *
1678
+ * example: {
1679
+ * "errors": [
1680
+ * {
1681
+ * "code": "NON_UNIQUE_STATUS_NAME",
1682
+ * "elementReference": {
1683
+ * "statusReference": "1f0443ff-47e4-4306-9c26-0af696059a43"
1684
+ * },
1685
+ * "level": "ERROR",
1686
+ * "message": "You must use a unique status name.",
1687
+ * "type": "STATUS"
1688
+ * }
1689
+ * ]
1690
+ * }
1691
+ * @path {POST} /rest/api/3/workflows/create/validation
1692
+ * @scopes-current manage:jira-configuration
1693
+ * @scopes-beta write:workflow:jira
1694
+ * @see https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-workflows#api-rest-api-3-workflows-create-validation-post
1695
+ */
1696
+ this.validateCreateWorkflows = ({ workflowCreateValidateRequest, }) => {
1697
+ return this.getClientInstance()
1698
+ .request({
1699
+ path: "/rest/api/3/workflows/create/validation",
1700
+ method: "POST",
1701
+ headers: {
1702
+ "Content-Type": "application/json",
1703
+ },
1704
+ body: workflowCreateValidateRequest,
1705
+ })
1706
+ .then(this.getClientInstance().responseHandler({
1707
+ 200: {
1708
+ "application/json": "json",
1709
+ },
1710
+ }))
1711
+ .then(commonHttpClient.castResponse())
1712
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("WorkflowsService.validateCreateWorkflows.response"))
1713
+ .then(commonHttpClient.getBody);
1714
+ };
1715
+ /**
1716
+ * Validate the payload for bulk update workflows.
1717
+ *
1718
+ * **[Permissions](#permissions) required:**
1719
+ *
1720
+ * * *Administer Jira* project permission to create all, including
1721
+ * global-scoped, workflows
1722
+ * * *Administer projects* project permissions to create project-scoped workflows
1723
+ *
1724
+ * @returns Returned if the request is successful.
1725
+ *
1726
+ * example: {
1727
+ * "errors": [
1728
+ * {
1729
+ * "code": "NON_UNIQUE_STATUS_NAME",
1730
+ * "elementReference": {
1731
+ * "statusReference": "1f0443ff-47e4-4306-9c26-0af696059a43"
1732
+ * },
1733
+ * "level": "ERROR",
1734
+ * "message": "You must use a unique status name.",
1735
+ * "type": "STATUS"
1736
+ * }
1737
+ * ]
1738
+ * }
1739
+ * @path {POST} /rest/api/3/workflows/update/validation
1740
+ * @scopes-current manage:jira-configuration
1741
+ * @scopes-beta write:workflow:jira
1742
+ * @see https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-workflows#api-rest-api-3-workflows-update-validation-post
1743
+ */
1744
+ this.validateUpdateWorkflows = ({ workflowUpdateValidateRequestBean, }) => {
1745
+ return this.getClientInstance()
1746
+ .request({
1747
+ path: "/rest/api/3/workflows/update/validation",
1748
+ method: "POST",
1749
+ headers: {
1750
+ "Content-Type": "application/json",
1751
+ },
1752
+ body: workflowUpdateValidateRequestBean,
1753
+ })
1754
+ .then(this.getClientInstance().responseHandler({
1755
+ 200: {
1756
+ "application/json": "json",
1757
+ },
1758
+ }))
1759
+ .then(commonHttpClient.castResponse())
1760
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("WorkflowsService.validateUpdateWorkflows.response"))
1761
+ .then(commonHttpClient.getBody);
1762
+ };
1763
+ /**
1764
+ * Get the list of workflow capabilities for a specific workflow using either the
1765
+ * workflow ID, or the project and issue type ID pair. The response includes the
1766
+ * scope of the workflow, defined as global/project-based, and a list of project
1767
+ * types that the workflow is scoped to. It also includes all rules organised into
1768
+ * their broad categories (conditions, validators, actions, triggers, screens) as
1769
+ * well as the source location (Atlassian-provided, Connect, Forge).
1770
+ *
1771
+ * **[Permissions](#permissions) required:**
1772
+ *
1773
+ * * *Administer Jira* project permission to access all, including
1774
+ * global-scoped, workflows
1775
+ * * *Administer projects* project permissions to access project-scoped workflows
1776
+ *
1777
+ * The current list of Atlassian-provided rules:
1778
+ *
1779
+ * #### Validators ####
1780
+ *
1781
+ * A validator rule that checks if a user has the required permissions to execute
1782
+ * the transition in the workflow.
1783
+ *
1784
+ * ##### Permission validator #####
1785
+ *
1786
+ * A validator rule that checks if a user has the required permissions to execute
1787
+ * the transition in the workflow.
1788
+ *
1789
+ * {
1790
+ * "ruleKey": "system:check-permission-validator",
1791
+ * "parameters": {
1792
+ * "permissionKey": "ADMINISTER_PROJECTS"
1793
+ * }
1794
+ * }
1795
+ *
1796
+ * Parameters:
1797
+ *
1798
+ * * `permissionKey` The permission required to perform the transition. Allowed
1799
+ * values: [built-in Jira
1800
+ * permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-permission-schemes/#built-in-permissions).
1801
+ *
1802
+ * ##### Parent or child blocking validator #####
1803
+ *
1804
+ * A validator to block the child issue\\u2019s transition depending on the parent
1805
+ * issue\\u2019s status.
1806
+ *
1807
+ * {
1808
+ * "ruleKey" : "system:parent-or-child-blocking-validator"
1809
+ * "parameters" : {
1810
+ * "blocker" : "PARENT"
1811
+ * "statusIds" : "1,2,3"
1812
+ * }
1813
+ * }
1814
+ *
1815
+ * Parameters:
1816
+ *
1817
+ * * `blocker` currently only supports `PARENT`.
1818
+ * * `statusIds` a comma-separated list of status IDs.
1819
+ *
1820
+ * ##### Previous status validator #####
1821
+ *
1822
+ * A validator that checks if an issue has transitioned through specified previous
1823
+ * status(es) before allowing the current transition to occur.
1824
+ *
1825
+ * {
1826
+ * "ruleKey": "system:previous-status-validator",
1827
+ * "parameters": {
1828
+ * "previousStatusIds": "10014",
1829
+ * "mostRecentStatusOnly": "true"
1830
+ * }
1831
+ * }
1832
+ *
1833
+ * Parameters:
1834
+ *
1835
+ * * `previousStatusIds` a comma-separated list of status IDs, currently only
1836
+ * support one ID.
1837
+ * * `mostRecentStatusOnly` when `true` only considers the most recent status
1838
+ * for the condition evaluation. Allowed values: `true`, `false`.
1839
+ *
1840
+ * ##### Validate a field value #####
1841
+ *
1842
+ * A validation that ensures a specific field's value meets the defined criteria
1843
+ * before allowing an issue to transition in the workflow.
1844
+ *
1845
+ * Depending on the rule type, the result will vary:
1846
+ *
1847
+ * ###### Field required ######
1848
+ *
1849
+ * {
1850
+ * "ruleKey": "system:validate-field-value",
1851
+ * "parameters": {
1852
+ * "ruleType": "fieldRequired",
1853
+ * "fieldsRequired": "assignee",
1854
+ * "ignoreContext": "true",
1855
+ * "errorMessage": "An assignee must be set!"
1856
+ * }
1857
+ * }
1858
+ *
1859
+ * Parameters:
1860
+ *
1861
+ * * `fieldsRequired` the ID of the field that is required. For a custom field,
1862
+ * it would look like `customfield_123`.
1863
+ * * `ignoreContext` controls the impact of context settings on field
1864
+ * validation. When set to `true`, the validator doesn't check a required field if
1865
+ * its context isn't configured for the current issue. When set to `false`, the
1866
+ * validator requires a field even if its context is invalid. Allowed values:
1867
+ * `true`, `false`.
1868
+ * * `errorMessage` is the error message to display if the user does not provide
1869
+ * a value during the transition. A default error message will be shown if you
1870
+ * don't provide one (Optional).
1871
+ *
1872
+ * ###### Field changed ######
1873
+ *
1874
+ * {
1875
+ * "ruleKey": "system:validate-field-value",
1876
+ * "parameters": {
1877
+ * "ruleType": "fieldChanged",
1878
+ * "groupsExemptFromValidation": "6862ac20-8672-4f68-896d-4854f5efb79e",
1879
+ * "fieldKey": "versions",
1880
+ * "errorMessage": "Affect versions must be modified before transition"
1881
+ * }
1882
+ * }
1883
+ *
1884
+ * Parameters:
1885
+ *
1886
+ * * `groupsExemptFromValidation` a comma-separated list of group IDs to be
1887
+ * exempt from the validation.
1888
+ * * `fieldKey` the ID of the field that has changed. For a custom field, it
1889
+ * would look like `customfield_123`.
1890
+ * * `errorMessage` the error message to display if the user does not provide a
1891
+ * value during the transition. A default error message will be shown if you don't
1892
+ * provide one (Optional).
1893
+ *
1894
+ * ###### Field has a single value ######
1895
+ *
1896
+ * {
1897
+ * "ruleKey": "system:validate-field-value",
1898
+ * "parameters": {
1899
+ * "ruleType": "fieldHasSingleValue",
1900
+ * "fieldKey": "created",
1901
+ * "excludeSubtasks": "true"
1902
+ * }
1903
+ * }
1904
+ *
1905
+ * Parameters:
1906
+ *
1907
+ * * `fieldKey` the ID of the field to validate. For a custom field, it would
1908
+ * look like `customfield_123`.
1909
+ * * `excludeSubtasks` Option to exclude values copied from sub-tasks. Allowed
1910
+ * values: `true`, `false`.
1911
+ *
1912
+ * ###### Field matches regular expression ######
1913
+ *
1914
+ * {
1915
+ * "ruleKey": "system:validate-field-value",
1916
+ * "parameters": {
1917
+ * "ruleType": "fieldMatchesRegularExpression",
1918
+ * "regexp": "[0-9]{4}",
1919
+ * "fieldKey": "description"
1920
+ * }
1921
+ * }
1922
+ *
1923
+ * Parameters:
1924
+ *
1925
+ * * `regexp` the regular expression used to validate the field\\u2019s content.
1926
+ * * `fieldKey` the ID of the field to validate. For a custom field, it would
1927
+ * look like `customfield_123`.
1928
+ *
1929
+ * ###### Date field comparison ######
1930
+ *
1931
+ * {
1932
+ * "ruleKey": "system:validate-field-value",
1933
+ * "parameters": {
1934
+ * "ruleType": "dateFieldComparison",
1935
+ * "date1FieldKey": "duedate",
1936
+ * "date2FieldKey": "customfield_10054",
1937
+ * "includeTime": "true",
1938
+ * "conditionSelected": ">="
1939
+ * }
1940
+ * }
1941
+ *
1942
+ * Parameters:
1943
+ *
1944
+ * * `date1FieldKey` the ID of the first field to compare. For a custom field,
1945
+ * it would look like `customfield_123`.
1946
+ * * `date2FieldKey` the ID of the second field to compare. For a custom field,
1947
+ * it would look like `customfield_123`.
1948
+ * * `includeTime` if `true`, compares both date and time. Allowed values:
1949
+ * `true`, `false`.
1950
+ * * `conditionSelected` the condition to compare with. Allowed values: `>`,
1951
+ * `>=`, `=`, `<=`, `<`, `!=`.
1952
+ *
1953
+ * ###### Date range comparison ######
1954
+ *
1955
+ * {
1956
+ * "ruleKey": "system:validate-field-value",
1957
+ * "parameters": {
1958
+ * "ruleType": "windowDateComparison",
1959
+ * "date1FieldKey": "customfield_10009",
1960
+ * "date2FieldKey": "customfield_10054",
1961
+ * "numberOfDays": "3"
1962
+ * }
1963
+ * }
1964
+ *
1965
+ * Parameters:
1966
+ *
1967
+ * * `date1FieldKey` the ID of the first field to compare. For a custom field,
1968
+ * it would look like `customfield_123`.
1969
+ * * `date2FieldKey` the ID of the second field to compare. For a custom field,
1970
+ * it would look like `customfield_123`.
1971
+ * * `numberOfDays` maximum number of days past the reference date
1972
+ * (`date2FieldKey`) to pass validation.
1973
+ *
1974
+ * This rule is composed by aggregating the following legacy rules:
1975
+ *
1976
+ * * FieldRequiredValidator
1977
+ * * FieldChangedValidator
1978
+ * * FieldHasSingleValueValidator
1979
+ * * RegexpFieldValidator
1980
+ * * DateFieldValidator
1981
+ * * WindowsDateValidator
1982
+ *
1983
+ * ##### Proforma: Forms attached validator #####
1984
+ *
1985
+ * Validates that one or more forms are attached to the issue.
1986
+ *
1987
+ * {
1988
+ * "ruleKey" : "system:proforma-forms-attached"
1989
+ * "parameters" : {}
1990
+ * }
1991
+ *
1992
+ * ##### Proforma: Forms submitted validator #####
1993
+ *
1994
+ * Validates that all forms attached to the issue have been submitted.
1995
+ *
1996
+ * {
1997
+ * "ruleKey" : "system:proforma-forms-submitted"
1998
+ * "parameters" : {}
1999
+ * }
2000
+ *
2001
+ * #### Conditions ####
2002
+ *
2003
+ * Conditions enable workflow rules that govern whether a transition can execute.
2004
+ *
2005
+ * ##### Check field value #####
2006
+ *
2007
+ * A condition rule evaluates as true if a specific field's value meets the
2008
+ * defined criteria. This rule ensures that an issue can only transition to the
2009
+ * next step in the workflow if the field's value matches the desired condition.
2010
+ *
2011
+ * {
2012
+ * "ruleKey": "system:check-field-value",
2013
+ * "parameters": {
2014
+ * "fieldId": "description",
2015
+ * "fieldValue": "[\"Done\"]",
2016
+ * "comparator": "=",
2017
+ * "comparisonType": "STRING"
2018
+ * }
2019
+ * }
2020
+ *
2021
+ * Parameters:
2022
+ *
2023
+ * * `fieldId` The ID of the field to check the value of. For non-system fields,
2024
+ * it will look like `customfield_123`. Note: `fieldId` is used interchangeably
2025
+ * with the idea of `fieldKey` here, they refer to the same field.
2026
+ * * `fieldValue` the list of values to check against the field\\u2019s value.
2027
+ * * `comparator` The comparison logic. Allowed values: `>`, `>=`, `=`, `<=`,
2028
+ * `<`, `!=`.
2029
+ * * `comparisonType` The type of data being compared. Allowed values: `STRING`,
2030
+ * `NUMBER`, `DATE`, `DATE_WITHOUT_TIME`, `OPTIONID`.
2031
+ *
2032
+ * ##### Restrict issue transition #####
2033
+ *
2034
+ * This rule ensures that issue transitions are restricted based on user accounts,
2035
+ * roles, group memberships, and permissions, maintaining control over who can
2036
+ * transition an issue. This condition evaluates as `true` if any of the following
2037
+ * criteria is met.
2038
+ *
2039
+ * {
2040
+ * "ruleKey": "system:restrict-issue-transition",
2041
+ * "parameters": {
2042
+ * "accountIds": "allow-reporter,5e68ac137d64450d01a77fa0",
2043
+ * "roleIds": "10002,10004",
2044
+ * "groupIds": "703ff44a-7dc8-4f4b-9aa6-a65bf3574fa4",
2045
+ * "permissionKeys": "ADMINISTER_PROJECTS",
2046
+ * "groupCustomFields": "customfield_10028",
2047
+ * "allowUserCustomFields":
2048
+ * "customfield_10072,customfield_10144,customfield_10007",
2049
+ * "denyUserCustomFields": "customfield_10107"
2050
+ * }
2051
+ * }
2052
+ *
2053
+ * Parameters:
2054
+ *
2055
+ * * `accountIds` a comma-separated list of the user account IDs. It also allows
2056
+ * generic values like: `allow-assignee`, `allow-reporter`, and `accountIds` Note:
2057
+ * This is only supported in team-managed projects
2058
+ * * `roleIds` a comma-separated list of role IDs.
2059
+ * * `groupIds` a comma-separated list of group IDs.
2060
+ * * `permissionKeys` a comma-separated list of permission keys. Allowed values:
2061
+ * [built-in Jira
2062
+ * permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-permission-schemes/#built-in-permissions).
2063
+ * * `groupCustomFields` a comma-separated list of group custom field IDs.
2064
+ * * `allowUserCustomFields` a comma-separated list of user custom field IDs to
2065
+ * allow for issue transition.
2066
+ * * `denyUserCustomFields` a comma-separated list of user custom field IDs to
2067
+ * deny for issue transition.
2068
+ *
2069
+ * This rule is composed by aggregating the following legacy rules:
2070
+ *
2071
+ * * AllowOnlyAssignee
2072
+ * * AllowOnlyReporter
2073
+ * * InAnyProjectRoleCondition
2074
+ * * InProjectRoleCondition
2075
+ * * UserInAnyGroupCondition
2076
+ * * UserInGroupCondition
2077
+ * * PermissionCondtion
2078
+ * * InGroupCFCondition
2079
+ * * UserIsInCustomFieldCondition
2080
+ *
2081
+ * ##### Previous status condition #####
2082
+ *
2083
+ * A condition that evaluates based on an issue's previous status(es) and specific
2084
+ * criteria.
2085
+ *
2086
+ * {
2087
+ * "ruleKey" : "system:previous-status-condition"
2088
+ * "parameters" : {
2089
+ * "previousStatusIds" : "10004",
2090
+ * "not": "true",
2091
+ * "mostRecentStatusOnly" : "true",
2092
+ * "includeCurrentStatus": "true",
2093
+ * "ignoreLoopTransitions": "true"
2094
+ * }
2095
+ * }
2096
+ *
2097
+ * Parameters:
2098
+ *
2099
+ * * `previousStatusIds` a comma-separated list of status IDs, current only
2100
+ * support one ID.
2101
+ * * `not` indicates if the condition should be reversed. When `true` it checks
2102
+ * that the issue has not been in the selected statuses. Allowed values: `true`,
2103
+ * `false`.
2104
+ * * `mostRecentStatusOnly` when true only considers the most recent status for
2105
+ * the condition evaluation. Allowed values: `true`, `false`.
2106
+ * * `includeCurrentStatus` includes the current status when evaluating if the
2107
+ * issue has been through the selected statuses. Allowed values: `true`, `false`.
2108
+ * * `ignoreLoopTransitions` ignore loop transitions. Allowed values: `true`,
2109
+ * `false`.
2110
+ *
2111
+ * ##### Parent or child blocking condition #####
2112
+ *
2113
+ * A condition to block the parent\\u2019s issue transition depending on the
2114
+ * child\\u2019s issue status.
2115
+ *
2116
+ * {
2117
+ * "ruleKey" : "system:parent-or-child-blocking-condition"
2118
+ * "parameters" : {
2119
+ * "blocker" : "CHILD",
2120
+ * "statusIds" : "1,2,3"
2121
+ * }
2122
+ * }
2123
+ *
2124
+ * Parameters:
2125
+ *
2126
+ * * `blocker` currently only supports `CHILD`.
2127
+ * * `statusIds` a comma-separated list of status IDs.
2128
+ *
2129
+ * ##### Separation of duties #####
2130
+ *
2131
+ * A condition preventing the user from performing, if the user has already
2132
+ * performed a transition on the issue.
2133
+ *
2134
+ * {
2135
+ * "ruleKey": "system:separation-of-duties",
2136
+ * "parameters": {
2137
+ * "fromStatusId": "10161",
2138
+ * "toStatusId": "10160"
2139
+ * }
2140
+ * }
2141
+ *
2142
+ * Parameters:
2143
+ *
2144
+ * * `fromStatusId` represents the status ID from which the issue is
2145
+ * transitioning. It ensures that the user performing the current transition has
2146
+ * not performed any actions when the issue was in the specified status.
2147
+ * * `toStatusId` represents the status ID to which the issue is transitioning.
2148
+ * It ensures that the user performing the current transition is not the same user
2149
+ * who has previously transitioned the issue.
2150
+ *
2151
+ * ##### Restrict transitions #####
2152
+ *
2153
+ * A condition preventing all users from transitioning the issue can also
2154
+ * optionally include APIs as well.
2155
+ *
2156
+ * {
2157
+ * "ruleKey": "system:restrict-from-all-users",
2158
+ * "parameters": {
2159
+ * "restrictMode": "users"
2160
+ * }
2161
+ * }
2162
+ *
2163
+ * Parameters:
2164
+ *
2165
+ * * `restrictMode` restricts the issue transition including/excluding APIs.
2166
+ * Allowed values: `"users"`, `"usersAndAPI"`.
2167
+ *
2168
+ * ##### Jira Service Management block until approved #####
2169
+ *
2170
+ * Block an issue transition until approval. Note: This is only supported in
2171
+ * team-managed projects.
2172
+ *
2173
+ * {
2174
+ * "ruleKey": "system:jsd-approvals-block-until-approved",
2175
+ * "parameters": {
2176
+ * "approvalConfigurationJson": "{"statusExternalUuid...}"
2177
+ * }
2178
+ * }
2179
+ *
2180
+ * Parameters:
2181
+ *
2182
+ * * `approvalConfigurationJson` a stringified JSON holding the Jira Service
2183
+ * Management approval configuration.
2184
+ *
2185
+ * ##### Jira Service Management block until rejected #####
2186
+ *
2187
+ * Block an issue transition until rejected. Note: This is only supported in
2188
+ * team-managed projects.
2189
+ *
2190
+ * {
2191
+ * "ruleKey": "system:jsd-approvals-block-until-rejected",
2192
+ * "parameters": {
2193
+ * "approvalConfigurationJson": "{"statusExternalUuid...}"
2194
+ * }
2195
+ * }
2196
+ *
2197
+ * Parameters:
2198
+ *
2199
+ * * `approvalConfigurationJson` a stringified JSON holding the Jira Service
2200
+ * Management approval configuration.
2201
+ *
2202
+ * ##### Block in progress approval #####
2203
+ *
2204
+ * Condition to block issue transition if there is pending approval. Note: This is
2205
+ * only supported in company-managed projects.
2206
+ *
2207
+ * {
2208
+ * "ruleKey": "system:block-in-progress-approval",
2209
+ * "parameters": {}
2210
+ * }
2211
+ *
2212
+ * #### Post functions ####
2213
+ *
2214
+ * Post functions carry out any additional processing required after a workflow
2215
+ * transition is executed.
2216
+ *
2217
+ * ##### Change assignee #####
2218
+ *
2219
+ * A post function rule that changes the assignee of an issue after a transition.
2220
+ *
2221
+ * {
2222
+ * "ruleKey": "system:change-assignee",
2223
+ * "parameters": {
2224
+ * "type": "to-selected-user",
2225
+ * "accountId": "example-account-id"
2226
+ * }
2227
+ * }
2228
+ *
2229
+ * Parameters:
2230
+ *
2231
+ * * `type` the parameter used to determine the new assignee. Allowed values:
2232
+ * `to-selected-user`, `to-unassigned`, `to-current-user`, `to-current-user`,
2233
+ * `to-default-user`, `to-default-user`
2234
+ * * `accountId` the account ID of the user to assign the issue to. This
2235
+ * parameter is required only when the type is `"to-selected-user"`.
2236
+ *
2237
+ * ##### Copy field value #####
2238
+ *
2239
+ * A post function that automates the process of copying values between fields
2240
+ * during a specific transition, ensuring data consistency and reducing manual
2241
+ * effort.
2242
+ *
2243
+ * {
2244
+ * "ruleKey": "system:copy-value-from-other-field",
2245
+ * "parameters": {
2246
+ * "sourceFieldKey": "description",
2247
+ * "targetFieldKey": "components",
2248
+ * "issueSource": "SAME"
2249
+ * }
2250
+ * }
2251
+ *
2252
+ * Parameters:
2253
+ *
2254
+ * * `sourceFieldKey` the field key to copy from. For a custom field, it would
2255
+ * look like `customfield_123`
2256
+ * * `targetFieldKey` the field key to copy to. For a custom field, it would
2257
+ * look like `customfield_123`
2258
+ * * `issueSource` `SAME` or `PARENT`. Defaults to `SAME` if no value is
2259
+ * provided.
2260
+ *
2261
+ * ##### Update field #####
2262
+ *
2263
+ * A post function that updates or appends a specific field with the given value.
2264
+ *
2265
+ * {
2266
+ * "ruleKey": "system:update-field",
2267
+ * "parameters": {
2268
+ * "field": "customfield_10056",
2269
+ * "value": "asdf",
2270
+ * "mode": "append"
2271
+ * }
2272
+ * }
2273
+ *
2274
+ * Parameters:
2275
+ *
2276
+ * * `field` the ID of the field to update. For a custom field, it would look
2277
+ * like `customfield_123`
2278
+ * * `value` the value to update the field with.
2279
+ * * `mode` `append` or `replace`. Determines if a value will be appended to the
2280
+ * current value, or if the current value will be replaced.
2281
+ *
2282
+ * ##### Trigger webhook #####
2283
+ *
2284
+ * A post function that automatically triggers a predefined webhook when a
2285
+ * transition occurs in the workflow.
2286
+ *
2287
+ * {
2288
+ * "ruleKey": "system:trigger-webhook",
2289
+ * "parameters": {
2290
+ * "webhookId": "1"
2291
+ * }
2292
+ * }
2293
+ *
2294
+ * Parameters:
2295
+ *
2296
+ * * `webhookId` the ID of the webhook.
2297
+ *
2298
+ * #### Screen ####
2299
+ *
2300
+ * ##### Remind people to update fields #####
2301
+ *
2302
+ * A screen rule that prompts users to update a specific field when they interact
2303
+ * with an issue screen during a transition. This rule is useful for ensuring that
2304
+ * users provide or modify necessary information before moving an issue to the
2305
+ * next step in the workflow.
2306
+ *
2307
+ * {
2308
+ * "ruleKey": "system:remind-people-to-update-fields",
2309
+ * "params": {
2310
+ * "remindingFieldIds": "assignee,customfield_10025",
2311
+ * "remindingMessage": "The message",
2312
+ * "remindingAlwaysAsk": "true"
2313
+ * }
2314
+ * }
2315
+ *
2316
+ * Parameters:
2317
+ *
2318
+ * * `remindingFieldIds` a comma-separated list of field IDs. Note: `fieldId` is
2319
+ * used interchangeably with the idea of `fieldKey` here, they refer to the same
2320
+ * field.
2321
+ * * `remindingMessage` the message to display when prompting the users to
2322
+ * update the fields.
2323
+ * * `remindingAlwaysAsk` always remind to update fields. Allowed values:
2324
+ * `true`, `false`.
2325
+ *
2326
+ * ##### Shared transition screen #####
2327
+ *
2328
+ * A common screen that is shared between transitions in a workflow.
2329
+ *
2330
+ * {
2331
+ * "ruleKey": "system:transition-screen",
2332
+ * "params": {
2333
+ * "screenId": "3"
2334
+ * }
2335
+ * }
2336
+ *
2337
+ * Parameters:
2338
+ *
2339
+ * * `screenId` the ID of the screen.
2340
+ *
2341
+ * #### Connect & Forge ####
2342
+ *
2343
+ * ##### Connect rules #####
2344
+ *
2345
+ * Validator/Condition/Post function for Connect app.
2346
+ *
2347
+ * {
2348
+ * "ruleKey": "connect:expression-validator",
2349
+ * "parameters": {
2350
+ * "appKey": "com.atlassian.app",
2351
+ * "config": "",
2352
+ * "id": "90ce590f-e90c-4cd3-8281-165ce41f2ac3",
2353
+ * "disabled": "false",
2354
+ * "tag": ""
2355
+ * }
2356
+ * }
2357
+ *
2358
+ * Parameters:
2359
+ *
2360
+ * * `ruleKey` Validator: `connect:expression-validator`, Condition:
2361
+ * `connect:expression-condition`, and Post function:
2362
+ * `connect:remote-workflow-function`
2363
+ * * `appKey` the reference to the Connect app
2364
+ * * `config` a JSON payload string describing the configuration
2365
+ * * `id` the ID of the rule
2366
+ * * `disabled` determine if the Connect app is disabled. Allowed values:
2367
+ * `true`, `false`.
2368
+ * * `tag` additional tags for the Connect app
2369
+ *
2370
+ * ##### Forge rules #####
2371
+ *
2372
+ * Validator/Condition/Post function for Forge app.
2373
+ *
2374
+ * {
2375
+ * "ruleKey": "forge:expression-validator",
2376
+ * "parameters": {
2377
+ * "key":
2378
+ * "ari:cloud:ecosystem::extension/{appId}/{environmentId}/static/{moduleKey}",
2379
+ * "config": "{"searchString":"workflow validator"}",
2380
+ * "id": "a865ddf6-bb3f-4a7b-9540-c2f8b3f9f6c2"
2381
+ * }
2382
+ * }
2383
+ *
2384
+ * Parameters:
2385
+ *
2386
+ * * `ruleKey` Validator: `forge:expression-validator`, Condition:
2387
+ * `forge:expression-condition`, and Post function: `forge:workflow-post-function`
2388
+ * * `key` the identifier for the Forge app
2389
+ * * `config` the persistent stringified JSON configuration for the Forge rule
2390
+ * * `id` the ID of the Forge rule
2391
+ *
2392
+ * @returns Returned if the request is successful.
2393
+ *
2394
+ * example: {
2395
+ * "connectRules": [
2396
+ * {
2397
+ * "addonKey": "com.atlassian.jira.refapp",
2398
+ * "createUrl": "/validators/jira-expression/create?id={validator.id}",
2399
+ * "description": "Validates if the given Jira expression is true.",
2400
+ * "editUrl": "/validators/jira-expression/edit?id={validator.id}",
2401
+ * "moduleKey": "jiraExpressionValidator",
2402
+ * "name": "Jira expression validator (by APPNAME)",
2403
+ * "ruleKey": "connect:expression-validator",
2404
+ * "ruleType": "Validator",
2405
+ * "viewUrl": "/validators/jira-expression/view?id={validator.id}"
2406
+ * }
2407
+ * ],
2408
+ * "editorScope": "GLOBAL",
2409
+ * "forgeRules": [
2410
+ * {
2411
+ * "description": "A Jira workflow validator example.",
2412
+ * "id":
2413
+ * "ari:cloud:ecosystem::extension/9df6d15f-1bbe-443e-be08-150309e8dbb0/f6a3bed3-737f-4e7a-8942-130df302b749/static/workflow-validator-example-workflow-validator",
2414
+ * "name": "workflow-validator",
2415
+ * "ruleKey": "forge:expression-validator",
2416
+ * "ruleType": "Validator"
2417
+ * }
2418
+ * ],
2419
+ * "projectTypes": [
2420
+ * "software",
2421
+ * "business"
2422
+ * ],
2423
+ * "systemRules": [
2424
+ * {
2425
+ * "description": "Automatically assign a request to someone after moving
2426
+ * the request using a particular transition.",
2427
+ * "incompatibleRuleKeys": [],
2428
+ * "isAvailableForInitialTransition": true,
2429
+ * "isVisible": true,
2430
+ * "name": "Assign a request",
2431
+ * "ruleKey": "system:change-assignee",
2432
+ * "ruleType": "Function"
2433
+ * }
2434
+ * ],
2435
+ * "triggerRules": [
2436
+ * {
2437
+ * "availableTypes": [
2438
+ * {
2439
+ * "description": "Automatically transitions the issue when a related
2440
+ * branch is created in a connected repository",
2441
+ * "name": "Branch created",
2442
+ * "type":
2443
+ * "com.atlassian.jira.plugins.jira-development-integration-plugin:branch-created-trigger"
2444
+ * }
2445
+ * ],
2446
+ * "ruleKey": "system:development-triggers"
2447
+ * }
2448
+ * ]
2449
+ * }
2450
+ * @path {GET} /rest/api/3/workflows/capabilities
2451
+ * @scopes-current manage:jira-configuration
2452
+ * @scopes-beta read:workflow:jira
2453
+ * @see https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-workflows#api-rest-api-3-workflows-capabilities-get
2454
+ */
2455
+ this.workflowCapabilities = ({ workflowId, projectId, issueTypeId, } = {}) => {
2456
+ return this.getClientInstance()
2457
+ .request({
2458
+ path: "/rest/api/3/workflows/capabilities",
2459
+ method: "GET",
2460
+ query: {
2461
+ workflowId,
2462
+ projectId,
2463
+ issueTypeId,
2464
+ },
2465
+ })
2466
+ .then(this.getClientInstance().responseHandler({
2467
+ 200: {
2468
+ "application/json": "json",
2469
+ },
2470
+ }))
2471
+ .then(commonHttpClient.castResponse())
2472
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("WorkflowsService.workflowCapabilities.response"))
2473
+ .then(commonHttpClient.getBody);
2474
+ };
2472
2475
  }
2473
2476
  static initialize() {
2474
2477
  validationSchemaStorage_1.validationSchemaStorage.registerExtensible("WorkflowsService.getAllWorkflows.response", zod_1.z