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
|
@@ -35,7 +35,7 @@ var AudienceFieldTypes = class AudienceFieldTypes extends require_lib_base_comma
|
|
|
35
35
|
body: {},
|
|
36
36
|
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
37
37
|
});
|
|
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 resp = data;
|
|
40
40
|
const rows = Array.isArray(resp?.data) ? resp.data : resp?.data ? [resp.data] : [];
|
|
41
41
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
@@ -54,7 +54,7 @@ var AudienceFunnel = class AudienceFunnel extends require_lib_base_command.Authe
|
|
|
54
54
|
resolve_recordings_p: flags["resolve-recordings"] || void 0,
|
|
55
55
|
resolve_live_series_p: flags["resolve-live-series"] || void 0
|
|
56
56
|
} } });
|
|
57
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
57
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
58
58
|
const metrics = data?.data;
|
|
59
59
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
60
60
|
ok: true,
|
|
@@ -34,7 +34,7 @@ var AudienceIdentitySources = class AudienceIdentitySources extends require_lib_
|
|
|
34
34
|
const { flags: _flags } = await this.parse(AudienceIdentitySources);
|
|
35
35
|
this.printWorkspaceHeader();
|
|
36
36
|
const { data, error } = await this.apiClient.GET("/audience/identity-sources", { params: { query: {} } });
|
|
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({
|
|
@@ -54,7 +54,7 @@ var AudienceListCollectors = class AudienceListCollectors extends require_lib_ba
|
|
|
54
54
|
object_id: flags["object-id"] ? Number(flags["object-id"]) : void 0,
|
|
55
55
|
action_id: flags["action-id"] ? Number(flags["action-id"]) : void 0
|
|
56
56
|
} } });
|
|
57
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
57
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
58
58
|
const resp = data;
|
|
59
59
|
const rows = Array.isArray(resp?.data) ? resp.data : resp?.data ? [resp.data] : [];
|
|
60
60
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
@@ -86,7 +86,7 @@ var AudienceList = class AudienceList extends require_lib_base_command.Authentic
|
|
|
86
86
|
identified: flags.identified,
|
|
87
87
|
objects: flags.objects
|
|
88
88
|
} } });
|
|
89
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
89
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
90
90
|
const resp = data;
|
|
91
91
|
const rows = Array.isArray(resp?.data) ? resp.data : resp?.data ? [resp.data] : [];
|
|
92
92
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
@@ -65,7 +65,7 @@ var AudienceMetrics = class AudienceMetrics extends require_lib_base_command.Aut
|
|
|
65
65
|
identified: flags.identified,
|
|
66
66
|
objects: flags.objects
|
|
67
67
|
} } });
|
|
68
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
68
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
69
69
|
const metrics = data?.data;
|
|
70
70
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
71
71
|
ok: true,
|
|
@@ -87,7 +87,7 @@ var AudienceRegister = class AudienceRegister extends require_lib_base_command.A
|
|
|
87
87
|
body,
|
|
88
88
|
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
89
89
|
});
|
|
90
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
90
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
91
91
|
const resp = data;
|
|
92
92
|
const uuid = resp?.uuid ?? resp?.data?.uuid;
|
|
93
93
|
const trackingUrl = resp?.tracking_url ?? resp?.data?.tracking_url;
|
|
@@ -58,7 +58,7 @@ var AudienceRemove = class AudienceRemove extends require_lib_base_command.Authe
|
|
|
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
|
this.log(chalk.default.green("Contact removed"));
|
|
63
63
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
64
64
|
ok: true,
|
|
@@ -70,7 +70,7 @@ var AudienceSearch = class AudienceSearch extends require_lib_base_command.Authe
|
|
|
70
70
|
orderby: flags.orderby,
|
|
71
71
|
order: flags.order
|
|
72
72
|
} } });
|
|
73
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
73
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
74
74
|
const resp = data;
|
|
75
75
|
const rows = Array.isArray(resp?.data) ? resp.data : resp?.data ? [resp.data] : [];
|
|
76
76
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
@@ -79,7 +79,7 @@ var AudienceTimelines = class AudienceTimelines extends require_lib_base_command
|
|
|
79
79
|
orderby: flags.orderby,
|
|
80
80
|
order: flags.order
|
|
81
81
|
} } });
|
|
82
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
82
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
83
83
|
const resp = data;
|
|
84
84
|
const rows = Array.isArray(resp?.data) ? resp.data : resp?.data ? [resp.data] : [];
|
|
85
85
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
@@ -51,7 +51,7 @@ var AudienceUnregister = class AudienceUnregister extends require_lib_base_comma
|
|
|
51
51
|
body,
|
|
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("Contact unregistered"));
|
|
56
56
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
57
57
|
ok: true,
|
|
@@ -20,7 +20,7 @@ var Credentials = class Credentials extends _oclif_core.Command {
|
|
|
20
20
|
_clack_prompts.intro("TwentyThree credentials");
|
|
21
21
|
const domain = await _clack_prompts.text({
|
|
22
22
|
message: "Domain (e.g. company.video23.com)",
|
|
23
|
-
validate: (v) => v
|
|
23
|
+
validate: (v) => v?.includes(".") ? void 0 : "Enter a valid domain"
|
|
24
24
|
});
|
|
25
25
|
if (_clack_prompts.isCancel(domain)) {
|
|
26
26
|
_clack_prompts.cancel("Cancelled");
|
|
@@ -40,13 +40,14 @@ var Credentials = class Credentials extends _oclif_core.Command {
|
|
|
40
40
|
require_auth_workspace_config.setCredentialDomain(domain);
|
|
41
41
|
const s = _clack_prompts.spinner();
|
|
42
42
|
s.start("Discovering workspaces...");
|
|
43
|
-
let workspaces;
|
|
43
|
+
let workspaces = [];
|
|
44
44
|
try {
|
|
45
45
|
workspaces = await require_auth_token_refresh.fetchWorkspaceTokens(domain, trimmedToken);
|
|
46
46
|
s.stop("Workspaces discovered");
|
|
47
47
|
} catch (err) {
|
|
48
48
|
s.stop("Failed to discover workspaces");
|
|
49
49
|
this.error(`Could not discover workspaces: ${err instanceof Error ? err.message : String(err)}`, { exit: 1 });
|
|
50
|
+
return;
|
|
50
51
|
}
|
|
51
52
|
let selectedWorkspaces;
|
|
52
53
|
if (workspaces.length > 1) {
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
const require_runtime = require("../../_virtual/_rolldown/runtime.cjs");
|
|
2
|
+
let _oclif_core = require("@oclif/core");
|
|
3
|
+
let _clack_prompts = require("@clack/prompts");
|
|
4
|
+
_clack_prompts = require_runtime.__toESM(_clack_prompts);
|
|
5
|
+
//#region src/commands/autocomplete/index.ts
|
|
6
|
+
var Autocomplete = class Autocomplete extends _oclif_core.Command {
|
|
7
|
+
static description = "Set up tab completion for your shell";
|
|
8
|
+
static agentMetadata = {
|
|
9
|
+
api_endpoint: "interactive",
|
|
10
|
+
auth_scope: "none",
|
|
11
|
+
output_shape: { type: "none" },
|
|
12
|
+
side_effects: "creates"
|
|
13
|
+
};
|
|
14
|
+
static examples = ["<%= config.bin %> autocomplete"];
|
|
15
|
+
async run() {
|
|
16
|
+
await this.parse(Autocomplete);
|
|
17
|
+
_clack_prompts.intro("Tab completion setup");
|
|
18
|
+
const rawShell = process.env.SHELL ?? "";
|
|
19
|
+
const detectedShell = rawShell.endsWith("zsh") ? "zsh" : rawShell.endsWith("bash") ? "bash" : null;
|
|
20
|
+
let shell;
|
|
21
|
+
if (detectedShell) {
|
|
22
|
+
const confirm = await _clack_prompts.confirm({ message: `Detected shell: ${detectedShell}. Set up completion for ${detectedShell}?` });
|
|
23
|
+
if (_clack_prompts.isCancel(confirm)) {
|
|
24
|
+
_clack_prompts.cancel("Cancelled");
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
if (confirm) shell = detectedShell;
|
|
28
|
+
else {
|
|
29
|
+
const chosen = await _clack_prompts.select({
|
|
30
|
+
message: "Select your shell",
|
|
31
|
+
options: [{
|
|
32
|
+
value: "zsh",
|
|
33
|
+
label: "zsh"
|
|
34
|
+
}, {
|
|
35
|
+
value: "bash",
|
|
36
|
+
label: "bash"
|
|
37
|
+
}]
|
|
38
|
+
});
|
|
39
|
+
if (_clack_prompts.isCancel(chosen)) {
|
|
40
|
+
_clack_prompts.cancel("Cancelled");
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
shell = chosen;
|
|
44
|
+
}
|
|
45
|
+
} else {
|
|
46
|
+
const chosen = await _clack_prompts.select({
|
|
47
|
+
message: "Select your shell",
|
|
48
|
+
options: [{
|
|
49
|
+
value: "zsh",
|
|
50
|
+
label: "zsh"
|
|
51
|
+
}, {
|
|
52
|
+
value: "bash",
|
|
53
|
+
label: "bash"
|
|
54
|
+
}]
|
|
55
|
+
});
|
|
56
|
+
if (_clack_prompts.isCancel(chosen)) {
|
|
57
|
+
_clack_prompts.cancel("Cancelled");
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
shell = chosen;
|
|
61
|
+
}
|
|
62
|
+
const s = _clack_prompts.spinner();
|
|
63
|
+
s.start("Building completion cache...");
|
|
64
|
+
try {
|
|
65
|
+
await this.config.runCommand("autocomplete:create", []);
|
|
66
|
+
s.stop("Completion cache built");
|
|
67
|
+
} catch (err) {
|
|
68
|
+
s.stop("Failed to build completion cache");
|
|
69
|
+
this.error(`Could not build completion cache: ${err instanceof Error ? err.message : String(err)}`, { exit: 1 });
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
const rcFile = shell === "zsh" ? "~/.zshrc" : "~/.bashrc";
|
|
73
|
+
const evalLine = `printf "$(twentythree autocomplete script ${shell})" >> ${rcFile}; source ${rcFile}`;
|
|
74
|
+
_clack_prompts.note(`Add tab completion to your shell by running:\n\n ${evalLine}\n\nThen restart your terminal or run: source ${rcFile}`, "Setup instructions");
|
|
75
|
+
_clack_prompts.outro("After setup, try: twentythree video <TAB>");
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
//#endregion
|
|
79
|
+
module.exports = Autocomplete;
|
|
@@ -55,13 +55,13 @@ var CategoryCreate = class CategoryCreate extends require_lib_base_command.Authe
|
|
|
55
55
|
this.printWorkspaceHeader();
|
|
56
56
|
const body = { title: flags.title };
|
|
57
57
|
if (flags.description !== void 0) body.description = flags.description;
|
|
58
|
-
const hiddenVal = parseBoolParam(flags.hidden, flags["hide-p"]);
|
|
58
|
+
const hiddenVal = require_lib_output.parseBoolParam(flags.hidden, flags["hide-p"]);
|
|
59
59
|
if (hiddenVal !== void 0) body.hide_p = hiddenVal ? 1 : 0;
|
|
60
60
|
const { data: createData, error: createError } = await this.apiClient.POST("/album/create", {
|
|
61
61
|
body,
|
|
62
62
|
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
63
63
|
});
|
|
64
|
-
if (createError) this.error(require_lib_term_map.applyCliTerms(formatApiError(createError)), { exit: 1 });
|
|
64
|
+
if (createError) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(createError)), { exit: 1 });
|
|
65
65
|
const albumId = createData?.data?.album_id;
|
|
66
66
|
this.log(chalk.default.green("Category created"));
|
|
67
67
|
this.log(`ID: ${albumId}`);
|
|
@@ -53,7 +53,7 @@ var CategoryDelete = class CategoryDelete extends require_lib_base_command.Authe
|
|
|
53
53
|
body: { album_id: Number(args.id) },
|
|
54
54
|
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
55
55
|
});
|
|
56
|
-
if (deleteError) this.error(require_lib_term_map.applyCliTerms(formatApiError(deleteError)), { exit: 1 });
|
|
56
|
+
if (deleteError) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(deleteError)), { exit: 1 });
|
|
57
57
|
this.log(chalk.default.green(`Category ${args.id} deleted`));
|
|
58
58
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
59
59
|
ok: true,
|
|
@@ -60,9 +60,9 @@ var CategoryList = class CategoryList extends require_lib_base_command.Authentic
|
|
|
60
60
|
const { data, error } = await this.apiClient.GET("/album/list", { params: { query: {
|
|
61
61
|
p: page,
|
|
62
62
|
size,
|
|
63
|
-
include_hidden_p: parseBoolParam(flags["include-hidden"], flags["include-hidden-p"]) ?? void 0
|
|
63
|
+
include_hidden_p: require_lib_output.parseBoolParam(flags["include-hidden"], flags["include-hidden-p"]) ?? void 0
|
|
64
64
|
} } });
|
|
65
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
65
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
66
66
|
const resp = data;
|
|
67
67
|
return {
|
|
68
68
|
data: Array.isArray(resp?.data) ? resp.data : resp?.data ? [resp.data] : [],
|
|
@@ -74,7 +74,7 @@ var CategoryUpdate = class CategoryUpdate extends require_lib_base_command.Authe
|
|
|
74
74
|
const body = { album_id: categoryId };
|
|
75
75
|
if (!metadataFlagsProvided && !this.jsonEnabled()) {
|
|
76
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 });
|
|
77
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
78
78
|
const resp = data;
|
|
79
79
|
let current;
|
|
80
80
|
if (Array.isArray(resp?.data)) current = resp.data[0];
|
|
@@ -110,7 +110,7 @@ var CategoryUpdate = class CategoryUpdate extends require_lib_base_command.Authe
|
|
|
110
110
|
} else {
|
|
111
111
|
if (flags.title !== void 0) body.title = flags.title;
|
|
112
112
|
if (flags.description !== void 0) body.description = flags.description;
|
|
113
|
-
const hiddenVal = parseBoolParam(flags.hidden, flags["hide-p"]);
|
|
113
|
+
const hiddenVal = require_lib_output.parseBoolParam(flags.hidden, flags["hide-p"]);
|
|
114
114
|
if (hiddenVal !== void 0) body.hide_p = hiddenVal ? 1 : 0;
|
|
115
115
|
}
|
|
116
116
|
const { data: updateData, error: updateError } = await this.apiClient.POST("/album/update", {
|
|
@@ -38,7 +38,7 @@ var CollectorExclude = class CollectorExclude extends require_lib_base_command.A
|
|
|
38
38
|
action_id: Number(args.id),
|
|
39
39
|
object_id: Number(flags["object-id"])
|
|
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
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
43
43
|
ok: true,
|
|
44
44
|
data,
|
|
@@ -38,7 +38,7 @@ var CollectorInclude = class CollectorInclude extends require_lib_base_command.A
|
|
|
38
38
|
action_id: Number(args.id),
|
|
39
39
|
object_id: Number(flags["object-id"])
|
|
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
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
43
43
|
ok: true,
|
|
44
44
|
data,
|
|
@@ -51,7 +51,7 @@ var CollectorList = class CollectorList extends require_lib_base_command.Authent
|
|
|
51
51
|
object_id: flags["object-id"] ? Number(flags["object-id"]) : void 0,
|
|
52
52
|
include_analytics_p: flags["include-analytics"] ? true : void 0
|
|
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
|
const resp = data;
|
|
56
56
|
const collectors = Array.isArray(resp?.data) ? resp.data : resp?.data ? [resp.data] : [];
|
|
57
57
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
@@ -85,7 +85,7 @@ var CommentAdd = class CommentAdd extends require_lib_base_command.Authenticated
|
|
|
85
85
|
body,
|
|
86
86
|
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
87
87
|
});
|
|
88
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
88
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
89
89
|
const resp = data;
|
|
90
90
|
const commentId = resp?.comment_id ?? resp?.data?.comment_id;
|
|
91
91
|
this.log(chalk.default.green("Comment added"));
|
|
@@ -39,7 +39,7 @@ var CommentClone = class CommentClone extends require_lib_base_command.Authentic
|
|
|
39
39
|
comment_id: args.id ? Number(args.id) : void 0,
|
|
40
40
|
clone_comment_type: flags["clone-type"]
|
|
41
41
|
} } });
|
|
42
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
42
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
43
43
|
const resp = data;
|
|
44
44
|
const newCommentId = resp?.comment_id ?? resp?.data?.comment_id;
|
|
45
45
|
this.log(chalk.default.green("Comment cloned"));
|
|
@@ -38,7 +38,7 @@ var CommentDelete = class CommentDelete extends require_lib_base_command.Authent
|
|
|
38
38
|
body: { comment_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("Comment deleted"));
|
|
43
43
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
44
44
|
ok: true,
|
|
@@ -88,7 +88,7 @@ var CommentList = class CommentList extends require_lib_base_command.Authenticat
|
|
|
88
88
|
include_reply_to_comments_p: flags["include-replies"] ? 1 : void 0,
|
|
89
89
|
promoted_p: flags.promoted ? 1 : void 0
|
|
90
90
|
} } });
|
|
91
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
91
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
92
92
|
const resp = data;
|
|
93
93
|
return {
|
|
94
94
|
data: Array.isArray(resp?.data) ? resp.data : resp?.data ? [resp.data] : [],
|
|
@@ -47,7 +47,7 @@ var CommentPromote = class CommentPromote extends require_lib_base_command.Authe
|
|
|
47
47
|
body,
|
|
48
48
|
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
49
49
|
});
|
|
50
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
50
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
51
51
|
const message = flags.promoted !== void 0 ? chalk.default.green("Comment promoted") : chalk.default.green("Comment promotion toggled");
|
|
52
52
|
this.log(message);
|
|
53
53
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
@@ -64,7 +64,7 @@ var CommentReactionAdd = class CommentReactionAdd extends require_lib_base_comma
|
|
|
64
64
|
object_type: flags["object-type"],
|
|
65
65
|
uuid: flags.uuid
|
|
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("Reaction added"));
|
|
69
69
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
70
70
|
ok: true,
|
|
@@ -62,7 +62,7 @@ var CommentReactionList = class CommentReactionList extends require_lib_base_com
|
|
|
62
62
|
object_type: flags["object-type"],
|
|
63
63
|
uuid: flags.uuid
|
|
64
64
|
} } });
|
|
65
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
65
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
66
66
|
const resp = data;
|
|
67
67
|
const reactions = Array.isArray(resp?.data) ? resp.data : resp?.data ? [resp.data] : [];
|
|
68
68
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
@@ -64,7 +64,7 @@ var CommentReactionRemove = class CommentReactionRemove extends require_lib_base
|
|
|
64
64
|
object_type: flags["object-type"],
|
|
65
65
|
uuid: flags.uuid
|
|
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("Reaction removed"));
|
|
69
69
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
70
70
|
ok: true,
|
|
@@ -49,7 +49,7 @@ var CommentSetOrder = class CommentSetOrder extends require_lib_base_command.Aut
|
|
|
49
49
|
body,
|
|
50
50
|
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
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
|
this.log(chalk.default.green("Comment order updated"));
|
|
54
54
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
55
55
|
ok: true,
|
|
@@ -46,7 +46,7 @@ var CommentUpdate = class CommentUpdate extends require_lib_base_command.Authent
|
|
|
46
46
|
body,
|
|
47
47
|
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
48
48
|
});
|
|
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
|
this.log(chalk.default.green("Comment updated"));
|
|
51
51
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
52
52
|
ok: true,
|
|
@@ -57,13 +57,13 @@ var OpenuploadList = class OpenuploadList extends require_lib_base_command.Authe
|
|
|
57
57
|
async run() {
|
|
58
58
|
const { flags } = await this.parse(OpenuploadList);
|
|
59
59
|
this.printWorkspaceHeader();
|
|
60
|
-
const appVal = parseBoolParam(flags.app, flags["app-p"]);
|
|
60
|
+
const appVal = require_lib_output.parseBoolParam(flags.app, flags["app-p"]);
|
|
61
61
|
const { data, error } = await this.apiClient.GET("/openupload/list", { params: { query: {
|
|
62
62
|
token_upload_id: flags["token-upload-id"] !== void 0 ? Number(flags["token-upload-id"]) : void 0,
|
|
63
63
|
token: flags.token,
|
|
64
64
|
app_p: appVal
|
|
65
65
|
} } });
|
|
66
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
66
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
67
67
|
const resp = data;
|
|
68
68
|
const rows = Array.isArray(resp?.data) ? resp.data : resp?.data ? [resp.data] : [];
|
|
69
69
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
@@ -71,7 +71,7 @@ var OpenuploadUpdateFile = class OpenuploadUpdateFile extends require_lib_base_c
|
|
|
71
71
|
body,
|
|
72
72
|
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
73
73
|
});
|
|
74
|
-
if (updateError) this.error(require_lib_term_map.applyCliTerms(formatApiError(updateError)), { exit: 1 });
|
|
74
|
+
if (updateError) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(updateError)), { exit: 1 });
|
|
75
75
|
this.log(chalk.default.green("Open upload entry updated"));
|
|
76
76
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
77
77
|
ok: true,
|
|
@@ -49,7 +49,7 @@ var PlayerDelete = class PlayerDelete extends require_lib_base_command.Authentic
|
|
|
49
49
|
body: { player_id: Number(args.id) },
|
|
50
50
|
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
51
51
|
});
|
|
52
|
-
if (deleteError) this.error(require_lib_term_map.applyCliTerms(formatApiError(deleteError)), { exit: 1 });
|
|
52
|
+
if (deleteError) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(deleteError)), { exit: 1 });
|
|
53
53
|
this.log(chalk.default.green("Player deleted"));
|
|
54
54
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
55
55
|
ok: true,
|
|
@@ -53,7 +53,7 @@ var PlayerEmbedVersions = class PlayerEmbedVersions extends require_lib_base_com
|
|
|
53
53
|
object_id: Number(flags["object-id"]),
|
|
54
54
|
source: flags.source
|
|
55
55
|
} } });
|
|
56
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
56
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
57
57
|
const resp = data;
|
|
58
58
|
const items = Array.isArray(resp?.data) ? resp.data : resp?.data ? [resp.data] : [];
|
|
59
59
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
@@ -119,7 +119,7 @@ var PlayerEmbed = class PlayerEmbed extends require_lib_base_command.Authenticat
|
|
|
119
119
|
token: flags.token,
|
|
120
120
|
source: flags.source
|
|
121
121
|
} } });
|
|
122
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
122
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
123
123
|
const embedCode = data?.data?.embed_code ?? "";
|
|
124
124
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
125
125
|
ok: true,
|
|
@@ -52,7 +52,7 @@ var PlayerList = class PlayerList extends require_lib_base_command.Authenticated
|
|
|
52
52
|
},
|
|
53
53
|
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
54
54
|
});
|
|
55
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
55
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
56
56
|
const resp = data;
|
|
57
57
|
return {
|
|
58
58
|
data: Array.isArray(resp?.data) ? resp.data : resp?.data ? [resp.data] : [],
|
|
@@ -40,7 +40,7 @@ var PlayerStyles = class PlayerStyles extends require_lib_base_command.Authentic
|
|
|
40
40
|
const { flags } = await this.parse(PlayerStyles);
|
|
41
41
|
this.printWorkspaceHeader();
|
|
42
42
|
const { data, error } = await this.apiClient.GET("/player/styles", { params: { query: { fields: flags.fields } } });
|
|
43
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
43
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
44
44
|
const resp = data;
|
|
45
45
|
const items = Array.isArray(resp?.data) ? resp.data : resp?.data ? [resp.data] : [];
|
|
46
46
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
@@ -63,7 +63,7 @@ var PlayerUpdate = class PlayerUpdate extends require_lib_base_command.Authentic
|
|
|
63
63
|
body,
|
|
64
64
|
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
65
65
|
});
|
|
66
|
-
if (updateError) this.error(require_lib_term_map.applyCliTerms(formatApiError(updateError)), { exit: 1 });
|
|
66
|
+
if (updateError) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(updateError)), { exit: 1 });
|
|
67
67
|
this.log(chalk.default.green("Player updated"));
|
|
68
68
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
69
69
|
ok: true,
|
|
@@ -58,7 +58,7 @@ var PollAdd = class PollAdd extends require_lib_base_command.AuthenticatedComman
|
|
|
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
|
const pollId = data?.data?.poll_id ?? data?.poll_id;
|
|
63
63
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
64
64
|
ok: true,
|
|
@@ -72,7 +72,7 @@ var PollAnswer = class PollAnswer extends require_lib_base_command.Authenticated
|
|
|
72
72
|
},
|
|
73
73
|
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
74
74
|
});
|
|
75
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
75
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
76
76
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
77
77
|
ok: true,
|
|
78
78
|
data,
|
|
@@ -54,7 +54,7 @@ var PollList = class PollList extends require_lib_base_command.AuthenticatedComm
|
|
|
54
54
|
object_id: objectId,
|
|
55
55
|
object_token: objectToken
|
|
56
56
|
} } });
|
|
57
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
57
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
58
58
|
const polls = Array.isArray(data?.data) ? data.data : data?.data ? [data.data] : [];
|
|
59
59
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
60
60
|
ok: true,
|
|
@@ -40,7 +40,7 @@ var PollRemove = class PollRemove extends require_lib_base_command.Authenticated
|
|
|
40
40
|
body: { poll_id: Number(args.id) },
|
|
41
41
|
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
42
42
|
});
|
|
43
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
43
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
44
44
|
this.log(chalk.default.green(`Poll ${args.id} removed`));
|
|
45
45
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
46
46
|
ok: true,
|
|
@@ -67,7 +67,7 @@ var PollSetOptions = class PollSetOptions extends require_lib_base_command.Authe
|
|
|
67
67
|
},
|
|
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,
|
|
@@ -62,7 +62,7 @@ var PollUpdate = class PollUpdate extends require_lib_base_command.Authenticated
|
|
|
62
62
|
body,
|
|
63
63
|
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
64
64
|
});
|
|
65
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
65
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
66
66
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
67
67
|
ok: true,
|
|
68
68
|
data,
|
|
@@ -35,7 +35,7 @@ var PresentationPageLinkLocations = class PresentationPageLinkLocations extends
|
|
|
35
35
|
const {} = await this.parse(PresentationPageLinkLocations);
|
|
36
36
|
this.printWorkspaceHeader();
|
|
37
37
|
const { data, error } = await this.apiClient.GET("/presentation/page/link-locations", {});
|
|
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 resp = data;
|
|
40
40
|
const rows = Array.isArray(resp?.data) ? resp.data : resp?.data ? [resp.data] : [];
|
|
41
41
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
@@ -27,7 +27,7 @@ var PresentationSettingList = class PresentationSettingList extends require_lib_
|
|
|
27
27
|
const {} = await this.parse(PresentationSettingList);
|
|
28
28
|
this.printWorkspaceHeader();
|
|
29
29
|
const { data, error } = await this.apiClient.GET("/presentation/setting/list", {});
|
|
30
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(formatApiError(error)), { exit: 1 });
|
|
30
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
31
31
|
const resp = data;
|
|
32
32
|
const obj = resp?.data ?? resp;
|
|
33
33
|
if (!obj) this.error("No presentation settings returned", { exit: 1 });
|
|
@@ -53,7 +53,7 @@ var PresentationSettingUpdate = class PresentationSettingUpdate extends require_
|
|
|
53
53
|
body,
|
|
54
54
|
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
55
55
|
});
|
|
56
|
-
if (updateError) this.error(require_lib_term_map.applyCliTerms(formatApiError(updateError)), { exit: 1 });
|
|
56
|
+
if (updateError) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(updateError)), { exit: 1 });
|
|
57
57
|
this.log(chalk.default.green("Presentation settings updated"));
|
|
58
58
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
59
59
|
ok: true,
|
|
@@ -54,7 +54,7 @@ var ProtectionProtect = class ProtectionProtect extends require_lib_base_command
|
|
|
54
54
|
body,
|
|
55
55
|
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
56
56
|
});
|
|
57
|
-
if (protectError) this.error(require_lib_term_map.applyCliTerms(formatApiError(protectError)), { exit: 1 });
|
|
57
|
+
if (protectError) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(protectError)), { exit: 1 });
|
|
58
58
|
this.log(chalk.default.green("Protection applied"));
|
|
59
59
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
60
60
|
ok: true,
|
|
@@ -51,7 +51,7 @@ var ProtectionUnprotect = class ProtectionUnprotect extends require_lib_base_com
|
|
|
51
51
|
body,
|
|
52
52
|
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
53
53
|
});
|
|
54
|
-
if (unprotectError) this.error(require_lib_term_map.applyCliTerms(formatApiError(unprotectError)), { exit: 1 });
|
|
54
|
+
if (unprotectError) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(unprotectError)), { exit: 1 });
|
|
55
55
|
this.log(chalk.default.green("Protection removed"));
|
|
56
56
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
57
57
|
ok: true,
|