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.
- package/README.md +25 -0
- package/bin/dev.cmd +2 -0
- package/bin/dev.js +28 -0
- package/bin/run.cmd +2 -0
- package/bin/run.js +23 -0
- package/dist/_virtual/_rolldown/runtime.cjs +23 -0
- package/dist/api/client.cjs +24 -0
- package/dist/api/types.cjs +0 -0
- package/dist/auth/credential-store.cjs +22 -0
- package/dist/auth/token-refresh.cjs +70 -0
- package/dist/auth/workspace-config.cjs +61 -0
- package/dist/commands/action/add.cjs +75 -0
- package/dist/commands/action/delete.cjs +64 -0
- package/dist/commands/action/exclude.cjs +70 -0
- package/dist/commands/action/get.cjs +112 -0
- package/dist/commands/action/include.cjs +70 -0
- package/dist/commands/action/list.cjs +119 -0
- package/dist/commands/action/types.cjs +63 -0
- package/dist/commands/action/update.cjs +86 -0
- package/dist/commands/action/upload.cjs +89 -0
- package/dist/commands/analytics/conversions/index.cjs +83 -0
- package/dist/commands/analytics/conversions/timeseries.cjs +83 -0
- package/dist/commands/analytics/conversions/totals.cjs +83 -0
- package/dist/commands/analytics/live/event-timeseries.cjs +86 -0
- package/dist/commands/analytics/live/event-totals.cjs +86 -0
- package/dist/commands/analytics/live/event.cjs +88 -0
- package/dist/commands/analytics/live/index.cjs +89 -0
- package/dist/commands/analytics/live/timeseries.cjs +85 -0
- package/dist/commands/analytics/live/totals.cjs +85 -0
- package/dist/commands/analytics/live/weekday/timeseries.cjs +85 -0
- package/dist/commands/analytics/live/weekday/totals.cjs +85 -0
- package/dist/commands/analytics/live/weekday.cjs +88 -0
- package/dist/commands/analytics/usage/devices/timeseries.cjs +83 -0
- package/dist/commands/analytics/usage/devices/totals.cjs +86 -0
- package/dist/commands/analytics/usage/devices.cjs +89 -0
- package/dist/commands/analytics/usage/domains/totals.cjs +83 -0
- package/dist/commands/analytics/usage/domains.cjs +89 -0
- package/dist/commands/analytics/usage/locations/totals.cjs +83 -0
- package/dist/commands/analytics/usage/locations.cjs +89 -0
- package/dist/commands/analytics/usage/sourceids/totals.cjs +83 -0
- package/dist/commands/analytics/usage/sourceids.cjs +89 -0
- package/dist/commands/analytics/usage/sources/totals.cjs +83 -0
- package/dist/commands/analytics/usage/sources.cjs +89 -0
- package/dist/commands/analytics/usage/spots/timeseries.cjs +83 -0
- package/dist/commands/analytics/usage/spots/totals.cjs +83 -0
- package/dist/commands/analytics/usage/spots.cjs +89 -0
- package/dist/commands/analytics/usage/storage.cjs +52 -0
- package/dist/commands/analytics/usage/traffic/timeseries.cjs +83 -0
- package/dist/commands/analytics/usage/traffic/totals.cjs +86 -0
- package/dist/commands/analytics/usage/traffic.cjs +89 -0
- package/dist/commands/analytics/video/index.cjs +89 -0
- package/dist/commands/analytics/video/performance/timeseries.cjs +83 -0
- package/dist/commands/analytics/video/performance/totals.cjs +80 -0
- package/dist/commands/analytics/video/performance.cjs +89 -0
- package/dist/commands/analytics/video/published/timeseries.cjs +83 -0
- package/dist/commands/analytics/video/published/totals.cjs +80 -0
- package/dist/commands/analytics/video/published.cjs +89 -0
- package/dist/commands/analytics/video/timeseries.cjs +86 -0
- package/dist/commands/analytics/video/totals.cjs +86 -0
- package/dist/commands/analytics/video/weekday/timeseries.cjs +86 -0
- package/dist/commands/analytics/video/weekday/totals.cjs +83 -0
- package/dist/commands/analytics/video/weekday.cjs +89 -0
- package/dist/commands/app/add.cjs +76 -0
- package/dist/commands/app/delete.cjs +57 -0
- package/dist/commands/app/update.cjs +77 -0
- package/dist/commands/audience/companies.cjs +116 -0
- package/dist/commands/audience/field/list.cjs +83 -0
- package/dist/commands/audience/field/remove.cjs +63 -0
- package/dist/commands/audience/field/set.cjs +78 -0
- package/dist/commands/audience/field/types.cjs +57 -0
- package/dist/commands/audience/funnel.cjs +77 -0
- package/dist/commands/audience/identity-sources.cjs +64 -0
- package/dist/commands/audience/list-collectors.cjs +88 -0
- package/dist/commands/audience/list.cjs +122 -0
- package/dist/commands/audience/metrics.cjs +89 -0
- package/dist/commands/audience/register.cjs +106 -0
- package/dist/commands/audience/remove.cjs +72 -0
- package/dist/commands/audience/search.cjs +106 -0
- package/dist/commands/audience/timelines.cjs +115 -0
- package/dist/commands/audience/unregister.cjs +65 -0
- package/dist/commands/auth/credentials.cjs +89 -0
- package/dist/commands/auth/status.cjs +34 -0
- package/dist/commands/category/create.cjs +80 -0
- package/dist/commands/category/delete.cjs +70 -0
- package/dist/commands/category/index.cjs +11 -0
- package/dist/commands/category/list.cjs +98 -0
- package/dist/commands/category/update.cjs +134 -0
- package/dist/commands/collector/exclude.cjs +56 -0
- package/dist/commands/collector/include.cjs +56 -0
- package/dist/commands/collector/list.cjs +81 -0
- package/dist/commands/comment/add.cjs +102 -0
- package/dist/commands/comment/clone.cjs +59 -0
- package/dist/commands/comment/delete.cjs +55 -0
- package/dist/commands/comment/list.cjs +126 -0
- package/dist/commands/comment/promote.cjs +65 -0
- package/dist/commands/comment/reaction/add.cjs +81 -0
- package/dist/commands/comment/reaction/list.cjs +92 -0
- package/dist/commands/comment/reaction/remove.cjs +81 -0
- package/dist/commands/comment/set-order.cjs +63 -0
- package/dist/commands/comment/update.cjs +63 -0
- package/dist/commands/doctor.cjs +129 -0
- package/dist/commands/openupload/list.cjs +95 -0
- package/dist/commands/openupload/update-file.cjs +85 -0
- package/dist/commands/openupload/upload-file.cjs +130 -0
- package/dist/commands/player/delete.cjs +66 -0
- package/dist/commands/player/embed-versions.cjs +83 -0
- package/dist/commands/player/embed.cjs +134 -0
- package/dist/commands/player/list.cjs +86 -0
- package/dist/commands/player/styles.cjs +70 -0
- package/dist/commands/player/update.cjs +80 -0
- package/dist/commands/poll/add.cjs +84 -0
- package/dist/commands/poll/answer.cjs +89 -0
- package/dist/commands/poll/list.cjs +92 -0
- package/dist/commands/poll/remove.cjs +57 -0
- package/dist/commands/poll/set-options.cjs +84 -0
- package/dist/commands/poll/update.cjs +79 -0
- package/dist/commands/presentation/page/link-locations.cjs +57 -0
- package/dist/commands/presentation/setting/list.cjs +44 -0
- package/dist/commands/presentation/setting/update.cjs +67 -0
- package/dist/commands/protection/protect.cjs +68 -0
- package/dist/commands/protection/unprotect.cjs +65 -0
- package/dist/commands/protection/verify.cjs +80 -0
- package/dist/commands/session/get-token.cjs +75 -0
- package/dist/commands/session/redeem-token.cjs +56 -0
- package/dist/commands/setting/update.cjs +79 -0
- package/dist/commands/site/get.cjs +73 -0
- package/dist/commands/site/search.cjs +93 -0
- package/dist/commands/spot/check.cjs +52 -0
- package/dist/commands/spot/create.cjs +79 -0
- package/dist/commands/spot/delete.cjs +68 -0
- package/dist/commands/spot/list.cjs +120 -0
- package/dist/commands/spot/reset-version.cjs +53 -0
- package/dist/commands/spot/set-videos.cjs +64 -0
- package/dist/commands/spot/update.cjs +78 -0
- package/dist/commands/tag/list.cjs +98 -0
- package/dist/commands/tag/related.cjs +57 -0
- package/dist/commands/thumbnail/add.cjs +66 -0
- package/dist/commands/thumbnail/data.cjs +60 -0
- package/dist/commands/thumbnail/delete.cjs +61 -0
- package/dist/commands/thumbnail/duplicate.cjs +67 -0
- package/dist/commands/thumbnail/file/delete.cjs +71 -0
- package/dist/commands/thumbnail/file/list.cjs +74 -0
- package/dist/commands/thumbnail/file/upload.cjs +79 -0
- package/dist/commands/thumbnail/index.cjs +11 -0
- package/dist/commands/thumbnail/list.cjs +89 -0
- package/dist/commands/thumbnail/update.cjs +87 -0
- package/dist/commands/user/create.cjs +87 -0
- package/dist/commands/user/get-login-token.cjs +72 -0
- package/dist/commands/user/get.cjs +67 -0
- package/dist/commands/user/list.cjs +95 -0
- package/dist/commands/user/redeem-login-token.cjs +55 -0
- package/dist/commands/user/send-invitation.cjs +63 -0
- package/dist/commands/user/tokens.cjs +80 -0
- package/dist/commands/user/update.cjs +121 -0
- package/dist/commands/video/delete.cjs +67 -0
- package/dist/commands/video/frame.cjs +69 -0
- package/dist/commands/video/get.cjs +68 -0
- package/dist/commands/video/index.cjs +11 -0
- package/dist/commands/video/list.cjs +98 -0
- package/dist/commands/video/replace.cjs +126 -0
- package/dist/commands/video/section/create.cjs +73 -0
- package/dist/commands/video/section/delete.cjs +78 -0
- package/dist/commands/video/section/index.cjs +11 -0
- package/dist/commands/video/section/list.cjs +75 -0
- package/dist/commands/video/section/set-thumbnail.cjs +73 -0
- package/dist/commands/video/section/update.cjs +84 -0
- package/dist/commands/video/subtitle/archive.cjs +76 -0
- package/dist/commands/video/subtitle/create.cjs +80 -0
- package/dist/commands/video/subtitle/data.cjs +75 -0
- package/dist/commands/video/subtitle/delete.cjs +84 -0
- package/dist/commands/video/subtitle/duplicate.cjs +89 -0
- package/dist/commands/video/subtitle/index.cjs +11 -0
- package/dist/commands/video/subtitle/list.cjs +94 -0
- package/dist/commands/video/subtitle/locales.cjs +60 -0
- package/dist/commands/video/subtitle/set-primary.cjs +64 -0
- package/dist/commands/video/subtitle/types.cjs +42 -0
- package/dist/commands/video/subtitle/update.cjs +93 -0
- package/dist/commands/video/subtitle/upload.cjs +104 -0
- package/dist/commands/video/transcoding-progress.cjs +71 -0
- package/dist/commands/video/update.cjs +184 -0
- package/dist/commands/video/upload.cjs +151 -0
- package/dist/commands/webhook/events.cjs +68 -0
- package/dist/commands/webhook/list.cjs +64 -0
- package/dist/commands/webhook/sample.cjs +47 -0
- package/dist/commands/webhook/subscribe.cjs +66 -0
- package/dist/commands/webhook/unsubscribe.cjs +71 -0
- package/dist/commands/webinar/attachment/delete.cjs +79 -0
- package/dist/commands/webinar/attachment/list.cjs +94 -0
- package/dist/commands/webinar/attachment/set-hidden.cjs +85 -0
- package/dist/commands/webinar/attachment/upload.cjs +128 -0
- package/dist/commands/webinar/clips.cjs +77 -0
- package/dist/commands/webinar/create.cjs +107 -0
- package/dist/commands/webinar/delete.cjs +62 -0
- package/dist/commands/webinar/highlights.cjs +84 -0
- package/dist/commands/webinar/index.cjs +11 -0
- package/dist/commands/webinar/list-formats.cjs +50 -0
- package/dist/commands/webinar/list.cjs +134 -0
- package/dist/commands/webinar/log.cjs +69 -0
- package/dist/commands/webinar/mail/add.cjs +101 -0
- package/dist/commands/webinar/mail/list.cjs +83 -0
- package/dist/commands/webinar/mail/preview.cjs +75 -0
- package/dist/commands/webinar/mail/remove.cjs +75 -0
- package/dist/commands/webinar/mail/send.cjs +68 -0
- package/dist/commands/webinar/mail/test.cjs +86 -0
- package/dist/commands/webinar/mail/update.cjs +84 -0
- package/dist/commands/webinar/metrics.cjs +59 -0
- package/dist/commands/webinar/queued-video/add.cjs +81 -0
- package/dist/commands/webinar/queued-video/remove.cjs +81 -0
- package/dist/commands/webinar/recording/split.cjs +53 -0
- package/dist/commands/webinar/recording/start.cjs +53 -0
- package/dist/commands/webinar/recording/status.cjs +52 -0
- package/dist/commands/webinar/recording/stop.cjs +53 -0
- package/dist/commands/webinar/repeat.cjs +65 -0
- package/dist/commands/webinar/room/connect.cjs +60 -0
- package/dist/commands/webinar/room/info.cjs +60 -0
- package/dist/commands/webinar/room/send-recording.cjs +59 -0
- package/dist/commands/webinar/room/themes.cjs +63 -0
- package/dist/commands/webinar/section/add.cjs +98 -0
- package/dist/commands/webinar/section/list.cjs +86 -0
- package/dist/commands/webinar/section/remove.cjs +75 -0
- package/dist/commands/webinar/section/update.cjs +85 -0
- package/dist/commands/webinar/series/apply-recurrence.cjs +68 -0
- package/dist/commands/webinar/series/cancel.cjs +73 -0
- package/dist/commands/webinar/series/create.cjs +80 -0
- package/dist/commands/webinar/series/delete.cjs +73 -0
- package/dist/commands/webinar/series/list.cjs +79 -0
- package/dist/commands/webinar/series/mapped-objects.cjs +69 -0
- package/dist/commands/webinar/series/metrics.cjs +57 -0
- package/dist/commands/webinar/series/recurrences.cjs +72 -0
- package/dist/commands/webinar/series/set-ondemand.cjs +67 -0
- package/dist/commands/webinar/series/skip-recurrence.cjs +79 -0
- package/dist/commands/webinar/series/update.cjs +71 -0
- package/dist/commands/webinar/series/upload-thumbnail.cjs +117 -0
- package/dist/commands/webinar/speaker/add-from-speaker.cjs +78 -0
- package/dist/commands/webinar/speaker/add-from-user.cjs +78 -0
- package/dist/commands/webinar/speaker/add.cjs +112 -0
- package/dist/commands/webinar/speaker/cancel-guest-request.cjs +62 -0
- package/dist/commands/webinar/speaker/connection-types.cjs +66 -0
- package/dist/commands/webinar/speaker/library.cjs +59 -0
- package/dist/commands/webinar/speaker/list.cjs +90 -0
- package/dist/commands/webinar/speaker/remove-avatar.cjs +62 -0
- package/dist/commands/webinar/speaker/remove.cjs +69 -0
- package/dist/commands/webinar/speaker/request-guest.cjs +62 -0
- package/dist/commands/webinar/speaker/send-invitation.cjs +62 -0
- package/dist/commands/webinar/speaker/set-avatar.cjs +130 -0
- package/dist/commands/webinar/speaker/set-order.cjs +95 -0
- package/dist/commands/webinar/speaker/update.cjs +90 -0
- package/dist/commands/webinar/transcription/connect.cjs +69 -0
- package/dist/commands/webinar/transcription/list.cjs +88 -0
- package/dist/commands/webinar/transcription/locales.cjs +76 -0
- package/dist/commands/webinar/transcription/transcriptionlist.cjs +67 -0
- package/dist/commands/webinar/update.cjs +192 -0
- package/dist/commands/webinar/upload-image.cjs +133 -0
- package/dist/commands/workspace/list.cjs +47 -0
- package/dist/commands/workspace/use.cjs +52 -0
- package/dist/index.cjs +6 -0
- package/dist/lib/analytics-flags.cjs +60 -0
- package/dist/lib/audit.cjs +44 -0
- package/dist/lib/base-command.cjs +156 -0
- package/dist/lib/output.cjs +82 -0
- package/dist/lib/pagination.cjs +36 -0
- package/dist/lib/term-map.cjs +48 -0
- package/dist/upload/chunk-pool.cjs +47 -0
- package/dist/upload/chunked-upload.cjs +131 -0
- package/dist/upload/types.cjs +9 -0
- package/docs/commands/README.md +31 -0
- package/docs/commands/action/add.md +36 -0
- package/docs/commands/action/delete.md +32 -0
- package/docs/commands/action/exclude.md +38 -0
- package/docs/commands/action/get.md +47 -0
- package/docs/commands/action/include.md +38 -0
- package/docs/commands/action/list.md +43 -0
- package/docs/commands/action/types.md +34 -0
- package/docs/commands/action/update.md +42 -0
- package/docs/commands/action/upload.md +36 -0
- package/docs/commands/action.md +306 -0
- package/docs/commands/analytics/conversions.md +113 -0
- package/docs/commands/analytics/live.md +338 -0
- package/docs/commands/analytics/usage.md +674 -0
- package/docs/commands/analytics/video.md +449 -0
- package/docs/commands/analytics.md +1559 -0
- package/docs/commands/app/add.md +38 -0
- package/docs/commands/app/delete.md +32 -0
- package/docs/commands/app/update.md +41 -0
- package/docs/commands/app.md +101 -0
- package/docs/commands/audience/companies.md +41 -0
- package/docs/commands/audience/field.md +119 -0
- package/docs/commands/audience/funnel.md +38 -0
- package/docs/commands/audience/identity-sources.md +29 -0
- package/docs/commands/audience/list-collectors.md +35 -0
- package/docs/commands/audience/list.md +42 -0
- package/docs/commands/audience/metrics.md +40 -0
- package/docs/commands/audience/register.md +45 -0
- package/docs/commands/audience/remove.md +35 -0
- package/docs/commands/audience/search.md +39 -0
- package/docs/commands/audience/timelines.md +41 -0
- package/docs/commands/audience/unregister.md +36 -0
- package/docs/commands/audience.md +485 -0
- package/docs/commands/auth/credentials.md +23 -0
- package/docs/commands/auth/status.md +27 -0
- package/docs/commands/auth.md +45 -0
- package/docs/commands/category/create.md +36 -0
- package/docs/commands/category/delete.md +32 -0
- package/docs/commands/category/list.md +34 -0
- package/docs/commands/category/update.md +39 -0
- package/docs/commands/category.md +141 -0
- package/docs/commands/collector/exclude.md +33 -0
- package/docs/commands/collector/include.md +33 -0
- package/docs/commands/collector/list.md +37 -0
- package/docs/commands/collector.md +93 -0
- package/docs/commands/comment/add.md +43 -0
- package/docs/commands/comment/clone.md +35 -0
- package/docs/commands/comment/delete.md +32 -0
- package/docs/commands/comment/list.md +42 -0
- package/docs/commands/comment/promote.md +37 -0
- package/docs/commands/comment/reaction.md +106 -0
- package/docs/commands/comment/set-order.md +34 -0
- package/docs/commands/comment/update.md +36 -0
- package/docs/commands/comment.md +330 -0
- package/docs/commands/doctor.md +28 -0
- package/docs/commands/openupload/list.md +36 -0
- package/docs/commands/openupload/update-file.md +40 -0
- package/docs/commands/openupload/upload-file.md +39 -0
- package/docs/commands/openupload.md +105 -0
- package/docs/commands/player/delete.md +32 -0
- package/docs/commands/player/embed-versions.md +34 -0
- package/docs/commands/player/embed.md +51 -0
- package/docs/commands/player/list.md +32 -0
- package/docs/commands/player/styles.md +32 -0
- package/docs/commands/player/update.md +37 -0
- package/docs/commands/player.md +193 -0
- package/docs/commands/poll/add.md +33 -0
- package/docs/commands/poll/answer.md +38 -0
- package/docs/commands/poll/list.md +33 -0
- package/docs/commands/poll/remove.md +32 -0
- package/docs/commands/poll/set-options.md +35 -0
- package/docs/commands/poll/update.md +41 -0
- package/docs/commands/poll.md +187 -0
- package/docs/commands/presentation/page.md +29 -0
- package/docs/commands/presentation/setting.md +58 -0
- package/docs/commands/presentation.md +82 -0
- package/docs/commands/protection/protect.md +37 -0
- package/docs/commands/protection/unprotect.md +34 -0
- package/docs/commands/protection/verify.md +39 -0
- package/docs/commands/protection.md +100 -0
- package/docs/commands/session/get-token.md +38 -0
- package/docs/commands/session/redeem-token.md +32 -0
- package/docs/commands/session.md +65 -0
- package/docs/commands/setting/update.md +37 -0
- package/docs/commands/setting.md +37 -0
- package/docs/commands/site/get.md +35 -0
- package/docs/commands/site/search.md +38 -0
- package/docs/commands/site.md +68 -0
- package/docs/commands/spot/check.md +32 -0
- package/docs/commands/spot/create.md +38 -0
- package/docs/commands/spot/delete.md +32 -0
- package/docs/commands/spot/list.md +43 -0
- package/docs/commands/spot/reset-version.md +32 -0
- package/docs/commands/spot/set-videos.md +35 -0
- package/docs/commands/spot/update.md +40 -0
- package/docs/commands/spot.md +222 -0
- package/docs/commands/tag/list.md +44 -0
- package/docs/commands/tag/related.md +32 -0
- package/docs/commands/tag.md +71 -0
- package/docs/commands/thumbnail/add.md +33 -0
- package/docs/commands/thumbnail/data.md +35 -0
- package/docs/commands/thumbnail/delete.md +32 -0
- package/docs/commands/thumbnail/duplicate.md +37 -0
- package/docs/commands/thumbnail/file.md +90 -0
- package/docs/commands/thumbnail/list.md +37 -0
- package/docs/commands/thumbnail/update.md +44 -0
- package/docs/commands/thumbnail.md +293 -0
- package/docs/commands/user/create.md +41 -0
- package/docs/commands/user/get-login-token.md +37 -0
- package/docs/commands/user/get.md +37 -0
- package/docs/commands/user/list.md +40 -0
- package/docs/commands/user/redeem-login-token.md +32 -0
- package/docs/commands/user/send-invitation.md +37 -0
- package/docs/commands/user/tokens.md +34 -0
- package/docs/commands/user/update.md +44 -0
- package/docs/commands/user.md +267 -0
- package/docs/commands/video/delete.md +32 -0
- package/docs/commands/video/frame.md +37 -0
- package/docs/commands/video/get.md +32 -0
- package/docs/commands/video/list.md +33 -0
- package/docs/commands/video/replace.md +37 -0
- package/docs/commands/video/section.md +177 -0
- package/docs/commands/video/subtitle.md +362 -0
- package/docs/commands/video/transcoding-progress.md +32 -0
- package/docs/commands/video/update.md +45 -0
- package/docs/commands/video/upload.md +44 -0
- package/docs/commands/video.md +801 -0
- package/docs/commands/webhook/events.md +34 -0
- package/docs/commands/webhook/list.md +29 -0
- package/docs/commands/webhook/sample.md +32 -0
- package/docs/commands/webhook/subscribe.md +33 -0
- package/docs/commands/webhook/unsubscribe.md +35 -0
- package/docs/commands/webhook.md +143 -0
- package/docs/commands/webinar/attachment.md +135 -0
- package/docs/commands/webinar/clips.md +32 -0
- package/docs/commands/webinar/create.md +40 -0
- package/docs/commands/webinar/delete.md +32 -0
- package/docs/commands/webinar/highlights.md +37 -0
- package/docs/commands/webinar/list-formats.md +29 -0
- package/docs/commands/webinar/list.md +41 -0
- package/docs/commands/webinar/log.md +32 -0
- package/docs/commands/webinar/mail.md +238 -0
- package/docs/commands/webinar/metrics.md +32 -0
- package/docs/commands/webinar/queued-video.md +65 -0
- package/docs/commands/webinar/recording.md +113 -0
- package/docs/commands/webinar/repeat.md +35 -0
- package/docs/commands/webinar/room.md +110 -0
- package/docs/commands/webinar/section.md +134 -0
- package/docs/commands/webinar/series.md +365 -0
- package/docs/commands/webinar/speaker.md +430 -0
- package/docs/commands/webinar/transcription.md +125 -0
- package/docs/commands/webinar/update.md +43 -0
- package/docs/commands/webinar/upload-image.md +42 -0
- package/docs/commands/webinar.md +2030 -0
- package/docs/commands/workspace/list.md +27 -0
- package/docs/commands/workspace/use.md +32 -0
- package/docs/commands/workspace.md +54 -0
- package/docs/guides/api-spec-upgrade.md +92 -0
- package/docs/guides/getting-started.md +66 -0
- package/oclif.manifest.json +21609 -0
- 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;
|