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,106 @@
|
|
|
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/search.ts
|
|
9
|
+
/**
|
|
10
|
+
* Audience search command — searches audience members by text (AUD-02).
|
|
11
|
+
*
|
|
12
|
+
* CRITICAL: /audience/search is a GET endpoint (Pitfall 3). Uses GET not POST.
|
|
13
|
+
* The --text flag is required per the OpenAPI spec.
|
|
14
|
+
*/
|
|
15
|
+
var AudienceSearch = class AudienceSearch extends require_lib_base_command.AuthenticatedCommand {
|
|
16
|
+
static description = "Search audience members";
|
|
17
|
+
static agentMetadata = {
|
|
18
|
+
api_endpoint: "GET /audience/search",
|
|
19
|
+
auth_scope: "read",
|
|
20
|
+
output_shape: {
|
|
21
|
+
type: "table",
|
|
22
|
+
columns: [
|
|
23
|
+
"UUID",
|
|
24
|
+
"Name",
|
|
25
|
+
"Email",
|
|
26
|
+
"Company",
|
|
27
|
+
"Score",
|
|
28
|
+
"Last Seen"
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
side_effects: "none"
|
|
32
|
+
};
|
|
33
|
+
static examples = [
|
|
34
|
+
"<%= config.bin %> audience search --text \"john doe\"",
|
|
35
|
+
"<%= config.bin %> audience search --text \"acme\" --size 20 --json",
|
|
36
|
+
"<%= config.bin %> audience search --text \"jane\" --orderby score --order desc"
|
|
37
|
+
];
|
|
38
|
+
static enableJsonFlag = true;
|
|
39
|
+
static flags = {
|
|
40
|
+
...require_lib_base_command.AuthenticatedCommand.baseFlags,
|
|
41
|
+
text: _oclif_core.Flags.string({
|
|
42
|
+
description: "Search text (required)",
|
|
43
|
+
required: true
|
|
44
|
+
}),
|
|
45
|
+
size: _oclif_core.Flags.integer({
|
|
46
|
+
description: "Number of results",
|
|
47
|
+
required: false
|
|
48
|
+
}),
|
|
49
|
+
offset: _oclif_core.Flags.integer({
|
|
50
|
+
description: "Results offset",
|
|
51
|
+
required: false
|
|
52
|
+
}),
|
|
53
|
+
orderby: _oclif_core.Flags.string({
|
|
54
|
+
description: "Order by field",
|
|
55
|
+
required: false
|
|
56
|
+
}),
|
|
57
|
+
order: _oclif_core.Flags.string({
|
|
58
|
+
description: "Sort direction (asc/desc)",
|
|
59
|
+
required: false
|
|
60
|
+
})
|
|
61
|
+
};
|
|
62
|
+
static args = {};
|
|
63
|
+
async run() {
|
|
64
|
+
const { flags } = await this.parse(AudienceSearch);
|
|
65
|
+
this.printWorkspaceHeader();
|
|
66
|
+
const { data, error } = await this.apiClient.GET("/audience/search", { params: { query: {
|
|
67
|
+
text: flags.text,
|
|
68
|
+
size: flags.size,
|
|
69
|
+
offset: flags.offset,
|
|
70
|
+
orderby: flags.orderby,
|
|
71
|
+
order: flags.order
|
|
72
|
+
} } });
|
|
73
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
74
|
+
const resp = data;
|
|
75
|
+
const rows = Array.isArray(resp?.data) ? resp.data : resp?.data ? [resp.data] : [];
|
|
76
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
77
|
+
ok: true,
|
|
78
|
+
data: rows,
|
|
79
|
+
summary: `${rows.length} result(s)`,
|
|
80
|
+
breadcrumbs: [{ domain: this.activeWorkspace.domain }, { resource: "audience" }]
|
|
81
|
+
});
|
|
82
|
+
if (rows.length === 0) {
|
|
83
|
+
this.log("No audience members found.");
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
const table = require_lib_output.renderTable([
|
|
87
|
+
"UUID",
|
|
88
|
+
"Name",
|
|
89
|
+
"Email",
|
|
90
|
+
"Company",
|
|
91
|
+
"Score",
|
|
92
|
+
"Last Seen"
|
|
93
|
+
], rows.map((r) => [
|
|
94
|
+
String(r.uuid ?? ""),
|
|
95
|
+
String(r.name ?? ""),
|
|
96
|
+
String(r.email ?? ""),
|
|
97
|
+
String(r.company ?? ""),
|
|
98
|
+
String(r.score ?? ""),
|
|
99
|
+
String(r.last_seen ?? "")
|
|
100
|
+
]));
|
|
101
|
+
this.log(table.toString());
|
|
102
|
+
this.log(chalk.default.dim(`${rows.length} result(s)`));
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
//#endregion
|
|
106
|
+
module.exports = AudienceSearch;
|
|
@@ -0,0 +1,115 @@
|
|
|
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/timelines.ts
|
|
9
|
+
/**
|
|
10
|
+
* Audience timelines command — list audience member view timelines (AUD-08).
|
|
11
|
+
*
|
|
12
|
+
* Paginated list of timeline entries (sessions/views per member per object).
|
|
13
|
+
*/
|
|
14
|
+
var AudienceTimelines = class AudienceTimelines extends require_lib_base_command.AuthenticatedCommand {
|
|
15
|
+
static description = "Get audience member timelines";
|
|
16
|
+
static agentMetadata = {
|
|
17
|
+
api_endpoint: "GET /audience/timelines",
|
|
18
|
+
auth_scope: "read",
|
|
19
|
+
output_shape: {
|
|
20
|
+
type: "table",
|
|
21
|
+
columns: [
|
|
22
|
+
"UUID",
|
|
23
|
+
"Object ID",
|
|
24
|
+
"Type",
|
|
25
|
+
"Engagement",
|
|
26
|
+
"Sessions",
|
|
27
|
+
"Source"
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
side_effects: "none"
|
|
31
|
+
};
|
|
32
|
+
static examples = [
|
|
33
|
+
"<%= config.bin %> audience timelines",
|
|
34
|
+
"<%= config.bin %> audience timelines --uuid \"abc-123\" --size 20",
|
|
35
|
+
"<%= config.bin %> audience timelines --objects \"456 789\" --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
|
+
uuid: _oclif_core.Flags.string({
|
|
53
|
+
description: "Filter by audience member UUID",
|
|
54
|
+
required: false
|
|
55
|
+
}),
|
|
56
|
+
objects: _oclif_core.Flags.string({
|
|
57
|
+
description: "Filter by object IDs (space-separated)",
|
|
58
|
+
required: false
|
|
59
|
+
}),
|
|
60
|
+
orderby: _oclif_core.Flags.string({
|
|
61
|
+
description: "Order by field",
|
|
62
|
+
required: false
|
|
63
|
+
}),
|
|
64
|
+
order: _oclif_core.Flags.string({
|
|
65
|
+
description: "Sort direction (asc/desc)",
|
|
66
|
+
required: false
|
|
67
|
+
})
|
|
68
|
+
};
|
|
69
|
+
static args = {};
|
|
70
|
+
async run() {
|
|
71
|
+
const { flags } = await this.parse(AudienceTimelines);
|
|
72
|
+
this.printWorkspaceHeader();
|
|
73
|
+
const { data, error } = await this.apiClient.GET("/audience/timelines", { params: { query: {
|
|
74
|
+
p: flags.page,
|
|
75
|
+
size: flags.size,
|
|
76
|
+
offset: flags.offset,
|
|
77
|
+
uuid: flags.uuid,
|
|
78
|
+
objects: flags.objects,
|
|
79
|
+
orderby: flags.orderby,
|
|
80
|
+
order: flags.order
|
|
81
|
+
} } });
|
|
82
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
83
|
+
const resp = data;
|
|
84
|
+
const rows = Array.isArray(resp?.data) ? resp.data : resp?.data ? [resp.data] : [];
|
|
85
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
86
|
+
ok: true,
|
|
87
|
+
data: rows,
|
|
88
|
+
summary: `${rows.length} timeline(s)`,
|
|
89
|
+
breadcrumbs: [{ domain: this.activeWorkspace.domain }, { resource: "audience" }]
|
|
90
|
+
});
|
|
91
|
+
if (rows.length === 0) {
|
|
92
|
+
this.log("No timelines found.");
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
const table = require_lib_output.renderTable([
|
|
96
|
+
"UUID",
|
|
97
|
+
"Object ID",
|
|
98
|
+
"Type",
|
|
99
|
+
"Engagement",
|
|
100
|
+
"Sessions",
|
|
101
|
+
"Source"
|
|
102
|
+
], rows.map((r) => [
|
|
103
|
+
String(r.uuid ?? ""),
|
|
104
|
+
String(r.object_id ?? ""),
|
|
105
|
+
String(r.object_type ?? ""),
|
|
106
|
+
String(r.engagement ?? ""),
|
|
107
|
+
String(r.sessions ?? ""),
|
|
108
|
+
String(r.source ?? "")
|
|
109
|
+
]));
|
|
110
|
+
this.log(table.toString());
|
|
111
|
+
this.log(chalk.default.dim(`${rows.length} timeline(s)`));
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
//#endregion
|
|
115
|
+
module.exports = AudienceTimelines;
|
|
@@ -0,0 +1,65 @@
|
|
|
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/unregister.ts
|
|
9
|
+
/**
|
|
10
|
+
* Audience unregister command — remove a registration for an audience contact (AUD-04).
|
|
11
|
+
*
|
|
12
|
+
* POST form mutation. --object-id is required per the OpenAPI spec.
|
|
13
|
+
*/
|
|
14
|
+
var AudienceUnregister = class AudienceUnregister extends require_lib_base_command.AuthenticatedCommand {
|
|
15
|
+
static description = "Remove a registration for an audience contact";
|
|
16
|
+
static agentMetadata = {
|
|
17
|
+
api_endpoint: "POST /audience/unregister",
|
|
18
|
+
auth_scope: "write",
|
|
19
|
+
output_shape: { type: "none" },
|
|
20
|
+
side_effects: "destructive"
|
|
21
|
+
};
|
|
22
|
+
static examples = [
|
|
23
|
+
"<%= config.bin %> audience unregister --object-id 123 --email \"jane@example.com\"",
|
|
24
|
+
"<%= config.bin %> audience unregister --object-id 456 --uuid \"abc-def-ghi\"",
|
|
25
|
+
"<%= config.bin %> audience unregister --object-id 789 --json"
|
|
26
|
+
];
|
|
27
|
+
static enableJsonFlag = true;
|
|
28
|
+
static flags = {
|
|
29
|
+
...require_lib_base_command.AuthenticatedCommand.baseFlags,
|
|
30
|
+
"object-id": _oclif_core.Flags.string({
|
|
31
|
+
description: "Object ID to unregister from",
|
|
32
|
+
required: true
|
|
33
|
+
}),
|
|
34
|
+
email: _oclif_core.Flags.string({
|
|
35
|
+
description: "Contact email",
|
|
36
|
+
required: false
|
|
37
|
+
}),
|
|
38
|
+
uuid: _oclif_core.Flags.string({
|
|
39
|
+
description: "Contact UUID",
|
|
40
|
+
required: false
|
|
41
|
+
})
|
|
42
|
+
};
|
|
43
|
+
static args = {};
|
|
44
|
+
async run() {
|
|
45
|
+
const { flags } = await this.parse(AudienceUnregister);
|
|
46
|
+
this.printWorkspaceHeader();
|
|
47
|
+
const body = { object_id: Number(flags["object-id"]) };
|
|
48
|
+
if (flags.email !== void 0) body.email = flags.email;
|
|
49
|
+
if (flags.uuid !== void 0) body.uuid = flags.uuid;
|
|
50
|
+
const { data, error } = await this.apiClient.POST("/audience/unregister", {
|
|
51
|
+
body,
|
|
52
|
+
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
53
|
+
});
|
|
54
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
55
|
+
this.log(chalk.default.green("Contact unregistered"));
|
|
56
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
57
|
+
ok: true,
|
|
58
|
+
data,
|
|
59
|
+
summary: "Contact unregistered",
|
|
60
|
+
breadcrumbs: [{ domain: this.activeWorkspace.domain }, { resource: "audience" }]
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
//#endregion
|
|
65
|
+
module.exports = AudienceUnregister;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
const require_runtime = require("../../_virtual/_rolldown/runtime.cjs");
|
|
2
|
+
const require_auth_credential_store = require("../../auth/credential-store.cjs");
|
|
3
|
+
const require_auth_workspace_config = require("../../auth/workspace-config.cjs");
|
|
4
|
+
const require_auth_token_refresh = require("../../auth/token-refresh.cjs");
|
|
5
|
+
let _oclif_core = require("@oclif/core");
|
|
6
|
+
let _clack_prompts = require("@clack/prompts");
|
|
7
|
+
_clack_prompts = require_runtime.__toESM(_clack_prompts);
|
|
8
|
+
//#region src/commands/auth/credentials.ts
|
|
9
|
+
var Credentials = class Credentials extends _oclif_core.Command {
|
|
10
|
+
static description = "Configure domain and bearer token for a TwentyThree workspace";
|
|
11
|
+
static agentMetadata = {
|
|
12
|
+
api_endpoint: "interactive",
|
|
13
|
+
auth_scope: "none",
|
|
14
|
+
output_shape: { type: "none" },
|
|
15
|
+
side_effects: "creates"
|
|
16
|
+
};
|
|
17
|
+
static examples = ["<%= config.bin %> auth credentials"];
|
|
18
|
+
async run() {
|
|
19
|
+
await this.parse(Credentials);
|
|
20
|
+
_clack_prompts.intro("TwentyThree credentials");
|
|
21
|
+
const domain = await _clack_prompts.text({
|
|
22
|
+
message: "Domain (e.g. company.video23.com)",
|
|
23
|
+
validate: (v) => v.includes(".") ? void 0 : "Enter a valid domain"
|
|
24
|
+
});
|
|
25
|
+
if (_clack_prompts.isCancel(domain)) {
|
|
26
|
+
_clack_prompts.cancel("Cancelled");
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
const token = await _clack_prompts.text({
|
|
30
|
+
message: "Bearer token (press Enter to skip for anonymous access)",
|
|
31
|
+
placeholder: "optional"
|
|
32
|
+
});
|
|
33
|
+
if (_clack_prompts.isCancel(token)) {
|
|
34
|
+
_clack_prompts.cancel("Cancelled");
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
const trimmedToken = token.trim();
|
|
38
|
+
if (trimmedToken) {
|
|
39
|
+
require_auth_credential_store.setCredential(domain, trimmedToken);
|
|
40
|
+
require_auth_workspace_config.setCredentialDomain(domain);
|
|
41
|
+
const s = _clack_prompts.spinner();
|
|
42
|
+
s.start("Discovering workspaces...");
|
|
43
|
+
let workspaces;
|
|
44
|
+
try {
|
|
45
|
+
workspaces = await require_auth_token_refresh.fetchWorkspaceTokens(domain, trimmedToken);
|
|
46
|
+
s.stop("Workspaces discovered");
|
|
47
|
+
} catch (err) {
|
|
48
|
+
s.stop("Failed to discover workspaces");
|
|
49
|
+
this.error(`Could not discover workspaces: ${err instanceof Error ? err.message : String(err)}`, { exit: 1 });
|
|
50
|
+
}
|
|
51
|
+
let selectedWorkspaces;
|
|
52
|
+
if (workspaces.length > 1) {
|
|
53
|
+
const selectedDomain = await _clack_prompts.select({
|
|
54
|
+
message: "Select default workspace",
|
|
55
|
+
options: workspaces.map((w) => ({
|
|
56
|
+
value: w.domain,
|
|
57
|
+
label: `${w.display_name} (${w.domain})`
|
|
58
|
+
}))
|
|
59
|
+
});
|
|
60
|
+
if (_clack_prompts.isCancel(selectedDomain)) {
|
|
61
|
+
_clack_prompts.cancel("Cancelled");
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
selectedWorkspaces = workspaces.filter((w) => w.domain === selectedDomain);
|
|
65
|
+
} else selectedWorkspaces = workspaces;
|
|
66
|
+
const defaultDomain = selectedWorkspaces.length === 1 ? selectedWorkspaces[0].domain : domain;
|
|
67
|
+
require_auth_workspace_config.setWorkspaces(workspaces);
|
|
68
|
+
require_auth_workspace_config.setActiveWorkspace(defaultDomain);
|
|
69
|
+
} else {
|
|
70
|
+
const domainStr = domain;
|
|
71
|
+
require_auth_workspace_config.setWorkspaces([{
|
|
72
|
+
domain: domainStr,
|
|
73
|
+
display_name: domainStr,
|
|
74
|
+
bearer_token: "",
|
|
75
|
+
expiration_time: "",
|
|
76
|
+
api_base_url: `https://${domainStr}/`,
|
|
77
|
+
site_name: domainStr,
|
|
78
|
+
canonical_user_p: false,
|
|
79
|
+
starred_p: false
|
|
80
|
+
}]);
|
|
81
|
+
require_auth_workspace_config.setActiveWorkspace(domainStr);
|
|
82
|
+
this.log("Anonymous mode: only endpoints that do not require authentication are accessible.");
|
|
83
|
+
this.log("Run `twentythree auth credentials` again to add a bearer token.");
|
|
84
|
+
}
|
|
85
|
+
_clack_prompts.outro("Credentials saved");
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
//#endregion
|
|
89
|
+
module.exports = Credentials;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
const require_auth_workspace_config = require("../../auth/workspace-config.cjs");
|
|
2
|
+
const require_lib_base_command = require("../../lib/base-command.cjs");
|
|
3
|
+
//#region src/commands/auth/status.ts
|
|
4
|
+
var Status = class extends require_lib_base_command.BaseCommand {
|
|
5
|
+
static description = "Show authentication status and active workspace";
|
|
6
|
+
static agentMetadata = {
|
|
7
|
+
api_endpoint: "local",
|
|
8
|
+
auth_scope: "none",
|
|
9
|
+
output_shape: { type: "key-value" },
|
|
10
|
+
side_effects: "none"
|
|
11
|
+
};
|
|
12
|
+
static examples = ["<%= config.bin %> auth status"];
|
|
13
|
+
static enableJsonFlag = true;
|
|
14
|
+
async run() {
|
|
15
|
+
this.printWorkspaceHeader();
|
|
16
|
+
const workspace = this.activeWorkspace;
|
|
17
|
+
const authMode = workspace.bearer_token ? "authenticated" : "anonymous (domain-only)";
|
|
18
|
+
const workspaceCount = require_auth_workspace_config.getWorkspaces().length;
|
|
19
|
+
this.log(`Domain: ${workspace.domain}`);
|
|
20
|
+
this.log(`Display: ${workspace.display_name}`);
|
|
21
|
+
this.log(`Auth mode: ${authMode}`);
|
|
22
|
+
if (workspace.bearer_token) this.log(`Token: active (auto-refreshes)`);
|
|
23
|
+
this.log(`Workspaces: ${workspaceCount} configured`);
|
|
24
|
+
if (this.jsonEnabled()) return {
|
|
25
|
+
domain: workspace.domain,
|
|
26
|
+
display_name: workspace.display_name,
|
|
27
|
+
authMode,
|
|
28
|
+
expiration_time: workspace.expiration_time || null,
|
|
29
|
+
workspaceCount
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
//#endregion
|
|
34
|
+
module.exports = Status;
|
|
@@ -0,0 +1,80 @@
|
|
|
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/category/create.ts
|
|
9
|
+
/**
|
|
10
|
+
* Category create command — creates a new category in the active workspace.
|
|
11
|
+
*
|
|
12
|
+
* Maps to the /album/create API endpoint.
|
|
13
|
+
* "album" is the API term; "category" is the CLI user-facing term (term-map.ts).
|
|
14
|
+
*
|
|
15
|
+
* Threat mitigations:
|
|
16
|
+
* T-04-04: extends AuthenticatedCommand — anonymous mode rejected
|
|
17
|
+
*/
|
|
18
|
+
var CategoryCreate = class CategoryCreate extends require_lib_base_command.AuthenticatedCommand {
|
|
19
|
+
static description = "Create a new category";
|
|
20
|
+
static agentMetadata = {
|
|
21
|
+
api_endpoint: "POST /album/create",
|
|
22
|
+
auth_scope: "write",
|
|
23
|
+
output_shape: { type: "none" },
|
|
24
|
+
side_effects: "creates"
|
|
25
|
+
};
|
|
26
|
+
static examples = [
|
|
27
|
+
"<%= config.bin %> category create --title \"My Category\"",
|
|
28
|
+
"<%= config.bin %> category create --title \"My Category\" --json",
|
|
29
|
+
"<%= config.bin %> category create --title \"Hidden Category\" --hidden"
|
|
30
|
+
];
|
|
31
|
+
static enableJsonFlag = true;
|
|
32
|
+
static flags = {
|
|
33
|
+
...require_lib_base_command.AuthenticatedCommand.baseFlags,
|
|
34
|
+
title: _oclif_core.Flags.string({
|
|
35
|
+
description: "Title for the new category",
|
|
36
|
+
required: true
|
|
37
|
+
}),
|
|
38
|
+
description: _oclif_core.Flags.string({
|
|
39
|
+
description: "Description for the new category",
|
|
40
|
+
required: false
|
|
41
|
+
}),
|
|
42
|
+
hidden: _oclif_core.Flags.boolean({
|
|
43
|
+
description: "Create as hidden category",
|
|
44
|
+
allowNo: true,
|
|
45
|
+
required: false
|
|
46
|
+
}),
|
|
47
|
+
"hide-p": _oclif_core.Flags.string({
|
|
48
|
+
hidden: true,
|
|
49
|
+
required: false
|
|
50
|
+
})
|
|
51
|
+
};
|
|
52
|
+
static args = {};
|
|
53
|
+
async run() {
|
|
54
|
+
const { flags } = await this.parse(CategoryCreate);
|
|
55
|
+
this.printWorkspaceHeader();
|
|
56
|
+
const body = { title: flags.title };
|
|
57
|
+
if (flags.description !== void 0) body.description = flags.description;
|
|
58
|
+
const hiddenVal = parseBoolParam(flags.hidden, flags["hide-p"]);
|
|
59
|
+
if (hiddenVal !== void 0) body.hide_p = hiddenVal ? 1 : 0;
|
|
60
|
+
const { data: createData, error: createError } = await this.apiClient.POST("/album/create", {
|
|
61
|
+
body,
|
|
62
|
+
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
63
|
+
});
|
|
64
|
+
if (createError) this.error(require_lib_term_map.applyCliTerms(formatApiError(createError)), { exit: 1 });
|
|
65
|
+
const albumId = createData?.data?.album_id;
|
|
66
|
+
this.log(chalk.default.green("Category created"));
|
|
67
|
+
this.log(`ID: ${albumId}`);
|
|
68
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
69
|
+
ok: true,
|
|
70
|
+
data: createData,
|
|
71
|
+
summary: "Category created",
|
|
72
|
+
breadcrumbs: [{ domain: this.activeWorkspace.domain }, {
|
|
73
|
+
resource: "category",
|
|
74
|
+
id: String(albumId)
|
|
75
|
+
}]
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
//#endregion
|
|
80
|
+
module.exports = CategoryCreate;
|
|
@@ -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
|
+
let _clack_prompts = require("@clack/prompts");
|
|
9
|
+
//#region src/commands/category/delete.ts
|
|
10
|
+
/**
|
|
11
|
+
* Category delete command — deletes a category after confirmation.
|
|
12
|
+
*
|
|
13
|
+
* Prompts user to confirm deletion showing the workspace domain so they know
|
|
14
|
+
* which workspace they are deleting from (T-04-02 repudiation mitigation).
|
|
15
|
+
*
|
|
16
|
+
* --json flag skips the confirmation prompt (scripting mode — assume confirmed).
|
|
17
|
+
*
|
|
18
|
+
* Maps to the /album/delete API endpoint.
|
|
19
|
+
* "album" is the API term; "category" is the CLI user-facing term (term-map.ts).
|
|
20
|
+
*
|
|
21
|
+
* Exit codes:
|
|
22
|
+
* 0 — success
|
|
23
|
+
* 1 — error (category not found, API error)
|
|
24
|
+
* 2 — cancelled (user declined confirmation)
|
|
25
|
+
*
|
|
26
|
+
* Threat mitigations:
|
|
27
|
+
* T-04-02: Confirmation prompt includes workspace domain
|
|
28
|
+
* T-04-04: extends AuthenticatedCommand — anonymous mode rejected
|
|
29
|
+
*/
|
|
30
|
+
var CategoryDelete = class CategoryDelete extends require_lib_base_command.AuthenticatedCommand {
|
|
31
|
+
static description = "Delete a category from the active workspace";
|
|
32
|
+
static agentMetadata = {
|
|
33
|
+
api_endpoint: "POST /album/delete",
|
|
34
|
+
auth_scope: "write",
|
|
35
|
+
output_shape: { type: "none" },
|
|
36
|
+
side_effects: "destructive"
|
|
37
|
+
};
|
|
38
|
+
static examples = ["<%= config.bin %> category delete 42", "<%= config.bin %> category delete 42 --json"];
|
|
39
|
+
static enableJsonFlag = true;
|
|
40
|
+
static flags = { ...require_lib_base_command.AuthenticatedCommand.baseFlags };
|
|
41
|
+
static args = { id: _oclif_core.Args.string({
|
|
42
|
+
description: "Category ID",
|
|
43
|
+
required: true
|
|
44
|
+
}) };
|
|
45
|
+
async run() {
|
|
46
|
+
const { args } = await this.parse(CategoryDelete);
|
|
47
|
+
this.printWorkspaceHeader();
|
|
48
|
+
if (!this.jsonEnabled()) {
|
|
49
|
+
const confirmed = await (0, _clack_prompts.confirm)({ message: `Delete category ${args.id} from ${this.activeWorkspace.domain}? This cannot be undone.` });
|
|
50
|
+
if ((0, _clack_prompts.isCancel)(confirmed) || !confirmed) process.exit(2);
|
|
51
|
+
}
|
|
52
|
+
const { data: deleteData, error: deleteError } = await this.apiClient.POST("/album/delete", {
|
|
53
|
+
body: { album_id: Number(args.id) },
|
|
54
|
+
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
55
|
+
});
|
|
56
|
+
if (deleteError) this.error(require_lib_term_map.applyCliTerms(formatApiError(deleteError)), { exit: 1 });
|
|
57
|
+
this.log(chalk.default.green(`Category ${args.id} deleted`));
|
|
58
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
59
|
+
ok: true,
|
|
60
|
+
data: deleteData,
|
|
61
|
+
summary: `Category ${args.id} deleted`,
|
|
62
|
+
breadcrumbs: [{ domain: this.activeWorkspace.domain }, {
|
|
63
|
+
resource: "category",
|
|
64
|
+
id: args.id
|
|
65
|
+
}]
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
//#endregion
|
|
70
|
+
module.exports = CategoryDelete;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
require("../../_virtual/_rolldown/runtime.cjs");
|
|
2
|
+
let _oclif_core = require("@oclif/core");
|
|
3
|
+
//#region src/commands/category/index.ts
|
|
4
|
+
var CategoryIndex = class extends _oclif_core.Command {
|
|
5
|
+
static description = "Manage categories — list, create, update, and delete";
|
|
6
|
+
async run() {
|
|
7
|
+
this.log("Run \"twentythree category --help\" for available commands");
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
//#endregion
|
|
11
|
+
module.exports = CategoryIndex;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
const require_runtime = require("../../_virtual/_rolldown/runtime.cjs");
|
|
2
|
+
const require_lib_term_map = require("../../lib/term-map.cjs");
|
|
3
|
+
const require_lib_base_command = require("../../lib/base-command.cjs");
|
|
4
|
+
const require_lib_output = require("../../lib/output.cjs");
|
|
5
|
+
const require_lib_pagination = require("../../lib/pagination.cjs");
|
|
6
|
+
let _oclif_core = require("@oclif/core");
|
|
7
|
+
let chalk = require("chalk");
|
|
8
|
+
chalk = require_runtime.__toESM(chalk);
|
|
9
|
+
//#region src/commands/category/list.ts
|
|
10
|
+
/**
|
|
11
|
+
* Category list command — lists all categories in the active workspace with auto-pagination.
|
|
12
|
+
* Renders a cli-table3 table with columns: ID, Title, Hidden, Created.
|
|
13
|
+
* Supports --json output with { ok, data, summary, breadcrumbs } shape (CLI-01).
|
|
14
|
+
*
|
|
15
|
+
* Maps to the /album/list API endpoint.
|
|
16
|
+
* "album" is the API term; "category" is the CLI user-facing term (term-map.ts).
|
|
17
|
+
*
|
|
18
|
+
* Threat mitigations:
|
|
19
|
+
* T-04-04: extends AuthenticatedCommand — anonymous mode rejected
|
|
20
|
+
*/
|
|
21
|
+
var CategoryList = class CategoryList extends require_lib_base_command.AuthenticatedCommand {
|
|
22
|
+
static description = "List categories in the active workspace";
|
|
23
|
+
static agentMetadata = {
|
|
24
|
+
api_endpoint: "GET /album/list",
|
|
25
|
+
auth_scope: "anonymous",
|
|
26
|
+
output_shape: {
|
|
27
|
+
type: "table",
|
|
28
|
+
columns: [
|
|
29
|
+
"ID",
|
|
30
|
+
"Title",
|
|
31
|
+
"Hidden",
|
|
32
|
+
"Created"
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
side_effects: "none"
|
|
36
|
+
};
|
|
37
|
+
static examples = [
|
|
38
|
+
"<%= config.bin %> category list",
|
|
39
|
+
"<%= config.bin %> category list --json",
|
|
40
|
+
"<%= config.bin %> category list --include-hidden"
|
|
41
|
+
];
|
|
42
|
+
static enableJsonFlag = true;
|
|
43
|
+
static flags = {
|
|
44
|
+
...require_lib_base_command.AuthenticatedCommand.baseFlags,
|
|
45
|
+
"include-hidden": _oclif_core.Flags.boolean({
|
|
46
|
+
description: "Include hidden categories in the results",
|
|
47
|
+
allowNo: true,
|
|
48
|
+
required: false
|
|
49
|
+
}),
|
|
50
|
+
"include-hidden-p": _oclif_core.Flags.string({
|
|
51
|
+
hidden: true,
|
|
52
|
+
required: false
|
|
53
|
+
})
|
|
54
|
+
};
|
|
55
|
+
static args = {};
|
|
56
|
+
async run() {
|
|
57
|
+
const { flags } = await this.parse(CategoryList);
|
|
58
|
+
this.printWorkspaceHeader();
|
|
59
|
+
const categories = await require_lib_pagination.fetchAllPages(async (page, size) => {
|
|
60
|
+
const { data, error } = await this.apiClient.GET("/album/list", { params: { query: {
|
|
61
|
+
p: page,
|
|
62
|
+
size,
|
|
63
|
+
include_hidden_p: parseBoolParam(flags["include-hidden"], flags["include-hidden-p"]) ?? void 0
|
|
64
|
+
} } });
|
|
65
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
66
|
+
const resp = data;
|
|
67
|
+
return {
|
|
68
|
+
data: Array.isArray(resp?.data) ? resp.data : resp?.data ? [resp.data] : [],
|
|
69
|
+
total_count: resp?.total_count
|
|
70
|
+
};
|
|
71
|
+
});
|
|
72
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
73
|
+
ok: true,
|
|
74
|
+
data: categories,
|
|
75
|
+
summary: `${categories.length} categor${categories.length === 1 ? "y" : "ies"}`,
|
|
76
|
+
breadcrumbs: [{ domain: this.activeWorkspace.domain }, { resource: "category" }]
|
|
77
|
+
});
|
|
78
|
+
if (categories.length === 0) {
|
|
79
|
+
this.log("No categories found.");
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
const table = require_lib_output.renderTable([
|
|
83
|
+
"ID",
|
|
84
|
+
"Title",
|
|
85
|
+
"Hidden",
|
|
86
|
+
"Created"
|
|
87
|
+
], categories.map((c) => [
|
|
88
|
+
String(c.album_id ?? ""),
|
|
89
|
+
require_lib_term_map.applyCliTerms(String(c.title ?? "")),
|
|
90
|
+
c.hide_p ? "yes" : "no",
|
|
91
|
+
String(c.creation_date_ansi ?? "")
|
|
92
|
+
]));
|
|
93
|
+
this.log(table.toString());
|
|
94
|
+
this.log(chalk.default.dim(`${categories.length} categor${categories.length === 1 ? "y" : "ies"}`));
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
//#endregion
|
|
98
|
+
module.exports = CategoryList;
|