twentythree-cli 1.0.0 → 1.0.2
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/bin/dev.js +0 -0
- package/dist/commands/action/add.cjs +1 -1
- package/dist/commands/action/delete.cjs +1 -1
- package/dist/commands/action/exclude.cjs +1 -1
- package/dist/commands/action/get.cjs +1 -1
- package/dist/commands/action/include.cjs +1 -1
- package/dist/commands/action/list.cjs +1 -1
- package/dist/commands/action/types.cjs +1 -1
- package/dist/commands/action/update.cjs +1 -1
- package/dist/commands/action/upload.cjs +1 -1
- package/dist/commands/analytics/conversions/index.cjs +1 -1
- package/dist/commands/analytics/conversions/timeseries.cjs +1 -1
- package/dist/commands/analytics/conversions/totals.cjs +1 -1
- package/dist/commands/analytics/live/event-timeseries.cjs +1 -1
- package/dist/commands/analytics/live/event-totals.cjs +1 -1
- package/dist/commands/analytics/live/event.cjs +1 -1
- package/dist/commands/analytics/live/index.cjs +1 -1
- package/dist/commands/analytics/live/timeseries.cjs +1 -1
- package/dist/commands/analytics/live/totals.cjs +1 -1
- package/dist/commands/analytics/live/weekday/timeseries.cjs +1 -1
- package/dist/commands/analytics/live/weekday/totals.cjs +1 -1
- package/dist/commands/analytics/live/weekday.cjs +1 -1
- package/dist/commands/analytics/usage/devices/timeseries.cjs +1 -1
- package/dist/commands/analytics/usage/devices/totals.cjs +1 -1
- package/dist/commands/analytics/usage/devices.cjs +1 -1
- package/dist/commands/analytics/usage/domains/totals.cjs +1 -1
- package/dist/commands/analytics/usage/domains.cjs +1 -1
- package/dist/commands/analytics/usage/locations/totals.cjs +1 -1
- package/dist/commands/analytics/usage/locations.cjs +1 -1
- package/dist/commands/analytics/usage/sourceids/totals.cjs +1 -1
- package/dist/commands/analytics/usage/sourceids.cjs +1 -1
- package/dist/commands/analytics/usage/sources/totals.cjs +1 -1
- package/dist/commands/analytics/usage/sources.cjs +1 -1
- package/dist/commands/analytics/usage/spots/timeseries.cjs +1 -1
- package/dist/commands/analytics/usage/spots/totals.cjs +1 -1
- package/dist/commands/analytics/usage/spots.cjs +1 -1
- package/dist/commands/analytics/usage/storage.cjs +1 -1
- package/dist/commands/analytics/usage/traffic/timeseries.cjs +1 -1
- package/dist/commands/analytics/usage/traffic/totals.cjs +1 -1
- package/dist/commands/analytics/usage/traffic.cjs +1 -1
- package/dist/commands/analytics/video/index.cjs +1 -1
- package/dist/commands/analytics/video/performance/timeseries.cjs +1 -1
- package/dist/commands/analytics/video/performance/totals.cjs +1 -1
- package/dist/commands/analytics/video/performance.cjs +1 -1
- package/dist/commands/analytics/video/published/timeseries.cjs +1 -1
- package/dist/commands/analytics/video/published/totals.cjs +1 -1
- package/dist/commands/analytics/video/published.cjs +1 -1
- package/dist/commands/analytics/video/timeseries.cjs +1 -1
- package/dist/commands/analytics/video/totals.cjs +1 -1
- package/dist/commands/analytics/video/weekday/timeseries.cjs +1 -1
- package/dist/commands/analytics/video/weekday/totals.cjs +1 -1
- package/dist/commands/analytics/video/weekday.cjs +1 -1
- package/dist/commands/app/add.cjs +1 -1
- package/dist/commands/app/delete.cjs +1 -1
- package/dist/commands/app/update.cjs +1 -1
- package/dist/commands/audience/companies.cjs +1 -1
- package/dist/commands/audience/field/list.cjs +1 -1
- package/dist/commands/audience/field/remove.cjs +1 -1
- package/dist/commands/audience/field/set.cjs +1 -1
- package/dist/commands/audience/field/types.cjs +1 -1
- package/dist/commands/audience/funnel.cjs +1 -1
- package/dist/commands/audience/identity-sources.cjs +1 -1
- package/dist/commands/audience/list-collectors.cjs +1 -1
- package/dist/commands/audience/list.cjs +1 -1
- package/dist/commands/audience/metrics.cjs +1 -1
- package/dist/commands/audience/register.cjs +1 -1
- package/dist/commands/audience/remove.cjs +1 -1
- package/dist/commands/audience/search.cjs +1 -1
- package/dist/commands/audience/timelines.cjs +1 -1
- package/dist/commands/audience/unregister.cjs +1 -1
- package/dist/commands/auth/credentials.cjs +3 -2
- package/dist/commands/autocomplete/index.cjs +79 -0
- package/dist/commands/category/create.cjs +2 -2
- package/dist/commands/category/delete.cjs +1 -1
- package/dist/commands/category/list.cjs +2 -2
- package/dist/commands/category/update.cjs +2 -2
- package/dist/commands/collector/exclude.cjs +1 -1
- package/dist/commands/collector/include.cjs +1 -1
- package/dist/commands/collector/list.cjs +1 -1
- package/dist/commands/comment/add.cjs +1 -1
- package/dist/commands/comment/clone.cjs +1 -1
- package/dist/commands/comment/delete.cjs +1 -1
- package/dist/commands/comment/list.cjs +1 -1
- package/dist/commands/comment/promote.cjs +1 -1
- package/dist/commands/comment/reaction/add.cjs +1 -1
- package/dist/commands/comment/reaction/list.cjs +1 -1
- package/dist/commands/comment/reaction/remove.cjs +1 -1
- package/dist/commands/comment/set-order.cjs +1 -1
- package/dist/commands/comment/update.cjs +1 -1
- package/dist/commands/openupload/list.cjs +2 -2
- package/dist/commands/openupload/update-file.cjs +1 -1
- package/dist/commands/player/delete.cjs +1 -1
- package/dist/commands/player/embed-versions.cjs +1 -1
- package/dist/commands/player/embed.cjs +1 -1
- package/dist/commands/player/list.cjs +1 -1
- package/dist/commands/player/styles.cjs +1 -1
- package/dist/commands/player/update.cjs +1 -1
- package/dist/commands/poll/add.cjs +1 -1
- package/dist/commands/poll/answer.cjs +1 -1
- package/dist/commands/poll/list.cjs +1 -1
- package/dist/commands/poll/remove.cjs +1 -1
- package/dist/commands/poll/set-options.cjs +1 -1
- package/dist/commands/poll/update.cjs +1 -1
- package/dist/commands/presentation/page/link-locations.cjs +1 -1
- package/dist/commands/presentation/setting/list.cjs +1 -1
- package/dist/commands/presentation/setting/update.cjs +1 -1
- package/dist/commands/protection/protect.cjs +1 -1
- package/dist/commands/protection/unprotect.cjs +1 -1
- package/dist/commands/protection/verify.cjs +1 -1
- package/dist/commands/session/get-token.cjs +1 -1
- package/dist/commands/session/redeem-token.cjs +1 -1
- package/dist/commands/setting/update.cjs +2 -2
- package/dist/commands/site/get.cjs +3 -3
- package/dist/commands/site/search.cjs +1 -1
- package/dist/commands/spot/check.cjs +1 -1
- package/dist/commands/spot/create.cjs +1 -1
- package/dist/commands/spot/delete.cjs +1 -1
- package/dist/commands/spot/list.cjs +2 -2
- package/dist/commands/spot/reset-version.cjs +1 -1
- package/dist/commands/spot/set-videos.cjs +1 -1
- package/dist/commands/spot/update.cjs +2 -2
- package/dist/commands/tag/list.cjs +1 -1
- package/dist/commands/tag/related.cjs +1 -1
- package/dist/commands/thumbnail/add.cjs +1 -1
- package/dist/commands/thumbnail/data.cjs +1 -1
- package/dist/commands/thumbnail/delete.cjs +1 -1
- package/dist/commands/thumbnail/duplicate.cjs +1 -1
- package/dist/commands/thumbnail/file/delete.cjs +1 -1
- package/dist/commands/thumbnail/file/list.cjs +1 -1
- package/dist/commands/thumbnail/file/upload.cjs +1 -1
- package/dist/commands/thumbnail/list.cjs +1 -1
- package/dist/commands/thumbnail/update.cjs +1 -1
- package/dist/commands/user/create.cjs +2 -2
- package/dist/commands/user/get-login-token.cjs +1 -1
- package/dist/commands/user/get.cjs +2 -2
- package/dist/commands/user/list.cjs +1 -1
- package/dist/commands/user/redeem-login-token.cjs +1 -1
- package/dist/commands/user/send-invitation.cjs +1 -1
- package/dist/commands/user/update.cjs +1 -1
- package/dist/commands/video/frame.cjs +1 -1
- package/dist/commands/video/get.cjs +2 -2
- package/dist/commands/video/list.cjs +4 -3
- package/dist/commands/video/replace.cjs +3 -2
- package/dist/commands/video/section/create.cjs +1 -1
- package/dist/commands/video/section/delete.cjs +1 -1
- package/dist/commands/video/section/list.cjs +2 -2
- package/dist/commands/video/section/set-thumbnail.cjs +1 -1
- package/dist/commands/video/section/update.cjs +1 -1
- package/dist/commands/video/subtitle/archive.cjs +2 -2
- package/dist/commands/video/subtitle/create.cjs +2 -2
- package/dist/commands/video/subtitle/data.cjs +3 -1
- package/dist/commands/video/subtitle/delete.cjs +1 -1
- package/dist/commands/video/subtitle/duplicate.cjs +2 -2
- package/dist/commands/video/subtitle/list.cjs +2 -2
- package/dist/commands/video/subtitle/locales.cjs +1 -1
- package/dist/commands/video/subtitle/set-primary.cjs +1 -1
- package/dist/commands/video/subtitle/types.cjs +1 -1
- package/dist/commands/video/subtitle/update.cjs +3 -3
- package/dist/commands/video/subtitle/upload.cjs +2 -2
- package/dist/commands/video/transcoding-progress.cjs +2 -2
- package/dist/commands/video/update.cjs +11 -8
- package/dist/commands/webhook/events.cjs +2 -2
- package/dist/commands/webhook/list.cjs +1 -1
- package/dist/commands/webhook/sample.cjs +1 -1
- package/dist/commands/webhook/subscribe.cjs +1 -1
- package/dist/commands/webhook/unsubscribe.cjs +1 -1
- package/dist/commands/webinar/attachment/delete.cjs +1 -1
- package/dist/commands/webinar/attachment/list.cjs +2 -2
- package/dist/commands/webinar/attachment/set-hidden.cjs +1 -1
- package/dist/commands/webinar/clips.cjs +1 -1
- package/dist/commands/webinar/create.cjs +3 -3
- package/dist/commands/webinar/delete.cjs +1 -1
- package/dist/commands/webinar/highlights.cjs +1 -1
- package/dist/commands/webinar/list-formats.cjs +1 -1
- package/dist/commands/webinar/list.cjs +3 -3
- package/dist/commands/webinar/log.cjs +1 -1
- package/dist/commands/webinar/mail/add.cjs +1 -1
- package/dist/commands/webinar/mail/list.cjs +1 -1
- package/dist/commands/webinar/mail/preview.cjs +16 -3
- package/dist/commands/webinar/mail/remove.cjs +1 -1
- package/dist/commands/webinar/mail/send.cjs +1 -1
- package/dist/commands/webinar/mail/test.cjs +1 -1
- package/dist/commands/webinar/mail/update.cjs +1 -1
- package/dist/commands/webinar/metrics.cjs +1 -1
- package/dist/commands/webinar/queued-video/add.cjs +1 -1
- package/dist/commands/webinar/queued-video/remove.cjs +1 -1
- package/dist/commands/webinar/recording/split.cjs +1 -1
- package/dist/commands/webinar/recording/start.cjs +1 -1
- package/dist/commands/webinar/recording/status.cjs +1 -1
- package/dist/commands/webinar/recording/stop.cjs +1 -1
- package/dist/commands/webinar/repeat.cjs +1 -1
- package/dist/commands/webinar/room/connect.cjs +1 -1
- package/dist/commands/webinar/room/info.cjs +1 -1
- package/dist/commands/webinar/room/send-recording.cjs +1 -1
- package/dist/commands/webinar/room/themes.cjs +1 -1
- package/dist/commands/webinar/section/add.cjs +1 -1
- package/dist/commands/webinar/section/list.cjs +1 -1
- package/dist/commands/webinar/section/remove.cjs +1 -1
- package/dist/commands/webinar/section/update.cjs +1 -1
- package/dist/commands/webinar/series/apply-recurrence.cjs +1 -1
- package/dist/commands/webinar/series/cancel.cjs +1 -1
- package/dist/commands/webinar/series/create.cjs +1 -1
- package/dist/commands/webinar/series/delete.cjs +1 -1
- package/dist/commands/webinar/series/list.cjs +1 -1
- package/dist/commands/webinar/series/mapped-objects.cjs +1 -1
- package/dist/commands/webinar/series/metrics.cjs +1 -1
- package/dist/commands/webinar/series/recurrences.cjs +1 -1
- package/dist/commands/webinar/series/set-ondemand.cjs +1 -1
- package/dist/commands/webinar/series/skip-recurrence.cjs +1 -1
- package/dist/commands/webinar/series/update.cjs +1 -1
- package/dist/commands/webinar/speaker/add-from-speaker.cjs +1 -1
- package/dist/commands/webinar/speaker/add-from-user.cjs +1 -1
- package/dist/commands/webinar/speaker/add.cjs +1 -1
- package/dist/commands/webinar/speaker/cancel-guest-request.cjs +1 -1
- package/dist/commands/webinar/speaker/connection-types.cjs +1 -1
- package/dist/commands/webinar/speaker/library.cjs +1 -1
- package/dist/commands/webinar/speaker/list.cjs +1 -1
- package/dist/commands/webinar/speaker/remove-avatar.cjs +1 -1
- package/dist/commands/webinar/speaker/remove.cjs +1 -1
- package/dist/commands/webinar/speaker/request-guest.cjs +1 -1
- package/dist/commands/webinar/speaker/send-invitation.cjs +1 -1
- package/dist/commands/webinar/speaker/set-order.cjs +1 -1
- package/dist/commands/webinar/speaker/update.cjs +1 -1
- package/dist/commands/webinar/transcription/connect.cjs +1 -1
- package/dist/commands/webinar/transcription/list.cjs +1 -1
- package/dist/commands/webinar/transcription/locales.cjs +1 -1
- package/dist/commands/webinar/transcription/transcriptionlist.cjs +1 -1
- package/dist/commands/webinar/update.cjs +4 -4
- package/dist/lib/base-command.cjs +1 -1
- package/dist/lib/output.cjs +33 -0
- package/dist/upload/chunk-pool.cjs +4 -1
- package/docs/guides/getting-started.md +17 -1
- package/oclif.manifest.json +997 -965
- package/package.json +13 -12
|
@@ -61,15 +61,15 @@ var VideoSubtitleUpdate = class VideoSubtitleUpdate extends require_lib_base_com
|
|
|
61
61
|
locale: flags["subtitle-id"]
|
|
62
62
|
};
|
|
63
63
|
if (flags.type !== void 0) body.type = flags.type;
|
|
64
|
-
const draftVal = parseBoolParam(flags.draft, flags["draft-p"]);
|
|
65
|
-
const defaultVal = parseBoolParam(flags.default, flags["default-p"]);
|
|
64
|
+
const draftVal = require_lib_output.parseBoolParam(flags.draft, flags["draft-p"]);
|
|
65
|
+
const defaultVal = require_lib_output.parseBoolParam(flags.default, flags["default-p"]);
|
|
66
66
|
if (draftVal !== void 0) body.draft_p = draftVal;
|
|
67
67
|
if (defaultVal !== void 0) body.default_p = defaultVal;
|
|
68
68
|
const { data, error } = await this.apiClient.POST("/photo/subtitle/update", {
|
|
69
69
|
body,
|
|
70
70
|
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
71
71
|
});
|
|
72
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
72
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
73
73
|
this.log(chalk.default.green(`Subtitle track ${flags["subtitle-id"]} updated for video ${args.id}`));
|
|
74
74
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
75
75
|
ok: true,
|
|
@@ -74,7 +74,7 @@ var VideoSubtitleUpload = class VideoSubtitleUpload extends require_lib_base_com
|
|
|
74
74
|
file: fileBlob,
|
|
75
75
|
locale: flags.locale,
|
|
76
76
|
type: flags.type,
|
|
77
|
-
...parseBoolParam(flags.draft, flags["draft-p"]) !== void 0 && { draft_p: parseBoolParam(flags.draft, flags["draft-p"]) }
|
|
77
|
+
...require_lib_output.parseBoolParam(flags.draft, flags["draft-p"]) !== void 0 && { draft_p: require_lib_output.parseBoolParam(flags.draft, flags["draft-p"]) }
|
|
78
78
|
},
|
|
79
79
|
bodySerializer(body) {
|
|
80
80
|
const fd = new FormData();
|
|
@@ -83,7 +83,7 @@ var VideoSubtitleUpload = class VideoSubtitleUpload extends require_lib_base_com
|
|
|
83
83
|
return fd;
|
|
84
84
|
}
|
|
85
85
|
});
|
|
86
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
86
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
87
87
|
this.log(chalk.default.green(`Subtitle file uploaded for video ${args.id} (locale: ${flags.locale})`));
|
|
88
88
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
89
89
|
ok: true,
|
|
@@ -28,8 +28,8 @@ var VideoTranscodingProgress = class VideoTranscodingProgress extends require_li
|
|
|
28
28
|
async run() {
|
|
29
29
|
const { args } = await this.parse(VideoTranscodingProgress);
|
|
30
30
|
this.printWorkspaceHeader();
|
|
31
|
-
const { data, error } = await this.apiClient.GET("/photo/get-transcoding-progress", { params: { query: { photo_id: args.id } } });
|
|
32
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
31
|
+
const { data, error } = await this.apiClient.GET("/photo/get-transcoding-progress", { params: { query: { photo_id: Number(args.id) } } });
|
|
32
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
33
33
|
const progressData = data?.data ?? data;
|
|
34
34
|
if (!this.jsonEnabled()) {
|
|
35
35
|
const d = progressData;
|
|
@@ -109,7 +109,7 @@ var VideoUpdate = class VideoUpdate extends require_lib_base_command.Authenticat
|
|
|
109
109
|
const body = { photo_id: videoId };
|
|
110
110
|
if (!metadataFlagsProvided && !this.jsonEnabled()) {
|
|
111
111
|
const { data, error } = await this.apiClient.GET("/photo/list", { params: { query: { photo_id: videoId } } });
|
|
112
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
112
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
113
113
|
const resp = data;
|
|
114
114
|
let current;
|
|
115
115
|
if (Array.isArray(resp?.data)) current = resp.data[0];
|
|
@@ -146,18 +146,21 @@ var VideoUpdate = class VideoUpdate extends require_lib_base_command.Authenticat
|
|
|
146
146
|
initialValue: current.published_p ? "yes" : "no"
|
|
147
147
|
});
|
|
148
148
|
if ((0, _clack_prompts.isCancel)(publishedResult)) process.exit(2);
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
149
|
+
const titleVal = titleResult;
|
|
150
|
+
const descriptionVal = descriptionResult;
|
|
151
|
+
const tagsVal = tagsResult;
|
|
152
|
+
if (titleVal !== "") body.title = titleVal;
|
|
153
|
+
if (descriptionVal !== "" || current.content_text === "") body.description = descriptionVal;
|
|
154
|
+
if (tagsVal !== "" || currentTags === "") body.tags = tagsVal;
|
|
152
155
|
body.published_p = publishedResult === "yes" ? 1 : 0;
|
|
153
156
|
} else {
|
|
154
157
|
if (flags.title !== void 0) body.title = flags.title;
|
|
155
158
|
if (flags.description !== void 0) body.description = flags.description;
|
|
156
159
|
if (flags.tags !== void 0) body.tags = flags.tags;
|
|
157
160
|
if (flags["category-id"] !== void 0) body.album_id = flags["category-id"];
|
|
158
|
-
const publishVal = parseBoolParam(flags.publish, flags["published-p"]);
|
|
159
|
-
const promoteVal = parseBoolParam(flags.promote, flags["promoted-p"]);
|
|
160
|
-
const video360Val = parseBoolParam(flags["360"], flags["video-360-p"]);
|
|
161
|
+
const publishVal = require_lib_output.parseBoolParam(flags.publish, flags["published-p"]);
|
|
162
|
+
const promoteVal = require_lib_output.parseBoolParam(flags.promote, flags["promoted-p"]);
|
|
163
|
+
const video360Val = require_lib_output.parseBoolParam(flags["360"], flags["video-360-p"]);
|
|
161
164
|
if (publishVal !== void 0) body.published_p = publishVal ? 1 : 0;
|
|
162
165
|
if (promoteVal !== void 0) body.promoted_p = promoteVal ? 1 : 0;
|
|
163
166
|
if (flags["publish-date"] !== void 0) body["publish_date"] = flags["publish-date"];
|
|
@@ -167,7 +170,7 @@ var VideoUpdate = class VideoUpdate extends require_lib_base_command.Authenticat
|
|
|
167
170
|
body,
|
|
168
171
|
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
169
172
|
});
|
|
170
|
-
if (updateError) this.error(require_lib_term_map.applyCliTerms(
|
|
173
|
+
if (updateError) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(updateError)), { exit: 1 });
|
|
171
174
|
this.log(chalk.default.green(`Video ${args.id} updated`));
|
|
172
175
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
173
176
|
ok: true,
|
|
@@ -44,9 +44,9 @@ var WebhookEvents = class WebhookEvents extends require_lib_base_command.Authent
|
|
|
44
44
|
async run() {
|
|
45
45
|
const { flags } = await this.parse(WebhookEvents);
|
|
46
46
|
this.printWorkspaceHeader();
|
|
47
|
-
const testAuthVal = parseBoolParam(flags["test-authentication"], flags["test-authentication-p"]);
|
|
47
|
+
const testAuthVal = require_lib_output.parseBoolParam(flags["test-authentication"], flags["test-authentication-p"]);
|
|
48
48
|
const { data, error } = await this.apiClient.GET("/webhook/events", { params: { query: { test_authentication_p: testAuthVal !== void 0 ? testAuthVal ? 1 : 0 : void 0 } } });
|
|
49
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
49
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
50
50
|
const resp = data;
|
|
51
51
|
const rows = Array.isArray(resp?.data) ? resp.data : resp?.data ? [resp.data] : [];
|
|
52
52
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
@@ -34,7 +34,7 @@ var WebhookList = class WebhookList extends require_lib_base_command.Authenticat
|
|
|
34
34
|
const {} = await this.parse(WebhookList);
|
|
35
35
|
this.printWorkspaceHeader();
|
|
36
36
|
const { data, error } = await this.apiClient.GET("/webhook/list", {});
|
|
37
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
37
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
38
38
|
const resp = data;
|
|
39
39
|
const rows = Array.isArray(resp?.data) ? resp.data : resp?.data ? [resp.data] : [];
|
|
40
40
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
@@ -32,7 +32,7 @@ var WebhookSample = class WebhookSample extends require_lib_base_command.Authent
|
|
|
32
32
|
const { args } = await this.parse(WebhookSample);
|
|
33
33
|
this.printWorkspaceHeader();
|
|
34
34
|
const { data, error } = await this.apiClient.GET("/webhook/sample", { params: { query: { event: args.event } } });
|
|
35
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
35
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
36
36
|
const resp = data;
|
|
37
37
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
38
38
|
ok: true,
|
|
@@ -45,7 +45,7 @@ var WebhookSubscribe = class WebhookSubscribe extends require_lib_base_command.A
|
|
|
45
45
|
},
|
|
46
46
|
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
47
47
|
});
|
|
48
|
-
if (createError) this.error(require_lib_term_map.applyCliTerms(formatApiError(createError)), { exit: 1 });
|
|
48
|
+
if (createError) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(createError)), { exit: 1 });
|
|
49
49
|
const webhookId = createData?.data?.webhook_id;
|
|
50
50
|
this.log(chalk.default.green("Webhook subscription created"));
|
|
51
51
|
this.log(`ID: ${webhookId}`);
|
|
@@ -57,7 +57,7 @@ var WebhookUnsubscribe = class WebhookUnsubscribe extends require_lib_base_comma
|
|
|
57
57
|
},
|
|
58
58
|
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
59
59
|
});
|
|
60
|
-
if (deleteError) this.error(require_lib_term_map.applyCliTerms(formatApiError(deleteError)), { exit: 1 });
|
|
60
|
+
if (deleteError) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(deleteError)), { exit: 1 });
|
|
61
61
|
this.log(chalk.default.green("Webhook unsubscribed"));
|
|
62
62
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
63
63
|
ok: true,
|
|
@@ -58,7 +58,7 @@ var WebinarAttachmentDelete = class WebinarAttachmentDelete extends require_lib_
|
|
|
58
58
|
},
|
|
59
59
|
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
60
60
|
});
|
|
61
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
61
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
62
62
|
this.log(chalk.default.green(`Attachment "${filename}" deleted`));
|
|
63
63
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
64
64
|
ok: true,
|
|
@@ -57,9 +57,9 @@ var WebinarAttachmentList = class WebinarAttachmentList extends require_lib_base
|
|
|
57
57
|
const { data, error } = await this.apiClient.GET("/live/attachment/list", { params: { query: {
|
|
58
58
|
live_id: webinarId,
|
|
59
59
|
token,
|
|
60
|
-
include_hidden_p: parseBoolParam(flags["include-hidden"], void 0) ?? void 0
|
|
60
|
+
include_hidden_p: require_lib_output.parseBoolParam(flags["include-hidden"], void 0) ?? void 0
|
|
61
61
|
} } });
|
|
62
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
62
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
63
63
|
const attachments = data?.attachments ?? data?.data ?? [];
|
|
64
64
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
65
65
|
ok: true,
|
|
@@ -64,7 +64,7 @@ var WebinarAttachmentSetHidden = class WebinarAttachmentSetHidden extends requir
|
|
|
64
64
|
},
|
|
65
65
|
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
66
66
|
});
|
|
67
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
67
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
68
68
|
this.log(chalk.default.green(`Attachment "${filename}" ${flags.hidden ? "hidden" : "visible"}`));
|
|
69
69
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
70
70
|
ok: true,
|
|
@@ -38,7 +38,7 @@ var WebinarClips = class WebinarClips extends require_lib_base_command.Authentic
|
|
|
38
38
|
const { args } = await this.parse(WebinarClips);
|
|
39
39
|
this.printWorkspaceHeader();
|
|
40
40
|
const { data, error } = await this.apiClient.GET("/live/clips", { params: { query: { live_id: Number(args.id) } } });
|
|
41
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
41
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
42
42
|
const resp = data;
|
|
43
43
|
const clips = Array.isArray(resp?.data) ? resp.data : resp?.data ? [resp.data] : [];
|
|
44
44
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
@@ -77,15 +77,15 @@ var WebinarCreate = class WebinarCreate extends require_lib_base_command.Authent
|
|
|
77
77
|
if (flags.description !== void 0) body.description = flags.description;
|
|
78
78
|
if (flags.status !== void 0) body.live_status = flags.status;
|
|
79
79
|
if (flags["live-date"] !== void 0) body.start_time = flags["live-date"];
|
|
80
|
-
const draftVal = parseBoolParam(flags.draft, flags["draft-p"]);
|
|
80
|
+
const draftVal = require_lib_output.parseBoolParam(flags.draft, flags["draft-p"]);
|
|
81
81
|
if (draftVal !== void 0) body.draft_p = draftVal ? 1 : 0;
|
|
82
|
-
const publishVal = parseBoolParam(flags.publish, flags["published-p"]);
|
|
82
|
+
const publishVal = require_lib_output.parseBoolParam(flags.publish, flags["published-p"]);
|
|
83
83
|
if (publishVal !== void 0) body.published_p = publishVal ? 1 : 0;
|
|
84
84
|
const { data: createData, error: createError } = await this.apiClient.POST("/live/create", {
|
|
85
85
|
body,
|
|
86
86
|
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
87
87
|
});
|
|
88
|
-
if (createError) this.error(require_lib_term_map.applyCliTerms(formatApiError(createError)), { exit: 1 });
|
|
88
|
+
if (createError) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(createError)), { exit: 1 });
|
|
89
89
|
const liveId = createData?.data?.live_id;
|
|
90
90
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
91
91
|
ok: true,
|
|
@@ -45,7 +45,7 @@ var WebinarDelete = class WebinarDelete extends require_lib_base_command.Authent
|
|
|
45
45
|
body: { live_id: Number(args.id) },
|
|
46
46
|
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
47
47
|
});
|
|
48
|
-
if (deleteError) this.error(require_lib_term_map.applyCliTerms(formatApiError(deleteError)), { exit: 1 });
|
|
48
|
+
if (deleteError) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(deleteError)), { exit: 1 });
|
|
49
49
|
this.log(chalk.default.green(`Webinar ${args.id} deleted`));
|
|
50
50
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
51
51
|
ok: true,
|
|
@@ -49,7 +49,7 @@ var WebinarHighlights = class WebinarHighlights extends require_lib_base_command
|
|
|
49
49
|
live_id: Number(args.id),
|
|
50
50
|
photo_id: flags["video-id"] ? Number(flags["video-id"]) : void 0
|
|
51
51
|
} } });
|
|
52
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
52
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
53
53
|
const resp = data;
|
|
54
54
|
const highlights = Array.isArray(resp?.data) ? resp.data : resp?.data ? [resp.data] : [];
|
|
55
55
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
@@ -28,7 +28,7 @@ var WebinarListFormats = class WebinarListFormats extends require_lib_base_comma
|
|
|
28
28
|
const {} = await this.parse(WebinarListFormats);
|
|
29
29
|
this.printWorkspaceHeader();
|
|
30
30
|
const { data, error } = await this.apiClient.GET("/live/list-formats", { params: { query: {} } });
|
|
31
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
31
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
32
32
|
const resp = data;
|
|
33
33
|
const formats = Array.isArray(resp?.data) ? resp.data : resp?.data ? [resp.data] : [];
|
|
34
34
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
@@ -72,7 +72,7 @@ var WebinarList = class WebinarList extends require_lib_base_command.Authenticat
|
|
|
72
72
|
async run() {
|
|
73
73
|
const { flags } = await this.parse(WebinarList);
|
|
74
74
|
this.printWorkspaceHeader();
|
|
75
|
-
const includePrivate = parseBoolParam(flags["include-private"], flags["include-private-p"]);
|
|
75
|
+
const includePrivate = require_lib_output.parseBoolParam(flags["include-private"], flags["include-private-p"]);
|
|
76
76
|
let webinars;
|
|
77
77
|
if (flags.all) webinars = await require_lib_pagination.fetchAllPages(async (page, size) => {
|
|
78
78
|
const { data, error } = await this.apiClient.GET("/live/list", { params: { query: {
|
|
@@ -83,7 +83,7 @@ var WebinarList = class WebinarList extends require_lib_base_command.Authenticat
|
|
|
83
83
|
search: flags.search,
|
|
84
84
|
include_streaming_details_p: false
|
|
85
85
|
} } });
|
|
86
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
86
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
87
87
|
const resp = data;
|
|
88
88
|
return {
|
|
89
89
|
data: Array.isArray(resp?.data) ? resp.data : resp?.data ? [resp.data] : [],
|
|
@@ -99,7 +99,7 @@ var WebinarList = class WebinarList extends require_lib_base_command.Authenticat
|
|
|
99
99
|
search: flags.search,
|
|
100
100
|
include_streaming_details_p: false
|
|
101
101
|
} } });
|
|
102
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
102
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
103
103
|
const resp = data;
|
|
104
104
|
webinars = Array.isArray(resp?.data) ? resp.data : resp?.data ? [resp.data] : [];
|
|
105
105
|
}
|
|
@@ -36,7 +36,7 @@ var WebinarLog = class WebinarLog extends require_lib_base_command.Authenticated
|
|
|
36
36
|
const { args } = await this.parse(WebinarLog);
|
|
37
37
|
this.printWorkspaceHeader();
|
|
38
38
|
const { data, error } = await this.apiClient.GET("/live/log", { params: { query: { live_id: Number(args.id) } } });
|
|
39
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
39
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
40
40
|
const resp = data;
|
|
41
41
|
const events = Array.isArray(resp?.data) ? resp.data : resp?.data ? [resp.data] : [];
|
|
42
42
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
@@ -75,7 +75,7 @@ var WebinarMailAdd = class WebinarMailAdd extends require_lib_base_command.Authe
|
|
|
75
75
|
},
|
|
76
76
|
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
77
77
|
});
|
|
78
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
78
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
79
79
|
const mailId = data?.data?.live_mail_id ?? data?.live_mail_id;
|
|
80
80
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
81
81
|
ok: true,
|
|
@@ -46,7 +46,7 @@ var WebinarMailList = class WebinarMailList extends require_lib_base_command.Aut
|
|
|
46
46
|
const contextField = flags["series-id"] ? { live_series_id: Number(flags["series-id"]) } : args.id ? { live_id: Number(args.id) } : null;
|
|
47
47
|
if (!contextField) this.error(require_lib_term_map.applyCliTerms("Either a webinar ID argument or --series-id is required"), { exit: 1 });
|
|
48
48
|
const { data, error } = await this.apiClient.GET("/live/mail/list", { params: { query: contextField } });
|
|
49
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
49
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
50
50
|
const mails = Array.isArray(data?.data) ? data.data : data?.data ? [data.data] : [];
|
|
51
51
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
52
52
|
ok: true,
|
|
@@ -49,7 +49,10 @@ var WebinarMailPreview = class WebinarMailPreview extends require_lib_base_comma
|
|
|
49
49
|
const { args, flags } = await this.parse(WebinarMailPreview);
|
|
50
50
|
this.printWorkspaceHeader();
|
|
51
51
|
const contextField = flags["webinar-id"] ? { live_id: Number(flags["webinar-id"]) } : flags["series-id"] ? { live_series_id: Number(flags["series-id"]) } : null;
|
|
52
|
-
if (!contextField)
|
|
52
|
+
if (!contextField) {
|
|
53
|
+
this.error(require_lib_term_map.applyCliTerms("Either --webinar-id or --series-id is required"), { exit: 1 });
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
53
56
|
const query = new URLSearchParams({
|
|
54
57
|
...Object.fromEntries(Object.entries(contextField).map(([k, v]) => [k, String(v)])),
|
|
55
58
|
live_mail_id: String(args.id)
|
|
@@ -57,8 +60,18 @@ var WebinarMailPreview = class WebinarMailPreview extends require_lib_base_comma
|
|
|
57
60
|
const headers = {};
|
|
58
61
|
if (this.activeWorkspace.bearer_token) headers["Authorization"] = `Bearer ${this.activeWorkspace.bearer_token}`;
|
|
59
62
|
const response = await fetch(`${this.apiBaseUrl}live/mail/preview?${query}`, { headers });
|
|
60
|
-
const
|
|
61
|
-
if (!response.ok)
|
|
63
|
+
const body = await response.text();
|
|
64
|
+
if (!response.ok) {
|
|
65
|
+
let errMsg;
|
|
66
|
+
try {
|
|
67
|
+
const parsed = JSON.parse(body);
|
|
68
|
+
errMsg = parsed?.message ?? parsed?.error ?? `status ${response.status}`;
|
|
69
|
+
} catch {
|
|
70
|
+
errMsg = body.slice(0, 200) || `status ${response.status}`;
|
|
71
|
+
}
|
|
72
|
+
this.error(require_lib_term_map.applyCliTerms(`API error: ${errMsg}`), { exit: 1 });
|
|
73
|
+
}
|
|
74
|
+
const html = body;
|
|
62
75
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
63
76
|
ok: true,
|
|
64
77
|
data: html,
|
|
@@ -58,7 +58,7 @@ var WebinarMailRemove = class WebinarMailRemove extends require_lib_base_command
|
|
|
58
58
|
},
|
|
59
59
|
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
60
60
|
});
|
|
61
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
61
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
62
62
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
63
63
|
ok: true,
|
|
64
64
|
data,
|
|
@@ -51,7 +51,7 @@ var WebinarMailSend = class WebinarMailSend extends require_lib_base_command.Aut
|
|
|
51
51
|
},
|
|
52
52
|
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
53
53
|
});
|
|
54
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
54
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
55
55
|
this.log(chalk.default.green("Mail sent"));
|
|
56
56
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
57
57
|
ok: true,
|
|
@@ -69,7 +69,7 @@ var WebinarMailTest = class WebinarMailTest extends require_lib_base_command.Aut
|
|
|
69
69
|
},
|
|
70
70
|
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
71
71
|
});
|
|
72
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
72
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
73
73
|
this.log(chalk.default.green("Test email sent"));
|
|
74
74
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
75
75
|
ok: true,
|
|
@@ -67,7 +67,7 @@ var WebinarMailUpdate = class WebinarMailUpdate extends require_lib_base_command
|
|
|
67
67
|
body,
|
|
68
68
|
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
69
69
|
});
|
|
70
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
70
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
71
71
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
72
72
|
ok: true,
|
|
73
73
|
data,
|
|
@@ -34,7 +34,7 @@ var WebinarMetrics = class WebinarMetrics extends require_lib_base_command.Authe
|
|
|
34
34
|
const { args } = await this.parse(WebinarMetrics);
|
|
35
35
|
this.printWorkspaceHeader();
|
|
36
36
|
const { data, error } = await this.apiClient.GET("/live/metrics", { params: { query: { live_id: Number(args.id) } } });
|
|
37
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
37
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
38
38
|
const resp = data;
|
|
39
39
|
const metrics = Array.isArray(resp?.data) ? resp.data : resp?.data ? [resp.data] : [];
|
|
40
40
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
@@ -60,7 +60,7 @@ var WebinarQueuedVideoAdd = class WebinarQueuedVideoAdd extends require_lib_base
|
|
|
60
60
|
},
|
|
61
61
|
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
62
62
|
});
|
|
63
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
63
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
64
64
|
this.log(chalk.default.green("Video queued"));
|
|
65
65
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
66
66
|
ok: true,
|
|
@@ -60,7 +60,7 @@ var WebinarQueuedVideoRemove = class WebinarQueuedVideoRemove extends require_li
|
|
|
60
60
|
},
|
|
61
61
|
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
62
62
|
});
|
|
63
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
63
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
64
64
|
this.log(chalk.default.green("Video removed from queue"));
|
|
65
65
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
66
66
|
ok: true,
|
|
@@ -36,7 +36,7 @@ var WebinarRecordingSplit = class WebinarRecordingSplit extends require_lib_base
|
|
|
36
36
|
body: { live_id: Number(args.id) },
|
|
37
37
|
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
38
38
|
});
|
|
39
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
39
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
40
40
|
this.log(chalk.default.green("Recording split"));
|
|
41
41
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
42
42
|
ok: true,
|
|
@@ -36,7 +36,7 @@ var WebinarRecordingStart = class WebinarRecordingStart extends require_lib_base
|
|
|
36
36
|
body: { live_id: Number(args.id) },
|
|
37
37
|
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
38
38
|
});
|
|
39
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
39
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
40
40
|
this.log(chalk.default.green("Recording started"));
|
|
41
41
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
42
42
|
ok: true,
|
|
@@ -29,7 +29,7 @@ var WebinarRecordingStatus = class WebinarRecordingStatus extends require_lib_ba
|
|
|
29
29
|
const { args } = await this.parse(WebinarRecordingStatus);
|
|
30
30
|
this.printWorkspaceHeader();
|
|
31
31
|
const { data, error } = await this.apiClient.GET("/live/recording/status", { params: { query: { live_id: Number(args.id) } } });
|
|
32
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
32
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
33
33
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
34
34
|
ok: true,
|
|
35
35
|
data,
|
|
@@ -36,7 +36,7 @@ var WebinarRecordingStop = class WebinarRecordingStop extends require_lib_base_c
|
|
|
36
36
|
body: { live_id: Number(args.id) },
|
|
37
37
|
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
38
38
|
});
|
|
39
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
39
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
40
40
|
this.log(chalk.default.green("Recording stopped"));
|
|
41
41
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
42
42
|
ok: true,
|
|
@@ -43,7 +43,7 @@ var WebinarRepeat = class WebinarRepeat extends require_lib_base_command.Authent
|
|
|
43
43
|
body,
|
|
44
44
|
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
45
45
|
});
|
|
46
|
-
if (repeatError) this.error(require_lib_term_map.applyCliTerms(formatApiError(repeatError)), { exit: 1 });
|
|
46
|
+
if (repeatError) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(repeatError)), { exit: 1 });
|
|
47
47
|
const newLiveId = repeatData?.data?.live_id;
|
|
48
48
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
49
49
|
ok: true,
|
|
@@ -32,7 +32,7 @@ var WebinarRoomConnect = class WebinarRoomConnect extends require_lib_base_comma
|
|
|
32
32
|
const { args } = await this.parse(WebinarRoomConnect);
|
|
33
33
|
this.printWorkspaceHeader();
|
|
34
34
|
const { data, error } = await this.apiClient.GET("/live/webinar/connect", { params: { query: { live_id: Number(args.id) } } });
|
|
35
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
35
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
36
36
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
37
37
|
ok: true,
|
|
38
38
|
data,
|
|
@@ -32,7 +32,7 @@ var WebinarRoomInfo = class WebinarRoomInfo extends require_lib_base_command.Aut
|
|
|
32
32
|
const { args } = await this.parse(WebinarRoomInfo);
|
|
33
33
|
this.printWorkspaceHeader();
|
|
34
34
|
const { data, error } = await this.apiClient.GET("/live/webinar/info", { params: { query: { live_id: Number(args.id) } } });
|
|
35
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
35
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
36
36
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
37
37
|
ok: true,
|
|
38
38
|
data,
|
|
@@ -38,7 +38,7 @@ var WebinarRoomSendRecording = class WebinarRoomSendRecording extends require_li
|
|
|
38
38
|
body: { live_id: Number(args.id) },
|
|
39
39
|
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
40
40
|
});
|
|
41
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
41
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
42
42
|
this.log(chalk.default.green("Recording sent"));
|
|
43
43
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
44
44
|
ok: true,
|
|
@@ -35,7 +35,7 @@ var WebinarRoomThemes = class WebinarRoomThemes extends require_lib_base_command
|
|
|
35
35
|
await this.parse(WebinarRoomThemes);
|
|
36
36
|
this.printWorkspaceHeader();
|
|
37
37
|
const { data, error } = await this.apiClient.GET("/live/webinar/room-themes", { params: { query: {} } });
|
|
38
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
38
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
39
39
|
const items = Array.isArray(data?.data) ? data.data : data?.data ? [data.data] : Array.isArray(data) ? data : [];
|
|
40
40
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
41
41
|
ok: true,
|
|
@@ -69,7 +69,7 @@ var WebinarSectionAdd = class WebinarSectionAdd extends require_lib_base_command
|
|
|
69
69
|
body,
|
|
70
70
|
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
71
71
|
});
|
|
72
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
72
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
73
73
|
const liveSectionId = data?.data?.live_section_id ?? data?.live_section_id;
|
|
74
74
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
75
75
|
ok: true,
|
|
@@ -49,7 +49,7 @@ var WebinarSectionList = class WebinarSectionList extends require_lib_base_comma
|
|
|
49
49
|
live_id: Number(args.id),
|
|
50
50
|
token
|
|
51
51
|
} } });
|
|
52
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
52
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
53
53
|
const sections = data?.sections ?? data?.data ?? [];
|
|
54
54
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
55
55
|
ok: true,
|
|
@@ -51,7 +51,7 @@ var WebinarSectionRemove = class WebinarSectionRemove extends require_lib_base_c
|
|
|
51
51
|
},
|
|
52
52
|
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
53
53
|
});
|
|
54
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
54
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
55
55
|
this.log(chalk.default.green(`Section ${args.id} removed`));
|
|
56
56
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
57
57
|
ok: true,
|
|
@@ -68,7 +68,7 @@ var WebinarSectionUpdate = class WebinarSectionUpdate extends require_lib_base_c
|
|
|
68
68
|
body,
|
|
69
69
|
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
70
70
|
});
|
|
71
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
71
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
72
72
|
this.log(chalk.default.green("Section updated"));
|
|
73
73
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
74
74
|
ok: true,
|
|
@@ -51,7 +51,7 @@ var WebinarSeriesApplyRecurrence = class WebinarSeriesApplyRecurrence extends re
|
|
|
51
51
|
live_series_id: Number(args.id),
|
|
52
52
|
recurrence_id: Number(recurrenceId)
|
|
53
53
|
} } });
|
|
54
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
54
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
55
55
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
56
56
|
ok: true,
|
|
57
57
|
data,
|
|
@@ -56,7 +56,7 @@ var WebinarSeriesCancel = class WebinarSeriesCancel extends require_lib_base_com
|
|
|
56
56
|
body,
|
|
57
57
|
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
58
58
|
});
|
|
59
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
59
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
60
60
|
this.log(chalk.default.green(`Series ${args.id} cancelled`));
|
|
61
61
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
62
62
|
ok: true,
|
|
@@ -58,7 +58,7 @@ var WebinarSeriesCreate = class WebinarSeriesCreate extends require_lib_base_com
|
|
|
58
58
|
body,
|
|
59
59
|
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
60
60
|
});
|
|
61
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
61
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
62
62
|
const seriesId = data?.data?.live_series_id ?? data?.live_series_id;
|
|
63
63
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
64
64
|
ok: true,
|
|
@@ -56,7 +56,7 @@ var WebinarSeriesDelete = class WebinarSeriesDelete extends require_lib_base_com
|
|
|
56
56
|
body,
|
|
57
57
|
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
58
58
|
});
|
|
59
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
59
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
60
60
|
this.log(chalk.default.green(`Series ${args.id} deleted`));
|
|
61
61
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
62
62
|
ok: true,
|
|
@@ -43,7 +43,7 @@ var WebinarSeriesList = class WebinarSeriesList extends require_lib_base_command
|
|
|
43
43
|
p: page,
|
|
44
44
|
size
|
|
45
45
|
} } });
|
|
46
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
46
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
47
47
|
const resp = data;
|
|
48
48
|
return {
|
|
49
49
|
data: Array.isArray(resp?.data) ? resp.data : resp?.data ? [resp.data] : [],
|
|
@@ -36,7 +36,7 @@ var WebinarSeriesMappedObjects = class WebinarSeriesMappedObjects extends requir
|
|
|
36
36
|
const { args } = await this.parse(WebinarSeriesMappedObjects);
|
|
37
37
|
this.printWorkspaceHeader();
|
|
38
38
|
const { data, error } = await this.apiClient.GET("/live/series/mapped-objects", { params: { query: { live_series_id: Number(args.id) } } });
|
|
39
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
39
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
40
40
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
41
41
|
ok: true,
|
|
42
42
|
data,
|