twentythree-cli 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -0
- package/bin/dev.cmd +2 -0
- package/bin/dev.js +28 -0
- package/bin/run.cmd +2 -0
- package/bin/run.js +23 -0
- package/dist/_virtual/_rolldown/runtime.cjs +23 -0
- package/dist/api/client.cjs +24 -0
- package/dist/api/types.cjs +0 -0
- package/dist/auth/credential-store.cjs +22 -0
- package/dist/auth/token-refresh.cjs +70 -0
- package/dist/auth/workspace-config.cjs +61 -0
- package/dist/commands/action/add.cjs +75 -0
- package/dist/commands/action/delete.cjs +64 -0
- package/dist/commands/action/exclude.cjs +70 -0
- package/dist/commands/action/get.cjs +112 -0
- package/dist/commands/action/include.cjs +70 -0
- package/dist/commands/action/list.cjs +119 -0
- package/dist/commands/action/types.cjs +63 -0
- package/dist/commands/action/update.cjs +86 -0
- package/dist/commands/action/upload.cjs +89 -0
- package/dist/commands/analytics/conversions/index.cjs +83 -0
- package/dist/commands/analytics/conversions/timeseries.cjs +83 -0
- package/dist/commands/analytics/conversions/totals.cjs +83 -0
- package/dist/commands/analytics/live/event-timeseries.cjs +86 -0
- package/dist/commands/analytics/live/event-totals.cjs +86 -0
- package/dist/commands/analytics/live/event.cjs +88 -0
- package/dist/commands/analytics/live/index.cjs +89 -0
- package/dist/commands/analytics/live/timeseries.cjs +85 -0
- package/dist/commands/analytics/live/totals.cjs +85 -0
- package/dist/commands/analytics/live/weekday/timeseries.cjs +85 -0
- package/dist/commands/analytics/live/weekday/totals.cjs +85 -0
- package/dist/commands/analytics/live/weekday.cjs +88 -0
- package/dist/commands/analytics/usage/devices/timeseries.cjs +83 -0
- package/dist/commands/analytics/usage/devices/totals.cjs +86 -0
- package/dist/commands/analytics/usage/devices.cjs +89 -0
- package/dist/commands/analytics/usage/domains/totals.cjs +83 -0
- package/dist/commands/analytics/usage/domains.cjs +89 -0
- package/dist/commands/analytics/usage/locations/totals.cjs +83 -0
- package/dist/commands/analytics/usage/locations.cjs +89 -0
- package/dist/commands/analytics/usage/sourceids/totals.cjs +83 -0
- package/dist/commands/analytics/usage/sourceids.cjs +89 -0
- package/dist/commands/analytics/usage/sources/totals.cjs +83 -0
- package/dist/commands/analytics/usage/sources.cjs +89 -0
- package/dist/commands/analytics/usage/spots/timeseries.cjs +83 -0
- package/dist/commands/analytics/usage/spots/totals.cjs +83 -0
- package/dist/commands/analytics/usage/spots.cjs +89 -0
- package/dist/commands/analytics/usage/storage.cjs +52 -0
- package/dist/commands/analytics/usage/traffic/timeseries.cjs +83 -0
- package/dist/commands/analytics/usage/traffic/totals.cjs +86 -0
- package/dist/commands/analytics/usage/traffic.cjs +89 -0
- package/dist/commands/analytics/video/index.cjs +89 -0
- package/dist/commands/analytics/video/performance/timeseries.cjs +83 -0
- package/dist/commands/analytics/video/performance/totals.cjs +80 -0
- package/dist/commands/analytics/video/performance.cjs +89 -0
- package/dist/commands/analytics/video/published/timeseries.cjs +83 -0
- package/dist/commands/analytics/video/published/totals.cjs +80 -0
- package/dist/commands/analytics/video/published.cjs +89 -0
- package/dist/commands/analytics/video/timeseries.cjs +86 -0
- package/dist/commands/analytics/video/totals.cjs +86 -0
- package/dist/commands/analytics/video/weekday/timeseries.cjs +86 -0
- package/dist/commands/analytics/video/weekday/totals.cjs +83 -0
- package/dist/commands/analytics/video/weekday.cjs +89 -0
- package/dist/commands/app/add.cjs +76 -0
- package/dist/commands/app/delete.cjs +57 -0
- package/dist/commands/app/update.cjs +77 -0
- package/dist/commands/audience/companies.cjs +116 -0
- package/dist/commands/audience/field/list.cjs +83 -0
- package/dist/commands/audience/field/remove.cjs +63 -0
- package/dist/commands/audience/field/set.cjs +78 -0
- package/dist/commands/audience/field/types.cjs +57 -0
- package/dist/commands/audience/funnel.cjs +77 -0
- package/dist/commands/audience/identity-sources.cjs +64 -0
- package/dist/commands/audience/list-collectors.cjs +88 -0
- package/dist/commands/audience/list.cjs +122 -0
- package/dist/commands/audience/metrics.cjs +89 -0
- package/dist/commands/audience/register.cjs +106 -0
- package/dist/commands/audience/remove.cjs +72 -0
- package/dist/commands/audience/search.cjs +106 -0
- package/dist/commands/audience/timelines.cjs +115 -0
- package/dist/commands/audience/unregister.cjs +65 -0
- package/dist/commands/auth/credentials.cjs +89 -0
- package/dist/commands/auth/status.cjs +34 -0
- package/dist/commands/category/create.cjs +80 -0
- package/dist/commands/category/delete.cjs +70 -0
- package/dist/commands/category/index.cjs +11 -0
- package/dist/commands/category/list.cjs +98 -0
- package/dist/commands/category/update.cjs +134 -0
- package/dist/commands/collector/exclude.cjs +56 -0
- package/dist/commands/collector/include.cjs +56 -0
- package/dist/commands/collector/list.cjs +81 -0
- package/dist/commands/comment/add.cjs +102 -0
- package/dist/commands/comment/clone.cjs +59 -0
- package/dist/commands/comment/delete.cjs +55 -0
- package/dist/commands/comment/list.cjs +126 -0
- package/dist/commands/comment/promote.cjs +65 -0
- package/dist/commands/comment/reaction/add.cjs +81 -0
- package/dist/commands/comment/reaction/list.cjs +92 -0
- package/dist/commands/comment/reaction/remove.cjs +81 -0
- package/dist/commands/comment/set-order.cjs +63 -0
- package/dist/commands/comment/update.cjs +63 -0
- package/dist/commands/doctor.cjs +129 -0
- package/dist/commands/openupload/list.cjs +95 -0
- package/dist/commands/openupload/update-file.cjs +85 -0
- package/dist/commands/openupload/upload-file.cjs +130 -0
- package/dist/commands/player/delete.cjs +66 -0
- package/dist/commands/player/embed-versions.cjs +83 -0
- package/dist/commands/player/embed.cjs +134 -0
- package/dist/commands/player/list.cjs +86 -0
- package/dist/commands/player/styles.cjs +70 -0
- package/dist/commands/player/update.cjs +80 -0
- package/dist/commands/poll/add.cjs +84 -0
- package/dist/commands/poll/answer.cjs +89 -0
- package/dist/commands/poll/list.cjs +92 -0
- package/dist/commands/poll/remove.cjs +57 -0
- package/dist/commands/poll/set-options.cjs +84 -0
- package/dist/commands/poll/update.cjs +79 -0
- package/dist/commands/presentation/page/link-locations.cjs +57 -0
- package/dist/commands/presentation/setting/list.cjs +44 -0
- package/dist/commands/presentation/setting/update.cjs +67 -0
- package/dist/commands/protection/protect.cjs +68 -0
- package/dist/commands/protection/unprotect.cjs +65 -0
- package/dist/commands/protection/verify.cjs +80 -0
- package/dist/commands/session/get-token.cjs +75 -0
- package/dist/commands/session/redeem-token.cjs +56 -0
- package/dist/commands/setting/update.cjs +79 -0
- package/dist/commands/site/get.cjs +73 -0
- package/dist/commands/site/search.cjs +93 -0
- package/dist/commands/spot/check.cjs +52 -0
- package/dist/commands/spot/create.cjs +79 -0
- package/dist/commands/spot/delete.cjs +68 -0
- package/dist/commands/spot/list.cjs +120 -0
- package/dist/commands/spot/reset-version.cjs +53 -0
- package/dist/commands/spot/set-videos.cjs +64 -0
- package/dist/commands/spot/update.cjs +78 -0
- package/dist/commands/tag/list.cjs +98 -0
- package/dist/commands/tag/related.cjs +57 -0
- package/dist/commands/thumbnail/add.cjs +66 -0
- package/dist/commands/thumbnail/data.cjs +60 -0
- package/dist/commands/thumbnail/delete.cjs +61 -0
- package/dist/commands/thumbnail/duplicate.cjs +67 -0
- package/dist/commands/thumbnail/file/delete.cjs +71 -0
- package/dist/commands/thumbnail/file/list.cjs +74 -0
- package/dist/commands/thumbnail/file/upload.cjs +79 -0
- package/dist/commands/thumbnail/index.cjs +11 -0
- package/dist/commands/thumbnail/list.cjs +89 -0
- package/dist/commands/thumbnail/update.cjs +87 -0
- package/dist/commands/user/create.cjs +87 -0
- package/dist/commands/user/get-login-token.cjs +72 -0
- package/dist/commands/user/get.cjs +67 -0
- package/dist/commands/user/list.cjs +95 -0
- package/dist/commands/user/redeem-login-token.cjs +55 -0
- package/dist/commands/user/send-invitation.cjs +63 -0
- package/dist/commands/user/tokens.cjs +80 -0
- package/dist/commands/user/update.cjs +121 -0
- package/dist/commands/video/delete.cjs +67 -0
- package/dist/commands/video/frame.cjs +69 -0
- package/dist/commands/video/get.cjs +68 -0
- package/dist/commands/video/index.cjs +11 -0
- package/dist/commands/video/list.cjs +98 -0
- package/dist/commands/video/replace.cjs +126 -0
- package/dist/commands/video/section/create.cjs +73 -0
- package/dist/commands/video/section/delete.cjs +78 -0
- package/dist/commands/video/section/index.cjs +11 -0
- package/dist/commands/video/section/list.cjs +75 -0
- package/dist/commands/video/section/set-thumbnail.cjs +73 -0
- package/dist/commands/video/section/update.cjs +84 -0
- package/dist/commands/video/subtitle/archive.cjs +76 -0
- package/dist/commands/video/subtitle/create.cjs +80 -0
- package/dist/commands/video/subtitle/data.cjs +75 -0
- package/dist/commands/video/subtitle/delete.cjs +84 -0
- package/dist/commands/video/subtitle/duplicate.cjs +89 -0
- package/dist/commands/video/subtitle/index.cjs +11 -0
- package/dist/commands/video/subtitle/list.cjs +94 -0
- package/dist/commands/video/subtitle/locales.cjs +60 -0
- package/dist/commands/video/subtitle/set-primary.cjs +64 -0
- package/dist/commands/video/subtitle/types.cjs +42 -0
- package/dist/commands/video/subtitle/update.cjs +93 -0
- package/dist/commands/video/subtitle/upload.cjs +104 -0
- package/dist/commands/video/transcoding-progress.cjs +71 -0
- package/dist/commands/video/update.cjs +184 -0
- package/dist/commands/video/upload.cjs +151 -0
- package/dist/commands/webhook/events.cjs +68 -0
- package/dist/commands/webhook/list.cjs +64 -0
- package/dist/commands/webhook/sample.cjs +47 -0
- package/dist/commands/webhook/subscribe.cjs +66 -0
- package/dist/commands/webhook/unsubscribe.cjs +71 -0
- package/dist/commands/webinar/attachment/delete.cjs +79 -0
- package/dist/commands/webinar/attachment/list.cjs +94 -0
- package/dist/commands/webinar/attachment/set-hidden.cjs +85 -0
- package/dist/commands/webinar/attachment/upload.cjs +128 -0
- package/dist/commands/webinar/clips.cjs +77 -0
- package/dist/commands/webinar/create.cjs +107 -0
- package/dist/commands/webinar/delete.cjs +62 -0
- package/dist/commands/webinar/highlights.cjs +84 -0
- package/dist/commands/webinar/index.cjs +11 -0
- package/dist/commands/webinar/list-formats.cjs +50 -0
- package/dist/commands/webinar/list.cjs +134 -0
- package/dist/commands/webinar/log.cjs +69 -0
- package/dist/commands/webinar/mail/add.cjs +101 -0
- package/dist/commands/webinar/mail/list.cjs +83 -0
- package/dist/commands/webinar/mail/preview.cjs +75 -0
- package/dist/commands/webinar/mail/remove.cjs +75 -0
- package/dist/commands/webinar/mail/send.cjs +68 -0
- package/dist/commands/webinar/mail/test.cjs +86 -0
- package/dist/commands/webinar/mail/update.cjs +84 -0
- package/dist/commands/webinar/metrics.cjs +59 -0
- package/dist/commands/webinar/queued-video/add.cjs +81 -0
- package/dist/commands/webinar/queued-video/remove.cjs +81 -0
- package/dist/commands/webinar/recording/split.cjs +53 -0
- package/dist/commands/webinar/recording/start.cjs +53 -0
- package/dist/commands/webinar/recording/status.cjs +52 -0
- package/dist/commands/webinar/recording/stop.cjs +53 -0
- package/dist/commands/webinar/repeat.cjs +65 -0
- package/dist/commands/webinar/room/connect.cjs +60 -0
- package/dist/commands/webinar/room/info.cjs +60 -0
- package/dist/commands/webinar/room/send-recording.cjs +59 -0
- package/dist/commands/webinar/room/themes.cjs +63 -0
- package/dist/commands/webinar/section/add.cjs +98 -0
- package/dist/commands/webinar/section/list.cjs +86 -0
- package/dist/commands/webinar/section/remove.cjs +75 -0
- package/dist/commands/webinar/section/update.cjs +85 -0
- package/dist/commands/webinar/series/apply-recurrence.cjs +68 -0
- package/dist/commands/webinar/series/cancel.cjs +73 -0
- package/dist/commands/webinar/series/create.cjs +80 -0
- package/dist/commands/webinar/series/delete.cjs +73 -0
- package/dist/commands/webinar/series/list.cjs +79 -0
- package/dist/commands/webinar/series/mapped-objects.cjs +69 -0
- package/dist/commands/webinar/series/metrics.cjs +57 -0
- package/dist/commands/webinar/series/recurrences.cjs +72 -0
- package/dist/commands/webinar/series/set-ondemand.cjs +67 -0
- package/dist/commands/webinar/series/skip-recurrence.cjs +79 -0
- package/dist/commands/webinar/series/update.cjs +71 -0
- package/dist/commands/webinar/series/upload-thumbnail.cjs +117 -0
- package/dist/commands/webinar/speaker/add-from-speaker.cjs +78 -0
- package/dist/commands/webinar/speaker/add-from-user.cjs +78 -0
- package/dist/commands/webinar/speaker/add.cjs +112 -0
- package/dist/commands/webinar/speaker/cancel-guest-request.cjs +62 -0
- package/dist/commands/webinar/speaker/connection-types.cjs +66 -0
- package/dist/commands/webinar/speaker/library.cjs +59 -0
- package/dist/commands/webinar/speaker/list.cjs +90 -0
- package/dist/commands/webinar/speaker/remove-avatar.cjs +62 -0
- package/dist/commands/webinar/speaker/remove.cjs +69 -0
- package/dist/commands/webinar/speaker/request-guest.cjs +62 -0
- package/dist/commands/webinar/speaker/send-invitation.cjs +62 -0
- package/dist/commands/webinar/speaker/set-avatar.cjs +130 -0
- package/dist/commands/webinar/speaker/set-order.cjs +95 -0
- package/dist/commands/webinar/speaker/update.cjs +90 -0
- package/dist/commands/webinar/transcription/connect.cjs +69 -0
- package/dist/commands/webinar/transcription/list.cjs +88 -0
- package/dist/commands/webinar/transcription/locales.cjs +76 -0
- package/dist/commands/webinar/transcription/transcriptionlist.cjs +67 -0
- package/dist/commands/webinar/update.cjs +192 -0
- package/dist/commands/webinar/upload-image.cjs +133 -0
- package/dist/commands/workspace/list.cjs +47 -0
- package/dist/commands/workspace/use.cjs +52 -0
- package/dist/index.cjs +6 -0
- package/dist/lib/analytics-flags.cjs +60 -0
- package/dist/lib/audit.cjs +44 -0
- package/dist/lib/base-command.cjs +156 -0
- package/dist/lib/output.cjs +82 -0
- package/dist/lib/pagination.cjs +36 -0
- package/dist/lib/term-map.cjs +48 -0
- package/dist/upload/chunk-pool.cjs +47 -0
- package/dist/upload/chunked-upload.cjs +131 -0
- package/dist/upload/types.cjs +9 -0
- package/docs/commands/README.md +31 -0
- package/docs/commands/action/add.md +36 -0
- package/docs/commands/action/delete.md +32 -0
- package/docs/commands/action/exclude.md +38 -0
- package/docs/commands/action/get.md +47 -0
- package/docs/commands/action/include.md +38 -0
- package/docs/commands/action/list.md +43 -0
- package/docs/commands/action/types.md +34 -0
- package/docs/commands/action/update.md +42 -0
- package/docs/commands/action/upload.md +36 -0
- package/docs/commands/action.md +306 -0
- package/docs/commands/analytics/conversions.md +113 -0
- package/docs/commands/analytics/live.md +338 -0
- package/docs/commands/analytics/usage.md +674 -0
- package/docs/commands/analytics/video.md +449 -0
- package/docs/commands/analytics.md +1559 -0
- package/docs/commands/app/add.md +38 -0
- package/docs/commands/app/delete.md +32 -0
- package/docs/commands/app/update.md +41 -0
- package/docs/commands/app.md +101 -0
- package/docs/commands/audience/companies.md +41 -0
- package/docs/commands/audience/field.md +119 -0
- package/docs/commands/audience/funnel.md +38 -0
- package/docs/commands/audience/identity-sources.md +29 -0
- package/docs/commands/audience/list-collectors.md +35 -0
- package/docs/commands/audience/list.md +42 -0
- package/docs/commands/audience/metrics.md +40 -0
- package/docs/commands/audience/register.md +45 -0
- package/docs/commands/audience/remove.md +35 -0
- package/docs/commands/audience/search.md +39 -0
- package/docs/commands/audience/timelines.md +41 -0
- package/docs/commands/audience/unregister.md +36 -0
- package/docs/commands/audience.md +485 -0
- package/docs/commands/auth/credentials.md +23 -0
- package/docs/commands/auth/status.md +27 -0
- package/docs/commands/auth.md +45 -0
- package/docs/commands/category/create.md +36 -0
- package/docs/commands/category/delete.md +32 -0
- package/docs/commands/category/list.md +34 -0
- package/docs/commands/category/update.md +39 -0
- package/docs/commands/category.md +141 -0
- package/docs/commands/collector/exclude.md +33 -0
- package/docs/commands/collector/include.md +33 -0
- package/docs/commands/collector/list.md +37 -0
- package/docs/commands/collector.md +93 -0
- package/docs/commands/comment/add.md +43 -0
- package/docs/commands/comment/clone.md +35 -0
- package/docs/commands/comment/delete.md +32 -0
- package/docs/commands/comment/list.md +42 -0
- package/docs/commands/comment/promote.md +37 -0
- package/docs/commands/comment/reaction.md +106 -0
- package/docs/commands/comment/set-order.md +34 -0
- package/docs/commands/comment/update.md +36 -0
- package/docs/commands/comment.md +330 -0
- package/docs/commands/doctor.md +28 -0
- package/docs/commands/openupload/list.md +36 -0
- package/docs/commands/openupload/update-file.md +40 -0
- package/docs/commands/openupload/upload-file.md +39 -0
- package/docs/commands/openupload.md +105 -0
- package/docs/commands/player/delete.md +32 -0
- package/docs/commands/player/embed-versions.md +34 -0
- package/docs/commands/player/embed.md +51 -0
- package/docs/commands/player/list.md +32 -0
- package/docs/commands/player/styles.md +32 -0
- package/docs/commands/player/update.md +37 -0
- package/docs/commands/player.md +193 -0
- package/docs/commands/poll/add.md +33 -0
- package/docs/commands/poll/answer.md +38 -0
- package/docs/commands/poll/list.md +33 -0
- package/docs/commands/poll/remove.md +32 -0
- package/docs/commands/poll/set-options.md +35 -0
- package/docs/commands/poll/update.md +41 -0
- package/docs/commands/poll.md +187 -0
- package/docs/commands/presentation/page.md +29 -0
- package/docs/commands/presentation/setting.md +58 -0
- package/docs/commands/presentation.md +82 -0
- package/docs/commands/protection/protect.md +37 -0
- package/docs/commands/protection/unprotect.md +34 -0
- package/docs/commands/protection/verify.md +39 -0
- package/docs/commands/protection.md +100 -0
- package/docs/commands/session/get-token.md +38 -0
- package/docs/commands/session/redeem-token.md +32 -0
- package/docs/commands/session.md +65 -0
- package/docs/commands/setting/update.md +37 -0
- package/docs/commands/setting.md +37 -0
- package/docs/commands/site/get.md +35 -0
- package/docs/commands/site/search.md +38 -0
- package/docs/commands/site.md +68 -0
- package/docs/commands/spot/check.md +32 -0
- package/docs/commands/spot/create.md +38 -0
- package/docs/commands/spot/delete.md +32 -0
- package/docs/commands/spot/list.md +43 -0
- package/docs/commands/spot/reset-version.md +32 -0
- package/docs/commands/spot/set-videos.md +35 -0
- package/docs/commands/spot/update.md +40 -0
- package/docs/commands/spot.md +222 -0
- package/docs/commands/tag/list.md +44 -0
- package/docs/commands/tag/related.md +32 -0
- package/docs/commands/tag.md +71 -0
- package/docs/commands/thumbnail/add.md +33 -0
- package/docs/commands/thumbnail/data.md +35 -0
- package/docs/commands/thumbnail/delete.md +32 -0
- package/docs/commands/thumbnail/duplicate.md +37 -0
- package/docs/commands/thumbnail/file.md +90 -0
- package/docs/commands/thumbnail/list.md +37 -0
- package/docs/commands/thumbnail/update.md +44 -0
- package/docs/commands/thumbnail.md +293 -0
- package/docs/commands/user/create.md +41 -0
- package/docs/commands/user/get-login-token.md +37 -0
- package/docs/commands/user/get.md +37 -0
- package/docs/commands/user/list.md +40 -0
- package/docs/commands/user/redeem-login-token.md +32 -0
- package/docs/commands/user/send-invitation.md +37 -0
- package/docs/commands/user/tokens.md +34 -0
- package/docs/commands/user/update.md +44 -0
- package/docs/commands/user.md +267 -0
- package/docs/commands/video/delete.md +32 -0
- package/docs/commands/video/frame.md +37 -0
- package/docs/commands/video/get.md +32 -0
- package/docs/commands/video/list.md +33 -0
- package/docs/commands/video/replace.md +37 -0
- package/docs/commands/video/section.md +177 -0
- package/docs/commands/video/subtitle.md +362 -0
- package/docs/commands/video/transcoding-progress.md +32 -0
- package/docs/commands/video/update.md +45 -0
- package/docs/commands/video/upload.md +44 -0
- package/docs/commands/video.md +801 -0
- package/docs/commands/webhook/events.md +34 -0
- package/docs/commands/webhook/list.md +29 -0
- package/docs/commands/webhook/sample.md +32 -0
- package/docs/commands/webhook/subscribe.md +33 -0
- package/docs/commands/webhook/unsubscribe.md +35 -0
- package/docs/commands/webhook.md +143 -0
- package/docs/commands/webinar/attachment.md +135 -0
- package/docs/commands/webinar/clips.md +32 -0
- package/docs/commands/webinar/create.md +40 -0
- package/docs/commands/webinar/delete.md +32 -0
- package/docs/commands/webinar/highlights.md +37 -0
- package/docs/commands/webinar/list-formats.md +29 -0
- package/docs/commands/webinar/list.md +41 -0
- package/docs/commands/webinar/log.md +32 -0
- package/docs/commands/webinar/mail.md +238 -0
- package/docs/commands/webinar/metrics.md +32 -0
- package/docs/commands/webinar/queued-video.md +65 -0
- package/docs/commands/webinar/recording.md +113 -0
- package/docs/commands/webinar/repeat.md +35 -0
- package/docs/commands/webinar/room.md +110 -0
- package/docs/commands/webinar/section.md +134 -0
- package/docs/commands/webinar/series.md +365 -0
- package/docs/commands/webinar/speaker.md +430 -0
- package/docs/commands/webinar/transcription.md +125 -0
- package/docs/commands/webinar/update.md +43 -0
- package/docs/commands/webinar/upload-image.md +42 -0
- package/docs/commands/webinar.md +2030 -0
- package/docs/commands/workspace/list.md +27 -0
- package/docs/commands/workspace/use.md +32 -0
- package/docs/commands/workspace.md +54 -0
- package/docs/guides/api-spec-upgrade.md +92 -0
- package/docs/guides/getting-started.md +66 -0
- package/oclif.manifest.json +21609 -0
- package/package.json +71 -0
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
const require_runtime = require("../../_virtual/_rolldown/runtime.cjs");
|
|
2
|
+
const require_lib_term_map = require("../../lib/term-map.cjs");
|
|
3
|
+
const require_lib_base_command = require("../../lib/base-command.cjs");
|
|
4
|
+
const require_lib_output = require("../../lib/output.cjs");
|
|
5
|
+
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/update.ts
|
|
10
|
+
/**
|
|
11
|
+
* Category update command — updates metadata for an existing category.
|
|
12
|
+
*
|
|
13
|
+
* Two modes:
|
|
14
|
+
* - Flag mode: only the flags explicitly provided are sent to the API
|
|
15
|
+
* - Interactive mode: triggered when no metadata flags provided and not --json;
|
|
16
|
+
* uses @clack/prompts with current values pre-filled
|
|
17
|
+
*
|
|
18
|
+
* Maps to the /album/update API endpoint.
|
|
19
|
+
* "album" is the API term; "category" is the CLI user-facing term (term-map.ts).
|
|
20
|
+
*
|
|
21
|
+
* Threat mitigations:
|
|
22
|
+
* T-04-01: Validate album_id is numeric (Number.isFinite, > 0) before sending to API
|
|
23
|
+
* T-04-04: extends AuthenticatedCommand — anonymous mode rejected
|
|
24
|
+
*/
|
|
25
|
+
var CategoryUpdate = class CategoryUpdate extends require_lib_base_command.AuthenticatedCommand {
|
|
26
|
+
static description = "Update metadata for a category";
|
|
27
|
+
static agentMetadata = {
|
|
28
|
+
api_endpoint: "POST /album/update",
|
|
29
|
+
auth_scope: "write",
|
|
30
|
+
output_shape: { type: "none" },
|
|
31
|
+
side_effects: "updates"
|
|
32
|
+
};
|
|
33
|
+
static examples = [
|
|
34
|
+
"<%= config.bin %> category update 42 --title \"New Title\"",
|
|
35
|
+
"<%= config.bin %> category update 42 --hidden",
|
|
36
|
+
"<%= config.bin %> category update 42"
|
|
37
|
+
];
|
|
38
|
+
static enableJsonFlag = true;
|
|
39
|
+
static flags = {
|
|
40
|
+
...require_lib_base_command.AuthenticatedCommand.baseFlags,
|
|
41
|
+
title: _oclif_core.Flags.string({
|
|
42
|
+
description: "New title for the category",
|
|
43
|
+
required: false
|
|
44
|
+
}),
|
|
45
|
+
description: _oclif_core.Flags.string({
|
|
46
|
+
description: "New description for the category",
|
|
47
|
+
required: false
|
|
48
|
+
}),
|
|
49
|
+
hidden: _oclif_core.Flags.boolean({
|
|
50
|
+
description: "Show or hide the category",
|
|
51
|
+
allowNo: true,
|
|
52
|
+
required: false
|
|
53
|
+
}),
|
|
54
|
+
"hide-p": _oclif_core.Flags.string({
|
|
55
|
+
hidden: true,
|
|
56
|
+
required: false
|
|
57
|
+
})
|
|
58
|
+
};
|
|
59
|
+
static args = { id: _oclif_core.Args.string({
|
|
60
|
+
description: "Category ID",
|
|
61
|
+
required: true
|
|
62
|
+
}) };
|
|
63
|
+
async run() {
|
|
64
|
+
const { args, flags } = await this.parse(CategoryUpdate);
|
|
65
|
+
this.printWorkspaceHeader();
|
|
66
|
+
const categoryId = Number(args.id);
|
|
67
|
+
if (!Number.isFinite(categoryId) || categoryId <= 0) this.error(`Invalid category ID: ${args.id}`, { exit: 1 });
|
|
68
|
+
const metadataFlagsProvided = [
|
|
69
|
+
flags.title,
|
|
70
|
+
flags.description,
|
|
71
|
+
flags.hidden,
|
|
72
|
+
flags["hide-p"]
|
|
73
|
+
].some((v) => v !== void 0);
|
|
74
|
+
const body = { album_id: categoryId };
|
|
75
|
+
if (!metadataFlagsProvided && !this.jsonEnabled()) {
|
|
76
|
+
const { data, error } = await this.apiClient.GET("/album/list", { params: { query: { album_id: categoryId } } });
|
|
77
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
78
|
+
const resp = data;
|
|
79
|
+
let current;
|
|
80
|
+
if (Array.isArray(resp?.data)) current = resp.data[0];
|
|
81
|
+
else if (resp?.data) current = resp.data;
|
|
82
|
+
if (!current) this.error(`Category ${args.id} not found`, { exit: 1 });
|
|
83
|
+
const titleResult = await (0, _clack_prompts.text)({
|
|
84
|
+
message: "Title",
|
|
85
|
+
initialValue: current.title ?? "",
|
|
86
|
+
placeholder: "Category title"
|
|
87
|
+
});
|
|
88
|
+
if ((0, _clack_prompts.isCancel)(titleResult)) process.exit(2);
|
|
89
|
+
const descriptionResult = await (0, _clack_prompts.text)({
|
|
90
|
+
message: "Description",
|
|
91
|
+
initialValue: current.description ?? "",
|
|
92
|
+
placeholder: "Category description"
|
|
93
|
+
});
|
|
94
|
+
if ((0, _clack_prompts.isCancel)(descriptionResult)) process.exit(2);
|
|
95
|
+
const hiddenResult = await (0, _clack_prompts.select)({
|
|
96
|
+
message: "Hidden",
|
|
97
|
+
options: [{
|
|
98
|
+
value: "no",
|
|
99
|
+
label: "No — visible"
|
|
100
|
+
}, {
|
|
101
|
+
value: "yes",
|
|
102
|
+
label: "Yes — hidden"
|
|
103
|
+
}],
|
|
104
|
+
initialValue: current.hide_p ? "yes" : "no"
|
|
105
|
+
});
|
|
106
|
+
if ((0, _clack_prompts.isCancel)(hiddenResult)) process.exit(2);
|
|
107
|
+
body.title = titleResult;
|
|
108
|
+
body.description = descriptionResult;
|
|
109
|
+
body.hide_p = hiddenResult === "yes" ? 1 : 0;
|
|
110
|
+
} else {
|
|
111
|
+
if (flags.title !== void 0) body.title = flags.title;
|
|
112
|
+
if (flags.description !== void 0) body.description = flags.description;
|
|
113
|
+
const hiddenVal = parseBoolParam(flags.hidden, flags["hide-p"]);
|
|
114
|
+
if (hiddenVal !== void 0) body.hide_p = hiddenVal ? 1 : 0;
|
|
115
|
+
}
|
|
116
|
+
const { data: updateData, error: updateError } = await this.apiClient.POST("/album/update", {
|
|
117
|
+
body,
|
|
118
|
+
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
119
|
+
});
|
|
120
|
+
if (updateError) this.error(require_lib_term_map.applyCliTerms(String(updateError)), { exit: 1 });
|
|
121
|
+
this.log(chalk.default.green(`Category ${args.id} updated`));
|
|
122
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
123
|
+
ok: true,
|
|
124
|
+
data: updateData,
|
|
125
|
+
summary: `Category ${args.id} updated`,
|
|
126
|
+
breadcrumbs: [{ domain: this.activeWorkspace.domain }, {
|
|
127
|
+
resource: "category",
|
|
128
|
+
id: args.id
|
|
129
|
+
}]
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
//#endregion
|
|
134
|
+
module.exports = CategoryUpdate;
|
|
@@ -0,0 +1,56 @@
|
|
|
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/collector/exclude.ts
|
|
9
|
+
/**
|
|
10
|
+
* Collector exclude command — blocks a collector (lead capture form) from an object (video/webinar).
|
|
11
|
+
* IMPORTANT: Uses GET (not POST) and the parameter is action_id (not collector_id).
|
|
12
|
+
*/
|
|
13
|
+
var CollectorExclude = class CollectorExclude extends require_lib_base_command.AuthenticatedCommand {
|
|
14
|
+
static description = "Block a collector from a video or webinar";
|
|
15
|
+
static agentMetadata = {
|
|
16
|
+
api_endpoint: "GET /collector/exclude",
|
|
17
|
+
auth_scope: "write",
|
|
18
|
+
output_shape: { type: "none" },
|
|
19
|
+
side_effects: "none"
|
|
20
|
+
};
|
|
21
|
+
static examples = ["<%= config.bin %> collector exclude 456 --object-id 123"];
|
|
22
|
+
static enableJsonFlag = true;
|
|
23
|
+
static flags = {
|
|
24
|
+
...require_lib_base_command.AuthenticatedCommand.baseFlags,
|
|
25
|
+
"object-id": _oclif_core.Flags.string({
|
|
26
|
+
description: "ID of the video or webinar to block the collector from",
|
|
27
|
+
required: true
|
|
28
|
+
})
|
|
29
|
+
};
|
|
30
|
+
static args = { id: _oclif_core.Args.string({
|
|
31
|
+
description: "Collector action ID",
|
|
32
|
+
required: true
|
|
33
|
+
}) };
|
|
34
|
+
async run() {
|
|
35
|
+
const { args, flags } = await this.parse(CollectorExclude);
|
|
36
|
+
this.printWorkspaceHeader();
|
|
37
|
+
const { data, error } = await this.apiClient.GET("/collector/exclude", { params: { query: {
|
|
38
|
+
action_id: Number(args.id),
|
|
39
|
+
object_id: Number(flags["object-id"])
|
|
40
|
+
} } });
|
|
41
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
42
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
43
|
+
ok: true,
|
|
44
|
+
data,
|
|
45
|
+
summary: "Collector excluded",
|
|
46
|
+
breadcrumbs: [
|
|
47
|
+
{ domain: this.activeWorkspace.domain },
|
|
48
|
+
{ resource: "collector" },
|
|
49
|
+
{ id: args.id }
|
|
50
|
+
]
|
|
51
|
+
});
|
|
52
|
+
this.log(chalk.default.green("Collector excluded"));
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
//#endregion
|
|
56
|
+
module.exports = CollectorExclude;
|
|
@@ -0,0 +1,56 @@
|
|
|
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/collector/include.ts
|
|
9
|
+
/**
|
|
10
|
+
* Collector include command — attaches a collector (lead capture form) to an object (video/webinar).
|
|
11
|
+
* IMPORTANT: Uses GET (not POST) and the parameter is action_id (not collector_id).
|
|
12
|
+
*/
|
|
13
|
+
var CollectorInclude = class CollectorInclude extends require_lib_base_command.AuthenticatedCommand {
|
|
14
|
+
static description = "Attach a collector to a video or webinar";
|
|
15
|
+
static agentMetadata = {
|
|
16
|
+
api_endpoint: "GET /collector/include",
|
|
17
|
+
auth_scope: "write",
|
|
18
|
+
output_shape: { type: "none" },
|
|
19
|
+
side_effects: "none"
|
|
20
|
+
};
|
|
21
|
+
static examples = ["<%= config.bin %> collector include 456 --object-id 123"];
|
|
22
|
+
static enableJsonFlag = true;
|
|
23
|
+
static flags = {
|
|
24
|
+
...require_lib_base_command.AuthenticatedCommand.baseFlags,
|
|
25
|
+
"object-id": _oclif_core.Flags.string({
|
|
26
|
+
description: "ID of the video or webinar to attach the collector to",
|
|
27
|
+
required: true
|
|
28
|
+
})
|
|
29
|
+
};
|
|
30
|
+
static args = { id: _oclif_core.Args.string({
|
|
31
|
+
description: "Collector action ID",
|
|
32
|
+
required: true
|
|
33
|
+
}) };
|
|
34
|
+
async run() {
|
|
35
|
+
const { args, flags } = await this.parse(CollectorInclude);
|
|
36
|
+
this.printWorkspaceHeader();
|
|
37
|
+
const { data, error } = await this.apiClient.GET("/collector/include", { params: { query: {
|
|
38
|
+
action_id: Number(args.id),
|
|
39
|
+
object_id: Number(flags["object-id"])
|
|
40
|
+
} } });
|
|
41
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
42
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
43
|
+
ok: true,
|
|
44
|
+
data,
|
|
45
|
+
summary: "Collector included",
|
|
46
|
+
breadcrumbs: [
|
|
47
|
+
{ domain: this.activeWorkspace.domain },
|
|
48
|
+
{ resource: "collector" },
|
|
49
|
+
{ id: args.id }
|
|
50
|
+
]
|
|
51
|
+
});
|
|
52
|
+
this.log(chalk.default.green("Collector included"));
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
//#endregion
|
|
56
|
+
module.exports = CollectorInclude;
|
|
@@ -0,0 +1,81 @@
|
|
|
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/collector/list.ts
|
|
9
|
+
/**
|
|
10
|
+
* Collector list command — lists data collectors (lead capture forms) in the active workspace.
|
|
11
|
+
* Optionally filters by object and includes analytics data.
|
|
12
|
+
*/
|
|
13
|
+
var CollectorList = class CollectorList extends require_lib_base_command.AuthenticatedCommand {
|
|
14
|
+
static description = "List collectors in the active workspace";
|
|
15
|
+
static agentMetadata = {
|
|
16
|
+
api_endpoint: "GET /collector/list",
|
|
17
|
+
auth_scope: "read",
|
|
18
|
+
output_shape: {
|
|
19
|
+
type: "table",
|
|
20
|
+
columns: [
|
|
21
|
+
"ID",
|
|
22
|
+
"Name",
|
|
23
|
+
"Type"
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
side_effects: "none"
|
|
27
|
+
};
|
|
28
|
+
static examples = [
|
|
29
|
+
"<%= config.bin %> collector list",
|
|
30
|
+
"<%= config.bin %> collector list --object-id 123",
|
|
31
|
+
"<%= config.bin %> collector list --include-analytics",
|
|
32
|
+
"<%= config.bin %> collector list --json"
|
|
33
|
+
];
|
|
34
|
+
static enableJsonFlag = true;
|
|
35
|
+
static flags = {
|
|
36
|
+
...require_lib_base_command.AuthenticatedCommand.baseFlags,
|
|
37
|
+
"object-id": _oclif_core.Flags.string({
|
|
38
|
+
description: "Filter collectors by object (video/webinar) ID",
|
|
39
|
+
required: false
|
|
40
|
+
}),
|
|
41
|
+
"include-analytics": _oclif_core.Flags.boolean({
|
|
42
|
+
description: "Include analytics data for each collector",
|
|
43
|
+
required: false
|
|
44
|
+
})
|
|
45
|
+
};
|
|
46
|
+
static args = {};
|
|
47
|
+
async run() {
|
|
48
|
+
const { flags } = await this.parse(CollectorList);
|
|
49
|
+
this.printWorkspaceHeader();
|
|
50
|
+
const { data, error } = await this.apiClient.GET("/collector/list", { params: { query: {
|
|
51
|
+
object_id: flags["object-id"] ? Number(flags["object-id"]) : void 0,
|
|
52
|
+
include_analytics_p: flags["include-analytics"] ? true : void 0
|
|
53
|
+
} } });
|
|
54
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
55
|
+
const resp = data;
|
|
56
|
+
const collectors = Array.isArray(resp?.data) ? resp.data : resp?.data ? [resp.data] : [];
|
|
57
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
58
|
+
ok: true,
|
|
59
|
+
data: collectors,
|
|
60
|
+
summary: `${collectors.length} collector${collectors.length === 1 ? "" : "s"}`,
|
|
61
|
+
breadcrumbs: [{ domain: this.activeWorkspace.domain }, { resource: "collector" }]
|
|
62
|
+
});
|
|
63
|
+
if (collectors.length === 0) {
|
|
64
|
+
this.log("No collectors found.");
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
const table = require_lib_output.renderTable([
|
|
68
|
+
"ID",
|
|
69
|
+
"Name",
|
|
70
|
+
"Type"
|
|
71
|
+
], collectors.map((c) => [
|
|
72
|
+
String(c.action_id ?? c.collector_id ?? ""),
|
|
73
|
+
require_lib_term_map.applyCliTerms(String(c.name ?? c.title ?? "")),
|
|
74
|
+
String(c.type ?? c.collector_type ?? "")
|
|
75
|
+
]));
|
|
76
|
+
this.log(table.toString());
|
|
77
|
+
this.log(chalk.default.dim(`${collectors.length} collector${collectors.length === 1 ? "" : "s"}`));
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
//#endregion
|
|
81
|
+
module.exports = CollectorList;
|
|
@@ -0,0 +1,102 @@
|
|
|
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/comment/add.ts
|
|
9
|
+
/**
|
|
10
|
+
* Comment add command — creates a comment on an object (CMT-02).
|
|
11
|
+
*
|
|
12
|
+
* D-2: Standalone comment topic with --object-id and --object-type flags.
|
|
13
|
+
* object_type values pass through as-is (API native: photo, album, live) — no term mapping.
|
|
14
|
+
*/
|
|
15
|
+
var CommentAdd = class CommentAdd extends require_lib_base_command.AuthenticatedCommand {
|
|
16
|
+
static description = "Add a comment to an object";
|
|
17
|
+
static agentMetadata = {
|
|
18
|
+
api_endpoint: "POST /comment/add",
|
|
19
|
+
auth_scope: "write",
|
|
20
|
+
output_shape: { type: "none" },
|
|
21
|
+
side_effects: "creates"
|
|
22
|
+
};
|
|
23
|
+
static examples = ["<%= config.bin %> comment add --object-id 123 --object-type photo --content \"Great video!\"", "<%= config.bin %> comment add --object-id 456 --object-type live --content \"Question?\" --comment-type question"];
|
|
24
|
+
static enableJsonFlag = true;
|
|
25
|
+
static flags = {
|
|
26
|
+
...require_lib_base_command.AuthenticatedCommand.baseFlags,
|
|
27
|
+
"object-id": _oclif_core.Flags.string({
|
|
28
|
+
description: "Object ID to comment on",
|
|
29
|
+
required: true
|
|
30
|
+
}),
|
|
31
|
+
"object-type": _oclif_core.Flags.string({
|
|
32
|
+
description: "Object type (photo, album, live)",
|
|
33
|
+
required: true
|
|
34
|
+
}),
|
|
35
|
+
content: _oclif_core.Flags.string({
|
|
36
|
+
description: "Comment text content",
|
|
37
|
+
required: false
|
|
38
|
+
}),
|
|
39
|
+
name: _oclif_core.Flags.string({
|
|
40
|
+
description: "Author name for the comment",
|
|
41
|
+
required: false
|
|
42
|
+
}),
|
|
43
|
+
email: _oclif_core.Flags.string({
|
|
44
|
+
description: "Author email for the comment",
|
|
45
|
+
required: false
|
|
46
|
+
}),
|
|
47
|
+
url: _oclif_core.Flags.string({
|
|
48
|
+
description: "URL associated with the comment",
|
|
49
|
+
required: false
|
|
50
|
+
}),
|
|
51
|
+
"comment-type": _oclif_core.Flags.string({
|
|
52
|
+
description: "Comment type (comment, question, chat)",
|
|
53
|
+
required: false
|
|
54
|
+
}),
|
|
55
|
+
"reply-to": _oclif_core.Flags.string({
|
|
56
|
+
description: "Comment ID to reply to",
|
|
57
|
+
required: false
|
|
58
|
+
}),
|
|
59
|
+
"comment-time": _oclif_core.Flags.string({
|
|
60
|
+
description: "Timestamp for the comment",
|
|
61
|
+
required: false
|
|
62
|
+
}),
|
|
63
|
+
"object-token": _oclif_core.Flags.string({
|
|
64
|
+
description: "Object token for the target object",
|
|
65
|
+
required: false
|
|
66
|
+
})
|
|
67
|
+
};
|
|
68
|
+
static args = {};
|
|
69
|
+
async run() {
|
|
70
|
+
const { flags } = await this.parse(CommentAdd);
|
|
71
|
+
this.printWorkspaceHeader();
|
|
72
|
+
const body = {
|
|
73
|
+
object_id: Number(flags["object-id"]),
|
|
74
|
+
object_type: flags["object-type"]
|
|
75
|
+
};
|
|
76
|
+
if (flags.content !== void 0) body.content = flags.content;
|
|
77
|
+
if (flags.name !== void 0) body.name = flags.name;
|
|
78
|
+
if (flags.email !== void 0) body.email = flags.email;
|
|
79
|
+
if (flags.url !== void 0) body.url = flags.url;
|
|
80
|
+
if (flags["comment-type"] !== void 0) body.comment_type = flags["comment-type"];
|
|
81
|
+
if (flags["reply-to"] !== void 0) body.reply_to_comment_id = Number(flags["reply-to"]);
|
|
82
|
+
if (flags["comment-time"] !== void 0) body.comment_time = flags["comment-time"];
|
|
83
|
+
if (flags["object-token"] !== void 0) body.object_token = flags["object-token"];
|
|
84
|
+
const { data, error } = await this.apiClient.POST("/comment/add", {
|
|
85
|
+
body,
|
|
86
|
+
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
87
|
+
});
|
|
88
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
89
|
+
const resp = data;
|
|
90
|
+
const commentId = resp?.comment_id ?? resp?.data?.comment_id;
|
|
91
|
+
this.log(chalk.default.green("Comment added"));
|
|
92
|
+
if (commentId) this.log(`Comment ID: ${commentId}`);
|
|
93
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
94
|
+
ok: true,
|
|
95
|
+
data,
|
|
96
|
+
summary: "Comment added",
|
|
97
|
+
breadcrumbs: [{ domain: this.activeWorkspace.domain }, { resource: "comment" }]
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
//#endregion
|
|
102
|
+
module.exports = CommentAdd;
|
|
@@ -0,0 +1,59 @@
|
|
|
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/comment/clone.ts
|
|
9
|
+
/**
|
|
10
|
+
* Comment clone command — duplicates an existing comment (CMT-06).
|
|
11
|
+
*
|
|
12
|
+
* Uses GET (not POST) per API spec.
|
|
13
|
+
*/
|
|
14
|
+
var CommentClone = class CommentClone extends require_lib_base_command.AuthenticatedCommand {
|
|
15
|
+
static description = "Clone an existing comment";
|
|
16
|
+
static agentMetadata = {
|
|
17
|
+
api_endpoint: "GET /comment/clone",
|
|
18
|
+
auth_scope: "write",
|
|
19
|
+
output_shape: { type: "none" },
|
|
20
|
+
side_effects: "creates"
|
|
21
|
+
};
|
|
22
|
+
static examples = ["<%= config.bin %> comment clone 789", "<%= config.bin %> comment clone 789 --clone-type question"];
|
|
23
|
+
static enableJsonFlag = true;
|
|
24
|
+
static flags = {
|
|
25
|
+
...require_lib_base_command.AuthenticatedCommand.baseFlags,
|
|
26
|
+
"clone-type": _oclif_core.Flags.string({
|
|
27
|
+
description: "Type for the cloned comment (chat, question, comment)",
|
|
28
|
+
required: false
|
|
29
|
+
})
|
|
30
|
+
};
|
|
31
|
+
static args = { id: _oclif_core.Args.string({
|
|
32
|
+
description: "Comment ID to clone",
|
|
33
|
+
required: false
|
|
34
|
+
}) };
|
|
35
|
+
async run() {
|
|
36
|
+
const { args, flags } = await this.parse(CommentClone);
|
|
37
|
+
this.printWorkspaceHeader();
|
|
38
|
+
const { data, error } = await this.apiClient.GET("/comment/clone", { params: { query: {
|
|
39
|
+
comment_id: args.id ? Number(args.id) : void 0,
|
|
40
|
+
clone_comment_type: flags["clone-type"]
|
|
41
|
+
} } });
|
|
42
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
43
|
+
const resp = data;
|
|
44
|
+
const newCommentId = resp?.comment_id ?? resp?.data?.comment_id;
|
|
45
|
+
this.log(chalk.default.green("Comment cloned"));
|
|
46
|
+
if (newCommentId) this.log(`New comment ID: ${newCommentId}`);
|
|
47
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
48
|
+
ok: true,
|
|
49
|
+
data,
|
|
50
|
+
summary: "Comment cloned",
|
|
51
|
+
breadcrumbs: [{ domain: this.activeWorkspace.domain }, {
|
|
52
|
+
resource: "comment",
|
|
53
|
+
id: args.id
|
|
54
|
+
}]
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
//#endregion
|
|
59
|
+
module.exports = CommentClone;
|
|
@@ -0,0 +1,55 @@
|
|
|
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/comment/delete.ts
|
|
10
|
+
/**
|
|
11
|
+
* Comment delete command — removes a comment after confirmation (CMT-04).
|
|
12
|
+
*
|
|
13
|
+
* Threat mitigation T-06-05: Requires interactive confirmation; skipped only in --json mode.
|
|
14
|
+
*/
|
|
15
|
+
var CommentDelete = class CommentDelete extends require_lib_base_command.AuthenticatedCommand {
|
|
16
|
+
static description = "Delete a comment";
|
|
17
|
+
static agentMetadata = {
|
|
18
|
+
api_endpoint: "POST /comment/delete",
|
|
19
|
+
auth_scope: "write",
|
|
20
|
+
output_shape: { type: "none" },
|
|
21
|
+
side_effects: "destructive"
|
|
22
|
+
};
|
|
23
|
+
static examples = ["<%= config.bin %> comment delete 789", "<%= config.bin %> comment delete 789 --json"];
|
|
24
|
+
static enableJsonFlag = true;
|
|
25
|
+
static flags = { ...require_lib_base_command.AuthenticatedCommand.baseFlags };
|
|
26
|
+
static args = { id: _oclif_core.Args.string({
|
|
27
|
+
description: "Comment ID",
|
|
28
|
+
required: true
|
|
29
|
+
}) };
|
|
30
|
+
async run() {
|
|
31
|
+
const { args } = await this.parse(CommentDelete);
|
|
32
|
+
this.printWorkspaceHeader();
|
|
33
|
+
if (!this.jsonEnabled()) {
|
|
34
|
+
const confirmed = await (0, _clack_prompts.confirm)({ message: `Delete comment ${args.id} from ${this.activeWorkspace.domain}? This cannot be undone.` });
|
|
35
|
+
if ((0, _clack_prompts.isCancel)(confirmed) || !confirmed) process.exit(2);
|
|
36
|
+
}
|
|
37
|
+
const { data, error } = await this.apiClient.POST("/comment/delete", {
|
|
38
|
+
body: { comment_id: Number(args.id) },
|
|
39
|
+
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
40
|
+
});
|
|
41
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
42
|
+
this.log(chalk.default.green("Comment deleted"));
|
|
43
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
44
|
+
ok: true,
|
|
45
|
+
data,
|
|
46
|
+
summary: `Comment ${args.id} deleted`,
|
|
47
|
+
breadcrumbs: [{ domain: this.activeWorkspace.domain }, {
|
|
48
|
+
resource: "comment",
|
|
49
|
+
id: args.id
|
|
50
|
+
}]
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
//#endregion
|
|
55
|
+
module.exports = CommentDelete;
|
|
@@ -0,0 +1,126 @@
|
|
|
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/comment/list.ts
|
|
10
|
+
/**
|
|
11
|
+
* Comment list command — lists comments with optional object filtering (CMT-01).
|
|
12
|
+
*
|
|
13
|
+
* D-2: Standalone comment topic; --object-id and --object-type flags (values as-is, no term mapping).
|
|
14
|
+
* Uses fetchAllPages with p/size pagination.
|
|
15
|
+
*/
|
|
16
|
+
var CommentList = class CommentList extends require_lib_base_command.AuthenticatedCommand {
|
|
17
|
+
static description = "List comments in the active workspace";
|
|
18
|
+
static agentMetadata = {
|
|
19
|
+
api_endpoint: "GET /comment/list",
|
|
20
|
+
auth_scope: "read",
|
|
21
|
+
output_shape: {
|
|
22
|
+
type: "table",
|
|
23
|
+
columns: [
|
|
24
|
+
"ID",
|
|
25
|
+
"Author",
|
|
26
|
+
"Content",
|
|
27
|
+
"Type",
|
|
28
|
+
"Date"
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
side_effects: "none"
|
|
32
|
+
};
|
|
33
|
+
static examples = [
|
|
34
|
+
"<%= config.bin %> comment list",
|
|
35
|
+
"<%= config.bin %> comment list --object-id 123 --object-type photo",
|
|
36
|
+
"<%= config.bin %> comment list --json"
|
|
37
|
+
];
|
|
38
|
+
static enableJsonFlag = true;
|
|
39
|
+
static flags = {
|
|
40
|
+
...require_lib_base_command.AuthenticatedCommand.baseFlags,
|
|
41
|
+
"object-id": _oclif_core.Flags.string({
|
|
42
|
+
description: "Filter by object ID",
|
|
43
|
+
required: false
|
|
44
|
+
}),
|
|
45
|
+
"object-type": _oclif_core.Flags.string({
|
|
46
|
+
description: "Filter by object type (photo, album)",
|
|
47
|
+
required: false
|
|
48
|
+
}),
|
|
49
|
+
"comment-type": _oclif_core.Flags.string({
|
|
50
|
+
description: "Filter by comment type (comment, question, chat)",
|
|
51
|
+
required: false
|
|
52
|
+
}),
|
|
53
|
+
search: _oclif_core.Flags.string({
|
|
54
|
+
description: "Search comments by content",
|
|
55
|
+
required: false
|
|
56
|
+
}),
|
|
57
|
+
order: _oclif_core.Flags.string({
|
|
58
|
+
description: "Sort order for results",
|
|
59
|
+
required: false
|
|
60
|
+
}),
|
|
61
|
+
"include-reactions": _oclif_core.Flags.boolean({
|
|
62
|
+
description: "Include reactions on each comment",
|
|
63
|
+
required: false
|
|
64
|
+
}),
|
|
65
|
+
"include-replies": _oclif_core.Flags.boolean({
|
|
66
|
+
description: "Include reply-to comments",
|
|
67
|
+
required: false
|
|
68
|
+
}),
|
|
69
|
+
promoted: _oclif_core.Flags.boolean({
|
|
70
|
+
description: "Filter to promoted comments only",
|
|
71
|
+
required: false
|
|
72
|
+
})
|
|
73
|
+
};
|
|
74
|
+
static args = {};
|
|
75
|
+
async run() {
|
|
76
|
+
const { flags } = await this.parse(CommentList);
|
|
77
|
+
this.printWorkspaceHeader();
|
|
78
|
+
const comments = await require_lib_pagination.fetchAllPages(async (page, size) => {
|
|
79
|
+
const { data, error } = await this.apiClient.GET("/comment/list", { params: { query: {
|
|
80
|
+
p: page,
|
|
81
|
+
size,
|
|
82
|
+
object_id: flags["object-id"] ? Number(flags["object-id"]) : void 0,
|
|
83
|
+
object_type: flags["object-type"],
|
|
84
|
+
comment_type: flags["comment-type"],
|
|
85
|
+
search: flags.search,
|
|
86
|
+
order: flags.order,
|
|
87
|
+
include_reactions_p: flags["include-reactions"] ? 1 : void 0,
|
|
88
|
+
include_reply_to_comments_p: flags["include-replies"] ? 1 : void 0,
|
|
89
|
+
promoted_p: flags.promoted ? 1 : void 0
|
|
90
|
+
} } });
|
|
91
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
92
|
+
const resp = data;
|
|
93
|
+
return {
|
|
94
|
+
data: Array.isArray(resp?.data) ? resp.data : resp?.data ? [resp.data] : [],
|
|
95
|
+
total_count: resp?.total_count
|
|
96
|
+
};
|
|
97
|
+
});
|
|
98
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
99
|
+
ok: true,
|
|
100
|
+
data: comments,
|
|
101
|
+
summary: `${comments.length} comment${comments.length === 1 ? "" : "s"}`,
|
|
102
|
+
breadcrumbs: [{ domain: this.activeWorkspace.domain }, { resource: "comment" }]
|
|
103
|
+
});
|
|
104
|
+
if (comments.length === 0) {
|
|
105
|
+
this.log("No comments found.");
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
const table = require_lib_output.renderTable([
|
|
109
|
+
"ID",
|
|
110
|
+
"Author",
|
|
111
|
+
"Content",
|
|
112
|
+
"Type",
|
|
113
|
+
"Date"
|
|
114
|
+
], comments.map((c) => [
|
|
115
|
+
String(c.comment_id ?? ""),
|
|
116
|
+
String(c.name ?? c.email ?? ""),
|
|
117
|
+
require_lib_term_map.applyCliTerms(String(c.content ?? "")).slice(0, 60),
|
|
118
|
+
String(c.comment_type ?? ""),
|
|
119
|
+
String(c.creation_date_ansi ?? c.date ?? "")
|
|
120
|
+
]));
|
|
121
|
+
this.log(table.toString());
|
|
122
|
+
this.log(chalk.default.dim(`${comments.length} comment${comments.length === 1 ? "" : "s"}`));
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
//#endregion
|
|
126
|
+
module.exports = CommentList;
|