@resolution/jira-api-client 0.4.4 → 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 (326) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/lib/openapi/platform/BaseJiraPlatformApiClient.d.ts +28 -4
  3. package/lib/openapi/platform/BaseJiraPlatformApiClient.js +24 -1
  4. package/lib/openapi/platform/BaseJiraPlatformApiClient.js.map +1 -1
  5. package/lib/openapi/platform/models/common.d.ts +6 -0
  6. package/lib/openapi/platform/models/common.js +12 -1
  7. package/lib/openapi/platform/models/common.js.map +1 -1
  8. package/lib/openapi/platform/models/dynamicModules.d.ts +0 -9
  9. package/lib/openapi/platform/models/dynamicModules.js +0 -6
  10. package/lib/openapi/platform/models/dynamicModules.js.map +1 -1
  11. package/lib/openapi/platform/models/issueBulkOperations.d.ts +547 -0
  12. package/lib/openapi/platform/models/issueBulkOperations.js +437 -0
  13. package/lib/openapi/platform/models/issueBulkOperations.js.map +1 -0
  14. package/lib/openapi/platform/services/AnnouncementBannerService.d.ts +3 -3
  15. package/lib/openapi/platform/services/AnnouncementBannerService.js +65 -62
  16. package/lib/openapi/platform/services/AnnouncementBannerService.js.map +1 -1
  17. package/lib/openapi/platform/services/AppDataPoliciesService.d.ts +4 -4
  18. package/lib/openapi/platform/services/AppDataPoliciesService.js +70 -67
  19. package/lib/openapi/platform/services/AppDataPoliciesService.js.map +1 -1
  20. package/lib/openapi/platform/services/AppMigrationService.d.ts +6 -6
  21. package/lib/openapi/platform/services/AppMigrationService.js +139 -136
  22. package/lib/openapi/platform/services/AppMigrationService.js.map +1 -1
  23. package/lib/openapi/platform/services/AppPropertiesService.d.ts +12 -12
  24. package/lib/openapi/platform/services/AppPropertiesService.js +254 -251
  25. package/lib/openapi/platform/services/AppPropertiesService.js.map +1 -1
  26. package/lib/openapi/platform/services/ApplicationRolesService.d.ts +3 -3
  27. package/lib/openapi/platform/services/ApplicationRolesService.js +177 -174
  28. package/lib/openapi/platform/services/ApplicationRolesService.js.map +1 -1
  29. package/lib/openapi/platform/services/AuditRecordsService.d.ts +7 -7
  30. package/lib/openapi/platform/services/AuditRecordsService.js +97 -94
  31. package/lib/openapi/platform/services/AuditRecordsService.js.map +1 -1
  32. package/lib/openapi/platform/services/AvatarsService.d.ts +25 -31
  33. package/lib/openapi/platform/services/AvatarsService.js +412 -415
  34. package/lib/openapi/platform/services/AvatarsService.js.map +1 -1
  35. package/lib/openapi/platform/services/ClassificationLevelsService.d.ts +4 -4
  36. package/lib/openapi/platform/services/ClassificationLevelsService.js +79 -76
  37. package/lib/openapi/platform/services/ClassificationLevelsService.js.map +1 -1
  38. package/lib/openapi/platform/services/DashboardsService.d.ts +62 -50
  39. package/lib/openapi/platform/services/DashboardsService.js +983 -974
  40. package/lib/openapi/platform/services/DashboardsService.js.map +1 -1
  41. package/lib/openapi/platform/services/DynamicModulesService.d.ts +6 -6
  42. package/lib/openapi/platform/services/DynamicModulesService.js +68 -65
  43. package/lib/openapi/platform/services/DynamicModulesService.js.map +1 -1
  44. package/lib/openapi/platform/services/FilterSharingService.d.ts +11 -11
  45. package/lib/openapi/platform/services/FilterSharingService.js +512 -509
  46. package/lib/openapi/platform/services/FilterSharingService.js.map +1 -1
  47. package/lib/openapi/platform/services/FiltersService.d.ts +50 -50
  48. package/lib/openapi/platform/services/FiltersService.js +1262 -1259
  49. package/lib/openapi/platform/services/FiltersService.js.map +1 -1
  50. package/lib/openapi/platform/services/GroupAndUserPickerService.d.ts +10 -10
  51. package/lib/openapi/platform/services/GroupAndUserPickerService.js +112 -109
  52. package/lib/openapi/platform/services/GroupAndUserPickerService.js.map +1 -1
  53. package/lib/openapi/platform/services/GroupsService.d.ts +46 -46
  54. package/lib/openapi/platform/services/GroupsService.js +385 -382
  55. package/lib/openapi/platform/services/GroupsService.js.map +1 -1
  56. package/lib/openapi/platform/services/IssueAttachmentsService.d.ts +20 -20
  57. package/lib/openapi/platform/services/IssueAttachmentsService.js +644 -641
  58. package/lib/openapi/platform/services/IssueAttachmentsService.js.map +1 -1
  59. package/lib/openapi/platform/services/IssueBulkOperationsService.d.ts +325 -0
  60. package/lib/openapi/platform/services/IssueBulkOperationsService.js +353 -0
  61. package/lib/openapi/platform/services/IssueBulkOperationsService.js.map +1 -0
  62. package/lib/openapi/platform/services/IssueCommentPropertiesService.d.ts +8 -8
  63. package/lib/openapi/platform/services/IssueCommentPropertiesService.js +187 -184
  64. package/lib/openapi/platform/services/IssueCommentPropertiesService.js.map +1 -1
  65. package/lib/openapi/platform/services/IssueCommentsService.d.ts +22 -22
  66. package/lib/openapi/platform/services/IssueCommentsService.js +507 -504
  67. package/lib/openapi/platform/services/IssueCommentsService.js.map +1 -1
  68. package/lib/openapi/platform/services/IssueCustomFieldConfigurationAppsService.d.ts +11 -11
  69. package/lib/openapi/platform/services/IssueCustomFieldConfigurationAppsService.js +126 -123
  70. package/lib/openapi/platform/services/IssueCustomFieldConfigurationAppsService.js.map +1 -1
  71. package/lib/openapi/platform/services/IssueCustomFieldContextsService.d.ts +42 -42
  72. package/lib/openapi/platform/services/IssueCustomFieldContextsService.js +748 -745
  73. package/lib/openapi/platform/services/IssueCustomFieldContextsService.js.map +1 -1
  74. package/lib/openapi/platform/services/IssueCustomFieldOptionsAppsService.d.ts +28 -28
  75. package/lib/openapi/platform/services/IssueCustomFieldOptionsAppsService.js +535 -532
  76. package/lib/openapi/platform/services/IssueCustomFieldOptionsAppsService.js.map +1 -1
  77. package/lib/openapi/platform/services/IssueCustomFieldOptionsService.d.ts +20 -20
  78. package/lib/openapi/platform/services/IssueCustomFieldOptionsService.js +358 -355
  79. package/lib/openapi/platform/services/IssueCustomFieldOptionsService.js.map +1 -1
  80. package/lib/openapi/platform/services/IssueCustomFieldValuesAppsService.d.ts +6 -6
  81. package/lib/openapi/platform/services/IssueCustomFieldValuesAppsService.js +86 -83
  82. package/lib/openapi/platform/services/IssueCustomFieldValuesAppsService.js.map +1 -1
  83. package/lib/openapi/platform/services/IssueFieldConfigurationsService.d.ts +45 -45
  84. package/lib/openapi/platform/services/IssueFieldConfigurationsService.js +689 -686
  85. package/lib/openapi/platform/services/IssueFieldConfigurationsService.js.map +1 -1
  86. package/lib/openapi/platform/services/IssueFieldsService.d.ts +32 -32
  87. package/lib/openapi/platform/services/IssueFieldsService.js +484 -481
  88. package/lib/openapi/platform/services/IssueFieldsService.js.map +1 -1
  89. package/lib/openapi/platform/services/IssueLinkTypesService.d.ts +9 -9
  90. package/lib/openapi/platform/services/IssueLinkTypesService.js +212 -209
  91. package/lib/openapi/platform/services/IssueLinkTypesService.js.map +1 -1
  92. package/lib/openapi/platform/services/IssueLinksService.d.ts +6 -6
  93. package/lib/openapi/platform/services/IssueLinksService.js +230 -227
  94. package/lib/openapi/platform/services/IssueLinksService.js.map +1 -1
  95. package/lib/openapi/platform/services/IssueNavigatorSettingsService.d.ts +3 -3
  96. package/lib/openapi/platform/services/IssueNavigatorSettingsService.js +72 -69
  97. package/lib/openapi/platform/services/IssueNavigatorSettingsService.js.map +1 -1
  98. package/lib/openapi/platform/services/IssueNotificationSchemesService.d.ts +27 -27
  99. package/lib/openapi/platform/services/IssueNotificationSchemesService.js +816 -813
  100. package/lib/openapi/platform/services/IssueNotificationSchemesService.js.map +1 -1
  101. package/lib/openapi/platform/services/IssuePrioritiesService.d.ts +22 -22
  102. package/lib/openapi/platform/services/IssuePrioritiesService.js +307 -304
  103. package/lib/openapi/platform/services/IssuePrioritiesService.js.map +1 -1
  104. package/lib/openapi/platform/services/IssuePropertiesService.d.ts +16 -16
  105. package/lib/openapi/platform/services/IssuePropertiesService.js +390 -387
  106. package/lib/openapi/platform/services/IssuePropertiesService.js.map +1 -1
  107. package/lib/openapi/platform/services/IssueRemoteLinksService.d.ts +13 -13
  108. package/lib/openapi/platform/services/IssueRemoteLinksService.js +368 -365
  109. package/lib/openapi/platform/services/IssueRemoteLinksService.js.map +1 -1
  110. package/lib/openapi/platform/services/IssueResolutionsService.d.ts +19 -19
  111. package/lib/openapi/platform/services/IssueResolutionsService.js +283 -280
  112. package/lib/openapi/platform/services/IssueResolutionsService.js.map +1 -1
  113. package/lib/openapi/platform/services/IssueSearchService.d.ts +24 -24
  114. package/lib/openapi/platform/services/IssueSearchService.js +826 -823
  115. package/lib/openapi/platform/services/IssueSearchService.js.map +1 -1
  116. package/lib/openapi/platform/services/IssueSecurityLevelService.d.ts +8 -8
  117. package/lib/openapi/platform/services/IssueSecurityLevelService.js +137 -134
  118. package/lib/openapi/platform/services/IssueSecurityLevelService.js.map +1 -1
  119. package/lib/openapi/platform/services/IssueSecuritySchemesService.d.ts +51 -51
  120. package/lib/openapi/platform/services/IssueSecuritySchemesService.js +610 -607
  121. package/lib/openapi/platform/services/IssueSecuritySchemesService.js.map +1 -1
  122. package/lib/openapi/platform/services/IssueTypePropertiesService.d.ts +8 -8
  123. package/lib/openapi/platform/services/IssueTypePropertiesService.js +175 -172
  124. package/lib/openapi/platform/services/IssueTypePropertiesService.js.map +1 -1
  125. package/lib/openapi/platform/services/IssueTypeSchemesService.d.ts +31 -31
  126. package/lib/openapi/platform/services/IssueTypeSchemesService.js +527 -524
  127. package/lib/openapi/platform/services/IssueTypeSchemesService.js.map +1 -1
  128. package/lib/openapi/platform/services/IssueTypeScreenSchemesService.d.ts +36 -36
  129. package/lib/openapi/platform/services/IssueTypeScreenSchemesService.js +508 -505
  130. package/lib/openapi/platform/services/IssueTypeScreenSchemesService.js.map +1 -1
  131. package/lib/openapi/platform/services/IssueTypesService.d.ts +22 -28
  132. package/lib/openapi/platform/services/IssueTypesService.js +424 -427
  133. package/lib/openapi/platform/services/IssueTypesService.js.map +1 -1
  134. package/lib/openapi/platform/services/IssueVotesService.d.ts +6 -6
  135. package/lib/openapi/platform/services/IssueVotesService.js +148 -145
  136. package/lib/openapi/platform/services/IssueVotesService.js.map +1 -1
  137. package/lib/openapi/platform/services/IssueWatchersService.d.ts +10 -10
  138. package/lib/openapi/platform/services/IssueWatchersService.js +197 -194
  139. package/lib/openapi/platform/services/IssueWatchersService.js.map +1 -1
  140. package/lib/openapi/platform/services/IssueWorklogPropertiesService.d.ts +8 -8
  141. package/lib/openapi/platform/services/IssueWorklogPropertiesService.js +199 -196
  142. package/lib/openapi/platform/services/IssueWorklogPropertiesService.js.map +1 -1
  143. package/lib/openapi/platform/services/IssueWorklogsService.d.ts +44 -44
  144. package/lib/openapi/platform/services/IssueWorklogsService.js +636 -633
  145. package/lib/openapi/platform/services/IssueWorklogsService.js.map +1 -1
  146. package/lib/openapi/platform/services/IssuesService.d.ts +71 -71
  147. package/lib/openapi/platform/services/IssuesService.js +1856 -1853
  148. package/lib/openapi/platform/services/IssuesService.js.map +1 -1
  149. package/lib/openapi/platform/services/JiraExpressionsService.d.ts +6 -6
  150. package/lib/openapi/platform/services/JiraExpressionsService.js +238 -235
  151. package/lib/openapi/platform/services/JiraExpressionsService.js.map +1 -1
  152. package/lib/openapi/platform/services/JiraSettingsService.d.ts +9 -9
  153. package/lib/openapi/platform/services/JiraSettingsService.js +279 -276
  154. package/lib/openapi/platform/services/JiraSettingsService.js.map +1 -1
  155. package/lib/openapi/platform/services/JqlFunctionsAppsService.d.ts +8 -8
  156. package/lib/openapi/platform/services/JqlFunctionsAppsService.js +107 -104
  157. package/lib/openapi/platform/services/JqlFunctionsAppsService.js.map +1 -1
  158. package/lib/openapi/platform/services/JqlService.d.ts +15 -15
  159. package/lib/openapi/platform/services/JqlService.js +635 -632
  160. package/lib/openapi/platform/services/JqlService.js.map +1 -1
  161. package/lib/openapi/platform/services/LabelsService.d.ts +4 -4
  162. package/lib/openapi/platform/services/LabelsService.js +41 -38
  163. package/lib/openapi/platform/services/LabelsService.js.map +1 -1
  164. package/lib/openapi/platform/services/LicenseMetricsService.d.ts +4 -4
  165. package/lib/openapi/platform/services/LicenseMetricsService.js +120 -117
  166. package/lib/openapi/platform/services/LicenseMetricsService.js.map +1 -1
  167. package/lib/openapi/platform/services/MyselfService.d.ts +14 -14
  168. package/lib/openapi/platform/services/MyselfService.js +321 -318
  169. package/lib/openapi/platform/services/MyselfService.js.map +1 -1
  170. package/lib/openapi/platform/services/PermissionSchemesService.d.ts +25 -25
  171. package/lib/openapi/platform/services/PermissionSchemesService.js +548 -545
  172. package/lib/openapi/platform/services/PermissionSchemesService.js.map +1 -1
  173. package/lib/openapi/platform/services/PermissionsService.d.ts +15 -15
  174. package/lib/openapi/platform/services/PermissionsService.js +235 -232
  175. package/lib/openapi/platform/services/PermissionsService.js.map +1 -1
  176. package/lib/openapi/platform/services/PrioritySchemesService.d.ts +34 -34
  177. package/lib/openapi/platform/services/PrioritySchemesService.js +571 -568
  178. package/lib/openapi/platform/services/PrioritySchemesService.js.map +1 -1
  179. package/lib/openapi/platform/services/ProjectAvatarsService.d.ts +11 -11
  180. package/lib/openapi/platform/services/ProjectAvatarsService.js +213 -210
  181. package/lib/openapi/platform/services/ProjectAvatarsService.js.map +1 -1
  182. package/lib/openapi/platform/services/ProjectCategoriesService.d.ts +9 -9
  183. package/lib/openapi/platform/services/ProjectCategoriesService.js +180 -177
  184. package/lib/openapi/platform/services/ProjectCategoriesService.js.map +1 -1
  185. package/lib/openapi/platform/services/ProjectClassificationLevelsService.d.ts +6 -6
  186. package/lib/openapi/platform/services/ProjectClassificationLevelsService.js +125 -122
  187. package/lib/openapi/platform/services/ProjectClassificationLevelsService.js.map +1 -1
  188. package/lib/openapi/platform/services/ProjectComponentsService.d.ts +28 -28
  189. package/lib/openapi/platform/services/ProjectComponentsService.js +1009 -1006
  190. package/lib/openapi/platform/services/ProjectComponentsService.js.map +1 -1
  191. package/lib/openapi/platform/services/ProjectEmailService.d.ts +4 -4
  192. package/lib/openapi/platform/services/ProjectEmailService.js +78 -75
  193. package/lib/openapi/platform/services/ProjectEmailService.js.map +1 -1
  194. package/lib/openapi/platform/services/ProjectFeaturesService.d.ts +4 -4
  195. package/lib/openapi/platform/services/ProjectFeaturesService.js +119 -116
  196. package/lib/openapi/platform/services/ProjectFeaturesService.js.map +1 -1
  197. package/lib/openapi/platform/services/ProjectKeyAndNameValidationService.d.ts +8 -8
  198. package/lib/openapi/platform/services/ProjectKeyAndNameValidationService.js +100 -97
  199. package/lib/openapi/platform/services/ProjectKeyAndNameValidationService.js.map +1 -1
  200. package/lib/openapi/platform/services/ProjectPermissionSchemesService.d.ts +10 -10
  201. package/lib/openapi/platform/services/ProjectPermissionSchemesService.js +199 -196
  202. package/lib/openapi/platform/services/ProjectPermissionSchemesService.js.map +1 -1
  203. package/lib/openapi/platform/services/ProjectPropertiesService.d.ts +8 -8
  204. package/lib/openapi/platform/services/ProjectPropertiesService.js +172 -169
  205. package/lib/openapi/platform/services/ProjectPropertiesService.js.map +1 -1
  206. package/lib/openapi/platform/services/ProjectRoleActorsService.d.ts +18 -18
  207. package/lib/openapi/platform/services/ProjectRoleActorsService.js +362 -359
  208. package/lib/openapi/platform/services/ProjectRoleActorsService.js.map +1 -1
  209. package/lib/openapi/platform/services/ProjectRolesService.d.ts +21 -21
  210. package/lib/openapi/platform/services/ProjectRolesService.js +576 -573
  211. package/lib/openapi/platform/services/ProjectRolesService.js.map +1 -1
  212. package/lib/openapi/platform/services/ProjectTypesService.d.ts +6 -6
  213. package/lib/openapi/platform/services/ProjectTypesService.js +173 -170
  214. package/lib/openapi/platform/services/ProjectTypesService.js.map +1 -1
  215. package/lib/openapi/platform/services/ProjectVersionsService.d.ts +40 -40
  216. package/lib/openapi/platform/services/ProjectVersionsService.js +751 -748
  217. package/lib/openapi/platform/services/ProjectVersionsService.js.map +1 -1
  218. package/lib/openapi/platform/services/ProjectsService.d.ts +49 -49
  219. package/lib/openapi/platform/services/ProjectsService.js +1597 -1594
  220. package/lib/openapi/platform/services/ProjectsService.js.map +1 -1
  221. package/lib/openapi/platform/services/ScreenSchemesService.d.ts +14 -14
  222. package/lib/openapi/platform/services/ScreenSchemesService.js +177 -174
  223. package/lib/openapi/platform/services/ScreenSchemesService.js.map +1 -1
  224. package/lib/openapi/platform/services/ScreenTabFieldsService.d.ts +9 -9
  225. package/lib/openapi/platform/services/ScreenTabFieldsService.js +144 -141
  226. package/lib/openapi/platform/services/ScreenTabFieldsService.js.map +1 -1
  227. package/lib/openapi/platform/services/ScreenTabsService.d.ts +17 -17
  228. package/lib/openapi/platform/services/ScreenTabsService.js +229 -226
  229. package/lib/openapi/platform/services/ScreenTabsService.js.map +1 -1
  230. package/lib/openapi/platform/services/ScreensService.d.ts +23 -23
  231. package/lib/openapi/platform/services/ScreensService.js +281 -278
  232. package/lib/openapi/platform/services/ScreensService.js.map +1 -1
  233. package/lib/openapi/platform/services/ServerInfoService.d.ts +1 -1
  234. package/lib/openapi/platform/services/ServerInfoService.js +51 -48
  235. package/lib/openapi/platform/services/ServerInfoService.js.map +1 -1
  236. package/lib/openapi/platform/services/ServiceRegistryService.d.ts +2 -2
  237. package/lib/openapi/platform/services/ServiceRegistryService.js +30 -27
  238. package/lib/openapi/platform/services/ServiceRegistryService.js.map +1 -1
  239. package/lib/openapi/platform/services/StatusService.d.ts +17 -17
  240. package/lib/openapi/platform/services/StatusService.js +271 -268
  241. package/lib/openapi/platform/services/StatusService.js.map +1 -1
  242. package/lib/openapi/platform/services/TasksService.d.ts +4 -4
  243. package/lib/openapi/platform/services/TasksService.js +93 -90
  244. package/lib/openapi/platform/services/TasksService.js.map +1 -1
  245. package/lib/openapi/platform/services/TimeTrackingService.d.ts +7 -7
  246. package/lib/openapi/platform/services/TimeTrackingService.js +190 -187
  247. package/lib/openapi/platform/services/TimeTrackingService.js.map +1 -1
  248. package/lib/openapi/platform/services/UiModificationsAppsService.d.ts +11 -11
  249. package/lib/openapi/platform/services/UiModificationsAppsService.js +214 -211
  250. package/lib/openapi/platform/services/UiModificationsAppsService.js.map +1 -1
  251. package/lib/openapi/platform/services/UserPropertiesService.d.ts +20 -20
  252. package/lib/openapi/platform/services/UserPropertiesService.js +196 -193
  253. package/lib/openapi/platform/services/UserPropertiesService.js.map +1 -1
  254. package/lib/openapi/platform/services/UserSearchService.d.ts +61 -61
  255. package/lib/openapi/platform/services/UserSearchService.js +709 -706
  256. package/lib/openapi/platform/services/UserSearchService.js.map +1 -1
  257. package/lib/openapi/platform/services/UsersService.d.ts +51 -51
  258. package/lib/openapi/platform/services/UsersService.js +637 -634
  259. package/lib/openapi/platform/services/UsersService.js.map +1 -1
  260. package/lib/openapi/platform/services/WebhooksService.d.ts +14 -14
  261. package/lib/openapi/platform/services/WebhooksService.js +262 -259
  262. package/lib/openapi/platform/services/WebhooksService.js.map +1 -1
  263. package/lib/openapi/platform/services/WorkflowSchemeDraftsService.d.ts +30 -30
  264. package/lib/openapi/platform/services/WorkflowSchemeDraftsService.js +861 -858
  265. package/lib/openapi/platform/services/WorkflowSchemeDraftsService.js.map +1 -1
  266. package/lib/openapi/platform/services/WorkflowSchemeProjectAssociationsService.d.ts +4 -4
  267. package/lib/openapi/platform/services/WorkflowSchemeProjectAssociationsService.js +98 -95
  268. package/lib/openapi/platform/services/WorkflowSchemeProjectAssociationsService.js.map +1 -1
  269. package/lib/openapi/platform/services/WorkflowSchemesService.d.ts +45 -45
  270. package/lib/openapi/platform/services/WorkflowSchemesService.js +899 -896
  271. package/lib/openapi/platform/services/WorkflowSchemesService.js.map +1 -1
  272. package/lib/openapi/platform/services/WorkflowStatusCategoriesService.d.ts +3 -3
  273. package/lib/openapi/platform/services/WorkflowStatusCategoriesService.js +82 -79
  274. package/lib/openapi/platform/services/WorkflowStatusCategoriesService.js.map +1 -1
  275. package/lib/openapi/platform/services/WorkflowStatusesService.d.ts +3 -3
  276. package/lib/openapi/platform/services/WorkflowStatusesService.js +110 -107
  277. package/lib/openapi/platform/services/WorkflowStatusesService.js.map +1 -1
  278. package/lib/openapi/platform/services/WorkflowTransitionPropertiesService.d.ts +14 -14
  279. package/lib/openapi/platform/services/WorkflowTransitionPropertiesService.js +182 -179
  280. package/lib/openapi/platform/services/WorkflowTransitionPropertiesService.js.map +1 -1
  281. package/lib/openapi/platform/services/WorkflowTransitionRulesService.d.ts +13 -13
  282. package/lib/openapi/platform/services/WorkflowTransitionRulesService.js +283 -280
  283. package/lib/openapi/platform/services/WorkflowTransitionRulesService.js.map +1 -1
  284. package/lib/openapi/platform/services/WorkflowsService.d.ts +33 -33
  285. package/lib/openapi/platform/services/WorkflowsService.js +2451 -2448
  286. package/lib/openapi/platform/services/WorkflowsService.js.map +1 -1
  287. package/lib/openapi/software/services/BacklogService.d.ts +4 -4
  288. package/lib/openapi/software/services/BacklogService.js +81 -78
  289. package/lib/openapi/software/services/BacklogService.js.map +1 -1
  290. package/lib/openapi/software/services/BoardService.d.ts +124 -124
  291. package/lib/openapi/software/services/BoardService.js +2048 -2045
  292. package/lib/openapi/software/services/BoardService.js.map +1 -1
  293. package/lib/openapi/software/services/BuildsService.d.ts +10 -10
  294. package/lib/openapi/software/services/BuildsService.js +164 -161
  295. package/lib/openapi/software/services/BuildsService.js.map +1 -1
  296. package/lib/openapi/software/services/DeploymentsService.d.ts +12 -12
  297. package/lib/openapi/software/services/DeploymentsService.js +192 -189
  298. package/lib/openapi/software/services/DeploymentsService.js.map +1 -1
  299. package/lib/openapi/software/services/DevOpsComponentsService.d.ts +8 -8
  300. package/lib/openapi/software/services/DevOpsComponentsService.js +145 -142
  301. package/lib/openapi/software/services/DevOpsComponentsService.js.map +1 -1
  302. package/lib/openapi/software/services/DevelopmentInformationService.d.ts +16 -16
  303. package/lib/openapi/software/services/DevelopmentInformationService.js +178 -175
  304. package/lib/openapi/software/services/DevelopmentInformationService.js.map +1 -1
  305. package/lib/openapi/software/services/EpicService.d.ts +26 -26
  306. package/lib/openapi/software/services/EpicService.js +597 -594
  307. package/lib/openapi/software/services/EpicService.js.map +1 -1
  308. package/lib/openapi/software/services/FeatureFlagsService.d.ts +10 -10
  309. package/lib/openapi/software/services/FeatureFlagsService.js +151 -148
  310. package/lib/openapi/software/services/FeatureFlagsService.js.map +1 -1
  311. package/lib/openapi/software/services/IssueService.d.ts +13 -13
  312. package/lib/openapi/software/services/IssueService.js +359 -356
  313. package/lib/openapi/software/services/IssueService.js.map +1 -1
  314. package/lib/openapi/software/services/OperationsService.d.ts +24 -24
  315. package/lib/openapi/software/services/OperationsService.js +301 -298
  316. package/lib/openapi/software/services/OperationsService.js.map +1 -1
  317. package/lib/openapi/software/services/RemoteLinksService.d.ts +15 -15
  318. package/lib/openapi/software/services/RemoteLinksService.js +160 -157
  319. package/lib/openapi/software/services/RemoteLinksService.js.map +1 -1
  320. package/lib/openapi/software/services/SecurityInformationService.d.ts +16 -16
  321. package/lib/openapi/software/services/SecurityInformationService.js +262 -259
  322. package/lib/openapi/software/services/SecurityInformationService.js.map +1 -1
  323. package/lib/openapi/software/services/SprintService.d.ts +33 -33
  324. package/lib/openapi/software/services/SprintService.js +594 -591
  325. package/lib/openapi/software/services/SprintService.js.map +1 -1
  326. package/package.json +4 -3
@@ -18,647 +18,650 @@ const validationSchemaStorage_1 = require("../validationSchemaStorage");
18
18
  * @see https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-attachments
19
19
  */
20
20
  class IssueAttachmentsService extends CommonHttpService_1.CommonHttpService {
21
- /**
22
- * Adds one or more attachments to an issue. Attachments are posted as
23
- * multipart/form-data ([RFC 1867](https://www.ietf.org/rfc/rfc1867.txt)).
24
- *
25
- * Note that:
26
- *
27
- * * The request must have a `X-Atlassian-Token: no-check` header, if not it is
28
- * blocked. See [Special headers](#special-request-headers) for more information.
29
- * * The name of the multipart/form-data parameter that contains the attachments
30
- * must be `file`.
31
- *
32
- * The following examples upload a file called *myfile.txt* to the issue
33
- * *TEST-123*:
34
- *
35
- * #### curl ####
36
- *
37
- * curl --location --request POST
38
- * 'https://your-domain.atlassian.net/rest/api/3/issue/TEST-123/attachments'
39
- * -u 'email@example.com:<api_token>'
40
- * -H 'X-Atlassian-Token: no-check'
41
- * --form 'file=@"myfile.txt"'
42
- *
43
- * #### Node.js ####
44
- *
45
- * // This code sample uses the 'node-fetch' and 'form-data' libraries:
46
- * // https://www.npmjs.com/package/node-fetch
47
- * // https://www.npmjs.com/package/form-data
48
- * const fetch = require('node-fetch');
49
- * const FormData = require('form-data');
50
- * const fs = require('fs');
51
- *
52
- * const filePath = 'myfile.txt';
53
- * const form = new FormData();
54
- * const stats = fs.statSync(filePath);
55
- * const fileSizeInBytes = stats.size;
56
- * const fileStream = fs.createReadStream(filePath);
57
- *
58
- * form.append('file', fileStream, {knownLength: fileSizeInBytes});
59
- *
60
- * fetch('https://your-domain.atlassian.net/rest/api/3/issue/TEST-123/attachments',
61
- * {
62
- * method: 'POST',
63
- * body: form,
64
- * headers: {
65
- * 'Authorization': `Basic ${Buffer.from(
66
- * 'email@example.com:'
67
- * ).toString('base64')}`,
68
- * 'Accept': 'application/json',
69
- * 'X-Atlassian-Token': 'no-check'
70
- * }
71
- * })
72
- * .then(response => {
73
- * console.log(
74
- * `Response: ${response.status} ${response.statusText}`
75
- * );
76
- * return response.text();
77
- * })
78
- * .then(text => console.log(text))
79
- * .catch(err => console.error(err));
80
- *
81
- * #### Java ####
82
- *
83
- * // This code sample uses the 'Unirest' library:
84
- * // http://unirest.io/java.html
85
- * HttpResponse response =
86
- * Unirest.post("https://your-domain.atlassian.net/rest/api/2/issue/{issueIdOrKey}/attachments")
87
- * .basicAuth("email@example.com", "")
88
- * .header("Accept", "application/json")
89
- * .header("X-Atlassian-Token", "no-check")
90
- * .field("file", new File("myfile.txt"))
91
- * .asJson();
92
- *
93
- * System.out.println(response.getBody());
94
- *
95
- * #### Python ####
96
- *
97
- * # This code sample uses the 'requests' library:
98
- * # http://docs.python-requests.org
99
- * import requests
100
- * from requests.auth import HTTPBasicAuth
101
- * import json
102
- *
103
- * url =
104
- * "https://your-domain.atlassian.net/rest/api/2/issue/{issueIdOrKey}/attachments"
105
- *
106
- * auth = HTTPBasicAuth("email@example.com", "")
107
- *
108
- * headers = {
109
- * "Accept": "application/json",
110
- * "X-Atlassian-Token": "no-check"
111
- * }
112
- *
113
- * response = requests.request(
114
- * "POST",
115
- * url,
116
- * headers = headers,
117
- * auth = auth,
118
- * files = {
119
- * "file": ("myfile.txt", open("myfile.txt","rb"), "application-type")
120
- * }
121
- * )
122
- *
123
- * print(json.dumps(json.loads(response.text), sort_keys=True, indent=4,
124
- * separators=(",", ": ")))
125
- *
126
- * #### PHP ####
127
- *
128
- * // This code sample uses the 'Unirest' library:
129
- * // http://unirest.io/php.html
130
- * Unirest\Request::auth('email@example.com', '');
131
- *
132
- * $headers = array(
133
- * 'Accept' => 'application/json',
134
- * 'X-Atlassian-Token' => 'no-check'
135
- * );
136
- *
137
- * $parameters = array(
138
- * 'file' => File::add('myfile.txt')
139
- * );
140
- *
141
- * $response = Unirest\Request::post(
142
- * 'https://your-domain.atlassian.net/rest/api/2/issue/{issueIdOrKey}/attachments',
143
- * $headers,
144
- * $parameters
145
- * );
146
- *
147
- * var_dump($response)
148
- *
149
- * #### Forge ####
150
- *
151
- * // This sample uses Atlassian Forge and the `form-data` library.
152
- * // https://developer.atlassian.com/platform/forge/
153
- * // https://www.npmjs.com/package/form-data
154
- * import api from "@forge/api";
155
- * import FormData from "form-data";
156
- *
157
- * const form = new FormData();
158
- * form.append('file', fileStream, {knownLength: fileSizeInBytes});
159
- *
160
- * const response = await
161
- * api.asApp().requestJira('/rest/api/2/issue/{issueIdOrKey}/attachments', {
162
- * method: 'POST',
163
- * body: form,
164
- * headers: {
165
- * 'Accept': 'application/json',
166
- * 'X-Atlassian-Token': 'no-check'
167
- * }
168
- * });
169
- *
170
- * console.log(`Response: ${response.status} ${response.statusText}`);
171
- * console.log(await response.json());
172
- *
173
- * Tip: Use a client library. Many client libraries have classes for handling
174
- * multipart POST operations. For example, in Java, the Apache HTTP Components
175
- * library provides a
176
- * [MultiPartEntity](http://hc.apache.org/httpcomponents-client-ga/httpmime/apidocs/org/apache/http/entity/mime/MultipartEntity.html)
177
- * class for multipart POST operations.
178
- *
179
- * This operation can be accessed anonymously.
180
- *
181
- * **[Permissions](#permissions) required:**
182
- *
183
- * * *Browse Projects* and *Create attachments* [ project
184
- * permission](https://confluence.atlassian.com/x/yodKLg) for the project that the
185
- * issue is in.
186
- * * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is
187
- * configured, issue-level security permission to view the issue.
188
- *
189
- * @returns Returned if the request is successful.
190
- *
191
- * example: [
192
- * {
193
- * "author": {
194
- * "accountId": "5b10a2844c20165700ede21g",
195
- * "active": true,
196
- * "avatarUrls": {
197
- * "16x16":
198
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
199
- * "24x24":
200
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
201
- * "32x32":
202
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
203
- * "48x48":
204
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
205
- * },
206
- * "displayName": "Mia Krystof",
207
- * "emailAddress": "mia@example.com",
208
- * "self":
209
- * "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g",
210
- * "timeZone": "Australia/Sydney"
211
- * },
212
- * "content":
213
- * "https://your-domain.atlassian.net/rest/api/3/attachment/content/10000",
214
- * "created": 1651316514000,
215
- * "filename": "picture.jpg",
216
- * "id": "10001",
217
- * "mimeType": "image/jpeg",
218
- * "self": "https://your-domain.atlassian.net/rest/api/3/attachments/10000",
219
- * "size": 23123,
220
- * "thumbnail":
221
- * "https://your-domain.atlassian.net/rest/api/3/attachment/thumbnail/10000"
222
- * },
223
- * {
224
- * "author": {
225
- * "accountId": "5b10a2844c20165700ede21g",
226
- * "active": true,
227
- * "avatarUrls": {
228
- * "16x16":
229
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
230
- * "24x24":
231
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
232
- * "32x32":
233
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
234
- * "48x48":
235
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
236
- * },
237
- * "displayName": "Mia Krystof",
238
- * "emailAddress": "mia@example.com",
239
- * "self":
240
- * "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g",
241
- * "timeZone": "Australia/Sydney"
242
- * },
243
- * "content":
244
- * "https://your-domain.atlassian.net/rest/api/3/attachment/content/10001",
245
- * "created": 1658898511000,
246
- * "filename": "dbeuglog.txt",
247
- * "mimeType": "text/plain",
248
- * "self": "https://your-domain.atlassian.net/rest/api/3/attachments/10001",
249
- * "size": 2460
250
- * }
251
- * ]
252
- * @path {POST} /rest/api/3/issue/{issueIdOrKey}/attachments
253
- * @scopes-current write:jira-work
254
- * @scopes-beta read:user:jira, write:attachment:jira, read:attachment:jira, read:avatar:jira
255
- * @see https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-attachments#api-rest-api-3-issue-issueidorkey-attachments-post
256
- */
257
- addAttachment({ issueIdOrKey, requestBody, }) {
258
- return this.getClientInstance()
259
- .request({
260
- path: "/rest/api/3/issue/{issueIdOrKey}/attachments",
261
- method: "POST",
262
- pathParams: {
263
- issueIdOrKey,
264
- },
265
- headers: {
266
- "X-Atlassian-Token": "nocheck",
267
- "Content-Type": "multipart/form-data",
268
- },
269
- body: requestBody,
270
- })
271
- .then(this.getClientInstance().responseHandler({
272
- 200: {
273
- "application/json": "json",
274
- },
275
- }))
276
- .then(commonHttpClient.castResponse())
277
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("IssueAttachmentsService.addAttachment.response"))
278
- .then(commonHttpClient.getBody);
279
- }
280
- /**
281
- * Returns the metadata for the contents of an attachment, if it is an archive,
282
- * and metadata for the attachment itself. For example, if the attachment is a ZIP
283
- * archive, then information about the files in the archive is returned and
284
- * metadata for the ZIP archive. Currently, only the ZIP archive format is
285
- * supported.
286
- *
287
- * Use this operation to retrieve data that is presented to the user, as this
288
- * operation returns the metadata for the attachment itself, such as the
289
- * attachment's ID and name. Otherwise, use [ Get contents metadata for an
290
- * expanded attachment](#api-rest-api-3-attachment-id-expand-raw-get), which only
291
- * returns the metadata for the attachment's contents.
292
- *
293
- * This operation can be accessed anonymously.
294
- *
295
- * **[Permissions](#permissions) required:** For the issue containing the
296
- * attachment:
297
- *
298
- * * *Browse projects* [project
299
- * permission](https://confluence.atlassian.com/x/yodKLg) for the project that the
300
- * issue is in.
301
- * * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is
302
- * configured, issue-level security permission to view the issue.
303
- *
304
- * @returns Returned if the request is successful. If an empty list is returned in the
305
- * response, the attachment is empty, corrupt, or not an archive.
306
- *
307
- * example: {
308
- * "entries": [
309
- * {
310
- * "index": 0,
311
- * "label": "MG00N067.JPG",
312
- * "mediaType": "image/jpeg",
313
- * "path": "MG00N067.JPG",
314
- * "size": "119 kB"
315
- * },
316
- * {
317
- * "index": 1,
318
- * "label": "Allegro from Duet in C Major.mp3",
319
- * "mediaType": "audio/mpeg",
320
- * "path": "Allegro from Duet in C Major.mp3",
321
- * "size": "1.36 MB"
322
- * },
323
- * {
324
- * "index": 2,
325
- * "label": "long/path/thanks/to/.../reach/the/leaf.txt",
326
- * "mediaType": "text/plain",
327
- * "path":
328
- * "long/path/thanks/to/lots/of/subdirectories/inside/making/it/quite/hard/to/reach/the/leaf.txt",
329
- * "size": "0.0 k"
330
- * }
331
- * ],
332
- * "id": 7237823,
333
- * "mediaType": "application/zip",
334
- * "name": "images.zip",
335
- * "totalEntryCount": 39
336
- * }
337
- * @path {GET} /rest/api/3/attachment/{id}/expand/human
338
- * @scopes-current read:jira-work
339
- * @scopes-beta read:attachment:jira
340
- * @see https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-attachments#api-rest-api-3-attachment-id-expand-human-get
341
- */
342
- expandAttachmentForHumans({ id, }) {
343
- return this.getClientInstance()
344
- .request({
345
- path: "/rest/api/3/attachment/{id}/expand/human",
346
- method: "GET",
347
- pathParams: {
348
- id,
349
- },
350
- })
351
- .then(this.getClientInstance().responseHandler({
352
- 200: {
353
- "application/json": "json",
354
- },
355
- }))
356
- .then(commonHttpClient.castResponse())
357
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("IssueAttachmentsService.expandAttachmentForHumans.response"))
358
- .then(commonHttpClient.getBody);
359
- }
360
- /**
361
- * Returns the metadata for the contents of an attachment, if it is an archive.
362
- * For example, if the attachment is a ZIP archive, then information about the
363
- * files in the archive is returned. Currently, only the ZIP archive format is
364
- * supported.
365
- *
366
- * Use this operation if you are processing the data without presenting it to the
367
- * user, as this operation only returns the metadata for the contents of the
368
- * attachment. Otherwise, to retrieve data to present to the user, use [ Get all
369
- * metadata for an expanded
370
- * attachment](#api-rest-api-3-attachment-id-expand-human-get) which also returns
371
- * the metadata for the attachment itself, such as the attachment's ID and name.
372
- *
373
- * This operation can be accessed anonymously.
374
- *
375
- * **[Permissions](#permissions) required:** For the issue containing the
376
- * attachment:
377
- *
378
- * * *Browse projects* [project
379
- * permission](https://confluence.atlassian.com/x/yodKLg) for the project that the
380
- * issue is in.
381
- * * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is
382
- * configured, issue-level security permission to view the issue.
383
- *
384
- * @returns Returned if the request is successful. If an empty list is returned in the
385
- * response, the attachment is empty, corrupt, or not an archive.
386
- *
387
- * example: {
388
- * "entries": [
389
- * {
390
- * "entryIndex": 0,
391
- * "mediaType": "audio/mpeg",
392
- * "name": "Allegro from Duet in C Major.mp3",
393
- * "size": 1430174
394
- * },
395
- * {
396
- * "entryIndex": 1,
397
- * "mediaType": "text/rtf",
398
- * "name": "lrm.rtf",
399
- * "size": 331
400
- * }
401
- * ],
402
- * "totalEntryCount": 24
403
- * }
404
- * @path {GET} /rest/api/3/attachment/{id}/expand/raw
405
- * @scopes-current read:jira-work
406
- * @scopes-beta read:attachment:jira
407
- * @see https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-attachments#api-rest-api-3-attachment-id-expand-raw-get
408
- */
409
- expandAttachmentForMachines({ id, }) {
410
- return this.getClientInstance()
411
- .request({
412
- path: "/rest/api/3/attachment/{id}/expand/raw",
413
- method: "GET",
414
- pathParams: {
415
- id,
416
- },
417
- })
418
- .then(this.getClientInstance().responseHandler({
419
- 200: {
420
- "application/json": "json",
421
- },
422
- }))
423
- .then(commonHttpClient.castResponse())
424
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("IssueAttachmentsService.expandAttachmentForMachines.response"))
425
- .then(commonHttpClient.getBody);
426
- }
427
- /**
428
- * Returns the metadata for an attachment. Note that the attachment itself is not
429
- * returned.
430
- *
431
- * This operation can be accessed anonymously.
432
- *
433
- * **[Permissions](#permissions) required:**
434
- *
435
- * * *Browse projects* [project
436
- * permission](https://confluence.atlassian.com/x/yodKLg) for the project that the
437
- * issue is in.
438
- * * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is
439
- * configured, issue-level security permission to view the issue.
440
- *
441
- * @returns Returned if the request is successful.
442
- *
443
- * example: {
444
- * "author": {
445
- * "accountId": "5b10a2844c20165700ede21g",
446
- * "accountType": "atlassian",
447
- * "active": false,
448
- * "avatarUrls": {
449
- * "16x16":
450
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
451
- * "24x24":
452
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
453
- * "32x32":
454
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
455
- * "48x48":
456
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
457
- * },
458
- * "displayName": "Mia Krystof",
459
- * "key": "",
460
- * "name": "",
461
- * "self":
462
- * "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
463
- * },
464
- * "content":
465
- * "https://your-domain.atlassian.net/jira/rest/api/3/attachment/content/10000",
466
- * "created": "2022-10-06T07:32:47.000+0000",
467
- * "filename": "picture.jpg",
468
- * "id": 10000,
469
- * "mimeType": "image/jpeg",
470
- * "self": "https://your-domain.atlassian.net/rest/api/3/attachments/10000",
471
- * "size": 23123,
472
- * "thumbnail":
473
- * "https://your-domain.atlassian.net/jira/rest/api/3/attachment/thumbnail/10000"
474
- * }
475
- * @path {GET} /rest/api/3/attachment/{id}
476
- * @scopes-current read:jira-work
477
- * @scopes-beta read:attachment:jira, read:user:jira, read:application-role:jira,
478
- * read:avatar:jira, read:group:jira
479
- * @see https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-attachments#api-rest-api-3-attachment-id-get
480
- */
481
- getAttachment({ id, }) {
482
- return this.getClientInstance()
483
- .request({
484
- path: "/rest/api/3/attachment/{id}",
485
- method: "GET",
486
- pathParams: {
487
- id,
488
- },
489
- })
490
- .then(this.getClientInstance().responseHandler({
491
- 200: {
492
- "application/json": "json",
493
- },
494
- }))
495
- .then(commonHttpClient.castResponse())
496
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("IssueAttachmentsService.getAttachment.response"))
497
- .then(commonHttpClient.getBody);
498
- }
499
- /**
500
- * Returns the contents of an attachment. A `Range` header can be set to define a
501
- * range of bytes within the attachment to download. See the [HTTP Range header
502
- * standard](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Range) for
503
- * details.
504
- *
505
- * To return a thumbnail of the attachment, use [Get attachment
506
- * thumbnail](#api-rest-api-3-attachment-thumbnail-id-get).
507
- *
508
- * This operation can be accessed anonymously.
509
- *
510
- * **[Permissions](#permissions) required:** For the issue containing the
511
- * attachment:
512
- *
513
- * * *Browse projects* [project
514
- * permission](https://confluence.atlassian.com/x/yodKLg) for the project that the
515
- * issue is in.
516
- * * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is
517
- * configured, issue-level security permission to view the issue.
518
- *
519
- * @returns Returned if the request is successful when `redirect` is set to `false`.
520
- * @path {GET} /rest/api/3/attachment/content/{id}
521
- * @scopes-current read:jira-work
522
- * @scopes-beta read:attachment:jira
523
- * @see https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-attachments#api-rest-api-3-attachment-content-id-get
524
- */
525
- getAttachmentContent({ id, redirect, }) {
526
- return this.getClientInstance()
527
- .request({
528
- path: "/rest/api/3/attachment/content/{id}",
529
- method: "GET",
530
- pathParams: {
531
- id,
532
- },
533
- query: {
534
- redirect,
535
- },
536
- })
537
- .then(this.getClientInstance().responseHandler({
538
- 200: {
539
- "application/json": "json",
540
- },
541
- 206: {},
542
- }))
543
- .then(commonHttpClient.castResponse())
544
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("IssueAttachmentsService.getAttachmentContent.response"))
545
- .then(commonHttpClient.getBody);
546
- }
547
- /**
548
- * Returns the attachment settings, that is, whether attachments are enabled and
549
- * the maximum attachment size allowed.
550
- *
551
- * Note that there are also [project
552
- * permissions](https://confluence.atlassian.com/x/yodKLg) that restrict whether
553
- * users can create and delete attachments.
554
- *
555
- * This operation can be accessed anonymously.
556
- *
557
- * **[Permissions](#permissions) required:** None.
558
- *
559
- * @returns Returned if the request is successful.
560
- *
561
- * example: {
562
- * "enabled": true,
563
- * "uploadLimit": 1000000
564
- * }
565
- * @path {GET} /rest/api/3/attachment/meta
566
- * @scopes-current read:jira-work
567
- * @scopes-beta read:instance-configuration:jira
568
- * @see https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-attachments#api-rest-api-3-attachment-meta-get
569
- */
570
- getAttachmentMeta() {
571
- return this.getClientInstance()
572
- .request({
573
- path: "/rest/api/3/attachment/meta",
574
- method: "GET",
575
- })
576
- .then(this.getClientInstance().responseHandler({
577
- 200: {
578
- "application/json": "json",
579
- },
580
- }))
581
- .then(commonHttpClient.castResponse())
582
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("IssueAttachmentsService.getAttachmentMeta.response"))
583
- .then(commonHttpClient.getBody);
584
- }
585
- /**
586
- * Returns the thumbnail of an attachment.
587
- *
588
- * To return the attachment contents, use [Get attachment
589
- * content](#api-rest-api-3-attachment-content-id-get).
590
- *
591
- * This operation can be accessed anonymously.
592
- *
593
- * **[Permissions](#permissions) required:** For the issue containing the
594
- * attachment:
595
- *
596
- * * *Browse projects* [project
597
- * permission](https://confluence.atlassian.com/x/yodKLg) for the project that the
598
- * issue is in.
599
- * * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is
600
- * configured, issue-level security permission to view the issue.
601
- *
602
- * @returns Returned if the request is successful when `redirect` is set to `false`.
603
- * @path {GET} /rest/api/3/attachment/thumbnail/{id}
604
- * @scopes-current read:jira-work
605
- * @scopes-beta read:attachment:jira
606
- * @see https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-attachments#api-rest-api-3-attachment-thumbnail-id-get
607
- */
608
- getAttachmentThumbnail({ id, redirect, fallbackToDefault, width, height, }) {
609
- return this.getClientInstance()
610
- .request({
611
- path: "/rest/api/3/attachment/thumbnail/{id}",
612
- method: "GET",
613
- pathParams: {
614
- id,
615
- },
616
- query: {
617
- redirect,
618
- fallbackToDefault,
619
- width,
620
- height,
621
- },
622
- })
623
- .then(this.getClientInstance().responseHandler({
624
- 200: {
625
- "application/json": "json",
626
- },
627
- }))
628
- .then(commonHttpClient.castResponse())
629
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("IssueAttachmentsService.getAttachmentThumbnail.response"))
630
- .then(commonHttpClient.getBody);
631
- }
632
- /**
633
- * Deletes an attachment from an issue.
634
- *
635
- * This operation can be accessed anonymously.
636
- *
637
- * **[Permissions](#permissions) required:** For the project holding the issue
638
- * containing the attachment:
639
- *
640
- * * *Delete own attachments* [project
641
- * permission](https://confluence.atlassian.com/x/yodKLg) to delete an attachment
642
- * created by the calling user.
643
- * * *Delete all attachments* [project
644
- * permission](https://confluence.atlassian.com/x/yodKLg) to delete an attachment
645
- * created by any user.
646
- *
647
- * @path {DELETE} /rest/api/3/attachment/{id}
648
- * @scopes-current write:jira-work
649
- * @scopes-beta delete:attachment:jira
650
- * @see https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-attachments#api-rest-api-3-attachment-id-delete
651
- */
652
- removeAttachment({ id, }) {
653
- return this.getClientInstance()
654
- .request({
655
- path: "/rest/api/3/attachment/{id}",
656
- method: "DELETE",
657
- pathParams: {
658
- id,
659
- },
660
- })
661
- .then(commonHttpClient.discardResult);
21
+ constructor() {
22
+ super(...arguments);
23
+ /**
24
+ * Adds one or more attachments to an issue. Attachments are posted as
25
+ * multipart/form-data ([RFC 1867](https://www.ietf.org/rfc/rfc1867.txt)).
26
+ *
27
+ * Note that:
28
+ *
29
+ * * The request must have a `X-Atlassian-Token: no-check` header, if not it is
30
+ * blocked. See [Special headers](#special-request-headers) for more information.
31
+ * * The name of the multipart/form-data parameter that contains the attachments
32
+ * must be `file`.
33
+ *
34
+ * The following examples upload a file called *myfile.txt* to the issue
35
+ * *TEST-123*:
36
+ *
37
+ * #### curl ####
38
+ *
39
+ * curl --location --request POST
40
+ * 'https://your-domain.atlassian.net/rest/api/3/issue/TEST-123/attachments'
41
+ * -u 'email@example.com:<api_token>'
42
+ * -H 'X-Atlassian-Token: no-check'
43
+ * --form 'file=@"myfile.txt"'
44
+ *
45
+ * #### Node.js ####
46
+ *
47
+ * // This code sample uses the 'node-fetch' and 'form-data' libraries:
48
+ * // https://www.npmjs.com/package/node-fetch
49
+ * // https://www.npmjs.com/package/form-data
50
+ * const fetch = require('node-fetch');
51
+ * const FormData = require('form-data');
52
+ * const fs = require('fs');
53
+ *
54
+ * const filePath = 'myfile.txt';
55
+ * const form = new FormData();
56
+ * const stats = fs.statSync(filePath);
57
+ * const fileSizeInBytes = stats.size;
58
+ * const fileStream = fs.createReadStream(filePath);
59
+ *
60
+ * form.append('file', fileStream, {knownLength: fileSizeInBytes});
61
+ *
62
+ * fetch('https://your-domain.atlassian.net/rest/api/3/issue/TEST-123/attachments',
63
+ * {
64
+ * method: 'POST',
65
+ * body: form,
66
+ * headers: {
67
+ * 'Authorization': `Basic ${Buffer.from(
68
+ * 'email@example.com:'
69
+ * ).toString('base64')}`,
70
+ * 'Accept': 'application/json',
71
+ * 'X-Atlassian-Token': 'no-check'
72
+ * }
73
+ * })
74
+ * .then(response => {
75
+ * console.log(
76
+ * `Response: ${response.status} ${response.statusText}`
77
+ * );
78
+ * return response.text();
79
+ * })
80
+ * .then(text => console.log(text))
81
+ * .catch(err => console.error(err));
82
+ *
83
+ * #### Java ####
84
+ *
85
+ * // This code sample uses the 'Unirest' library:
86
+ * // http://unirest.io/java.html
87
+ * HttpResponse response =
88
+ * Unirest.post("https://your-domain.atlassian.net/rest/api/2/issue/{issueIdOrKey}/attachments")
89
+ * .basicAuth("email@example.com", "")
90
+ * .header("Accept", "application/json")
91
+ * .header("X-Atlassian-Token", "no-check")
92
+ * .field("file", new File("myfile.txt"))
93
+ * .asJson();
94
+ *
95
+ * System.out.println(response.getBody());
96
+ *
97
+ * #### Python ####
98
+ *
99
+ * # This code sample uses the 'requests' library:
100
+ * # http://docs.python-requests.org
101
+ * import requests
102
+ * from requests.auth import HTTPBasicAuth
103
+ * import json
104
+ *
105
+ * url =
106
+ * "https://your-domain.atlassian.net/rest/api/2/issue/{issueIdOrKey}/attachments"
107
+ *
108
+ * auth = HTTPBasicAuth("email@example.com", "")
109
+ *
110
+ * headers = {
111
+ * "Accept": "application/json",
112
+ * "X-Atlassian-Token": "no-check"
113
+ * }
114
+ *
115
+ * response = requests.request(
116
+ * "POST",
117
+ * url,
118
+ * headers = headers,
119
+ * auth = auth,
120
+ * files = {
121
+ * "file": ("myfile.txt", open("myfile.txt","rb"), "application-type")
122
+ * }
123
+ * )
124
+ *
125
+ * print(json.dumps(json.loads(response.text), sort_keys=True, indent=4,
126
+ * separators=(",", ": ")))
127
+ *
128
+ * #### PHP ####
129
+ *
130
+ * // This code sample uses the 'Unirest' library:
131
+ * // http://unirest.io/php.html
132
+ * Unirest\Request::auth('email@example.com', '');
133
+ *
134
+ * $headers = array(
135
+ * 'Accept' => 'application/json',
136
+ * 'X-Atlassian-Token' => 'no-check'
137
+ * );
138
+ *
139
+ * $parameters = array(
140
+ * 'file' => File::add('myfile.txt')
141
+ * );
142
+ *
143
+ * $response = Unirest\Request::post(
144
+ * 'https://your-domain.atlassian.net/rest/api/2/issue/{issueIdOrKey}/attachments',
145
+ * $headers,
146
+ * $parameters
147
+ * );
148
+ *
149
+ * var_dump($response)
150
+ *
151
+ * #### Forge ####
152
+ *
153
+ * // This sample uses Atlassian Forge and the `form-data` library.
154
+ * // https://developer.atlassian.com/platform/forge/
155
+ * // https://www.npmjs.com/package/form-data
156
+ * import api from "@forge/api";
157
+ * import FormData from "form-data";
158
+ *
159
+ * const form = new FormData();
160
+ * form.append('file', fileStream, {knownLength: fileSizeInBytes});
161
+ *
162
+ * const response = await
163
+ * api.asApp().requestJira('/rest/api/2/issue/{issueIdOrKey}/attachments', {
164
+ * method: 'POST',
165
+ * body: form,
166
+ * headers: {
167
+ * 'Accept': 'application/json',
168
+ * 'X-Atlassian-Token': 'no-check'
169
+ * }
170
+ * });
171
+ *
172
+ * console.log(`Response: ${response.status} ${response.statusText}`);
173
+ * console.log(await response.json());
174
+ *
175
+ * Tip: Use a client library. Many client libraries have classes for handling
176
+ * multipart POST operations. For example, in Java, the Apache HTTP Components
177
+ * library provides a
178
+ * [MultiPartEntity](http://hc.apache.org/httpcomponents-client-ga/httpmime/apidocs/org/apache/http/entity/mime/MultipartEntity.html)
179
+ * class for multipart POST operations.
180
+ *
181
+ * This operation can be accessed anonymously.
182
+ *
183
+ * **[Permissions](#permissions) required:**
184
+ *
185
+ * * *Browse Projects* and *Create attachments* [ project
186
+ * permission](https://confluence.atlassian.com/x/yodKLg) for the project that the
187
+ * issue is in.
188
+ * * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is
189
+ * configured, issue-level security permission to view the issue.
190
+ *
191
+ * @returns Returned if the request is successful.
192
+ *
193
+ * example: [
194
+ * {
195
+ * "author": {
196
+ * "accountId": "5b10a2844c20165700ede21g",
197
+ * "active": true,
198
+ * "avatarUrls": {
199
+ * "16x16":
200
+ * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
201
+ * "24x24":
202
+ * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
203
+ * "32x32":
204
+ * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
205
+ * "48x48":
206
+ * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
207
+ * },
208
+ * "displayName": "Mia Krystof",
209
+ * "emailAddress": "mia@example.com",
210
+ * "self":
211
+ * "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g",
212
+ * "timeZone": "Australia/Sydney"
213
+ * },
214
+ * "content":
215
+ * "https://your-domain.atlassian.net/rest/api/3/attachment/content/10000",
216
+ * "created": 1651316514000,
217
+ * "filename": "picture.jpg",
218
+ * "id": "10001",
219
+ * "mimeType": "image/jpeg",
220
+ * "self": "https://your-domain.atlassian.net/rest/api/3/attachments/10000",
221
+ * "size": 23123,
222
+ * "thumbnail":
223
+ * "https://your-domain.atlassian.net/rest/api/3/attachment/thumbnail/10000"
224
+ * },
225
+ * {
226
+ * "author": {
227
+ * "accountId": "5b10a2844c20165700ede21g",
228
+ * "active": true,
229
+ * "avatarUrls": {
230
+ * "16x16":
231
+ * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
232
+ * "24x24":
233
+ * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
234
+ * "32x32":
235
+ * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
236
+ * "48x48":
237
+ * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
238
+ * },
239
+ * "displayName": "Mia Krystof",
240
+ * "emailAddress": "mia@example.com",
241
+ * "self":
242
+ * "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g",
243
+ * "timeZone": "Australia/Sydney"
244
+ * },
245
+ * "content":
246
+ * "https://your-domain.atlassian.net/rest/api/3/attachment/content/10001",
247
+ * "created": 1658898511000,
248
+ * "filename": "dbeuglog.txt",
249
+ * "mimeType": "text/plain",
250
+ * "self": "https://your-domain.atlassian.net/rest/api/3/attachments/10001",
251
+ * "size": 2460
252
+ * }
253
+ * ]
254
+ * @path {POST} /rest/api/3/issue/{issueIdOrKey}/attachments
255
+ * @scopes-current write:jira-work
256
+ * @scopes-beta read:user:jira, write:attachment:jira, read:attachment:jira, read:avatar:jira
257
+ * @see https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-attachments#api-rest-api-3-issue-issueidorkey-attachments-post
258
+ */
259
+ this.addAttachment = ({ issueIdOrKey, requestBody, }) => {
260
+ return this.getClientInstance()
261
+ .request({
262
+ path: "/rest/api/3/issue/{issueIdOrKey}/attachments",
263
+ method: "POST",
264
+ pathParams: {
265
+ issueIdOrKey,
266
+ },
267
+ headers: {
268
+ "X-Atlassian-Token": "nocheck",
269
+ "Content-Type": "multipart/form-data",
270
+ },
271
+ body: requestBody,
272
+ })
273
+ .then(this.getClientInstance().responseHandler({
274
+ 200: {
275
+ "application/json": "json",
276
+ },
277
+ }))
278
+ .then(commonHttpClient.castResponse())
279
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("IssueAttachmentsService.addAttachment.response"))
280
+ .then(commonHttpClient.getBody);
281
+ };
282
+ /**
283
+ * Returns the metadata for the contents of an attachment, if it is an archive,
284
+ * and metadata for the attachment itself. For example, if the attachment is a ZIP
285
+ * archive, then information about the files in the archive is returned and
286
+ * metadata for the ZIP archive. Currently, only the ZIP archive format is
287
+ * supported.
288
+ *
289
+ * Use this operation to retrieve data that is presented to the user, as this
290
+ * operation returns the metadata for the attachment itself, such as the
291
+ * attachment's ID and name. Otherwise, use [ Get contents metadata for an
292
+ * expanded attachment](#api-rest-api-3-attachment-id-expand-raw-get), which only
293
+ * returns the metadata for the attachment's contents.
294
+ *
295
+ * This operation can be accessed anonymously.
296
+ *
297
+ * **[Permissions](#permissions) required:** For the issue containing the
298
+ * attachment:
299
+ *
300
+ * * *Browse projects* [project
301
+ * permission](https://confluence.atlassian.com/x/yodKLg) for the project that the
302
+ * issue is in.
303
+ * * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is
304
+ * configured, issue-level security permission to view the issue.
305
+ *
306
+ * @returns Returned if the request is successful. If an empty list is returned in the
307
+ * response, the attachment is empty, corrupt, or not an archive.
308
+ *
309
+ * example: {
310
+ * "entries": [
311
+ * {
312
+ * "index": 0,
313
+ * "label": "MG00N067.JPG",
314
+ * "mediaType": "image/jpeg",
315
+ * "path": "MG00N067.JPG",
316
+ * "size": "119 kB"
317
+ * },
318
+ * {
319
+ * "index": 1,
320
+ * "label": "Allegro from Duet in C Major.mp3",
321
+ * "mediaType": "audio/mpeg",
322
+ * "path": "Allegro from Duet in C Major.mp3",
323
+ * "size": "1.36 MB"
324
+ * },
325
+ * {
326
+ * "index": 2,
327
+ * "label": "long/path/thanks/to/.../reach/the/leaf.txt",
328
+ * "mediaType": "text/plain",
329
+ * "path":
330
+ * "long/path/thanks/to/lots/of/subdirectories/inside/making/it/quite/hard/to/reach/the/leaf.txt",
331
+ * "size": "0.0 k"
332
+ * }
333
+ * ],
334
+ * "id": 7237823,
335
+ * "mediaType": "application/zip",
336
+ * "name": "images.zip",
337
+ * "totalEntryCount": 39
338
+ * }
339
+ * @path {GET} /rest/api/3/attachment/{id}/expand/human
340
+ * @scopes-current read:jira-work
341
+ * @scopes-beta read:attachment:jira
342
+ * @see https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-attachments#api-rest-api-3-attachment-id-expand-human-get
343
+ */
344
+ this.expandAttachmentForHumans = ({ id, }) => {
345
+ return this.getClientInstance()
346
+ .request({
347
+ path: "/rest/api/3/attachment/{id}/expand/human",
348
+ method: "GET",
349
+ pathParams: {
350
+ id,
351
+ },
352
+ })
353
+ .then(this.getClientInstance().responseHandler({
354
+ 200: {
355
+ "application/json": "json",
356
+ },
357
+ }))
358
+ .then(commonHttpClient.castResponse())
359
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("IssueAttachmentsService.expandAttachmentForHumans.response"))
360
+ .then(commonHttpClient.getBody);
361
+ };
362
+ /**
363
+ * Returns the metadata for the contents of an attachment, if it is an archive.
364
+ * For example, if the attachment is a ZIP archive, then information about the
365
+ * files in the archive is returned. Currently, only the ZIP archive format is
366
+ * supported.
367
+ *
368
+ * Use this operation if you are processing the data without presenting it to the
369
+ * user, as this operation only returns the metadata for the contents of the
370
+ * attachment. Otherwise, to retrieve data to present to the user, use [ Get all
371
+ * metadata for an expanded
372
+ * attachment](#api-rest-api-3-attachment-id-expand-human-get) which also returns
373
+ * the metadata for the attachment itself, such as the attachment's ID and name.
374
+ *
375
+ * This operation can be accessed anonymously.
376
+ *
377
+ * **[Permissions](#permissions) required:** For the issue containing the
378
+ * attachment:
379
+ *
380
+ * * *Browse projects* [project
381
+ * permission](https://confluence.atlassian.com/x/yodKLg) for the project that the
382
+ * issue is in.
383
+ * * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is
384
+ * configured, issue-level security permission to view the issue.
385
+ *
386
+ * @returns Returned if the request is successful. If an empty list is returned in the
387
+ * response, the attachment is empty, corrupt, or not an archive.
388
+ *
389
+ * example: {
390
+ * "entries": [
391
+ * {
392
+ * "entryIndex": 0,
393
+ * "mediaType": "audio/mpeg",
394
+ * "name": "Allegro from Duet in C Major.mp3",
395
+ * "size": 1430174
396
+ * },
397
+ * {
398
+ * "entryIndex": 1,
399
+ * "mediaType": "text/rtf",
400
+ * "name": "lrm.rtf",
401
+ * "size": 331
402
+ * }
403
+ * ],
404
+ * "totalEntryCount": 24
405
+ * }
406
+ * @path {GET} /rest/api/3/attachment/{id}/expand/raw
407
+ * @scopes-current read:jira-work
408
+ * @scopes-beta read:attachment:jira
409
+ * @see https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-attachments#api-rest-api-3-attachment-id-expand-raw-get
410
+ */
411
+ this.expandAttachmentForMachines = ({ id, }) => {
412
+ return this.getClientInstance()
413
+ .request({
414
+ path: "/rest/api/3/attachment/{id}/expand/raw",
415
+ method: "GET",
416
+ pathParams: {
417
+ id,
418
+ },
419
+ })
420
+ .then(this.getClientInstance().responseHandler({
421
+ 200: {
422
+ "application/json": "json",
423
+ },
424
+ }))
425
+ .then(commonHttpClient.castResponse())
426
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("IssueAttachmentsService.expandAttachmentForMachines.response"))
427
+ .then(commonHttpClient.getBody);
428
+ };
429
+ /**
430
+ * Returns the metadata for an attachment. Note that the attachment itself is not
431
+ * returned.
432
+ *
433
+ * This operation can be accessed anonymously.
434
+ *
435
+ * **[Permissions](#permissions) required:**
436
+ *
437
+ * * *Browse projects* [project
438
+ * permission](https://confluence.atlassian.com/x/yodKLg) for the project that the
439
+ * issue is in.
440
+ * * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is
441
+ * configured, issue-level security permission to view the issue.
442
+ *
443
+ * @returns Returned if the request is successful.
444
+ *
445
+ * example: {
446
+ * "author": {
447
+ * "accountId": "5b10a2844c20165700ede21g",
448
+ * "accountType": "atlassian",
449
+ * "active": false,
450
+ * "avatarUrls": {
451
+ * "16x16":
452
+ * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
453
+ * "24x24":
454
+ * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
455
+ * "32x32":
456
+ * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
457
+ * "48x48":
458
+ * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
459
+ * },
460
+ * "displayName": "Mia Krystof",
461
+ * "key": "",
462
+ * "name": "",
463
+ * "self":
464
+ * "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
465
+ * },
466
+ * "content":
467
+ * "https://your-domain.atlassian.net/jira/rest/api/3/attachment/content/10000",
468
+ * "created": "2022-10-06T07:32:47.000+0000",
469
+ * "filename": "picture.jpg",
470
+ * "id": 10000,
471
+ * "mimeType": "image/jpeg",
472
+ * "self": "https://your-domain.atlassian.net/rest/api/3/attachments/10000",
473
+ * "size": 23123,
474
+ * "thumbnail":
475
+ * "https://your-domain.atlassian.net/jira/rest/api/3/attachment/thumbnail/10000"
476
+ * }
477
+ * @path {GET} /rest/api/3/attachment/{id}
478
+ * @scopes-current read:jira-work
479
+ * @scopes-beta read:attachment:jira, read:user:jira, read:application-role:jira,
480
+ * read:avatar:jira, read:group:jira
481
+ * @see https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-attachments#api-rest-api-3-attachment-id-get
482
+ */
483
+ this.getAttachment = ({ id, }) => {
484
+ return this.getClientInstance()
485
+ .request({
486
+ path: "/rest/api/3/attachment/{id}",
487
+ method: "GET",
488
+ pathParams: {
489
+ id,
490
+ },
491
+ })
492
+ .then(this.getClientInstance().responseHandler({
493
+ 200: {
494
+ "application/json": "json",
495
+ },
496
+ }))
497
+ .then(commonHttpClient.castResponse())
498
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("IssueAttachmentsService.getAttachment.response"))
499
+ .then(commonHttpClient.getBody);
500
+ };
501
+ /**
502
+ * Returns the contents of an attachment. A `Range` header can be set to define a
503
+ * range of bytes within the attachment to download. See the [HTTP Range header
504
+ * standard](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Range) for
505
+ * details.
506
+ *
507
+ * To return a thumbnail of the attachment, use [Get attachment
508
+ * thumbnail](#api-rest-api-3-attachment-thumbnail-id-get).
509
+ *
510
+ * This operation can be accessed anonymously.
511
+ *
512
+ * **[Permissions](#permissions) required:** For the issue containing the
513
+ * attachment:
514
+ *
515
+ * * *Browse projects* [project
516
+ * permission](https://confluence.atlassian.com/x/yodKLg) for the project that the
517
+ * issue is in.
518
+ * * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is
519
+ * configured, issue-level security permission to view the issue.
520
+ *
521
+ * @returns Returned if the request is successful when `redirect` is set to `false`.
522
+ * @path {GET} /rest/api/3/attachment/content/{id}
523
+ * @scopes-current read:jira-work
524
+ * @scopes-beta read:attachment:jira
525
+ * @see https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-attachments#api-rest-api-3-attachment-content-id-get
526
+ */
527
+ this.getAttachmentContent = ({ id, redirect, }) => {
528
+ return this.getClientInstance()
529
+ .request({
530
+ path: "/rest/api/3/attachment/content/{id}",
531
+ method: "GET",
532
+ pathParams: {
533
+ id,
534
+ },
535
+ query: {
536
+ redirect,
537
+ },
538
+ })
539
+ .then(this.getClientInstance().responseHandler({
540
+ 200: {
541
+ "application/json": "json",
542
+ },
543
+ 206: {},
544
+ }))
545
+ .then(commonHttpClient.castResponse())
546
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("IssueAttachmentsService.getAttachmentContent.response"))
547
+ .then(commonHttpClient.getBody);
548
+ };
549
+ /**
550
+ * Returns the attachment settings, that is, whether attachments are enabled and
551
+ * the maximum attachment size allowed.
552
+ *
553
+ * Note that there are also [project
554
+ * permissions](https://confluence.atlassian.com/x/yodKLg) that restrict whether
555
+ * users can create and delete attachments.
556
+ *
557
+ * This operation can be accessed anonymously.
558
+ *
559
+ * **[Permissions](#permissions) required:** None.
560
+ *
561
+ * @returns Returned if the request is successful.
562
+ *
563
+ * example: {
564
+ * "enabled": true,
565
+ * "uploadLimit": 1000000
566
+ * }
567
+ * @path {GET} /rest/api/3/attachment/meta
568
+ * @scopes-current read:jira-work
569
+ * @scopes-beta read:instance-configuration:jira
570
+ * @see https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-attachments#api-rest-api-3-attachment-meta-get
571
+ */
572
+ this.getAttachmentMeta = () => {
573
+ return this.getClientInstance()
574
+ .request({
575
+ path: "/rest/api/3/attachment/meta",
576
+ method: "GET",
577
+ })
578
+ .then(this.getClientInstance().responseHandler({
579
+ 200: {
580
+ "application/json": "json",
581
+ },
582
+ }))
583
+ .then(commonHttpClient.castResponse())
584
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("IssueAttachmentsService.getAttachmentMeta.response"))
585
+ .then(commonHttpClient.getBody);
586
+ };
587
+ /**
588
+ * Returns the thumbnail of an attachment.
589
+ *
590
+ * To return the attachment contents, use [Get attachment
591
+ * content](#api-rest-api-3-attachment-content-id-get).
592
+ *
593
+ * This operation can be accessed anonymously.
594
+ *
595
+ * **[Permissions](#permissions) required:** For the issue containing the
596
+ * attachment:
597
+ *
598
+ * * *Browse projects* [project
599
+ * permission](https://confluence.atlassian.com/x/yodKLg) for the project that the
600
+ * issue is in.
601
+ * * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is
602
+ * configured, issue-level security permission to view the issue.
603
+ *
604
+ * @returns Returned if the request is successful when `redirect` is set to `false`.
605
+ * @path {GET} /rest/api/3/attachment/thumbnail/{id}
606
+ * @scopes-current read:jira-work
607
+ * @scopes-beta read:attachment:jira
608
+ * @see https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-attachments#api-rest-api-3-attachment-thumbnail-id-get
609
+ */
610
+ this.getAttachmentThumbnail = ({ id, redirect, fallbackToDefault, width, height, }) => {
611
+ return this.getClientInstance()
612
+ .request({
613
+ path: "/rest/api/3/attachment/thumbnail/{id}",
614
+ method: "GET",
615
+ pathParams: {
616
+ id,
617
+ },
618
+ query: {
619
+ redirect,
620
+ fallbackToDefault,
621
+ width,
622
+ height,
623
+ },
624
+ })
625
+ .then(this.getClientInstance().responseHandler({
626
+ 200: {
627
+ "application/json": "json",
628
+ },
629
+ }))
630
+ .then(commonHttpClient.castResponse())
631
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("IssueAttachmentsService.getAttachmentThumbnail.response"))
632
+ .then(commonHttpClient.getBody);
633
+ };
634
+ /**
635
+ * Deletes an attachment from an issue.
636
+ *
637
+ * This operation can be accessed anonymously.
638
+ *
639
+ * **[Permissions](#permissions) required:** For the project holding the issue
640
+ * containing the attachment:
641
+ *
642
+ * * *Delete own attachments* [project
643
+ * permission](https://confluence.atlassian.com/x/yodKLg) to delete an attachment
644
+ * created by the calling user.
645
+ * * *Delete all attachments* [project
646
+ * permission](https://confluence.atlassian.com/x/yodKLg) to delete an attachment
647
+ * created by any user.
648
+ *
649
+ * @path {DELETE} /rest/api/3/attachment/{id}
650
+ * @scopes-current write:jira-work
651
+ * @scopes-beta delete:attachment:jira
652
+ * @see https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-attachments#api-rest-api-3-attachment-id-delete
653
+ */
654
+ this.removeAttachment = ({ id, }) => {
655
+ return this.getClientInstance()
656
+ .request({
657
+ path: "/rest/api/3/attachment/{id}",
658
+ method: "DELETE",
659
+ pathParams: {
660
+ id,
661
+ },
662
+ })
663
+ .then(commonHttpClient.discardResult);
664
+ };
662
665
  }
663
666
  static initialize() {
664
667
  validationSchemaStorage_1.validationSchemaStorage.registerExtensible("IssueAttachmentsService.getAttachment.response", zod_1.z