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,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_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/video/weekday.ts
|
|
9
|
+
/**
|
|
10
|
+
* Analytics video weekday command — returns video analytics broken down by day of week.
|
|
11
|
+
*
|
|
12
|
+
* Uses GET /analytics/data/videos/weekday (plural 'videos' per OpenAPI spec).
|
|
13
|
+
* Supports pagination via p/size query params.
|
|
14
|
+
*/
|
|
15
|
+
var AnalyticsVideoWeekday = class AnalyticsVideoWeekday extends require_lib_base_command.AuthenticatedCommand {
|
|
16
|
+
static description = "Get video analytics broken down by day of week";
|
|
17
|
+
static examples = [
|
|
18
|
+
"<%= config.bin %> analytics video weekday --date-expression thismonth",
|
|
19
|
+
"<%= config.bin %> analytics video weekday --date-start 2024-01-01 --date-end 2024-01-31 --page 1 --size 20",
|
|
20
|
+
"<%= config.bin %> analytics video weekday --json"
|
|
21
|
+
];
|
|
22
|
+
static enableJsonFlag = true;
|
|
23
|
+
static agentMetadata = {
|
|
24
|
+
api_endpoint: "GET /analytics/data/videos/weekday",
|
|
25
|
+
auth_scope: "read",
|
|
26
|
+
output_shape: {
|
|
27
|
+
type: "table",
|
|
28
|
+
columns: [
|
|
29
|
+
"Day",
|
|
30
|
+
"Plays",
|
|
31
|
+
"Engagement",
|
|
32
|
+
"Playrate",
|
|
33
|
+
"Traffic"
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
side_effects: "none"
|
|
37
|
+
};
|
|
38
|
+
static flags = {
|
|
39
|
+
...require_lib_base_command.AuthenticatedCommand.baseFlags,
|
|
40
|
+
...require_lib_analytics_flags.ANALYTICS_DATE_FLAGS,
|
|
41
|
+
...require_lib_analytics_flags.ANALYTICS_PAGINATION_FLAGS,
|
|
42
|
+
...require_lib_analytics_flags.ANALYTICS_FILTER_FLAGS
|
|
43
|
+
};
|
|
44
|
+
async run() {
|
|
45
|
+
const { flags } = await this.parse(AnalyticsVideoWeekday);
|
|
46
|
+
this.printWorkspaceHeader();
|
|
47
|
+
const { data, error } = await this.apiClient.GET("/analytics/data/videos/weekday", { params: { query: {
|
|
48
|
+
date_start: flags["date-start"],
|
|
49
|
+
date_end: flags["date-end"],
|
|
50
|
+
date_expression: flags["date-expression"],
|
|
51
|
+
selection: flags.selection,
|
|
52
|
+
groupby: flags.groupby,
|
|
53
|
+
orderby: flags.orderby,
|
|
54
|
+
order: flags.order,
|
|
55
|
+
p: flags.page,
|
|
56
|
+
size: flags.size
|
|
57
|
+
} } });
|
|
58
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
59
|
+
const resp = data;
|
|
60
|
+
const rows = Array.isArray(resp?.data) ? resp.data : resp?.data ? [resp.data] : [];
|
|
61
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
62
|
+
ok: true,
|
|
63
|
+
data: rows,
|
|
64
|
+
summary: `${rows.length} row(s)`,
|
|
65
|
+
breadcrumbs: [{ domain: this.activeWorkspace.domain }, { resource: "analytics" }]
|
|
66
|
+
});
|
|
67
|
+
if (rows.length === 0) {
|
|
68
|
+
this.log("No data found.");
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
const table = require_lib_output.renderTable([
|
|
72
|
+
"Day",
|
|
73
|
+
"Plays",
|
|
74
|
+
"Engagement",
|
|
75
|
+
"Playrate",
|
|
76
|
+
"Traffic"
|
|
77
|
+
], rows.map((row) => [
|
|
78
|
+
String(row.day ?? row.weekday ?? ""),
|
|
79
|
+
String(row.plays ?? ""),
|
|
80
|
+
String(row.engagement ?? ""),
|
|
81
|
+
String(row.playrate ?? ""),
|
|
82
|
+
String(row.traffic ?? "")
|
|
83
|
+
]));
|
|
84
|
+
this.log(table.toString());
|
|
85
|
+
this.log(chalk.default.dim(`${rows.length} row(s)`));
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
//#endregion
|
|
89
|
+
module.exports = AnalyticsVideoWeekday;
|
|
@@ -0,0 +1,76 @@
|
|
|
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/app/add.ts
|
|
9
|
+
/**
|
|
10
|
+
* App add command — creates a new app integration (APP-01).
|
|
11
|
+
*
|
|
12
|
+
* Threat mitigations:
|
|
13
|
+
* T-08-05: extends AuthenticatedCommand — anonymous mode rejected
|
|
14
|
+
*/
|
|
15
|
+
var AppAdd = class AppAdd extends require_lib_base_command.AuthenticatedCommand {
|
|
16
|
+
static description = "Create a new app integration";
|
|
17
|
+
static examples = [
|
|
18
|
+
"<%= config.bin %> app add --name \"My App\"",
|
|
19
|
+
"<%= config.bin %> app add --name \"My App\" --description \"A sample app\"",
|
|
20
|
+
"<%= config.bin %> app add --name \"My App\" --json"
|
|
21
|
+
];
|
|
22
|
+
static enableJsonFlag = true;
|
|
23
|
+
static flags = {
|
|
24
|
+
...require_lib_base_command.AuthenticatedCommand.baseFlags,
|
|
25
|
+
name: _oclif_core.Flags.string({
|
|
26
|
+
description: "App name",
|
|
27
|
+
required: true
|
|
28
|
+
}),
|
|
29
|
+
description: _oclif_core.Flags.string({
|
|
30
|
+
description: "App description",
|
|
31
|
+
required: false
|
|
32
|
+
}),
|
|
33
|
+
style: _oclif_core.Flags.string({
|
|
34
|
+
description: "App style",
|
|
35
|
+
required: false
|
|
36
|
+
}),
|
|
37
|
+
type: _oclif_core.Flags.string({
|
|
38
|
+
description: "App type",
|
|
39
|
+
required: false
|
|
40
|
+
})
|
|
41
|
+
};
|
|
42
|
+
static args = {};
|
|
43
|
+
static agentMetadata = {
|
|
44
|
+
api_endpoint: "POST /app/add",
|
|
45
|
+
auth_scope: "write",
|
|
46
|
+
output_shape: { type: "key-value" },
|
|
47
|
+
side_effects: "creates"
|
|
48
|
+
};
|
|
49
|
+
async run() {
|
|
50
|
+
const { flags } = await this.parse(AppAdd);
|
|
51
|
+
this.printWorkspaceHeader();
|
|
52
|
+
const body = { name: flags.name };
|
|
53
|
+
if (flags.description !== void 0) body.description = flags.description;
|
|
54
|
+
if (flags.style !== void 0) body.style = flags.style;
|
|
55
|
+
if (flags.type !== void 0) body.type = flags.type;
|
|
56
|
+
const { data: createData, error: createError } = await this.apiClient.POST("/app/add", {
|
|
57
|
+
body,
|
|
58
|
+
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
59
|
+
});
|
|
60
|
+
if (createError) this.error(require_lib_term_map.applyCliTerms(formatApiError(createError)), { exit: 1 });
|
|
61
|
+
const appId = createData?.data?.app_id;
|
|
62
|
+
this.log(chalk.default.green("App created"));
|
|
63
|
+
this.log(`ID: ${appId}`);
|
|
64
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
65
|
+
ok: true,
|
|
66
|
+
data: createData,
|
|
67
|
+
summary: "App created",
|
|
68
|
+
breadcrumbs: [{ domain: this.activeWorkspace.domain }, {
|
|
69
|
+
resource: "app",
|
|
70
|
+
id: String(appId)
|
|
71
|
+
}]
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
//#endregion
|
|
76
|
+
module.exports = AppAdd;
|
|
@@ -0,0 +1,57 @@
|
|
|
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/app/delete.ts
|
|
10
|
+
/**
|
|
11
|
+
* App delete command — removes an app integration after confirmation (APP-03).
|
|
12
|
+
*
|
|
13
|
+
* Threat mitigations:
|
|
14
|
+
* T-08-04: confirm() prompt includes workspace domain before destructive POST (repudiation)
|
|
15
|
+
* T-08-05: extends AuthenticatedCommand — anonymous mode rejected
|
|
16
|
+
*/
|
|
17
|
+
var AppDelete = class AppDelete extends require_lib_base_command.AuthenticatedCommand {
|
|
18
|
+
static description = "Delete an app integration from the active workspace";
|
|
19
|
+
static examples = ["<%= config.bin %> app delete 12345", "<%= config.bin %> app delete 12345 --json"];
|
|
20
|
+
static enableJsonFlag = true;
|
|
21
|
+
static flags = { ...require_lib_base_command.AuthenticatedCommand.baseFlags };
|
|
22
|
+
static args = { id: _oclif_core.Args.string({
|
|
23
|
+
description: "App ID",
|
|
24
|
+
required: true
|
|
25
|
+
}) };
|
|
26
|
+
static agentMetadata = {
|
|
27
|
+
api_endpoint: "POST /app/delete",
|
|
28
|
+
auth_scope: "write",
|
|
29
|
+
output_shape: { type: "key-value" },
|
|
30
|
+
side_effects: "destructive"
|
|
31
|
+
};
|
|
32
|
+
async run() {
|
|
33
|
+
const { args } = await this.parse(AppDelete);
|
|
34
|
+
this.printWorkspaceHeader();
|
|
35
|
+
if (!this.jsonEnabled()) {
|
|
36
|
+
const confirmed = await (0, _clack_prompts.confirm)({ message: `Delete app ${args.id} from ${this.activeWorkspace.domain}? This cannot be undone.` });
|
|
37
|
+
if ((0, _clack_prompts.isCancel)(confirmed) || !confirmed) process.exit(2);
|
|
38
|
+
}
|
|
39
|
+
const { data: deleteData, error: deleteError } = await this.apiClient.POST("/app/delete", {
|
|
40
|
+
body: { app_id: Number(args.id) },
|
|
41
|
+
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
42
|
+
});
|
|
43
|
+
if (deleteError) this.error(require_lib_term_map.applyCliTerms(formatApiError(deleteError)), { exit: 1 });
|
|
44
|
+
this.log(chalk.default.green(`App ${args.id} deleted`));
|
|
45
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
46
|
+
ok: true,
|
|
47
|
+
data: deleteData,
|
|
48
|
+
summary: `App ${args.id} deleted`,
|
|
49
|
+
breadcrumbs: [{ domain: this.activeWorkspace.domain }, {
|
|
50
|
+
resource: "app",
|
|
51
|
+
id: args.id
|
|
52
|
+
}]
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
//#endregion
|
|
57
|
+
module.exports = AppDelete;
|
|
@@ -0,0 +1,77 @@
|
|
|
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/app/update.ts
|
|
9
|
+
/**
|
|
10
|
+
* App update command — updates an existing app integration (APP-02).
|
|
11
|
+
*
|
|
12
|
+
* Only includes flags the user explicitly provided (flag mode pattern — T-03-07 analogue).
|
|
13
|
+
*
|
|
14
|
+
* Threat mitigations:
|
|
15
|
+
* T-08-05: extends AuthenticatedCommand — anonymous mode rejected
|
|
16
|
+
*/
|
|
17
|
+
var AppUpdate = class AppUpdate extends require_lib_base_command.AuthenticatedCommand {
|
|
18
|
+
static description = "Update an existing app integration";
|
|
19
|
+
static examples = [
|
|
20
|
+
"<%= config.bin %> app update 12345 --name \"Updated Name\"",
|
|
21
|
+
"<%= config.bin %> app update 12345 --description \"New description\"",
|
|
22
|
+
"<%= config.bin %> app update 12345 --name \"Updated Name\" --description \"New description\"",
|
|
23
|
+
"<%= config.bin %> app update 12345 --name \"Updated Name\" --json"
|
|
24
|
+
];
|
|
25
|
+
static enableJsonFlag = true;
|
|
26
|
+
static flags = {
|
|
27
|
+
...require_lib_base_command.AuthenticatedCommand.baseFlags,
|
|
28
|
+
name: _oclif_core.Flags.string({
|
|
29
|
+
description: "App name",
|
|
30
|
+
required: false
|
|
31
|
+
}),
|
|
32
|
+
description: _oclif_core.Flags.string({
|
|
33
|
+
description: "App description",
|
|
34
|
+
required: false
|
|
35
|
+
}),
|
|
36
|
+
style: _oclif_core.Flags.string({
|
|
37
|
+
description: "App style",
|
|
38
|
+
required: false
|
|
39
|
+
})
|
|
40
|
+
};
|
|
41
|
+
static args = { id: _oclif_core.Args.string({
|
|
42
|
+
description: "App ID",
|
|
43
|
+
required: true
|
|
44
|
+
}) };
|
|
45
|
+
static agentMetadata = {
|
|
46
|
+
api_endpoint: "POST /app/update",
|
|
47
|
+
auth_scope: "write",
|
|
48
|
+
output_shape: { type: "key-value" },
|
|
49
|
+
side_effects: "updates"
|
|
50
|
+
};
|
|
51
|
+
async run() {
|
|
52
|
+
const { args, flags } = await this.parse(AppUpdate);
|
|
53
|
+
this.printWorkspaceHeader();
|
|
54
|
+
if (flags.name === void 0 && flags.description === void 0 && flags.style === void 0) this.error("Provide at least one field to update (--name, --description, or --style)", { exit: 1 });
|
|
55
|
+
const body = { app_id: Number(args.id) };
|
|
56
|
+
if (flags.name !== void 0) body.name = flags.name;
|
|
57
|
+
if (flags.description !== void 0) body.description = flags.description;
|
|
58
|
+
if (flags.style !== void 0) body.style = flags.style;
|
|
59
|
+
const { data: updateData, error: updateError } = await this.apiClient.POST("/app/update", {
|
|
60
|
+
body,
|
|
61
|
+
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
62
|
+
});
|
|
63
|
+
if (updateError) this.error(require_lib_term_map.applyCliTerms(formatApiError(updateError)), { exit: 1 });
|
|
64
|
+
this.log(chalk.default.green(`App ${args.id} updated`));
|
|
65
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
66
|
+
ok: true,
|
|
67
|
+
data: updateData,
|
|
68
|
+
summary: `App ${args.id} updated`,
|
|
69
|
+
breadcrumbs: [{ domain: this.activeWorkspace.domain }, {
|
|
70
|
+
resource: "app",
|
|
71
|
+
id: args.id
|
|
72
|
+
}]
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
//#endregion
|
|
77
|
+
module.exports = AppUpdate;
|
|
@@ -0,0 +1,116 @@
|
|
|
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/audience/companies.ts
|
|
9
|
+
/**
|
|
10
|
+
* Audience companies command — list audience companies (AUD-09).
|
|
11
|
+
*
|
|
12
|
+
* Paginated list of companies associated with audience members.
|
|
13
|
+
*/
|
|
14
|
+
var AudienceCompanies = class AudienceCompanies extends require_lib_base_command.AuthenticatedCommand {
|
|
15
|
+
static description = "List audience companies";
|
|
16
|
+
static agentMetadata = {
|
|
17
|
+
api_endpoint: "GET /audience/companies",
|
|
18
|
+
auth_scope: "read",
|
|
19
|
+
output_shape: {
|
|
20
|
+
type: "table",
|
|
21
|
+
columns: [
|
|
22
|
+
"UUID",
|
|
23
|
+
"Name",
|
|
24
|
+
"Domain",
|
|
25
|
+
"Score",
|
|
26
|
+
"Profiles",
|
|
27
|
+
"Timelines"
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
side_effects: "none"
|
|
31
|
+
};
|
|
32
|
+
static examples = [
|
|
33
|
+
"<%= config.bin %> audience companies",
|
|
34
|
+
"<%= config.bin %> audience companies --identified --size 50",
|
|
35
|
+
"<%= config.bin %> audience companies --domains \"acme.com\" --json"
|
|
36
|
+
];
|
|
37
|
+
static enableJsonFlag = true;
|
|
38
|
+
static flags = {
|
|
39
|
+
...require_lib_base_command.AuthenticatedCommand.baseFlags,
|
|
40
|
+
page: _oclif_core.Flags.integer({
|
|
41
|
+
description: "Page number",
|
|
42
|
+
required: false
|
|
43
|
+
}),
|
|
44
|
+
size: _oclif_core.Flags.integer({
|
|
45
|
+
description: "Page size",
|
|
46
|
+
required: false
|
|
47
|
+
}),
|
|
48
|
+
offset: _oclif_core.Flags.integer({
|
|
49
|
+
description: "Offset for pagination",
|
|
50
|
+
required: false
|
|
51
|
+
}),
|
|
52
|
+
orderby: _oclif_core.Flags.string({
|
|
53
|
+
description: "Order by field",
|
|
54
|
+
required: false
|
|
55
|
+
}),
|
|
56
|
+
order: _oclif_core.Flags.string({
|
|
57
|
+
description: "Sort direction (asc/desc)",
|
|
58
|
+
required: false
|
|
59
|
+
}),
|
|
60
|
+
identified: _oclif_core.Flags.boolean({
|
|
61
|
+
description: "Filter to identified companies only",
|
|
62
|
+
required: false,
|
|
63
|
+
allowNo: true
|
|
64
|
+
}),
|
|
65
|
+
domains: _oclif_core.Flags.string({
|
|
66
|
+
description: "Filter by company domains (space-separated)",
|
|
67
|
+
required: false
|
|
68
|
+
})
|
|
69
|
+
};
|
|
70
|
+
static args = {};
|
|
71
|
+
async run() {
|
|
72
|
+
const { flags } = await this.parse(AudienceCompanies);
|
|
73
|
+
this.printWorkspaceHeader();
|
|
74
|
+
const { data, error } = await this.apiClient.GET("/audience/companies", { params: { query: {
|
|
75
|
+
p: flags.page,
|
|
76
|
+
size: flags.size,
|
|
77
|
+
offset: flags.offset,
|
|
78
|
+
orderby: flags.orderby,
|
|
79
|
+
order: flags.order,
|
|
80
|
+
identified: flags.identified,
|
|
81
|
+
domains: flags.domains
|
|
82
|
+
} } });
|
|
83
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
84
|
+
const resp = data;
|
|
85
|
+
const rows = Array.isArray(resp?.data) ? resp.data : resp?.data ? [resp.data] : [];
|
|
86
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
87
|
+
ok: true,
|
|
88
|
+
data: rows,
|
|
89
|
+
summary: `${rows.length} compan${rows.length === 1 ? "y" : "ies"}`,
|
|
90
|
+
breadcrumbs: [{ domain: this.activeWorkspace.domain }, { resource: "audience" }]
|
|
91
|
+
});
|
|
92
|
+
if (rows.length === 0) {
|
|
93
|
+
this.log("No companies found.");
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
const table = require_lib_output.renderTable([
|
|
97
|
+
"UUID",
|
|
98
|
+
"Name",
|
|
99
|
+
"Domain",
|
|
100
|
+
"Score",
|
|
101
|
+
"Profiles",
|
|
102
|
+
"Timelines"
|
|
103
|
+
], rows.map((r) => [
|
|
104
|
+
String(r.uuid ?? ""),
|
|
105
|
+
String(r.name ?? ""),
|
|
106
|
+
String(r.domain ?? ""),
|
|
107
|
+
String(r.score ?? ""),
|
|
108
|
+
String(r.profile_count ?? ""),
|
|
109
|
+
String(r.timeline_count ?? "")
|
|
110
|
+
]));
|
|
111
|
+
this.log(table.toString());
|
|
112
|
+
this.log(chalk.default.dim(`${rows.length} compan${rows.length === 1 ? "y" : "ies"}`));
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
//#endregion
|
|
116
|
+
module.exports = AudienceCompanies;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
const require_runtime = require("../../../_virtual/_rolldown/runtime.cjs");
|
|
2
|
+
const require_lib_term_map = require("../../../lib/term-map.cjs");
|
|
3
|
+
const require_lib_base_command = require("../../../lib/base-command.cjs");
|
|
4
|
+
const require_lib_output = require("../../../lib/output.cjs");
|
|
5
|
+
let _oclif_core = require("@oclif/core");
|
|
6
|
+
let chalk = require("chalk");
|
|
7
|
+
chalk = require_runtime.__toESM(chalk);
|
|
8
|
+
//#region src/commands/audience/field/list.ts
|
|
9
|
+
/**
|
|
10
|
+
* Audience field list command — list custom audience fields (AUD-12).
|
|
11
|
+
*
|
|
12
|
+
* CRITICAL: This is a GET endpoint (Pitfall 4). D-5 documentation note claiming POST
|
|
13
|
+
* is an error — the OpenAPI spec confirms GET for /audience/field/list.
|
|
14
|
+
*
|
|
15
|
+
* 3-level oclif topic via directory structure (audience/field/list.ts).
|
|
16
|
+
*/
|
|
17
|
+
var AudienceFieldList = class AudienceFieldList extends require_lib_base_command.AuthenticatedCommand {
|
|
18
|
+
static description = "List custom audience fields";
|
|
19
|
+
static agentMetadata = {
|
|
20
|
+
api_endpoint: "GET /audience/field/list",
|
|
21
|
+
auth_scope: "read",
|
|
22
|
+
output_shape: {
|
|
23
|
+
type: "table",
|
|
24
|
+
columns: [
|
|
25
|
+
"Key",
|
|
26
|
+
"Label",
|
|
27
|
+
"Type",
|
|
28
|
+
"Priority",
|
|
29
|
+
"Options"
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
side_effects: "none"
|
|
33
|
+
};
|
|
34
|
+
static examples = [
|
|
35
|
+
"<%= config.bin %> audience field list",
|
|
36
|
+
"<%= config.bin %> audience field list --include-widget-html",
|
|
37
|
+
"<%= config.bin %> audience field list --json"
|
|
38
|
+
];
|
|
39
|
+
static enableJsonFlag = true;
|
|
40
|
+
static flags = {
|
|
41
|
+
...require_lib_base_command.AuthenticatedCommand.baseFlags,
|
|
42
|
+
"include-widget-html": _oclif_core.Flags.boolean({
|
|
43
|
+
description: "Include HTML widget for each field",
|
|
44
|
+
required: false
|
|
45
|
+
})
|
|
46
|
+
};
|
|
47
|
+
static args = {};
|
|
48
|
+
async run() {
|
|
49
|
+
const { flags } = await this.parse(AudienceFieldList);
|
|
50
|
+
this.printWorkspaceHeader();
|
|
51
|
+
const { data, error } = await this.apiClient.GET("/audience/field/list", { params: { query: { include_widget_html_p: flags["include-widget-html"] || void 0 } } });
|
|
52
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
53
|
+
const resp = data;
|
|
54
|
+
const rows = Array.isArray(resp?.data) ? resp.data : resp?.data ? [resp.data] : [];
|
|
55
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
56
|
+
ok: true,
|
|
57
|
+
data: rows,
|
|
58
|
+
summary: `${rows.length} field(s)`,
|
|
59
|
+
breadcrumbs: [{ domain: this.activeWorkspace.domain }, { resource: "audience" }]
|
|
60
|
+
});
|
|
61
|
+
if (rows.length === 0) {
|
|
62
|
+
this.log("No custom fields found.");
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
const table = require_lib_output.renderTable([
|
|
66
|
+
"Key",
|
|
67
|
+
"Label",
|
|
68
|
+
"Type",
|
|
69
|
+
"Priority",
|
|
70
|
+
"Options"
|
|
71
|
+
], rows.map((r) => [
|
|
72
|
+
String(r.key ?? ""),
|
|
73
|
+
String(r.label ?? ""),
|
|
74
|
+
String(r.type ?? ""),
|
|
75
|
+
String(r.priority ?? ""),
|
|
76
|
+
String(r.options ?? "")
|
|
77
|
+
]));
|
|
78
|
+
this.log(table.toString());
|
|
79
|
+
this.log(chalk.default.dim(`${rows.length} field(s)`));
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
//#endregion
|
|
83
|
+
module.exports = AudienceFieldList;
|
|
@@ -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
|
+
let _clack_prompts = require("@clack/prompts");
|
|
9
|
+
//#region src/commands/audience/field/remove.ts
|
|
10
|
+
/**
|
|
11
|
+
* Audience field remove command — remove a custom audience field (AUD-12).
|
|
12
|
+
*
|
|
13
|
+
* DESTRUCTIVE: Permanently deletes a field and all associated data.
|
|
14
|
+
* Requires confirmation prompt before executing (T-07-09 mitigation).
|
|
15
|
+
* JSON mode skips confirmation (automation use case).
|
|
16
|
+
*
|
|
17
|
+
* POST form mutation. key is required per spec.
|
|
18
|
+
* 3-level oclif topic via directory structure (audience/field/remove.ts).
|
|
19
|
+
*/
|
|
20
|
+
var AudienceFieldRemove = class AudienceFieldRemove extends require_lib_base_command.AuthenticatedCommand {
|
|
21
|
+
static description = "Remove a custom audience field";
|
|
22
|
+
static agentMetadata = {
|
|
23
|
+
api_endpoint: "POST /audience/field/remove",
|
|
24
|
+
auth_scope: "write",
|
|
25
|
+
output_shape: { type: "none" },
|
|
26
|
+
side_effects: "destructive"
|
|
27
|
+
};
|
|
28
|
+
static examples = ["<%= config.bin %> audience field remove --key \"department\"", "<%= config.bin %> audience field remove --key \"old-field\" --json"];
|
|
29
|
+
static enableJsonFlag = true;
|
|
30
|
+
static flags = {
|
|
31
|
+
...require_lib_base_command.AuthenticatedCommand.baseFlags,
|
|
32
|
+
key: _oclif_core.Flags.string({
|
|
33
|
+
description: "Field key to remove",
|
|
34
|
+
required: true
|
|
35
|
+
})
|
|
36
|
+
};
|
|
37
|
+
static args = {};
|
|
38
|
+
async run() {
|
|
39
|
+
const { flags } = await this.parse(AudienceFieldRemove);
|
|
40
|
+
this.printWorkspaceHeader();
|
|
41
|
+
if (!this.jsonEnabled()) {
|
|
42
|
+
const confirmed = await (0, _clack_prompts.confirm)({ message: `Permanently remove field "${flags.key}" and all associated data? This cannot be undone.` });
|
|
43
|
+
if (!confirmed || typeof confirmed === "symbol") {
|
|
44
|
+
this.log("Cancelled.");
|
|
45
|
+
this.exit(2);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
const { data, error } = await this.apiClient.POST("/audience/field/remove", {
|
|
49
|
+
body: { key: flags.key },
|
|
50
|
+
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
51
|
+
});
|
|
52
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
53
|
+
this.log(chalk.default.green("Field removed"));
|
|
54
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
55
|
+
ok: true,
|
|
56
|
+
data,
|
|
57
|
+
summary: "Field removed",
|
|
58
|
+
breadcrumbs: [{ domain: this.activeWorkspace.domain }, { resource: "audience" }]
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
//#endregion
|
|
63
|
+
module.exports = AudienceFieldRemove;
|
|
@@ -0,0 +1,78 @@
|
|
|
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/audience/field/set.ts
|
|
9
|
+
/**
|
|
10
|
+
* Audience field set command — create or update a custom audience field (AUD-12).
|
|
11
|
+
*
|
|
12
|
+
* POST form mutation. key, type, and label are all required per spec.
|
|
13
|
+
* 3-level oclif topic via directory structure (audience/field/set.ts).
|
|
14
|
+
*/
|
|
15
|
+
var AudienceFieldSet = class AudienceFieldSet extends require_lib_base_command.AuthenticatedCommand {
|
|
16
|
+
static description = "Create or update a custom audience field";
|
|
17
|
+
static agentMetadata = {
|
|
18
|
+
api_endpoint: "POST /audience/field/set",
|
|
19
|
+
auth_scope: "write",
|
|
20
|
+
output_shape: { type: "none" },
|
|
21
|
+
side_effects: "updates"
|
|
22
|
+
};
|
|
23
|
+
static examples = [
|
|
24
|
+
"<%= config.bin %> audience field set --key \"department\" --type text --label \"Department\"",
|
|
25
|
+
"<%= config.bin %> audience field set --key \"tier\" --type enum --label \"Customer Tier\" --options \"free;pro;enterprise\"",
|
|
26
|
+
"<%= config.bin %> audience field set --key \"score\" --type number --label \"NPS Score\" --priority 1 --json"
|
|
27
|
+
];
|
|
28
|
+
static enableJsonFlag = true;
|
|
29
|
+
static flags = {
|
|
30
|
+
...require_lib_base_command.AuthenticatedCommand.baseFlags,
|
|
31
|
+
key: _oclif_core.Flags.string({
|
|
32
|
+
description: "Unique field key",
|
|
33
|
+
required: true
|
|
34
|
+
}),
|
|
35
|
+
type: _oclif_core.Flags.string({
|
|
36
|
+
description: "Field type (use audience field types to list valid values)",
|
|
37
|
+
required: true
|
|
38
|
+
}),
|
|
39
|
+
label: _oclif_core.Flags.string({
|
|
40
|
+
description: "Human-readable label",
|
|
41
|
+
required: true
|
|
42
|
+
}),
|
|
43
|
+
options: _oclif_core.Flags.string({
|
|
44
|
+
description: "Semicolon-separated options (for enumerable types)",
|
|
45
|
+
required: false
|
|
46
|
+
}),
|
|
47
|
+
priority: _oclif_core.Flags.integer({
|
|
48
|
+
description: "Display order priority",
|
|
49
|
+
required: false
|
|
50
|
+
})
|
|
51
|
+
};
|
|
52
|
+
static args = {};
|
|
53
|
+
async run() {
|
|
54
|
+
const { flags } = await this.parse(AudienceFieldSet);
|
|
55
|
+
this.printWorkspaceHeader();
|
|
56
|
+
const body = {
|
|
57
|
+
key: flags.key,
|
|
58
|
+
type: flags.type,
|
|
59
|
+
label: flags.label
|
|
60
|
+
};
|
|
61
|
+
if (flags.options !== void 0) body.options = flags.options;
|
|
62
|
+
if (flags.priority !== void 0) body.priority = flags.priority;
|
|
63
|
+
const { data, error } = await this.apiClient.POST("/audience/field/set", {
|
|
64
|
+
body,
|
|
65
|
+
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
66
|
+
});
|
|
67
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
68
|
+
this.log(chalk.default.green("Field saved"));
|
|
69
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
70
|
+
ok: true,
|
|
71
|
+
data,
|
|
72
|
+
summary: "Field saved",
|
|
73
|
+
breadcrumbs: [{ domain: this.activeWorkspace.domain }, { resource: "audience" }]
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
//#endregion
|
|
78
|
+
module.exports = AudienceFieldSet;
|