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,60 @@
|
|
|
1
|
+
const require_lib_term_map = require("../../../lib/term-map.cjs");
|
|
2
|
+
const require_lib_base_command = require("../../../lib/base-command.cjs");
|
|
3
|
+
const require_lib_output = require("../../../lib/output.cjs");
|
|
4
|
+
//#region src/commands/video/subtitle/locales.ts
|
|
5
|
+
/**
|
|
6
|
+
* Video subtitle locales command — lists all available subtitle locales.
|
|
7
|
+
*/
|
|
8
|
+
var VideoSubtitleLocales = class extends require_lib_base_command.AuthenticatedCommand {
|
|
9
|
+
static description = "List all available subtitle locales";
|
|
10
|
+
static examples = ["<%= config.bin %> video subtitle locales", "<%= config.bin %> video subtitle locales --json"];
|
|
11
|
+
static enableJsonFlag = true;
|
|
12
|
+
static agentMetadata = {
|
|
13
|
+
api_endpoint: "GET /photo/subtitle/locales",
|
|
14
|
+
auth_scope: "read",
|
|
15
|
+
output_shape: {
|
|
16
|
+
type: "table",
|
|
17
|
+
columns: [
|
|
18
|
+
"Code",
|
|
19
|
+
"Name",
|
|
20
|
+
"Auto Transcribe",
|
|
21
|
+
"Auto Translate",
|
|
22
|
+
"Live"
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
side_effects: "none"
|
|
26
|
+
};
|
|
27
|
+
static flags = { ...require_lib_base_command.AuthenticatedCommand.baseFlags };
|
|
28
|
+
async run() {
|
|
29
|
+
this.printWorkspaceHeader();
|
|
30
|
+
const { data, error } = await this.apiClient.GET("/photo/subtitle/locales", {});
|
|
31
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
32
|
+
const locales = data?.locales ?? data?.data ?? [];
|
|
33
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
34
|
+
ok: true,
|
|
35
|
+
data: locales,
|
|
36
|
+
summary: "Available subtitle locales",
|
|
37
|
+
breadcrumbs: [{ domain: this.activeWorkspace.domain }, { resource: "subtitle-locales" }]
|
|
38
|
+
});
|
|
39
|
+
if (locales.length === 0) {
|
|
40
|
+
this.log("No locales found.");
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
const table = require_lib_output.renderTable([
|
|
44
|
+
"Code",
|
|
45
|
+
"Name",
|
|
46
|
+
"Auto Transcribe",
|
|
47
|
+
"Auto Translate",
|
|
48
|
+
"Live"
|
|
49
|
+
], locales.map((l) => [
|
|
50
|
+
String(l.locale ?? l.code ?? ""),
|
|
51
|
+
String(l.label ?? l.name ?? ""),
|
|
52
|
+
l.auto_transcribe_p ? "yes" : "no",
|
|
53
|
+
l.auto_translate_p ? "yes" : "no",
|
|
54
|
+
l.live_p ? "yes" : "no"
|
|
55
|
+
]));
|
|
56
|
+
this.log(table.toString());
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
//#endregion
|
|
60
|
+
module.exports = VideoSubtitleLocales;
|
|
@@ -0,0 +1,64 @@
|
|
|
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/subtitle/set-primary.ts
|
|
9
|
+
/**
|
|
10
|
+
* Video subtitle set-primary command — sets a subtitle track as the primary language.
|
|
11
|
+
*/
|
|
12
|
+
var VideoSubtitleSetPrimary = class VideoSubtitleSetPrimary extends require_lib_base_command.AuthenticatedCommand {
|
|
13
|
+
static description = "Set a subtitle track as the primary language for a video";
|
|
14
|
+
static examples = ["<%= config.bin %> video subtitle set-primary 12345 --subtitle-id en_US", "<%= config.bin %> video subtitle set-primary 12345 --subtitle-id fr_FR --json"];
|
|
15
|
+
static enableJsonFlag = true;
|
|
16
|
+
static agentMetadata = {
|
|
17
|
+
api_endpoint: "POST /photo/subtitle/set-primary",
|
|
18
|
+
auth_scope: "write",
|
|
19
|
+
output_shape: { type: "key-value" },
|
|
20
|
+
side_effects: "updates"
|
|
21
|
+
};
|
|
22
|
+
static flags = {
|
|
23
|
+
...require_lib_base_command.AuthenticatedCommand.baseFlags,
|
|
24
|
+
"subtitle-id": _oclif_core.Flags.string({
|
|
25
|
+
description: "Locale of the subtitle track to set as primary (e.g. en_US)",
|
|
26
|
+
required: true
|
|
27
|
+
})
|
|
28
|
+
};
|
|
29
|
+
static args = { id: _oclif_core.Args.string({
|
|
30
|
+
description: "Video ID",
|
|
31
|
+
required: true
|
|
32
|
+
}) };
|
|
33
|
+
async run() {
|
|
34
|
+
const { args, flags } = await this.parse(VideoSubtitleSetPrimary);
|
|
35
|
+
this.printWorkspaceHeader();
|
|
36
|
+
const { data, error } = await this.apiClient.POST("/photo/subtitle/set-primary", {
|
|
37
|
+
body: {
|
|
38
|
+
photo_id: Number(args.id),
|
|
39
|
+
locale: flags["subtitle-id"]
|
|
40
|
+
},
|
|
41
|
+
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
42
|
+
});
|
|
43
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
44
|
+
this.log(chalk.default.green(`Subtitle track "${flags["subtitle-id"]}" set as primary language for video ${args.id}`));
|
|
45
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
46
|
+
ok: true,
|
|
47
|
+
data,
|
|
48
|
+
summary: `Subtitle track "${flags["subtitle-id"]}" set as primary language for video ${args.id}`,
|
|
49
|
+
breadcrumbs: [
|
|
50
|
+
{ domain: this.activeWorkspace.domain },
|
|
51
|
+
{
|
|
52
|
+
resource: "video",
|
|
53
|
+
id: args.id
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
resource: "subtitle",
|
|
57
|
+
id: flags["subtitle-id"]
|
|
58
|
+
}
|
|
59
|
+
]
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
//#endregion
|
|
64
|
+
module.exports = VideoSubtitleSetPrimary;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
const require_lib_term_map = require("../../../lib/term-map.cjs");
|
|
2
|
+
const require_lib_base_command = require("../../../lib/base-command.cjs");
|
|
3
|
+
const require_lib_output = require("../../../lib/output.cjs");
|
|
4
|
+
//#region src/commands/video/subtitle/types.ts
|
|
5
|
+
/**
|
|
6
|
+
* Video subtitle types command — lists all available subtitle types.
|
|
7
|
+
*/
|
|
8
|
+
var VideoSubtitleTypes = class extends require_lib_base_command.AuthenticatedCommand {
|
|
9
|
+
static description = "List all available subtitle types";
|
|
10
|
+
static examples = ["<%= config.bin %> video subtitle types", "<%= config.bin %> video subtitle types --json"];
|
|
11
|
+
static enableJsonFlag = true;
|
|
12
|
+
static agentMetadata = {
|
|
13
|
+
api_endpoint: "GET /photo/subtitle/types",
|
|
14
|
+
auth_scope: "read",
|
|
15
|
+
output_shape: {
|
|
16
|
+
type: "table",
|
|
17
|
+
columns: ["Type", "Label"]
|
|
18
|
+
},
|
|
19
|
+
side_effects: "none"
|
|
20
|
+
};
|
|
21
|
+
static flags = { ...require_lib_base_command.AuthenticatedCommand.baseFlags };
|
|
22
|
+
async run() {
|
|
23
|
+
this.printWorkspaceHeader();
|
|
24
|
+
const { data, error } = await this.apiClient.GET("/photo/subtitle/types", {});
|
|
25
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
26
|
+
const types = data?.types ?? data?.data ?? [];
|
|
27
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
28
|
+
ok: true,
|
|
29
|
+
data: types,
|
|
30
|
+
summary: "Available subtitle types",
|
|
31
|
+
breadcrumbs: [{ domain: this.activeWorkspace.domain }, { resource: "subtitle-types" }]
|
|
32
|
+
});
|
|
33
|
+
if (types.length === 0) {
|
|
34
|
+
this.log("No subtitle types found.");
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
const table = require_lib_output.renderTable(["Type", "Label"], types.map((t) => [String(t.type ?? t.value ?? ""), String(t.label ?? t.name ?? "")]));
|
|
38
|
+
this.log(table.toString());
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
//#endregion
|
|
42
|
+
module.exports = VideoSubtitleTypes;
|
|
@@ -0,0 +1,93 @@
|
|
|
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/subtitle/update.ts
|
|
9
|
+
/**
|
|
10
|
+
* Video subtitle update command — updates metadata for an existing subtitle track.
|
|
11
|
+
* Only provided flags are sent to the API.
|
|
12
|
+
*/
|
|
13
|
+
var VideoSubtitleUpdate = class VideoSubtitleUpdate extends require_lib_base_command.AuthenticatedCommand {
|
|
14
|
+
static description = "Update a subtitle track for a video";
|
|
15
|
+
static examples = ["<%= config.bin %> video subtitle update 12345 --subtitle-id en_US --draft false", "<%= config.bin %> video subtitle update 12345 --subtitle-id en_US --type closedcaptions"];
|
|
16
|
+
static enableJsonFlag = true;
|
|
17
|
+
static agentMetadata = {
|
|
18
|
+
api_endpoint: "POST /photo/subtitle/update",
|
|
19
|
+
auth_scope: "write",
|
|
20
|
+
output_shape: { type: "key-value" },
|
|
21
|
+
side_effects: "updates"
|
|
22
|
+
};
|
|
23
|
+
static flags = {
|
|
24
|
+
...require_lib_base_command.AuthenticatedCommand.baseFlags,
|
|
25
|
+
"subtitle-id": _oclif_core.Flags.string({
|
|
26
|
+
description: "Locale of the subtitle track to update (e.g. en_US)",
|
|
27
|
+
required: true
|
|
28
|
+
}),
|
|
29
|
+
type: _oclif_core.Flags.string({
|
|
30
|
+
description: "New subtitle type (general, closedcaptions, audiodescriptions)",
|
|
31
|
+
required: false
|
|
32
|
+
}),
|
|
33
|
+
draft: _oclif_core.Flags.boolean({
|
|
34
|
+
description: "Set draft status (true = hidden, false = published)",
|
|
35
|
+
required: false,
|
|
36
|
+
allowNo: true
|
|
37
|
+
}),
|
|
38
|
+
default: _oclif_core.Flags.boolean({
|
|
39
|
+
description: "Set this subtitle track as the default",
|
|
40
|
+
required: false,
|
|
41
|
+
allowNo: true
|
|
42
|
+
}),
|
|
43
|
+
"draft-p": _oclif_core.Flags.string({
|
|
44
|
+
hidden: true,
|
|
45
|
+
required: false
|
|
46
|
+
}),
|
|
47
|
+
"default-p": _oclif_core.Flags.string({
|
|
48
|
+
hidden: true,
|
|
49
|
+
required: false
|
|
50
|
+
})
|
|
51
|
+
};
|
|
52
|
+
static args = { id: _oclif_core.Args.string({
|
|
53
|
+
description: "Video ID",
|
|
54
|
+
required: true
|
|
55
|
+
}) };
|
|
56
|
+
async run() {
|
|
57
|
+
const { args, flags } = await this.parse(VideoSubtitleUpdate);
|
|
58
|
+
this.printWorkspaceHeader();
|
|
59
|
+
const body = {
|
|
60
|
+
photo_id: Number(args.id),
|
|
61
|
+
locale: flags["subtitle-id"]
|
|
62
|
+
};
|
|
63
|
+
if (flags.type !== void 0) body.type = flags.type;
|
|
64
|
+
const draftVal = parseBoolParam(flags.draft, flags["draft-p"]);
|
|
65
|
+
const defaultVal = parseBoolParam(flags.default, flags["default-p"]);
|
|
66
|
+
if (draftVal !== void 0) body.draft_p = draftVal;
|
|
67
|
+
if (defaultVal !== void 0) body.default_p = defaultVal;
|
|
68
|
+
const { data, error } = await this.apiClient.POST("/photo/subtitle/update", {
|
|
69
|
+
body,
|
|
70
|
+
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
71
|
+
});
|
|
72
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
73
|
+
this.log(chalk.default.green(`Subtitle track ${flags["subtitle-id"]} updated for video ${args.id}`));
|
|
74
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
75
|
+
ok: true,
|
|
76
|
+
data,
|
|
77
|
+
summary: `Subtitle track ${flags["subtitle-id"]} updated for video ${args.id}`,
|
|
78
|
+
breadcrumbs: [
|
|
79
|
+
{ domain: this.activeWorkspace.domain },
|
|
80
|
+
{
|
|
81
|
+
resource: "video",
|
|
82
|
+
id: args.id
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
resource: "subtitle",
|
|
86
|
+
id: flags["subtitle-id"]
|
|
87
|
+
}
|
|
88
|
+
]
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
//#endregion
|
|
93
|
+
module.exports = VideoSubtitleUpdate;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
const require_runtime = require("../../../_virtual/_rolldown/runtime.cjs");
|
|
2
|
+
const require_lib_term_map = require("../../../lib/term-map.cjs");
|
|
3
|
+
const require_lib_base_command = require("../../../lib/base-command.cjs");
|
|
4
|
+
const require_lib_output = require("../../../lib/output.cjs");
|
|
5
|
+
let _oclif_core = require("@oclif/core");
|
|
6
|
+
let chalk = require("chalk");
|
|
7
|
+
chalk = require_runtime.__toESM(chalk);
|
|
8
|
+
let node_fs = require("node:fs");
|
|
9
|
+
node_fs = require_runtime.__toESM(node_fs);
|
|
10
|
+
let node_path = require("node:path");
|
|
11
|
+
node_path = require_runtime.__toESM(node_path);
|
|
12
|
+
//#region src/commands/video/subtitle/upload.ts
|
|
13
|
+
/**
|
|
14
|
+
* Video subtitle upload command — uploads an SRT or WebVTT subtitle file.
|
|
15
|
+
*
|
|
16
|
+
* Uses direct multipart POST with bodySerializer to create FormData.
|
|
17
|
+
* This is NOT the chunked upload engine — subtitle files are small text files.
|
|
18
|
+
*/
|
|
19
|
+
var VideoSubtitleUpload = class VideoSubtitleUpload extends require_lib_base_command.AuthenticatedCommand {
|
|
20
|
+
static description = "Upload a subtitle file (SRT or WebVTT) for a video";
|
|
21
|
+
static examples = [
|
|
22
|
+
"<%= config.bin %> video subtitle upload 12345 ./subtitles.srt --locale en_US",
|
|
23
|
+
"<%= config.bin %> video subtitle upload 12345 ./captions.vtt --locale fr_FR --type closedcaptions",
|
|
24
|
+
"<%= config.bin %> video subtitle upload 12345 ./subtitles.srt --locale en_US --draft"
|
|
25
|
+
];
|
|
26
|
+
static enableJsonFlag = true;
|
|
27
|
+
static agentMetadata = {
|
|
28
|
+
api_endpoint: "POST /photo/subtitle/upload",
|
|
29
|
+
auth_scope: "write",
|
|
30
|
+
output_shape: { type: "key-value" },
|
|
31
|
+
side_effects: "creates"
|
|
32
|
+
};
|
|
33
|
+
static flags = {
|
|
34
|
+
...require_lib_base_command.AuthenticatedCommand.baseFlags,
|
|
35
|
+
locale: _oclif_core.Flags.string({
|
|
36
|
+
description: "Locale for the subtitle track (e.g. en_US, fr_FR)",
|
|
37
|
+
required: true
|
|
38
|
+
}),
|
|
39
|
+
type: _oclif_core.Flags.string({
|
|
40
|
+
description: "Subtitle type (general, closedcaptions, audiodescriptions)",
|
|
41
|
+
default: "general"
|
|
42
|
+
}),
|
|
43
|
+
draft: _oclif_core.Flags.boolean({
|
|
44
|
+
description: "Upload as a draft (hidden from viewers until published)",
|
|
45
|
+
allowNo: true,
|
|
46
|
+
required: false
|
|
47
|
+
}),
|
|
48
|
+
"draft-p": _oclif_core.Flags.string({
|
|
49
|
+
hidden: true,
|
|
50
|
+
required: false
|
|
51
|
+
})
|
|
52
|
+
};
|
|
53
|
+
static args = {
|
|
54
|
+
id: _oclif_core.Args.string({
|
|
55
|
+
description: "Video ID",
|
|
56
|
+
required: true
|
|
57
|
+
}),
|
|
58
|
+
file: _oclif_core.Args.string({
|
|
59
|
+
description: "Path to the subtitle file (SRT or WebVTT)",
|
|
60
|
+
required: true
|
|
61
|
+
})
|
|
62
|
+
};
|
|
63
|
+
async run() {
|
|
64
|
+
const { args, flags } = await this.parse(VideoSubtitleUpload);
|
|
65
|
+
this.printWorkspaceHeader();
|
|
66
|
+
const filePath = node_path.resolve(args.file);
|
|
67
|
+
if (!node_fs.existsSync(filePath)) this.error(`File not found: ${filePath}`, { exit: 1 });
|
|
68
|
+
const fileBuffer = node_fs.readFileSync(filePath);
|
|
69
|
+
const fileName = node_path.basename(filePath);
|
|
70
|
+
const fileBlob = new Blob([fileBuffer], { type: "text/plain" });
|
|
71
|
+
const { data, error } = await this.apiClient.POST("/photo/subtitle/upload", {
|
|
72
|
+
body: {
|
|
73
|
+
photo_id: Number(args.id),
|
|
74
|
+
file: fileBlob,
|
|
75
|
+
locale: flags.locale,
|
|
76
|
+
type: flags.type,
|
|
77
|
+
...parseBoolParam(flags.draft, flags["draft-p"]) !== void 0 && { draft_p: parseBoolParam(flags.draft, flags["draft-p"]) }
|
|
78
|
+
},
|
|
79
|
+
bodySerializer(body) {
|
|
80
|
+
const fd = new FormData();
|
|
81
|
+
for (const [k, v] of Object.entries(body)) if (v !== void 0) if (v instanceof Blob) fd.append(k, v, fileName);
|
|
82
|
+
else fd.append(k, String(v));
|
|
83
|
+
return fd;
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
87
|
+
this.log(chalk.default.green(`Subtitle file uploaded for video ${args.id} (locale: ${flags.locale})`));
|
|
88
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
89
|
+
ok: true,
|
|
90
|
+
data,
|
|
91
|
+
summary: `Subtitle file uploaded for video ${args.id} (locale: ${flags.locale})`,
|
|
92
|
+
breadcrumbs: [
|
|
93
|
+
{ domain: this.activeWorkspace.domain },
|
|
94
|
+
{
|
|
95
|
+
resource: "video",
|
|
96
|
+
id: args.id
|
|
97
|
+
},
|
|
98
|
+
{ resource: "subtitle" }
|
|
99
|
+
]
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
//#endregion
|
|
104
|
+
module.exports = VideoSubtitleUpload;
|
|
@@ -0,0 +1,71 @@
|
|
|
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/transcoding-progress.ts
|
|
7
|
+
/**
|
|
8
|
+
* Video transcoding-progress command — checks transcoding status for a video.
|
|
9
|
+
*
|
|
10
|
+
* Threat mitigations:
|
|
11
|
+
* T-03-09: extends AuthenticatedCommand — anonymous mode rejected
|
|
12
|
+
*/
|
|
13
|
+
var VideoTranscodingProgress = class VideoTranscodingProgress extends require_lib_base_command.AuthenticatedCommand {
|
|
14
|
+
static description = "Check the transcoding progress for a video";
|
|
15
|
+
static examples = ["<%= config.bin %> video transcoding-progress 12345", "<%= config.bin %> video transcoding-progress 12345 --json"];
|
|
16
|
+
static enableJsonFlag = true;
|
|
17
|
+
static agentMetadata = {
|
|
18
|
+
api_endpoint: "GET /photo/get-transcoding-progress",
|
|
19
|
+
auth_scope: "read",
|
|
20
|
+
output_shape: { type: "key-value" },
|
|
21
|
+
side_effects: "none"
|
|
22
|
+
};
|
|
23
|
+
static flags = { ...require_lib_base_command.AuthenticatedCommand.baseFlags };
|
|
24
|
+
static args = { id: _oclif_core.Args.string({
|
|
25
|
+
description: "Video ID",
|
|
26
|
+
required: true
|
|
27
|
+
}) };
|
|
28
|
+
async run() {
|
|
29
|
+
const { args } = await this.parse(VideoTranscodingProgress);
|
|
30
|
+
this.printWorkspaceHeader();
|
|
31
|
+
const { data, error } = await this.apiClient.GET("/photo/get-transcoding-progress", { params: { query: { photo_id: args.id } } });
|
|
32
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
33
|
+
const progressData = data?.data ?? data;
|
|
34
|
+
if (!this.jsonEnabled()) {
|
|
35
|
+
const d = progressData;
|
|
36
|
+
const SKIP = new Set(["all", "video_mobile_high_projected_finish"]);
|
|
37
|
+
const FORMAT_LABELS = {
|
|
38
|
+
video_frames: "Frames",
|
|
39
|
+
analysis: "Analysis",
|
|
40
|
+
video_4k: "4K",
|
|
41
|
+
video_hd: "HD",
|
|
42
|
+
video_1080p: "1080p",
|
|
43
|
+
video_mobile_high: "Mobile (high)",
|
|
44
|
+
video_mobile_low: "Mobile (low)"
|
|
45
|
+
};
|
|
46
|
+
const entries = Object.entries(d ?? {}).filter(([k, v]) => !SKIP.has(k) && typeof v === "string" && !isNaN(parseFloat(v)));
|
|
47
|
+
if (entries.length === 0) {
|
|
48
|
+
this.log("No transcoding data available.");
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
for (const [key, val] of entries) {
|
|
52
|
+
const pct = Math.round(parseFloat(val) * 100);
|
|
53
|
+
const label = FORMAT_LABELS[key] ?? key;
|
|
54
|
+
const filled = Math.floor(pct / 5);
|
|
55
|
+
const bar = "█".repeat(filled) + "░".repeat(20 - filled);
|
|
56
|
+
this.log(` ${label.padEnd(14)} [${bar}] ${String(pct).padStart(3)}%`);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
60
|
+
ok: true,
|
|
61
|
+
data: progressData,
|
|
62
|
+
summary: `Transcoding progress for video ${args.id}`,
|
|
63
|
+
breadcrumbs: [{ domain: this.activeWorkspace.domain }, {
|
|
64
|
+
resource: "video",
|
|
65
|
+
id: args.id
|
|
66
|
+
}]
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
//#endregion
|
|
71
|
+
module.exports = VideoTranscodingProgress;
|
|
@@ -0,0 +1,184 @@
|
|
|
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/update.ts
|
|
10
|
+
/**
|
|
11
|
+
* Video update command — updates metadata for an existing video.
|
|
12
|
+
*
|
|
13
|
+
* Two modes:
|
|
14
|
+
* - Flag mode: only the flags explicitly provided are sent to the API (Pitfall 3 mitigation)
|
|
15
|
+
* - Interactive mode: triggered when no metadata flags provided and not --json;
|
|
16
|
+
* uses @clack/prompts with current values pre-filled
|
|
17
|
+
*
|
|
18
|
+
* Threat mitigations:
|
|
19
|
+
* T-03-07: Only sends fields user explicitly provided (T-03-07 tampering mitigation)
|
|
20
|
+
* args.id is coerced to Number to validate it is numeric
|
|
21
|
+
* T-03-09: extends AuthenticatedCommand — anonymous mode rejected
|
|
22
|
+
*/
|
|
23
|
+
var VideoUpdate = class VideoUpdate extends require_lib_base_command.AuthenticatedCommand {
|
|
24
|
+
static description = "Update metadata for a video";
|
|
25
|
+
static examples = [
|
|
26
|
+
"<%= config.bin %> video update 12345 --title \"New Title\"",
|
|
27
|
+
"<%= config.bin %> video update 12345 --publish",
|
|
28
|
+
"<%= config.bin %> video update 12345"
|
|
29
|
+
];
|
|
30
|
+
static enableJsonFlag = true;
|
|
31
|
+
static agentMetadata = {
|
|
32
|
+
api_endpoint: "POST /photo/update",
|
|
33
|
+
auth_scope: "write",
|
|
34
|
+
output_shape: { type: "key-value" },
|
|
35
|
+
side_effects: "updates"
|
|
36
|
+
};
|
|
37
|
+
static flags = {
|
|
38
|
+
...require_lib_base_command.AuthenticatedCommand.baseFlags,
|
|
39
|
+
title: _oclif_core.Flags.string({
|
|
40
|
+
description: "New title for the video",
|
|
41
|
+
required: false
|
|
42
|
+
}),
|
|
43
|
+
description: _oclif_core.Flags.string({
|
|
44
|
+
description: "New description for the video",
|
|
45
|
+
required: false
|
|
46
|
+
}),
|
|
47
|
+
tags: _oclif_core.Flags.string({
|
|
48
|
+
description: "Space-separated tags (replaces existing tags)",
|
|
49
|
+
required: false
|
|
50
|
+
}),
|
|
51
|
+
"category-id": _oclif_core.Flags.string({
|
|
52
|
+
description: "Category ID (or comma-separated IDs) to assign the video to",
|
|
53
|
+
required: false
|
|
54
|
+
}),
|
|
55
|
+
publish: _oclif_core.Flags.boolean({
|
|
56
|
+
description: "Publish or unpublish the video",
|
|
57
|
+
allowNo: true,
|
|
58
|
+
required: false
|
|
59
|
+
}),
|
|
60
|
+
promote: _oclif_core.Flags.boolean({
|
|
61
|
+
description: "Promote or demote the video",
|
|
62
|
+
allowNo: true,
|
|
63
|
+
required: false
|
|
64
|
+
}),
|
|
65
|
+
"publish-date": _oclif_core.Flags.string({
|
|
66
|
+
description: "Scheduled publish date/time (ISO 8601)",
|
|
67
|
+
required: false
|
|
68
|
+
}),
|
|
69
|
+
"360": _oclif_core.Flags.boolean({
|
|
70
|
+
description: "Mark as 360° video",
|
|
71
|
+
allowNo: true,
|
|
72
|
+
required: false
|
|
73
|
+
}),
|
|
74
|
+
"published-p": _oclif_core.Flags.string({
|
|
75
|
+
hidden: true,
|
|
76
|
+
required: false
|
|
77
|
+
}),
|
|
78
|
+
"promoted-p": _oclif_core.Flags.string({
|
|
79
|
+
hidden: true,
|
|
80
|
+
required: false
|
|
81
|
+
}),
|
|
82
|
+
"video-360-p": _oclif_core.Flags.string({
|
|
83
|
+
hidden: true,
|
|
84
|
+
required: false
|
|
85
|
+
})
|
|
86
|
+
};
|
|
87
|
+
static args = { id: _oclif_core.Args.string({
|
|
88
|
+
description: "Video ID",
|
|
89
|
+
required: true
|
|
90
|
+
}) };
|
|
91
|
+
async run() {
|
|
92
|
+
const { args, flags } = await this.parse(VideoUpdate);
|
|
93
|
+
this.printWorkspaceHeader();
|
|
94
|
+
const videoId = Number(args.id);
|
|
95
|
+
if (!Number.isFinite(videoId) || videoId <= 0) this.error(`Invalid video ID: ${args.id}`, { exit: 1 });
|
|
96
|
+
const metadataFlagsProvided = [
|
|
97
|
+
flags.title,
|
|
98
|
+
flags.description,
|
|
99
|
+
flags.tags,
|
|
100
|
+
flags["category-id"],
|
|
101
|
+
flags.publish,
|
|
102
|
+
flags.promote,
|
|
103
|
+
flags["publish-date"],
|
|
104
|
+
flags["360"],
|
|
105
|
+
flags["published-p"],
|
|
106
|
+
flags["promoted-p"],
|
|
107
|
+
flags["video-360-p"]
|
|
108
|
+
].some((v) => v !== void 0);
|
|
109
|
+
const body = { photo_id: videoId };
|
|
110
|
+
if (!metadataFlagsProvided && !this.jsonEnabled()) {
|
|
111
|
+
const { data, error } = await this.apiClient.GET("/photo/list", { params: { query: { photo_id: videoId } } });
|
|
112
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
113
|
+
const resp = data;
|
|
114
|
+
let current;
|
|
115
|
+
if (Array.isArray(resp?.data)) current = resp.data[0];
|
|
116
|
+
else if (resp?.data) current = resp.data;
|
|
117
|
+
if (!current) this.error(`Video ${args.id} not found`, { exit: 1 });
|
|
118
|
+
const currentTags = Array.isArray(current.tags) ? current.tags.join(" ") : current.tags ?? "";
|
|
119
|
+
const titleResult = await (0, _clack_prompts.text)({
|
|
120
|
+
message: "Title",
|
|
121
|
+
initialValue: current.title ?? "",
|
|
122
|
+
placeholder: "Video title"
|
|
123
|
+
});
|
|
124
|
+
if ((0, _clack_prompts.isCancel)(titleResult)) process.exit(2);
|
|
125
|
+
const descriptionResult = await (0, _clack_prompts.text)({
|
|
126
|
+
message: "Description",
|
|
127
|
+
initialValue: current.content_text ?? "",
|
|
128
|
+
placeholder: "Video description"
|
|
129
|
+
});
|
|
130
|
+
if ((0, _clack_prompts.isCancel)(descriptionResult)) process.exit(2);
|
|
131
|
+
const tagsResult = await (0, _clack_prompts.text)({
|
|
132
|
+
message: "Tags (space-separated)",
|
|
133
|
+
initialValue: currentTags,
|
|
134
|
+
placeholder: "tag1 tag2 tag3"
|
|
135
|
+
});
|
|
136
|
+
if ((0, _clack_prompts.isCancel)(tagsResult)) process.exit(2);
|
|
137
|
+
const publishedResult = await (0, _clack_prompts.select)({
|
|
138
|
+
message: "Published",
|
|
139
|
+
options: [{
|
|
140
|
+
value: "yes",
|
|
141
|
+
label: "Yes — published"
|
|
142
|
+
}, {
|
|
143
|
+
value: "no",
|
|
144
|
+
label: "No — unpublished"
|
|
145
|
+
}],
|
|
146
|
+
initialValue: current.published_p ? "yes" : "no"
|
|
147
|
+
});
|
|
148
|
+
if ((0, _clack_prompts.isCancel)(publishedResult)) process.exit(2);
|
|
149
|
+
body.title = titleResult;
|
|
150
|
+
body.description = descriptionResult;
|
|
151
|
+
body.tags = tagsResult;
|
|
152
|
+
body.published_p = publishedResult === "yes" ? 1 : 0;
|
|
153
|
+
} else {
|
|
154
|
+
if (flags.title !== void 0) body.title = flags.title;
|
|
155
|
+
if (flags.description !== void 0) body.description = flags.description;
|
|
156
|
+
if (flags.tags !== void 0) body.tags = flags.tags;
|
|
157
|
+
if (flags["category-id"] !== void 0) body.album_id = flags["category-id"];
|
|
158
|
+
const publishVal = parseBoolParam(flags.publish, flags["published-p"]);
|
|
159
|
+
const promoteVal = parseBoolParam(flags.promote, flags["promoted-p"]);
|
|
160
|
+
const video360Val = parseBoolParam(flags["360"], flags["video-360-p"]);
|
|
161
|
+
if (publishVal !== void 0) body.published_p = publishVal ? 1 : 0;
|
|
162
|
+
if (promoteVal !== void 0) body.promoted_p = promoteVal ? 1 : 0;
|
|
163
|
+
if (flags["publish-date"] !== void 0) body["publish_date"] = flags["publish-date"];
|
|
164
|
+
if (video360Val !== void 0) body.video_360_p = video360Val ? 1 : 0;
|
|
165
|
+
}
|
|
166
|
+
const { data: updateData, error: updateError } = await this.apiClient.POST("/photo/update", {
|
|
167
|
+
body,
|
|
168
|
+
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
169
|
+
});
|
|
170
|
+
if (updateError) this.error(require_lib_term_map.applyCliTerms(String(updateError)), { exit: 1 });
|
|
171
|
+
this.log(chalk.default.green(`Video ${args.id} updated`));
|
|
172
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
173
|
+
ok: true,
|
|
174
|
+
data: updateData,
|
|
175
|
+
summary: `Video ${args.id} updated`,
|
|
176
|
+
breadcrumbs: [{ domain: this.activeWorkspace.domain }, {
|
|
177
|
+
resource: "video",
|
|
178
|
+
id: args.id
|
|
179
|
+
}]
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
};
|
|
183
|
+
//#endregion
|
|
184
|
+
module.exports = VideoUpdate;
|