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,85 @@
|
|
|
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/openupload/update-file.ts
|
|
9
|
+
/**
|
|
10
|
+
* Open upload update-file command — updates metadata for an open upload entry.
|
|
11
|
+
*
|
|
12
|
+
* Requires token-upload-id, token, and upload-key to identify the entry.
|
|
13
|
+
* Optional title, description, and tags can be updated.
|
|
14
|
+
*
|
|
15
|
+
* Threat mitigations:
|
|
16
|
+
* T-08-21: extends AuthenticatedCommand — anonymous mode rejected
|
|
17
|
+
*/
|
|
18
|
+
var OpenuploadUpdateFile = class OpenuploadUpdateFile extends require_lib_base_command.AuthenticatedCommand {
|
|
19
|
+
static description = "Update metadata for an open upload entry";
|
|
20
|
+
static examples = [
|
|
21
|
+
"<%= config.bin %> openupload update-file --token-upload-id 123 --token abc123 --upload-key key456 --title \"My Video\"",
|
|
22
|
+
"<%= config.bin %> openupload update-file --token-upload-id 123 --token abc123 --upload-key key456 --tags \"demo tutorial\"",
|
|
23
|
+
"<%= config.bin %> openupload update-file --token-upload-id 123 --token abc123 --upload-key key456 --json"
|
|
24
|
+
];
|
|
25
|
+
static enableJsonFlag = true;
|
|
26
|
+
static flags = {
|
|
27
|
+
...require_lib_base_command.AuthenticatedCommand.baseFlags,
|
|
28
|
+
"token-upload-id": _oclif_core.Flags.string({
|
|
29
|
+
description: "Open upload token upload ID",
|
|
30
|
+
required: true
|
|
31
|
+
}),
|
|
32
|
+
token: _oclif_core.Flags.string({
|
|
33
|
+
description: "Open upload token",
|
|
34
|
+
required: true
|
|
35
|
+
}),
|
|
36
|
+
"upload-key": _oclif_core.Flags.string({
|
|
37
|
+
description: "Upload key identifying the uploaded file",
|
|
38
|
+
required: true
|
|
39
|
+
}),
|
|
40
|
+
title: _oclif_core.Flags.string({
|
|
41
|
+
description: "New title for the uploaded file",
|
|
42
|
+
required: false
|
|
43
|
+
}),
|
|
44
|
+
description: _oclif_core.Flags.string({
|
|
45
|
+
description: "New description for the uploaded file",
|
|
46
|
+
required: false
|
|
47
|
+
}),
|
|
48
|
+
tags: _oclif_core.Flags.string({
|
|
49
|
+
description: "Tags for the uploaded file (space-separated)",
|
|
50
|
+
required: false
|
|
51
|
+
})
|
|
52
|
+
};
|
|
53
|
+
static agentMetadata = {
|
|
54
|
+
api_endpoint: "POST /openupload/update-file",
|
|
55
|
+
auth_scope: "write",
|
|
56
|
+
output_shape: { type: "key-value" },
|
|
57
|
+
side_effects: "updates"
|
|
58
|
+
};
|
|
59
|
+
async run() {
|
|
60
|
+
const { flags } = await this.parse(OpenuploadUpdateFile);
|
|
61
|
+
this.printWorkspaceHeader();
|
|
62
|
+
const body = {
|
|
63
|
+
token_upload_id: flags["token-upload-id"],
|
|
64
|
+
token: flags.token,
|
|
65
|
+
upload_key: flags["upload-key"]
|
|
66
|
+
};
|
|
67
|
+
if (flags.title !== void 0) body.title = flags.title;
|
|
68
|
+
if (flags.description !== void 0) body.description = flags.description;
|
|
69
|
+
if (flags.tags !== void 0) body.tags = flags.tags;
|
|
70
|
+
const { data: updateData, error: updateError } = await this.apiClient.POST("/openupload/update-file", {
|
|
71
|
+
body,
|
|
72
|
+
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
73
|
+
});
|
|
74
|
+
if (updateError) this.error(require_lib_term_map.applyCliTerms(formatApiError(updateError)), { exit: 1 });
|
|
75
|
+
this.log(chalk.default.green("Open upload entry updated"));
|
|
76
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
77
|
+
ok: true,
|
|
78
|
+
data: updateData,
|
|
79
|
+
summary: "Open upload entry updated",
|
|
80
|
+
breadcrumbs: [{ domain: this.activeWorkspace.domain }, { resource: "openupload" }]
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
//#endregion
|
|
85
|
+
module.exports = OpenuploadUpdateFile;
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
const require_runtime = require("../../_virtual/_rolldown/runtime.cjs");
|
|
2
|
+
const require_lib_base_command = require("../../lib/base-command.cjs");
|
|
3
|
+
const require_lib_output = require("../../lib/output.cjs");
|
|
4
|
+
const require_upload_types = require("../../upload/types.cjs");
|
|
5
|
+
const require_upload_chunked_upload = require("../../upload/chunked-upload.cjs");
|
|
6
|
+
let _oclif_core = require("@oclif/core");
|
|
7
|
+
let chalk = require("chalk");
|
|
8
|
+
chalk = require_runtime.__toESM(chalk);
|
|
9
|
+
let node_fs_promises = require("node:fs/promises");
|
|
10
|
+
//#region src/commands/openupload/upload-file.ts
|
|
11
|
+
/**
|
|
12
|
+
* Simple inline progress bar that writes directly to stderr using \r.
|
|
13
|
+
* T-08-18: shows only byte counts, never the open upload token.
|
|
14
|
+
*/
|
|
15
|
+
var ProgressBar = class {
|
|
16
|
+
lastLen = 0;
|
|
17
|
+
render(bytesUploaded, total, speed) {
|
|
18
|
+
const pct = total > 0 ? Math.floor(bytesUploaded / total * 100) : 0;
|
|
19
|
+
const filled = Math.floor(pct / 5);
|
|
20
|
+
const line = `[${"█".repeat(filled) + "░".repeat(20 - filled)}] ${pct}% | ${require_lib_output.formatBytes(bytesUploaded)} / ${require_lib_output.formatBytes(total)} | ${require_lib_output.formatBytes(speed)}/s`;
|
|
21
|
+
const padding = " ".repeat(Math.max(0, this.lastLen - line.length));
|
|
22
|
+
process.stderr.write(`\r${line}${padding}`);
|
|
23
|
+
this.lastLen = line.length;
|
|
24
|
+
}
|
|
25
|
+
finish() {
|
|
26
|
+
process.stderr.write("\n");
|
|
27
|
+
this.lastLen = 0;
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Open upload file command — uploads a file using the chunked upload engine
|
|
32
|
+
* via an open upload token.
|
|
33
|
+
*
|
|
34
|
+
* CRITICAL (Pitfall 3): tokenFieldName must be 'token', NOT 'upload_token'.
|
|
35
|
+
* The open upload endpoint uses 'token' as the field name for the upload token.
|
|
36
|
+
*
|
|
37
|
+
* Flow:
|
|
38
|
+
* 1. Validate file exists
|
|
39
|
+
* 2. Upload file in chunks via chunked engine with tokenFieldName: 'token'
|
|
40
|
+
* 3. Display success message; optionally return --json result
|
|
41
|
+
*
|
|
42
|
+
* Threat mitigations:
|
|
43
|
+
* T-08-18: Token not logged in progress output — only byte counts shown
|
|
44
|
+
* T-08-19: uploadUrl HTTPS validation enforced by chunked-upload.ts (T-03-02)
|
|
45
|
+
* T-08-21: extends AuthenticatedCommand — anonymous mode rejected
|
|
46
|
+
*/
|
|
47
|
+
var OpenuploadUploadFile = class OpenuploadUploadFile extends require_lib_base_command.AuthenticatedCommand {
|
|
48
|
+
static description = "Upload a file via an open upload token using the chunked upload engine";
|
|
49
|
+
static examples = [
|
|
50
|
+
"<%= config.bin %> openupload upload-file --file-path ./video.mp4 --token-upload-id 123 --token abc123",
|
|
51
|
+
"<%= config.bin %> openupload upload-file --file-path ./video.mp4 --token-upload-id 123 --token abc123 --chunk-size 52428800",
|
|
52
|
+
"<%= config.bin %> openupload upload-file --file-path ./video.mp4 --token-upload-id 123 --token abc123 --json"
|
|
53
|
+
];
|
|
54
|
+
static enableJsonFlag = true;
|
|
55
|
+
static flags = {
|
|
56
|
+
...require_lib_base_command.AuthenticatedCommand.baseFlags,
|
|
57
|
+
"file-path": _oclif_core.Flags.string({
|
|
58
|
+
description: "Path to the file to upload",
|
|
59
|
+
required: true
|
|
60
|
+
}),
|
|
61
|
+
"token-upload-id": _oclif_core.Flags.string({
|
|
62
|
+
description: "Open upload token upload ID",
|
|
63
|
+
required: true
|
|
64
|
+
}),
|
|
65
|
+
token: _oclif_core.Flags.string({
|
|
66
|
+
description: "Open upload token",
|
|
67
|
+
required: true
|
|
68
|
+
}),
|
|
69
|
+
"chunk-size": _oclif_core.Flags.integer({
|
|
70
|
+
description: `Chunk size in bytes (default: ${require_upload_types.DEFAULT_CHUNK_SIZE} = 100MB)`,
|
|
71
|
+
default: require_upload_types.DEFAULT_CHUNK_SIZE
|
|
72
|
+
}),
|
|
73
|
+
concurrency: _oclif_core.Flags.integer({
|
|
74
|
+
description: `Number of chunks to upload in parallel (default: 5)`,
|
|
75
|
+
default: 5
|
|
76
|
+
})
|
|
77
|
+
};
|
|
78
|
+
static agentMetadata = {
|
|
79
|
+
api_endpoint: "POST /openupload/upload-file",
|
|
80
|
+
auth_scope: "write",
|
|
81
|
+
output_shape: { type: "key-value" },
|
|
82
|
+
side_effects: "creates"
|
|
83
|
+
};
|
|
84
|
+
async run() {
|
|
85
|
+
const { flags } = await this.parse(OpenuploadUploadFile);
|
|
86
|
+
this.printWorkspaceHeader();
|
|
87
|
+
let fileStat;
|
|
88
|
+
try {
|
|
89
|
+
fileStat = await (0, node_fs_promises.stat)(flags["file-path"]);
|
|
90
|
+
} catch {
|
|
91
|
+
this.error(`File not found: ${flags["file-path"]}`, { exit: 1 });
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
const totalBytes = fileStat.size;
|
|
95
|
+
const bar = new ProgressBar();
|
|
96
|
+
const startTime = Date.now();
|
|
97
|
+
bar.render(0, totalBytes, 0);
|
|
98
|
+
let result;
|
|
99
|
+
try {
|
|
100
|
+
result = await require_upload_chunked_upload.uploadChunked({
|
|
101
|
+
filePath: flags["file-path"],
|
|
102
|
+
uploadToken: flags.token,
|
|
103
|
+
tokenFieldName: "token",
|
|
104
|
+
uploadUrl: `${this.apiBaseUrl}openupload/upload-file`,
|
|
105
|
+
bearerToken: this.activeWorkspace.bearer_token || void 0,
|
|
106
|
+
chunkSize: flags["chunk-size"],
|
|
107
|
+
concurrency: flags.concurrency,
|
|
108
|
+
extraFields: { token_upload_id: flags["token-upload-id"] },
|
|
109
|
+
onProgress(bytesUploaded, total) {
|
|
110
|
+
const elapsed = (Date.now() - startTime) / 1e3;
|
|
111
|
+
const speed = elapsed > 0 ? bytesUploaded / elapsed : 0;
|
|
112
|
+
bar.render(bytesUploaded, total, speed);
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
} catch (err) {
|
|
116
|
+
bar.finish();
|
|
117
|
+
throw err;
|
|
118
|
+
}
|
|
119
|
+
bar.finish();
|
|
120
|
+
this.log(chalk.default.green("File uploaded via open upload"));
|
|
121
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
122
|
+
ok: true,
|
|
123
|
+
data: result,
|
|
124
|
+
summary: "File uploaded via open upload",
|
|
125
|
+
breadcrumbs: [{ domain: this.activeWorkspace.domain }, { resource: "openupload" }]
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
//#endregion
|
|
130
|
+
module.exports = OpenuploadUploadFile;
|
|
@@ -0,0 +1,66 @@
|
|
|
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/player/delete.ts
|
|
10
|
+
/**
|
|
11
|
+
* Player delete command — deletes a player after confirmation.
|
|
12
|
+
*
|
|
13
|
+
* Prompts user to confirm deletion showing the workspace domain so they know
|
|
14
|
+
* which workspace they are deleting from.
|
|
15
|
+
*
|
|
16
|
+
* --json flag skips the confirmation prompt (scripting mode — assume confirmed).
|
|
17
|
+
*
|
|
18
|
+
* Exit codes:
|
|
19
|
+
* 0 — success
|
|
20
|
+
* 1 — error (player not found, API error)
|
|
21
|
+
* 2 — cancelled (user declined confirmation)
|
|
22
|
+
*
|
|
23
|
+
* Threat mitigations:
|
|
24
|
+
* T-06-07: Confirmation prompt with workspace domain; exit code 2 on cancel
|
|
25
|
+
*/
|
|
26
|
+
var PlayerDelete = class PlayerDelete extends require_lib_base_command.AuthenticatedCommand {
|
|
27
|
+
static description = "Delete a player from the active workspace";
|
|
28
|
+
static agentMetadata = {
|
|
29
|
+
api_endpoint: "POST /player/delete",
|
|
30
|
+
auth_scope: "write",
|
|
31
|
+
output_shape: { type: "none" },
|
|
32
|
+
side_effects: "destructive"
|
|
33
|
+
};
|
|
34
|
+
static examples = ["<%= config.bin %> player delete 42", "<%= config.bin %> player delete 42 --json"];
|
|
35
|
+
static enableJsonFlag = true;
|
|
36
|
+
static flags = { ...require_lib_base_command.AuthenticatedCommand.baseFlags };
|
|
37
|
+
static args = { id: _oclif_core.Args.string({
|
|
38
|
+
description: "Player ID",
|
|
39
|
+
required: true
|
|
40
|
+
}) };
|
|
41
|
+
async run() {
|
|
42
|
+
const { args } = await this.parse(PlayerDelete);
|
|
43
|
+
this.printWorkspaceHeader();
|
|
44
|
+
if (!this.jsonEnabled()) {
|
|
45
|
+
const confirmed = await (0, _clack_prompts.confirm)({ message: `Delete player ${args.id} from ${this.activeWorkspace.domain}? This cannot be undone.` });
|
|
46
|
+
if ((0, _clack_prompts.isCancel)(confirmed) || !confirmed) process.exit(2);
|
|
47
|
+
}
|
|
48
|
+
const { data: deleteData, error: deleteError } = await this.apiClient.POST("/player/delete", {
|
|
49
|
+
body: { player_id: Number(args.id) },
|
|
50
|
+
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
51
|
+
});
|
|
52
|
+
if (deleteError) this.error(require_lib_term_map.applyCliTerms(formatApiError(deleteError)), { exit: 1 });
|
|
53
|
+
this.log(chalk.default.green("Player deleted"));
|
|
54
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
55
|
+
ok: true,
|
|
56
|
+
data: deleteData,
|
|
57
|
+
summary: `Player ${args.id} deleted`,
|
|
58
|
+
breadcrumbs: [{ domain: this.activeWorkspace.domain }, {
|
|
59
|
+
resource: "player",
|
|
60
|
+
id: args.id
|
|
61
|
+
}]
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
//#endregion
|
|
66
|
+
module.exports = PlayerDelete;
|
|
@@ -0,0 +1,83 @@
|
|
|
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/player/embed-versions.ts
|
|
9
|
+
/**
|
|
10
|
+
* Player embed-versions command — lists available embed versions for an object.
|
|
11
|
+
*
|
|
12
|
+
* Returns embed codes and share links across multiple platforms (web players, email clients).
|
|
13
|
+
* Requires --object-type (photo|live|album|site) and --object-id.
|
|
14
|
+
*/
|
|
15
|
+
var PlayerEmbedVersions = class PlayerEmbedVersions extends require_lib_base_command.AuthenticatedCommand {
|
|
16
|
+
static description = "List available embed versions for an object";
|
|
17
|
+
static agentMetadata = {
|
|
18
|
+
api_endpoint: "GET /player/embed-versions",
|
|
19
|
+
auth_scope: "read",
|
|
20
|
+
output_shape: {
|
|
21
|
+
type: "table",
|
|
22
|
+
columns: [
|
|
23
|
+
"Type",
|
|
24
|
+
"Key",
|
|
25
|
+
"Label"
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
side_effects: "none"
|
|
29
|
+
};
|
|
30
|
+
static examples = ["<%= config.bin %> player embed-versions --object-type photo --object-id 123", "<%= config.bin %> player embed-versions --object-type live --object-id 456 --json"];
|
|
31
|
+
static enableJsonFlag = true;
|
|
32
|
+
static flags = {
|
|
33
|
+
...require_lib_base_command.AuthenticatedCommand.baseFlags,
|
|
34
|
+
"object-type": _oclif_core.Flags.string({
|
|
35
|
+
description: "Object type: photo, live, album, or site",
|
|
36
|
+
required: true
|
|
37
|
+
}),
|
|
38
|
+
"object-id": _oclif_core.Flags.string({
|
|
39
|
+
description: "Object ID",
|
|
40
|
+
required: true
|
|
41
|
+
}),
|
|
42
|
+
source: _oclif_core.Flags.string({
|
|
43
|
+
description: "Embed source parameter (e.g. embed, share)",
|
|
44
|
+
required: false
|
|
45
|
+
})
|
|
46
|
+
};
|
|
47
|
+
static args = {};
|
|
48
|
+
async run() {
|
|
49
|
+
const { flags } = await this.parse(PlayerEmbedVersions);
|
|
50
|
+
this.printWorkspaceHeader();
|
|
51
|
+
const { data, error } = await this.apiClient.GET("/player/embed-versions", { params: { query: {
|
|
52
|
+
object_type: flags["object-type"],
|
|
53
|
+
object_id: Number(flags["object-id"]),
|
|
54
|
+
source: flags.source
|
|
55
|
+
} } });
|
|
56
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
57
|
+
const resp = data;
|
|
58
|
+
const items = Array.isArray(resp?.data) ? resp.data : resp?.data ? [resp.data] : [];
|
|
59
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
60
|
+
ok: true,
|
|
61
|
+
data: items,
|
|
62
|
+
summary: `${items.length} embed version${items.length === 1 ? "" : "s"}`,
|
|
63
|
+
breadcrumbs: [{ domain: this.activeWorkspace.domain }, { resource: "player" }]
|
|
64
|
+
});
|
|
65
|
+
if (items.length === 0) {
|
|
66
|
+
this.log("No embed versions found.");
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
const table = require_lib_output.renderTable([
|
|
70
|
+
"Type",
|
|
71
|
+
"Key",
|
|
72
|
+
"Label"
|
|
73
|
+
], items.map((v) => [
|
|
74
|
+
require_lib_term_map.applyCliTerms(String(v.type ?? "")),
|
|
75
|
+
String(v.key ?? ""),
|
|
76
|
+
String(v.label ?? "")
|
|
77
|
+
]));
|
|
78
|
+
this.log(table.toString());
|
|
79
|
+
this.log(chalk.default.dim(`${items.length} embed version${items.length === 1 ? "" : "s"}`));
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
//#endregion
|
|
83
|
+
module.exports = PlayerEmbedVersions;
|
|
@@ -0,0 +1,134 @@
|
|
|
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/player/embed.ts
|
|
7
|
+
/**
|
|
8
|
+
* Player embed command — generates embed code for a video, webinar, or category.
|
|
9
|
+
*
|
|
10
|
+
* CRITICAL: /player/embed returns JSON with data.embed_code — NOT raw HTML.
|
|
11
|
+
* Use apiClient.GET (openapi-fetch), NOT native fetch. Extract embed_code from JSON.
|
|
12
|
+
*
|
|
13
|
+
* Output (D-4): process.stdout.write(embedCode) — pipeable, no trailing newline.
|
|
14
|
+
* In --json mode: returns { ok, data: { embed_code }, summary, breadcrumbs }.
|
|
15
|
+
*
|
|
16
|
+
* Term mappings applied:
|
|
17
|
+
* photo_id → --video-id
|
|
18
|
+
* live_id → --webinar-id
|
|
19
|
+
* album_id → --category-id
|
|
20
|
+
*
|
|
21
|
+
* Threat mitigations:
|
|
22
|
+
* T-06-08: writes only embed_code string to stdout; no credential data exposed
|
|
23
|
+
*/
|
|
24
|
+
var PlayerEmbed = class PlayerEmbed extends require_lib_base_command.AuthenticatedCommand {
|
|
25
|
+
static description = "Generate embed code for a video, webinar, or category";
|
|
26
|
+
static agentMetadata = {
|
|
27
|
+
api_endpoint: "GET /player/embed",
|
|
28
|
+
auth_scope: "anonymous",
|
|
29
|
+
output_shape: { type: "key-value" },
|
|
30
|
+
side_effects: "none"
|
|
31
|
+
};
|
|
32
|
+
static examples = [
|
|
33
|
+
"<%= config.bin %> player embed --video-id 123",
|
|
34
|
+
"<%= config.bin %> player embed --video-id 123 --responsive > embed.html",
|
|
35
|
+
"<%= config.bin %> player embed --webinar-id 456 --iframe",
|
|
36
|
+
"<%= config.bin %> player embed --video-id 123 --json"
|
|
37
|
+
];
|
|
38
|
+
static enableJsonFlag = true;
|
|
39
|
+
static flags = {
|
|
40
|
+
...require_lib_base_command.AuthenticatedCommand.baseFlags,
|
|
41
|
+
"video-id": _oclif_core.Flags.string({
|
|
42
|
+
description: "Video ID to embed (maps to photo_id)",
|
|
43
|
+
required: false
|
|
44
|
+
}),
|
|
45
|
+
"webinar-id": _oclif_core.Flags.string({
|
|
46
|
+
description: "Webinar ID to embed (maps to live_id)",
|
|
47
|
+
required: false
|
|
48
|
+
}),
|
|
49
|
+
"category-id": _oclif_core.Flags.string({
|
|
50
|
+
description: "Category ID to embed (maps to album_id)",
|
|
51
|
+
required: false
|
|
52
|
+
}),
|
|
53
|
+
"player-id": _oclif_core.Flags.string({
|
|
54
|
+
description: "Player ID to use (default: workspace default)",
|
|
55
|
+
required: false
|
|
56
|
+
}),
|
|
57
|
+
url: _oclif_core.Flags.string({
|
|
58
|
+
description: "Workspace URL to resolve to an embed code",
|
|
59
|
+
required: false
|
|
60
|
+
}),
|
|
61
|
+
width: _oclif_core.Flags.integer({
|
|
62
|
+
description: "Desired embed width in pixels",
|
|
63
|
+
required: false
|
|
64
|
+
}),
|
|
65
|
+
height: _oclif_core.Flags.integer({
|
|
66
|
+
description: "Desired embed height in pixels",
|
|
67
|
+
required: false
|
|
68
|
+
}),
|
|
69
|
+
responsive: _oclif_core.Flags.boolean({
|
|
70
|
+
description: "Return a responsive embed code (maps to responsive_p)",
|
|
71
|
+
allowNo: true,
|
|
72
|
+
required: false
|
|
73
|
+
}),
|
|
74
|
+
autoplay: _oclif_core.Flags.boolean({
|
|
75
|
+
description: "Enable auto-play in the embed code (maps to autoplay_p)",
|
|
76
|
+
allowNo: true,
|
|
77
|
+
required: false
|
|
78
|
+
}),
|
|
79
|
+
iframe: _oclif_core.Flags.boolean({
|
|
80
|
+
description: "Return an iframe-based embed code (maps to iframe_p)",
|
|
81
|
+
allowNo: true,
|
|
82
|
+
required: false
|
|
83
|
+
}),
|
|
84
|
+
start: _oclif_core.Flags.integer({
|
|
85
|
+
description: "Start position in seconds",
|
|
86
|
+
required: false
|
|
87
|
+
}),
|
|
88
|
+
"include-unpublished": _oclif_core.Flags.boolean({
|
|
89
|
+
description: "Include unpublished content in player parameters (maps to include_unpublished_p)",
|
|
90
|
+
allowNo: true,
|
|
91
|
+
required: false
|
|
92
|
+
}),
|
|
93
|
+
token: _oclif_core.Flags.string({
|
|
94
|
+
description: "Video token for private or token-protected videos",
|
|
95
|
+
required: false
|
|
96
|
+
}),
|
|
97
|
+
source: _oclif_core.Flags.string({
|
|
98
|
+
description: "Analytics source tag",
|
|
99
|
+
required: false
|
|
100
|
+
})
|
|
101
|
+
};
|
|
102
|
+
static args = {};
|
|
103
|
+
async run() {
|
|
104
|
+
const { flags } = await this.parse(PlayerEmbed);
|
|
105
|
+
this.printWorkspaceHeader();
|
|
106
|
+
const { data, error } = await this.apiClient.GET("/player/embed", { params: { query: {
|
|
107
|
+
photo_id: flags["video-id"] ? Number(flags["video-id"]) : void 0,
|
|
108
|
+
live_id: flags["webinar-id"] ? Number(flags["webinar-id"]) : void 0,
|
|
109
|
+
album_id: flags["category-id"] ? Number(flags["category-id"]) : void 0,
|
|
110
|
+
player_id: flags["player-id"] ? Number(flags["player-id"]) : void 0,
|
|
111
|
+
url: flags.url,
|
|
112
|
+
width: flags.width,
|
|
113
|
+
height: flags.height,
|
|
114
|
+
responsive_p: flags.responsive ? true : void 0,
|
|
115
|
+
autoplay_p: flags.autoplay ? true : void 0,
|
|
116
|
+
iframe_p: flags.iframe ? true : void 0,
|
|
117
|
+
start: flags.start,
|
|
118
|
+
include_unpublished_p: flags["include-unpublished"] ? true : void 0,
|
|
119
|
+
token: flags.token,
|
|
120
|
+
source: flags.source
|
|
121
|
+
} } });
|
|
122
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
123
|
+
const embedCode = data?.data?.embed_code ?? "";
|
|
124
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
125
|
+
ok: true,
|
|
126
|
+
data: { embed_code: embedCode },
|
|
127
|
+
summary: "Embed code generated",
|
|
128
|
+
breadcrumbs: [{ domain: this.activeWorkspace.domain }, { resource: "player" }]
|
|
129
|
+
});
|
|
130
|
+
process.stdout.write(embedCode);
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
//#endregion
|
|
134
|
+
module.exports = PlayerEmbed;
|
|
@@ -0,0 +1,86 @@
|
|
|
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/player/list.ts
|
|
10
|
+
/**
|
|
11
|
+
* Player list command — lists all players in the active workspace.
|
|
12
|
+
*
|
|
13
|
+
* PITFALL 2: /player/list is POST (not GET). Pagination params go in the form body.
|
|
14
|
+
*
|
|
15
|
+
* Renders a cli-table3 table with columns: ID, Name, Default.
|
|
16
|
+
* Supports --json output with { ok, data, summary, breadcrumbs } shape (CLI-01).
|
|
17
|
+
*/
|
|
18
|
+
var PlayerList = class PlayerList extends require_lib_base_command.AuthenticatedCommand {
|
|
19
|
+
static description = "List players in the active workspace";
|
|
20
|
+
static agentMetadata = {
|
|
21
|
+
api_endpoint: "POST /player/list",
|
|
22
|
+
auth_scope: "read",
|
|
23
|
+
output_shape: {
|
|
24
|
+
type: "table",
|
|
25
|
+
columns: [
|
|
26
|
+
"ID",
|
|
27
|
+
"Name",
|
|
28
|
+
"Default"
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
side_effects: "none"
|
|
32
|
+
};
|
|
33
|
+
static examples = ["<%= config.bin %> player list", "<%= config.bin %> player list --json"];
|
|
34
|
+
static enableJsonFlag = true;
|
|
35
|
+
static flags = {
|
|
36
|
+
...require_lib_base_command.AuthenticatedCommand.baseFlags,
|
|
37
|
+
source: _oclif_core.Flags.string({
|
|
38
|
+
description: "Analytics source tag",
|
|
39
|
+
required: false
|
|
40
|
+
})
|
|
41
|
+
};
|
|
42
|
+
static args = {};
|
|
43
|
+
async run() {
|
|
44
|
+
const { flags } = await this.parse(PlayerList);
|
|
45
|
+
this.printWorkspaceHeader();
|
|
46
|
+
const players = await require_lib_pagination.fetchAllPages(async (page, size) => {
|
|
47
|
+
const { data, error } = await this.apiClient.POST("/player/list", {
|
|
48
|
+
body: {
|
|
49
|
+
p: page,
|
|
50
|
+
size,
|
|
51
|
+
source: flags.source
|
|
52
|
+
},
|
|
53
|
+
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
54
|
+
});
|
|
55
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
56
|
+
const resp = data;
|
|
57
|
+
return {
|
|
58
|
+
data: Array.isArray(resp?.data) ? resp.data : resp?.data ? [resp.data] : [],
|
|
59
|
+
total_count: resp?.total_count
|
|
60
|
+
};
|
|
61
|
+
});
|
|
62
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
63
|
+
ok: true,
|
|
64
|
+
data: players,
|
|
65
|
+
summary: `${players.length} player${players.length === 1 ? "" : "s"}`,
|
|
66
|
+
breadcrumbs: [{ domain: this.activeWorkspace.domain }, { resource: "player" }]
|
|
67
|
+
});
|
|
68
|
+
if (players.length === 0) {
|
|
69
|
+
this.log("No players found.");
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
const table = require_lib_output.renderTable([
|
|
73
|
+
"ID",
|
|
74
|
+
"Name",
|
|
75
|
+
"Default"
|
|
76
|
+
], players.map((p) => [
|
|
77
|
+
String(p.player_id ?? ""),
|
|
78
|
+
require_lib_term_map.applyCliTerms(String(p.player_name ?? "")),
|
|
79
|
+
p.default_p ? "yes" : "no"
|
|
80
|
+
]));
|
|
81
|
+
this.log(table.toString());
|
|
82
|
+
this.log(chalk.default.dim(`${players.length} player${players.length === 1 ? "" : "s"}`));
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
//#endregion
|
|
86
|
+
module.exports = PlayerList;
|
|
@@ -0,0 +1,70 @@
|
|
|
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/player/styles.ts
|
|
9
|
+
/**
|
|
10
|
+
* Player styles command — lists available player visual styles.
|
|
11
|
+
*
|
|
12
|
+
* Each entry includes a style key, human-readable name, and icon identifier.
|
|
13
|
+
*/
|
|
14
|
+
var PlayerStyles = class PlayerStyles extends require_lib_base_command.AuthenticatedCommand {
|
|
15
|
+
static description = "List available player visual styles";
|
|
16
|
+
static agentMetadata = {
|
|
17
|
+
api_endpoint: "GET /player/styles",
|
|
18
|
+
auth_scope: "read",
|
|
19
|
+
output_shape: {
|
|
20
|
+
type: "table",
|
|
21
|
+
columns: [
|
|
22
|
+
"Style",
|
|
23
|
+
"Name",
|
|
24
|
+
"Icon"
|
|
25
|
+
]
|
|
26
|
+
},
|
|
27
|
+
side_effects: "none"
|
|
28
|
+
};
|
|
29
|
+
static examples = ["<%= config.bin %> player styles", "<%= config.bin %> player styles --json"];
|
|
30
|
+
static enableJsonFlag = true;
|
|
31
|
+
static flags = {
|
|
32
|
+
...require_lib_base_command.AuthenticatedCommand.baseFlags,
|
|
33
|
+
fields: _oclif_core.Flags.string({
|
|
34
|
+
description: "Comma-separated list of fields to return",
|
|
35
|
+
required: false
|
|
36
|
+
})
|
|
37
|
+
};
|
|
38
|
+
static args = {};
|
|
39
|
+
async run() {
|
|
40
|
+
const { flags } = await this.parse(PlayerStyles);
|
|
41
|
+
this.printWorkspaceHeader();
|
|
42
|
+
const { data, error } = await this.apiClient.GET("/player/styles", { params: { query: { fields: flags.fields } } });
|
|
43
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
44
|
+
const resp = data;
|
|
45
|
+
const items = Array.isArray(resp?.data) ? resp.data : resp?.data ? [resp.data] : [];
|
|
46
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
47
|
+
ok: true,
|
|
48
|
+
data: items,
|
|
49
|
+
summary: `${items.length} player style${items.length === 1 ? "" : "s"}`,
|
|
50
|
+
breadcrumbs: [{ domain: this.activeWorkspace.domain }, { resource: "player" }]
|
|
51
|
+
});
|
|
52
|
+
if (items.length === 0) {
|
|
53
|
+
this.log("No player styles found.");
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
const table = require_lib_output.renderTable([
|
|
57
|
+
"Style",
|
|
58
|
+
"Name",
|
|
59
|
+
"Icon"
|
|
60
|
+
], items.map((s) => [
|
|
61
|
+
String(s.style ?? ""),
|
|
62
|
+
require_lib_term_map.applyCliTerms(String(s.name ?? "")),
|
|
63
|
+
String(s.icon ?? "")
|
|
64
|
+
]));
|
|
65
|
+
this.log(table.toString());
|
|
66
|
+
this.log(chalk.default.dim(`${items.length} player style${items.length === 1 ? "" : "s"}`));
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
//#endregion
|
|
70
|
+
module.exports = PlayerStyles;
|