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,70 @@
|
|
|
1
|
+
const require_runtime = require("../../_virtual/_rolldown/runtime.cjs");
|
|
2
|
+
const require_lib_term_map = require("../../lib/term-map.cjs");
|
|
3
|
+
const require_lib_base_command = require("../../lib/base-command.cjs");
|
|
4
|
+
const require_lib_output = require("../../lib/output.cjs");
|
|
5
|
+
let _oclif_core = require("@oclif/core");
|
|
6
|
+
let chalk = require("chalk");
|
|
7
|
+
chalk = require_runtime.__toESM(chalk);
|
|
8
|
+
//#region src/commands/action/include.ts
|
|
9
|
+
/**
|
|
10
|
+
* Action include command — adds an object to the scope of a CTA action.
|
|
11
|
+
*
|
|
12
|
+
* POSTs to /action/include with action_id + object_id.
|
|
13
|
+
* Use --undo to reverse the inclusion (maps to remove_inclusion_p).
|
|
14
|
+
*/
|
|
15
|
+
var ActionInclude = class ActionInclude extends require_lib_base_command.AuthenticatedCommand {
|
|
16
|
+
static description = "Include an object in a CTA action scope (or undo an inclusion)";
|
|
17
|
+
static examples = [
|
|
18
|
+
"<%= config.bin %> action include 12345 --object-id 6789",
|
|
19
|
+
"<%= config.bin %> action include 12345 --object-id 6789 --undo",
|
|
20
|
+
"<%= config.bin %> action include 12345 --object-id 6789 --json"
|
|
21
|
+
];
|
|
22
|
+
static enableJsonFlag = true;
|
|
23
|
+
static agentMetadata = {
|
|
24
|
+
api_endpoint: "POST /action/include",
|
|
25
|
+
auth_scope: "write",
|
|
26
|
+
output_shape: { type: "key-value" },
|
|
27
|
+
side_effects: "updates"
|
|
28
|
+
};
|
|
29
|
+
static flags = {
|
|
30
|
+
...require_lib_base_command.AuthenticatedCommand.baseFlags,
|
|
31
|
+
"object-id": _oclif_core.Flags.string({
|
|
32
|
+
description: "Object ID to include the action on",
|
|
33
|
+
required: true
|
|
34
|
+
}),
|
|
35
|
+
undo: _oclif_core.Flags.boolean({
|
|
36
|
+
description: "Remove the inclusion (reverse this operation)",
|
|
37
|
+
required: false
|
|
38
|
+
})
|
|
39
|
+
};
|
|
40
|
+
static args = { id: _oclif_core.Args.string({
|
|
41
|
+
description: "Action ID",
|
|
42
|
+
required: true
|
|
43
|
+
}) };
|
|
44
|
+
async run() {
|
|
45
|
+
const { args, flags } = await this.parse(ActionInclude);
|
|
46
|
+
this.printWorkspaceHeader();
|
|
47
|
+
const body = {
|
|
48
|
+
action_id: Number(args.id),
|
|
49
|
+
object_id: Number(flags["object-id"])
|
|
50
|
+
};
|
|
51
|
+
if (flags.undo) body.remove_inclusion_p = 1;
|
|
52
|
+
const { data, error } = await this.apiClient.POST("/action/include", {
|
|
53
|
+
body,
|
|
54
|
+
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
55
|
+
});
|
|
56
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
57
|
+
this.log(chalk.default.green(flags.undo ? "Inclusion removed" : "Action included"));
|
|
58
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
59
|
+
ok: true,
|
|
60
|
+
data,
|
|
61
|
+
summary: flags.undo ? "Inclusion removed" : "Action included",
|
|
62
|
+
breadcrumbs: [{ domain: this.activeWorkspace.domain }, {
|
|
63
|
+
resource: "action",
|
|
64
|
+
id: args.id
|
|
65
|
+
}]
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
//#endregion
|
|
70
|
+
module.exports = ActionInclude;
|
|
@@ -0,0 +1,119 @@
|
|
|
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/action/list.ts
|
|
9
|
+
/**
|
|
10
|
+
* Action list command — lists CTAs for a given video, webinar, or object.
|
|
11
|
+
*
|
|
12
|
+
* Calls GET /action/get with at least one context filter.
|
|
13
|
+
* Renders a table with columns [ID, Name, Type, Start, End].
|
|
14
|
+
*
|
|
15
|
+
* Note: Both `action list` and `action get` use the /action/get endpoint.
|
|
16
|
+
* `action list` is focused on listing with filters; `action get` is focused on
|
|
17
|
+
* retrieving a specific action or flexible querying.
|
|
18
|
+
*/
|
|
19
|
+
var ActionList = class ActionList extends require_lib_base_command.AuthenticatedCommand {
|
|
20
|
+
static description = "List CTA actions for a video, webinar, or object";
|
|
21
|
+
static examples = [
|
|
22
|
+
"<%= config.bin %> action list --video-id 12345",
|
|
23
|
+
"<%= config.bin %> action list --webinar-id 6789",
|
|
24
|
+
"<%= config.bin %> action list --object-id 12345",
|
|
25
|
+
"<%= config.bin %> action list --video-id 12345 --json"
|
|
26
|
+
];
|
|
27
|
+
static enableJsonFlag = true;
|
|
28
|
+
static agentMetadata = {
|
|
29
|
+
api_endpoint: "GET /action/get",
|
|
30
|
+
auth_scope: "read",
|
|
31
|
+
output_shape: {
|
|
32
|
+
type: "table",
|
|
33
|
+
columns: [
|
|
34
|
+
"ID",
|
|
35
|
+
"Name",
|
|
36
|
+
"Type",
|
|
37
|
+
"Start",
|
|
38
|
+
"End"
|
|
39
|
+
]
|
|
40
|
+
},
|
|
41
|
+
side_effects: "none"
|
|
42
|
+
};
|
|
43
|
+
static flags = {
|
|
44
|
+
...require_lib_base_command.AuthenticatedCommand.baseFlags,
|
|
45
|
+
"object-id": _oclif_core.Flags.string({
|
|
46
|
+
description: "Object ID to filter actions by",
|
|
47
|
+
required: false
|
|
48
|
+
}),
|
|
49
|
+
"video-id": _oclif_core.Flags.string({
|
|
50
|
+
description: "Video ID to filter actions by (maps to photo_id)",
|
|
51
|
+
required: false
|
|
52
|
+
}),
|
|
53
|
+
"webinar-id": _oclif_core.Flags.string({
|
|
54
|
+
description: "Webinar ID to filter actions by (maps to live_id)",
|
|
55
|
+
required: false
|
|
56
|
+
}),
|
|
57
|
+
"player-id": _oclif_core.Flags.string({
|
|
58
|
+
description: "Player ID to filter actions by",
|
|
59
|
+
required: false
|
|
60
|
+
}),
|
|
61
|
+
"exclude-internal": _oclif_core.Flags.boolean({
|
|
62
|
+
description: "Exclude internal actions",
|
|
63
|
+
required: false
|
|
64
|
+
}),
|
|
65
|
+
"exclude-pending": _oclif_core.Flags.boolean({
|
|
66
|
+
description: "Exclude pending actions",
|
|
67
|
+
required: false
|
|
68
|
+
}),
|
|
69
|
+
"exclude-items": _oclif_core.Flags.boolean({
|
|
70
|
+
description: "Exclude action items",
|
|
71
|
+
required: false
|
|
72
|
+
})
|
|
73
|
+
};
|
|
74
|
+
static args = {};
|
|
75
|
+
async run() {
|
|
76
|
+
const { flags } = await this.parse(ActionList);
|
|
77
|
+
this.printWorkspaceHeader();
|
|
78
|
+
if (!flags["object-id"] && !flags["video-id"] && !flags["webinar-id"] && !flags["player-id"]) this.warn("Provide --object-id, --video-id, or --webinar-id to filter actions");
|
|
79
|
+
const { data, error } = await this.apiClient.GET("/action/get", { params: { query: {
|
|
80
|
+
object_id: flags["object-id"] ? Number(flags["object-id"]) : void 0,
|
|
81
|
+
photo_id: flags["video-id"] ? Number(flags["video-id"]) : void 0,
|
|
82
|
+
live_id: flags["webinar-id"] ? Number(flags["webinar-id"]) : void 0,
|
|
83
|
+
player_id: flags["player-id"] ? Number(flags["player-id"]) : void 0,
|
|
84
|
+
exclude_internal_p: flags["exclude-internal"] ? true : void 0,
|
|
85
|
+
exclude_pending_p: flags["exclude-pending"] ? true : void 0,
|
|
86
|
+
exclude_items_p: flags["exclude-items"] ? true : void 0
|
|
87
|
+
} } });
|
|
88
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
89
|
+
const resp = data;
|
|
90
|
+
const items = Array.isArray(resp?.data) ? resp.data : resp?.data ? [resp.data] : [];
|
|
91
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
92
|
+
ok: true,
|
|
93
|
+
data: items,
|
|
94
|
+
summary: `${items.length} action${items.length === 1 ? "" : "s"}`,
|
|
95
|
+
breadcrumbs: [{ domain: this.activeWorkspace.domain }, { resource: "action" }]
|
|
96
|
+
});
|
|
97
|
+
if (items.length === 0) {
|
|
98
|
+
this.log("No actions found.");
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
const table = require_lib_output.renderTable([
|
|
102
|
+
"ID",
|
|
103
|
+
"Name",
|
|
104
|
+
"Type",
|
|
105
|
+
"Start",
|
|
106
|
+
"End"
|
|
107
|
+
], items.map((item) => [
|
|
108
|
+
String(item.action_id ?? ""),
|
|
109
|
+
require_lib_term_map.applyCliTerms(String(item.name ?? item.action_name ?? "")),
|
|
110
|
+
String(item.type ?? item.action_type ?? ""),
|
|
111
|
+
String(item.start_time ?? ""),
|
|
112
|
+
String(item.end_time ?? "")
|
|
113
|
+
]));
|
|
114
|
+
this.log(table.toString());
|
|
115
|
+
this.log(chalk.default.dim(`${items.length} action${items.length === 1 ? "" : "s"}`));
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
//#endregion
|
|
119
|
+
module.exports = ActionList;
|
|
@@ -0,0 +1,63 @@
|
|
|
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/action/types.ts
|
|
9
|
+
/**
|
|
10
|
+
* Action types command — lists available action type definitions.
|
|
11
|
+
*
|
|
12
|
+
* Calls GET /action/types with optional exclude_internal_p flag.
|
|
13
|
+
* Renders a table with columns [Type, Name/Description].
|
|
14
|
+
*/
|
|
15
|
+
var ActionTypes = class ActionTypes extends require_lib_base_command.AuthenticatedCommand {
|
|
16
|
+
static description = "List available CTA action types";
|
|
17
|
+
static examples = [
|
|
18
|
+
"<%= config.bin %> action types",
|
|
19
|
+
"<%= config.bin %> action types --exclude-internal",
|
|
20
|
+
"<%= config.bin %> action types --json"
|
|
21
|
+
];
|
|
22
|
+
static enableJsonFlag = true;
|
|
23
|
+
static agentMetadata = {
|
|
24
|
+
api_endpoint: "GET /action/types",
|
|
25
|
+
auth_scope: "read",
|
|
26
|
+
output_shape: {
|
|
27
|
+
type: "table",
|
|
28
|
+
columns: ["Type", "Name / Description"]
|
|
29
|
+
},
|
|
30
|
+
side_effects: "none"
|
|
31
|
+
};
|
|
32
|
+
static flags = {
|
|
33
|
+
...require_lib_base_command.AuthenticatedCommand.baseFlags,
|
|
34
|
+
"exclude-internal": _oclif_core.Flags.boolean({
|
|
35
|
+
description: "Exclude internal action types from the list",
|
|
36
|
+
required: false
|
|
37
|
+
})
|
|
38
|
+
};
|
|
39
|
+
static args = {};
|
|
40
|
+
async run() {
|
|
41
|
+
const { flags } = await this.parse(ActionTypes);
|
|
42
|
+
this.printWorkspaceHeader();
|
|
43
|
+
const { data, error } = await this.apiClient.GET("/action/types", { params: { query: { exclude_internal_p: flags["exclude-internal"] ? true : void 0 } } });
|
|
44
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
45
|
+
const resp = data;
|
|
46
|
+
const items = Array.isArray(resp?.data) ? resp.data : resp?.data ? [resp.data] : [];
|
|
47
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
48
|
+
ok: true,
|
|
49
|
+
data: items,
|
|
50
|
+
summary: `${items.length} action type${items.length === 1 ? "" : "s"}`,
|
|
51
|
+
breadcrumbs: [{ domain: this.activeWorkspace.domain }, { resource: "action/types" }]
|
|
52
|
+
});
|
|
53
|
+
if (items.length === 0) {
|
|
54
|
+
this.log("No action types found.");
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
const table = require_lib_output.renderTable(["Type", "Name / Description"], items.map((item) => [require_lib_term_map.applyCliTerms(String(item.type ?? item.action_type ?? "")), require_lib_term_map.applyCliTerms(String(item.name ?? item.description ?? item.action_name ?? ""))]));
|
|
58
|
+
this.log(table.toString());
|
|
59
|
+
this.log(chalk.default.dim(`${items.length} action type${items.length === 1 ? "" : "s"}`));
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
//#endregion
|
|
63
|
+
module.exports = ActionTypes;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
const require_runtime = require("../../_virtual/_rolldown/runtime.cjs");
|
|
2
|
+
const require_lib_term_map = require("../../lib/term-map.cjs");
|
|
3
|
+
const require_lib_base_command = require("../../lib/base-command.cjs");
|
|
4
|
+
const require_lib_output = require("../../lib/output.cjs");
|
|
5
|
+
let _oclif_core = require("@oclif/core");
|
|
6
|
+
let chalk = require("chalk");
|
|
7
|
+
chalk = require_runtime.__toESM(chalk);
|
|
8
|
+
//#region src/commands/action/update.ts
|
|
9
|
+
/**
|
|
10
|
+
* Action update command — modifies name, timing, and data fields of an existing action.
|
|
11
|
+
*
|
|
12
|
+
* POSTs to /action/update with action_id + name + start_time + end_time required.
|
|
13
|
+
* Only flags explicitly provided are sent to the API.
|
|
14
|
+
*/
|
|
15
|
+
var ActionUpdate = class ActionUpdate extends require_lib_base_command.AuthenticatedCommand {
|
|
16
|
+
static description = "Update an existing CTA action";
|
|
17
|
+
static examples = [
|
|
18
|
+
"<%= config.bin %> action update 12345 --name \"Buy Now\" --start-time 10 --end-time 20",
|
|
19
|
+
"<%= config.bin %> action update 12345 --name \"Buy Now\" --start-time 10 --end-time 20 --return-url \"https://example.com\"",
|
|
20
|
+
"<%= config.bin %> action update 12345 --name \"Buy Now\" --start-time 10 --end-time 20 --json"
|
|
21
|
+
];
|
|
22
|
+
static enableJsonFlag = true;
|
|
23
|
+
static agentMetadata = {
|
|
24
|
+
api_endpoint: "POST /action/update",
|
|
25
|
+
auth_scope: "write",
|
|
26
|
+
output_shape: { type: "key-value" },
|
|
27
|
+
side_effects: "updates"
|
|
28
|
+
};
|
|
29
|
+
static flags = {
|
|
30
|
+
...require_lib_base_command.AuthenticatedCommand.baseFlags,
|
|
31
|
+
name: _oclif_core.Flags.string({
|
|
32
|
+
description: "Display name for the action",
|
|
33
|
+
required: true
|
|
34
|
+
}),
|
|
35
|
+
"start-time": _oclif_core.Flags.string({
|
|
36
|
+
description: "Start time of the action (seconds)",
|
|
37
|
+
required: true
|
|
38
|
+
}),
|
|
39
|
+
"end-time": _oclif_core.Flags.string({
|
|
40
|
+
description: "End time of the action (seconds)",
|
|
41
|
+
required: true
|
|
42
|
+
}),
|
|
43
|
+
"time-relative-to": _oclif_core.Flags.string({
|
|
44
|
+
description: "What the timing is relative to (default: duration)",
|
|
45
|
+
required: false,
|
|
46
|
+
default: "duration"
|
|
47
|
+
}),
|
|
48
|
+
"return-url": _oclif_core.Flags.string({
|
|
49
|
+
description: "Return URL for the action",
|
|
50
|
+
required: false
|
|
51
|
+
})
|
|
52
|
+
};
|
|
53
|
+
static args = { id: _oclif_core.Args.string({
|
|
54
|
+
description: "Action ID",
|
|
55
|
+
required: true
|
|
56
|
+
}) };
|
|
57
|
+
async run() {
|
|
58
|
+
const { args, flags } = await this.parse(ActionUpdate);
|
|
59
|
+
this.printWorkspaceHeader();
|
|
60
|
+
const body = {
|
|
61
|
+
action_id: Number(args.id),
|
|
62
|
+
name: flags.name,
|
|
63
|
+
start_time: flags["start-time"],
|
|
64
|
+
end_time: flags["end-time"]
|
|
65
|
+
};
|
|
66
|
+
if (flags["time-relative-to"] !== void 0) body.time_relative_to = flags["time-relative-to"];
|
|
67
|
+
if (flags["return-url"] !== void 0) body.return_url = flags["return-url"];
|
|
68
|
+
const { data, error } = await this.apiClient.POST("/action/update", {
|
|
69
|
+
body,
|
|
70
|
+
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
71
|
+
});
|
|
72
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
73
|
+
this.log(chalk.default.green("Action updated"));
|
|
74
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
75
|
+
ok: true,
|
|
76
|
+
data,
|
|
77
|
+
summary: `Action ${args.id} updated`,
|
|
78
|
+
breadcrumbs: [{ domain: this.activeWorkspace.domain }, {
|
|
79
|
+
resource: "action",
|
|
80
|
+
id: args.id
|
|
81
|
+
}]
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
//#endregion
|
|
86
|
+
module.exports = ActionUpdate;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
const require_runtime = require("../../_virtual/_rolldown/runtime.cjs");
|
|
2
|
+
const require_lib_term_map = require("../../lib/term-map.cjs");
|
|
3
|
+
const require_lib_base_command = require("../../lib/base-command.cjs");
|
|
4
|
+
const require_lib_output = require("../../lib/output.cjs");
|
|
5
|
+
let _oclif_core = require("@oclif/core");
|
|
6
|
+
let chalk = require("chalk");
|
|
7
|
+
chalk = require_runtime.__toESM(chalk);
|
|
8
|
+
let node_fs_promises = require("node:fs/promises");
|
|
9
|
+
let node_path = require("node:path");
|
|
10
|
+
//#region src/commands/action/upload.ts
|
|
11
|
+
/**
|
|
12
|
+
* Action upload command — uploads a file to an action variable via simple multipart FormData.
|
|
13
|
+
*
|
|
14
|
+
* D-1: Uses native fetch + FormData — NOT the chunked upload engine.
|
|
15
|
+
* This endpoint does not use an upload_token protocol; the file goes directly to an action variable.
|
|
16
|
+
*
|
|
17
|
+
* Threat mitigations:
|
|
18
|
+
* T-06-01: File existence is validated via stat() before reading; file path is user-provided CLI arg
|
|
19
|
+
* T-06-02: Bearer token sent only when configured; only Authorization header used (no URL embedding)
|
|
20
|
+
*/
|
|
21
|
+
var ActionUpload = class ActionUpload extends require_lib_base_command.AuthenticatedCommand {
|
|
22
|
+
static description = "Upload a file to an action variable";
|
|
23
|
+
static examples = [
|
|
24
|
+
"<%= config.bin %> action upload 12345 image ./banner.png",
|
|
25
|
+
"<%= config.bin %> action upload 12345 video ./clip.mp4",
|
|
26
|
+
"<%= config.bin %> action upload 12345 image ./banner.png --json"
|
|
27
|
+
];
|
|
28
|
+
static enableJsonFlag = true;
|
|
29
|
+
static agentMetadata = {
|
|
30
|
+
api_endpoint: "POST /action/upload",
|
|
31
|
+
auth_scope: "write",
|
|
32
|
+
output_shape: { type: "key-value" },
|
|
33
|
+
side_effects: "creates"
|
|
34
|
+
};
|
|
35
|
+
static flags = { ...require_lib_base_command.AuthenticatedCommand.baseFlags };
|
|
36
|
+
static args = {
|
|
37
|
+
id: _oclif_core.Args.string({
|
|
38
|
+
description: "Action ID",
|
|
39
|
+
required: true
|
|
40
|
+
}),
|
|
41
|
+
"variable-name": _oclif_core.Args.string({
|
|
42
|
+
description: "Variable name for the file upload",
|
|
43
|
+
required: true
|
|
44
|
+
}),
|
|
45
|
+
file: _oclif_core.Args.string({
|
|
46
|
+
description: "Path to the file to upload",
|
|
47
|
+
required: true
|
|
48
|
+
})
|
|
49
|
+
};
|
|
50
|
+
async run() {
|
|
51
|
+
const { args } = await this.parse(ActionUpload);
|
|
52
|
+
this.printWorkspaceHeader();
|
|
53
|
+
try {
|
|
54
|
+
await (0, node_fs_promises.stat)(args.file);
|
|
55
|
+
} catch {
|
|
56
|
+
this.error(`File not found: ${args.file}`, { exit: 1 });
|
|
57
|
+
}
|
|
58
|
+
const fileBuffer = await (0, node_fs_promises.readFile)(args.file);
|
|
59
|
+
const formData = new FormData();
|
|
60
|
+
formData.append("action_id", String(Number(args.id)));
|
|
61
|
+
formData.append("variable_name", args["variable-name"]);
|
|
62
|
+
formData.append("file", new Blob([fileBuffer]), (0, node_path.basename)(args.file));
|
|
63
|
+
const headers = {};
|
|
64
|
+
const token = this.activeWorkspace.bearer_token;
|
|
65
|
+
if (token) headers["Authorization"] = `Bearer ${token}`;
|
|
66
|
+
const response = await fetch(`${this.apiBaseUrl}action/upload`, {
|
|
67
|
+
method: "POST",
|
|
68
|
+
headers,
|
|
69
|
+
body: formData
|
|
70
|
+
});
|
|
71
|
+
if (!response.ok) {
|
|
72
|
+
const errorText = await response.text();
|
|
73
|
+
this.error(require_lib_term_map.applyCliTerms(formatApiError(errorText || `HTTP ${response.status}`)), { exit: 1 });
|
|
74
|
+
}
|
|
75
|
+
const json = await response.json();
|
|
76
|
+
this.log(chalk.default.green("File uploaded to action variable"));
|
|
77
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
78
|
+
ok: true,
|
|
79
|
+
data: json,
|
|
80
|
+
summary: "File uploaded",
|
|
81
|
+
breadcrumbs: [{ domain: this.activeWorkspace.domain }, {
|
|
82
|
+
resource: "action",
|
|
83
|
+
id: args.id
|
|
84
|
+
}]
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
//#endregion
|
|
89
|
+
module.exports = ActionUpload;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
const require_runtime = require("../../../_virtual/_rolldown/runtime.cjs");
|
|
2
|
+
const require_lib_term_map = require("../../../lib/term-map.cjs");
|
|
3
|
+
const require_lib_analytics_flags = require("../../../lib/analytics-flags.cjs");
|
|
4
|
+
const require_lib_base_command = require("../../../lib/base-command.cjs");
|
|
5
|
+
const require_lib_output = require("../../../lib/output.cjs");
|
|
6
|
+
let chalk = require("chalk");
|
|
7
|
+
chalk = require_runtime.__toESM(chalk);
|
|
8
|
+
//#region src/commands/analytics/conversions/index.ts
|
|
9
|
+
/**
|
|
10
|
+
* Analytics conversions index command — returns conversion analytics data.
|
|
11
|
+
*
|
|
12
|
+
* Uses GET /analytics/data/conversions (root, no p/size per OpenAPI spec).
|
|
13
|
+
* Satisfies ANL-05: provides the bare `analytics conversions` command.
|
|
14
|
+
*/
|
|
15
|
+
var AnalyticsConversionsIndex = class AnalyticsConversionsIndex extends require_lib_base_command.AuthenticatedCommand {
|
|
16
|
+
static description = "Get conversion analytics data";
|
|
17
|
+
static examples = [
|
|
18
|
+
"<%= config.bin %> analytics conversions --date-expression thisweek",
|
|
19
|
+
"<%= config.bin %> analytics conversions --date-start 2024-01-01 --date-end 2024-01-31",
|
|
20
|
+
"<%= config.bin %> analytics conversions --json"
|
|
21
|
+
];
|
|
22
|
+
static enableJsonFlag = true;
|
|
23
|
+
static agentMetadata = {
|
|
24
|
+
api_endpoint: "GET /analytics/data/conversions",
|
|
25
|
+
auth_scope: "read",
|
|
26
|
+
output_shape: {
|
|
27
|
+
type: "table",
|
|
28
|
+
columns: [
|
|
29
|
+
"Conversions",
|
|
30
|
+
"Views",
|
|
31
|
+
"Visits",
|
|
32
|
+
"Engagement"
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
side_effects: "none"
|
|
36
|
+
};
|
|
37
|
+
static flags = {
|
|
38
|
+
...require_lib_base_command.AuthenticatedCommand.baseFlags,
|
|
39
|
+
...require_lib_analytics_flags.ANALYTICS_DATE_FLAGS,
|
|
40
|
+
...require_lib_analytics_flags.ANALYTICS_FILTER_FLAGS
|
|
41
|
+
};
|
|
42
|
+
async run() {
|
|
43
|
+
const { flags } = await this.parse(AnalyticsConversionsIndex);
|
|
44
|
+
this.printWorkspaceHeader();
|
|
45
|
+
const { data, error } = await this.apiClient.GET("/analytics/data/conversions", { params: { query: {
|
|
46
|
+
date_start: flags["date-start"],
|
|
47
|
+
date_end: flags["date-end"],
|
|
48
|
+
date_expression: flags["date-expression"],
|
|
49
|
+
selection: flags.selection,
|
|
50
|
+
groupby: flags.groupby,
|
|
51
|
+
orderby: flags.orderby,
|
|
52
|
+
order: flags.order
|
|
53
|
+
} } });
|
|
54
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
55
|
+
const resp = data;
|
|
56
|
+
const rows = Array.isArray(resp?.data) ? resp.data : resp?.data ? [resp.data] : [];
|
|
57
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
58
|
+
ok: true,
|
|
59
|
+
data: rows,
|
|
60
|
+
summary: `${rows.length} row(s)`,
|
|
61
|
+
breadcrumbs: [{ domain: this.activeWorkspace.domain }, { resource: "analytics" }]
|
|
62
|
+
});
|
|
63
|
+
if (rows.length === 0) {
|
|
64
|
+
this.log("No data found.");
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
const table = require_lib_output.renderTable([
|
|
68
|
+
"Conversions",
|
|
69
|
+
"Views",
|
|
70
|
+
"Visits",
|
|
71
|
+
"Engagement"
|
|
72
|
+
], rows.map((row) => [
|
|
73
|
+
String(row.conversions ?? ""),
|
|
74
|
+
String(row.views ?? ""),
|
|
75
|
+
String(row.visits ?? ""),
|
|
76
|
+
String(row.engagement ?? "")
|
|
77
|
+
]));
|
|
78
|
+
this.log(table.toString());
|
|
79
|
+
this.log(chalk.default.dim(`${rows.length} row(s)`));
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
//#endregion
|
|
83
|
+
module.exports = AnalyticsConversionsIndex;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
const require_runtime = require("../../../_virtual/_rolldown/runtime.cjs");
|
|
2
|
+
const require_lib_term_map = require("../../../lib/term-map.cjs");
|
|
3
|
+
const require_lib_analytics_flags = require("../../../lib/analytics-flags.cjs");
|
|
4
|
+
const require_lib_base_command = require("../../../lib/base-command.cjs");
|
|
5
|
+
const require_lib_output = require("../../../lib/output.cjs");
|
|
6
|
+
let chalk = require("chalk");
|
|
7
|
+
chalk = require_runtime.__toESM(chalk);
|
|
8
|
+
//#region src/commands/analytics/conversions/timeseries.ts
|
|
9
|
+
/**
|
|
10
|
+
* Analytics conversions timeseries command — returns conversion analytics time series data.
|
|
11
|
+
*
|
|
12
|
+
* Uses GET /analytics/data/conversions/timeseries (no p/size per OpenAPI spec).
|
|
13
|
+
* Satisfies ANL-06.
|
|
14
|
+
*/
|
|
15
|
+
var AnalyticsConversionsTimeseries = class AnalyticsConversionsTimeseries extends require_lib_base_command.AuthenticatedCommand {
|
|
16
|
+
static description = "Get conversion analytics time series data";
|
|
17
|
+
static examples = [
|
|
18
|
+
"<%= config.bin %> analytics conversions timeseries --date-expression thisweek",
|
|
19
|
+
"<%= config.bin %> analytics conversions timeseries --date-start 2024-01-01 --date-end 2024-01-31",
|
|
20
|
+
"<%= config.bin %> analytics conversions timeseries --json"
|
|
21
|
+
];
|
|
22
|
+
static enableJsonFlag = true;
|
|
23
|
+
static agentMetadata = {
|
|
24
|
+
api_endpoint: "GET /analytics/data/conversions/timeseries",
|
|
25
|
+
auth_scope: "read",
|
|
26
|
+
output_shape: {
|
|
27
|
+
type: "table",
|
|
28
|
+
columns: [
|
|
29
|
+
"Date",
|
|
30
|
+
"Conversions",
|
|
31
|
+
"Views",
|
|
32
|
+
"Visits"
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
side_effects: "none"
|
|
36
|
+
};
|
|
37
|
+
static flags = {
|
|
38
|
+
...require_lib_base_command.AuthenticatedCommand.baseFlags,
|
|
39
|
+
...require_lib_analytics_flags.ANALYTICS_DATE_FLAGS,
|
|
40
|
+
...require_lib_analytics_flags.ANALYTICS_FILTER_FLAGS
|
|
41
|
+
};
|
|
42
|
+
async run() {
|
|
43
|
+
const { flags } = await this.parse(AnalyticsConversionsTimeseries);
|
|
44
|
+
this.printWorkspaceHeader();
|
|
45
|
+
const { data, error } = await this.apiClient.GET("/analytics/data/conversions/timeseries", { params: { query: {
|
|
46
|
+
date_start: flags["date-start"],
|
|
47
|
+
date_end: flags["date-end"],
|
|
48
|
+
date_expression: flags["date-expression"],
|
|
49
|
+
selection: flags.selection,
|
|
50
|
+
groupby: flags.groupby,
|
|
51
|
+
orderby: flags.orderby,
|
|
52
|
+
order: flags.order
|
|
53
|
+
} } });
|
|
54
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
55
|
+
const resp = data;
|
|
56
|
+
const rows = Array.isArray(resp?.data) ? resp.data : resp?.data ? [resp.data] : [];
|
|
57
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
58
|
+
ok: true,
|
|
59
|
+
data: rows,
|
|
60
|
+
summary: `${rows.length} row(s)`,
|
|
61
|
+
breadcrumbs: [{ domain: this.activeWorkspace.domain }, { resource: "analytics" }]
|
|
62
|
+
});
|
|
63
|
+
if (rows.length === 0) {
|
|
64
|
+
this.log("No data found.");
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
const table = require_lib_output.renderTable([
|
|
68
|
+
"Date",
|
|
69
|
+
"Conversions",
|
|
70
|
+
"Views",
|
|
71
|
+
"Visits"
|
|
72
|
+
], rows.map((row) => [
|
|
73
|
+
String(row.date ?? ""),
|
|
74
|
+
String(row.conversions ?? ""),
|
|
75
|
+
String(row.views ?? ""),
|
|
76
|
+
String(row.visits ?? "")
|
|
77
|
+
]));
|
|
78
|
+
this.log(table.toString());
|
|
79
|
+
this.log(chalk.default.dim(`${rows.length} row(s)`));
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
//#endregion
|
|
83
|
+
module.exports = AnalyticsConversionsTimeseries;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
const require_runtime = require("../../../_virtual/_rolldown/runtime.cjs");
|
|
2
|
+
const require_lib_term_map = require("../../../lib/term-map.cjs");
|
|
3
|
+
const require_lib_analytics_flags = require("../../../lib/analytics-flags.cjs");
|
|
4
|
+
const require_lib_base_command = require("../../../lib/base-command.cjs");
|
|
5
|
+
const require_lib_output = require("../../../lib/output.cjs");
|
|
6
|
+
let chalk = require("chalk");
|
|
7
|
+
chalk = require_runtime.__toESM(chalk);
|
|
8
|
+
//#region src/commands/analytics/conversions/totals.ts
|
|
9
|
+
/**
|
|
10
|
+
* Analytics conversions totals command — returns aggregate conversion analytics data.
|
|
11
|
+
*
|
|
12
|
+
* Uses GET /analytics/data/conversions/totals (no p/size per OpenAPI spec).
|
|
13
|
+
* Satisfies ANL-06.
|
|
14
|
+
*/
|
|
15
|
+
var AnalyticsConversionsTotals = class AnalyticsConversionsTotals extends require_lib_base_command.AuthenticatedCommand {
|
|
16
|
+
static description = "Get conversion analytics totals";
|
|
17
|
+
static examples = [
|
|
18
|
+
"<%= config.bin %> analytics conversions totals --date-expression thisweek",
|
|
19
|
+
"<%= config.bin %> analytics conversions totals --date-start 2024-01-01 --date-end 2024-01-31",
|
|
20
|
+
"<%= config.bin %> analytics conversions totals --json"
|
|
21
|
+
];
|
|
22
|
+
static enableJsonFlag = true;
|
|
23
|
+
static agentMetadata = {
|
|
24
|
+
api_endpoint: "GET /analytics/data/conversions/totals",
|
|
25
|
+
auth_scope: "read",
|
|
26
|
+
output_shape: {
|
|
27
|
+
type: "table",
|
|
28
|
+
columns: [
|
|
29
|
+
"Conversions",
|
|
30
|
+
"Views",
|
|
31
|
+
"Visits",
|
|
32
|
+
"Engagement"
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
side_effects: "none"
|
|
36
|
+
};
|
|
37
|
+
static flags = {
|
|
38
|
+
...require_lib_base_command.AuthenticatedCommand.baseFlags,
|
|
39
|
+
...require_lib_analytics_flags.ANALYTICS_DATE_FLAGS,
|
|
40
|
+
...require_lib_analytics_flags.ANALYTICS_FILTER_FLAGS
|
|
41
|
+
};
|
|
42
|
+
async run() {
|
|
43
|
+
const { flags } = await this.parse(AnalyticsConversionsTotals);
|
|
44
|
+
this.printWorkspaceHeader();
|
|
45
|
+
const { data, error } = await this.apiClient.GET("/analytics/data/conversions/totals", { params: { query: {
|
|
46
|
+
date_start: flags["date-start"],
|
|
47
|
+
date_end: flags["date-end"],
|
|
48
|
+
date_expression: flags["date-expression"],
|
|
49
|
+
selection: flags.selection,
|
|
50
|
+
groupby: flags.groupby,
|
|
51
|
+
orderby: flags.orderby,
|
|
52
|
+
order: flags.order
|
|
53
|
+
} } });
|
|
54
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
55
|
+
const resp = data;
|
|
56
|
+
const rows = Array.isArray(resp?.data) ? resp.data : resp?.data ? [resp.data] : [];
|
|
57
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
58
|
+
ok: true,
|
|
59
|
+
data: rows,
|
|
60
|
+
summary: `${rows.length} row(s)`,
|
|
61
|
+
breadcrumbs: [{ domain: this.activeWorkspace.domain }, { resource: "analytics" }]
|
|
62
|
+
});
|
|
63
|
+
if (rows.length === 0) {
|
|
64
|
+
this.log("No data found.");
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
const table = require_lib_output.renderTable([
|
|
68
|
+
"Conversions",
|
|
69
|
+
"Views",
|
|
70
|
+
"Visits",
|
|
71
|
+
"Engagement"
|
|
72
|
+
], rows.map((row) => [
|
|
73
|
+
String(row.conversions ?? ""),
|
|
74
|
+
String(row.views ?? ""),
|
|
75
|
+
String(row.visits ?? ""),
|
|
76
|
+
String(row.engagement ?? "")
|
|
77
|
+
]));
|
|
78
|
+
this.log(table.toString());
|
|
79
|
+
this.log(chalk.default.dim(`${rows.length} row(s)`));
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
//#endregion
|
|
83
|
+
module.exports = AnalyticsConversionsTotals;
|