twentythree-cli 1.0.0

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 (426) hide show
  1. package/README.md +25 -0
  2. package/bin/dev.cmd +2 -0
  3. package/bin/dev.js +28 -0
  4. package/bin/run.cmd +2 -0
  5. package/bin/run.js +23 -0
  6. package/dist/_virtual/_rolldown/runtime.cjs +23 -0
  7. package/dist/api/client.cjs +24 -0
  8. package/dist/api/types.cjs +0 -0
  9. package/dist/auth/credential-store.cjs +22 -0
  10. package/dist/auth/token-refresh.cjs +70 -0
  11. package/dist/auth/workspace-config.cjs +61 -0
  12. package/dist/commands/action/add.cjs +75 -0
  13. package/dist/commands/action/delete.cjs +64 -0
  14. package/dist/commands/action/exclude.cjs +70 -0
  15. package/dist/commands/action/get.cjs +112 -0
  16. package/dist/commands/action/include.cjs +70 -0
  17. package/dist/commands/action/list.cjs +119 -0
  18. package/dist/commands/action/types.cjs +63 -0
  19. package/dist/commands/action/update.cjs +86 -0
  20. package/dist/commands/action/upload.cjs +89 -0
  21. package/dist/commands/analytics/conversions/index.cjs +83 -0
  22. package/dist/commands/analytics/conversions/timeseries.cjs +83 -0
  23. package/dist/commands/analytics/conversions/totals.cjs +83 -0
  24. package/dist/commands/analytics/live/event-timeseries.cjs +86 -0
  25. package/dist/commands/analytics/live/event-totals.cjs +86 -0
  26. package/dist/commands/analytics/live/event.cjs +88 -0
  27. package/dist/commands/analytics/live/index.cjs +89 -0
  28. package/dist/commands/analytics/live/timeseries.cjs +85 -0
  29. package/dist/commands/analytics/live/totals.cjs +85 -0
  30. package/dist/commands/analytics/live/weekday/timeseries.cjs +85 -0
  31. package/dist/commands/analytics/live/weekday/totals.cjs +85 -0
  32. package/dist/commands/analytics/live/weekday.cjs +88 -0
  33. package/dist/commands/analytics/usage/devices/timeseries.cjs +83 -0
  34. package/dist/commands/analytics/usage/devices/totals.cjs +86 -0
  35. package/dist/commands/analytics/usage/devices.cjs +89 -0
  36. package/dist/commands/analytics/usage/domains/totals.cjs +83 -0
  37. package/dist/commands/analytics/usage/domains.cjs +89 -0
  38. package/dist/commands/analytics/usage/locations/totals.cjs +83 -0
  39. package/dist/commands/analytics/usage/locations.cjs +89 -0
  40. package/dist/commands/analytics/usage/sourceids/totals.cjs +83 -0
  41. package/dist/commands/analytics/usage/sourceids.cjs +89 -0
  42. package/dist/commands/analytics/usage/sources/totals.cjs +83 -0
  43. package/dist/commands/analytics/usage/sources.cjs +89 -0
  44. package/dist/commands/analytics/usage/spots/timeseries.cjs +83 -0
  45. package/dist/commands/analytics/usage/spots/totals.cjs +83 -0
  46. package/dist/commands/analytics/usage/spots.cjs +89 -0
  47. package/dist/commands/analytics/usage/storage.cjs +52 -0
  48. package/dist/commands/analytics/usage/traffic/timeseries.cjs +83 -0
  49. package/dist/commands/analytics/usage/traffic/totals.cjs +86 -0
  50. package/dist/commands/analytics/usage/traffic.cjs +89 -0
  51. package/dist/commands/analytics/video/index.cjs +89 -0
  52. package/dist/commands/analytics/video/performance/timeseries.cjs +83 -0
  53. package/dist/commands/analytics/video/performance/totals.cjs +80 -0
  54. package/dist/commands/analytics/video/performance.cjs +89 -0
  55. package/dist/commands/analytics/video/published/timeseries.cjs +83 -0
  56. package/dist/commands/analytics/video/published/totals.cjs +80 -0
  57. package/dist/commands/analytics/video/published.cjs +89 -0
  58. package/dist/commands/analytics/video/timeseries.cjs +86 -0
  59. package/dist/commands/analytics/video/totals.cjs +86 -0
  60. package/dist/commands/analytics/video/weekday/timeseries.cjs +86 -0
  61. package/dist/commands/analytics/video/weekday/totals.cjs +83 -0
  62. package/dist/commands/analytics/video/weekday.cjs +89 -0
  63. package/dist/commands/app/add.cjs +76 -0
  64. package/dist/commands/app/delete.cjs +57 -0
  65. package/dist/commands/app/update.cjs +77 -0
  66. package/dist/commands/audience/companies.cjs +116 -0
  67. package/dist/commands/audience/field/list.cjs +83 -0
  68. package/dist/commands/audience/field/remove.cjs +63 -0
  69. package/dist/commands/audience/field/set.cjs +78 -0
  70. package/dist/commands/audience/field/types.cjs +57 -0
  71. package/dist/commands/audience/funnel.cjs +77 -0
  72. package/dist/commands/audience/identity-sources.cjs +64 -0
  73. package/dist/commands/audience/list-collectors.cjs +88 -0
  74. package/dist/commands/audience/list.cjs +122 -0
  75. package/dist/commands/audience/metrics.cjs +89 -0
  76. package/dist/commands/audience/register.cjs +106 -0
  77. package/dist/commands/audience/remove.cjs +72 -0
  78. package/dist/commands/audience/search.cjs +106 -0
  79. package/dist/commands/audience/timelines.cjs +115 -0
  80. package/dist/commands/audience/unregister.cjs +65 -0
  81. package/dist/commands/auth/credentials.cjs +89 -0
  82. package/dist/commands/auth/status.cjs +34 -0
  83. package/dist/commands/category/create.cjs +80 -0
  84. package/dist/commands/category/delete.cjs +70 -0
  85. package/dist/commands/category/index.cjs +11 -0
  86. package/dist/commands/category/list.cjs +98 -0
  87. package/dist/commands/category/update.cjs +134 -0
  88. package/dist/commands/collector/exclude.cjs +56 -0
  89. package/dist/commands/collector/include.cjs +56 -0
  90. package/dist/commands/collector/list.cjs +81 -0
  91. package/dist/commands/comment/add.cjs +102 -0
  92. package/dist/commands/comment/clone.cjs +59 -0
  93. package/dist/commands/comment/delete.cjs +55 -0
  94. package/dist/commands/comment/list.cjs +126 -0
  95. package/dist/commands/comment/promote.cjs +65 -0
  96. package/dist/commands/comment/reaction/add.cjs +81 -0
  97. package/dist/commands/comment/reaction/list.cjs +92 -0
  98. package/dist/commands/comment/reaction/remove.cjs +81 -0
  99. package/dist/commands/comment/set-order.cjs +63 -0
  100. package/dist/commands/comment/update.cjs +63 -0
  101. package/dist/commands/doctor.cjs +129 -0
  102. package/dist/commands/openupload/list.cjs +95 -0
  103. package/dist/commands/openupload/update-file.cjs +85 -0
  104. package/dist/commands/openupload/upload-file.cjs +130 -0
  105. package/dist/commands/player/delete.cjs +66 -0
  106. package/dist/commands/player/embed-versions.cjs +83 -0
  107. package/dist/commands/player/embed.cjs +134 -0
  108. package/dist/commands/player/list.cjs +86 -0
  109. package/dist/commands/player/styles.cjs +70 -0
  110. package/dist/commands/player/update.cjs +80 -0
  111. package/dist/commands/poll/add.cjs +84 -0
  112. package/dist/commands/poll/answer.cjs +89 -0
  113. package/dist/commands/poll/list.cjs +92 -0
  114. package/dist/commands/poll/remove.cjs +57 -0
  115. package/dist/commands/poll/set-options.cjs +84 -0
  116. package/dist/commands/poll/update.cjs +79 -0
  117. package/dist/commands/presentation/page/link-locations.cjs +57 -0
  118. package/dist/commands/presentation/setting/list.cjs +44 -0
  119. package/dist/commands/presentation/setting/update.cjs +67 -0
  120. package/dist/commands/protection/protect.cjs +68 -0
  121. package/dist/commands/protection/unprotect.cjs +65 -0
  122. package/dist/commands/protection/verify.cjs +80 -0
  123. package/dist/commands/session/get-token.cjs +75 -0
  124. package/dist/commands/session/redeem-token.cjs +56 -0
  125. package/dist/commands/setting/update.cjs +79 -0
  126. package/dist/commands/site/get.cjs +73 -0
  127. package/dist/commands/site/search.cjs +93 -0
  128. package/dist/commands/spot/check.cjs +52 -0
  129. package/dist/commands/spot/create.cjs +79 -0
  130. package/dist/commands/spot/delete.cjs +68 -0
  131. package/dist/commands/spot/list.cjs +120 -0
  132. package/dist/commands/spot/reset-version.cjs +53 -0
  133. package/dist/commands/spot/set-videos.cjs +64 -0
  134. package/dist/commands/spot/update.cjs +78 -0
  135. package/dist/commands/tag/list.cjs +98 -0
  136. package/dist/commands/tag/related.cjs +57 -0
  137. package/dist/commands/thumbnail/add.cjs +66 -0
  138. package/dist/commands/thumbnail/data.cjs +60 -0
  139. package/dist/commands/thumbnail/delete.cjs +61 -0
  140. package/dist/commands/thumbnail/duplicate.cjs +67 -0
  141. package/dist/commands/thumbnail/file/delete.cjs +71 -0
  142. package/dist/commands/thumbnail/file/list.cjs +74 -0
  143. package/dist/commands/thumbnail/file/upload.cjs +79 -0
  144. package/dist/commands/thumbnail/index.cjs +11 -0
  145. package/dist/commands/thumbnail/list.cjs +89 -0
  146. package/dist/commands/thumbnail/update.cjs +87 -0
  147. package/dist/commands/user/create.cjs +87 -0
  148. package/dist/commands/user/get-login-token.cjs +72 -0
  149. package/dist/commands/user/get.cjs +67 -0
  150. package/dist/commands/user/list.cjs +95 -0
  151. package/dist/commands/user/redeem-login-token.cjs +55 -0
  152. package/dist/commands/user/send-invitation.cjs +63 -0
  153. package/dist/commands/user/tokens.cjs +80 -0
  154. package/dist/commands/user/update.cjs +121 -0
  155. package/dist/commands/video/delete.cjs +67 -0
  156. package/dist/commands/video/frame.cjs +69 -0
  157. package/dist/commands/video/get.cjs +68 -0
  158. package/dist/commands/video/index.cjs +11 -0
  159. package/dist/commands/video/list.cjs +98 -0
  160. package/dist/commands/video/replace.cjs +126 -0
  161. package/dist/commands/video/section/create.cjs +73 -0
  162. package/dist/commands/video/section/delete.cjs +78 -0
  163. package/dist/commands/video/section/index.cjs +11 -0
  164. package/dist/commands/video/section/list.cjs +75 -0
  165. package/dist/commands/video/section/set-thumbnail.cjs +73 -0
  166. package/dist/commands/video/section/update.cjs +84 -0
  167. package/dist/commands/video/subtitle/archive.cjs +76 -0
  168. package/dist/commands/video/subtitle/create.cjs +80 -0
  169. package/dist/commands/video/subtitle/data.cjs +75 -0
  170. package/dist/commands/video/subtitle/delete.cjs +84 -0
  171. package/dist/commands/video/subtitle/duplicate.cjs +89 -0
  172. package/dist/commands/video/subtitle/index.cjs +11 -0
  173. package/dist/commands/video/subtitle/list.cjs +94 -0
  174. package/dist/commands/video/subtitle/locales.cjs +60 -0
  175. package/dist/commands/video/subtitle/set-primary.cjs +64 -0
  176. package/dist/commands/video/subtitle/types.cjs +42 -0
  177. package/dist/commands/video/subtitle/update.cjs +93 -0
  178. package/dist/commands/video/subtitle/upload.cjs +104 -0
  179. package/dist/commands/video/transcoding-progress.cjs +71 -0
  180. package/dist/commands/video/update.cjs +184 -0
  181. package/dist/commands/video/upload.cjs +151 -0
  182. package/dist/commands/webhook/events.cjs +68 -0
  183. package/dist/commands/webhook/list.cjs +64 -0
  184. package/dist/commands/webhook/sample.cjs +47 -0
  185. package/dist/commands/webhook/subscribe.cjs +66 -0
  186. package/dist/commands/webhook/unsubscribe.cjs +71 -0
  187. package/dist/commands/webinar/attachment/delete.cjs +79 -0
  188. package/dist/commands/webinar/attachment/list.cjs +94 -0
  189. package/dist/commands/webinar/attachment/set-hidden.cjs +85 -0
  190. package/dist/commands/webinar/attachment/upload.cjs +128 -0
  191. package/dist/commands/webinar/clips.cjs +77 -0
  192. package/dist/commands/webinar/create.cjs +107 -0
  193. package/dist/commands/webinar/delete.cjs +62 -0
  194. package/dist/commands/webinar/highlights.cjs +84 -0
  195. package/dist/commands/webinar/index.cjs +11 -0
  196. package/dist/commands/webinar/list-formats.cjs +50 -0
  197. package/dist/commands/webinar/list.cjs +134 -0
  198. package/dist/commands/webinar/log.cjs +69 -0
  199. package/dist/commands/webinar/mail/add.cjs +101 -0
  200. package/dist/commands/webinar/mail/list.cjs +83 -0
  201. package/dist/commands/webinar/mail/preview.cjs +75 -0
  202. package/dist/commands/webinar/mail/remove.cjs +75 -0
  203. package/dist/commands/webinar/mail/send.cjs +68 -0
  204. package/dist/commands/webinar/mail/test.cjs +86 -0
  205. package/dist/commands/webinar/mail/update.cjs +84 -0
  206. package/dist/commands/webinar/metrics.cjs +59 -0
  207. package/dist/commands/webinar/queued-video/add.cjs +81 -0
  208. package/dist/commands/webinar/queued-video/remove.cjs +81 -0
  209. package/dist/commands/webinar/recording/split.cjs +53 -0
  210. package/dist/commands/webinar/recording/start.cjs +53 -0
  211. package/dist/commands/webinar/recording/status.cjs +52 -0
  212. package/dist/commands/webinar/recording/stop.cjs +53 -0
  213. package/dist/commands/webinar/repeat.cjs +65 -0
  214. package/dist/commands/webinar/room/connect.cjs +60 -0
  215. package/dist/commands/webinar/room/info.cjs +60 -0
  216. package/dist/commands/webinar/room/send-recording.cjs +59 -0
  217. package/dist/commands/webinar/room/themes.cjs +63 -0
  218. package/dist/commands/webinar/section/add.cjs +98 -0
  219. package/dist/commands/webinar/section/list.cjs +86 -0
  220. package/dist/commands/webinar/section/remove.cjs +75 -0
  221. package/dist/commands/webinar/section/update.cjs +85 -0
  222. package/dist/commands/webinar/series/apply-recurrence.cjs +68 -0
  223. package/dist/commands/webinar/series/cancel.cjs +73 -0
  224. package/dist/commands/webinar/series/create.cjs +80 -0
  225. package/dist/commands/webinar/series/delete.cjs +73 -0
  226. package/dist/commands/webinar/series/list.cjs +79 -0
  227. package/dist/commands/webinar/series/mapped-objects.cjs +69 -0
  228. package/dist/commands/webinar/series/metrics.cjs +57 -0
  229. package/dist/commands/webinar/series/recurrences.cjs +72 -0
  230. package/dist/commands/webinar/series/set-ondemand.cjs +67 -0
  231. package/dist/commands/webinar/series/skip-recurrence.cjs +79 -0
  232. package/dist/commands/webinar/series/update.cjs +71 -0
  233. package/dist/commands/webinar/series/upload-thumbnail.cjs +117 -0
  234. package/dist/commands/webinar/speaker/add-from-speaker.cjs +78 -0
  235. package/dist/commands/webinar/speaker/add-from-user.cjs +78 -0
  236. package/dist/commands/webinar/speaker/add.cjs +112 -0
  237. package/dist/commands/webinar/speaker/cancel-guest-request.cjs +62 -0
  238. package/dist/commands/webinar/speaker/connection-types.cjs +66 -0
  239. package/dist/commands/webinar/speaker/library.cjs +59 -0
  240. package/dist/commands/webinar/speaker/list.cjs +90 -0
  241. package/dist/commands/webinar/speaker/remove-avatar.cjs +62 -0
  242. package/dist/commands/webinar/speaker/remove.cjs +69 -0
  243. package/dist/commands/webinar/speaker/request-guest.cjs +62 -0
  244. package/dist/commands/webinar/speaker/send-invitation.cjs +62 -0
  245. package/dist/commands/webinar/speaker/set-avatar.cjs +130 -0
  246. package/dist/commands/webinar/speaker/set-order.cjs +95 -0
  247. package/dist/commands/webinar/speaker/update.cjs +90 -0
  248. package/dist/commands/webinar/transcription/connect.cjs +69 -0
  249. package/dist/commands/webinar/transcription/list.cjs +88 -0
  250. package/dist/commands/webinar/transcription/locales.cjs +76 -0
  251. package/dist/commands/webinar/transcription/transcriptionlist.cjs +67 -0
  252. package/dist/commands/webinar/update.cjs +192 -0
  253. package/dist/commands/webinar/upload-image.cjs +133 -0
  254. package/dist/commands/workspace/list.cjs +47 -0
  255. package/dist/commands/workspace/use.cjs +52 -0
  256. package/dist/index.cjs +6 -0
  257. package/dist/lib/analytics-flags.cjs +60 -0
  258. package/dist/lib/audit.cjs +44 -0
  259. package/dist/lib/base-command.cjs +156 -0
  260. package/dist/lib/output.cjs +82 -0
  261. package/dist/lib/pagination.cjs +36 -0
  262. package/dist/lib/term-map.cjs +48 -0
  263. package/dist/upload/chunk-pool.cjs +47 -0
  264. package/dist/upload/chunked-upload.cjs +131 -0
  265. package/dist/upload/types.cjs +9 -0
  266. package/docs/commands/README.md +31 -0
  267. package/docs/commands/action/add.md +36 -0
  268. package/docs/commands/action/delete.md +32 -0
  269. package/docs/commands/action/exclude.md +38 -0
  270. package/docs/commands/action/get.md +47 -0
  271. package/docs/commands/action/include.md +38 -0
  272. package/docs/commands/action/list.md +43 -0
  273. package/docs/commands/action/types.md +34 -0
  274. package/docs/commands/action/update.md +42 -0
  275. package/docs/commands/action/upload.md +36 -0
  276. package/docs/commands/action.md +306 -0
  277. package/docs/commands/analytics/conversions.md +113 -0
  278. package/docs/commands/analytics/live.md +338 -0
  279. package/docs/commands/analytics/usage.md +674 -0
  280. package/docs/commands/analytics/video.md +449 -0
  281. package/docs/commands/analytics.md +1559 -0
  282. package/docs/commands/app/add.md +38 -0
  283. package/docs/commands/app/delete.md +32 -0
  284. package/docs/commands/app/update.md +41 -0
  285. package/docs/commands/app.md +101 -0
  286. package/docs/commands/audience/companies.md +41 -0
  287. package/docs/commands/audience/field.md +119 -0
  288. package/docs/commands/audience/funnel.md +38 -0
  289. package/docs/commands/audience/identity-sources.md +29 -0
  290. package/docs/commands/audience/list-collectors.md +35 -0
  291. package/docs/commands/audience/list.md +42 -0
  292. package/docs/commands/audience/metrics.md +40 -0
  293. package/docs/commands/audience/register.md +45 -0
  294. package/docs/commands/audience/remove.md +35 -0
  295. package/docs/commands/audience/search.md +39 -0
  296. package/docs/commands/audience/timelines.md +41 -0
  297. package/docs/commands/audience/unregister.md +36 -0
  298. package/docs/commands/audience.md +485 -0
  299. package/docs/commands/auth/credentials.md +23 -0
  300. package/docs/commands/auth/status.md +27 -0
  301. package/docs/commands/auth.md +45 -0
  302. package/docs/commands/category/create.md +36 -0
  303. package/docs/commands/category/delete.md +32 -0
  304. package/docs/commands/category/list.md +34 -0
  305. package/docs/commands/category/update.md +39 -0
  306. package/docs/commands/category.md +141 -0
  307. package/docs/commands/collector/exclude.md +33 -0
  308. package/docs/commands/collector/include.md +33 -0
  309. package/docs/commands/collector/list.md +37 -0
  310. package/docs/commands/collector.md +93 -0
  311. package/docs/commands/comment/add.md +43 -0
  312. package/docs/commands/comment/clone.md +35 -0
  313. package/docs/commands/comment/delete.md +32 -0
  314. package/docs/commands/comment/list.md +42 -0
  315. package/docs/commands/comment/promote.md +37 -0
  316. package/docs/commands/comment/reaction.md +106 -0
  317. package/docs/commands/comment/set-order.md +34 -0
  318. package/docs/commands/comment/update.md +36 -0
  319. package/docs/commands/comment.md +330 -0
  320. package/docs/commands/doctor.md +28 -0
  321. package/docs/commands/openupload/list.md +36 -0
  322. package/docs/commands/openupload/update-file.md +40 -0
  323. package/docs/commands/openupload/upload-file.md +39 -0
  324. package/docs/commands/openupload.md +105 -0
  325. package/docs/commands/player/delete.md +32 -0
  326. package/docs/commands/player/embed-versions.md +34 -0
  327. package/docs/commands/player/embed.md +51 -0
  328. package/docs/commands/player/list.md +32 -0
  329. package/docs/commands/player/styles.md +32 -0
  330. package/docs/commands/player/update.md +37 -0
  331. package/docs/commands/player.md +193 -0
  332. package/docs/commands/poll/add.md +33 -0
  333. package/docs/commands/poll/answer.md +38 -0
  334. package/docs/commands/poll/list.md +33 -0
  335. package/docs/commands/poll/remove.md +32 -0
  336. package/docs/commands/poll/set-options.md +35 -0
  337. package/docs/commands/poll/update.md +41 -0
  338. package/docs/commands/poll.md +187 -0
  339. package/docs/commands/presentation/page.md +29 -0
  340. package/docs/commands/presentation/setting.md +58 -0
  341. package/docs/commands/presentation.md +82 -0
  342. package/docs/commands/protection/protect.md +37 -0
  343. package/docs/commands/protection/unprotect.md +34 -0
  344. package/docs/commands/protection/verify.md +39 -0
  345. package/docs/commands/protection.md +100 -0
  346. package/docs/commands/session/get-token.md +38 -0
  347. package/docs/commands/session/redeem-token.md +32 -0
  348. package/docs/commands/session.md +65 -0
  349. package/docs/commands/setting/update.md +37 -0
  350. package/docs/commands/setting.md +37 -0
  351. package/docs/commands/site/get.md +35 -0
  352. package/docs/commands/site/search.md +38 -0
  353. package/docs/commands/site.md +68 -0
  354. package/docs/commands/spot/check.md +32 -0
  355. package/docs/commands/spot/create.md +38 -0
  356. package/docs/commands/spot/delete.md +32 -0
  357. package/docs/commands/spot/list.md +43 -0
  358. package/docs/commands/spot/reset-version.md +32 -0
  359. package/docs/commands/spot/set-videos.md +35 -0
  360. package/docs/commands/spot/update.md +40 -0
  361. package/docs/commands/spot.md +222 -0
  362. package/docs/commands/tag/list.md +44 -0
  363. package/docs/commands/tag/related.md +32 -0
  364. package/docs/commands/tag.md +71 -0
  365. package/docs/commands/thumbnail/add.md +33 -0
  366. package/docs/commands/thumbnail/data.md +35 -0
  367. package/docs/commands/thumbnail/delete.md +32 -0
  368. package/docs/commands/thumbnail/duplicate.md +37 -0
  369. package/docs/commands/thumbnail/file.md +90 -0
  370. package/docs/commands/thumbnail/list.md +37 -0
  371. package/docs/commands/thumbnail/update.md +44 -0
  372. package/docs/commands/thumbnail.md +293 -0
  373. package/docs/commands/user/create.md +41 -0
  374. package/docs/commands/user/get-login-token.md +37 -0
  375. package/docs/commands/user/get.md +37 -0
  376. package/docs/commands/user/list.md +40 -0
  377. package/docs/commands/user/redeem-login-token.md +32 -0
  378. package/docs/commands/user/send-invitation.md +37 -0
  379. package/docs/commands/user/tokens.md +34 -0
  380. package/docs/commands/user/update.md +44 -0
  381. package/docs/commands/user.md +267 -0
  382. package/docs/commands/video/delete.md +32 -0
  383. package/docs/commands/video/frame.md +37 -0
  384. package/docs/commands/video/get.md +32 -0
  385. package/docs/commands/video/list.md +33 -0
  386. package/docs/commands/video/replace.md +37 -0
  387. package/docs/commands/video/section.md +177 -0
  388. package/docs/commands/video/subtitle.md +362 -0
  389. package/docs/commands/video/transcoding-progress.md +32 -0
  390. package/docs/commands/video/update.md +45 -0
  391. package/docs/commands/video/upload.md +44 -0
  392. package/docs/commands/video.md +801 -0
  393. package/docs/commands/webhook/events.md +34 -0
  394. package/docs/commands/webhook/list.md +29 -0
  395. package/docs/commands/webhook/sample.md +32 -0
  396. package/docs/commands/webhook/subscribe.md +33 -0
  397. package/docs/commands/webhook/unsubscribe.md +35 -0
  398. package/docs/commands/webhook.md +143 -0
  399. package/docs/commands/webinar/attachment.md +135 -0
  400. package/docs/commands/webinar/clips.md +32 -0
  401. package/docs/commands/webinar/create.md +40 -0
  402. package/docs/commands/webinar/delete.md +32 -0
  403. package/docs/commands/webinar/highlights.md +37 -0
  404. package/docs/commands/webinar/list-formats.md +29 -0
  405. package/docs/commands/webinar/list.md +41 -0
  406. package/docs/commands/webinar/log.md +32 -0
  407. package/docs/commands/webinar/mail.md +238 -0
  408. package/docs/commands/webinar/metrics.md +32 -0
  409. package/docs/commands/webinar/queued-video.md +65 -0
  410. package/docs/commands/webinar/recording.md +113 -0
  411. package/docs/commands/webinar/repeat.md +35 -0
  412. package/docs/commands/webinar/room.md +110 -0
  413. package/docs/commands/webinar/section.md +134 -0
  414. package/docs/commands/webinar/series.md +365 -0
  415. package/docs/commands/webinar/speaker.md +430 -0
  416. package/docs/commands/webinar/transcription.md +125 -0
  417. package/docs/commands/webinar/update.md +43 -0
  418. package/docs/commands/webinar/upload-image.md +42 -0
  419. package/docs/commands/webinar.md +2030 -0
  420. package/docs/commands/workspace/list.md +27 -0
  421. package/docs/commands/workspace/use.md +32 -0
  422. package/docs/commands/workspace.md +54 -0
  423. package/docs/guides/api-spec-upgrade.md +92 -0
  424. package/docs/guides/getting-started.md +66 -0
  425. package/oclif.manifest.json +21609 -0
  426. package/package.json +71 -0
@@ -0,0 +1,87 @@
1
+ const require_runtime = require("../../_virtual/_rolldown/runtime.cjs");
2
+ const require_lib_term_map = require("../../lib/term-map.cjs");
3
+ const require_lib_base_command = require("../../lib/base-command.cjs");
4
+ const require_lib_output = require("../../lib/output.cjs");
5
+ let _oclif_core = require("@oclif/core");
6
+ let chalk = require("chalk");
7
+ chalk = require_runtime.__toESM(chalk);
8
+ //#region src/commands/user/create.ts
9
+ /**
10
+ * User create command — creates a new user in the workspace (USR-03).
11
+ *
12
+ * Maps to the POST /user/create API endpoint.
13
+ */
14
+ var UserCreate = class UserCreate extends require_lib_base_command.AuthenticatedCommand {
15
+ static description = "Create a new user";
16
+ static examples = [
17
+ "<%= config.bin %> user create --email alice@example.com",
18
+ "<%= config.bin %> user create --email alice@example.com --full-name \"Alice Smith\"",
19
+ "<%= config.bin %> user create --email alice@example.com --site-admin",
20
+ "<%= config.bin %> user create --email alice@example.com --json"
21
+ ];
22
+ static enableJsonFlag = true;
23
+ static flags = {
24
+ ...require_lib_base_command.AuthenticatedCommand.baseFlags,
25
+ email: _oclif_core.Flags.string({
26
+ description: "Email address for the new user",
27
+ required: true
28
+ }),
29
+ username: _oclif_core.Flags.string({
30
+ description: "Username for the new user",
31
+ required: false
32
+ }),
33
+ "full-name": _oclif_core.Flags.string({
34
+ description: "Full display name for the new user",
35
+ required: false
36
+ }),
37
+ "site-admin": _oclif_core.Flags.boolean({
38
+ description: "Grant site admin privileges",
39
+ allowNo: true,
40
+ required: false
41
+ }),
42
+ "site-admin-p": _oclif_core.Flags.string({
43
+ hidden: true,
44
+ required: false
45
+ }),
46
+ "user-type": _oclif_core.Flags.string({
47
+ description: "User type (e.g. standard, administrator)",
48
+ required: false
49
+ })
50
+ };
51
+ static args = {};
52
+ static agentMetadata = {
53
+ api_endpoint: "POST /user/create",
54
+ auth_scope: "admin",
55
+ output_shape: { type: "key-value" },
56
+ side_effects: "creates"
57
+ };
58
+ async run() {
59
+ const { flags } = await this.parse(UserCreate);
60
+ this.printWorkspaceHeader();
61
+ const body = { email: flags.email };
62
+ if (flags.username !== void 0) body.username = flags.username;
63
+ if (flags["full-name"] !== void 0) body.full_name = flags["full-name"];
64
+ if (flags["user-type"] !== void 0) body.user_type = flags["user-type"];
65
+ const siteAdminVal = parseBoolParam(flags["site-admin"], flags["site-admin-p"]);
66
+ if (siteAdminVal !== void 0) body.site_admin_p = siteAdminVal ? 1 : 0;
67
+ const { data, error } = await this.apiClient.POST("/user/create", {
68
+ body,
69
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
70
+ });
71
+ if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
72
+ const userId = data?.data?.user_id;
73
+ this.log(chalk.default.green("User created"));
74
+ this.log(`ID: ${userId}`);
75
+ if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
76
+ ok: true,
77
+ data,
78
+ summary: "User created",
79
+ breadcrumbs: [{ domain: this.activeWorkspace.domain }, {
80
+ resource: "user",
81
+ id: String(userId)
82
+ }]
83
+ });
84
+ }
85
+ };
86
+ //#endregion
87
+ module.exports = UserCreate;
@@ -0,0 +1,72 @@
1
+ require("../../_virtual/_rolldown/runtime.cjs");
2
+ const require_lib_term_map = require("../../lib/term-map.cjs");
3
+ const require_lib_base_command = require("../../lib/base-command.cjs");
4
+ const require_lib_output = require("../../lib/output.cjs");
5
+ let _oclif_core = require("@oclif/core");
6
+ //#region src/commands/user/get-login-token.ts
7
+ /**
8
+ * User get-login-token command — generates a login token for a user (USR-06).
9
+ *
10
+ * Maps to the GET /user/get-login-token API endpoint.
11
+ *
12
+ * SECURITY (T-08-10): The actual token value is NOT included in the --json summary string.
13
+ * The token is present in the data field for programmatic access only.
14
+ * The summary string is safe for logs and CI output.
15
+ */
16
+ var UserGetLoginToken = class UserGetLoginToken extends require_lib_base_command.AuthenticatedCommand {
17
+ static description = "Generate a login token for a user";
18
+ static examples = [
19
+ "<%= config.bin %> user get-login-token 12345",
20
+ "<%= config.bin %> user get-login-token 12345 --return-url https://example.com/dashboard",
21
+ "<%= config.bin %> user get-login-token 12345 --json"
22
+ ];
23
+ static enableJsonFlag = true;
24
+ static flags = {
25
+ ...require_lib_base_command.AuthenticatedCommand.baseFlags,
26
+ "return-url": _oclif_core.Flags.string({
27
+ description: "URL to redirect to after login",
28
+ required: false
29
+ })
30
+ };
31
+ static args = { id: _oclif_core.Args.string({
32
+ description: "User ID",
33
+ required: true
34
+ }) };
35
+ static agentMetadata = {
36
+ api_endpoint: "GET /user/get-login-token",
37
+ auth_scope: "admin",
38
+ output_shape: { type: "key-value" },
39
+ side_effects: "none"
40
+ };
41
+ async run() {
42
+ const { args, flags } = await this.parse(UserGetLoginToken);
43
+ this.printWorkspaceHeader();
44
+ const { data, error } = await this.apiClient.GET("/user/get-login-token", { params: { query: {
45
+ user_id: Number(args.id),
46
+ return_url: flags["return-url"]
47
+ } } });
48
+ if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
49
+ const resp = data;
50
+ const obj = resp?.data ?? resp;
51
+ const token = obj?.login_token ?? obj?.token ?? "";
52
+ if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
53
+ ok: true,
54
+ data: obj,
55
+ summary: `Login token generated for user ${args.id}`,
56
+ breadcrumbs: [
57
+ { domain: this.activeWorkspace.domain },
58
+ {
59
+ resource: "user",
60
+ id: args.id
61
+ },
62
+ { resource: "login-token" }
63
+ ]
64
+ });
65
+ this.log(`Login token: ${token}`);
66
+ if (obj && typeof obj === "object") {
67
+ for (const [k, v] of Object.entries(obj)) if (k !== "login_token" && k !== "token") this.log(`${k}: ${String(v)}`);
68
+ }
69
+ }
70
+ };
71
+ //#endregion
72
+ module.exports = UserGetLoginToken;
@@ -0,0 +1,67 @@
1
+ require("../../_virtual/_rolldown/runtime.cjs");
2
+ const require_lib_term_map = require("../../lib/term-map.cjs");
3
+ const require_lib_base_command = require("../../lib/base-command.cjs");
4
+ const require_lib_output = require("../../lib/output.cjs");
5
+ let _oclif_core = require("@oclif/core");
6
+ //#region src/commands/user/get.ts
7
+ /**
8
+ * User get command — retrieves details of a single user by ID (USR-02).
9
+ *
10
+ * Maps to the GET /user/get API endpoint.
11
+ */
12
+ var UserGet = class UserGet extends require_lib_base_command.AuthenticatedCommand {
13
+ static description = "Get details of a specific user";
14
+ static examples = [
15
+ "<%= config.bin %> user get 12345",
16
+ "<%= config.bin %> user get 12345 --include-invitation",
17
+ "<%= config.bin %> user get 12345 --json"
18
+ ];
19
+ static enableJsonFlag = true;
20
+ static flags = {
21
+ ...require_lib_base_command.AuthenticatedCommand.baseFlags,
22
+ "include-invitation": _oclif_core.Flags.boolean({
23
+ description: "Include invitation details in the response",
24
+ allowNo: true,
25
+ required: false
26
+ }),
27
+ "include-invitation-p": _oclif_core.Flags.string({
28
+ hidden: true,
29
+ required: false
30
+ })
31
+ };
32
+ static args = { id: _oclif_core.Args.string({
33
+ description: "User ID",
34
+ required: true
35
+ }) };
36
+ static agentMetadata = {
37
+ api_endpoint: "GET /user/get",
38
+ auth_scope: "admin",
39
+ output_shape: { type: "key-value" },
40
+ side_effects: "none"
41
+ };
42
+ async run() {
43
+ const { args, flags } = await this.parse(UserGet);
44
+ this.printWorkspaceHeader();
45
+ const inclVal = parseBoolParam(flags["include-invitation"], flags["include-invitation-p"]);
46
+ const { data, error } = await this.apiClient.GET("/user/get", { params: { query: {
47
+ user_id: Number(args.id),
48
+ include_invitation_p: inclVal
49
+ } } });
50
+ if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
51
+ const resp = data;
52
+ const obj = resp?.data ?? resp;
53
+ if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
54
+ ok: true,
55
+ data: obj,
56
+ summary: obj?.username ?? obj?.display_name ?? `User ${args.id}`,
57
+ breadcrumbs: [{ domain: this.activeWorkspace.domain }, {
58
+ resource: "user",
59
+ id: args.id
60
+ }]
61
+ });
62
+ if (!obj || Object.keys(obj).length === 0) this.error(`User ${args.id} not found`, { exit: 1 });
63
+ for (const [k, v] of Object.entries(obj)) this.log(`${k}: ${String(v)}`);
64
+ }
65
+ };
66
+ //#endregion
67
+ module.exports = UserGet;
@@ -0,0 +1,95 @@
1
+ const require_runtime = require("../../_virtual/_rolldown/runtime.cjs");
2
+ const require_lib_term_map = require("../../lib/term-map.cjs");
3
+ const require_lib_base_command = require("../../lib/base-command.cjs");
4
+ const require_lib_output = require("../../lib/output.cjs");
5
+ let _oclif_core = require("@oclif/core");
6
+ let chalk = require("chalk");
7
+ chalk = require_runtime.__toESM(chalk);
8
+ //#region src/commands/user/list.ts
9
+ /**
10
+ * User list command — lists users in the active workspace (USR-01).
11
+ *
12
+ * Maps to the GET /user/list API endpoint.
13
+ */
14
+ var UserList = class UserList extends require_lib_base_command.AuthenticatedCommand {
15
+ static description = "List users in the workspace";
16
+ static examples = [
17
+ "<%= config.bin %> user list",
18
+ "<%= config.bin %> user list --search \"alice\"",
19
+ "<%= config.bin %> user list --page 2 --size 20",
20
+ "<%= config.bin %> user list --json"
21
+ ];
22
+ static enableJsonFlag = true;
23
+ static flags = {
24
+ ...require_lib_base_command.AuthenticatedCommand.baseFlags,
25
+ page: _oclif_core.Flags.integer({
26
+ description: "Page number",
27
+ required: false
28
+ }),
29
+ size: _oclif_core.Flags.integer({
30
+ description: "Number of results per page",
31
+ required: false
32
+ }),
33
+ search: _oclif_core.Flags.string({
34
+ description: "Search query (username, display name, or email)",
35
+ required: false
36
+ }),
37
+ "user-id": _oclif_core.Flags.string({
38
+ description: "Filter by user ID",
39
+ required: false
40
+ })
41
+ };
42
+ static args = {};
43
+ static agentMetadata = {
44
+ api_endpoint: "GET /user/list",
45
+ auth_scope: "admin",
46
+ output_shape: {
47
+ type: "table",
48
+ columns: [
49
+ "ID",
50
+ "Username",
51
+ "Display Name",
52
+ "URL"
53
+ ]
54
+ },
55
+ side_effects: "none"
56
+ };
57
+ async run() {
58
+ const { flags } = await this.parse(UserList);
59
+ this.printWorkspaceHeader();
60
+ const { data, error } = await this.apiClient.GET("/user/list", { params: { query: {
61
+ search: flags.search,
62
+ user_id: flags["user-id"] ? Number(flags["user-id"]) : void 0,
63
+ p: flags.page,
64
+ size: flags.size
65
+ } } });
66
+ if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
67
+ const resp = data;
68
+ const rows = Array.isArray(resp?.data) ? resp.data : resp?.data ? [resp.data] : [];
69
+ if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
70
+ ok: true,
71
+ data: rows,
72
+ summary: `${rows.length} user(s)`,
73
+ breadcrumbs: [{ domain: this.activeWorkspace.domain }, { resource: "user" }]
74
+ });
75
+ if (rows.length === 0) {
76
+ this.log("No users found.");
77
+ return;
78
+ }
79
+ const table = require_lib_output.renderTable([
80
+ "ID",
81
+ "Username",
82
+ "Display Name",
83
+ "URL"
84
+ ], rows.map((r) => [
85
+ String(r.user_id ?? ""),
86
+ String(r.username ?? ""),
87
+ String(r.display_name ?? ""),
88
+ String(require_lib_output.resolveUrl(r.url, this.activeWorkspace.api_base_url) ?? "")
89
+ ]));
90
+ this.log(table.toString());
91
+ this.log(chalk.default.dim(`${rows.length} user(s)`));
92
+ }
93
+ };
94
+ //#endregion
95
+ module.exports = UserList;
@@ -0,0 +1,55 @@
1
+ require("../../_virtual/_rolldown/runtime.cjs");
2
+ const require_lib_term_map = require("../../lib/term-map.cjs");
3
+ const require_lib_base_command = require("../../lib/base-command.cjs");
4
+ const require_lib_output = require("../../lib/output.cjs");
5
+ let _oclif_core = require("@oclif/core");
6
+ //#region src/commands/user/redeem-login-token.ts
7
+ /**
8
+ * User redeem-login-token command — redeems a login token (USR-07).
9
+ *
10
+ * Maps to the GET /user/redeem-login-token API endpoint.
11
+ */
12
+ var UserRedeemLoginToken = class UserRedeemLoginToken extends require_lib_base_command.AuthenticatedCommand {
13
+ static description = "Redeem a login token to authenticate a user";
14
+ static examples = ["<%= config.bin %> user redeem-login-token --login-token abc123", "<%= config.bin %> user redeem-login-token --login-token abc123 --json"];
15
+ static enableJsonFlag = true;
16
+ static flags = {
17
+ ...require_lib_base_command.AuthenticatedCommand.baseFlags,
18
+ "login-token": _oclif_core.Flags.string({
19
+ description: "Login token to redeem",
20
+ required: true
21
+ })
22
+ };
23
+ static args = {};
24
+ static agentMetadata = {
25
+ api_endpoint: "GET /user/redeem-login-token",
26
+ auth_scope: "read",
27
+ output_shape: { type: "key-value" },
28
+ side_effects: "none"
29
+ };
30
+ async run() {
31
+ const { flags } = await this.parse(UserRedeemLoginToken);
32
+ this.printWorkspaceHeader();
33
+ const { data, error } = await this.apiClient.GET("/user/redeem-login-token", { params: { query: { login_token: flags["login-token"] } } });
34
+ if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
35
+ const resp = data;
36
+ const obj = resp?.data ?? resp;
37
+ if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
38
+ ok: true,
39
+ data: obj,
40
+ summary: "Login token redeemed",
41
+ breadcrumbs: [
42
+ { domain: this.activeWorkspace.domain },
43
+ { resource: "user" },
44
+ { resource: "redeem-login-token" }
45
+ ]
46
+ });
47
+ if (!obj || Object.keys(obj).length === 0) {
48
+ this.log("No data returned.");
49
+ return;
50
+ }
51
+ for (const [k, v] of Object.entries(obj)) this.log(`${k}: ${String(v)}`);
52
+ }
53
+ };
54
+ //#endregion
55
+ module.exports = UserRedeemLoginToken;
@@ -0,0 +1,63 @@
1
+ const require_runtime = require("../../_virtual/_rolldown/runtime.cjs");
2
+ const require_lib_term_map = require("../../lib/term-map.cjs");
3
+ const require_lib_base_command = require("../../lib/base-command.cjs");
4
+ const require_lib_output = require("../../lib/output.cjs");
5
+ let _oclif_core = require("@oclif/core");
6
+ let chalk = require("chalk");
7
+ chalk = require_runtime.__toESM(chalk);
8
+ //#region src/commands/user/send-invitation.ts
9
+ /**
10
+ * User send-invitation command — sends an invitation email to a user (USR-05).
11
+ *
12
+ * Maps to the POST /user/send-invitation API endpoint.
13
+ */
14
+ var UserSendInvitation = class UserSendInvitation extends require_lib_base_command.AuthenticatedCommand {
15
+ static description = "Send an invitation email to a user";
16
+ static examples = [
17
+ "<%= config.bin %> user send-invitation 12345",
18
+ "<%= config.bin %> user send-invitation 12345 --invitation-message \"Welcome to the platform!\"",
19
+ "<%= config.bin %> user send-invitation 12345 --json"
20
+ ];
21
+ static enableJsonFlag = true;
22
+ static flags = {
23
+ ...require_lib_base_command.AuthenticatedCommand.baseFlags,
24
+ "invitation-message": _oclif_core.Flags.string({
25
+ description: "Custom invitation message",
26
+ required: false
27
+ })
28
+ };
29
+ static args = { id: _oclif_core.Args.string({
30
+ description: "User ID",
31
+ required: true
32
+ }) };
33
+ static agentMetadata = {
34
+ api_endpoint: "POST /user/send-invitation",
35
+ auth_scope: "admin",
36
+ output_shape: { type: "key-value" },
37
+ side_effects: "updates"
38
+ };
39
+ async run() {
40
+ const { args, flags } = await this.parse(UserSendInvitation);
41
+ this.printWorkspaceHeader();
42
+ const { data, error } = await this.apiClient.POST("/user/send-invitation", {
43
+ body: {
44
+ user_id: Number(args.id),
45
+ invitation_message: flags["invitation-message"]
46
+ },
47
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
48
+ });
49
+ if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
50
+ this.log(chalk.default.green(`Invitation sent to user ${args.id}`));
51
+ if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
52
+ ok: true,
53
+ data,
54
+ summary: `Invitation sent to user ${args.id}`,
55
+ breadcrumbs: [{ domain: this.activeWorkspace.domain }, {
56
+ resource: "user",
57
+ id: args.id
58
+ }]
59
+ });
60
+ }
61
+ };
62
+ //#endregion
63
+ module.exports = UserSendInvitation;
@@ -0,0 +1,80 @@
1
+ require("../../_virtual/_rolldown/runtime.cjs");
2
+ const require_lib_base_command = require("../../lib/base-command.cjs");
3
+ const require_lib_output = require("../../lib/output.cjs");
4
+ let _oclif_core = require("@oclif/core");
5
+ //#region src/commands/user/tokens.ts
6
+ /**
7
+ * User tokens command — retrieves cross-site tokens for the authenticated user (USR-08).
8
+ *
9
+ * USR-08: /user/tokens is not in the OpenAPI swagger spec but is referenced in AUTH-02.
10
+ * Implemented as best-effort GET with any-typed response.
11
+ *
12
+ * Uses raw fetch instead of apiClient since the endpoint is not in the type system.
13
+ *
14
+ * SECURITY (T-08-13): Tokens printed to stdout intentionally — this is the command's
15
+ * purpose; user controls their terminal.
16
+ */
17
+ var UserTokens = class UserTokens extends require_lib_base_command.AuthenticatedCommand {
18
+ static description = "Retrieve cross-site tokens for the authenticated user";
19
+ static examples = [
20
+ "<%= config.bin %> user tokens",
21
+ "<%= config.bin %> user tokens --no-cross-sites",
22
+ "<%= config.bin %> user tokens --json"
23
+ ];
24
+ static enableJsonFlag = true;
25
+ static flags = {
26
+ ...require_lib_base_command.AuthenticatedCommand.baseFlags,
27
+ "cross-sites": _oclif_core.Flags.boolean({
28
+ description: "Include cross-site tokens",
29
+ default: true,
30
+ allowNo: true,
31
+ required: false
32
+ })
33
+ };
34
+ static args = {};
35
+ static agentMetadata = {
36
+ api_endpoint: "GET /user/tokens",
37
+ auth_scope: "read",
38
+ output_shape: {
39
+ type: "table",
40
+ columns: ["Domain", "Token"]
41
+ },
42
+ side_effects: "none"
43
+ };
44
+ async run() {
45
+ const { flags } = await this.parse(UserTokens);
46
+ this.printWorkspaceHeader();
47
+ const url = new URL("user/tokens", this.apiBaseUrl);
48
+ if (flags["cross-sites"]) url.searchParams.set("cross_sites_p", "1");
49
+ const response = await fetch(url.toString(), { headers: { Authorization: `Bearer ${this.activeWorkspace.bearer_token}` } });
50
+ if (!response.ok) this.error(`API returned ${response.status}: ${response.statusText}`, { exit: 1 });
51
+ let json;
52
+ try {
53
+ json = await response.json();
54
+ } catch {
55
+ this.error(`API returned non-JSON response (status ${response.status})`, { exit: 1 });
56
+ }
57
+ if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
58
+ ok: true,
59
+ data: json,
60
+ summary: "User tokens retrieved",
61
+ breadcrumbs: [
62
+ { domain: this.activeWorkspace.domain },
63
+ { resource: "user" },
64
+ { resource: "tokens" }
65
+ ]
66
+ });
67
+ const rows = Array.isArray(json?.data) ? json.data : json?.data ? [json.data] : [];
68
+ if (rows.length > 0 && (rows[0].domain !== void 0 || rows[0].token !== void 0)) {
69
+ const table = require_lib_output.renderTable(["Domain", "Token"], rows.map((r) => [String(r.domain ?? r.site ?? ""), String(r.token ?? "")]));
70
+ this.log(table.toString());
71
+ } else if (rows.length > 0) for (const item of rows) {
72
+ for (const [k, v] of Object.entries(item)) this.log(`${k}: ${String(v)}`);
73
+ this.log("---");
74
+ }
75
+ else if (json && typeof json === "object") for (const [k, v] of Object.entries(json)) this.log(`${k}: ${String(v)}`);
76
+ else this.log("No tokens found.");
77
+ }
78
+ };
79
+ //#endregion
80
+ module.exports = UserTokens;
@@ -0,0 +1,121 @@
1
+ const require_runtime = require("../../_virtual/_rolldown/runtime.cjs");
2
+ const require_lib_term_map = require("../../lib/term-map.cjs");
3
+ const require_lib_base_command = require("../../lib/base-command.cjs");
4
+ const require_lib_output = require("../../lib/output.cjs");
5
+ let _oclif_core = require("@oclif/core");
6
+ let chalk = require("chalk");
7
+ chalk = require_runtime.__toESM(chalk);
8
+ let node_fs = require("node:fs");
9
+ node_fs = require_runtime.__toESM(node_fs);
10
+ let node_path = require("node:path");
11
+ node_path = require_runtime.__toESM(node_path);
12
+ //#region src/commands/user/update.ts
13
+ /**
14
+ * User update command — updates an existing user's profile (USR-04).
15
+ *
16
+ * CRITICAL (Pitfall 7): user/update uses multipart/form-data (NOT form-urlencoded)
17
+ * because profile_image is a file field. When profile_image is provided, the
18
+ * bodySerializer FormData pattern is used. When no image is provided, standard
19
+ * form-urlencoded is used.
20
+ *
21
+ * Threat mitigations:
22
+ * T-08-12: fs.existsSync validates file path before reading; API validates file type server-side
23
+ * T-08-11: extends AuthenticatedCommand — token presence enforced
24
+ */
25
+ var UserUpdate = class UserUpdate extends require_lib_base_command.AuthenticatedCommand {
26
+ static description = "Update a user profile";
27
+ static examples = [
28
+ "<%= config.bin %> user update 12345 --full-name \"Alice Smith\"",
29
+ "<%= config.bin %> user update 12345 --email alice@example.com",
30
+ "<%= config.bin %> user update 12345 --profile-image ./avatar.jpg",
31
+ "<%= config.bin %> user update 12345 --json"
32
+ ];
33
+ static enableJsonFlag = true;
34
+ static flags = {
35
+ ...require_lib_base_command.AuthenticatedCommand.baseFlags,
36
+ email: _oclif_core.Flags.string({
37
+ description: "New email address",
38
+ required: false
39
+ }),
40
+ "full-name": _oclif_core.Flags.string({
41
+ description: "New full display name",
42
+ required: false
43
+ }),
44
+ password: _oclif_core.Flags.string({
45
+ description: "New password (WARNING: visible in process list and shell history — prefer interactive prompt for sensitive environments)",
46
+ required: false
47
+ }),
48
+ "profile-image": _oclif_core.Flags.string({
49
+ description: "Path to profile image file",
50
+ required: false
51
+ })
52
+ };
53
+ static args = { id: _oclif_core.Args.string({
54
+ description: "User ID",
55
+ required: true
56
+ }) };
57
+ static agentMetadata = {
58
+ api_endpoint: "POST /user/update",
59
+ auth_scope: "admin",
60
+ output_shape: { type: "key-value" },
61
+ side_effects: "updates"
62
+ };
63
+ async run() {
64
+ const { args, flags } = await this.parse(UserUpdate);
65
+ this.printWorkspaceHeader();
66
+ const body = { user_id: Number(args.id) };
67
+ if (flags.email !== void 0) body.email = flags.email;
68
+ if (flags["full-name"] !== void 0) body.full_name = flags["full-name"];
69
+ if (flags.password !== void 0) body.password = flags.password;
70
+ let useMultipart = false;
71
+ if (flags["profile-image"] !== void 0) {
72
+ const imgPath = node_path.resolve(flags["profile-image"]);
73
+ if (!node_fs.existsSync(imgPath)) this.error(`File not found: ${imgPath}`, { exit: 1 });
74
+ const fileName = node_path.basename(imgPath);
75
+ const fileBuffer = node_fs.readFileSync(imgPath);
76
+ body.profile_image = {
77
+ blob: new Blob([fileBuffer]),
78
+ fileName
79
+ };
80
+ useMultipart = true;
81
+ }
82
+ let data;
83
+ let error;
84
+ if (useMultipart) {
85
+ const result = await this.apiClient.POST("/user/update", {
86
+ body,
87
+ bodySerializer(b) {
88
+ const fd = new FormData();
89
+ for (const [k, v] of Object.entries(b)) if (v !== void 0) if (k === "profile_image" && typeof v === "object" && v !== null && "blob" in v) {
90
+ const { blob, fileName: fn } = v;
91
+ fd.append(k, blob, fn);
92
+ } else if (v instanceof Blob) fd.append(k, v);
93
+ else fd.append(k, String(v));
94
+ return fd;
95
+ }
96
+ });
97
+ data = result.data;
98
+ error = result.error;
99
+ } else {
100
+ const result = await this.apiClient.POST("/user/update", {
101
+ body,
102
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
103
+ });
104
+ data = result.data;
105
+ error = result.error;
106
+ }
107
+ if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
108
+ this.log(chalk.default.green(`User ${args.id} updated`));
109
+ if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
110
+ ok: true,
111
+ data,
112
+ summary: `User ${args.id} updated`,
113
+ breadcrumbs: [{ domain: this.activeWorkspace.domain }, {
114
+ resource: "user",
115
+ id: args.id
116
+ }]
117
+ });
118
+ }
119
+ };
120
+ //#endregion
121
+ module.exports = UserUpdate;