twentythree-cli 1.3.5 → 1.3.7
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/dist/commands/audience/list.cjs +96 -13
- package/dist/commands/category/list.cjs +53 -5
- package/dist/commands/comment/list.cjs +24 -3
- package/dist/commands/poll/list.cjs +38 -5
- package/dist/commands/spot/list.cjs +39 -11
- package/dist/commands/user/list.cjs +56 -7
- package/dist/commands/video/list.cjs +145 -10
- package/dist/commands/video/subtitle/list.cjs +38 -1
- package/dist/commands/webinar/list.cjs +121 -20
- package/dist/commands/webinar/mail/list.cjs +18 -2
- package/dist/commands/webinar/series/list.cjs +111 -5
- package/dist/commands/webinar/speaker/add.cjs +25 -15
- package/dist/commands/webinar/speaker/list.cjs +46 -4
- package/dist/commands/webinar/speaker/update.cjs +18 -0
- package/docs/commands/action/add.md +1 -1
- package/docs/commands/action/delete.md +1 -1
- package/docs/commands/action/exclude.md +1 -1
- package/docs/commands/action/get.md +1 -1
- package/docs/commands/action/include.md +1 -1
- package/docs/commands/action/list.md +1 -1
- package/docs/commands/action/types.md +1 -1
- package/docs/commands/action/update.md +1 -1
- package/docs/commands/action/upload.md +1 -1
- package/docs/commands/action.md +9 -9
- package/docs/commands/analytics/conversions.md +3 -3
- package/docs/commands/analytics/live.md +9 -9
- package/docs/commands/analytics/usage.md +18 -18
- package/docs/commands/analytics/video.md +12 -12
- package/docs/commands/analytics.md +42 -42
- package/docs/commands/app/add.md +1 -1
- package/docs/commands/app/delete.md +1 -1
- package/docs/commands/app/list.md +1 -1
- package/docs/commands/app/remove-thumbnail.md +1 -1
- package/docs/commands/app/set-thumbnail.md +1 -1
- package/docs/commands/app/update.md +1 -1
- package/docs/commands/app.md +6 -6
- package/docs/commands/audience/companies.md +1 -1
- package/docs/commands/audience/field.md +4 -4
- package/docs/commands/audience/funnel.md +1 -1
- package/docs/commands/audience/identity-sources.md +1 -1
- package/docs/commands/audience/list-collectors.md +1 -1
- package/docs/commands/audience/list.md +40 -11
- package/docs/commands/audience/metrics.md +1 -1
- package/docs/commands/audience/register.md +1 -1
- package/docs/commands/audience/remove.md +1 -1
- package/docs/commands/audience/search.md +1 -1
- package/docs/commands/audience/timelines.md +1 -1
- package/docs/commands/audience/unregister.md +1 -1
- package/docs/commands/audience.md +15 -15
- package/docs/commands/auth/credentials.md +1 -1
- package/docs/commands/auth/status.md +1 -1
- package/docs/commands/auth/switch.md +1 -1
- package/docs/commands/auth.md +3 -3
- package/docs/commands/autocomplete.md +1 -1
- package/docs/commands/category/create.md +1 -1
- package/docs/commands/category/delete.md +1 -1
- package/docs/commands/category/list.md +20 -3
- package/docs/commands/category/update.md +1 -1
- package/docs/commands/category.md +5 -5
- package/docs/commands/collector/exclude.md +1 -1
- package/docs/commands/collector/include.md +1 -1
- package/docs/commands/collector/list.md +1 -1
- package/docs/commands/collector.md +3 -3
- package/docs/commands/comment/add.md +1 -1
- package/docs/commands/comment/clone.md +1 -1
- package/docs/commands/comment/delete.md +1 -1
- package/docs/commands/comment/list.md +24 -11
- package/docs/commands/comment/promote.md +1 -1
- package/docs/commands/comment/reaction.md +3 -3
- package/docs/commands/comment/set-order.md +1 -1
- package/docs/commands/comment/update.md +1 -1
- package/docs/commands/comment.md +10 -10
- package/docs/commands/doctor.md +1 -1
- package/docs/commands/openupload/list.md +1 -1
- package/docs/commands/openupload/update-file.md +1 -1
- package/docs/commands/openupload/upload-file.md +1 -1
- package/docs/commands/openupload.md +3 -3
- package/docs/commands/player/delete.md +1 -1
- package/docs/commands/player/embed-versions.md +1 -1
- package/docs/commands/player/embed.md +1 -1
- package/docs/commands/player/list.md +1 -1
- package/docs/commands/player/remove-thumbnail.md +1 -1
- package/docs/commands/player/set-thumbnail.md +1 -1
- package/docs/commands/player/styles.md +1 -1
- package/docs/commands/player/update.md +1 -1
- package/docs/commands/player.md +8 -8
- package/docs/commands/poll/add.md +1 -1
- package/docs/commands/poll/answer.md +1 -1
- package/docs/commands/poll/list.md +12 -2
- package/docs/commands/poll/remove.md +1 -1
- package/docs/commands/poll/set-options.md +1 -1
- package/docs/commands/poll/update.md +1 -1
- package/docs/commands/poll.md +6 -6
- package/docs/commands/presentation/page.md +1 -1
- package/docs/commands/presentation/setting.md +2 -2
- package/docs/commands/presentation.md +3 -3
- package/docs/commands/protection/protect.md +1 -1
- package/docs/commands/protection/unprotect.md +1 -1
- package/docs/commands/protection/verify.md +1 -1
- package/docs/commands/protection.md +3 -3
- package/docs/commands/seo/get.md +1 -1
- package/docs/commands/seo/status.md +1 -1
- package/docs/commands/seo/update.md +1 -1
- package/docs/commands/seo.md +3 -3
- package/docs/commands/session/get-token.md +1 -1
- package/docs/commands/session/redeem-token.md +1 -1
- package/docs/commands/session.md +2 -2
- package/docs/commands/setting/update.md +1 -1
- package/docs/commands/setting.md +1 -1
- package/docs/commands/site/get.md +1 -1
- package/docs/commands/site/search.md +1 -1
- package/docs/commands/site.md +2 -2
- package/docs/commands/spot/check.md +1 -1
- package/docs/commands/spot/create.md +1 -1
- package/docs/commands/spot/delete.md +1 -1
- package/docs/commands/spot/list.md +21 -10
- package/docs/commands/spot/reset-version.md +1 -1
- package/docs/commands/spot/set-videos.md +1 -1
- package/docs/commands/spot/update.md +1 -1
- package/docs/commands/spot.md +7 -7
- package/docs/commands/tag/list.md +1 -1
- package/docs/commands/tag/related.md +1 -1
- package/docs/commands/tag.md +2 -2
- package/docs/commands/thumbnail/add.md +1 -1
- package/docs/commands/thumbnail/data.md +1 -1
- package/docs/commands/thumbnail/delete.md +1 -1
- package/docs/commands/thumbnail/duplicate.md +1 -1
- package/docs/commands/thumbnail/file.md +3 -3
- package/docs/commands/thumbnail/list.md +1 -1
- package/docs/commands/thumbnail/preview-scss.md +1 -1
- package/docs/commands/thumbnail/update.md +1 -1
- package/docs/commands/thumbnail.md +11 -11
- package/docs/commands/user/create.md +1 -1
- package/docs/commands/user/get-login-token.md +1 -1
- package/docs/commands/user/get.md +1 -1
- package/docs/commands/user/list.md +22 -7
- package/docs/commands/user/redeem-login-token.md +1 -1
- package/docs/commands/user/send-invitation.md +1 -1
- package/docs/commands/user/tokens.md +1 -1
- package/docs/commands/user/update.md +1 -1
- package/docs/commands/user.md +8 -8
- package/docs/commands/video/delete.md +1 -1
- package/docs/commands/video/frame.md +1 -1
- package/docs/commands/video/get.md +1 -1
- package/docs/commands/video/list.md +42 -4
- package/docs/commands/video/replace.md +1 -1
- package/docs/commands/video/section.md +8 -8
- package/docs/commands/video/subtitle.md +24 -13
- package/docs/commands/video/transcoding-progress.md +1 -1
- package/docs/commands/video/update.md +1 -1
- package/docs/commands/video/upload.md +1 -1
- package/docs/commands/video.md +28 -28
- package/docs/commands/webhook/events.md +1 -1
- package/docs/commands/webhook/list.md +1 -1
- package/docs/commands/webhook/sample.md +1 -1
- package/docs/commands/webhook/subscribe.md +1 -1
- package/docs/commands/webhook/unsubscribe.md +1 -1
- package/docs/commands/webhook.md +5 -5
- package/docs/commands/webinar/attachment.md +4 -4
- package/docs/commands/webinar/clips.md +1 -1
- package/docs/commands/webinar/create.md +1 -1
- package/docs/commands/webinar/delete.md +1 -1
- package/docs/commands/webinar/highlights.md +1 -1
- package/docs/commands/webinar/list-formats.md +1 -1
- package/docs/commands/webinar/list.md +38 -8
- package/docs/commands/webinar/log.md +1 -1
- package/docs/commands/webinar/mail.md +14 -8
- package/docs/commands/webinar/metrics.md +1 -1
- package/docs/commands/webinar/queued-video.md +2 -2
- package/docs/commands/webinar/recording.md +4 -4
- package/docs/commands/webinar/repeat.md +1 -1
- package/docs/commands/webinar/room.md +4 -4
- package/docs/commands/webinar/section.md +4 -4
- package/docs/commands/webinar/series.md +44 -13
- package/docs/commands/webinar/speaker.md +34 -25
- package/docs/commands/webinar/transcription.md +4 -4
- package/docs/commands/webinar/update.md +1 -1
- package/docs/commands/webinar/upload-image.md +1 -1
- package/docs/commands/webinar.md +67 -67
- package/docs/commands/workspace/list.md +1 -1
- package/docs/commands/workspace/use.md +1 -1
- package/docs/commands/workspace.md +2 -2
- package/oclif.manifest.json +2021 -957
- package/package.json +1 -1
|
@@ -7,14 +7,16 @@ let _oclif_core = require("@oclif/core");
|
|
|
7
7
|
let chalk = require("chalk");
|
|
8
8
|
chalk = require_runtime.__toESM(chalk);
|
|
9
9
|
//#region src/commands/video/list.ts
|
|
10
|
-
/**
|
|
11
|
-
* Video list command — lists all videos in the active workspace with auto-pagination.
|
|
12
|
-
* Renders a cli-table3 table with columns: ID, Title, Duration, Status, Published, Updated.
|
|
13
|
-
* Supports --json output with { ok, data, summary, breadcrumbs } shape (CLI-01).
|
|
14
|
-
*/
|
|
15
10
|
var VideoList = class VideoList extends require_lib_base_command.AuthenticatedCommand {
|
|
16
11
|
static description = "List videos in the active workspace";
|
|
17
|
-
static examples = [
|
|
12
|
+
static examples = [
|
|
13
|
+
"<%= config.bin %> video list",
|
|
14
|
+
"<%= config.bin %> video list --json",
|
|
15
|
+
"<%= config.bin %> video list --search \"intro\" --order-by views --order desc",
|
|
16
|
+
"<%= config.bin %> video list --album-id 42 --include-unpublished",
|
|
17
|
+
"<%= config.bin %> video list --user-id me --limit 10",
|
|
18
|
+
"<%= config.bin %> video list --after-time 2024-01-01T00:00:00Z --fields photo_id,title"
|
|
19
|
+
];
|
|
18
20
|
static enableJsonFlag = true;
|
|
19
21
|
static agentMetadata = {
|
|
20
22
|
api_endpoint: "GET /photo/list",
|
|
@@ -38,11 +40,121 @@ var VideoList = class VideoList extends require_lib_base_command.AuthenticatedCo
|
|
|
38
40
|
description: "Maximum number of videos to return (default: all)",
|
|
39
41
|
required: false
|
|
40
42
|
}),
|
|
43
|
+
search: _oclif_core.Flags.string({
|
|
44
|
+
description: "Search by title, description, or tags",
|
|
45
|
+
required: false
|
|
46
|
+
}),
|
|
47
|
+
"album-id": _oclif_core.Flags.string({
|
|
48
|
+
description: "Filter to videos in one or more categories (comma-separated IDs)",
|
|
49
|
+
required: false
|
|
50
|
+
}),
|
|
51
|
+
"user-id": _oclif_core.Flags.string({
|
|
52
|
+
description: "Filter to videos uploaded by a specific user (use \"me\" for the authenticated user)",
|
|
53
|
+
required: false
|
|
54
|
+
}),
|
|
55
|
+
"photo-id": _oclif_core.Flags.integer({
|
|
56
|
+
description: "Limit results to a single video by its ID",
|
|
57
|
+
required: false
|
|
58
|
+
}),
|
|
59
|
+
"live-id": _oclif_core.Flags.integer({
|
|
60
|
+
description: "Filter to videos associated with a specific webinar",
|
|
61
|
+
required: false
|
|
62
|
+
}),
|
|
63
|
+
tag: _oclif_core.Flags.string({
|
|
64
|
+
description: "Filter to videos with a specific tag",
|
|
65
|
+
required: false
|
|
66
|
+
}),
|
|
67
|
+
tags: _oclif_core.Flags.string({
|
|
68
|
+
description: "Space-separated list of tags to filter by",
|
|
69
|
+
required: false
|
|
70
|
+
}),
|
|
71
|
+
"tag-mode": _oclif_core.Flags.string({
|
|
72
|
+
description: "How to combine tag filters: \"and\" requires all tags to match, \"or\" requires any",
|
|
73
|
+
options: ["and", "or"],
|
|
74
|
+
required: false
|
|
75
|
+
}),
|
|
76
|
+
"order-by": _oclif_core.Flags.string({
|
|
77
|
+
description: "Order results by this field",
|
|
78
|
+
options: [
|
|
79
|
+
"uploaded",
|
|
80
|
+
"published",
|
|
81
|
+
"created",
|
|
82
|
+
"creation",
|
|
83
|
+
"taken",
|
|
84
|
+
"title",
|
|
85
|
+
"views",
|
|
86
|
+
"comments",
|
|
87
|
+
"rating",
|
|
88
|
+
"numratings",
|
|
89
|
+
"video_length",
|
|
90
|
+
"words",
|
|
91
|
+
"related",
|
|
92
|
+
"posted",
|
|
93
|
+
"rank",
|
|
94
|
+
"default-published"
|
|
95
|
+
],
|
|
96
|
+
required: false
|
|
97
|
+
}),
|
|
98
|
+
order: _oclif_core.Flags.string({
|
|
99
|
+
description: "Sort direction",
|
|
100
|
+
options: ["asc", "desc"],
|
|
101
|
+
required: false
|
|
102
|
+
}),
|
|
103
|
+
"before-time": _oclif_core.Flags.string({
|
|
104
|
+
description: "Filter to videos uploaded before this timestamp (ISO 8601)",
|
|
105
|
+
required: false
|
|
106
|
+
}),
|
|
107
|
+
"after-time": _oclif_core.Flags.string({
|
|
108
|
+
description: "Filter to videos uploaded after this timestamp (ISO 8601)",
|
|
109
|
+
required: false
|
|
110
|
+
}),
|
|
111
|
+
year: _oclif_core.Flags.integer({
|
|
112
|
+
description: "Filter to videos from a specific year",
|
|
113
|
+
required: false
|
|
114
|
+
}),
|
|
115
|
+
month: _oclif_core.Flags.integer({
|
|
116
|
+
description: "Filter to videos from a specific month (1–12, requires --year)",
|
|
117
|
+
required: false
|
|
118
|
+
}),
|
|
119
|
+
day: _oclif_core.Flags.integer({
|
|
120
|
+
description: "Filter to videos from a specific day (1–31, requires --year and --month)",
|
|
121
|
+
required: false
|
|
122
|
+
}),
|
|
123
|
+
published: _oclif_core.Flags.boolean({
|
|
124
|
+
description: "Filter by published status",
|
|
125
|
+
allowNo: true,
|
|
126
|
+
required: false
|
|
127
|
+
}),
|
|
128
|
+
promoted: _oclif_core.Flags.boolean({
|
|
129
|
+
description: "Filter to promoted videos only",
|
|
130
|
+
allowNo: true,
|
|
131
|
+
required: false
|
|
132
|
+
}),
|
|
133
|
+
unalbummed: _oclif_core.Flags.boolean({
|
|
134
|
+
description: "Filter to videos not assigned to any category",
|
|
135
|
+
required: false
|
|
136
|
+
}),
|
|
41
137
|
"include-unpublished": _oclif_core.Flags.boolean({
|
|
42
138
|
description: "Include unpublished videos in the results",
|
|
43
139
|
allowNo: true,
|
|
44
140
|
required: false
|
|
45
141
|
}),
|
|
142
|
+
"include-stats": _oclif_core.Flags.boolean({
|
|
143
|
+
description: "Include per-video performance statistics (view count, play rate, engagement)",
|
|
144
|
+
required: false
|
|
145
|
+
}),
|
|
146
|
+
"include-sections-count": _oclif_core.Flags.boolean({
|
|
147
|
+
description: "Include the number of chapters for each video",
|
|
148
|
+
required: false
|
|
149
|
+
}),
|
|
150
|
+
"include-user-group": _oclif_core.Flags.boolean({
|
|
151
|
+
description: "Include the user group assignment for each video",
|
|
152
|
+
required: false
|
|
153
|
+
}),
|
|
154
|
+
fields: _oclif_core.Flags.string({
|
|
155
|
+
description: "Comma-separated list of fields to return in the API response",
|
|
156
|
+
required: false
|
|
157
|
+
}),
|
|
46
158
|
"include-unpublished-p": _oclif_core.Flags.string({
|
|
47
159
|
hidden: true,
|
|
48
160
|
required: false
|
|
@@ -53,11 +165,34 @@ var VideoList = class VideoList extends require_lib_base_command.AuthenticatedCo
|
|
|
53
165
|
const { flags } = await this.parse(VideoList);
|
|
54
166
|
this.printWorkspaceHeader();
|
|
55
167
|
const allVideos = await require_lib_pagination.fetchAllPages(async (page, size) => {
|
|
56
|
-
const
|
|
168
|
+
const query = {
|
|
57
169
|
p: page,
|
|
58
|
-
size
|
|
59
|
-
|
|
60
|
-
|
|
170
|
+
size
|
|
171
|
+
};
|
|
172
|
+
if (flags.search !== void 0) query.search = flags.search;
|
|
173
|
+
if (flags["album-id"] !== void 0) query.album_id = flags["album-id"];
|
|
174
|
+
if (flags["user-id"] !== void 0) query.user_id = flags["user-id"];
|
|
175
|
+
if (flags["photo-id"] !== void 0) query.photo_id = flags["photo-id"];
|
|
176
|
+
if (flags["live-id"] !== void 0) query.live_id = flags["live-id"];
|
|
177
|
+
if (flags.tag !== void 0) query.tag = flags.tag;
|
|
178
|
+
if (flags.tags !== void 0) query.tags = flags.tags;
|
|
179
|
+
if (flags["tag-mode"] !== void 0) query.tag_mode = flags["tag-mode"];
|
|
180
|
+
if (flags["order-by"] !== void 0) query.orderby = flags["order-by"];
|
|
181
|
+
if (flags.order !== void 0) query.order = flags.order;
|
|
182
|
+
if (flags["before-time"] !== void 0) query.before_time = flags["before-time"];
|
|
183
|
+
if (flags["after-time"] !== void 0) query.after_time = flags["after-time"];
|
|
184
|
+
if (flags.year !== void 0) query.year = flags.year;
|
|
185
|
+
if (flags.month !== void 0) query.month = flags.month;
|
|
186
|
+
if (flags.day !== void 0) query.day = flags.day;
|
|
187
|
+
if (flags.published !== void 0) query.published_p = flags.published;
|
|
188
|
+
if (flags.promoted !== void 0) query.promoted_p = flags.promoted;
|
|
189
|
+
if (flags.unalbummed) query.unalbummed_p = true;
|
|
190
|
+
if (flags["include-stats"]) query.include_stats_p = true;
|
|
191
|
+
if (flags["include-sections-count"]) query.include_number_of_sections_p = true;
|
|
192
|
+
if (flags["include-user-group"]) query.include_user_group_p = true;
|
|
193
|
+
if (flags.fields !== void 0) query.fields = flags.fields;
|
|
194
|
+
if (require_lib_output.parseBoolParam(flags["include-unpublished"], flags["include-unpublished-p"])) query.include_unpublished_p = "1";
|
|
195
|
+
const { data, error } = await this.apiClient.GET("/photo/list", { params: { query } });
|
|
61
196
|
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
62
197
|
const resp = data;
|
|
63
198
|
return {
|
|
@@ -40,6 +40,38 @@ var VideoSubtitleList = class VideoSubtitleList extends require_lib_base_command
|
|
|
40
40
|
"include-drafts-p": _oclif_core.Flags.string({
|
|
41
41
|
hidden: true,
|
|
42
42
|
required: false
|
|
43
|
+
}),
|
|
44
|
+
"subtitle-format": _oclif_core.Flags.string({
|
|
45
|
+
description: "Format to use for subtitle download URLs",
|
|
46
|
+
options: [
|
|
47
|
+
"websrt",
|
|
48
|
+
"json",
|
|
49
|
+
"adobe",
|
|
50
|
+
"subviewer",
|
|
51
|
+
"webvtt"
|
|
52
|
+
],
|
|
53
|
+
required: false
|
|
54
|
+
}),
|
|
55
|
+
type: _oclif_core.Flags.string({
|
|
56
|
+
description: "Filter by subtitle type",
|
|
57
|
+
options: [
|
|
58
|
+
"general",
|
|
59
|
+
"closedcaptions",
|
|
60
|
+
"audiodescriptions"
|
|
61
|
+
],
|
|
62
|
+
required: false
|
|
63
|
+
}),
|
|
64
|
+
stripped: _oclif_core.Flags.boolean({
|
|
65
|
+
description: "Return a stripped (timing-only) version of the subtitle file",
|
|
66
|
+
required: false
|
|
67
|
+
}),
|
|
68
|
+
"detect-language": _oclif_core.Flags.boolean({
|
|
69
|
+
description: "Use the viewer's browser language to determine the default subtitle",
|
|
70
|
+
required: false
|
|
71
|
+
}),
|
|
72
|
+
fields: _oclif_core.Flags.string({
|
|
73
|
+
description: "Comma-separated list of fields to return in the API response",
|
|
74
|
+
required: false
|
|
43
75
|
})
|
|
44
76
|
};
|
|
45
77
|
static args = { id: _oclif_core.Args.string({
|
|
@@ -53,7 +85,12 @@ var VideoSubtitleList = class VideoSubtitleList extends require_lib_base_command
|
|
|
53
85
|
const { data, error } = await this.apiClient.GET("/photo/subtitle/list", { params: { query: {
|
|
54
86
|
photo_id: Number(args.id),
|
|
55
87
|
token,
|
|
56
|
-
...require_lib_output.parseBoolParam(flags["include-drafts"], flags["include-drafts-p"]) && { include_drafts_p: true }
|
|
88
|
+
...require_lib_output.parseBoolParam(flags["include-drafts"], flags["include-drafts-p"]) && { include_drafts_p: true },
|
|
89
|
+
...flags["subtitle-format"] !== void 0 && { subtitle_format: flags["subtitle-format"] },
|
|
90
|
+
...flags.type !== void 0 && { type: flags.type },
|
|
91
|
+
...flags.stripped && { stripped_p: true },
|
|
92
|
+
...flags["detect-language"] && { detect_subtitle_language_p: true },
|
|
93
|
+
...flags.fields !== void 0 && { fields: flags.fields }
|
|
57
94
|
} } });
|
|
58
95
|
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
59
96
|
const subtitles = data?.subtitles ?? data?.data ?? [];
|
|
@@ -22,7 +22,10 @@ var WebinarList = class WebinarList extends require_lib_base_command.Authenticat
|
|
|
22
22
|
"<%= config.bin %> webinar list",
|
|
23
23
|
"<%= config.bin %> webinar list --limit 50",
|
|
24
24
|
"<%= config.bin %> webinar list --all",
|
|
25
|
-
"<%= config.bin %> webinar list --status upcoming --json"
|
|
25
|
+
"<%= config.bin %> webinar list --status upcoming --json",
|
|
26
|
+
"<%= config.bin %> webinar list --live-format webinar --ordering live_date --order asc",
|
|
27
|
+
"<%= config.bin %> webinar list --user-id me --include-speakers --json",
|
|
28
|
+
"<%= config.bin %> webinar list --live-series-id 42 --all --json"
|
|
26
29
|
];
|
|
27
30
|
static enableJsonFlag = true;
|
|
28
31
|
static flags = {
|
|
@@ -35,6 +38,19 @@ var WebinarList = class WebinarList extends require_lib_base_command.Authenticat
|
|
|
35
38
|
description: "Fetch all webinars across all pages (overrides --limit)",
|
|
36
39
|
required: false
|
|
37
40
|
}),
|
|
41
|
+
search: _oclif_core.Flags.string({
|
|
42
|
+
description: "Search webinars by keyword",
|
|
43
|
+
required: false
|
|
44
|
+
}),
|
|
45
|
+
status: _oclif_core.Flags.string({
|
|
46
|
+
description: "Filter by status: upcoming, live, or previous",
|
|
47
|
+
options: [
|
|
48
|
+
"upcoming",
|
|
49
|
+
"live",
|
|
50
|
+
"previous"
|
|
51
|
+
],
|
|
52
|
+
required: false
|
|
53
|
+
}),
|
|
38
54
|
"include-private": _oclif_core.Flags.boolean({
|
|
39
55
|
description: "Include private webinars in the results",
|
|
40
56
|
allowNo: true,
|
|
@@ -44,12 +60,84 @@ var WebinarList = class WebinarList extends require_lib_base_command.Authenticat
|
|
|
44
60
|
hidden: true,
|
|
45
61
|
required: false
|
|
46
62
|
}),
|
|
47
|
-
|
|
48
|
-
description: "
|
|
63
|
+
"live-id": _oclif_core.Flags.integer({
|
|
64
|
+
description: "Limit to a single webinar by ID",
|
|
49
65
|
required: false
|
|
50
66
|
}),
|
|
51
|
-
|
|
52
|
-
description: "
|
|
67
|
+
"album-id": _oclif_core.Flags.integer({
|
|
68
|
+
description: "Filter to webinars in a specific category",
|
|
69
|
+
required: false
|
|
70
|
+
}),
|
|
71
|
+
"user-id": _oclif_core.Flags.string({
|
|
72
|
+
description: "Filter to webinars created by a specific user (use \"me\" for the authenticated user)",
|
|
73
|
+
required: false
|
|
74
|
+
}),
|
|
75
|
+
"live-format": _oclif_core.Flags.string({
|
|
76
|
+
description: "Filter by live format",
|
|
77
|
+
options: ["event", "webinar"],
|
|
78
|
+
required: false
|
|
79
|
+
}),
|
|
80
|
+
"live-series-id": _oclif_core.Flags.integer({
|
|
81
|
+
description: "Filter to webinars in a specific series",
|
|
82
|
+
required: false
|
|
83
|
+
}),
|
|
84
|
+
ordering: _oclif_core.Flags.string({
|
|
85
|
+
description: "Field to order results by",
|
|
86
|
+
options: [
|
|
87
|
+
"private",
|
|
88
|
+
"promoted",
|
|
89
|
+
"streaming",
|
|
90
|
+
"broadcasting",
|
|
91
|
+
"name",
|
|
92
|
+
"live_label",
|
|
93
|
+
"live_status",
|
|
94
|
+
"live_date",
|
|
95
|
+
"creation_date"
|
|
96
|
+
],
|
|
97
|
+
required: false
|
|
98
|
+
}),
|
|
99
|
+
order: _oclif_core.Flags.string({
|
|
100
|
+
description: "Sort direction",
|
|
101
|
+
options: ["asc", "desc"],
|
|
102
|
+
required: false
|
|
103
|
+
}),
|
|
104
|
+
promoted: _oclif_core.Flags.boolean({
|
|
105
|
+
description: "Filter by promoted status",
|
|
106
|
+
allowNo: true,
|
|
107
|
+
required: false
|
|
108
|
+
}),
|
|
109
|
+
draft: _oclif_core.Flags.boolean({
|
|
110
|
+
description: "Filter by draft status",
|
|
111
|
+
allowNo: true,
|
|
112
|
+
required: false
|
|
113
|
+
}),
|
|
114
|
+
cancelled: _oclif_core.Flags.boolean({
|
|
115
|
+
description: "Filter by cancelled status",
|
|
116
|
+
allowNo: true,
|
|
117
|
+
required: false
|
|
118
|
+
}),
|
|
119
|
+
streaming: _oclif_core.Flags.boolean({
|
|
120
|
+
description: "Filter to currently streaming webinars only",
|
|
121
|
+
required: false
|
|
122
|
+
}),
|
|
123
|
+
template: _oclif_core.Flags.boolean({
|
|
124
|
+
description: "Filter to webinar templates only",
|
|
125
|
+
required: false
|
|
126
|
+
}),
|
|
127
|
+
"include-stats": _oclif_core.Flags.boolean({
|
|
128
|
+
description: "Include performance statistics for each webinar",
|
|
129
|
+
required: false
|
|
130
|
+
}),
|
|
131
|
+
"include-speakers": _oclif_core.Flags.boolean({
|
|
132
|
+
description: "Include speaker information for each webinar",
|
|
133
|
+
required: false
|
|
134
|
+
}),
|
|
135
|
+
"include-albums": _oclif_core.Flags.boolean({
|
|
136
|
+
description: "Include category information for each webinar",
|
|
137
|
+
required: false
|
|
138
|
+
}),
|
|
139
|
+
fields: _oclif_core.Flags.string({
|
|
140
|
+
description: "Comma-separated list of fields to return in the API response",
|
|
53
141
|
required: false
|
|
54
142
|
})
|
|
55
143
|
};
|
|
@@ -73,16 +161,36 @@ var WebinarList = class WebinarList extends require_lib_base_command.Authenticat
|
|
|
73
161
|
const { flags } = await this.parse(WebinarList);
|
|
74
162
|
this.printWorkspaceHeader();
|
|
75
163
|
const includePrivate = require_lib_output.parseBoolParam(flags["include-private"], flags["include-private-p"]);
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
const { data, error } = await this.apiClient.GET("/live/list", { params: { query: {
|
|
164
|
+
const buildQuery = (page, size) => {
|
|
165
|
+
const q = {
|
|
79
166
|
p: page,
|
|
80
167
|
size,
|
|
81
|
-
include_private_p: includePrivate ?? void 0,
|
|
82
|
-
live_status: flags.status,
|
|
83
|
-
search: flags.search,
|
|
84
168
|
include_streaming_details_p: false
|
|
85
|
-
}
|
|
169
|
+
};
|
|
170
|
+
if (includePrivate !== void 0) q.include_private_p = includePrivate;
|
|
171
|
+
if (flags.status !== void 0) q.live_status = flags.status;
|
|
172
|
+
if (flags.search !== void 0) q.search = flags.search;
|
|
173
|
+
if (flags["live-id"] !== void 0) q.live_id = flags["live-id"];
|
|
174
|
+
if (flags["album-id"] !== void 0) q.album_id = flags["album-id"];
|
|
175
|
+
if (flags["user-id"] !== void 0) q.user_id = flags["user-id"];
|
|
176
|
+
if (flags["live-format"] !== void 0) q.live_format = flags["live-format"];
|
|
177
|
+
if (flags["live-series-id"] !== void 0) q.live_series_id = flags["live-series-id"];
|
|
178
|
+
if (flags.ordering !== void 0) q.ordering = flags.ordering;
|
|
179
|
+
if (flags.order !== void 0) q.order = flags.order;
|
|
180
|
+
if (flags.promoted !== void 0) q.promoted_p = flags.promoted;
|
|
181
|
+
if (flags.draft !== void 0) q.draft_p = flags.draft;
|
|
182
|
+
if (flags.cancelled !== void 0) q.cancelled_p = flags.cancelled;
|
|
183
|
+
if (flags.streaming) q.streaming_p = true;
|
|
184
|
+
if (flags.template) q.template_p = true;
|
|
185
|
+
if (flags["include-stats"]) q.include_stats_p = true;
|
|
186
|
+
if (flags["include-speakers"]) q.include_speakers_p = true;
|
|
187
|
+
if (flags["include-albums"]) q.include_albums_p = true;
|
|
188
|
+
if (flags.fields !== void 0) q.fields = flags.fields;
|
|
189
|
+
return q;
|
|
190
|
+
};
|
|
191
|
+
let webinars;
|
|
192
|
+
if (flags.all) webinars = await require_lib_pagination.fetchAllPages(async (page, size) => {
|
|
193
|
+
const { data, error } = await this.apiClient.GET("/live/list", { params: { query: buildQuery(page, size) } });
|
|
86
194
|
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
87
195
|
const resp = data;
|
|
88
196
|
return {
|
|
@@ -91,14 +199,7 @@ var WebinarList = class WebinarList extends require_lib_base_command.Authenticat
|
|
|
91
199
|
};
|
|
92
200
|
});
|
|
93
201
|
else {
|
|
94
|
-
const { data, error } = await this.apiClient.GET("/live/list", { params: { query:
|
|
95
|
-
p: 1,
|
|
96
|
-
size: flags.limit,
|
|
97
|
-
include_private_p: includePrivate ?? void 0,
|
|
98
|
-
live_status: flags.status,
|
|
99
|
-
search: flags.search,
|
|
100
|
-
include_streaming_details_p: false
|
|
101
|
-
} } });
|
|
202
|
+
const { data, error } = await this.apiClient.GET("/live/list", { params: { query: buildQuery(1, flags.limit) } });
|
|
102
203
|
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
103
204
|
const resp = data;
|
|
104
205
|
webinars = Array.isArray(resp?.data) ? resp.data : resp?.data ? [resp.data] : [];
|
|
@@ -20,7 +20,19 @@ var WebinarMailList = class WebinarMailList extends require_lib_base_command.Aut
|
|
|
20
20
|
static enableJsonFlag = true;
|
|
21
21
|
static flags = {
|
|
22
22
|
...require_lib_base_command.AuthenticatedCommand.baseFlags,
|
|
23
|
-
"series-id": _oclif_core.Flags.string({ description: "Series ID — list mails for a series instead of a webinar" })
|
|
23
|
+
"series-id": _oclif_core.Flags.string({ description: "Series ID — list mails for a series instead of a webinar" }),
|
|
24
|
+
"mail-id": _oclif_core.Flags.integer({
|
|
25
|
+
description: "Return a specific mail by its ID",
|
|
26
|
+
required: false
|
|
27
|
+
}),
|
|
28
|
+
"include-metrics": _oclif_core.Flags.boolean({
|
|
29
|
+
description: "Include metrics on mail performance in the response",
|
|
30
|
+
required: false
|
|
31
|
+
}),
|
|
32
|
+
fields: _oclif_core.Flags.string({
|
|
33
|
+
description: "Comma-separated list of fields to return in the API response",
|
|
34
|
+
required: false
|
|
35
|
+
})
|
|
24
36
|
};
|
|
25
37
|
static args = { id: _oclif_core.Args.string({
|
|
26
38
|
description: "Webinar ID (omit when using --series-id)",
|
|
@@ -45,7 +57,11 @@ var WebinarMailList = class WebinarMailList extends require_lib_base_command.Aut
|
|
|
45
57
|
this.printWorkspaceHeader();
|
|
46
58
|
const contextField = flags["series-id"] ? { live_series_id: Number(flags["series-id"]) } : args.id ? { live_id: Number(args.id) } : null;
|
|
47
59
|
if (!contextField) this.error(require_lib_term_map.applyCliTerms("Either a webinar ID argument or --series-id is required"), { exit: 1 });
|
|
48
|
-
const
|
|
60
|
+
const query = { ...contextField };
|
|
61
|
+
if (flags["mail-id"] !== void 0) query.live_mail_id = flags["mail-id"];
|
|
62
|
+
if (flags["include-metrics"]) query.include_metrics_p = true;
|
|
63
|
+
if (flags.fields !== void 0) query.fields = flags.fields;
|
|
64
|
+
const { data, error } = await this.apiClient.GET("/live/mail/list", { params: { query } });
|
|
49
65
|
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
50
66
|
const mails = Array.isArray(data?.data) ? data.data : data?.data ? [data.data] : [];
|
|
51
67
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
@@ -3,6 +3,7 @@ const require_lib_term_map = require("../../../lib/term-map.cjs");
|
|
|
3
3
|
const require_lib_base_command = require("../../../lib/base-command.cjs");
|
|
4
4
|
const require_lib_output = require("../../../lib/output.cjs");
|
|
5
5
|
const require_lib_pagination = require("../../../lib/pagination.cjs");
|
|
6
|
+
let _oclif_core = require("@oclif/core");
|
|
6
7
|
let chalk = require("chalk");
|
|
7
8
|
chalk = require_runtime.__toESM(chalk);
|
|
8
9
|
//#region src/commands/webinar/series/list.ts
|
|
@@ -17,9 +18,94 @@ chalk = require_runtime.__toESM(chalk);
|
|
|
17
18
|
*/
|
|
18
19
|
var WebinarSeriesList = class WebinarSeriesList extends require_lib_base_command.AuthenticatedCommand {
|
|
19
20
|
static description = "List webinar series";
|
|
20
|
-
static examples = [
|
|
21
|
+
static examples = [
|
|
22
|
+
"<%= config.bin %> webinar series list",
|
|
23
|
+
"<%= config.bin %> webinar series list --json",
|
|
24
|
+
"<%= config.bin %> webinar series list --search \"Q4\" --ordering live_date --order asc",
|
|
25
|
+
"<%= config.bin %> webinar series list --series-type series --include-speakers --json",
|
|
26
|
+
"<%= config.bin %> webinar series list --user-id me --include-stats --json"
|
|
27
|
+
];
|
|
21
28
|
static enableJsonFlag = true;
|
|
22
|
-
static flags = {
|
|
29
|
+
static flags = {
|
|
30
|
+
...require_lib_base_command.AuthenticatedCommand.baseFlags,
|
|
31
|
+
search: _oclif_core.Flags.string({
|
|
32
|
+
description: "Search for specific series by keyword",
|
|
33
|
+
required: false
|
|
34
|
+
}),
|
|
35
|
+
"live-series-id": _oclif_core.Flags.integer({
|
|
36
|
+
description: "Limit results to a single series by its ID",
|
|
37
|
+
required: false
|
|
38
|
+
}),
|
|
39
|
+
"live-id": _oclif_core.Flags.integer({
|
|
40
|
+
description: "Filter to series that contain a specific webinar ID",
|
|
41
|
+
required: false
|
|
42
|
+
}),
|
|
43
|
+
"album-id": _oclif_core.Flags.integer({
|
|
44
|
+
description: "Filter to series belonging to a specific category",
|
|
45
|
+
required: false
|
|
46
|
+
}),
|
|
47
|
+
"user-id": _oclif_core.Flags.string({
|
|
48
|
+
description: "Filter to series created by a specific user (use \"me\" for the authenticated user)",
|
|
49
|
+
required: false
|
|
50
|
+
}),
|
|
51
|
+
"series-type": _oclif_core.Flags.string({
|
|
52
|
+
description: "Filter by series type",
|
|
53
|
+
options: ["liveevent", "series"],
|
|
54
|
+
required: false
|
|
55
|
+
}),
|
|
56
|
+
ordering: _oclif_core.Flags.string({
|
|
57
|
+
description: "Field to order results by",
|
|
58
|
+
options: [
|
|
59
|
+
"name",
|
|
60
|
+
"private",
|
|
61
|
+
"live_status",
|
|
62
|
+
"live_date",
|
|
63
|
+
"creation_date",
|
|
64
|
+
"updated_date"
|
|
65
|
+
],
|
|
66
|
+
required: false
|
|
67
|
+
}),
|
|
68
|
+
order: _oclif_core.Flags.string({
|
|
69
|
+
description: "Sort direction",
|
|
70
|
+
options: ["asc", "desc"],
|
|
71
|
+
required: false
|
|
72
|
+
}),
|
|
73
|
+
cancelled: _oclif_core.Flags.boolean({
|
|
74
|
+
description: "Filter by cancelled status",
|
|
75
|
+
allowNo: true,
|
|
76
|
+
required: false
|
|
77
|
+
}),
|
|
78
|
+
draft: _oclif_core.Flags.boolean({
|
|
79
|
+
description: "Filter by draft status",
|
|
80
|
+
allowNo: true,
|
|
81
|
+
required: false
|
|
82
|
+
}),
|
|
83
|
+
private: _oclif_core.Flags.boolean({
|
|
84
|
+
description: "Filter by private status",
|
|
85
|
+
allowNo: true,
|
|
86
|
+
required: false
|
|
87
|
+
}),
|
|
88
|
+
"include-private": _oclif_core.Flags.boolean({
|
|
89
|
+
description: "Include private series in results",
|
|
90
|
+
required: false
|
|
91
|
+
}),
|
|
92
|
+
"include-speakers": _oclif_core.Flags.boolean({
|
|
93
|
+
description: "Include speaker information for each series",
|
|
94
|
+
required: false
|
|
95
|
+
}),
|
|
96
|
+
"include-stats": _oclif_core.Flags.boolean({
|
|
97
|
+
description: "Include performance statistics for each series",
|
|
98
|
+
required: false
|
|
99
|
+
}),
|
|
100
|
+
"include-albums": _oclif_core.Flags.boolean({
|
|
101
|
+
description: "Include category information for each series",
|
|
102
|
+
required: false
|
|
103
|
+
}),
|
|
104
|
+
fields: _oclif_core.Flags.string({
|
|
105
|
+
description: "Comma-separated list of fields to return in the API response",
|
|
106
|
+
required: false
|
|
107
|
+
})
|
|
108
|
+
};
|
|
23
109
|
static args = {};
|
|
24
110
|
static agentMetadata = {
|
|
25
111
|
api_endpoint: "GET /live/series/list",
|
|
@@ -38,11 +124,31 @@ var WebinarSeriesList = class WebinarSeriesList extends require_lib_base_command
|
|
|
38
124
|
async run() {
|
|
39
125
|
const { flags } = await this.parse(WebinarSeriesList);
|
|
40
126
|
this.printWorkspaceHeader();
|
|
41
|
-
const
|
|
42
|
-
const
|
|
127
|
+
const buildQuery = (page, size) => {
|
|
128
|
+
const q = {
|
|
43
129
|
p: page,
|
|
44
130
|
size
|
|
45
|
-
}
|
|
131
|
+
};
|
|
132
|
+
if (flags.search !== void 0) q.search = flags.search;
|
|
133
|
+
if (flags["live-series-id"] !== void 0) q.live_series_id = flags["live-series-id"];
|
|
134
|
+
if (flags["live-id"] !== void 0) q.live_id = flags["live-id"];
|
|
135
|
+
if (flags["album-id"] !== void 0) q.album_id = flags["album-id"];
|
|
136
|
+
if (flags["user-id"] !== void 0) q.user_id = flags["user-id"];
|
|
137
|
+
if (flags["series-type"] !== void 0) q.series_type = flags["series-type"];
|
|
138
|
+
if (flags.ordering !== void 0) q.orderby = flags.ordering;
|
|
139
|
+
if (flags.order !== void 0) q.order = flags.order;
|
|
140
|
+
if (flags.cancelled !== void 0) q.cancelled_p = flags.cancelled;
|
|
141
|
+
if (flags.draft !== void 0) q.draft_p = flags.draft;
|
|
142
|
+
if (flags.private !== void 0) q.private_p = flags.private;
|
|
143
|
+
if (flags["include-private"]) q.include_private_p = true;
|
|
144
|
+
if (flags["include-speakers"]) q.include_speakers_p = true;
|
|
145
|
+
if (flags["include-stats"]) q.include_stats_p = true;
|
|
146
|
+
if (flags["include-albums"]) q.include_albums_p = true;
|
|
147
|
+
if (flags.fields !== void 0) q.fields = flags.fields;
|
|
148
|
+
return q;
|
|
149
|
+
};
|
|
150
|
+
const series = await require_lib_pagination.fetchAllPages(async (page, size) => {
|
|
151
|
+
const { data, error } = await this.apiClient.GET("/live/series/list", { params: { query: buildQuery(page, size) } });
|
|
46
152
|
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
47
153
|
const resp = data;
|
|
48
154
|
return {
|
|
@@ -31,7 +31,7 @@ var WebinarSpeakerAdd = class WebinarSpeakerAdd extends require_lib_base_command
|
|
|
31
31
|
required: false
|
|
32
32
|
}),
|
|
33
33
|
email: _oclif_core.Flags.string({
|
|
34
|
-
description: "Speaker email",
|
|
34
|
+
description: "Speaker email (required for WebRTC speakers)",
|
|
35
35
|
required: false
|
|
36
36
|
}),
|
|
37
37
|
title: _oclif_core.Flags.string({
|
|
@@ -41,6 +41,22 @@ var WebinarSpeakerAdd = class WebinarSpeakerAdd extends require_lib_base_command
|
|
|
41
41
|
description: _oclif_core.Flags.string({
|
|
42
42
|
description: "Speaker bio or description",
|
|
43
43
|
required: false
|
|
44
|
+
}),
|
|
45
|
+
"connection-type": _oclif_core.Flags.string({
|
|
46
|
+
description: "Speaker connection type",
|
|
47
|
+
options: [
|
|
48
|
+
"webrtc",
|
|
49
|
+
"gearmode",
|
|
50
|
+
"rtmp",
|
|
51
|
+
"whip",
|
|
52
|
+
"srt",
|
|
53
|
+
"url"
|
|
54
|
+
],
|
|
55
|
+
required: false
|
|
56
|
+
}),
|
|
57
|
+
"connection-type-pull-url": _oclif_core.Flags.string({
|
|
58
|
+
description: "Pull URL for connection types that support stream pull (whip, url)",
|
|
59
|
+
required: false
|
|
44
60
|
})
|
|
45
61
|
};
|
|
46
62
|
static args = { id: _oclif_core.Args.string({
|
|
@@ -58,27 +74,21 @@ var WebinarSpeakerAdd = class WebinarSpeakerAdd extends require_lib_base_command
|
|
|
58
74
|
this.printWorkspaceHeader();
|
|
59
75
|
let name = flags.name;
|
|
60
76
|
let email = flags.email;
|
|
61
|
-
if (
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
name = result;
|
|
66
|
-
}
|
|
67
|
-
if (!email) {
|
|
68
|
-
const result = await (0, _clack_prompts.text)({ message: "Speaker email" });
|
|
69
|
-
if ((0, _clack_prompts.isCancel)(result)) process.exit(2);
|
|
70
|
-
email = result;
|
|
71
|
-
}
|
|
77
|
+
if (!name && !this.jsonEnabled()) {
|
|
78
|
+
const result = await (0, _clack_prompts.text)({ message: "Speaker name" });
|
|
79
|
+
if ((0, _clack_prompts.isCancel)(result)) process.exit(2);
|
|
80
|
+
name = result;
|
|
72
81
|
}
|
|
73
82
|
if (!name) this.error("--name is required in non-interactive mode", { exit: 1 });
|
|
74
|
-
if (!email) this.error("--email is required in non-interactive mode", { exit: 1 });
|
|
75
83
|
const body = {
|
|
76
84
|
live_id: Number(args.id),
|
|
77
|
-
name
|
|
78
|
-
email
|
|
85
|
+
name
|
|
79
86
|
};
|
|
87
|
+
if (email !== void 0) body.email = email;
|
|
80
88
|
if (flags.title !== void 0) body.title = flags.title;
|
|
81
89
|
if (flags.description !== void 0) body.description = flags.description;
|
|
90
|
+
if (flags["connection-type"] !== void 0) body.connection_type = flags["connection-type"];
|
|
91
|
+
if (flags["connection-type-pull-url"] !== void 0) body.connection_type_pull_url = flags["connection-type-pull-url"];
|
|
82
92
|
const { data, error } = await this.apiClient.POST("/live/speaker/add", {
|
|
83
93
|
body,
|
|
84
94
|
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|