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,134 @@
|
|
|
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/webinar/list.ts
|
|
10
|
+
/**
|
|
11
|
+
* Webinar list command — lists webinars in the active workspace.
|
|
12
|
+
* Defaults to the first 20 results; use --limit N or --all for more.
|
|
13
|
+
* Streaming details are excluded by default (include_streaming_details_p: false)
|
|
14
|
+
* to avoid slow per-webinar credential fetches.
|
|
15
|
+
*
|
|
16
|
+
* CRITICAL schema note: API schema uses photo_id but runtime response includes live_id.
|
|
17
|
+
* Use `item.live_id ?? item.photo_id` defensively for the ID column.
|
|
18
|
+
*/
|
|
19
|
+
var WebinarList = class WebinarList extends require_lib_base_command.AuthenticatedCommand {
|
|
20
|
+
static description = "List webinars in the active workspace";
|
|
21
|
+
static examples = [
|
|
22
|
+
"<%= config.bin %> webinar list",
|
|
23
|
+
"<%= config.bin %> webinar list --limit 50",
|
|
24
|
+
"<%= config.bin %> webinar list --all",
|
|
25
|
+
"<%= config.bin %> webinar list --status upcoming --json"
|
|
26
|
+
];
|
|
27
|
+
static enableJsonFlag = true;
|
|
28
|
+
static flags = {
|
|
29
|
+
...require_lib_base_command.AuthenticatedCommand.baseFlags,
|
|
30
|
+
limit: _oclif_core.Flags.integer({
|
|
31
|
+
description: "Maximum number of webinars to return (default: 20)",
|
|
32
|
+
default: 20
|
|
33
|
+
}),
|
|
34
|
+
all: _oclif_core.Flags.boolean({
|
|
35
|
+
description: "Fetch all webinars across all pages (overrides --limit)",
|
|
36
|
+
required: false
|
|
37
|
+
}),
|
|
38
|
+
"include-private": _oclif_core.Flags.boolean({
|
|
39
|
+
description: "Include private webinars in the results",
|
|
40
|
+
allowNo: true,
|
|
41
|
+
required: false
|
|
42
|
+
}),
|
|
43
|
+
"include-private-p": _oclif_core.Flags.string({
|
|
44
|
+
hidden: true,
|
|
45
|
+
required: false
|
|
46
|
+
}),
|
|
47
|
+
status: _oclif_core.Flags.string({
|
|
48
|
+
description: "Filter by status: upcoming, live, or previous",
|
|
49
|
+
required: false
|
|
50
|
+
}),
|
|
51
|
+
search: _oclif_core.Flags.string({
|
|
52
|
+
description: "Search webinars by keyword",
|
|
53
|
+
required: false
|
|
54
|
+
})
|
|
55
|
+
};
|
|
56
|
+
static args = {};
|
|
57
|
+
static agentMetadata = {
|
|
58
|
+
api_endpoint: "GET /live/list",
|
|
59
|
+
auth_scope: "read",
|
|
60
|
+
output_shape: {
|
|
61
|
+
type: "table",
|
|
62
|
+
columns: [
|
|
63
|
+
"ID",
|
|
64
|
+
"Title",
|
|
65
|
+
"Status",
|
|
66
|
+
"Date",
|
|
67
|
+
"Private"
|
|
68
|
+
]
|
|
69
|
+
},
|
|
70
|
+
side_effects: "none"
|
|
71
|
+
};
|
|
72
|
+
async run() {
|
|
73
|
+
const { flags } = await this.parse(WebinarList);
|
|
74
|
+
this.printWorkspaceHeader();
|
|
75
|
+
const includePrivate = parseBoolParam(flags["include-private"], flags["include-private-p"]);
|
|
76
|
+
let webinars;
|
|
77
|
+
if (flags.all) webinars = await require_lib_pagination.fetchAllPages(async (page, size) => {
|
|
78
|
+
const { data, error } = await this.apiClient.GET("/live/list", { params: { query: {
|
|
79
|
+
p: page,
|
|
80
|
+
size,
|
|
81
|
+
include_private_p: includePrivate ?? void 0,
|
|
82
|
+
live_status: flags.status,
|
|
83
|
+
search: flags.search,
|
|
84
|
+
include_streaming_details_p: false
|
|
85
|
+
} } });
|
|
86
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
87
|
+
const resp = data;
|
|
88
|
+
return {
|
|
89
|
+
data: Array.isArray(resp?.data) ? resp.data : resp?.data ? [resp.data] : [],
|
|
90
|
+
total_count: resp?.total_count
|
|
91
|
+
};
|
|
92
|
+
});
|
|
93
|
+
else {
|
|
94
|
+
const { data, error } = await this.apiClient.GET("/live/list", { params: { query: {
|
|
95
|
+
p: 1,
|
|
96
|
+
size: flags.limit,
|
|
97
|
+
include_private_p: includePrivate ?? void 0,
|
|
98
|
+
live_status: flags.status,
|
|
99
|
+
search: flags.search,
|
|
100
|
+
include_streaming_details_p: false
|
|
101
|
+
} } });
|
|
102
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
103
|
+
const resp = data;
|
|
104
|
+
webinars = Array.isArray(resp?.data) ? resp.data : resp?.data ? [resp.data] : [];
|
|
105
|
+
}
|
|
106
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
107
|
+
ok: true,
|
|
108
|
+
data: webinars,
|
|
109
|
+
summary: `${webinars.length} webinar${webinars.length === 1 ? "" : "s"}`,
|
|
110
|
+
breadcrumbs: [{ domain: this.activeWorkspace.domain }, { resource: "webinar" }]
|
|
111
|
+
});
|
|
112
|
+
if (webinars.length === 0) {
|
|
113
|
+
this.log("No webinars found.");
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
const table = require_lib_output.renderTable([
|
|
117
|
+
"ID",
|
|
118
|
+
"Title",
|
|
119
|
+
"Status",
|
|
120
|
+
"Date",
|
|
121
|
+
"Private"
|
|
122
|
+
], webinars.map((w) => [
|
|
123
|
+
String(w.live_id ?? w.photo_id ?? ""),
|
|
124
|
+
require_lib_term_map.applyCliTerms(String(w.name ?? w.title ?? "")),
|
|
125
|
+
String(w.live_status ?? ""),
|
|
126
|
+
String(w.live_date ?? ""),
|
|
127
|
+
w.private_p ? "yes" : "no"
|
|
128
|
+
]));
|
|
129
|
+
this.log(table.toString());
|
|
130
|
+
this.log(chalk.default.dim(`${webinars.length} webinar${webinars.length === 1 ? "" : "s"}`));
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
//#endregion
|
|
134
|
+
module.exports = WebinarList;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
const require_runtime = require("../../_virtual/_rolldown/runtime.cjs");
|
|
2
|
+
const require_lib_term_map = require("../../lib/term-map.cjs");
|
|
3
|
+
const require_lib_base_command = require("../../lib/base-command.cjs");
|
|
4
|
+
const require_lib_output = require("../../lib/output.cjs");
|
|
5
|
+
let _oclif_core = require("@oclif/core");
|
|
6
|
+
let chalk = require("chalk");
|
|
7
|
+
chalk = require_runtime.__toESM(chalk);
|
|
8
|
+
//#region src/commands/webinar/log.ts
|
|
9
|
+
/**
|
|
10
|
+
* Webinar log command — retrieves the event log for a webinar.
|
|
11
|
+
* Concatenates date + time fields into single Start/End columns.
|
|
12
|
+
*/
|
|
13
|
+
var WebinarLog = class WebinarLog extends require_lib_base_command.AuthenticatedCommand {
|
|
14
|
+
static description = "Retrieve the event log for a webinar";
|
|
15
|
+
static examples = ["<%= config.bin %> webinar log 12345", "<%= config.bin %> webinar log 12345 --json"];
|
|
16
|
+
static enableJsonFlag = true;
|
|
17
|
+
static flags = { ...require_lib_base_command.AuthenticatedCommand.baseFlags };
|
|
18
|
+
static args = { id: _oclif_core.Args.string({
|
|
19
|
+
description: "Webinar ID",
|
|
20
|
+
required: true
|
|
21
|
+
}) };
|
|
22
|
+
static agentMetadata = {
|
|
23
|
+
api_endpoint: "GET /live/log",
|
|
24
|
+
auth_scope: "read",
|
|
25
|
+
output_shape: {
|
|
26
|
+
type: "table",
|
|
27
|
+
columns: [
|
|
28
|
+
"Event",
|
|
29
|
+
"Start",
|
|
30
|
+
"End"
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
side_effects: "none"
|
|
34
|
+
};
|
|
35
|
+
async run() {
|
|
36
|
+
const { args } = await this.parse(WebinarLog);
|
|
37
|
+
this.printWorkspaceHeader();
|
|
38
|
+
const { data, error } = await this.apiClient.GET("/live/log", { params: { query: { live_id: Number(args.id) } } });
|
|
39
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
40
|
+
const resp = data;
|
|
41
|
+
const events = Array.isArray(resp?.data) ? resp.data : resp?.data ? [resp.data] : [];
|
|
42
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
43
|
+
ok: true,
|
|
44
|
+
data: events,
|
|
45
|
+
summary: `${events.length} event${events.length === 1 ? "" : "s"}`,
|
|
46
|
+
breadcrumbs: [{ domain: this.activeWorkspace.domain }, {
|
|
47
|
+
resource: "webinar",
|
|
48
|
+
id: args.id
|
|
49
|
+
}]
|
|
50
|
+
});
|
|
51
|
+
if (events.length === 0) {
|
|
52
|
+
this.log("No log events found.");
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
const table = require_lib_output.renderTable([
|
|
56
|
+
"Event",
|
|
57
|
+
"Start",
|
|
58
|
+
"End"
|
|
59
|
+
], events.map((e) => [
|
|
60
|
+
String(e.event ?? ""),
|
|
61
|
+
[e.start_time__date, e.start_time__time].filter(Boolean).join(" "),
|
|
62
|
+
[e.end_time__date, e.end_time__time].filter(Boolean).join(" ")
|
|
63
|
+
]));
|
|
64
|
+
this.log(table.toString());
|
|
65
|
+
this.log(chalk.default.dim(`${events.length} event${events.length === 1 ? "" : "s"}`));
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
//#endregion
|
|
69
|
+
module.exports = WebinarLog;
|
|
@@ -0,0 +1,101 @@
|
|
|
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/mail/add.ts
|
|
10
|
+
/**
|
|
11
|
+
* Webinar mail add command — creates a new email for a webinar.
|
|
12
|
+
*
|
|
13
|
+
* Interactive fallback (Decision D-2): if --subject or --message not provided
|
|
14
|
+
* and not in JSON mode, prompts interactively via @clack/prompts.
|
|
15
|
+
*
|
|
16
|
+
* Threat mitigations:
|
|
17
|
+
* T-05-07: applyCliTerms() on all error messages
|
|
18
|
+
*/
|
|
19
|
+
var WebinarMailAdd = class WebinarMailAdd extends require_lib_base_command.AuthenticatedCommand {
|
|
20
|
+
static description = "Add an email to a webinar";
|
|
21
|
+
static examples = [
|
|
22
|
+
"<%= config.bin %> webinar mail add 12345 --subject \"Reminder\" --message \"Join us tomorrow!\"",
|
|
23
|
+
"<%= config.bin %> webinar mail add --series-id 67890 --subject \"Reminder\"",
|
|
24
|
+
"<%= config.bin %> webinar mail add 12345 --subject \"Reminder\" --message \"Join us!\" --json"
|
|
25
|
+
];
|
|
26
|
+
static enableJsonFlag = true;
|
|
27
|
+
static flags = {
|
|
28
|
+
...require_lib_base_command.AuthenticatedCommand.baseFlags,
|
|
29
|
+
"series-id": _oclif_core.Flags.string({ description: "Series ID — add mail to a series instead of a webinar" }),
|
|
30
|
+
subject: _oclif_core.Flags.string({
|
|
31
|
+
description: "Email subject",
|
|
32
|
+
required: false
|
|
33
|
+
}),
|
|
34
|
+
message: _oclif_core.Flags.string({
|
|
35
|
+
description: "Email message body",
|
|
36
|
+
required: false
|
|
37
|
+
})
|
|
38
|
+
};
|
|
39
|
+
static args = { id: _oclif_core.Args.string({
|
|
40
|
+
description: "Webinar ID (omit when using --series-id)",
|
|
41
|
+
required: false
|
|
42
|
+
}) };
|
|
43
|
+
static agentMetadata = {
|
|
44
|
+
api_endpoint: "POST /live/mail/add",
|
|
45
|
+
auth_scope: "write",
|
|
46
|
+
output_shape: { type: "key-value" },
|
|
47
|
+
side_effects: "creates"
|
|
48
|
+
};
|
|
49
|
+
async run() {
|
|
50
|
+
const { args, flags } = await this.parse(WebinarMailAdd);
|
|
51
|
+
this.printWorkspaceHeader();
|
|
52
|
+
const contextField = flags["series-id"] ? { live_series_id: Number(flags["series-id"]) } : args.id ? { live_id: Number(args.id) } : null;
|
|
53
|
+
if (!contextField) this.error(require_lib_term_map.applyCliTerms("Either a webinar ID argument or --series-id is required"), { exit: 1 });
|
|
54
|
+
let subject = flags.subject;
|
|
55
|
+
let message = flags.message;
|
|
56
|
+
if ((!subject || !message) && !this.jsonEnabled()) {
|
|
57
|
+
if (!subject) {
|
|
58
|
+
const result = await (0, _clack_prompts.text)({ message: "Email subject" });
|
|
59
|
+
if ((0, _clack_prompts.isCancel)(result)) process.exit(2);
|
|
60
|
+
subject = result;
|
|
61
|
+
}
|
|
62
|
+
if (!message) {
|
|
63
|
+
const result = await (0, _clack_prompts.text)({ message: "Email message" });
|
|
64
|
+
if ((0, _clack_prompts.isCancel)(result)) process.exit(2);
|
|
65
|
+
message = result;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
if (!subject) this.error("--subject is required in non-interactive mode", { exit: 1 });
|
|
69
|
+
if (!message) this.error("--message is required in non-interactive mode", { exit: 1 });
|
|
70
|
+
const { data, error } = await this.apiClient.POST("/live/mail/add", {
|
|
71
|
+
body: {
|
|
72
|
+
...contextField,
|
|
73
|
+
subject,
|
|
74
|
+
message
|
|
75
|
+
},
|
|
76
|
+
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
77
|
+
});
|
|
78
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
79
|
+
const mailId = data?.data?.live_mail_id ?? data?.live_mail_id;
|
|
80
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
81
|
+
ok: true,
|
|
82
|
+
data,
|
|
83
|
+
summary: "Mail created",
|
|
84
|
+
breadcrumbs: [
|
|
85
|
+
{ domain: this.activeWorkspace.domain },
|
|
86
|
+
{
|
|
87
|
+
resource: "webinar",
|
|
88
|
+
id: args.id
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
resource: "mail",
|
|
92
|
+
id: String(mailId ?? "")
|
|
93
|
+
}
|
|
94
|
+
]
|
|
95
|
+
});
|
|
96
|
+
this.log(chalk.default.green("Mail created"));
|
|
97
|
+
if (mailId) this.log(`ID: ${mailId}`);
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
//#endregion
|
|
101
|
+
module.exports = WebinarMailAdd;
|
|
@@ -0,0 +1,83 @@
|
|
|
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/mail/list.ts
|
|
7
|
+
/**
|
|
8
|
+
* Webinar mail list command — lists all emails configured for a webinar.
|
|
9
|
+
*
|
|
10
|
+
* Threat mitigations:
|
|
11
|
+
* T-05-07: applyCliTerms() on all error messages
|
|
12
|
+
*/
|
|
13
|
+
var WebinarMailList = class WebinarMailList extends require_lib_base_command.AuthenticatedCommand {
|
|
14
|
+
static description = "List emails for a webinar";
|
|
15
|
+
static examples = [
|
|
16
|
+
"<%= config.bin %> webinar mail list 12345",
|
|
17
|
+
"<%= config.bin %> webinar mail list --series-id 67890",
|
|
18
|
+
"<%= config.bin %> webinar mail list 12345 --json"
|
|
19
|
+
];
|
|
20
|
+
static enableJsonFlag = true;
|
|
21
|
+
static flags = {
|
|
22
|
+
...require_lib_base_command.AuthenticatedCommand.baseFlags,
|
|
23
|
+
"series-id": _oclif_core.Flags.string({ description: "Series ID — list mails for a series instead of a webinar" })
|
|
24
|
+
};
|
|
25
|
+
static args = { id: _oclif_core.Args.string({
|
|
26
|
+
description: "Webinar ID (omit when using --series-id)",
|
|
27
|
+
required: false
|
|
28
|
+
}) };
|
|
29
|
+
static agentMetadata = {
|
|
30
|
+
api_endpoint: "GET /live/mail/list",
|
|
31
|
+
auth_scope: "read",
|
|
32
|
+
output_shape: {
|
|
33
|
+
type: "table",
|
|
34
|
+
columns: [
|
|
35
|
+
"ID",
|
|
36
|
+
"Subject",
|
|
37
|
+
"Status",
|
|
38
|
+
"Send Date"
|
|
39
|
+
]
|
|
40
|
+
},
|
|
41
|
+
side_effects: "none"
|
|
42
|
+
};
|
|
43
|
+
async run() {
|
|
44
|
+
const { args, flags } = await this.parse(WebinarMailList);
|
|
45
|
+
this.printWorkspaceHeader();
|
|
46
|
+
const contextField = flags["series-id"] ? { live_series_id: Number(flags["series-id"]) } : args.id ? { live_id: Number(args.id) } : null;
|
|
47
|
+
if (!contextField) this.error(require_lib_term_map.applyCliTerms("Either a webinar ID argument or --series-id is required"), { exit: 1 });
|
|
48
|
+
const { data, error } = await this.apiClient.GET("/live/mail/list", { params: { query: contextField } });
|
|
49
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
50
|
+
const mails = Array.isArray(data?.data) ? data.data : data?.data ? [data.data] : [];
|
|
51
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
52
|
+
ok: true,
|
|
53
|
+
data: mails,
|
|
54
|
+
summary: `${mails.length} mail${mails.length === 1 ? "" : "s"}`,
|
|
55
|
+
breadcrumbs: [
|
|
56
|
+
{ domain: this.activeWorkspace.domain },
|
|
57
|
+
{
|
|
58
|
+
resource: "webinar",
|
|
59
|
+
id: args.id
|
|
60
|
+
},
|
|
61
|
+
{ resource: "mail" }
|
|
62
|
+
]
|
|
63
|
+
});
|
|
64
|
+
if (mails.length === 0) {
|
|
65
|
+
this.log("No mail found.");
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
const table = require_lib_output.renderTable([
|
|
69
|
+
"ID",
|
|
70
|
+
"Subject",
|
|
71
|
+
"Status",
|
|
72
|
+
"Send Date"
|
|
73
|
+
], mails.map((m) => [
|
|
74
|
+
String(m.live_mail_id ?? m.id ?? ""),
|
|
75
|
+
require_lib_term_map.applyCliTerms(String(m.subject ?? "")),
|
|
76
|
+
String(m.status ?? ""),
|
|
77
|
+
String(m.send_date ?? "")
|
|
78
|
+
]));
|
|
79
|
+
this.log(table.toString());
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
//#endregion
|
|
83
|
+
module.exports = WebinarMailList;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
require("../../../_virtual/_rolldown/runtime.cjs");
|
|
2
|
+
const require_lib_term_map = require("../../../lib/term-map.cjs");
|
|
3
|
+
const require_lib_base_command = require("../../../lib/base-command.cjs");
|
|
4
|
+
const require_lib_output = require("../../../lib/output.cjs");
|
|
5
|
+
let _oclif_core = require("@oclif/core");
|
|
6
|
+
//#region src/commands/webinar/mail/preview.ts
|
|
7
|
+
/**
|
|
8
|
+
* Webinar mail preview command — outputs the raw HTML of a webinar email to stdout.
|
|
9
|
+
*
|
|
10
|
+
* CRITICAL (Decision D-3): uses process.stdout.write() NOT this.log() — this.log() adds
|
|
11
|
+
* a trailing newline that corrupts HTML piping (e.g. `twentythree webinar mail preview <id> > preview.html`).
|
|
12
|
+
*
|
|
13
|
+
* T-05-09: Raw HTML output is intentional per Decision D-3. User controls where it's piped.
|
|
14
|
+
*
|
|
15
|
+
* Threat mitigations:
|
|
16
|
+
* T-05-07: applyCliTerms() on all error messages
|
|
17
|
+
* T-05-09: Raw HTML output accepted by design
|
|
18
|
+
*/
|
|
19
|
+
var WebinarMailPreview = class WebinarMailPreview extends require_lib_base_command.AuthenticatedCommand {
|
|
20
|
+
static description = "Preview a webinar email as raw HTML";
|
|
21
|
+
static examples = [
|
|
22
|
+
"<%= config.bin %> webinar mail preview 555 --webinar-id 12345",
|
|
23
|
+
"<%= config.bin %> webinar mail preview 555 --series-id 67890 > preview.html",
|
|
24
|
+
"<%= config.bin %> webinar mail preview 555 --webinar-id 12345 --json"
|
|
25
|
+
];
|
|
26
|
+
static enableJsonFlag = true;
|
|
27
|
+
static flags = {
|
|
28
|
+
...require_lib_base_command.AuthenticatedCommand.baseFlags,
|
|
29
|
+
"webinar-id": _oclif_core.Flags.string({
|
|
30
|
+
description: "Webinar ID (mutually exclusive with --series-id)",
|
|
31
|
+
exclusive: ["series-id"]
|
|
32
|
+
}),
|
|
33
|
+
"series-id": _oclif_core.Flags.string({
|
|
34
|
+
description: "Series ID (mutually exclusive with --webinar-id)",
|
|
35
|
+
exclusive: ["webinar-id"]
|
|
36
|
+
})
|
|
37
|
+
};
|
|
38
|
+
static args = { id: _oclif_core.Args.string({
|
|
39
|
+
description: "Mail ID",
|
|
40
|
+
required: true
|
|
41
|
+
}) };
|
|
42
|
+
static agentMetadata = {
|
|
43
|
+
api_endpoint: "GET /live/mail/preview",
|
|
44
|
+
auth_scope: "read",
|
|
45
|
+
output_shape: { type: "none" },
|
|
46
|
+
side_effects: "none"
|
|
47
|
+
};
|
|
48
|
+
async run() {
|
|
49
|
+
const { args, flags } = await this.parse(WebinarMailPreview);
|
|
50
|
+
this.printWorkspaceHeader();
|
|
51
|
+
const contextField = flags["webinar-id"] ? { live_id: Number(flags["webinar-id"]) } : flags["series-id"] ? { live_series_id: Number(flags["series-id"]) } : null;
|
|
52
|
+
if (!contextField) this.error(require_lib_term_map.applyCliTerms("Either --webinar-id or --series-id is required"), { exit: 1 });
|
|
53
|
+
const query = new URLSearchParams({
|
|
54
|
+
...Object.fromEntries(Object.entries(contextField).map(([k, v]) => [k, String(v)])),
|
|
55
|
+
live_mail_id: String(args.id)
|
|
56
|
+
});
|
|
57
|
+
const headers = {};
|
|
58
|
+
if (this.activeWorkspace.bearer_token) headers["Authorization"] = `Bearer ${this.activeWorkspace.bearer_token}`;
|
|
59
|
+
const response = await fetch(`${this.apiBaseUrl}live/mail/preview?${query}`, { headers });
|
|
60
|
+
const html = await response.text();
|
|
61
|
+
if (!response.ok) this.error(require_lib_term_map.applyCliTerms(`API error ${response.status}: ${html}`), { exit: 1 });
|
|
62
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
63
|
+
ok: true,
|
|
64
|
+
data: html,
|
|
65
|
+
summary: "Mail preview",
|
|
66
|
+
breadcrumbs: [{ domain: this.activeWorkspace.domain }, {
|
|
67
|
+
resource: "mail",
|
|
68
|
+
id: args.id
|
|
69
|
+
}]
|
|
70
|
+
});
|
|
71
|
+
process.stdout.write(html);
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
//#endregion
|
|
75
|
+
module.exports = WebinarMailPreview;
|
|
@@ -0,0 +1,75 @@
|
|
|
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/mail/remove.ts
|
|
10
|
+
/**
|
|
11
|
+
* Webinar mail remove command — removes an email from a webinar.
|
|
12
|
+
*
|
|
13
|
+
* T-05-08: Confirmation prompt includes domain before delete (repudiation mitigation).
|
|
14
|
+
* --json mode skips the confirmation prompt (scripting mode — assume confirmed).
|
|
15
|
+
*
|
|
16
|
+
* Threat mitigations:
|
|
17
|
+
* T-05-07: applyCliTerms() on all error messages
|
|
18
|
+
* T-05-08: Confirmation prompt includes domain before destructive delete
|
|
19
|
+
*/
|
|
20
|
+
var WebinarMailRemove = class WebinarMailRemove extends require_lib_base_command.AuthenticatedCommand {
|
|
21
|
+
static description = "Remove an email from a webinar";
|
|
22
|
+
static examples = ["<%= config.bin %> webinar mail remove 555 --webinar-id 12345", "<%= config.bin %> webinar mail remove 555 --series-id 67890 --json"];
|
|
23
|
+
static enableJsonFlag = true;
|
|
24
|
+
static flags = {
|
|
25
|
+
...require_lib_base_command.AuthenticatedCommand.baseFlags,
|
|
26
|
+
"webinar-id": _oclif_core.Flags.string({
|
|
27
|
+
description: "Webinar ID (mutually exclusive with --series-id)",
|
|
28
|
+
exclusive: ["series-id"]
|
|
29
|
+
}),
|
|
30
|
+
"series-id": _oclif_core.Flags.string({
|
|
31
|
+
description: "Series ID (mutually exclusive with --webinar-id)",
|
|
32
|
+
exclusive: ["webinar-id"]
|
|
33
|
+
})
|
|
34
|
+
};
|
|
35
|
+
static args = { id: _oclif_core.Args.string({
|
|
36
|
+
description: "Mail ID",
|
|
37
|
+
required: true
|
|
38
|
+
}) };
|
|
39
|
+
static agentMetadata = {
|
|
40
|
+
api_endpoint: "POST /live/mail/remove",
|
|
41
|
+
auth_scope: "write",
|
|
42
|
+
output_shape: { type: "none" },
|
|
43
|
+
side_effects: "destructive"
|
|
44
|
+
};
|
|
45
|
+
async run() {
|
|
46
|
+
const { args, flags } = await this.parse(WebinarMailRemove);
|
|
47
|
+
this.printWorkspaceHeader();
|
|
48
|
+
const contextField = flags["webinar-id"] ? { live_id: Number(flags["webinar-id"]) } : flags["series-id"] ? { live_series_id: Number(flags["series-id"]) } : null;
|
|
49
|
+
if (!contextField) this.error(require_lib_term_map.applyCliTerms("Either --webinar-id or --series-id is required"), { exit: 1 });
|
|
50
|
+
if (!this.jsonEnabled()) {
|
|
51
|
+
const confirmed = await (0, _clack_prompts.confirm)({ message: `Remove mail ${args.id} from ${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/mail/remove", {
|
|
55
|
+
body: {
|
|
56
|
+
...contextField,
|
|
57
|
+
live_mail_id: Number(args.id)
|
|
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
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
63
|
+
ok: true,
|
|
64
|
+
data,
|
|
65
|
+
summary: `Mail ${args.id} removed`,
|
|
66
|
+
breadcrumbs: [{ domain: this.activeWorkspace.domain }, {
|
|
67
|
+
resource: "mail",
|
|
68
|
+
id: args.id
|
|
69
|
+
}]
|
|
70
|
+
});
|
|
71
|
+
this.log(chalk.default.green(`Mail ${args.id} removed`));
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
//#endregion
|
|
75
|
+
module.exports = WebinarMailRemove;
|
|
@@ -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/webinar/mail/send.ts
|
|
9
|
+
/**
|
|
10
|
+
* Webinar mail send command — sends a webinar email to its recipients.
|
|
11
|
+
*
|
|
12
|
+
* Action command pattern (Decision D-1): outputs a single green success line only.
|
|
13
|
+
*
|
|
14
|
+
* Threat mitigations:
|
|
15
|
+
* T-05-07: applyCliTerms() on all error messages
|
|
16
|
+
*/
|
|
17
|
+
var WebinarMailSend = class WebinarMailSend extends require_lib_base_command.AuthenticatedCommand {
|
|
18
|
+
static description = "Send a webinar email";
|
|
19
|
+
static examples = ["<%= config.bin %> webinar mail send 555 --webinar-id 12345", "<%= config.bin %> webinar mail send 555 --series-id 67890 --json"];
|
|
20
|
+
static enableJsonFlag = true;
|
|
21
|
+
static flags = {
|
|
22
|
+
...require_lib_base_command.AuthenticatedCommand.baseFlags,
|
|
23
|
+
"webinar-id": _oclif_core.Flags.string({
|
|
24
|
+
description: "Webinar ID (mutually exclusive with --series-id)",
|
|
25
|
+
exclusive: ["series-id"]
|
|
26
|
+
}),
|
|
27
|
+
"series-id": _oclif_core.Flags.string({
|
|
28
|
+
description: "Series ID (mutually exclusive with --webinar-id)",
|
|
29
|
+
exclusive: ["webinar-id"]
|
|
30
|
+
})
|
|
31
|
+
};
|
|
32
|
+
static args = { id: _oclif_core.Args.string({
|
|
33
|
+
description: "Mail ID",
|
|
34
|
+
required: true
|
|
35
|
+
}) };
|
|
36
|
+
static agentMetadata = {
|
|
37
|
+
api_endpoint: "POST /live/mail/send",
|
|
38
|
+
auth_scope: "write",
|
|
39
|
+
output_shape: { type: "none" },
|
|
40
|
+
side_effects: "updates"
|
|
41
|
+
};
|
|
42
|
+
async run() {
|
|
43
|
+
const { args, flags } = await this.parse(WebinarMailSend);
|
|
44
|
+
this.printWorkspaceHeader();
|
|
45
|
+
const contextField = flags["webinar-id"] ? { live_id: Number(flags["webinar-id"]) } : flags["series-id"] ? { live_series_id: Number(flags["series-id"]) } : null;
|
|
46
|
+
if (!contextField) this.error(require_lib_term_map.applyCliTerms("Either --webinar-id or --series-id is required"), { exit: 1 });
|
|
47
|
+
const { data, error } = await this.apiClient.POST("/live/mail/send", {
|
|
48
|
+
body: {
|
|
49
|
+
...contextField,
|
|
50
|
+
live_mail_id: Number(args.id)
|
|
51
|
+
},
|
|
52
|
+
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
53
|
+
});
|
|
54
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
55
|
+
this.log(chalk.default.green("Mail sent"));
|
|
56
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
57
|
+
ok: true,
|
|
58
|
+
data,
|
|
59
|
+
summary: "Mail sent",
|
|
60
|
+
breadcrumbs: [{ domain: this.activeWorkspace.domain }, {
|
|
61
|
+
resource: "mail",
|
|
62
|
+
id: args.id
|
|
63
|
+
}]
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
//#endregion
|
|
68
|
+
module.exports = WebinarMailSend;
|