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,151 @@
|
|
|
1
|
+
const require_runtime = require("../../_virtual/_rolldown/runtime.cjs");
|
|
2
|
+
const require_lib_term_map = require("../../lib/term-map.cjs");
|
|
3
|
+
const require_lib_base_command = require("../../lib/base-command.cjs");
|
|
4
|
+
const require_lib_output = require("../../lib/output.cjs");
|
|
5
|
+
const require_upload_types = require("../../upload/types.cjs");
|
|
6
|
+
const require_upload_chunked_upload = require("../../upload/chunked-upload.cjs");
|
|
7
|
+
let _oclif_core = require("@oclif/core");
|
|
8
|
+
let chalk = require("chalk");
|
|
9
|
+
chalk = require_runtime.__toESM(chalk);
|
|
10
|
+
let node_fs_promises = require("node:fs/promises");
|
|
11
|
+
//#region src/commands/video/upload.ts
|
|
12
|
+
/**
|
|
13
|
+
* Simple inline progress bar that writes directly to stderr using \r.
|
|
14
|
+
* Avoids all TTY-detection issues that afflict cli-progress.
|
|
15
|
+
* T-03-06: shows only byte counts, never the upload_token.
|
|
16
|
+
*/
|
|
17
|
+
var ProgressBar = class {
|
|
18
|
+
lastLen = 0;
|
|
19
|
+
render(bytesUploaded, total, speed) {
|
|
20
|
+
const pct = total > 0 ? Math.floor(bytesUploaded / total * 100) : 0;
|
|
21
|
+
const filled = Math.floor(pct / 5);
|
|
22
|
+
const line = `[${"█".repeat(filled) + "░".repeat(20 - filled)}] ${pct}% | ${require_lib_output.formatBytes(bytesUploaded)} / ${require_lib_output.formatBytes(total)} | ${require_lib_output.formatBytes(speed)}/s`;
|
|
23
|
+
const padding = " ".repeat(Math.max(0, this.lastLen - line.length));
|
|
24
|
+
process.stderr.write(`\r${line}${padding}`);
|
|
25
|
+
this.lastLen = line.length;
|
|
26
|
+
}
|
|
27
|
+
finish() {
|
|
28
|
+
process.stderr.write("\n");
|
|
29
|
+
this.lastLen = 0;
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Video upload command — uploads a video file using the chunked upload engine.
|
|
34
|
+
*
|
|
35
|
+
* Flow:
|
|
36
|
+
* 1. GET /photo/get-upload-token (with optional metadata)
|
|
37
|
+
* 2. Upload file in chunks with inline progress bar
|
|
38
|
+
* 3. Display success message; optionally return --json result
|
|
39
|
+
*
|
|
40
|
+
* Threat mitigations:
|
|
41
|
+
* T-03-06: upload_token is never logged to stdout — only byte counts shown
|
|
42
|
+
* T-03-09: extends AuthenticatedCommand — anonymous mode rejected
|
|
43
|
+
*/
|
|
44
|
+
var VideoUpload = class VideoUpload extends require_lib_base_command.AuthenticatedCommand {
|
|
45
|
+
static description = "Upload a video file to the active workspace";
|
|
46
|
+
static examples = [
|
|
47
|
+
"<%= config.bin %> video upload ./video.mp4",
|
|
48
|
+
"<%= config.bin %> video upload ./video.mp4 --title \"My Video\" --publish",
|
|
49
|
+
"<%= config.bin %> video upload ./video.mp4 --chunk-size 52428800 --concurrency 3"
|
|
50
|
+
];
|
|
51
|
+
static enableJsonFlag = true;
|
|
52
|
+
static agentMetadata = {
|
|
53
|
+
api_endpoint: "POST /photo/redeem-upload-token",
|
|
54
|
+
auth_scope: "write",
|
|
55
|
+
output_shape: { type: "key-value" },
|
|
56
|
+
side_effects: "creates"
|
|
57
|
+
};
|
|
58
|
+
static flags = {
|
|
59
|
+
...require_lib_base_command.AuthenticatedCommand.baseFlags,
|
|
60
|
+
title: _oclif_core.Flags.string({
|
|
61
|
+
description: "Title for the uploaded video",
|
|
62
|
+
required: false
|
|
63
|
+
}),
|
|
64
|
+
description: _oclif_core.Flags.string({
|
|
65
|
+
description: "Description for the uploaded video",
|
|
66
|
+
required: false
|
|
67
|
+
}),
|
|
68
|
+
tags: _oclif_core.Flags.string({
|
|
69
|
+
description: "Space-separated tags for the uploaded video",
|
|
70
|
+
required: false
|
|
71
|
+
}),
|
|
72
|
+
"category-id": _oclif_core.Flags.string({
|
|
73
|
+
description: "Category ID (or comma-separated IDs) to assign the video to",
|
|
74
|
+
required: false
|
|
75
|
+
}),
|
|
76
|
+
publish: _oclif_core.Flags.boolean({
|
|
77
|
+
description: "Publish the video immediately after upload",
|
|
78
|
+
default: false
|
|
79
|
+
}),
|
|
80
|
+
"chunk-size": _oclif_core.Flags.integer({
|
|
81
|
+
description: `Chunk size in bytes (default: ${require_upload_types.DEFAULT_CHUNK_SIZE} = 100MB)`,
|
|
82
|
+
default: require_upload_types.DEFAULT_CHUNK_SIZE
|
|
83
|
+
}),
|
|
84
|
+
concurrency: _oclif_core.Flags.integer({
|
|
85
|
+
description: `Number of chunks to upload in parallel (default: 5)`,
|
|
86
|
+
default: 5
|
|
87
|
+
})
|
|
88
|
+
};
|
|
89
|
+
static args = { file: _oclif_core.Args.string({
|
|
90
|
+
description: "Path to the video file to upload",
|
|
91
|
+
required: true
|
|
92
|
+
}) };
|
|
93
|
+
async run() {
|
|
94
|
+
const { args, flags } = await this.parse(VideoUpload);
|
|
95
|
+
this.printWorkspaceHeader();
|
|
96
|
+
try {
|
|
97
|
+
await (0, node_fs_promises.stat)(args.file);
|
|
98
|
+
} catch {
|
|
99
|
+
this.error(`File not found: ${args.file}`, { exit: 1 });
|
|
100
|
+
}
|
|
101
|
+
const { data: tokenData, error: tokenError } = await this.apiClient.GET("/photo/get-upload-token", { params: { query: {
|
|
102
|
+
title: flags.title,
|
|
103
|
+
description: flags.description,
|
|
104
|
+
tags: flags.tags,
|
|
105
|
+
album_id: flags["category-id"]
|
|
106
|
+
} } });
|
|
107
|
+
if (tokenError) this.error(require_lib_term_map.applyCliTerms(String(tokenError)), { exit: 1 });
|
|
108
|
+
const uploadToken = tokenData?.data?.upload_token;
|
|
109
|
+
if (!uploadToken) this.error("Failed to obtain upload token from API", { exit: 1 });
|
|
110
|
+
const totalBytes = (await (0, node_fs_promises.stat)(args.file)).size;
|
|
111
|
+
const bar = new ProgressBar();
|
|
112
|
+
const startTime = Date.now();
|
|
113
|
+
let result;
|
|
114
|
+
bar.render(0, totalBytes, 0);
|
|
115
|
+
try {
|
|
116
|
+
result = await require_upload_chunked_upload.uploadChunked({
|
|
117
|
+
filePath: args.file,
|
|
118
|
+
uploadToken,
|
|
119
|
+
uploadUrl: `${this.apiBaseUrl}photo/redeem-upload-token`,
|
|
120
|
+
bearerToken: this.activeWorkspace.bearer_token || void 0,
|
|
121
|
+
chunkSize: flags["chunk-size"],
|
|
122
|
+
concurrency: flags.concurrency,
|
|
123
|
+
onProgress(bytesUploaded, total) {
|
|
124
|
+
const elapsed = (Date.now() - startTime) / 1e3;
|
|
125
|
+
const speed = elapsed > 0 ? bytesUploaded / elapsed : 0;
|
|
126
|
+
bar.render(bytesUploaded, total, speed);
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
} finally {
|
|
130
|
+
bar.finish();
|
|
131
|
+
}
|
|
132
|
+
const videoId = result.photo_id;
|
|
133
|
+
const adminUrl = `https://${this.activeWorkspace.domain}/manage/video/${videoId}`;
|
|
134
|
+
this.log(chalk.default.green("Video uploaded successfully"));
|
|
135
|
+
if (videoId) {
|
|
136
|
+
this.log(`ID: ${videoId}`);
|
|
137
|
+
this.log(`Admin: ${adminUrl}`);
|
|
138
|
+
}
|
|
139
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
140
|
+
ok: true,
|
|
141
|
+
data: result,
|
|
142
|
+
summary: "Video uploaded",
|
|
143
|
+
breadcrumbs: [{ domain: this.activeWorkspace.domain }, {
|
|
144
|
+
resource: "video",
|
|
145
|
+
id: result.photo_id ? String(result.photo_id) : void 0
|
|
146
|
+
}]
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
//#endregion
|
|
151
|
+
module.exports = VideoUpload;
|
|
@@ -0,0 +1,68 @@
|
|
|
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/webhook/events.ts
|
|
9
|
+
/**
|
|
10
|
+
* Webhook events command — lists available webhook event types (WHK-04).
|
|
11
|
+
*
|
|
12
|
+
* Threat mitigations:
|
|
13
|
+
* T-08-05: extends AuthenticatedCommand — anonymous mode rejected
|
|
14
|
+
*/
|
|
15
|
+
var WebhookEvents = class WebhookEvents extends require_lib_base_command.AuthenticatedCommand {
|
|
16
|
+
static description = "List available webhook event types";
|
|
17
|
+
static examples = [
|
|
18
|
+
"<%= config.bin %> webhook events",
|
|
19
|
+
"<%= config.bin %> webhook events --test-authentication",
|
|
20
|
+
"<%= config.bin %> webhook events --json"
|
|
21
|
+
];
|
|
22
|
+
static enableJsonFlag = true;
|
|
23
|
+
static flags = {
|
|
24
|
+
...require_lib_base_command.AuthenticatedCommand.baseFlags,
|
|
25
|
+
"test-authentication": _oclif_core.Flags.boolean({
|
|
26
|
+
description: "Include test authentication events",
|
|
27
|
+
required: false
|
|
28
|
+
}),
|
|
29
|
+
"test-authentication-p": _oclif_core.Flags.string({
|
|
30
|
+
hidden: true,
|
|
31
|
+
required: false
|
|
32
|
+
})
|
|
33
|
+
};
|
|
34
|
+
static args = {};
|
|
35
|
+
static agentMetadata = {
|
|
36
|
+
api_endpoint: "GET /webhook/events",
|
|
37
|
+
auth_scope: "read",
|
|
38
|
+
output_shape: {
|
|
39
|
+
type: "table",
|
|
40
|
+
columns: ["Event"]
|
|
41
|
+
},
|
|
42
|
+
side_effects: "none"
|
|
43
|
+
};
|
|
44
|
+
async run() {
|
|
45
|
+
const { flags } = await this.parse(WebhookEvents);
|
|
46
|
+
this.printWorkspaceHeader();
|
|
47
|
+
const testAuthVal = parseBoolParam(flags["test-authentication"], flags["test-authentication-p"]);
|
|
48
|
+
const { data, error } = await this.apiClient.GET("/webhook/events", { params: { query: { test_authentication_p: testAuthVal !== void 0 ? testAuthVal ? 1 : 0 : void 0 } } });
|
|
49
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
50
|
+
const resp = data;
|
|
51
|
+
const rows = Array.isArray(resp?.data) ? resp.data : resp?.data ? [resp.data] : [];
|
|
52
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
53
|
+
ok: true,
|
|
54
|
+
data: rows,
|
|
55
|
+
summary: `${rows.length} event type(s)`,
|
|
56
|
+
breadcrumbs: [{ domain: this.activeWorkspace.domain }, { resource: "webhook" }]
|
|
57
|
+
});
|
|
58
|
+
if (rows.length === 0) {
|
|
59
|
+
this.log("No event types found.");
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
const table = require_lib_output.renderTable(["Event"], rows.map((item) => [String(item.event ?? item)]));
|
|
63
|
+
this.log(table.toString());
|
|
64
|
+
this.log(chalk.default.dim(`${rows.length} event type(s)`));
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
//#endregion
|
|
68
|
+
module.exports = WebhookEvents;
|
|
@@ -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 chalk = require("chalk");
|
|
6
|
+
chalk = require_runtime.__toESM(chalk);
|
|
7
|
+
//#region src/commands/webhook/list.ts
|
|
8
|
+
/**
|
|
9
|
+
* Webhook list command — lists all webhook subscriptions (WHK-01).
|
|
10
|
+
*
|
|
11
|
+
* Threat mitigations:
|
|
12
|
+
* T-08-05: extends AuthenticatedCommand — anonymous mode rejected
|
|
13
|
+
*/
|
|
14
|
+
var WebhookList = class WebhookList extends require_lib_base_command.AuthenticatedCommand {
|
|
15
|
+
static description = "List webhook subscriptions for the active workspace";
|
|
16
|
+
static examples = ["<%= config.bin %> webhook list", "<%= config.bin %> webhook list --json"];
|
|
17
|
+
static enableJsonFlag = true;
|
|
18
|
+
static flags = { ...require_lib_base_command.AuthenticatedCommand.baseFlags };
|
|
19
|
+
static args = {};
|
|
20
|
+
static agentMetadata = {
|
|
21
|
+
api_endpoint: "GET /webhook/list",
|
|
22
|
+
auth_scope: "read",
|
|
23
|
+
output_shape: {
|
|
24
|
+
type: "table",
|
|
25
|
+
columns: [
|
|
26
|
+
"ID",
|
|
27
|
+
"Event",
|
|
28
|
+
"Target URL"
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
side_effects: "none"
|
|
32
|
+
};
|
|
33
|
+
async run() {
|
|
34
|
+
const {} = await this.parse(WebhookList);
|
|
35
|
+
this.printWorkspaceHeader();
|
|
36
|
+
const { data, error } = await this.apiClient.GET("/webhook/list", {});
|
|
37
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
38
|
+
const resp = data;
|
|
39
|
+
const rows = Array.isArray(resp?.data) ? resp.data : resp?.data ? [resp.data] : [];
|
|
40
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
41
|
+
ok: true,
|
|
42
|
+
data: rows,
|
|
43
|
+
summary: `${rows.length} webhook(s)`,
|
|
44
|
+
breadcrumbs: [{ domain: this.activeWorkspace.domain }, { resource: "webhook" }]
|
|
45
|
+
});
|
|
46
|
+
if (rows.length === 0) {
|
|
47
|
+
this.log("No webhooks found.");
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
const table = require_lib_output.renderTable([
|
|
51
|
+
"ID",
|
|
52
|
+
"Event",
|
|
53
|
+
"Target URL"
|
|
54
|
+
], rows.map((r) => [
|
|
55
|
+
String(r.webhook_id ?? ""),
|
|
56
|
+
String(r.event ?? ""),
|
|
57
|
+
String(r.target_url ?? "")
|
|
58
|
+
]));
|
|
59
|
+
this.log(table.toString());
|
|
60
|
+
this.log(chalk.default.dim(`${rows.length} webhook(s)`));
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
//#endregion
|
|
64
|
+
module.exports = WebhookList;
|
|
@@ -0,0 +1,47 @@
|
|
|
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/webhook/sample.ts
|
|
7
|
+
/**
|
|
8
|
+
* Webhook sample command — prints a sample payload for an event type (WHK-05).
|
|
9
|
+
*
|
|
10
|
+
* Sample payloads are complex nested JSON, so we output raw JSON instead of
|
|
11
|
+
* key-value rendering.
|
|
12
|
+
*
|
|
13
|
+
* Threat mitigations:
|
|
14
|
+
* T-08-05: extends AuthenticatedCommand — anonymous mode rejected
|
|
15
|
+
*/
|
|
16
|
+
var WebhookSample = class WebhookSample extends require_lib_base_command.AuthenticatedCommand {
|
|
17
|
+
static description = "Get a sample payload for a webhook event type";
|
|
18
|
+
static examples = ["<%= config.bin %> webhook sample video.uploaded", "<%= config.bin %> webhook sample video.uploaded --json"];
|
|
19
|
+
static enableJsonFlag = true;
|
|
20
|
+
static flags = { ...require_lib_base_command.AuthenticatedCommand.baseFlags };
|
|
21
|
+
static args = { event: _oclif_core.Args.string({
|
|
22
|
+
description: "Event type to get sample for",
|
|
23
|
+
required: true
|
|
24
|
+
}) };
|
|
25
|
+
static agentMetadata = {
|
|
26
|
+
api_endpoint: "GET /webhook/sample",
|
|
27
|
+
auth_scope: "read",
|
|
28
|
+
output_shape: { type: "key-value" },
|
|
29
|
+
side_effects: "none"
|
|
30
|
+
};
|
|
31
|
+
async run() {
|
|
32
|
+
const { args } = await this.parse(WebhookSample);
|
|
33
|
+
this.printWorkspaceHeader();
|
|
34
|
+
const { data, error } = await this.apiClient.GET("/webhook/sample", { params: { query: { event: args.event } } });
|
|
35
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
36
|
+
const resp = data;
|
|
37
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
38
|
+
ok: true,
|
|
39
|
+
data: resp?.data ?? resp,
|
|
40
|
+
summary: `Sample payload for ${args.event}`,
|
|
41
|
+
breadcrumbs: [{ domain: this.activeWorkspace.domain }, { resource: "webhook" }]
|
|
42
|
+
});
|
|
43
|
+
this.log(JSON.stringify(resp?.data ?? resp, null, 2));
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
//#endregion
|
|
47
|
+
module.exports = WebhookSample;
|
|
@@ -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
|
+
//#region src/commands/webhook/subscribe.ts
|
|
9
|
+
/**
|
|
10
|
+
* Webhook subscribe command — creates a webhook subscription (WHK-02).
|
|
11
|
+
*
|
|
12
|
+
* Threat mitigations:
|
|
13
|
+
* T-08-05: extends AuthenticatedCommand — anonymous mode rejected
|
|
14
|
+
* T-08-06: target_url passed as-is; server validates reachability
|
|
15
|
+
*/
|
|
16
|
+
var WebhookSubscribe = class WebhookSubscribe extends require_lib_base_command.AuthenticatedCommand {
|
|
17
|
+
static description = "Subscribe to a webhook event";
|
|
18
|
+
static examples = ["<%= config.bin %> webhook subscribe --target-url https://example.com/hook --event video.uploaded", "<%= config.bin %> webhook subscribe --target-url https://example.com/hook --event video.uploaded --json"];
|
|
19
|
+
static enableJsonFlag = true;
|
|
20
|
+
static flags = {
|
|
21
|
+
...require_lib_base_command.AuthenticatedCommand.baseFlags,
|
|
22
|
+
"target-url": _oclif_core.Flags.string({
|
|
23
|
+
description: "URL to receive webhook POST requests",
|
|
24
|
+
required: true
|
|
25
|
+
}),
|
|
26
|
+
event: _oclif_core.Flags.string({
|
|
27
|
+
description: "Event type to subscribe to",
|
|
28
|
+
required: true
|
|
29
|
+
})
|
|
30
|
+
};
|
|
31
|
+
static args = {};
|
|
32
|
+
static agentMetadata = {
|
|
33
|
+
api_endpoint: "POST /webhook/subscribe",
|
|
34
|
+
auth_scope: "write",
|
|
35
|
+
output_shape: { type: "key-value" },
|
|
36
|
+
side_effects: "creates"
|
|
37
|
+
};
|
|
38
|
+
async run() {
|
|
39
|
+
const { flags } = await this.parse(WebhookSubscribe);
|
|
40
|
+
this.printWorkspaceHeader();
|
|
41
|
+
const { data: createData, error: createError } = await this.apiClient.POST("/webhook/subscribe", {
|
|
42
|
+
body: {
|
|
43
|
+
target_url: flags["target-url"],
|
|
44
|
+
event: flags.event
|
|
45
|
+
},
|
|
46
|
+
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
47
|
+
});
|
|
48
|
+
if (createError) this.error(require_lib_term_map.applyCliTerms(formatApiError(createError)), { exit: 1 });
|
|
49
|
+
const webhookId = createData?.data?.webhook_id;
|
|
50
|
+
this.log(chalk.default.green("Webhook subscription created"));
|
|
51
|
+
this.log(`ID: ${webhookId}`);
|
|
52
|
+
this.log(`Event: ${flags.event}`);
|
|
53
|
+
this.log(`Target URL: ${flags["target-url"]}`);
|
|
54
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
55
|
+
ok: true,
|
|
56
|
+
data: createData,
|
|
57
|
+
summary: "Webhook subscription created",
|
|
58
|
+
breadcrumbs: [{ domain: this.activeWorkspace.domain }, {
|
|
59
|
+
resource: "webhook",
|
|
60
|
+
id: String(webhookId)
|
|
61
|
+
}]
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
//#endregion
|
|
66
|
+
module.exports = WebhookSubscribe;
|
|
@@ -0,0 +1,71 @@
|
|
|
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/webhook/unsubscribe.ts
|
|
10
|
+
/**
|
|
11
|
+
* Webhook unsubscribe command — removes a webhook subscription after confirmation (WHK-03).
|
|
12
|
+
*
|
|
13
|
+
* Accepts either --webhook-id or --target-url (API accepts either for identification).
|
|
14
|
+
*
|
|
15
|
+
* Threat mitigations:
|
|
16
|
+
* T-08-04: confirm() prompt includes workspace domain before destructive POST (repudiation)
|
|
17
|
+
* T-08-05: extends AuthenticatedCommand — anonymous mode rejected
|
|
18
|
+
*/
|
|
19
|
+
var WebhookUnsubscribe = class WebhookUnsubscribe extends require_lib_base_command.AuthenticatedCommand {
|
|
20
|
+
static description = "Unsubscribe from a webhook event";
|
|
21
|
+
static examples = [
|
|
22
|
+
"<%= config.bin %> webhook unsubscribe --webhook-id 12345",
|
|
23
|
+
"<%= config.bin %> webhook unsubscribe --target-url https://example.com/hook",
|
|
24
|
+
"<%= config.bin %> webhook unsubscribe --webhook-id 12345 --json"
|
|
25
|
+
];
|
|
26
|
+
static enableJsonFlag = true;
|
|
27
|
+
static flags = {
|
|
28
|
+
...require_lib_base_command.AuthenticatedCommand.baseFlags,
|
|
29
|
+
"webhook-id": _oclif_core.Flags.string({
|
|
30
|
+
description: "Webhook subscription ID",
|
|
31
|
+
required: false
|
|
32
|
+
}),
|
|
33
|
+
"target-url": _oclif_core.Flags.string({
|
|
34
|
+
description: "Target URL to unsubscribe",
|
|
35
|
+
required: false
|
|
36
|
+
})
|
|
37
|
+
};
|
|
38
|
+
static args = {};
|
|
39
|
+
static agentMetadata = {
|
|
40
|
+
api_endpoint: "POST /webhook/unsubscribe",
|
|
41
|
+
auth_scope: "write",
|
|
42
|
+
output_shape: { type: "key-value" },
|
|
43
|
+
side_effects: "destructive"
|
|
44
|
+
};
|
|
45
|
+
async run() {
|
|
46
|
+
const { flags } = await this.parse(WebhookUnsubscribe);
|
|
47
|
+
this.printWorkspaceHeader();
|
|
48
|
+
if (!flags["webhook-id"] && !flags["target-url"]) this.error("Provide --webhook-id or --target-url", { exit: 1 });
|
|
49
|
+
if (!this.jsonEnabled()) {
|
|
50
|
+
const confirmed = await (0, _clack_prompts.confirm)({ message: `Unsubscribe webhook from ${this.activeWorkspace.domain}? This cannot be undone.` });
|
|
51
|
+
if ((0, _clack_prompts.isCancel)(confirmed) || !confirmed) process.exit(2);
|
|
52
|
+
}
|
|
53
|
+
const { data: deleteData, error: deleteError } = await this.apiClient.POST("/webhook/unsubscribe", {
|
|
54
|
+
body: {
|
|
55
|
+
webhook_id: flags["webhook-id"] ? Number(flags["webhook-id"]) : void 0,
|
|
56
|
+
target_url: flags["target-url"]
|
|
57
|
+
},
|
|
58
|
+
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
59
|
+
});
|
|
60
|
+
if (deleteError) this.error(require_lib_term_map.applyCliTerms(formatApiError(deleteError)), { exit: 1 });
|
|
61
|
+
this.log(chalk.default.green("Webhook unsubscribed"));
|
|
62
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
63
|
+
ok: true,
|
|
64
|
+
data: deleteData,
|
|
65
|
+
summary: "Webhook unsubscribed",
|
|
66
|
+
breadcrumbs: [{ domain: this.activeWorkspace.domain }, { resource: "webhook" }]
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
//#endregion
|
|
71
|
+
module.exports = WebhookUnsubscribe;
|
|
@@ -0,0 +1,79 @@
|
|
|
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/webinar/attachment/delete.ts
|
|
10
|
+
/**
|
|
11
|
+
* Webinar attachment delete command — deletes an attachment from a webinar by filename.
|
|
12
|
+
*
|
|
13
|
+
* CRITICAL: uses `filename` param (NOT an attachment ID) to identify the attachment.
|
|
14
|
+
*
|
|
15
|
+
* Threat mitigations:
|
|
16
|
+
* T-05-03: applyCliTerms() on all error messages — no 'live'/'photo'/'album' leaks
|
|
17
|
+
* T-05-04: Confirmation prompt includes domain and filename before delete
|
|
18
|
+
*/
|
|
19
|
+
var WebinarAttachmentDelete = class WebinarAttachmentDelete extends require_lib_base_command.AuthenticatedCommand {
|
|
20
|
+
static description = "Delete an attachment from a webinar";
|
|
21
|
+
static examples = ["<%= config.bin %> webinar attachment delete 12345 --filename slides.pdf", "<%= config.bin %> webinar attachment delete 12345 --filename handout.pdf --json"];
|
|
22
|
+
static enableJsonFlag = true;
|
|
23
|
+
static flags = {
|
|
24
|
+
...require_lib_base_command.AuthenticatedCommand.baseFlags,
|
|
25
|
+
filename: _oclif_core.Flags.string({
|
|
26
|
+
description: "Filename of the attachment to delete",
|
|
27
|
+
required: false
|
|
28
|
+
})
|
|
29
|
+
};
|
|
30
|
+
static args = { id: _oclif_core.Args.string({
|
|
31
|
+
description: "Webinar ID",
|
|
32
|
+
required: true
|
|
33
|
+
}) };
|
|
34
|
+
static agentMetadata = {
|
|
35
|
+
api_endpoint: "POST /live/attachment/delete",
|
|
36
|
+
auth_scope: "write",
|
|
37
|
+
output_shape: { type: "none" },
|
|
38
|
+
side_effects: "destructive"
|
|
39
|
+
};
|
|
40
|
+
async run() {
|
|
41
|
+
const { args, flags } = await this.parse(WebinarAttachmentDelete);
|
|
42
|
+
this.printWorkspaceHeader();
|
|
43
|
+
let filename = flags.filename;
|
|
44
|
+
if (!filename && !this.jsonEnabled()) {
|
|
45
|
+
const result = await (0, _clack_prompts.text)({ message: "Attachment filename" });
|
|
46
|
+
if ((0, _clack_prompts.isCancel)(result)) process.exit(2);
|
|
47
|
+
filename = result;
|
|
48
|
+
}
|
|
49
|
+
if (!filename) this.error("--filename is required in non-interactive mode", { exit: 1 });
|
|
50
|
+
if (!this.jsonEnabled()) {
|
|
51
|
+
const confirmed = await (0, _clack_prompts.confirm)({ message: `Delete attachment "${filename}" from webinar ${args.id} on ${this.activeWorkspace.domain}? This cannot be undone.` });
|
|
52
|
+
if ((0, _clack_prompts.isCancel)(confirmed) || !confirmed) process.exit(2);
|
|
53
|
+
}
|
|
54
|
+
const { data, error } = await this.apiClient.POST("/live/attachment/delete", {
|
|
55
|
+
body: {
|
|
56
|
+
live_id: Number(args.id),
|
|
57
|
+
filename
|
|
58
|
+
},
|
|
59
|
+
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
60
|
+
});
|
|
61
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
62
|
+
this.log(chalk.default.green(`Attachment "${filename}" deleted`));
|
|
63
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
64
|
+
ok: true,
|
|
65
|
+
data,
|
|
66
|
+
summary: "Attachment deleted",
|
|
67
|
+
breadcrumbs: [
|
|
68
|
+
{ domain: this.activeWorkspace.domain },
|
|
69
|
+
{
|
|
70
|
+
resource: "webinar",
|
|
71
|
+
id: args.id
|
|
72
|
+
},
|
|
73
|
+
{ resource: "attachment" }
|
|
74
|
+
]
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
//#endregion
|
|
79
|
+
module.exports = WebinarAttachmentDelete;
|
|
@@ -0,0 +1,94 @@
|
|
|
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/webinar/attachment/list.ts
|
|
7
|
+
/**
|
|
8
|
+
* Webinar attachment list command — lists all attachments for a webinar.
|
|
9
|
+
*
|
|
10
|
+
* Token is auto-looked up via fetchWebinarToken if not supplied via --token.
|
|
11
|
+
*
|
|
12
|
+
* Threat mitigations:
|
|
13
|
+
* T-05-03: applyCliTerms() on all error messages — no 'live'/'photo'/'album' leaks
|
|
14
|
+
*/
|
|
15
|
+
var WebinarAttachmentList = class WebinarAttachmentList extends require_lib_base_command.AuthenticatedCommand {
|
|
16
|
+
static description = "List attachments for a webinar";
|
|
17
|
+
static examples = [
|
|
18
|
+
"<%= config.bin %> webinar attachment list 12345",
|
|
19
|
+
"<%= config.bin %> webinar attachment list 12345 --json",
|
|
20
|
+
"<%= config.bin %> webinar attachment list 12345 --include-hidden"
|
|
21
|
+
];
|
|
22
|
+
static enableJsonFlag = true;
|
|
23
|
+
static flags = {
|
|
24
|
+
...require_lib_base_command.AuthenticatedCommand.baseFlags,
|
|
25
|
+
token: _oclif_core.Flags.string({
|
|
26
|
+
description: "Webinar token (auto-looked up if omitted)",
|
|
27
|
+
required: false
|
|
28
|
+
}),
|
|
29
|
+
"include-hidden": _oclif_core.Flags.boolean({
|
|
30
|
+
description: "Include hidden attachments",
|
|
31
|
+
allowNo: true,
|
|
32
|
+
required: false
|
|
33
|
+
})
|
|
34
|
+
};
|
|
35
|
+
static args = { id: _oclif_core.Args.string({
|
|
36
|
+
description: "Webinar ID",
|
|
37
|
+
required: true
|
|
38
|
+
}) };
|
|
39
|
+
static agentMetadata = {
|
|
40
|
+
api_endpoint: "GET /live/attachment/list",
|
|
41
|
+
auth_scope: "read",
|
|
42
|
+
output_shape: {
|
|
43
|
+
type: "table",
|
|
44
|
+
columns: [
|
|
45
|
+
"Filename",
|
|
46
|
+
"Size",
|
|
47
|
+
"Hidden"
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
side_effects: "none"
|
|
51
|
+
};
|
|
52
|
+
async run() {
|
|
53
|
+
const { args, flags } = await this.parse(WebinarAttachmentList);
|
|
54
|
+
this.printWorkspaceHeader();
|
|
55
|
+
const webinarId = Number(args.id);
|
|
56
|
+
const token = flags.token ?? await this.fetchWebinarToken(webinarId);
|
|
57
|
+
const { data, error } = await this.apiClient.GET("/live/attachment/list", { params: { query: {
|
|
58
|
+
live_id: webinarId,
|
|
59
|
+
token,
|
|
60
|
+
include_hidden_p: parseBoolParam(flags["include-hidden"], void 0) ?? void 0
|
|
61
|
+
} } });
|
|
62
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
63
|
+
const attachments = data?.attachments ?? data?.data ?? [];
|
|
64
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
65
|
+
ok: true,
|
|
66
|
+
data: attachments,
|
|
67
|
+
summary: `${attachments.length} attachment${attachments.length === 1 ? "" : "s"}`,
|
|
68
|
+
breadcrumbs: [
|
|
69
|
+
{ domain: this.activeWorkspace.domain },
|
|
70
|
+
{
|
|
71
|
+
resource: "webinar",
|
|
72
|
+
id: args.id
|
|
73
|
+
},
|
|
74
|
+
{ resource: "attachment" }
|
|
75
|
+
]
|
|
76
|
+
});
|
|
77
|
+
if (attachments.length === 0) {
|
|
78
|
+
this.log("No attachments found.");
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
const table = require_lib_output.renderTable([
|
|
82
|
+
"Filename",
|
|
83
|
+
"Size",
|
|
84
|
+
"Hidden"
|
|
85
|
+
], attachments.map((a) => [
|
|
86
|
+
String(a.filename ?? ""),
|
|
87
|
+
String(a.filesize ?? ""),
|
|
88
|
+
a.hidden_p ? "yes" : "no"
|
|
89
|
+
]));
|
|
90
|
+
this.log(table.toString());
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
//#endregion
|
|
94
|
+
module.exports = WebinarAttachmentList;
|