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,67 @@
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 _clack_prompts = require("@clack/prompts");
9
+ //#region src/commands/video/delete.ts
10
+ /**
11
+ * Video delete command — deletes a video after confirmation.
12
+ *
13
+ * Prompts user to confirm deletion showing the workspace domain so they know
14
+ * which workspace they are deleting from (T-03-08 repudiation mitigation).
15
+ *
16
+ * --json flag skips the confirmation prompt (scripting mode — assume confirmed).
17
+ *
18
+ * Exit codes:
19
+ * 0 — success
20
+ * 1 — error (video not found, API error)
21
+ * 2 — cancelled (user declined confirmation)
22
+ *
23
+ * Threat mitigations:
24
+ * T-03-08: Confirmation prompt includes workspace domain
25
+ * T-03-09: extends AuthenticatedCommand — anonymous mode rejected
26
+ */
27
+ var VideoDelete = class VideoDelete extends require_lib_base_command.AuthenticatedCommand {
28
+ static description = "Delete a video from the active workspace";
29
+ static examples = ["<%= config.bin %> video delete 12345", "<%= config.bin %> video delete 12345 --json"];
30
+ static enableJsonFlag = true;
31
+ static agentMetadata = {
32
+ api_endpoint: "POST /photo/delete",
33
+ auth_scope: "write",
34
+ output_shape: { type: "key-value" },
35
+ side_effects: "destructive"
36
+ };
37
+ static flags = { ...require_lib_base_command.AuthenticatedCommand.baseFlags };
38
+ static args = { id: _oclif_core.Args.string({
39
+ description: "Video ID",
40
+ required: true
41
+ }) };
42
+ async run() {
43
+ const { args } = await this.parse(VideoDelete);
44
+ this.printWorkspaceHeader();
45
+ if (!this.jsonEnabled()) {
46
+ const confirmed = await (0, _clack_prompts.confirm)({ message: `Delete video ${args.id} from ${this.activeWorkspace.domain}? This cannot be undone.` });
47
+ if ((0, _clack_prompts.isCancel)(confirmed) || !confirmed) process.exit(2);
48
+ }
49
+ const { data: deleteData, error: deleteError } = await this.apiClient.POST("/photo/delete", {
50
+ body: { photo_id: Number(args.id) },
51
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
52
+ });
53
+ if (deleteError) this.error(require_lib_term_map.applyCliTerms(String(deleteError)), { exit: 1 });
54
+ this.log(chalk.default.green(`Video ${args.id} deleted`));
55
+ if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
56
+ ok: true,
57
+ data: deleteData,
58
+ summary: `Video ${args.id} deleted`,
59
+ breadcrumbs: [{ domain: this.activeWorkspace.domain }, {
60
+ resource: "video",
61
+ id: args.id
62
+ }]
63
+ });
64
+ }
65
+ };
66
+ //#endregion
67
+ module.exports = VideoDelete;
@@ -0,0 +1,69 @@
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/video/frame.ts
9
+ /**
10
+ * Video frame command — extracts a frame from a video at a given time offset.
11
+ *
12
+ * Threat mitigations:
13
+ * T-03-09: extends AuthenticatedCommand — anonymous mode rejected
14
+ */
15
+ var VideoFrame = class VideoFrame extends require_lib_base_command.AuthenticatedCommand {
16
+ static description = "Extract a frame from a video";
17
+ static examples = [
18
+ "<%= config.bin %> video frame 12345",
19
+ "<%= config.bin %> video frame 12345 --time 30",
20
+ "<%= config.bin %> video frame 12345 --time 30 --json"
21
+ ];
22
+ static enableJsonFlag = true;
23
+ static agentMetadata = {
24
+ api_endpoint: "POST /photo/frame",
25
+ auth_scope: "write",
26
+ output_shape: { type: "key-value" },
27
+ side_effects: "updates"
28
+ };
29
+ static flags = {
30
+ ...require_lib_base_command.AuthenticatedCommand.baseFlags,
31
+ time: _oclif_core.Flags.integer({
32
+ description: "Time offset in seconds to extract the frame from",
33
+ required: false
34
+ })
35
+ };
36
+ static args = { id: _oclif_core.Args.string({
37
+ description: "Video ID",
38
+ required: true
39
+ }) };
40
+ async run() {
41
+ const { args, flags } = await this.parse(VideoFrame);
42
+ this.printWorkspaceHeader();
43
+ const { data, error } = await this.apiClient.POST("/photo/frame", {
44
+ body: {
45
+ photo_id: Number(args.id),
46
+ ...flags.time !== void 0 && { time: flags.time }
47
+ },
48
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
49
+ });
50
+ if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
51
+ const frameData = data?.data ?? data;
52
+ if (!this.jsonEnabled()) {
53
+ const frameUrl = frameData?.url ?? frameData?.frame_url;
54
+ if (frameUrl) this.log(`Frame extracted: ${chalk.default.cyan(String(frameUrl))}`);
55
+ else this.log(chalk.default.green(`Frame extracted for video ${args.id}`));
56
+ }
57
+ if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
58
+ ok: true,
59
+ data: frameData,
60
+ summary: `Frame extracted for video ${args.id}`,
61
+ breadcrumbs: [{ domain: this.activeWorkspace.domain }, {
62
+ resource: "video",
63
+ id: args.id
64
+ }]
65
+ });
66
+ }
67
+ };
68
+ //#endregion
69
+ module.exports = VideoFrame;
@@ -0,0 +1,68 @@
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/video/get.ts
7
+ /**
8
+ * Video get command — retrieves details of a single video by ID.
9
+ *
10
+ * Uses GET /photo/list?photo_id=<id> as the lookup mechanism — there is no
11
+ * separate /photo/get endpoint (per RESEARCH.md Pitfall 8).
12
+ *
13
+ * Supports --json output with { ok, data, summary, breadcrumbs } shape (CLI-01).
14
+ */
15
+ var VideoGet = class VideoGet extends require_lib_base_command.AuthenticatedCommand {
16
+ static description = "Get details of a specific video";
17
+ static examples = ["<%= config.bin %> video get 12345", "<%= config.bin %> video get 12345 --json"];
18
+ static enableJsonFlag = true;
19
+ static agentMetadata = {
20
+ api_endpoint: "GET /photo/list",
21
+ auth_scope: "read",
22
+ output_shape: { type: "key-value" },
23
+ side_effects: "none"
24
+ };
25
+ static flags = { ...require_lib_base_command.AuthenticatedCommand.baseFlags };
26
+ static args = { id: _oclif_core.Args.string({
27
+ description: "Video ID",
28
+ required: true
29
+ }) };
30
+ async run() {
31
+ const { args } = await this.parse(VideoGet);
32
+ this.printWorkspaceHeader();
33
+ const { data, error } = await this.apiClient.GET("/photo/list", { params: { query: {
34
+ photo_id: Number(args.id),
35
+ include_unpublished_p: 1
36
+ } } });
37
+ if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
38
+ const resp = data;
39
+ let video;
40
+ if (Array.isArray(resp?.data)) video = resp.data[0];
41
+ else if (resp?.data) video = resp.data;
42
+ if (!video) this.error(`Video ${args.id} not found`, { exit: 1 });
43
+ if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
44
+ ok: true,
45
+ data: video,
46
+ summary: video.title ?? `Video ${args.id}`,
47
+ breadcrumbs: [{ domain: this.activeWorkspace.domain }, {
48
+ resource: "video",
49
+ id: args.id
50
+ }]
51
+ });
52
+ const tags = Array.isArray(video.tags) ? video.tags.join(", ") : video.tags ?? "";
53
+ const status = video.video_encoded_p ? "encoded" : "processing";
54
+ const published = video.published_p ? "yes" : "no";
55
+ this.log(`ID: ${video.photo_id ?? args.id}`);
56
+ this.log(`Title: ${require_lib_term_map.applyCliTerms(String(video.title ?? ""))}`);
57
+ this.log(`Description: ${require_lib_term_map.applyCliTerms(String(video.content_text ?? ""))}`);
58
+ this.log(`Duration: ${String(video.video_length_fmt ?? "")}`);
59
+ this.log(`Status: ${status}`);
60
+ this.log(`Published: ${published}`);
61
+ this.log(`Tags: ${require_lib_term_map.applyCliTerms(tags)}`);
62
+ this.log(`Category: ${require_lib_term_map.applyCliTerms(String(video.album_title ?? ""))}`);
63
+ this.log(`Created: ${String(video.creation_date_ansi ?? "")}`);
64
+ this.log(`Updated: ${String(video.publish_date_ansi ?? "")}`);
65
+ }
66
+ };
67
+ //#endregion
68
+ module.exports = VideoGet;
@@ -0,0 +1,11 @@
1
+ require("../../_virtual/_rolldown/runtime.cjs");
2
+ let _oclif_core = require("@oclif/core");
3
+ //#region src/commands/video/index.ts
4
+ var VideoIndex = class extends _oclif_core.Command {
5
+ static description = "Manage videos — upload, list, update, delete, and more";
6
+ async run() {
7
+ this.log("Run \"twentythree video --help\" for available commands");
8
+ }
9
+ };
10
+ //#endregion
11
+ module.exports = VideoIndex;
@@ -0,0 +1,98 @@
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
+ const require_lib_pagination = require("../../lib/pagination.cjs");
6
+ let _oclif_core = require("@oclif/core");
7
+ let chalk = require("chalk");
8
+ chalk = require_runtime.__toESM(chalk);
9
+ //#region src/commands/video/list.ts
10
+ /**
11
+ * Video list command — lists all videos in the active workspace with auto-pagination.
12
+ * Renders a cli-table3 table with columns: ID, Title, Duration, Status, Published, Updated.
13
+ * Supports --json output with { ok, data, summary, breadcrumbs } shape (CLI-01).
14
+ */
15
+ var VideoList = class VideoList extends require_lib_base_command.AuthenticatedCommand {
16
+ static description = "List videos in the active workspace";
17
+ static examples = ["<%= config.bin %> video list", "<%= config.bin %> video list --json"];
18
+ static enableJsonFlag = true;
19
+ static agentMetadata = {
20
+ api_endpoint: "GET /photo/list",
21
+ auth_scope: "read",
22
+ output_shape: {
23
+ type: "table",
24
+ columns: [
25
+ "ID",
26
+ "Title",
27
+ "Duration",
28
+ "Status",
29
+ "Published",
30
+ "Updated"
31
+ ]
32
+ },
33
+ side_effects: "none"
34
+ };
35
+ static flags = {
36
+ ...require_lib_base_command.AuthenticatedCommand.baseFlags,
37
+ limit: _oclif_core.Flags.integer({
38
+ description: "Maximum number of videos to return (default: all)",
39
+ required: false
40
+ }),
41
+ "include-unpublished": _oclif_core.Flags.boolean({
42
+ description: "Include unpublished videos in the results",
43
+ allowNo: true,
44
+ required: false
45
+ }),
46
+ "include-unpublished-p": _oclif_core.Flags.string({
47
+ hidden: true,
48
+ required: false
49
+ })
50
+ };
51
+ static args = {};
52
+ async run() {
53
+ const { flags } = await this.parse(VideoList);
54
+ this.printWorkspaceHeader();
55
+ const videos = await require_lib_pagination.fetchAllPages(async (page, size) => {
56
+ const { data, error } = await this.apiClient.GET("/photo/list", { params: { query: {
57
+ p: page,
58
+ size,
59
+ include_unpublished_p: parseBoolParam(flags["include-unpublished"], flags["include-unpublished-p"]) ? 1 : void 0
60
+ } } });
61
+ if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
62
+ const resp = data;
63
+ return {
64
+ data: Array.isArray(resp?.data) ? resp.data : resp?.data ? [resp.data] : [],
65
+ total_count: resp?.total_count
66
+ };
67
+ });
68
+ if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
69
+ ok: true,
70
+ data: videos,
71
+ summary: `${videos.length} video${videos.length === 1 ? "" : "s"}`,
72
+ breadcrumbs: [{ domain: this.activeWorkspace.domain }, { resource: "video" }]
73
+ });
74
+ if (videos.length === 0) {
75
+ this.log("No videos found.");
76
+ return;
77
+ }
78
+ const table = require_lib_output.renderTable([
79
+ "ID",
80
+ "Title",
81
+ "Duration",
82
+ "Status",
83
+ "Published",
84
+ "Updated"
85
+ ], videos.map((v) => [
86
+ String(v.photo_id ?? ""),
87
+ require_lib_term_map.applyCliTerms(String(v.title ?? "")),
88
+ String(v.video_length_fmt ?? ""),
89
+ v.video_encoded_p ? "encoded" : "processing",
90
+ v.published_p ? "yes" : "no",
91
+ String(v.publish_date_ansi ?? v.creation_date_ansi ?? "")
92
+ ]));
93
+ this.log(table.toString());
94
+ this.log(chalk.default.dim(`${videos.length} video${videos.length === 1 ? "" : "s"}`));
95
+ }
96
+ };
97
+ //#endregion
98
+ module.exports = VideoList;
@@ -0,0 +1,126 @@
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
+ const require_upload_types = require("../../upload/types.cjs");
6
+ const require_upload_chunked_upload = require("../../upload/chunked-upload.cjs");
7
+ let _oclif_core = require("@oclif/core");
8
+ let chalk = require("chalk");
9
+ chalk = require_runtime.__toESM(chalk);
10
+ let node_fs_promises = require("node:fs/promises");
11
+ //#region src/commands/video/replace.ts
12
+ /**
13
+ * Simple inline progress bar that writes directly to stderr using \r.
14
+ * Avoids all TTY-detection issues that afflict cli-progress.
15
+ * T-03-10: shows only byte counts, never the replace_token.
16
+ */
17
+ var ProgressBar = class {
18
+ lastLen = 0;
19
+ render(bytesUploaded, total, speed) {
20
+ const pct = total > 0 ? Math.floor(bytesUploaded / total * 100) : 0;
21
+ const filled = Math.floor(pct / 5);
22
+ const line = `[${"█".repeat(filled) + "░".repeat(20 - filled)}] ${pct}% | ${require_lib_output.formatBytes(bytesUploaded)} / ${require_lib_output.formatBytes(total)} | ${require_lib_output.formatBytes(speed)}/s`;
23
+ const padding = " ".repeat(Math.max(0, this.lastLen - line.length));
24
+ process.stderr.write(`\r${line}${padding}`);
25
+ this.lastLen = line.length;
26
+ }
27
+ finish() {
28
+ process.stderr.write("\n");
29
+ this.lastLen = 0;
30
+ }
31
+ };
32
+ /**
33
+ * Video replace command — replaces a video file using the replace-token flow.
34
+ *
35
+ * Flow:
36
+ * 1. GET /photo/get-replace-token (with photo_id)
37
+ * 2. Upload replacement file in chunks using chunked-upload engine to /photo/replace
38
+ * 3. Display success message; optionally return --json result
39
+ *
40
+ * Threat mitigations:
41
+ * T-03-10: replace_token is never logged — only byte counts shown in progress bar
42
+ * T-03-09: extends AuthenticatedCommand — anonymous mode rejected
43
+ */
44
+ var VideoReplace = class VideoReplace extends require_lib_base_command.AuthenticatedCommand {
45
+ static description = "Replace the video file for an existing video";
46
+ static examples = ["<%= config.bin %> video replace 12345 ./new-video.mp4", "<%= config.bin %> video replace 12345 ./new-video.mp4 --chunk-size 52428800 --concurrency 3"];
47
+ static enableJsonFlag = true;
48
+ static agentMetadata = {
49
+ api_endpoint: "POST /photo/replace",
50
+ auth_scope: "write",
51
+ output_shape: { type: "key-value" },
52
+ side_effects: "updates"
53
+ };
54
+ static flags = {
55
+ ...require_lib_base_command.AuthenticatedCommand.baseFlags,
56
+ "chunk-size": _oclif_core.Flags.integer({
57
+ description: `Chunk size in bytes (default: ${require_upload_types.DEFAULT_CHUNK_SIZE} = 100MB)`,
58
+ default: require_upload_types.DEFAULT_CHUNK_SIZE
59
+ }),
60
+ concurrency: _oclif_core.Flags.integer({
61
+ description: `Number of chunks to upload in parallel (default: 5)`,
62
+ default: 5
63
+ })
64
+ };
65
+ static args = {
66
+ id: _oclif_core.Args.string({
67
+ description: "Video ID to replace",
68
+ required: true
69
+ }),
70
+ file: _oclif_core.Args.string({
71
+ description: "Path to the replacement video file",
72
+ required: true
73
+ })
74
+ };
75
+ async run() {
76
+ const { args, flags } = await this.parse(VideoReplace);
77
+ this.printWorkspaceHeader();
78
+ try {
79
+ await (0, node_fs_promises.stat)(args.file);
80
+ } catch {
81
+ this.error(`File not found: ${args.file}`, { exit: 1 });
82
+ }
83
+ const { data: tokenData, error: tokenError } = await this.apiClient.GET("/photo/get-replace-token", { params: { query: { photo_id: args.id } } });
84
+ if (tokenError) this.error(require_lib_term_map.applyCliTerms(String(tokenError)), { exit: 1 });
85
+ const replaceToken = tokenData?.data?.replace_token;
86
+ if (!replaceToken) this.error("Failed to obtain replace token from API", { exit: 1 });
87
+ const totalBytes = (await (0, node_fs_promises.stat)(args.file)).size;
88
+ const bar = new ProgressBar();
89
+ const startTime = Date.now();
90
+ let result;
91
+ bar.render(0, totalBytes, 0);
92
+ try {
93
+ result = await require_upload_chunked_upload.uploadChunked({
94
+ filePath: args.file,
95
+ uploadToken: replaceToken,
96
+ tokenFieldName: "replace_token",
97
+ uploadUrl: `${this.apiBaseUrl}photo/replace`,
98
+ bearerToken: this.activeWorkspace.bearer_token || void 0,
99
+ chunkSize: flags["chunk-size"],
100
+ concurrency: flags.concurrency,
101
+ onProgress(bytesUploaded, total) {
102
+ const elapsed = (Date.now() - startTime) / 1e3;
103
+ const speed = elapsed > 0 ? bytesUploaded / elapsed : 0;
104
+ bar.render(bytesUploaded, total, speed);
105
+ }
106
+ });
107
+ } finally {
108
+ bar.finish();
109
+ }
110
+ const adminUrl = `https://${this.activeWorkspace.domain}/manage/video/${args.id}`;
111
+ this.log(chalk.default.green(`Video ${args.id} replaced successfully`));
112
+ this.log(`ID: ${args.id}`);
113
+ this.log(`Admin: ${adminUrl}`);
114
+ if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
115
+ ok: true,
116
+ data: result,
117
+ summary: `Video ${args.id} replaced`,
118
+ breadcrumbs: [{ domain: this.activeWorkspace.domain }, {
119
+ resource: "video",
120
+ id: args.id
121
+ }]
122
+ });
123
+ }
124
+ };
125
+ //#endregion
126
+ module.exports = VideoReplace;
@@ -0,0 +1,73 @@
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/video/section/create.ts
9
+ /**
10
+ * Video section create command — creates a new section (chapter) for a video.
11
+ */
12
+ var VideoSectionCreate = class VideoSectionCreate extends require_lib_base_command.AuthenticatedCommand {
13
+ static description = "Create a new section for a video";
14
+ static examples = ["<%= config.bin %> video section create 12345 --title \"Introduction\" --start-time 0", "<%= config.bin %> video section create 12345 --title \"Chapter 1\" --start-time 30 --description \"First chapter\""];
15
+ static enableJsonFlag = true;
16
+ static agentMetadata = {
17
+ api_endpoint: "POST /photo/section/create",
18
+ auth_scope: "write",
19
+ output_shape: { type: "key-value" },
20
+ side_effects: "creates"
21
+ };
22
+ static flags = {
23
+ ...require_lib_base_command.AuthenticatedCommand.baseFlags,
24
+ title: _oclif_core.Flags.string({
25
+ description: "Section title",
26
+ required: true
27
+ }),
28
+ "start-time": _oclif_core.Flags.integer({
29
+ description: "Start time in seconds",
30
+ required: true
31
+ }),
32
+ description: _oclif_core.Flags.string({
33
+ description: "Section description",
34
+ required: false
35
+ })
36
+ };
37
+ static args = { id: _oclif_core.Args.string({
38
+ description: "Video ID",
39
+ required: true
40
+ }) };
41
+ async run() {
42
+ const { args, flags } = await this.parse(VideoSectionCreate);
43
+ this.printWorkspaceHeader();
44
+ const { data, error } = await this.apiClient.POST("/photo/section/create", {
45
+ body: {
46
+ photo_id: Number(args.id),
47
+ title: flags.title,
48
+ start_time: flags["start-time"],
49
+ ...flags.description !== void 0 && { description: flags.description }
50
+ },
51
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
52
+ });
53
+ if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
54
+ const adminUrl = `https://${this.activeWorkspace.domain}/manage/video/${args.id}`;
55
+ this.log(chalk.default.green(`Section created for video ${args.id}`));
56
+ this.log(`Admin: ${adminUrl}`);
57
+ if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
58
+ ok: true,
59
+ data,
60
+ summary: `Section created for video ${args.id}`,
61
+ breadcrumbs: [
62
+ { domain: this.activeWorkspace.domain },
63
+ {
64
+ resource: "video",
65
+ id: args.id
66
+ },
67
+ { resource: "section" }
68
+ ]
69
+ });
70
+ }
71
+ };
72
+ //#endregion
73
+ module.exports = VideoSectionCreate;
@@ -0,0 +1,78 @@
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 _clack_prompts = require("@clack/prompts");
9
+ //#region src/commands/video/section/delete.ts
10
+ /**
11
+ * Video section delete command — deletes a section after confirmation.
12
+ *
13
+ * Prompts user to confirm deletion showing workspace domain and section ID
14
+ * so they know exactly what is being deleted (T-03-11 repudiation mitigation).
15
+ *
16
+ * --json flag skips the confirmation prompt (scripting mode — assume confirmed).
17
+ *
18
+ * Threat mitigations:
19
+ * T-03-11: Confirmation prompt includes workspace domain and section ID
20
+ * T-03-09: extends AuthenticatedCommand — anonymous mode rejected
21
+ */
22
+ var VideoSectionDelete = class VideoSectionDelete extends require_lib_base_command.AuthenticatedCommand {
23
+ static description = "Delete a section from a video";
24
+ static examples = ["<%= config.bin %> video section delete 12345 --section-id 67", "<%= config.bin %> video section delete 12345 --section-id 67 --json"];
25
+ static enableJsonFlag = true;
26
+ static agentMetadata = {
27
+ api_endpoint: "POST /photo/section/delete",
28
+ auth_scope: "write",
29
+ output_shape: { type: "key-value" },
30
+ side_effects: "destructive"
31
+ };
32
+ static flags = {
33
+ ...require_lib_base_command.AuthenticatedCommand.baseFlags,
34
+ "section-id": _oclif_core.Flags.string({
35
+ description: "Section ID to delete",
36
+ required: true
37
+ })
38
+ };
39
+ static args = { id: _oclif_core.Args.string({
40
+ description: "Video ID",
41
+ required: true
42
+ }) };
43
+ async run() {
44
+ const { args, flags } = await this.parse(VideoSectionDelete);
45
+ this.printWorkspaceHeader();
46
+ if (!this.jsonEnabled()) {
47
+ const confirmed = await (0, _clack_prompts.confirm)({ message: `Delete section ${flags["section-id"]} from video ${args.id} on ${this.activeWorkspace.domain}?` });
48
+ if ((0, _clack_prompts.isCancel)(confirmed) || !confirmed) process.exit(2);
49
+ }
50
+ const { data, error } = await this.apiClient.POST("/photo/section/delete", {
51
+ body: {
52
+ photo_id: Number(args.id),
53
+ section_id: flags["section-id"]
54
+ },
55
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
56
+ });
57
+ if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
58
+ this.log(chalk.default.green(`Section ${flags["section-id"]} deleted from video ${args.id}`));
59
+ if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
60
+ ok: true,
61
+ data,
62
+ summary: `Section ${flags["section-id"]} deleted from video ${args.id}`,
63
+ breadcrumbs: [
64
+ { domain: this.activeWorkspace.domain },
65
+ {
66
+ resource: "video",
67
+ id: args.id
68
+ },
69
+ {
70
+ resource: "section",
71
+ id: flags["section-id"]
72
+ }
73
+ ]
74
+ });
75
+ }
76
+ };
77
+ //#endregion
78
+ module.exports = VideoSectionDelete;
@@ -0,0 +1,11 @@
1
+ require("../../../_virtual/_rolldown/runtime.cjs");
2
+ let _oclif_core = require("@oclif/core");
3
+ //#region src/commands/video/section/index.ts
4
+ var SectionIndex = class extends _oclif_core.Command {
5
+ static description = "Manage video sections (chapters)";
6
+ async run() {
7
+ this.log("Run \"twentythree video section --help\" for available commands");
8
+ }
9
+ };
10
+ //#endregion
11
+ module.exports = SectionIndex;
@@ -0,0 +1,75 @@
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/video/section/list.ts
7
+ /**
8
+ * Video section list command — lists all sections (chapters) for a video.
9
+ */
10
+ var VideoSectionList = class VideoSectionList extends require_lib_base_command.AuthenticatedCommand {
11
+ static description = "List all sections for a video";
12
+ static examples = ["<%= config.bin %> video section list 12345", "<%= config.bin %> video section list 12345 --json"];
13
+ static enableJsonFlag = true;
14
+ static agentMetadata = {
15
+ api_endpoint: "GET /photo/section/list",
16
+ auth_scope: "read",
17
+ output_shape: {
18
+ type: "table",
19
+ columns: [
20
+ "ID",
21
+ "Title",
22
+ "Start Time",
23
+ "Description"
24
+ ]
25
+ },
26
+ side_effects: "none"
27
+ };
28
+ static flags = { ...require_lib_base_command.AuthenticatedCommand.baseFlags };
29
+ static args = { id: _oclif_core.Args.string({
30
+ description: "Video ID",
31
+ required: true
32
+ }) };
33
+ async run() {
34
+ const { args } = await this.parse(VideoSectionList);
35
+ this.printWorkspaceHeader();
36
+ const token = await this.fetchVideoToken(args.id);
37
+ const { data, error } = await this.apiClient.GET("/photo/section/list", { params: { query: {
38
+ photo_id: args.id,
39
+ token
40
+ } } });
41
+ if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
42
+ const sections = data?.sections ?? data?.data ?? [];
43
+ if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
44
+ ok: true,
45
+ data: sections,
46
+ summary: `Sections for video ${args.id}`,
47
+ breadcrumbs: [
48
+ { domain: this.activeWorkspace.domain },
49
+ {
50
+ resource: "video",
51
+ id: args.id
52
+ },
53
+ { resource: "section" }
54
+ ]
55
+ });
56
+ if (sections.length === 0) {
57
+ this.log("No sections found.");
58
+ return;
59
+ }
60
+ const table = require_lib_output.renderTable([
61
+ "ID",
62
+ "Title",
63
+ "Start Time",
64
+ "Description"
65
+ ], sections.map((s) => [
66
+ String(s.section_id ?? s.id ?? ""),
67
+ String(s.title ?? ""),
68
+ s.start_time !== void 0 ? `${s.start_time}s` : "",
69
+ String(s.description ?? "")
70
+ ]));
71
+ this.log(table.toString());
72
+ }
73
+ };
74
+ //#endregion
75
+ module.exports = VideoSectionList;