@thestarware/atlascli-jira 1.2.4 → 1.2.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 (484) hide show
  1. package/README.md +24 -108
  2. package/lib/commands/announcement-banner/get.js +13 -1
  3. package/lib/commands/announcement-banner/update.js +30 -1
  4. package/lib/commands/application-role/get-all.js +22 -2
  5. package/lib/commands/application-role/get.js +19 -1
  6. package/lib/commands/application-role/update.js +23 -1
  7. package/lib/commands/attachment/add.js +33 -1
  8. package/lib/commands/attachment/delete.js +16 -1
  9. package/lib/commands/attachment/get-content.js +18 -1
  10. package/lib/commands/attachment/get-jira-settings.js +14 -1
  11. package/lib/commands/attachment/get-metadata-for-zip.js +36 -1
  12. package/lib/commands/attachment/get-metadata.js +30 -1
  13. package/lib/commands/attachment/get-thumbnails.js +17 -1
  14. package/lib/commands/audit-record/get-associated.js +81 -1
  15. package/lib/commands/audit-record/get-changed.js +62 -1
  16. package/lib/commands/avatar/delete-universal-avatar.js +15 -1
  17. package/lib/commands/avatar/delete-user-avatar.js +21 -1
  18. package/lib/commands/avatar/get-all-user-avatars.js +22 -0
  19. package/lib/commands/avatar/get-image-by-id.js +17 -1
  20. package/lib/commands/avatar/get-image-by-owner.js +17 -1
  21. package/lib/commands/avatar/get-image-by-type.js +17 -1
  22. package/lib/commands/avatar/get-system-avatars.js +19 -1
  23. package/lib/commands/avatar/get-universal-avatars.js +16 -1
  24. package/lib/commands/avatar/set-user-avatar.js +21 -1
  25. package/lib/commands/avatar/upload-universal-avatar.js +32 -1
  26. package/lib/commands/avatar/upload-user-avatar.js +25 -1
  27. package/lib/commands/comment/add.js +25 -1
  28. package/lib/commands/comment/delete.js +14 -1
  29. package/lib/commands/comment/get-for-issue.js +32 -1
  30. package/lib/commands/comment/get-with-ids.js +31 -1
  31. package/lib/commands/comment/get.js +22 -1
  32. package/lib/commands/comment/update.js +26 -1
  33. package/lib/commands/comment-property/delete-property.js +14 -1
  34. package/lib/commands/comment-property/get-property-keys.js +15 -1
  35. package/lib/commands/comment-property/get-property.js +15 -1
  36. package/lib/commands/comment-property/set-property.js +14 -1
  37. package/lib/commands/config/add.js +119 -1
  38. package/lib/commands/config/delete.js +32 -1
  39. package/lib/commands/config/get-default.js +18 -1
  40. package/lib/commands/config/list.js +22 -1
  41. package/lib/commands/config/set-default.js +31 -1
  42. package/lib/commands/dashboard/add-edit-permission.js +43 -1
  43. package/lib/commands/dashboard/add-share-permission.js +24 -1
  44. package/lib/commands/dashboard/copy.js +16 -1
  45. package/lib/commands/dashboard/create.js +15 -1
  46. package/lib/commands/dashboard/delete.js +13 -1
  47. package/lib/commands/dashboard/get-all.js +26 -1
  48. package/lib/commands/dashboard/get-permissions.js +20 -1
  49. package/lib/commands/dashboard/get.js +30 -1
  50. package/lib/commands/dashboard/search.js +35 -1
  51. package/lib/commands/dashboard/update.js +16 -1
  52. package/lib/commands/dashboard-gadget/add.js +19 -1
  53. package/lib/commands/dashboard-gadget/get-availables.js +20 -1
  54. package/lib/commands/dashboard-gadget/remove.js +13 -1
  55. package/lib/commands/dashboard-gadget/search.js +16 -1
  56. package/lib/commands/dashboard-gadget/update.js +18 -1
  57. package/lib/commands/dashboard-item-property/delete.js +15 -1
  58. package/lib/commands/dashboard-item-property/get-keys.js +15 -1
  59. package/lib/commands/dashboard-item-property/get.js +15 -1
  60. package/lib/commands/dashboard-item-property/set.js +29 -1
  61. package/lib/commands/filter/add-favourite.js +18 -1
  62. package/lib/commands/filter/change-owner.js +24 -1
  63. package/lib/commands/filter/create.js +30 -1
  64. package/lib/commands/filter/delete.js +18 -1
  65. package/lib/commands/filter/get-columns.js +20 -1
  66. package/lib/commands/filter/get-details.js +25 -1
  67. package/lib/commands/filter/get-favourites.js +18 -1
  68. package/lib/commands/filter/get-my.js +19 -1
  69. package/lib/commands/filter/get.js +40 -1
  70. package/lib/commands/filter/remove-favourite.js +18 -1
  71. package/lib/commands/filter/reset-columns.js +18 -1
  72. package/lib/commands/filter/search.js +50 -1
  73. package/lib/commands/filter/set-columns.js +18 -1
  74. package/lib/commands/filter/update.js +34 -1
  75. package/lib/commands/filter-sharing/add-edit-permission.js +106 -1
  76. package/lib/commands/filter-sharing/add-share-permission.js +84 -1
  77. package/lib/commands/filter-sharing/delete-permission.js +21 -1
  78. package/lib/commands/filter-sharing/get-default-scope.js +12 -1
  79. package/lib/commands/filter-sharing/get-edit-permissions.js +21 -1
  80. package/lib/commands/filter-sharing/get-permission.js +24 -1
  81. package/lib/commands/filter-sharing/get-share-permissions.js +52 -1
  82. package/lib/commands/filter-sharing/set-default-scope.js +21 -1
  83. package/lib/commands/group/add-user.js +40 -1
  84. package/lib/commands/group/create.js +28 -1
  85. package/lib/commands/group/find-groups.js +19 -1
  86. package/lib/commands/group/get-all.js +24 -1
  87. package/lib/commands/group/get-users.js +32 -1
  88. package/lib/commands/group/get.js +58 -1
  89. package/lib/commands/group/remove-user.js +45 -1
  90. package/lib/commands/group/remove.js +45 -1
  91. package/lib/commands/group-and-user-picker/find-groups.js +62 -1
  92. package/lib/commands/group-and-user-picker/find-users.js +91 -1
  93. package/lib/commands/issue/archive.js +22 -1
  94. package/lib/commands/issue/assign.js +29 -1
  95. package/lib/commands/issue/create.js +306 -1
  96. package/lib/commands/issue/delete.js +20 -1
  97. package/lib/commands/issue/edit.js +49 -1
  98. package/lib/commands/issue/get-changelogs.js +42 -1
  99. package/lib/commands/issue/get-create-metadata.js +83 -1
  100. package/lib/commands/issue/get-edit-metadata.js +46 -1
  101. package/lib/commands/issue/get-events.js +13 -1
  102. package/lib/commands/issue/get-transitions.js +38 -1
  103. package/lib/commands/issue/get.js +52 -1
  104. package/lib/commands/issue/restore.js +15 -1
  105. package/lib/commands/issue/send-notifications.js +49 -1
  106. package/lib/commands/issue/transition.js +61 -1
  107. package/lib/commands/issue-field/create.js +18 -1
  108. package/lib/commands/issue-field/delete.js +31 -1
  109. package/lib/commands/issue-field/get-all.js +18 -1
  110. package/lib/commands/issue-field/move-trash.js +18 -1
  111. package/lib/commands/issue-field/restore-trash.js +18 -1
  112. package/lib/commands/issue-field/search-trash.js +23 -1
  113. package/lib/commands/issue-field/search.js +24 -1
  114. package/lib/commands/issue-field/update.js +18 -1
  115. package/lib/commands/issue-field-configuration/assign-issue-type.js +25 -1
  116. package/lib/commands/issue-field-configuration/assign-scheme-to-project.js +24 -1
  117. package/lib/commands/issue-field-configuration/create-scheme.js +22 -1
  118. package/lib/commands/issue-field-configuration/create.js +22 -1
  119. package/lib/commands/issue-field-configuration/delete-scheme.js +18 -1
  120. package/lib/commands/issue-field-configuration/delete.js +18 -1
  121. package/lib/commands/issue-field-configuration/get-all-issue-type-items.js +23 -1
  122. package/lib/commands/issue-field-configuration/get-all-schemes.js +24 -1
  123. package/lib/commands/issue-field-configuration/get-all.js +27 -1
  124. package/lib/commands/issue-field-configuration/get-items.js +24 -1
  125. package/lib/commands/issue-field-configuration/get-project-schemes.js +42 -1
  126. package/lib/commands/issue-field-configuration/remove-issue-types.js +23 -1
  127. package/lib/commands/issue-field-configuration/update-items.js +29 -1
  128. package/lib/commands/issue-field-configuration/update-scheme.js +23 -1
  129. package/lib/commands/issue-field-configuration/update.js +25 -1
  130. package/lib/commands/issue-field-context/add-issue-types.js +26 -1
  131. package/lib/commands/issue-field-context/assign-to-projects.js +30 -1
  132. package/lib/commands/issue-field-context/create.js +38 -1
  133. package/lib/commands/issue-field-context/delete.js +20 -1
  134. package/lib/commands/issue-field-context/get-all.js +27 -1
  135. package/lib/commands/issue-field-context/get-contexts-for-projects-and-issue-types.js +26 -1
  136. package/lib/commands/issue-field-context/get-default-values.js +29 -1
  137. package/lib/commands/issue-field-context/get-issue-types.js +27 -1
  138. package/lib/commands/issue-field-context/get-project-mappings.js +37 -1
  139. package/lib/commands/issue-field-context/remove-from-projects.js +31 -1
  140. package/lib/commands/issue-field-context/remove-issue-types.js +26 -1
  141. package/lib/commands/issue-field-context/set-default-values.js +31 -1
  142. package/lib/commands/issue-field-context/update.js +28 -1
  143. package/lib/commands/issue-field-option/create-for-context.js +26 -1
  144. package/lib/commands/issue-field-option/delete-for-context.js +22 -1
  145. package/lib/commands/issue-field-option/get-for-context.js +25 -1
  146. package/lib/commands/issue-field-option/get.js +34 -1
  147. package/lib/commands/issue-field-option/reorder-for-context.js +25 -1
  148. package/lib/commands/issue-field-option/update-for-context.js +26 -1
  149. package/lib/commands/issue-link/create.js +89 -1
  150. package/lib/commands/issue-link/delete.js +26 -1
  151. package/lib/commands/issue-link/get.js +48 -1
  152. package/lib/commands/issue-link-type/create.js +26 -1
  153. package/lib/commands/issue-link-type/delete.js +14 -1
  154. package/lib/commands/issue-link-type/get-all.js +14 -1
  155. package/lib/commands/issue-link-type/get.js +30 -1
  156. package/lib/commands/issue-link-type/update.js +24 -1
  157. package/lib/commands/issue-navigator-setting/get-columns.js +14 -1
  158. package/lib/commands/issue-navigator-setting/set-columns.js +14 -1
  159. package/lib/commands/issue-priority/create.js +35 -1
  160. package/lib/commands/issue-priority/delete.js +28 -1
  161. package/lib/commands/issue-priority/move.js +27 -1
  162. package/lib/commands/issue-priority/search.js +44 -1
  163. package/lib/commands/issue-priority/set-default.js +20 -1
  164. package/lib/commands/issue-priority/update.js +38 -1
  165. package/lib/commands/issue-property/delete-bulk.js +33 -1
  166. package/lib/commands/issue-property/delete.js +14 -1
  167. package/lib/commands/issue-property/get-keys.js +15 -1
  168. package/lib/commands/issue-property/get.js +21 -1
  169. package/lib/commands/issue-property/set-bulk.js +49 -1
  170. package/lib/commands/issue-property/set-by-issue-bulk.js +47 -1
  171. package/lib/commands/issue-property/set-by-list-bulk.js +34 -1
  172. package/lib/commands/issue-property/set.js +38 -1
  173. package/lib/commands/issue-remote-link/create.js +56 -1
  174. package/lib/commands/issue-remote-link/delete-by-global-id.js +16 -1
  175. package/lib/commands/issue-remote-link/delete.js +15 -1
  176. package/lib/commands/issue-remote-link/get-all.js +27 -1
  177. package/lib/commands/issue-remote-link/get.js +22 -1
  178. package/lib/commands/issue-remote-link/update.js +40 -1
  179. package/lib/commands/issue-resolution/create.js +20 -1
  180. package/lib/commands/issue-resolution/delete.js +28 -1
  181. package/lib/commands/issue-resolution/get-all.js +13 -1
  182. package/lib/commands/issue-resolution/get.js +33 -1
  183. package/lib/commands/issue-resolution/move.js +26 -1
  184. package/lib/commands/issue-resolution/search.js +40 -1
  185. package/lib/commands/issue-resolution/set-default.js +17 -1
  186. package/lib/commands/issue-resolution/update.js +25 -1
  187. package/lib/commands/issue-search/get-picker-suggestions.js +35 -1
  188. package/lib/commands/issue-search/search.js +39 -1
  189. package/lib/commands/issue-search/test-jql.js +29 -1
  190. package/lib/commands/issue-security-level/get-members.js +46 -1
  191. package/lib/commands/issue-security-level/get.js +34 -1
  192. package/lib/commands/issue-security-scheme/get-all.js +14 -1
  193. package/lib/commands/issue-security-scheme/get-levels.js +20 -1
  194. package/lib/commands/issue-security-scheme/get.js +34 -1
  195. package/lib/commands/issue-type/create.js +20 -1
  196. package/lib/commands/issue-type/delete.js +14 -1
  197. package/lib/commands/issue-type/get-all-for-projects.js +17 -1
  198. package/lib/commands/issue-type/get-all.js +14 -1
  199. package/lib/commands/issue-type/get-alternatives.js +15 -1
  200. package/lib/commands/issue-type/get.js +30 -1
  201. package/lib/commands/issue-type/set-avatar.js +14 -1
  202. package/lib/commands/issue-type/update.js +18 -1
  203. package/lib/commands/issue-type/upload-avatar.js +38 -1
  204. package/lib/commands/issue-type-property/delete.js +14 -1
  205. package/lib/commands/issue-type-property/get-keys.js +15 -1
  206. package/lib/commands/issue-type-property/get.js +16 -1
  207. package/lib/commands/issue-type-property/set.js +28 -1
  208. package/lib/commands/issue-type-scheme/add-issue-types.js +23 -1
  209. package/lib/commands/issue-type-scheme/assign-to-project.js +20 -1
  210. package/lib/commands/issue-type-scheme/create.js +20 -1
  211. package/lib/commands/issue-type-scheme/delete.js +14 -1
  212. package/lib/commands/issue-type-scheme/get-for-projects.js +32 -1
  213. package/lib/commands/issue-type-scheme/get-issue-types.js +20 -1
  214. package/lib/commands/issue-type-scheme/get-mappings.js +20 -1
  215. package/lib/commands/issue-type-scheme/get-projects.js +20 -1
  216. package/lib/commands/issue-type-scheme/move-issue-types.js +16 -1
  217. package/lib/commands/issue-type-scheme/remove-all-projects.js +14 -1
  218. package/lib/commands/issue-type-scheme/remove-issue-type.js +13 -1
  219. package/lib/commands/issue-type-scheme/remove-project.js +20 -1
  220. package/lib/commands/issue-type-scheme/search.js +47 -1
  221. package/lib/commands/issue-type-scheme/set-projects.js +20 -1
  222. package/lib/commands/issue-type-scheme/update.js +40 -1
  223. package/lib/commands/issue-type-screen-scheme/add-mappings.js +20 -1
  224. package/lib/commands/issue-type-screen-scheme/assign-to-project.js +16 -1
  225. package/lib/commands/issue-type-screen-scheme/create.js +27 -1
  226. package/lib/commands/issue-type-screen-scheme/delete.js +13 -1
  227. package/lib/commands/issue-type-screen-scheme/get-for-projects.js +32 -1
  228. package/lib/commands/issue-type-screen-scheme/get-items.js +25 -1
  229. package/lib/commands/issue-type-screen-scheme/get-projects.js +20 -1
  230. package/lib/commands/issue-type-screen-scheme/remove-mappings.js +13 -1
  231. package/lib/commands/issue-type-screen-scheme/search.js +27 -1
  232. package/lib/commands/issue-type-screen-scheme/set-default-screen.js +13 -1
  233. package/lib/commands/issue-type-screen-scheme/update.js +13 -1
  234. package/lib/commands/issue-vote/add.js +18 -1
  235. package/lib/commands/issue-vote/delete.js +18 -1
  236. package/lib/commands/issue-vote/get-all.js +27 -1
  237. package/lib/commands/issue-watcher/add.js +25 -1
  238. package/lib/commands/issue-watcher/delete.js +25 -1
  239. package/lib/commands/issue-watcher/get-all.js +27 -1
  240. package/lib/commands/issue-watcher/get-bulk.js +24 -1
  241. package/lib/commands/jira-expression/analyse.js +78 -1
  242. package/lib/commands/jira-expression/evaluate.js +103 -1
  243. package/lib/commands/jira-settings/get-advanced.js +14 -1
  244. package/lib/commands/jira-settings/get-globals.js +14 -1
  245. package/lib/commands/jira-settings/get-properties.js +19 -1
  246. package/lib/commands/jira-settings/set-property.js +15 -1
  247. package/lib/commands/jql/convert-user-identifiers.js +14 -1
  248. package/lib/commands/jql/get-auto-complete-suggestions.js +16 -1
  249. package/lib/commands/jql/get-reference-data.js +39 -1
  250. package/lib/commands/jql/parse.js +22 -1
  251. package/lib/commands/jql/sanitize.js +26 -1
  252. package/lib/commands/label/get-all.js +29 -1
  253. package/lib/commands/license/get.js +13 -1
  254. package/lib/commands/myself/change-password.js +21 -1
  255. package/lib/commands/myself/delete-preference.js +17 -1
  256. package/lib/commands/myself/get-locale.js +13 -1
  257. package/lib/commands/myself/get-preference.js +27 -1
  258. package/lib/commands/myself/get.js +21 -1
  259. package/lib/commands/myself/set-preference.js +37 -1
  260. package/lib/commands/myself/update-user.js +24 -1
  261. package/lib/commands/notification-scheme/add.js +75 -1
  262. package/lib/commands/notification-scheme/create.js +80 -1
  263. package/lib/commands/notification-scheme/delete-notification.js +22 -1
  264. package/lib/commands/notification-scheme/delete.js +18 -1
  265. package/lib/commands/notification-scheme/get-all.js +57 -1
  266. package/lib/commands/notification-scheme/get-projects.js +29 -1
  267. package/lib/commands/notification-scheme/get.js +75 -1
  268. package/lib/commands/notification-scheme/update.js +23 -1
  269. package/lib/commands/permission/check-global-permission.js +53 -1
  270. package/lib/commands/permission/check-issue-permission.js +60 -1
  271. package/lib/commands/permission/check-project-permission.js +65 -1
  272. package/lib/commands/permission/get-all.js +23 -1
  273. package/lib/commands/permission/get-my.js +33 -1
  274. package/lib/commands/permission/get-permitted.js +30 -1
  275. package/lib/commands/permission-scheme/create-grant.js +54 -1
  276. package/lib/commands/permission-scheme/create-scheme.js +21 -1
  277. package/lib/commands/permission-scheme/delete-grant.js +23 -1
  278. package/lib/commands/permission-scheme/delete-scheme.js +18 -1
  279. package/lib/commands/permission-scheme/get-all-grants.js +39 -1
  280. package/lib/commands/permission-scheme/get-all.js +38 -1
  281. package/lib/commands/permission-scheme/get-grant.js +65 -1
  282. package/lib/commands/permission-scheme/get.js +24 -1
  283. package/lib/commands/project/archive.js +15 -1
  284. package/lib/commands/project/create.js +26 -1
  285. package/lib/commands/project/delete.js +15 -1
  286. package/lib/commands/project/get-all-issue-types.js +16 -1
  287. package/lib/commands/project/get-all.js +16 -1
  288. package/lib/commands/project/get-issue-type-hierarchy.js +15 -1
  289. package/lib/commands/project/get-notification-schema.js +16 -1
  290. package/lib/commands/project/get.js +31 -1
  291. package/lib/commands/project/project.js +40 -1
  292. package/lib/commands/project/restore.js +18 -1
  293. package/lib/commands/project/search.js +28 -1
  294. package/lib/commands/project/unarchive.js +18 -1
  295. package/lib/commands/project/update.js +38 -1
  296. package/lib/commands/project-avatar/delete.js +14 -1
  297. package/lib/commands/project-avatar/get-all.js +21 -1
  298. package/lib/commands/project-avatar/set.js +19 -1
  299. package/lib/commands/project-avatar/upload.js +51 -1
  300. package/lib/commands/project-category/create.js +16 -1
  301. package/lib/commands/project-category/delete.js +15 -1
  302. package/lib/commands/project-category/get-all.js +15 -1
  303. package/lib/commands/project-category/get.js +31 -1
  304. package/lib/commands/project-category/update.js +16 -1
  305. package/lib/commands/project-component/create.js +52 -1
  306. package/lib/commands/project-component/delete.js +15 -1
  307. package/lib/commands/project-component/get-all.js +21 -1
  308. package/lib/commands/project-component/get-issues-count.js +19 -1
  309. package/lib/commands/project-component/get.js +31 -1
  310. package/lib/commands/project-component/search.js +20 -1
  311. package/lib/commands/project-component/update.js +19 -1
  312. package/lib/commands/project-email/get-sender.js +17 -1
  313. package/lib/commands/project-email/set-sender.js +16 -1
  314. package/lib/commands/project-feature/get.js +36 -1
  315. package/lib/commands/project-feature/set.js +29 -1
  316. package/lib/commands/project-key-and-name-validation/get-valid-key.js +15 -1
  317. package/lib/commands/project-key-and-name-validation/get-valid-name.js +15 -1
  318. package/lib/commands/project-key-and-name-validation/validate-key.js +21 -1
  319. package/lib/commands/project-permission-scheme/get-issue-security-levels.js +17 -1
  320. package/lib/commands/project-permission-scheme/get-issue-security-scheme-levels.js +12 -1
  321. package/lib/commands/project-permission-scheme/get-issue-security-scheme.js +16 -1
  322. package/lib/commands/project-permission-scheme/get-permissions.js +11 -1
  323. package/lib/commands/project-permission-scheme/get.js +16 -1
  324. package/lib/commands/project-permission-scheme/set.js +16 -1
  325. package/lib/commands/project-property/delete.js +15 -1
  326. package/lib/commands/project-property/get-keys.js +17 -1
  327. package/lib/commands/project-property/get.js +16 -1
  328. package/lib/commands/project-property/set.js +19 -1
  329. package/lib/commands/project-role/create.js +16 -1
  330. package/lib/commands/project-role/delete.js +15 -1
  331. package/lib/commands/project-role/get-all.js +16 -1
  332. package/lib/commands/project-role/get-role.js +34 -1
  333. package/lib/commands/project-role/get-roles-and-details.js +19 -1
  334. package/lib/commands/project-role/get-roles.js +19 -1
  335. package/lib/commands/project-role/get.js +31 -1
  336. package/lib/commands/project-role/project-role.js +15 -1
  337. package/lib/commands/project-role/update-partial.js +24 -1
  338. package/lib/commands/project-role/update.js +15 -1
  339. package/lib/commands/project-role-actor/add-actors.js +42 -1
  340. package/lib/commands/project-role-actor/add-default-actors.js +42 -1
  341. package/lib/commands/project-role-actor/delete-actors.js +35 -1
  342. package/lib/commands/project-role-actor/delete-default-actors.js +30 -1
  343. package/lib/commands/project-role-actor/get.js +35 -1
  344. package/lib/commands/project-role-actor/set-actors.js +37 -1
  345. package/lib/commands/project-type/check-accessible.js +15 -1
  346. package/lib/commands/project-type/get-all.js +14 -1
  347. package/lib/commands/project-type/get-licensed.js +14 -1
  348. package/lib/commands/project-type/get.js +30 -1
  349. package/lib/commands/project-type/update.js +18 -1
  350. package/lib/commands/project-version/create.js +19 -1
  351. package/lib/commands/project-version/delete-and-replace.js +25 -1
  352. package/lib/commands/project-version/get-all.js +16 -1
  353. package/lib/commands/project-version/get-related-issue-count.js +16 -1
  354. package/lib/commands/project-version/get-unresolved-issue-count.js +16 -1
  355. package/lib/commands/project-version/get.js +31 -1
  356. package/lib/commands/project-version/merge.js +15 -2
  357. package/lib/commands/project-version/move.js +15 -1
  358. package/lib/commands/project-version/search.js +19 -1
  359. package/lib/commands/project-version/update.js +16 -1
  360. package/lib/commands/screen/add-field-to-default-screen.js +18 -1
  361. package/lib/commands/screen/create.js +15 -1
  362. package/lib/commands/screen/delete.js +13 -1
  363. package/lib/commands/screen/get-all.js +44 -1
  364. package/lib/commands/screen/get-available-fields.js +19 -1
  365. package/lib/commands/screen/get-field-screens.js +24 -1
  366. package/lib/commands/screen/get-workflows.js +36 -1
  367. package/lib/commands/screen/update.js +16 -1
  368. package/lib/commands/screen-scheme/create.js +25 -1
  369. package/lib/commands/screen-scheme/delete.js +13 -1
  370. package/lib/commands/screen-scheme/get-all.js +30 -1
  371. package/lib/commands/screen-scheme/update.js +31 -1
  372. package/lib/commands/screen-tab/create.js +17 -1
  373. package/lib/commands/screen-tab/delete.js +14 -1
  374. package/lib/commands/screen-tab/get-all.js +17 -1
  375. package/lib/commands/screen-tab/move.js +14 -1
  376. package/lib/commands/screen-tab/update.js +15 -1
  377. package/lib/commands/screen-tab-field/add.js +19 -1
  378. package/lib/commands/screen-tab-field/get-all.js +17 -1
  379. package/lib/commands/screen-tab-field/move.js +16 -1
  380. package/lib/commands/screen-tab-field/remove.js +17 -1
  381. package/lib/commands/server-info/get.js +14 -1
  382. package/lib/commands/server-info/jmx.js +15 -1
  383. package/lib/commands/status/create.js +31 -1
  384. package/lib/commands/status/delete.js +24 -1
  385. package/lib/commands/status/get-usages.js +24 -1
  386. package/lib/commands/status/get.js +53 -1
  387. package/lib/commands/status/search.js +44 -1
  388. package/lib/commands/status/status-command.js +31 -1
  389. package/lib/commands/status/update.js +24 -1
  390. package/lib/commands/task/cancel.js +13 -1
  391. package/lib/commands/task/get.js +29 -1
  392. package/lib/commands/time-tracking/get-all.js +13 -1
  393. package/lib/commands/time-tracking/get-setting.js +13 -1
  394. package/lib/commands/time-tracking/get.js +13 -1
  395. package/lib/commands/time-tracking/select.js +19 -1
  396. package/lib/commands/time-tracking/set.js +31 -1
  397. package/lib/commands/user/add-user-to-application.js +21 -1
  398. package/lib/commands/user/change-password.js +18 -1
  399. package/lib/commands/user/create.js +45 -1
  400. package/lib/commands/user/delete.js +24 -1
  401. package/lib/commands/user/get-all.js +32 -1
  402. package/lib/commands/user/get-default-columns.js +39 -1
  403. package/lib/commands/user/get-email.js +25 -1
  404. package/lib/commands/user/get-user-groups.js +26 -1
  405. package/lib/commands/user/get.js +40 -1
  406. package/lib/commands/user/remove-user-from-application.js +21 -1
  407. package/lib/commands/user/reset-default-columns.js +33 -1
  408. package/lib/commands/user/set-default-columns.js +26 -1
  409. package/lib/commands/user/update.js +30 -1
  410. package/lib/commands/user/user-command.js +22 -1
  411. package/lib/commands/user-property/delete.js +32 -1
  412. package/lib/commands/user-property/get-all-keys.js +32 -1
  413. package/lib/commands/user-property/get-user-property.js +34 -1
  414. package/lib/commands/user-property/set.js +39 -1
  415. package/lib/commands/user-search/accounts-with-query.js +27 -1
  416. package/lib/commands/user-search/assignable-users-bulk.js +21 -1
  417. package/lib/commands/user-search/assignable-users.js +21 -1
  418. package/lib/commands/user-search/find.js +23 -1
  419. package/lib/commands/user-search/with-permission.js +24 -1
  420. package/lib/commands/user-search/with-query.js +27 -1
  421. package/lib/commands/workflow/create.js +36 -1
  422. package/lib/commands/workflow/delete.js +13 -1
  423. package/lib/commands/workflow/get-projects.js +14 -1
  424. package/lib/commands/workflow/get-schemes.js +14 -1
  425. package/lib/commands/workflow/get-statuses-properties.js +26 -1
  426. package/lib/commands/workflow/get-statuses.js +14 -1
  427. package/lib/commands/workflow/get-transitions-rules.js +44 -1
  428. package/lib/commands/workflow/get-transitions.js +21 -1
  429. package/lib/commands/workflow/search.js +66 -1
  430. package/lib/commands/workflow-scheme/create.js +59 -3
  431. package/lib/commands/workflow-scheme/delete-default-workflow.js +15 -1
  432. package/lib/commands/workflow-scheme/delete-issue-types-for-workflow.js +16 -1
  433. package/lib/commands/workflow-scheme/delete-workflow-for-issue-type.js +16 -1
  434. package/lib/commands/workflow-scheme/delete.js +14 -1
  435. package/lib/commands/workflow-scheme/get-all.js +20 -1
  436. package/lib/commands/workflow-scheme/get-default-workflow.js +15 -1
  437. package/lib/commands/workflow-scheme/get-issue-types-for-workflows.js +30 -1
  438. package/lib/commands/workflow-scheme/get-workflow-for-issue-type.js +15 -1
  439. package/lib/commands/workflow-scheme/get.js +31 -1
  440. package/lib/commands/workflow-scheme/set-issue-types-for-workflow.js +21 -1
  441. package/lib/commands/workflow-scheme/set-workflow-for-issue-type.js +27 -1
  442. package/lib/commands/workflow-scheme/update-default-workflow.js +15 -1
  443. package/lib/commands/workflow-scheme/update.js +61 -3
  444. package/lib/commands/workflow-scheme-draft/create.js +15 -1
  445. package/lib/commands/workflow-scheme-draft/delete-default-workflow.js +15 -1
  446. package/lib/commands/workflow-scheme-draft/delete-issue-types-for-workflow.js +16 -1
  447. package/lib/commands/workflow-scheme-draft/delete-workflow-for-issue-type.js +16 -1
  448. package/lib/commands/workflow-scheme-draft/delete.js +14 -1
  449. package/lib/commands/workflow-scheme-draft/get-default-workflow.js +15 -1
  450. package/lib/commands/workflow-scheme-draft/get-issue-types-for-workflows.js +30 -1
  451. package/lib/commands/workflow-scheme-draft/get-workflow-for-issue-type.js +15 -1
  452. package/lib/commands/workflow-scheme-draft/get.js +30 -1
  453. package/lib/commands/workflow-scheme-draft/publish.js +21 -1
  454. package/lib/commands/workflow-scheme-draft/set-issue-types-for-workflow.js +21 -1
  455. package/lib/commands/workflow-scheme-draft/set-workflow-for-issue-type.js +27 -1
  456. package/lib/commands/workflow-scheme-draft/update-default-workflow.js +15 -1
  457. package/lib/commands/workflow-scheme-draft/update.js +61 -3
  458. package/lib/commands/workflow-scheme-project-association/assign.js +18 -1
  459. package/lib/commands/workflow-scheme-project-association/get-all.js +30 -1
  460. package/lib/commands/workflow-status/get-all.js +14 -1
  461. package/lib/commands/workflow-status/get.js +30 -1
  462. package/lib/commands/workflow-status-category/get-all.js +14 -1
  463. package/lib/commands/workflow-status-category/get.js +15 -1
  464. package/lib/commands/workflow-transition-property/create.js +17 -1
  465. package/lib/commands/workflow-transition-property/delete.js +16 -1
  466. package/lib/commands/workflow-transition-property/get.js +20 -1
  467. package/lib/commands/workflow-transition-property/update.js +17 -1
  468. package/lib/commands/worklog/add.js +40 -1
  469. package/lib/commands/worklog/delete.js +21 -1
  470. package/lib/commands/worklog/get-deleted.js +21 -1
  471. package/lib/commands/worklog/get-for-issue.js +28 -1
  472. package/lib/commands/worklog/get-updated.js +17 -1
  473. package/lib/commands/worklog/get-with-ids.js +30 -1
  474. package/lib/commands/worklog/get.js +38 -1
  475. package/lib/commands/worklog/update.js +23 -1
  476. package/lib/commands/worklog-property/delete.js +14 -1
  477. package/lib/commands/worklog-property/get-keys.js +15 -1
  478. package/lib/commands/worklog-property/get.js +15 -1
  479. package/lib/commands/worklog-property/set-property.js +14 -1
  480. package/lib/index.js +5 -1
  481. package/lib/oclif-config.js +8 -0
  482. package/package.json +32 -27
  483. package/lib/commands/avatar/get-all-user-avatar.js +0 -1
  484. package/lib/commands/issue-security-scheme/associate-security-scheme.js +0 -1
@@ -1 +1,81 @@
1
- Object.defineProperty(exports,"__esModule",{value:!0});let core_1=require("@oclif/core"),atlascli_common_1=require("@thestarware/atlascli-common");class GetAssociatedItems extends atlascli_common_1.BaseCommandWithCloudOrServerSite{async runWithCloudSite(e,t){var r=(await this.parse(GetAssociatedItems)).flags,t=await t.auditRecordManager.getAuditRecords(r.offset,r.limit,r.filter,r.from,r.to),t=await this.modifyResponse(t.records);this.display(r,t)}async runWithServerSite(e,t){var r=(await this.parse(GetAssociatedItems)).flags,t=await t.auditRecordManager.getAuditRecords(r.offset,r.limit,r.filter,r.from,r.to),t=await this.modifyResponse(t.records);this.display(r,t)}async modifyResponse(e){let r=[];return void 0!==e&&e.map(t=>(void 0!==t.associatedItems&&(t.associatedItems=t.associatedItems.map(e=>(e.associatedItemId=e.id,delete e.id,e.id=t.id,e.summary=t.summary,e.remoteAddress=t.remoteAddress,e.authorKey=t.authorKey,e.authorAccountId=t.authorAccountId,e.created=t.created,e.category=t.category,e.itemId=t.objectItem.id,e.itemName=t.objectItem.name,e.parentId=e.parentId||"",e.parentName=e.parentName||"",r.push(e),e))),t)),0===r.length&&r.push({name:"",typeName:"",parentId:"",parentName:"",associatedItemId:"",summary:"",remoteAddress:"",authorKey:"",authorAccountId:"",created:"",category:"",itemId:"",itemName:""}),r}}(exports.default=GetAssociatedItems).description="Get details of an item associated with the changed record.",GetAssociatedItems.flags=Object.assign({offset:core_1.Flags.integer({char:"o",description:"The number of records to skip before returning the first result."}),limit:core_1.Flags.integer({char:"l",description:"The maximum number of results to return."}),from:core_1.Flags.string({description:"The date and time on or after which returned audit records must have been created. Example date: 2014-03-19"}),to:core_1.Flags.string({description:"The date and time on or before which returned audit results must have been created.Example date: 2014-03-19"}),projectIds:core_1.Flags.string({description:"List of project ids to look for. Only for server."}),userIds:core_1.Flags.string({description:"List of user ids to look for. Only for server."})},atlascli_common_1.BaseCommandWithCloudOrServerSite.flags);
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const core_1 = require("@oclif/core");
4
+ const atlascli_common_1 = require("@thestarware/atlascli-common");
5
+ class GetAssociatedItems extends atlascli_common_1.BaseCommandWithCloudOrServerSite {
6
+ async runWithCloudSite(site, jira) {
7
+ const { flags } = await this.parse(GetAssociatedItems);
8
+ const res = await jira.auditRecordManager.getAuditRecords(flags.offset, flags.limit, flags.filter, flags.from, flags.to);
9
+ const modifiedResponse = await this.modifyResponse(res.records);
10
+ this.display(flags, modifiedResponse);
11
+ }
12
+ async runWithServerSite(site, jira) {
13
+ const { flags } = await this.parse(GetAssociatedItems);
14
+ const res = await jira.auditRecordManager.getAuditRecords(flags.offset, flags.limit, flags.filter, flags.from, flags.to);
15
+ const modifiedResponse = await this.modifyResponse(res.records);
16
+ this.display(flags, modifiedResponse);
17
+ }
18
+ async modifyResponse(res) {
19
+ const arr = [];
20
+ if (res !== undefined) {
21
+ res.map((record) => {
22
+ if (record.associatedItems !== undefined) {
23
+ record.associatedItems = record.associatedItems.map((val) => {
24
+ val.associatedItemId = val.id;
25
+ delete val.id;
26
+ val.id = record.id;
27
+ val.summary = record.summary;
28
+ val.remoteAddress = record.remoteAddress;
29
+ val.authorKey = record.authorKey;
30
+ val.authorAccountId = record.authorAccountId;
31
+ val.created = record.created;
32
+ val.category = record.category;
33
+ val.itemId = record.objectItem.id;
34
+ val.itemName = record.objectItem.name;
35
+ val.parentId = val.parentId || '';
36
+ val.parentName = val.parentName || '';
37
+ arr.push(val);
38
+ return val;
39
+ });
40
+ }
41
+ return record;
42
+ });
43
+ }
44
+ if (arr.length === 0) {
45
+ const obj = {
46
+ name: '',
47
+ typeName: '',
48
+ parentId: '',
49
+ parentName: '',
50
+ associatedItemId: '',
51
+ summary: '',
52
+ remoteAddress: '',
53
+ authorKey: '',
54
+ authorAccountId: '',
55
+ created: '',
56
+ category: '',
57
+ itemId: '',
58
+ itemName: '',
59
+ };
60
+ arr.push(obj);
61
+ }
62
+ return arr;
63
+ }
64
+ }
65
+ exports.default = GetAssociatedItems;
66
+ GetAssociatedItems.description = 'Get details of an item associated with the changed record.';
67
+ GetAssociatedItems.flags = Object.assign({ offset: core_1.Flags.integer({
68
+ char: 'o',
69
+ description: 'The number of records to skip before returning the first result.',
70
+ }), limit: core_1.Flags.integer({
71
+ char: 'l',
72
+ description: 'The maximum number of results to return.',
73
+ }), from: core_1.Flags.string({
74
+ description: 'The date and time on or after which returned audit records must have been created. Example date: 2014-03-19',
75
+ }), to: core_1.Flags.string({
76
+ description: 'The date and time on or before which returned audit results must have been created.Example date: 2014-03-19',
77
+ }), projectIds: core_1.Flags.string({
78
+ description: 'List of project ids to look for. Only for server.',
79
+ }), userIds: core_1.Flags.string({
80
+ description: 'List of user ids to look for. Only for server.',
81
+ }) }, atlascli_common_1.BaseCommandWithCloudOrServerSite.flags);
@@ -1 +1,62 @@
1
- Object.defineProperty(exports,"__esModule",{value:!0});let core_1=require("@oclif/core"),atlascli_common_1=require("@thestarware/atlascli-common");class GetAuditRecord extends atlascli_common_1.BaseCommandWithCloudOrServerSite{async runWithCloudSite(e,t){var r=(await this.parse(GetAuditRecord)).flags,t=await t.auditRecordManager.getAuditRecords(r.offset,r.limit,r.filter,r.from,r.to),t=await this.modifyResponse(t.records,e);this.display(r,t)}async runWithServerSite(e,t){var r=(await this.parse(GetAuditRecord)).flags,t=await t.auditRecordManager.getAuditRecords(r.offset,r.limit,r.filter,r.from,r.to),t=await this.modifyResponse(t.records,e);this.display(r,t)}async modifyResponse(e,o){let a=[];return void 0!==e&&e.map(r=>(void 0!==r.changedValues&&(r.changedValues=r.changedValues.map((e,t)=>(e.id=r.id,e.summary=r.summary,e.remoteAddress=r.remoteAddress,e.authorKey=r.authorKey,o.cloud&&(e.authorAccountId=r.authorAccountId),e.created=r.created,e.category=r.category,e.itemId=r.objectItem.id,e.itemName=r.objectItem.name,e.changedFrom=r.changedValues[t].changedFrom||"",e.changedTo=r.changedValues[t].changedTo,a.push(e),e))),r)),a}}(exports.default=GetAuditRecord).description="Get the list of values changed in the record event.",GetAuditRecord.flags=Object.assign({offset:core_1.Flags.integer({char:"o",description:"The number of records to skip before returning the first result."}),limit:core_1.Flags.integer({char:"l",description:"The maximum number of results to return."}),from:core_1.Flags.string({description:"The date and time on or after which returned audit records must have been created. Example date: 2014-03-19"}),to:core_1.Flags.string({description:"The date and time on or before which returned audit results must have been created. Example date: 2014-03-19"}),projectIds:core_1.Flags.string({description:"List of project ids to look for. Only for server."}),userIds:core_1.Flags.string({description:"List of user ids to look for. Only for server."})},atlascli_common_1.BaseCommandWithCloudOrServerSite.flags);
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const core_1 = require("@oclif/core");
4
+ const atlascli_common_1 = require("@thestarware/atlascli-common");
5
+ class GetAuditRecord extends atlascli_common_1.BaseCommandWithCloudOrServerSite {
6
+ async runWithCloudSite(site, jira) {
7
+ const { flags } = await this.parse(GetAuditRecord);
8
+ const res = await jira.auditRecordManager.getAuditRecords(flags.offset, flags.limit, flags.filter, flags.from, flags.to);
9
+ const modifiedResponse = await this.modifyResponse(res.records, site);
10
+ this.display(flags, modifiedResponse);
11
+ }
12
+ async runWithServerSite(site, jira) {
13
+ const { flags } = await this.parse(GetAuditRecord);
14
+ const res = await jira.auditRecordManager.getAuditRecords(flags.offset, flags.limit, flags.filter, flags.from, flags.to);
15
+ const modifiedResponse = await this.modifyResponse(res.records, site);
16
+ this.display(flags, modifiedResponse);
17
+ }
18
+ async modifyResponse(res, site) {
19
+ const arr = [];
20
+ if (res !== undefined) {
21
+ res.map((record) => {
22
+ if (record.changedValues !== undefined) {
23
+ record.changedValues = record.changedValues.map((val, index) => {
24
+ val.id = record.id;
25
+ val.summary = record.summary;
26
+ val.remoteAddress = record.remoteAddress;
27
+ val.authorKey = record.authorKey;
28
+ if (site.cloud)
29
+ val.authorAccountId = record.authorAccountId;
30
+ val.created = record.created;
31
+ val.category = record.category;
32
+ val.itemId = record.objectItem.id;
33
+ val.itemName = record.objectItem.name;
34
+ val.changedFrom = record.changedValues[index].changedFrom || '';
35
+ val.changedTo = record.changedValues[index].changedTo;
36
+ arr.push(val);
37
+ return val;
38
+ });
39
+ }
40
+ return record;
41
+ });
42
+ }
43
+ return arr;
44
+ }
45
+ }
46
+ exports.default = GetAuditRecord;
47
+ GetAuditRecord.description = 'Get the list of values changed in the record event.';
48
+ GetAuditRecord.flags = Object.assign({ offset: core_1.Flags.integer({
49
+ char: 'o',
50
+ description: 'The number of records to skip before returning the first result.',
51
+ }), limit: core_1.Flags.integer({
52
+ char: 'l',
53
+ description: 'The maximum number of results to return.',
54
+ }), from: core_1.Flags.string({
55
+ description: 'The date and time on or after which returned audit records must have been created. Example date: 2014-03-19',
56
+ }), to: core_1.Flags.string({
57
+ description: 'The date and time on or before which returned audit results must have been created. Example date: 2014-03-19',
58
+ }), projectIds: core_1.Flags.string({
59
+ description: 'List of project ids to look for. Only for server.',
60
+ }), userIds: core_1.Flags.string({
61
+ description: 'List of user ids to look for. Only for server.',
62
+ }) }, atlascli_common_1.BaseCommandWithCloudOrServerSite.flags);
@@ -1 +1,15 @@
1
- Object.defineProperty(exports,"__esModule",{value:!0});let atlascli_common_1=require("@thestarware/atlascli-common"),core_1=require("@oclif/core"),get_system_avatars_1=require("./get-system-avatars");class DeleteUniversalAvatar extends atlascli_common_1.CommandWithSite{async runWithSite(e){var a=(await this.parse(DeleteUniversalAvatar)).flags;await this.getJira(e,a).avatarManager.deleteUniversalAvatar(a.type,a.entityId,a.avatarId)}}(exports.default=DeleteUniversalAvatar).description="Deletes the system and custom avatars for a project or issue type.",DeleteUniversalAvatar.flags=Object.assign(Object.assign({type:get_system_avatars_1.UniversalAvatarFlag,entityId:core_1.Flags.string({required:!0,description:"The ID of the item the avatar is associated with."}),avatarId:core_1.Flags.string({required:!0,description:"The ID of the avatar."})},(0,atlascli_common_1.getCropInfoFlags)()),atlascli_common_1.CommandWithSite.flags);
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const atlascli_common_1 = require("@thestarware/atlascli-common");
4
+ const core_1 = require("@oclif/core");
5
+ const get_system_avatars_1 = require("./get-system-avatars");
6
+ class GetUniversalAvatar extends atlascli_common_1.CommandWithSite {
7
+ async runWithSite(site) {
8
+ const { flags } = await this.parse(GetUniversalAvatar);
9
+ const jira = this.getJira(site, flags);
10
+ await jira.avatarManager.deleteUniversalAvatar(flags.type, flags.entityId, flags.avatarId);
11
+ }
12
+ }
13
+ exports.default = GetUniversalAvatar;
14
+ GetUniversalAvatar.description = 'Returns the system and custom avatars for a project or issue type.';
15
+ GetUniversalAvatar.flags = Object.assign(Object.assign({ type: get_system_avatars_1.UniversalAvatarFlag, entityId: core_1.Flags.string({ required: true, description: 'The ID of the item the avatar is associated with.' }), avatarId: core_1.Flags.string({ required: true, description: 'The ID of the avatar.' }) }, (0, atlascli_common_1.getCropInfoFlags)()), atlascli_common_1.CommandWithSite.flags);
@@ -1 +1,21 @@
1
- Object.defineProperty(exports,"__esModule",{value:!0});let tslib_1=require("tslib"),atlascli_common_1=require("@thestarware/atlascli-common"),core_1=require("@oclif/core"),base_command_with_cloud_or_server_site_1=tslib_1.__importDefault(require("@thestarware/atlascli-common/lib/commands/base-command-with-cloud-or-server-site")),user_util_1=require("@thestarware/atlascli-common/lib/user-util");class DeleteUserAvatar extends base_command_with_cloud_or_server_site_1.default{async runWithServerSite(e,a){var r=(await this.parse(DeleteUserAvatar)).flags,t=await(0,user_util_1.getUser)(a,r.user);r.username=t.username,await a.avatarManager.deleteUserAvatar(r.username,r.avatarId)}async runWithCloudSite(e,a){throw new Error("User avatars are not applicable to cloud!")}}(exports.default=DeleteUserAvatar).description="Deletes a custom avatar from a user. Note that system avatars cannot be deleted.",DeleteUserAvatar.flags=Object.assign({user:core_1.Flags.string({char:"u",required:!0,description:"The username or email."}),avatarId:core_1.Flags.string({required:!0,description:"The ID of the avatar."})},atlascli_common_1.CommandWithSite.flags);
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const atlascli_common_1 = require("@thestarware/atlascli-common");
5
+ const core_1 = require("@oclif/core");
6
+ const base_command_with_cloud_or_server_site_1 = tslib_1.__importDefault(require("@thestarware/atlascli-common/lib/commands/base-command-with-cloud-or-server-site"));
7
+ const user_util_1 = require("@thestarware/atlascli-common/lib/user-util");
8
+ class DeleteUserAvatar extends base_command_with_cloud_or_server_site_1.default {
9
+ async runWithServerSite(site, jira) {
10
+ const { flags } = await this.parse(DeleteUserAvatar);
11
+ const normalizedUserQuery = await (0, user_util_1.getUser)(jira, flags.user);
12
+ flags.username = normalizedUserQuery.username;
13
+ await jira.avatarManager.deleteUserAvatar(flags.username, flags.avatarId);
14
+ }
15
+ async runWithCloudSite(_site, _jira) {
16
+ throw new Error('User avatars are not applicable to cloud!');
17
+ }
18
+ }
19
+ exports.default = DeleteUserAvatar;
20
+ DeleteUserAvatar.description = 'Deletes a custom avatar from a user. Note that system avatars cannot be deleted.';
21
+ DeleteUserAvatar.flags = Object.assign({ user: core_1.Flags.string({ char: 'u', required: true, description: 'The username or email.' }), avatarId: core_1.Flags.string({ required: true, description: 'The ID of the avatar.' }) }, atlascli_common_1.CommandWithSite.flags);
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const atlascli_common_1 = require("@thestarware/atlascli-common");
5
+ const base_command_with_cloud_or_server_site_1 = tslib_1.__importDefault(require("@thestarware/atlascli-common/lib/commands/base-command-with-cloud-or-server-site"));
6
+ const core_1 = require("@oclif/core");
7
+ const user_util_1 = require("@thestarware/atlascli-common/lib/user-util");
8
+ class GetAllUserAvatars extends base_command_with_cloud_or_server_site_1.default {
9
+ async runWithServerSite(site, jira) {
10
+ const { flags } = await this.parse(GetAllUserAvatars);
11
+ const normalizedUserQuery = await (0, user_util_1.getUser)(jira, flags.user);
12
+ flags.username = normalizedUserQuery.username;
13
+ const result = await jira.avatarManager.getAllUserAvatars(flags.username);
14
+ this.display(flags, [...result.system, ...result.custom]);
15
+ }
16
+ async runWithCloudSite(_site, _jira) {
17
+ throw new Error('User avatars are not available for cloud!');
18
+ }
19
+ }
20
+ exports.default = GetAllUserAvatars;
21
+ GetAllUserAvatars.description = 'Returns all user avatars for specified user.';
22
+ GetAllUserAvatars.flags = Object.assign({ user: core_1.Flags.string({ char: 'u', required: true, description: 'The username or email.' }) }, atlascli_common_1.CommandWithSite.flags);
@@ -1 +1,17 @@
1
- Object.defineProperty(exports,"__esModule",{value:!0});let tslib_1=require("tslib"),core_1=require("@oclif/core"),avatar_utils_1=require("@thestarware/atlascli-common/lib/avatar-utils"),get_image_by_type_1=tslib_1.__importDefault(require("./get-image-by-type"));class GetAvatarImageById extends get_image_by_type_1.default{async runWithCloudSite(e,a){var t=(await this.parse(GetAvatarImageById)).flags,r=this.removeFlagsFromBase(t),{type:i,fileName:s,id:l}=r,r=tslib_1.__rest(r,["type","fileName","id"]),a=await a.avatarManager.getAvatarImageByOwner(i,l,r);(0,avatar_utils_1.downloadAvatar)(s+("."+t.format),a)}}(exports.default=GetAvatarImageById).description="Downloads a project or issue type avatar image by ID .",GetAvatarImageById.flags=Object.assign({id:core_1.Flags.string({char:"i",description:"The ID of the avatar.",required:!0})},get_image_by_type_1.default.flags);
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const core_1 = require("@oclif/core");
5
+ const avatar_utils_1 = require("@thestarware/atlascli-common/lib/avatar-utils");
6
+ const get_image_by_type_1 = tslib_1.__importDefault(require("./get-image-by-type"));
7
+ class GetAvatarImageById extends get_image_by_type_1.default {
8
+ async runWithCloudSite(site, jira) {
9
+ const { flags } = await this.parse(GetAvatarImageById);
10
+ const _a = this.removeFlagsFromBase(flags), { type, fileName, id } = _a, query = tslib_1.__rest(_a, ["type", "fileName", "id"]);
11
+ const res = await jira.avatarManager.getAvatarImageByOwner(type, id, query);
12
+ (0, avatar_utils_1.downloadAvatar)(fileName + `.${flags.format}`, res);
13
+ }
14
+ }
15
+ exports.default = GetAvatarImageById;
16
+ GetAvatarImageById.description = 'Downloads a project or issue type avatar image by ID .';
17
+ GetAvatarImageById.flags = Object.assign({ id: core_1.Flags.string({ char: 'i', description: 'The ID of the avatar.', required: true }) }, get_image_by_type_1.default.flags);
@@ -1 +1,17 @@
1
- Object.defineProperty(exports,"__esModule",{value:!0});let tslib_1=require("tslib"),core_1=require("@oclif/core"),avatar_utils_1=require("@thestarware/atlascli-common/lib/avatar-utils"),get_image_by_type_1=tslib_1.__importDefault(require("./get-image-by-type"));class GetAvatarImageByOwner extends get_image_by_type_1.default{async runWithCloudSite(e,t){var a=(await this.parse(GetAvatarImageByOwner)).flags,r=this.removeFlagsFromBase(a),{type:i,fileName:s,entityId:l}=r,r=tslib_1.__rest(r,["type","fileName","entityId"]),t=await t.avatarManager.getAvatarImageByOwner(i,l,r);(0,avatar_utils_1.downloadAvatar)(s+("."+a.format),t)}}(exports.default=GetAvatarImageByOwner).description="Downloads the avatar image for a project or issue type into given file name.",GetAvatarImageByOwner.flags=Object.assign({entityId:core_1.Flags.string({char:"i",description:"The ID of the project or issue type the avatar belongs to.",required:!0})},get_image_by_type_1.default.flags);
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const core_1 = require("@oclif/core");
5
+ const avatar_utils_1 = require("@thestarware/atlascli-common/lib/avatar-utils");
6
+ const get_image_by_type_1 = tslib_1.__importDefault(require("./get-image-by-type"));
7
+ class GetAvatarImageByOwner extends get_image_by_type_1.default {
8
+ async runWithCloudSite(site, jira) {
9
+ const { flags } = await this.parse(GetAvatarImageByOwner);
10
+ const _a = this.removeFlagsFromBase(flags), { type, fileName, entityId } = _a, query = tslib_1.__rest(_a, ["type", "fileName", "entityId"]);
11
+ const res = await jira.avatarManager.getAvatarImageByOwner(type, entityId, query);
12
+ (0, avatar_utils_1.downloadAvatar)(fileName + `.${flags.format}`, res);
13
+ }
14
+ }
15
+ exports.default = GetAvatarImageByOwner;
16
+ GetAvatarImageByOwner.description = 'Downloads the avatar image for a project or issue type into given file name.';
17
+ GetAvatarImageByOwner.flags = Object.assign({ entityId: core_1.Flags.string({ char: 'i', description: 'The ID of the project or issue type the avatar belongs to.', required: true }) }, get_image_by_type_1.default.flags);
@@ -1 +1,17 @@
1
- Object.defineProperty(exports,"__esModule",{value:!0});let tslib_1=require("tslib"),core_1=require("@oclif/core"),atlascli_common_1=require("@thestarware/atlascli-common"),avatar_utils_1=require("@thestarware/atlascli-common/lib/avatar-utils");class GetAvatarImageByType extends atlascli_common_1.BaseCommandWithCloudSite{async runWithCloudSite(e,a){var t=(await this.parse(GetAvatarImageByType)).flags,r=this.removeFlagsFromBase(t),{type:i,fileName:s}=r,r=tslib_1.__rest(r,["type","fileName"]),a=await a.avatarManager.getAvatarImageByType(i,r);(0,avatar_utils_1.downloadAvatar)(s+("."+t.format),a)}}(exports.default=GetAvatarImageByType).description="Downloads the default project or issue type avatar image into given file name.",GetAvatarImageByType.flags=Object.assign({fileName:core_1.Flags.string({description:"File name that image will be saved in.",dependsOn:["format"],required:!0}),type:core_1.Flags.string({char:"t",description:"The icon type of the avatar.",options:["issuetype","project"],required:!0}),size:core_1.Flags.string({description:"The size of the avatar image. If not provided the default size is returned.",options:["xsmall","small","medium","large","xlarge"]}),format:core_1.Flags.string({char:"f",description:"The format to return the avatar image in. If not provided the original content format is returned.",options:["png","svg"],dependsOn:["fileName"]})},atlascli_common_1.BaseCommandWithCloudSite.flags);
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const core_1 = require("@oclif/core");
5
+ const atlascli_common_1 = require("@thestarware/atlascli-common");
6
+ const avatar_utils_1 = require("@thestarware/atlascli-common/lib/avatar-utils");
7
+ class GetAvatarImageByType extends atlascli_common_1.BaseCommandWithCloudSite {
8
+ async runWithCloudSite(site, jira) {
9
+ const { flags } = await this.parse(GetAvatarImageByType);
10
+ const _a = this.removeFlagsFromBase(flags), { type, fileName } = _a, query = tslib_1.__rest(_a, ["type", "fileName"]);
11
+ const res = await jira.avatarManager.getAvatarImageByType(type, query);
12
+ (0, avatar_utils_1.downloadAvatar)(fileName + `.${flags.format}`, res);
13
+ }
14
+ }
15
+ exports.default = GetAvatarImageByType;
16
+ GetAvatarImageByType.description = 'Downloads the default project or issue type avatar image into given file name.';
17
+ GetAvatarImageByType.flags = Object.assign({ fileName: core_1.Flags.string({ description: 'File name that image will be saved in.', dependsOn: ['format'], required: true }), type: core_1.Flags.string({ char: 't', description: 'The icon type of the avatar.', options: ['issuetype', 'project'], required: true }), size: core_1.Flags.string({ description: 'The size of the avatar image. If not provided the default size is returned.', options: ['xsmall', 'small', 'medium', 'large', 'xlarge'] }), format: core_1.Flags.string({ char: 'f', description: 'The format to return the avatar image in. If not provided the original content format is returned.', options: ['png', 'svg'], dependsOn: ['fileName'] }) }, atlascli_common_1.BaseCommandWithCloudSite.flags);
@@ -1 +1,19 @@
1
- Object.defineProperty(exports,"__esModule",{value:!0}),exports.UniversalAvatarFlag=exports.AvatarFlag=void 0;let atlascli_common_1=require("@thestarware/atlascli-common"),core_1=require("@oclif/core"),avatar_1=require("@thestarware/atlassian-typescript-client/lib/jira/common/avatar");exports.AvatarFlag=core_1.Flags.string({required:!0,description:"Type of avatar.",options:[avatar_1.AvatarType.ISSUE_TYPE,avatar_1.AvatarType.PROJECT,avatar_1.AvatarType.USER]}),exports.UniversalAvatarFlag=core_1.Flags.string({required:!0,description:"Type of avatar.",options:[avatar_1.AvatarType.ISSUE_TYPE,avatar_1.AvatarType.PROJECT]});class GetSystemAvatars extends atlascli_common_1.CommandWithSite{async runWithSite(a){var t=(await this.parse(GetSystemAvatars)).flags,a=await this.getJira(a,t).avatarManager.getSystemAvatarsByType(t.type);this.display(t,[...a.system])}}(exports.default=GetSystemAvatars).description="Returns all system avatars of the given type.",GetSystemAvatars.flags=Object.assign({type:exports.AvatarFlag},atlascli_common_1.CommandWithSite.flags);
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UniversalAvatarFlag = exports.AvatarFlag = void 0;
4
+ const atlascli_common_1 = require("@thestarware/atlascli-common");
5
+ const core_1 = require("@oclif/core");
6
+ const avatar_1 = require("@thestarware/atlassian-typescript-client/dist/jira/common/avatar");
7
+ exports.AvatarFlag = core_1.Flags.string({ required: true, description: 'Type of avatar.', options: [avatar_1.AvatarType.ISSUE_TYPE, avatar_1.AvatarType.PROJECT, avatar_1.AvatarType.USER] });
8
+ exports.UniversalAvatarFlag = core_1.Flags.string({ required: true, description: 'Type of avatar.', options: [avatar_1.AvatarType.ISSUE_TYPE, avatar_1.AvatarType.PROJECT] });
9
+ class GetSystemAvatars extends atlascli_common_1.CommandWithSite {
10
+ async runWithSite(site) {
11
+ const { flags } = await this.parse(GetSystemAvatars);
12
+ const jira = this.getJira(site, flags);
13
+ const result = await jira.avatarManager.getSystemAvatarsByType(flags.type);
14
+ this.display(flags, [...result.system]);
15
+ }
16
+ }
17
+ exports.default = GetSystemAvatars;
18
+ GetSystemAvatars.description = 'Returns all system avatars of the given type.';
19
+ GetSystemAvatars.flags = Object.assign({ type: exports.AvatarFlag }, atlascli_common_1.CommandWithSite.flags);
@@ -1 +1,16 @@
1
- Object.defineProperty(exports,"__esModule",{value:!0});let atlascli_common_1=require("@thestarware/atlascli-common"),core_1=require("@oclif/core"),get_system_avatars_1=require("./get-system-avatars");class GetUniversalAvatar extends atlascli_common_1.CommandWithSite{async runWithSite(a){var t=(await this.parse(GetUniversalAvatar)).flags,a=await this.getJira(a,t).avatarManager.getUniversalAvatars(t.type,t.entityId);this.display(t,[...a.system,...a.custom])}}(exports.default=GetUniversalAvatar).description="Returns the system and custom avatars for a project or issue type.",GetUniversalAvatar.flags=Object.assign(Object.assign({type:get_system_avatars_1.UniversalAvatarFlag,entityId:core_1.Flags.string({required:!0,description:"The ID of the item the avatar is associated with."})},(0,atlascli_common_1.getCropInfoFlags)()),atlascli_common_1.CommandWithSite.flags);
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const atlascli_common_1 = require("@thestarware/atlascli-common");
4
+ const core_1 = require("@oclif/core");
5
+ const get_system_avatars_1 = require("./get-system-avatars");
6
+ class GetUniversalAvatar extends atlascli_common_1.CommandWithSite {
7
+ async runWithSite(site) {
8
+ const { flags } = await this.parse(GetUniversalAvatar);
9
+ const jira = this.getJira(site, flags);
10
+ const avatars = await jira.avatarManager.getUniversalAvatars(flags.type, flags.entityId);
11
+ this.display(flags, [...avatars.system, ...avatars.custom]);
12
+ }
13
+ }
14
+ exports.default = GetUniversalAvatar;
15
+ GetUniversalAvatar.description = 'Returns the system and custom avatars for a project or issue type.';
16
+ GetUniversalAvatar.flags = Object.assign(Object.assign({ type: get_system_avatars_1.UniversalAvatarFlag, entityId: core_1.Flags.string({ required: true, description: 'The ID of the item the avatar is associated with.' }) }, (0, atlascli_common_1.getCropInfoFlags)()), atlascli_common_1.CommandWithSite.flags);
@@ -1 +1,21 @@
1
- Object.defineProperty(exports,"__esModule",{value:!0});let tslib_1=require("tslib"),atlascli_common_1=require("@thestarware/atlascli-common"),core_1=require("@oclif/core"),base_command_with_cloud_or_server_site_1=tslib_1.__importDefault(require("@thestarware/atlascli-common/lib/commands/base-command-with-cloud-or-server-site")),user_util_1=require("@thestarware/atlascli-common/lib/user-util");class SetUserAvatar extends base_command_with_cloud_or_server_site_1.default{async runWithServerSite(e,a){var r=(await this.parse(SetUserAvatar)).flags,t=await(0,user_util_1.getUser)(a,r.user);r.username=t.username,await a.avatarManager.setUserAvatar(r.username,r.avatarId)}async runWithCloudSite(e,a){throw new Error("User avatars are not applicable to cloud!")}}(exports.default=SetUserAvatar).description="Sets the user avatar to an already uploaded/existing avatar.",SetUserAvatar.flags=Object.assign({user:core_1.Flags.string({char:"u",required:!0,description:"The username or email."}),avatarId:core_1.Flags.string({required:!0,description:"The ID of the avatar."})},atlascli_common_1.CommandWithSite.flags);
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const atlascli_common_1 = require("@thestarware/atlascli-common");
5
+ const core_1 = require("@oclif/core");
6
+ const base_command_with_cloud_or_server_site_1 = tslib_1.__importDefault(require("@thestarware/atlascli-common/lib/commands/base-command-with-cloud-or-server-site"));
7
+ const user_util_1 = require("@thestarware/atlascli-common/lib/user-util");
8
+ class SetUserAvatar extends base_command_with_cloud_or_server_site_1.default {
9
+ async runWithServerSite(site, jira) {
10
+ const { flags } = await this.parse(SetUserAvatar);
11
+ const normalizedUserQuery = await (0, user_util_1.getUser)(jira, flags.user);
12
+ flags.username = normalizedUserQuery.username;
13
+ await jira.avatarManager.setUserAvatar(flags.username, flags.avatarId);
14
+ }
15
+ async runWithCloudSite(_site, _jira) {
16
+ throw new Error('User avatars are not applicable to cloud!');
17
+ }
18
+ }
19
+ exports.default = SetUserAvatar;
20
+ SetUserAvatar.description = 'Sets the user avatar to an already uploaded/existing avatar.';
21
+ SetUserAvatar.flags = Object.assign({ user: core_1.Flags.string({ char: 'u', required: true, description: 'The username or email.' }), avatarId: core_1.Flags.string({ required: true, description: 'The ID of the avatar.' }) }, atlascli_common_1.CommandWithSite.flags);
@@ -1 +1,32 @@
1
- Object.defineProperty(exports,"__esModule",{value:!0});let tslib_1=require("tslib"),atlascli_common_1=require("@thestarware/atlascli-common"),upload_1=tslib_1.__importDefault(require("../project-avatar/upload")),get_system_avatars_1=require("./get-system-avatars"),core_1=require("@oclif/core"),base_command_with_cloud_or_server_site_1=tslib_1.__importDefault(require("@thestarware/atlascli-common/lib/commands/base-command-with-cloud-or-server-site"));class UploadUniversalAvatar extends base_command_with_cloud_or_server_site_1.default{async runWithCloudSite(a,e){var{flags:t,args:r}=await this.parse(UploadUniversalAvatar),{fileContent:r,fileName:i}=(0,atlascli_common_1.readFile)(r.avatarFile),e=await e.avatarManager.uploadUniversalAvatar(t.type,t.entityId,i,r,upload_1.default.getCloudCropInfo(t));this.display(t,[e])}async runWithServerSite(a,e){var{flags:t,args:r}=await this.parse(UploadUniversalAvatar),{fileContent:r,fileName:i}=(0,atlascli_common_1.readFile)(r.avatarFile),e=await e.avatarManager.uploadUniversalAvatar(t.type,t.entityId,i,r,upload_1.default.getServerCropInfo(t));this.display(t,[e])}}(exports.default=UploadUniversalAvatar).description="Uploads a custom avatar for a project or issue type.",UploadUniversalAvatar.flags=Object.assign(Object.assign({type:get_system_avatars_1.UniversalAvatarFlag,entityId:core_1.Flags.string({required:!0,description:"The ID of the item the avatar is associated with."})},(0,atlascli_common_1.getCropInfoFlags)()),atlascli_common_1.CommandWithSite.flags),UploadUniversalAvatar.args=[{required:!0,name:"avatarFile",description:"Location of avatar file"}];
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const atlascli_common_1 = require("@thestarware/atlascli-common");
5
+ const upload_1 = tslib_1.__importDefault(require("../project-avatar/upload"));
6
+ const get_system_avatars_1 = require("./get-system-avatars");
7
+ const core_1 = require("@oclif/core");
8
+ const base_command_with_cloud_or_server_site_1 = tslib_1.__importDefault(require("@thestarware/atlascli-common/lib/commands/base-command-with-cloud-or-server-site"));
9
+ class UploadUniversalAvatar extends base_command_with_cloud_or_server_site_1.default {
10
+ async runWithCloudSite(site, jira) {
11
+ const { flags, args } = await this.parse(UploadUniversalAvatar);
12
+ const { fileContent, fileName } = (0, atlascli_common_1.readFile)(args.avatarFile);
13
+ const avatar = await jira.avatarManager.uploadUniversalAvatar(flags.type, flags.entityId, fileName, fileContent, upload_1.default.getCloudCropInfo(flags));
14
+ this.display(flags, [avatar]);
15
+ }
16
+ async runWithServerSite(site, jira) {
17
+ const { flags, args } = await this.parse(UploadUniversalAvatar);
18
+ const { fileContent, fileName } = (0, atlascli_common_1.readFile)(args.avatarFile);
19
+ const avatar = await jira.avatarManager.uploadUniversalAvatar(flags.type, flags.entityId, fileName, fileContent, upload_1.default.getServerCropInfo(flags));
20
+ this.display(flags, [avatar]);
21
+ }
22
+ }
23
+ exports.default = UploadUniversalAvatar;
24
+ UploadUniversalAvatar.description = 'Uploads a custom avatar for a project or issue type.';
25
+ UploadUniversalAvatar.flags = Object.assign(Object.assign({ type: get_system_avatars_1.UniversalAvatarFlag, entityId: core_1.Flags.string({ required: true, description: 'The ID of the item the avatar is associated with.' }) }, (0, atlascli_common_1.getCropInfoFlags)()), atlascli_common_1.CommandWithSite.flags);
26
+ UploadUniversalAvatar.args = [
27
+ {
28
+ required: true,
29
+ name: 'avatarFile',
30
+ description: 'Location of avatar file',
31
+ },
32
+ ];
@@ -1 +1,25 @@
1
- Object.defineProperty(exports,"__esModule",{value:!0});let tslib_1=require("tslib"),atlascli_common_1=require("@thestarware/atlascli-common"),base_command_with_cloud_or_server_site_1=tslib_1.__importDefault(require("@thestarware/atlascli-common/lib/commands/base-command-with-cloud-or-server-site")),core_1=require("@oclif/core"),upload_1=tslib_1.__importDefault(require("../project-avatar/upload")),user_util_1=require("@thestarware/atlascli-common/lib/user-util");class UploadUserAvatar extends base_command_with_cloud_or_server_site_1.default{async runWithServerSite(a,e){var{flags:r,args:t}=await this.parse(UploadUserAvatar),{fileContent:t,fileName:s}=(0,atlascli_common_1.readFile)(t.avatarFile),l=await(0,user_util_1.getUser)(e,r.user),l=(r.username=l.username,await e.avatarManager.uploadUserAvatar(r.username,s,t,upload_1.default.getServerCropInfo(r)));this.display(r,[l])}async runWithCloudSite(a,e){throw new Error("Uploading user avatars is not possible in cloud")}}(exports.default=UploadUserAvatar).description="Uploads an avatar for a user.",UploadUserAvatar.flags=Object.assign(Object.assign({user:core_1.Flags.string({char:"u",required:!0,description:"The username or email."})},(0,atlascli_common_1.getCropInfoFlags)()),atlascli_common_1.CommandWithSite.flags),UploadUserAvatar.args=upload_1.default.args;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const atlascli_common_1 = require("@thestarware/atlascli-common");
5
+ const base_command_with_cloud_or_server_site_1 = tslib_1.__importDefault(require("@thestarware/atlascli-common/lib/commands/base-command-with-cloud-or-server-site"));
6
+ const core_1 = require("@oclif/core");
7
+ const upload_1 = tslib_1.__importDefault(require("../project-avatar/upload"));
8
+ const user_util_1 = require("@thestarware/atlascli-common/lib/user-util");
9
+ class UploadUserAvatar extends base_command_with_cloud_or_server_site_1.default {
10
+ async runWithServerSite(site, jira) {
11
+ const { flags, args } = await this.parse(UploadUserAvatar);
12
+ const { fileContent, fileName } = (0, atlascli_common_1.readFile)(args.avatarFile);
13
+ const normalizedUserQuery = await (0, user_util_1.getUser)(jira, flags.user);
14
+ flags.username = normalizedUserQuery.username;
15
+ const avatar = await jira.avatarManager.uploadUserAvatar(flags.username, fileName, fileContent, upload_1.default.getServerCropInfo(flags));
16
+ this.display(flags, [avatar]);
17
+ }
18
+ async runWithCloudSite(_site, _jira) {
19
+ throw new Error('Uploading user avatars is not possible in cloud');
20
+ }
21
+ }
22
+ exports.default = UploadUserAvatar;
23
+ UploadUserAvatar.description = 'Uploads an avatar for a user.';
24
+ UploadUserAvatar.flags = Object.assign(Object.assign({ user: core_1.Flags.string({ char: 'u', required: true, description: 'The username or email.' }) }, (0, atlascli_common_1.getCropInfoFlags)()), atlascli_common_1.CommandWithSite.flags);
25
+ UploadUserAvatar.args = upload_1.default.args;
@@ -1 +1,25 @@
1
- Object.defineProperty(exports,"__esModule",{value:!0}),exports.commentFlags=void 0;let tslib_1=require("tslib"),atlascli_common_1=require("@thestarware/atlascli-common"),core_1=require("@oclif/core"),get_with_ids_1=tslib_1.__importDefault(require("./get-with-ids"));exports.commentFlags=Object.assign({issue:core_1.Flags.string({required:!0,description:"Issue ID or key."}),body:core_1.Flags.string({required:!0,description:"Body of the comment. For cloud this can be in Atlassian Document Format. For Server/DC this is a string."})},(0,atlascli_common_1.getVisibilityFlags)());class AddComment extends atlascli_common_1.CommandWithSite{async runWithSite(t){var e=(await this.parse(AddComment)).flags,i=this.getJira(t,e),s=(0,atlascli_common_1.getVisibility)(e),i=await i.commentManager.addComment(e.issue,(0,atlascli_common_1.getComment)(e.body,t.cloud),s,void 0);this.isTabularOutput(e)?this.display(e,get_with_ids_1.default.convertComment(i,t.cloud)):this.display(e,i)}}(exports.default=AddComment).description="Adds a comment.",AddComment.flags=Object.assign(Object.assign({},exports.commentFlags),atlascli_common_1.CommandWithSite.flags);
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.commentFlags = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const atlascli_common_1 = require("@thestarware/atlascli-common");
6
+ const core_1 = require("@oclif/core");
7
+ const get_with_ids_1 = tslib_1.__importDefault(require("./get-with-ids"));
8
+ exports.commentFlags = Object.assign({ issue: core_1.Flags.string({ required: true, description: 'Issue ID or key.' }), body: core_1.Flags.string({ required: true, description: 'Body of the comment. For cloud this can be in Atlassian Document Format. For Server/DC this is a string.' }) }, (0, atlascli_common_1.getVisibilityFlags)());
9
+ class AddComment extends atlascli_common_1.CommandWithSite {
10
+ async runWithSite(site) {
11
+ const { flags } = await this.parse(AddComment);
12
+ const jira = this.getJira(site, flags);
13
+ const visibility = (0, atlascli_common_1.getVisibility)(flags);
14
+ const comment = await jira.commentManager.addComment(flags.issue, (0, atlascli_common_1.getComment)(flags.body, site.cloud), visibility, undefined);
15
+ if (this.isTabularOutput(flags)) {
16
+ this.display(flags, get_with_ids_1.default.convertComment(comment, site.cloud));
17
+ }
18
+ else {
19
+ this.display(flags, comment);
20
+ }
21
+ }
22
+ }
23
+ exports.default = AddComment;
24
+ AddComment.description = 'Adds a comment.';
25
+ AddComment.flags = Object.assign(Object.assign({}, exports.commentFlags), atlascli_common_1.CommandWithSite.flags);
@@ -1 +1,14 @@
1
- Object.defineProperty(exports,"__esModule",{value:!0});let atlascli_common_1=require("@thestarware/atlascli-common"),core_1=require("@oclif/core");class GetComments extends atlascli_common_1.CommandWithSite{async runWithSite(e){var t=(await this.parse(GetComments)).flags;await this.getJira(e,t).commentManager.deleteComment(t.issue,t.commentId)}}(exports.default=GetComments).description="Deletes a comment.",GetComments.flags=Object.assign({issue:core_1.Flags.string({required:!0,description:"Issue ID or key."}),commentId:core_1.Flags.string({required:!0,description:"Comment ID."})},atlascli_common_1.CommandWithSite.flags);
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const atlascli_common_1 = require("@thestarware/atlascli-common");
4
+ const core_1 = require("@oclif/core");
5
+ class GetComments extends atlascli_common_1.CommandWithSite {
6
+ async runWithSite(site) {
7
+ const { flags } = await this.parse(GetComments);
8
+ const jira = this.getJira(site, flags);
9
+ await jira.commentManager.deleteComment(flags.issue, flags.commentId);
10
+ }
11
+ }
12
+ exports.default = GetComments;
13
+ GetComments.description = 'Deletes a comment.';
14
+ GetComments.flags = Object.assign({ issue: core_1.Flags.string({ required: true, description: 'Issue ID or key.' }), commentId: core_1.Flags.string({ required: true, description: 'Comment ID.' }) }, atlascli_common_1.CommandWithSite.flags);
@@ -1 +1,32 @@
1
- Object.defineProperty(exports,"__esModule",{value:!0});let tslib_1=require("tslib"),atlascli_common_1=require("@thestarware/atlascli-common"),core_1=require("@oclif/core"),get_with_ids_1=tslib_1.__importDefault(require("./get-with-ids"));class GetComments extends atlascli_common_1.CommandWithSite{async runWithSite(e){var{flags:s,args:t}=await this.parse(GetComments),i=this.getJira(e,s),t=s.issue||t.issue;if(!t)throw new Error("You have to provide an issue ID or key!");i=await i.commentManager.getComments(t);"json"===s.output?this.display(s,i):get_with_ids_1.default.displayComments(this.display.bind(this),i.comments,e.cloud,s)}}(exports.default=GetComments).description="Returns comments for an issue.",GetComments.flags=Object.assign({issue:core_1.Flags.string({description:"Issue ID or key."})},atlascli_common_1.CommandWithSite.flags),GetComments.args=[{name:"issue",description:"Issue ID or key."}];
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const atlascli_common_1 = require("@thestarware/atlascli-common");
5
+ const core_1 = require("@oclif/core");
6
+ const get_with_ids_1 = tslib_1.__importDefault(require("./get-with-ids"));
7
+ class GetComments extends atlascli_common_1.CommandWithSite {
8
+ async runWithSite(site) {
9
+ const { flags, args } = await this.parse(GetComments);
10
+ const jira = this.getJira(site, flags);
11
+ const issueIdOrKey = flags.issue || args.issue;
12
+ if (!issueIdOrKey) {
13
+ throw new Error('You have to provide an issue ID or key!');
14
+ }
15
+ const pageOfComments = await jira.commentManager.getComments(issueIdOrKey);
16
+ if (flags.output === 'json') {
17
+ this.display(flags, pageOfComments);
18
+ }
19
+ else {
20
+ get_with_ids_1.default.displayComments(this.display.bind(this), pageOfComments.comments, site.cloud, flags);
21
+ }
22
+ }
23
+ }
24
+ exports.default = GetComments;
25
+ GetComments.description = 'Returns comments for an issue.';
26
+ GetComments.flags = Object.assign({ issue: core_1.Flags.string({ description: 'Issue ID or key.' }) }, atlascli_common_1.CommandWithSite.flags);
27
+ GetComments.args = [
28
+ {
29
+ name: 'issue',
30
+ description: 'Issue ID or key.',
31
+ },
32
+ ];
@@ -1 +1,31 @@
1
- Object.defineProperty(exports,"__esModule",{value:!0});let atlascli_common_1=require("@thestarware/atlascli-common"),mapper_utils_1=require("@thestarware/atlascli-common/lib/util/mapper-utils"),core_1=require("@oclif/core");class GetCommentsWithIds extends atlascli_common_1.BaseCommandWithCloudSite{async runWithCloudSite(t,e){var i=(await this.parse(GetCommentsWithIds)).flags,e=await e.commentManager.getCommentsWithIds(i.id);this.isTabularOutput(i)?GetCommentsWithIds.displayComments(this.display.bind(this),e.values,t.cloud,i):this.display(i,e)}static convertComment(t,e){return Object.assign(Object.assign({id:t.id,comment:t.renderedBody||""},(0,mapper_utils_1.mapToUser)(t.author,e)),{created:t.created,updated:t.updated,visibility:t.visibility?t.visibility.type+"/"+t.visibility.value:""})}static displayComments(t,e,i,s){let a=[];e.forEach(t=>{a.push(GetCommentsWithIds.convertComment(t,i))}),t(s,a)}}(exports.default=GetCommentsWithIds).description="Gets comments with specified IDs.",GetCommentsWithIds.flags=Object.assign({id:core_1.Flags.integer({multiple:!0,description:"Comment ID.",required:!0})},atlascli_common_1.CommandWithSite.flags);
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const atlascli_common_1 = require("@thestarware/atlascli-common");
4
+ const mapper_utils_1 = require("@thestarware/atlascli-common/lib/util/mapper-utils");
5
+ const core_1 = require("@oclif/core");
6
+ const atlascli_common_2 = require("@thestarware/atlascli-common");
7
+ class GetCommentsWithIds extends atlascli_common_2.BaseCommandWithCloudSite {
8
+ async runWithCloudSite(site, jira) {
9
+ const { flags } = await this.parse(GetCommentsWithIds);
10
+ const commentsBean = await jira.commentManager.getCommentsWithIds(flags.id);
11
+ if (this.isTabularOutput(flags)) {
12
+ GetCommentsWithIds.displayComments(this.display.bind(this), commentsBean.values, site.cloud, flags);
13
+ }
14
+ else {
15
+ this.display(flags, commentsBean);
16
+ }
17
+ }
18
+ static convertComment(c, isCloud) {
19
+ return Object.assign(Object.assign({ id: c.id, comment: c.renderedBody || '' }, (0, mapper_utils_1.mapToUser)(c.author, isCloud)), { created: c.created, updated: c.updated, visibility: c.visibility ? c.visibility.type + '/' + c.visibility.value : '' });
20
+ }
21
+ static displayComments(display, comments, isCloud, flags) {
22
+ const result = [];
23
+ comments.forEach(c => {
24
+ result.push(GetCommentsWithIds.convertComment(c, isCloud));
25
+ });
26
+ display(flags, result);
27
+ }
28
+ }
29
+ exports.default = GetCommentsWithIds;
30
+ GetCommentsWithIds.description = 'Gets comments with specified IDs.';
31
+ GetCommentsWithIds.flags = Object.assign({ id: core_1.Flags.integer({ multiple: true, description: 'Comment ID.', required: true }) }, atlascli_common_1.CommandWithSite.flags);
@@ -1 +1,22 @@
1
- Object.defineProperty(exports,"__esModule",{value:!0});let tslib_1=require("tslib"),atlascli_common_1=require("@thestarware/atlascli-common"),core_1=require("@oclif/core"),get_with_ids_1=tslib_1.__importDefault(require("./get-with-ids"));class GetComments extends atlascli_common_1.CommandWithSite{async runWithSite(e){var t=(await this.parse(GetComments)).flags,i=await this.getJira(e,t).commentManager.getComment(t.issue,t.commentId);this.isTabularOutput(t)?this.display(t,get_with_ids_1.default.convertComment(i,e.cloud)):this.display(t,i)}}(exports.default=GetComments).description="Returns a comment.",GetComments.flags=Object.assign({issue:core_1.Flags.string({required:!0,description:"Issue ID or key."}),commentId:core_1.Flags.string({required:!0,description:"Comment ID."})},atlascli_common_1.CommandWithSite.flags);
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const atlascli_common_1 = require("@thestarware/atlascli-common");
5
+ const core_1 = require("@oclif/core");
6
+ const get_with_ids_1 = tslib_1.__importDefault(require("./get-with-ids"));
7
+ class GetComments extends atlascli_common_1.CommandWithSite {
8
+ async runWithSite(site) {
9
+ const { flags } = await this.parse(GetComments);
10
+ const jira = this.getJira(site, flags);
11
+ const comment = await jira.commentManager.getComment(flags.issue, flags.commentId);
12
+ if (this.isTabularOutput(flags)) {
13
+ this.display(flags, get_with_ids_1.default.convertComment(comment, site.cloud));
14
+ }
15
+ else {
16
+ this.display(flags, comment);
17
+ }
18
+ }
19
+ }
20
+ exports.default = GetComments;
21
+ GetComments.description = 'Returns a comment.';
22
+ GetComments.flags = Object.assign({ issue: core_1.Flags.string({ required: true, description: 'Issue ID or key.' }), commentId: core_1.Flags.string({ required: true, description: 'Comment ID.' }) }, atlascli_common_1.CommandWithSite.flags);
@@ -1 +1,26 @@
1
- Object.defineProperty(exports,"__esModule",{value:!0});let tslib_1=require("tslib"),atlascli_common_1=require("@thestarware/atlascli-common"),core_1=require("@oclif/core"),comments_1=require("@thestarware/atlassian-typescript-client/lib/jira/common/comments"),get_with_ids_1=tslib_1.__importDefault(require("./get-with-ids")),add_1=require("./add"),mapper_utils_1=require("@thestarware/atlascli-common/lib/util/mapper-utils");class UpdateComment extends atlascli_common_1.CommandWithSite{async runWithSite(e){var t=(await this.parse(UpdateComment)).flags,i=this.getJira(e,t),a=comments_1.VisibilityType?{type:t.visibilityType,value:t.visibilityValue}:void 0,i=await i.commentManager.updateComment(t.issue,t.commentId,(0,mapper_utils_1.getComment)(t.body,e.cloud),a,void 0);this.isTabularOutput(t)?this.display(t,get_with_ids_1.default.convertComment(i,e.cloud)):this.display(t,i)}}(exports.default=UpdateComment).description="Updates a comment.",UpdateComment.flags=Object.assign(Object.assign({commentId:core_1.Flags.string({required:!0,description:"Comment ID."})},add_1.commentFlags),atlascli_common_1.CommandWithSite.flags);
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const atlascli_common_1 = require("@thestarware/atlascli-common");
5
+ const core_1 = require("@oclif/core");
6
+ const comments_1 = require("@thestarware/atlassian-typescript-client/dist/jira/common/comments");
7
+ const get_with_ids_1 = tslib_1.__importDefault(require("./get-with-ids"));
8
+ const add_1 = require("./add");
9
+ const mapper_utils_1 = require("@thestarware/atlascli-common/lib/util/mapper-utils");
10
+ class UpdateComment extends atlascli_common_1.CommandWithSite {
11
+ async runWithSite(site) {
12
+ const { flags } = await this.parse(UpdateComment);
13
+ const jira = this.getJira(site, flags);
14
+ const visibility = comments_1.VisibilityType ? { type: flags.visibilityType, value: flags.visibilityValue } : undefined;
15
+ const comment = await jira.commentManager.updateComment(flags.issue, flags.commentId, (0, mapper_utils_1.getComment)(flags.body, site.cloud), visibility, undefined);
16
+ if (this.isTabularOutput(flags)) {
17
+ this.display(flags, get_with_ids_1.default.convertComment(comment, site.cloud));
18
+ }
19
+ else {
20
+ this.display(flags, comment);
21
+ }
22
+ }
23
+ }
24
+ exports.default = UpdateComment;
25
+ UpdateComment.description = 'Updates a comment.';
26
+ UpdateComment.flags = Object.assign(Object.assign({ commentId: core_1.Flags.string({ required: true, description: 'Comment ID.' }) }, add_1.commentFlags), atlascli_common_1.CommandWithSite.flags);