twentythree-cli 1.1.1 → 1.3.1
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/autocomplete/index.cjs +3 -2
- package/dist/commands/player/remove-thumbnail.cjs +51 -0
- package/dist/commands/player/set-thumbnail.cjs +76 -0
- package/dist/commands/player/update.cjs +1 -1
- package/dist/commands/thumbnail/preview-scss.cjs +59 -0
- package/dist/commands/video/replace.cjs +4 -1
- package/dist/commands/video/subtitle/archive.cjs +22 -56
- package/dist/commands/video/update.cjs +12 -1
- package/dist/commands/video/upload.cjs +15 -7
- package/dist/commands/webinar/create.cjs +4 -1
- package/dist/commands/webinar/repeat.cjs +4 -1
- package/dist/commands/webinar/series/create.cjs +4 -1
- package/dist/commands/webinar/series/update.cjs +10 -0
- package/dist/commands/webinar/update.cjs +12 -1
- package/dist/upload/chunked-upload.cjs +2 -1
- package/oclif.manifest.json +3484 -3219
- package/package.json +13 -11
package/bin/dev.js
CHANGED
|
File without changes
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
const require_runtime = require("../../_virtual/_rolldown/runtime.cjs");
|
|
2
|
+
const require_lib_base_command = require("../../lib/base-command.cjs");
|
|
2
3
|
const require_lib_detect_shell = require("../../lib/detect-shell.cjs");
|
|
3
|
-
let _oclif_core = require("@oclif/core");
|
|
4
4
|
let _clack_prompts = require("@clack/prompts");
|
|
5
5
|
_clack_prompts = require_runtime.__toESM(_clack_prompts);
|
|
6
6
|
//#region src/commands/autocomplete/index.ts
|
|
7
|
-
var Autocomplete = class Autocomplete extends
|
|
7
|
+
var Autocomplete = class Autocomplete extends require_lib_base_command.BaseCommand {
|
|
8
8
|
static description = "Set up tab completion for your shell";
|
|
9
9
|
static agentMetadata = {
|
|
10
10
|
api_endpoint: "interactive",
|
|
@@ -13,6 +13,7 @@ var Autocomplete = class Autocomplete extends _oclif_core.Command {
|
|
|
13
13
|
side_effects: "creates"
|
|
14
14
|
};
|
|
15
15
|
static examples = ["<%= config.bin %> autocomplete"];
|
|
16
|
+
async init() {}
|
|
16
17
|
async run() {
|
|
17
18
|
await this.parse(Autocomplete);
|
|
18
19
|
_clack_prompts.intro("Tab completion setup");
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
const require_runtime = require("../../_virtual/_rolldown/runtime.cjs");
|
|
2
|
+
const require_lib_term_map = require("../../lib/term-map.cjs");
|
|
3
|
+
const require_lib_base_command = require("../../lib/base-command.cjs");
|
|
4
|
+
const require_lib_output = require("../../lib/output.cjs");
|
|
5
|
+
let _oclif_core = require("@oclif/core");
|
|
6
|
+
let chalk = require("chalk");
|
|
7
|
+
chalk = require_runtime.__toESM(chalk);
|
|
8
|
+
//#region src/commands/player/remove-thumbnail.ts
|
|
9
|
+
/**
|
|
10
|
+
* Player remove-thumbnail command — removes the custom thumbnail for a player,
|
|
11
|
+
* reverting it to the default generated thumbnail image.
|
|
12
|
+
*
|
|
13
|
+
* Maps to POST /player/remove-thumbnail.
|
|
14
|
+
*/
|
|
15
|
+
var PlayerRemoveThumbnail = class PlayerRemoveThumbnail extends require_lib_base_command.AuthenticatedCommand {
|
|
16
|
+
static description = "Remove the custom thumbnail for a player, reverting to the default";
|
|
17
|
+
static examples = ["<%= config.bin %> player remove-thumbnail 42", "<%= config.bin %> player remove-thumbnail 42 --json"];
|
|
18
|
+
static enableJsonFlag = true;
|
|
19
|
+
static agentMetadata = {
|
|
20
|
+
api_endpoint: "POST /player/remove-thumbnail",
|
|
21
|
+
auth_scope: "write",
|
|
22
|
+
output_shape: { type: "key-value" },
|
|
23
|
+
side_effects: "updates"
|
|
24
|
+
};
|
|
25
|
+
static flags = { ...require_lib_base_command.AuthenticatedCommand.baseFlags };
|
|
26
|
+
static args = { id: _oclif_core.Args.string({
|
|
27
|
+
description: "Player ID",
|
|
28
|
+
required: true
|
|
29
|
+
}) };
|
|
30
|
+
async run() {
|
|
31
|
+
const { args } = await this.parse(PlayerRemoveThumbnail);
|
|
32
|
+
this.printWorkspaceHeader();
|
|
33
|
+
const { data, error } = await this.apiClient.POST("/player/remove-thumbnail", {
|
|
34
|
+
body: { player_id: Number(args.id) },
|
|
35
|
+
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
36
|
+
});
|
|
37
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
38
|
+
this.log(chalk.default.green(`Thumbnail removed for player ${args.id}`));
|
|
39
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
40
|
+
ok: true,
|
|
41
|
+
data,
|
|
42
|
+
summary: `Thumbnail removed for player ${args.id}`,
|
|
43
|
+
breadcrumbs: [{ domain: this.activeWorkspace.domain }, {
|
|
44
|
+
resource: "player",
|
|
45
|
+
id: args.id
|
|
46
|
+
}]
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
//#endregion
|
|
51
|
+
module.exports = PlayerRemoveThumbnail;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
const require_runtime = require("../../_virtual/_rolldown/runtime.cjs");
|
|
2
|
+
const require_lib_term_map = require("../../lib/term-map.cjs");
|
|
3
|
+
const require_lib_base_command = require("../../lib/base-command.cjs");
|
|
4
|
+
const require_lib_output = require("../../lib/output.cjs");
|
|
5
|
+
let _oclif_core = require("@oclif/core");
|
|
6
|
+
let chalk = require("chalk");
|
|
7
|
+
chalk = require_runtime.__toESM(chalk);
|
|
8
|
+
let node_fs = require("node:fs");
|
|
9
|
+
node_fs = require_runtime.__toESM(node_fs);
|
|
10
|
+
let node_path = require("node:path");
|
|
11
|
+
node_path = require_runtime.__toESM(node_path);
|
|
12
|
+
//#region src/commands/player/set-thumbnail.ts
|
|
13
|
+
/**
|
|
14
|
+
* Player set-thumbnail command — uploads and sets a custom thumbnail image for a player.
|
|
15
|
+
*
|
|
16
|
+
* Uses direct multipart POST with bodySerializer to create FormData.
|
|
17
|
+
* Per D-3: NOT the chunked engine — thumbnail images use direct multipart upload.
|
|
18
|
+
*
|
|
19
|
+
* Maps to POST /player/set-thumbnail.
|
|
20
|
+
*/
|
|
21
|
+
var PlayerSetThumbnail = class PlayerSetThumbnail extends require_lib_base_command.AuthenticatedCommand {
|
|
22
|
+
static description = "Upload and set a custom thumbnail image for a player";
|
|
23
|
+
static examples = ["<%= config.bin %> player set-thumbnail ./thumbnail.png --player-id 42", "<%= config.bin %> player set-thumbnail ./thumbnail.jpg --player-id 42 --json"];
|
|
24
|
+
static enableJsonFlag = true;
|
|
25
|
+
static agentMetadata = {
|
|
26
|
+
api_endpoint: "POST /player/set-thumbnail",
|
|
27
|
+
auth_scope: "write",
|
|
28
|
+
output_shape: { type: "key-value" },
|
|
29
|
+
side_effects: "updates"
|
|
30
|
+
};
|
|
31
|
+
static flags = {
|
|
32
|
+
...require_lib_base_command.AuthenticatedCommand.baseFlags,
|
|
33
|
+
"player-id": _oclif_core.Flags.integer({
|
|
34
|
+
description: "Player ID to update",
|
|
35
|
+
required: true
|
|
36
|
+
})
|
|
37
|
+
};
|
|
38
|
+
static args = { file: _oclif_core.Args.string({
|
|
39
|
+
description: "Path to the thumbnail image file",
|
|
40
|
+
required: true
|
|
41
|
+
}) };
|
|
42
|
+
async run() {
|
|
43
|
+
const { args, flags } = await this.parse(PlayerSetThumbnail);
|
|
44
|
+
this.printWorkspaceHeader();
|
|
45
|
+
const filePath = node_path.resolve(args.file);
|
|
46
|
+
if (!node_fs.existsSync(filePath)) this.error(`File not found: ${filePath}`, { exit: 1 });
|
|
47
|
+
const fileBuffer = node_fs.readFileSync(filePath);
|
|
48
|
+
const fileName = node_path.basename(filePath);
|
|
49
|
+
const fileBlob = new Blob([fileBuffer]);
|
|
50
|
+
const { data, error } = await this.apiClient.POST("/player/set-thumbnail", {
|
|
51
|
+
body: {
|
|
52
|
+
player_id: flags["player-id"],
|
|
53
|
+
file: fileBlob
|
|
54
|
+
},
|
|
55
|
+
bodySerializer(body) {
|
|
56
|
+
const fd = new FormData();
|
|
57
|
+
for (const [k, v] of Object.entries(body)) if (v !== void 0) if (v instanceof Blob) fd.append(k, v, fileName);
|
|
58
|
+
else fd.append(k, String(v));
|
|
59
|
+
return fd;
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
63
|
+
this.log(chalk.default.green(`Thumbnail set for player ${flags["player-id"]}`));
|
|
64
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
65
|
+
ok: true,
|
|
66
|
+
data,
|
|
67
|
+
summary: `Thumbnail set for player ${flags["player-id"]}`,
|
|
68
|
+
breadcrumbs: [{ domain: this.activeWorkspace.domain }, {
|
|
69
|
+
resource: "player",
|
|
70
|
+
id: String(flags["player-id"])
|
|
71
|
+
}]
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
//#endregion
|
|
76
|
+
module.exports = PlayerSetThumbnail;
|
|
@@ -48,7 +48,7 @@ var PlayerUpdate = class PlayerUpdate extends require_lib_base_command.Authentic
|
|
|
48
48
|
const { args, flags } = await this.parse(PlayerUpdate);
|
|
49
49
|
this.printWorkspaceHeader();
|
|
50
50
|
const body = { player_id: Number(args.id) };
|
|
51
|
-
if (flags.name !== void 0) body.
|
|
51
|
+
if (flags.name !== void 0) body.player_name = flags.name;
|
|
52
52
|
if (flags.description !== void 0) body.description = flags.description;
|
|
53
53
|
if (flags.data !== void 0) {
|
|
54
54
|
let extra;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
require("../../_virtual/_rolldown/runtime.cjs");
|
|
2
|
+
const require_lib_term_map = require("../../lib/term-map.cjs");
|
|
3
|
+
const require_lib_base_command = require("../../lib/base-command.cjs");
|
|
4
|
+
const require_lib_output = require("../../lib/output.cjs");
|
|
5
|
+
let _oclif_core = require("@oclif/core");
|
|
6
|
+
//#region src/commands/thumbnail/preview-scss.ts
|
|
7
|
+
/**
|
|
8
|
+
* Thumbnail preview-scss command — prerenders SCSS into CSS for previewing
|
|
9
|
+
* thumbnail templates without saving changes.
|
|
10
|
+
*
|
|
11
|
+
* Maps to POST /thumbnail/template/preview-scss.
|
|
12
|
+
*/
|
|
13
|
+
var ThumbnailPreviewScss = class ThumbnailPreviewScss extends require_lib_base_command.AuthenticatedCommand {
|
|
14
|
+
static description = "Preview SCSS compiled to CSS for a thumbnail template";
|
|
15
|
+
static examples = ["<%= config.bin %> thumbnail preview-scss 42 --scss \".title { font-size: 32px; }\"", "<%= config.bin %> thumbnail preview-scss 42 --scss \".title { color: red; }\" --json"];
|
|
16
|
+
static enableJsonFlag = true;
|
|
17
|
+
static agentMetadata = {
|
|
18
|
+
api_endpoint: "POST /thumbnail/template/preview-scss",
|
|
19
|
+
auth_scope: "admin",
|
|
20
|
+
output_shape: { type: "key-value" },
|
|
21
|
+
side_effects: "none"
|
|
22
|
+
};
|
|
23
|
+
static flags = {
|
|
24
|
+
...require_lib_base_command.AuthenticatedCommand.baseFlags,
|
|
25
|
+
scss: _oclif_core.Flags.string({
|
|
26
|
+
description: "SCSS styles to prerender into CSS",
|
|
27
|
+
required: true
|
|
28
|
+
})
|
|
29
|
+
};
|
|
30
|
+
static args = { id: _oclif_core.Args.string({
|
|
31
|
+
description: "Thumbnail template ID",
|
|
32
|
+
required: true
|
|
33
|
+
}) };
|
|
34
|
+
async run() {
|
|
35
|
+
const { args, flags } = await this.parse(ThumbnailPreviewScss);
|
|
36
|
+
this.printWorkspaceHeader();
|
|
37
|
+
const { data, error } = await this.apiClient.POST("/thumbnail/template/preview-scss", {
|
|
38
|
+
body: {
|
|
39
|
+
thumbnail_template_id: Number(args.id),
|
|
40
|
+
scss_template: flags.scss
|
|
41
|
+
},
|
|
42
|
+
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
43
|
+
});
|
|
44
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
45
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
46
|
+
ok: true,
|
|
47
|
+
data,
|
|
48
|
+
summary: `SCSS preview for thumbnail template ${args.id}`,
|
|
49
|
+
breadcrumbs: [{ domain: this.activeWorkspace.domain }, {
|
|
50
|
+
resource: "thumbnail",
|
|
51
|
+
id: args.id
|
|
52
|
+
}]
|
|
53
|
+
});
|
|
54
|
+
const result = data?.data ?? data;
|
|
55
|
+
this.log(JSON.stringify(result, null, 2));
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
//#endregion
|
|
59
|
+
module.exports = ThumbnailPreviewScss;
|
|
@@ -114,7 +114,10 @@ var VideoReplace = class VideoReplace extends require_lib_base_command.Authentic
|
|
|
114
114
|
this.log(`Admin: ${adminUrl}`);
|
|
115
115
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
116
116
|
ok: true,
|
|
117
|
-
data:
|
|
117
|
+
data: {
|
|
118
|
+
...result,
|
|
119
|
+
admin_url: adminUrl
|
|
120
|
+
},
|
|
118
121
|
summary: `Video ${args.id} replaced`,
|
|
119
122
|
breadcrumbs: [{ domain: this.activeWorkspace.domain }, {
|
|
120
123
|
resource: "video",
|
|
@@ -1,75 +1,41 @@
|
|
|
1
|
-
const require_runtime = require("../../../_virtual/_rolldown/runtime.cjs");
|
|
2
1
|
const require_lib_term_map = require("../../../lib/term-map.cjs");
|
|
3
2
|
const require_lib_base_command = require("../../../lib/base-command.cjs");
|
|
4
3
|
const require_lib_output = require("../../../lib/output.cjs");
|
|
5
|
-
let _oclif_core = require("@oclif/core");
|
|
6
|
-
let chalk = require("chalk");
|
|
7
|
-
chalk = require_runtime.__toESM(chalk);
|
|
8
4
|
//#region src/commands/video/subtitle/archive.ts
|
|
9
5
|
/**
|
|
10
|
-
* Video subtitle archive command —
|
|
11
|
-
* or checks transcription progress.
|
|
6
|
+
* Video subtitle archive command — checks workspace-level subtitle archive transcription progress.
|
|
12
7
|
*
|
|
13
|
-
*
|
|
14
|
-
* Queues all eligible workspace videos for automatic transcription.
|
|
15
|
-
*
|
|
16
|
-
* With --progress: POST /photo/subtitle/archive/get-progress
|
|
8
|
+
* POST /photo/subtitle/archive/get-progress
|
|
17
9
|
* Returns a breakdown of the archive transcription queue by status.
|
|
18
10
|
*
|
|
19
|
-
*
|
|
11
|
+
* Note: The /photo/subtitle/archive/transcribe endpoint has been removed from the API.
|
|
20
12
|
*/
|
|
21
|
-
var VideoSubtitleArchive = class
|
|
22
|
-
static description = "
|
|
23
|
-
static examples = [
|
|
24
|
-
"<%= config.bin %> video subtitle archive",
|
|
25
|
-
"<%= config.bin %> video subtitle archive --progress",
|
|
26
|
-
"<%= config.bin %> video subtitle archive --progress --json"
|
|
27
|
-
];
|
|
13
|
+
var VideoSubtitleArchive = class extends require_lib_base_command.AuthenticatedCommand {
|
|
14
|
+
static description = "Check workspace subtitle archive transcription progress";
|
|
15
|
+
static examples = ["<%= config.bin %> video subtitle archive", "<%= config.bin %> video subtitle archive --json"];
|
|
28
16
|
static enableJsonFlag = true;
|
|
29
17
|
static agentMetadata = {
|
|
30
|
-
api_endpoint: "POST /photo/subtitle/archive/
|
|
18
|
+
api_endpoint: "POST /photo/subtitle/archive/get-progress",
|
|
31
19
|
auth_scope: "write",
|
|
32
20
|
output_shape: { type: "key-value" },
|
|
33
|
-
side_effects: "
|
|
34
|
-
};
|
|
35
|
-
static flags = {
|
|
36
|
-
...require_lib_base_command.AuthenticatedCommand.baseFlags,
|
|
37
|
-
progress: _oclif_core.Flags.boolean({
|
|
38
|
-
description: "Check transcription progress instead of triggering transcription",
|
|
39
|
-
default: false
|
|
40
|
-
})
|
|
21
|
+
side_effects: "none"
|
|
41
22
|
};
|
|
23
|
+
static flags = { ...require_lib_base_command.AuthenticatedCommand.baseFlags };
|
|
42
24
|
async run() {
|
|
43
|
-
const { flags } = await this.parse(VideoSubtitleArchive);
|
|
44
25
|
this.printWorkspaceHeader();
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
this.log(JSON.stringify(progress, null, 2));
|
|
59
|
-
} else {
|
|
60
|
-
const { data, error } = await this.apiClient.POST("/photo/subtitle/archive/transcribe", {
|
|
61
|
-
body: {},
|
|
62
|
-
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
63
|
-
});
|
|
64
|
-
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
65
|
-
this.log(chalk.default.green("Transcription started for all videos in the workspace archive"));
|
|
66
|
-
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
67
|
-
ok: true,
|
|
68
|
-
data,
|
|
69
|
-
summary: "Transcription started for all videos in the workspace archive",
|
|
70
|
-
breadcrumbs: [{ domain: this.activeWorkspace.domain }, { resource: "subtitle-archive" }]
|
|
71
|
-
});
|
|
72
|
-
}
|
|
26
|
+
const { data, error } = await this.apiClient.POST("/photo/subtitle/archive/get-progress", {
|
|
27
|
+
body: {},
|
|
28
|
+
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
29
|
+
});
|
|
30
|
+
if (error) this.error(require_lib_term_map.applyCliTerms(require_lib_output.formatApiError(error)), { exit: 1 });
|
|
31
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
32
|
+
ok: true,
|
|
33
|
+
data,
|
|
34
|
+
summary: "Subtitle archive transcription progress",
|
|
35
|
+
breadcrumbs: [{ domain: this.activeWorkspace.domain }, { resource: "subtitle-archive" }]
|
|
36
|
+
});
|
|
37
|
+
const progress = data?.data ?? data;
|
|
38
|
+
this.log(JSON.stringify(progress, null, 2));
|
|
73
39
|
}
|
|
74
40
|
};
|
|
75
41
|
//#endregion
|
|
@@ -71,6 +71,15 @@ var VideoUpdate = class VideoUpdate extends require_lib_base_command.Authenticat
|
|
|
71
71
|
allowNo: true,
|
|
72
72
|
required: false
|
|
73
73
|
}),
|
|
74
|
+
"seo-policy": _oclif_core.Flags.string({
|
|
75
|
+
description: "SEO policy for the video: index, noindex, or empty string to reset",
|
|
76
|
+
options: [
|
|
77
|
+
"",
|
|
78
|
+
"index",
|
|
79
|
+
"noindex"
|
|
80
|
+
],
|
|
81
|
+
required: false
|
|
82
|
+
}),
|
|
74
83
|
"published-p": _oclif_core.Flags.string({
|
|
75
84
|
hidden: true,
|
|
76
85
|
required: false
|
|
@@ -104,7 +113,8 @@ var VideoUpdate = class VideoUpdate extends require_lib_base_command.Authenticat
|
|
|
104
113
|
flags["360"],
|
|
105
114
|
flags["published-p"],
|
|
106
115
|
flags["promoted-p"],
|
|
107
|
-
flags["video-360-p"]
|
|
116
|
+
flags["video-360-p"],
|
|
117
|
+
flags["seo-policy"]
|
|
108
118
|
].some((v) => v !== void 0);
|
|
109
119
|
const body = { photo_id: videoId };
|
|
110
120
|
if (!metadataFlagsProvided && !this.jsonEnabled()) {
|
|
@@ -165,6 +175,7 @@ var VideoUpdate = class VideoUpdate extends require_lib_base_command.Authenticat
|
|
|
165
175
|
if (promoteVal !== void 0) body.promoted_p = promoteVal ? 1 : 0;
|
|
166
176
|
if (flags["publish-date"] !== void 0) body["publish_date"] = flags["publish-date"];
|
|
167
177
|
if (video360Val !== void 0) body.video_360_p = video360Val ? 1 : 0;
|
|
178
|
+
if (flags["seo-policy"] !== void 0) body.seo_policy = flags["seo-policy"];
|
|
168
179
|
}
|
|
169
180
|
const { data: updateData, error: updateError } = await this.apiClient.POST("/photo/update", {
|
|
170
181
|
body,
|
|
@@ -130,20 +130,28 @@ var VideoUpload = class VideoUpload extends require_lib_base_command.Authenticat
|
|
|
130
130
|
bar.finish();
|
|
131
131
|
}
|
|
132
132
|
const videoId = result.photo_id;
|
|
133
|
-
const adminUrl = `https://${this.activeWorkspace.domain}/manage/video/${videoId}`;
|
|
134
133
|
this.log(chalk.default.green("Video uploaded successfully"));
|
|
135
134
|
if (videoId) {
|
|
135
|
+
const adminUrl = `https://${this.activeWorkspace.domain}/manage/video/${videoId}`;
|
|
136
136
|
this.log(`ID: ${videoId}`);
|
|
137
137
|
this.log(`Admin: ${adminUrl}`);
|
|
138
|
-
|
|
139
|
-
|
|
138
|
+
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
139
|
+
ok: true,
|
|
140
|
+
data: {
|
|
141
|
+
...result,
|
|
142
|
+
admin_url: adminUrl
|
|
143
|
+
},
|
|
144
|
+
summary: "Video uploaded",
|
|
145
|
+
breadcrumbs: [{ domain: this.activeWorkspace.domain }, {
|
|
146
|
+
resource: "video",
|
|
147
|
+
id: String(videoId)
|
|
148
|
+
}]
|
|
149
|
+
});
|
|
150
|
+
} else if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
140
151
|
ok: true,
|
|
141
152
|
data: result,
|
|
142
153
|
summary: "Video uploaded",
|
|
143
|
-
breadcrumbs: [{ domain: this.activeWorkspace.domain }
|
|
144
|
-
resource: "video",
|
|
145
|
-
id: result.photo_id ? String(result.photo_id) : void 0
|
|
146
|
-
}]
|
|
154
|
+
breadcrumbs: [{ domain: this.activeWorkspace.domain }]
|
|
147
155
|
});
|
|
148
156
|
}
|
|
149
157
|
};
|
|
@@ -89,7 +89,10 @@ var WebinarCreate = class WebinarCreate extends require_lib_base_command.Authent
|
|
|
89
89
|
const liveId = createData?.data?.live_id;
|
|
90
90
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
91
91
|
ok: true,
|
|
92
|
-
data:
|
|
92
|
+
data: {
|
|
93
|
+
...createData ?? {},
|
|
94
|
+
admin_url: `https://${this.activeWorkspace.domain}/manage/webinar/${liveId}`
|
|
95
|
+
},
|
|
93
96
|
summary: "Webinar created",
|
|
94
97
|
breadcrumbs: [{ domain: this.activeWorkspace.domain }, {
|
|
95
98
|
resource: "webinar",
|
|
@@ -47,7 +47,10 @@ var WebinarRepeat = class WebinarRepeat extends require_lib_base_command.Authent
|
|
|
47
47
|
const newLiveId = repeatData?.data?.live_id;
|
|
48
48
|
if (this.jsonEnabled()) return require_lib_output.formatJsonOutput({
|
|
49
49
|
ok: true,
|
|
50
|
-
data:
|
|
50
|
+
data: {
|
|
51
|
+
...repeatData ?? {},
|
|
52
|
+
admin_url: `https://${this.activeWorkspace.domain}/manage/webinar/${newLiveId}`
|
|
53
|
+
},
|
|
51
54
|
summary: "Webinar duplicated and scheduled",
|
|
52
55
|
breadcrumbs: [{ domain: this.activeWorkspace.domain }, {
|
|
53
56
|
resource: "webinar",
|
|
@@ -62,7 +62,10 @@ var WebinarSeriesCreate = class WebinarSeriesCreate extends require_lib_base_com
|
|
|
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,
|
|
65
|
-
data
|
|
65
|
+
data: {
|
|
66
|
+
...data ?? {},
|
|
67
|
+
admin_url: `https://${this.activeWorkspace.domain}/manage/webinar/series/${seriesId}`
|
|
68
|
+
},
|
|
66
69
|
summary: "Series created",
|
|
67
70
|
breadcrumbs: [{ domain: this.activeWorkspace.domain }, {
|
|
68
71
|
resource: "series",
|
|
@@ -32,6 +32,15 @@ var WebinarSeriesUpdate = class WebinarSeriesUpdate extends require_lib_base_com
|
|
|
32
32
|
description: _oclif_core.Flags.string({
|
|
33
33
|
description: "Series description",
|
|
34
34
|
required: false
|
|
35
|
+
}),
|
|
36
|
+
"seo-policy": _oclif_core.Flags.string({
|
|
37
|
+
description: "SEO policy for the series: index, noindex, or empty string to reset",
|
|
38
|
+
options: [
|
|
39
|
+
"",
|
|
40
|
+
"index",
|
|
41
|
+
"noindex"
|
|
42
|
+
],
|
|
43
|
+
required: false
|
|
35
44
|
})
|
|
36
45
|
};
|
|
37
46
|
static args = { id: _oclif_core.Args.string({
|
|
@@ -50,6 +59,7 @@ var WebinarSeriesUpdate = class WebinarSeriesUpdate extends require_lib_base_com
|
|
|
50
59
|
const body = { live_series_id: Number(args.id) };
|
|
51
60
|
if (flags.name !== void 0) body.name = flags.name;
|
|
52
61
|
if (flags.description !== void 0) body.description = flags.description;
|
|
62
|
+
if (flags["seo-policy"] !== void 0) body.seo_policy = flags["seo-policy"];
|
|
53
63
|
const { data, error } = await this.apiClient.POST("/live/series/update", {
|
|
54
64
|
body,
|
|
55
65
|
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
@@ -58,6 +58,15 @@ var WebinarUpdate = class WebinarUpdate extends require_lib_base_command.Authent
|
|
|
58
58
|
allowNo: true,
|
|
59
59
|
required: false
|
|
60
60
|
}),
|
|
61
|
+
"seo-policy": _oclif_core.Flags.string({
|
|
62
|
+
description: "SEO policy for the webinar: index, noindex, or empty string to reset",
|
|
63
|
+
options: [
|
|
64
|
+
"",
|
|
65
|
+
"index",
|
|
66
|
+
"noindex"
|
|
67
|
+
],
|
|
68
|
+
required: false
|
|
69
|
+
}),
|
|
61
70
|
"draft-p": _oclif_core.Flags.string({
|
|
62
71
|
hidden: true,
|
|
63
72
|
required: false
|
|
@@ -90,7 +99,8 @@ var WebinarUpdate = class WebinarUpdate extends require_lib_base_command.Authent
|
|
|
90
99
|
flags.draft,
|
|
91
100
|
flags.publish,
|
|
92
101
|
flags["draft-p"],
|
|
93
|
-
flags["published-p"]
|
|
102
|
+
flags["published-p"],
|
|
103
|
+
flags["seo-policy"]
|
|
94
104
|
].some((v) => v !== void 0);
|
|
95
105
|
const body = { live_id: webinarId };
|
|
96
106
|
if (!metadataFlagsProvided && !this.jsonEnabled()) {
|
|
@@ -170,6 +180,7 @@ var WebinarUpdate = class WebinarUpdate extends require_lib_base_command.Authent
|
|
|
170
180
|
if (draftVal !== void 0) body.draft_p = draftVal ? 1 : 0;
|
|
171
181
|
const publishVal = require_lib_output.parseBoolParam(flags.publish, flags["published-p"]);
|
|
172
182
|
if (publishVal !== void 0) body.published_p = publishVal ? 1 : 0;
|
|
183
|
+
if (flags["seo-policy"] !== void 0) body.seo_policy = flags["seo-policy"];
|
|
173
184
|
}
|
|
174
185
|
const { data: updateData, error: updateError } = await this.apiClient.POST("/live/update", {
|
|
175
186
|
body,
|
|
@@ -71,7 +71,8 @@ async function uploadChunked(params) {
|
|
|
71
71
|
async function uploadFn(chunk) {
|
|
72
72
|
try {
|
|
73
73
|
const sliceBuffer = await readSlice(filePath, chunk.start, chunk.end);
|
|
74
|
-
const
|
|
74
|
+
const arrayBuffer = sliceBuffer.buffer.slice(sliceBuffer.byteOffset, sliceBuffer.byteOffset + sliceBuffer.byteLength);
|
|
75
|
+
const blob = new Blob([arrayBuffer]);
|
|
75
76
|
const formData = new FormData();
|
|
76
77
|
formData.append(tokenFieldName, uploadToken);
|
|
77
78
|
formData.append("file", blob, filename);
|