@itznexus/itznexus-cli 1.4.0 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/dist/commands/{claude.js → agents/claude.js} +5 -62
  2. package/dist/commands/agents/claude.js.map +1 -0
  3. package/dist/commands/api/audit-logs.d.ts +2 -0
  4. package/dist/commands/api/audit-logs.js +66 -0
  5. package/dist/commands/api/audit-logs.js.map +1 -0
  6. package/dist/commands/{auth.js → api/auth.js} +2 -10
  7. package/dist/commands/api/auth.js.map +1 -0
  8. package/dist/commands/api/claude-events.d.ts +2 -0
  9. package/dist/commands/api/claude-events.js +104 -0
  10. package/dist/commands/api/claude-events.js.map +1 -0
  11. package/dist/commands/api/files.d.ts +2 -0
  12. package/dist/commands/api/files.js +166 -0
  13. package/dist/commands/api/files.js.map +1 -0
  14. package/dist/commands/api/folders.d.ts +2 -0
  15. package/dist/commands/api/folders.js +153 -0
  16. package/dist/commands/api/folders.js.map +1 -0
  17. package/dist/commands/api/github-accounts.d.ts +2 -0
  18. package/dist/commands/api/github-accounts.js +99 -0
  19. package/dist/commands/api/github-accounts.js.map +1 -0
  20. package/dist/commands/api/gmail-accounts.d.ts +2 -0
  21. package/dist/commands/api/gmail-accounts.js +117 -0
  22. package/dist/commands/api/gmail-accounts.js.map +1 -0
  23. package/dist/commands/{health.js → api/health.js} +2 -2
  24. package/dist/commands/api/health.js.map +1 -0
  25. package/dist/commands/{interaction.js → api/interactions.js} +6 -13
  26. package/dist/commands/api/interactions.js.map +1 -0
  27. package/dist/commands/api/jobs.d.ts +2 -0
  28. package/dist/commands/api/jobs.js +90 -0
  29. package/dist/commands/api/jobs.js.map +1 -0
  30. package/dist/commands/{lead.js → api/leads.js} +119 -27
  31. package/dist/commands/api/leads.js.map +1 -0
  32. package/dist/commands/{organization.js → api/organizations.js} +31 -41
  33. package/dist/commands/api/organizations.js.map +1 -0
  34. package/dist/commands/{page.js → api/pages.js} +62 -19
  35. package/dist/commands/api/pages.js.map +1 -0
  36. package/dist/commands/{person.js → api/persons.js} +67 -47
  37. package/dist/commands/api/persons.js.map +1 -0
  38. package/dist/commands/{pipeline.js → api/pipelines.js} +3 -3
  39. package/dist/commands/api/pipelines.js.map +1 -0
  40. package/dist/commands/api/projects.js +357 -0
  41. package/dist/commands/api/projects.js.map +1 -0
  42. package/dist/commands/api/repositories.d.ts +2 -0
  43. package/dist/commands/api/repositories.js +118 -0
  44. package/dist/commands/api/repositories.js.map +1 -0
  45. package/dist/commands/api/settings.d.ts +2 -0
  46. package/dist/commands/api/settings.js +79 -0
  47. package/dist/commands/api/settings.js.map +1 -0
  48. package/dist/commands/{sprint.js → api/sprints.js} +37 -22
  49. package/dist/commands/api/sprints.js.map +1 -0
  50. package/dist/commands/{task.js → api/tasks.js} +78 -19
  51. package/dist/commands/api/tasks.js.map +1 -0
  52. package/dist/commands/api/upwork-job-notifications.d.ts +2 -0
  53. package/dist/commands/api/upwork-job-notifications.js +85 -0
  54. package/dist/commands/api/upwork-job-notifications.js.map +1 -0
  55. package/dist/commands/api/users.js +224 -0
  56. package/dist/commands/api/users.js.map +1 -0
  57. package/dist/commands/api/website-scrapes.d.ts +2 -0
  58. package/dist/commands/api/website-scrapes.js +118 -0
  59. package/dist/commands/api/website-scrapes.js.map +1 -0
  60. package/dist/commands/api/youtube-productions.d.ts +2 -0
  61. package/dist/commands/api/youtube-productions.js +521 -0
  62. package/dist/commands/api/youtube-productions.js.map +1 -0
  63. package/dist/commands/api/youtube-videos.d.ts +2 -0
  64. package/dist/commands/api/youtube-videos.js +111 -0
  65. package/dist/commands/api/youtube-videos.js.map +1 -0
  66. package/dist/index.js +96 -41
  67. package/dist/index.js.map +1 -1
  68. package/package.json +1 -1
  69. package/dist/commands/auth.js.map +0 -1
  70. package/dist/commands/claude.js.map +0 -1
  71. package/dist/commands/health.js.map +0 -1
  72. package/dist/commands/interaction.js.map +0 -1
  73. package/dist/commands/lead.js.map +0 -1
  74. package/dist/commands/organization.js.map +0 -1
  75. package/dist/commands/page.js.map +0 -1
  76. package/dist/commands/person.js.map +0 -1
  77. package/dist/commands/pipeline.js.map +0 -1
  78. package/dist/commands/project.js +0 -151
  79. package/dist/commands/project.js.map +0 -1
  80. package/dist/commands/sprint.js.map +0 -1
  81. package/dist/commands/task.js.map +0 -1
  82. package/dist/commands/user.js +0 -58
  83. package/dist/commands/user.js.map +0 -1
  84. /package/dist/commands/{claude.d.ts → agents/claude.d.ts} +0 -0
  85. /package/dist/commands/{auth.d.ts → api/auth.d.ts} +0 -0
  86. /package/dist/commands/{health.d.ts → api/health.d.ts} +0 -0
  87. /package/dist/commands/{interaction.d.ts → api/interactions.d.ts} +0 -0
  88. /package/dist/commands/{lead.d.ts → api/leads.d.ts} +0 -0
  89. /package/dist/commands/{organization.d.ts → api/organizations.d.ts} +0 -0
  90. /package/dist/commands/{page.d.ts → api/pages.d.ts} +0 -0
  91. /package/dist/commands/{person.d.ts → api/persons.d.ts} +0 -0
  92. /package/dist/commands/{pipeline.d.ts → api/pipelines.d.ts} +0 -0
  93. /package/dist/commands/{project.d.ts → api/projects.d.ts} +0 -0
  94. /package/dist/commands/{sprint.d.ts → api/sprints.d.ts} +0 -0
  95. /package/dist/commands/{task.d.ts → api/tasks.d.ts} +0 -0
  96. /package/dist/commands/{user.d.ts → api/users.d.ts} +0 -0
@@ -0,0 +1,521 @@
1
+ import { Command } from "commander";
2
+ import chalk from "chalk";
3
+ import { api } from "../../lib/api.js";
4
+ import { printList, printDetail, handleError } from "../../lib/format.js";
5
+ const listCommand = new Command("list")
6
+ .description("List YouTube productions")
7
+ .option("--status <status>", "Filter by status")
8
+ .option("--brand <brand>", "Filter by brand")
9
+ .option("--search <query>", "Search")
10
+ .option("--json", "Output as JSON")
11
+ .action(async (opts) => {
12
+ try {
13
+ const params = new URLSearchParams();
14
+ if (opts.status)
15
+ params.set("status", opts.status);
16
+ if (opts.brand)
17
+ params.set("brand", opts.brand);
18
+ if (opts.search)
19
+ params.set("search", opts.search);
20
+ const qs = params.toString();
21
+ const data = await api.get(`/youtube-productions${qs ? `?${qs}` : ""}`);
22
+ printList(data, [
23
+ { key: "selectedTitle", label: "Title", width: 35 },
24
+ { key: "status", label: "Status", width: 14 },
25
+ { key: "brand", label: "Brand", width: 14 },
26
+ { key: "createdAt", label: "Created", width: 24 },
27
+ ], opts);
28
+ }
29
+ catch (err) {
30
+ handleError(err);
31
+ }
32
+ });
33
+ const getCommand = new Command("get")
34
+ .description("Get a YouTube production")
35
+ .argument("<id>", "Production ID")
36
+ .option("--json", "Output as JSON")
37
+ .action(async (id, opts) => {
38
+ try {
39
+ const data = await api.get(`/youtube-productions/${id}`);
40
+ if (opts.json) {
41
+ console.log(JSON.stringify(data, null, 2));
42
+ return;
43
+ }
44
+ console.log(chalk.bold(data.selectedTitle ?? data.rawIdea));
45
+ printDetail(data, [
46
+ { key: "id", label: "ID" },
47
+ { key: "status", label: "Status" },
48
+ { key: "brand", label: "Brand" },
49
+ { key: "audience", label: "Audience" },
50
+ { key: "selectedTitle", label: "Title" },
51
+ { key: "publishedUrl", label: "Published URL" },
52
+ { key: "publishedAt", label: "Published At" },
53
+ { key: "createdAt", label: "Created" },
54
+ { key: "updatedAt", label: "Updated" },
55
+ ], opts);
56
+ if (data.titles.length > 0) {
57
+ console.log(chalk.dim(`\n Titles (${data.titles.length}):`));
58
+ for (const t of data.titles)
59
+ console.log(` ${t.text}`);
60
+ }
61
+ }
62
+ catch (err) {
63
+ handleError(err);
64
+ }
65
+ });
66
+ const createCommand = new Command("create")
67
+ .description("Create a new YouTube production")
68
+ .requiredOption("--raw-idea <text>", "Raw idea")
69
+ .option("--status <status>", "Status")
70
+ .option("--brand <brand>", "Brand")
71
+ .option("--audience <text>", "Audience")
72
+ .option("--proof <text>", "Proof")
73
+ .option("--promise <text>", "Promise")
74
+ .option("--plan <text>", "Plan")
75
+ .option("--cta <text>", "CTA")
76
+ .option("--page <pageId>", "Linked page ID")
77
+ .option("--expected-duration <seconds>", "Expected duration", parseInt)
78
+ .option("--json", "Output as JSON")
79
+ .action(async (opts) => {
80
+ try {
81
+ const payload = { rawIdea: opts.rawIdea };
82
+ if (opts.status !== undefined)
83
+ payload.status = opts.status;
84
+ if (opts.brand !== undefined)
85
+ payload.brand = opts.brand;
86
+ if (opts.audience !== undefined)
87
+ payload.audience = opts.audience;
88
+ if (opts.proof !== undefined)
89
+ payload.proof = opts.proof;
90
+ if (opts.promise !== undefined)
91
+ payload.promise = opts.promise;
92
+ if (opts.plan !== undefined)
93
+ payload.plan = opts.plan;
94
+ if (opts.cta !== undefined)
95
+ payload.cta = opts.cta;
96
+ if (opts.page !== undefined)
97
+ payload.pageId = opts.page;
98
+ if (opts.expectedDuration != null)
99
+ payload.expectedDurationSeconds = opts.expectedDuration;
100
+ const data = await api.post("/youtube-productions", payload);
101
+ if (opts.json) {
102
+ console.log(JSON.stringify(data, null, 2));
103
+ }
104
+ else {
105
+ console.log(chalk.green("✓"), `Production created: ${chalk.bold(data.id)}`);
106
+ }
107
+ }
108
+ catch (err) {
109
+ handleError(err);
110
+ }
111
+ });
112
+ const updateCommand = new Command("update")
113
+ .description("Update a YouTube production")
114
+ .argument("<id>", "Production ID")
115
+ .option("--raw-idea <text>", "Raw idea")
116
+ .option("--status <status>", "Status")
117
+ .option("--brand <brand>", 'Brand ("null" to clear)')
118
+ .option("--audience <text>", "Audience")
119
+ .option("--proof <text>", "Proof")
120
+ .option("--promise <text>", "Promise")
121
+ .option("--plan <text>", "Plan")
122
+ .option("--cta <text>", "CTA")
123
+ .option("--page <pageId>", 'Linked page ID ("null" to clear)')
124
+ .option("--expected-duration <seconds>", "Expected duration", parseInt)
125
+ .option("--duration <seconds>", "Actual duration", parseInt)
126
+ .option("--published-url <url>", "Published URL")
127
+ .option("--published-at <iso>", "Published at (ISO)")
128
+ .option("--body-bullets <text>", "Body bullets")
129
+ .option("--body-script <text>", "Body script")
130
+ .option("--json", "Output as JSON")
131
+ .action(async (id, opts) => {
132
+ try {
133
+ const nullable = (v) => (v === "null" ? null : v);
134
+ const payload = {};
135
+ if (opts.rawIdea !== undefined)
136
+ payload.rawIdea = opts.rawIdea;
137
+ if (opts.status !== undefined)
138
+ payload.status = opts.status;
139
+ if (opts.brand !== undefined)
140
+ payload.brand = nullable(opts.brand);
141
+ if (opts.audience !== undefined)
142
+ payload.audience = opts.audience;
143
+ if (opts.proof !== undefined)
144
+ payload.proof = opts.proof;
145
+ if (opts.promise !== undefined)
146
+ payload.promise = opts.promise;
147
+ if (opts.plan !== undefined)
148
+ payload.plan = opts.plan;
149
+ if (opts.cta !== undefined)
150
+ payload.cta = opts.cta;
151
+ if (opts.page !== undefined)
152
+ payload.pageId = nullable(opts.page);
153
+ if (opts.expectedDuration != null)
154
+ payload.expectedDurationSeconds = opts.expectedDuration;
155
+ if (opts.duration != null)
156
+ payload.durationSeconds = opts.duration;
157
+ if (opts.publishedUrl !== undefined)
158
+ payload.publishedUrl = nullable(opts.publishedUrl);
159
+ if (opts.publishedAt !== undefined)
160
+ payload.publishedAt = nullable(opts.publishedAt);
161
+ if (opts.bodyBullets !== undefined)
162
+ payload.bodyBullets = opts.bodyBullets;
163
+ if (opts.bodyScript !== undefined)
164
+ payload.bodyScript = opts.bodyScript;
165
+ const data = await api.post(`/youtube-productions/${id}`, payload);
166
+ if (opts.json) {
167
+ console.log(JSON.stringify(data, null, 2));
168
+ }
169
+ else {
170
+ console.log(chalk.green("✓"), "Production updated");
171
+ }
172
+ }
173
+ catch (err) {
174
+ handleError(err);
175
+ }
176
+ });
177
+ const deleteCommand = new Command("delete")
178
+ .description("Delete a YouTube production")
179
+ .argument("<id>", "Production ID")
180
+ .option("--json", "Output as JSON")
181
+ .action(async (id, opts) => {
182
+ try {
183
+ await api.delete(`/youtube-productions/${id}`);
184
+ if (opts.json) {
185
+ console.log(JSON.stringify({ deleted: true, id }));
186
+ }
187
+ else {
188
+ console.log(chalk.green("✓"), "Production deleted");
189
+ }
190
+ }
191
+ catch (err) {
192
+ handleError(err);
193
+ }
194
+ });
195
+ const linkFolderCommand = new Command("link-folder")
196
+ .description("Link a folder to a production")
197
+ .argument("<id>", "Production ID")
198
+ .requiredOption("--folder <folderId>", "Folder ID")
199
+ .option("--json", "Output as JSON")
200
+ .action(async (id, opts) => {
201
+ try {
202
+ const data = await api.post(`/youtube-productions/${id}/folders`, {
203
+ folderId: opts.folder,
204
+ });
205
+ if (opts.json) {
206
+ console.log(JSON.stringify(data, null, 2));
207
+ }
208
+ else {
209
+ console.log(chalk.green("✓"), "Folder linked");
210
+ }
211
+ }
212
+ catch (err) {
213
+ handleError(err);
214
+ }
215
+ });
216
+ const unlinkFolderCommand = new Command("unlink-folder")
217
+ .description("Unlink a folder from a production")
218
+ .argument("<id>", "Production ID")
219
+ .requiredOption("--folder <folderId>", "Folder ID")
220
+ .option("--json", "Output as JSON")
221
+ .action(async (id, opts) => {
222
+ try {
223
+ await api.delete(`/youtube-productions/${id}/folders/${opts.folder}`);
224
+ if (opts.json) {
225
+ console.log(JSON.stringify({ unlinked: true }));
226
+ }
227
+ else {
228
+ console.log(chalk.green("✓"), "Folder unlinked");
229
+ }
230
+ }
231
+ catch (err) {
232
+ handleError(err);
233
+ }
234
+ });
235
+ const syncDefaultFoldersCommand = new Command("sync-default-folders")
236
+ .description("Sync default folders to a production")
237
+ .argument("<id>", "Production ID")
238
+ .option("--json", "Output as JSON")
239
+ .action(async (id, opts) => {
240
+ try {
241
+ const data = await api.post(`/youtube-productions/${id}/sync-default-folders`, {});
242
+ if (opts.json) {
243
+ console.log(JSON.stringify(data, null, 2));
244
+ }
245
+ else {
246
+ console.log(chalk.green("✓"), "Default folders synced");
247
+ }
248
+ }
249
+ catch (err) {
250
+ handleError(err);
251
+ }
252
+ });
253
+ const generateTitlesCommand = new Command("generate-titles")
254
+ .description("Queue a job to generate titles")
255
+ .argument("<id>", "Production ID")
256
+ .option("--json", "Output as JSON")
257
+ .action(async (id, opts) => {
258
+ try {
259
+ const job = await api.post(`/youtube-productions/${id}/generate-titles`, {});
260
+ if (opts.json)
261
+ console.log(JSON.stringify(job, null, 2));
262
+ else
263
+ console.log(chalk.green("✓"), `Title generation queued: ${chalk.bold(job.id)}`);
264
+ }
265
+ catch (err) {
266
+ handleError(err);
267
+ }
268
+ });
269
+ const clearTitlesCommand = new Command("clear-titles")
270
+ .description("Clear all generated titles")
271
+ .argument("<id>", "Production ID")
272
+ .option("--json", "Output as JSON")
273
+ .action(async (id, opts) => {
274
+ try {
275
+ const data = await api.delete(`/youtube-productions/${id}/titles`);
276
+ if (opts.json)
277
+ console.log(JSON.stringify(data, null, 2));
278
+ else
279
+ console.log(chalk.green("✓"), "Titles cleared");
280
+ }
281
+ catch (err) {
282
+ handleError(err);
283
+ }
284
+ });
285
+ const selectedTitleCommand = new Command("selected-title")
286
+ .description("Set the selected title")
287
+ .argument("<id>", "Production ID")
288
+ .argument("<title>", 'Title text ("null" to clear)')
289
+ .option("--json", "Output as JSON")
290
+ .action(async (id, title, opts) => {
291
+ try {
292
+ const value = title === "null" ? null : title;
293
+ const data = await api.post(`/youtube-productions/${id}/selected-title`, {
294
+ selectedTitle: value,
295
+ });
296
+ if (opts.json)
297
+ console.log(JSON.stringify(data, null, 2));
298
+ else
299
+ console.log(chalk.green("✓"), "Selected title updated");
300
+ }
301
+ catch (err) {
302
+ handleError(err);
303
+ }
304
+ });
305
+ const generate3pCommand = new Command("generate-3p")
306
+ .description("Queue a job to generate proof/promise/plan")
307
+ .argument("<id>", "Production ID")
308
+ .option("--json", "Output as JSON")
309
+ .action(async (id, opts) => {
310
+ try {
311
+ const job = await api.post(`/youtube-productions/${id}/generate-3p`, {});
312
+ if (opts.json)
313
+ console.log(JSON.stringify(job, null, 2));
314
+ else
315
+ console.log(chalk.green("✓"), `3P generation queued: ${chalk.bold(job.id)}`);
316
+ }
317
+ catch (err) {
318
+ handleError(err);
319
+ }
320
+ });
321
+ const generateFormatsCommand = new Command("generate-formats")
322
+ .description("Queue a job to generate formats")
323
+ .argument("<id>", "Production ID")
324
+ .option("--json", "Output as JSON")
325
+ .action(async (id, opts) => {
326
+ try {
327
+ const job = await api.post(`/youtube-productions/${id}/generate-formats`, {});
328
+ if (opts.json)
329
+ console.log(JSON.stringify(job, null, 2));
330
+ else
331
+ console.log(chalk.green("✓"), `Formats generation queued: ${chalk.bold(job.id)}`);
332
+ }
333
+ catch (err) {
334
+ handleError(err);
335
+ }
336
+ });
337
+ const generateBodyCommand = new Command("generate-body")
338
+ .description("Queue a job to generate the body")
339
+ .argument("<id>", "Production ID")
340
+ .option("--json", "Output as JSON")
341
+ .action(async (id, opts) => {
342
+ try {
343
+ const job = await api.post(`/youtube-productions/${id}/generate-body`, {});
344
+ if (opts.json)
345
+ console.log(JSON.stringify(job, null, 2));
346
+ else
347
+ console.log(chalk.green("✓"), `Body generation queued: ${chalk.bold(job.id)}`);
348
+ }
349
+ catch (err) {
350
+ handleError(err);
351
+ }
352
+ });
353
+ const rateCommand = new Command("rate")
354
+ .description("Queue a job to rate a production")
355
+ .argument("<id>", "Production ID")
356
+ .option("--json", "Output as JSON")
357
+ .action(async (id, opts) => {
358
+ try {
359
+ const job = await api.post(`/youtube-productions/${id}/rate`, {});
360
+ if (opts.json)
361
+ console.log(JSON.stringify(job, null, 2));
362
+ else
363
+ console.log(chalk.green("✓"), `Rating queued: ${chalk.bold(job.id)}`);
364
+ }
365
+ catch (err) {
366
+ handleError(err);
367
+ }
368
+ });
369
+ // --- comments subcommand ---
370
+ const commentListCommand = new Command("list")
371
+ .description("List comments on a production")
372
+ .argument("<productionId>", "Production ID")
373
+ .option("--json", "Output as JSON")
374
+ .action(async (productionId, opts) => {
375
+ try {
376
+ const data = await api.get(`/youtube-productions/${productionId}/comments`);
377
+ printList(data, [
378
+ { key: "id", label: "ID", width: 38 },
379
+ { key: "mode", label: "Mode", width: 14 },
380
+ { key: "status", label: "Status", width: 12 },
381
+ { key: "anchorText", label: "Anchor", width: 30 },
382
+ { key: "createdAt", label: "Created", width: 24 },
383
+ ], opts);
384
+ }
385
+ catch (err) {
386
+ handleError(err);
387
+ }
388
+ });
389
+ const commentCreateCommand = new Command("create")
390
+ .description("Create a comment on a production")
391
+ .argument("<productionId>", "Production ID")
392
+ .requiredOption("--mode <mode>", "Comment mode")
393
+ .requiredOption("--anchor-text <text>", "Anchor text")
394
+ .requiredOption("--message <text>", "Message body")
395
+ .option("--anchor-before <text>", "Text before the anchor")
396
+ .option("--anchor-after <text>", "Text after the anchor")
397
+ .option("--json", "Output as JSON")
398
+ .action(async (productionId, opts) => {
399
+ try {
400
+ const payload = {
401
+ mode: opts.mode,
402
+ anchorText: opts.anchorText,
403
+ message: opts.message,
404
+ };
405
+ if (opts.anchorBefore !== undefined)
406
+ payload.anchorBefore = opts.anchorBefore;
407
+ if (opts.anchorAfter !== undefined)
408
+ payload.anchorAfter = opts.anchorAfter;
409
+ const data = await api.post(`/youtube-productions/${productionId}/comments`, payload);
410
+ if (opts.json) {
411
+ console.log(JSON.stringify(data, null, 2));
412
+ }
413
+ else {
414
+ console.log(chalk.green("✓"), `Comment created: ${chalk.bold(data.id)}`);
415
+ }
416
+ }
417
+ catch (err) {
418
+ handleError(err);
419
+ }
420
+ });
421
+ const commentReplyCommand = new Command("reply")
422
+ .description("Reply to a comment")
423
+ .argument("<commentId>", "Comment ID")
424
+ .requiredOption("--message <text>", "Message body")
425
+ .option("--json", "Output as JSON")
426
+ .action(async (commentId, opts) => {
427
+ try {
428
+ const data = await api.post(`/youtube-productions/comments/${commentId}/messages`, { message: opts.message });
429
+ if (opts.json) {
430
+ console.log(JSON.stringify(data, null, 2));
431
+ }
432
+ else {
433
+ console.log(chalk.green("✓"), "Reply queued");
434
+ }
435
+ }
436
+ catch (err) {
437
+ handleError(err);
438
+ }
439
+ });
440
+ const commentApplyCommand = new Command("apply")
441
+ .description("Apply a suggested message from a comment")
442
+ .argument("<commentId>", "Comment ID")
443
+ .requiredOption("--message-id <id>", "Suggestion message ID")
444
+ .option("--json", "Output as JSON")
445
+ .action(async (commentId, opts) => {
446
+ try {
447
+ const data = await api.post(`/youtube-productions/comments/${commentId}/apply`, { messageId: opts.messageId });
448
+ if (opts.json) {
449
+ console.log(JSON.stringify(data, null, 2));
450
+ }
451
+ else {
452
+ console.log(chalk.green("✓"), "Suggestion applied");
453
+ }
454
+ }
455
+ catch (err) {
456
+ handleError(err);
457
+ }
458
+ });
459
+ const commentDismissCommand = new Command("dismiss")
460
+ .description("Dismiss a comment")
461
+ .argument("<commentId>", "Comment ID")
462
+ .option("--json", "Output as JSON")
463
+ .action(async (commentId, opts) => {
464
+ try {
465
+ const data = await api.post(`/youtube-productions/comments/${commentId}/dismiss`, {});
466
+ if (opts.json) {
467
+ console.log(JSON.stringify(data, null, 2));
468
+ }
469
+ else {
470
+ console.log(chalk.green("✓"), "Comment dismissed");
471
+ }
472
+ }
473
+ catch (err) {
474
+ handleError(err);
475
+ }
476
+ });
477
+ const commentDeleteCommand = new Command("delete")
478
+ .description("Delete a comment")
479
+ .argument("<commentId>", "Comment ID")
480
+ .option("--json", "Output as JSON")
481
+ .action(async (commentId, opts) => {
482
+ try {
483
+ await api.delete(`/youtube-productions/comments/${commentId}`);
484
+ if (opts.json) {
485
+ console.log(JSON.stringify({ deleted: true, id: commentId }));
486
+ }
487
+ else {
488
+ console.log(chalk.green("✓"), "Comment deleted");
489
+ }
490
+ }
491
+ catch (err) {
492
+ handleError(err);
493
+ }
494
+ });
495
+ const commentCommand = new Command("comment")
496
+ .description("Manage production comments")
497
+ .addCommand(commentListCommand)
498
+ .addCommand(commentCreateCommand)
499
+ .addCommand(commentReplyCommand)
500
+ .addCommand(commentApplyCommand)
501
+ .addCommand(commentDismissCommand)
502
+ .addCommand(commentDeleteCommand);
503
+ export const youtubeProductionCommand = new Command("youtube-production")
504
+ .description("Manage YouTube productions")
505
+ .addCommand(listCommand)
506
+ .addCommand(getCommand)
507
+ .addCommand(createCommand)
508
+ .addCommand(updateCommand)
509
+ .addCommand(deleteCommand)
510
+ .addCommand(linkFolderCommand)
511
+ .addCommand(unlinkFolderCommand)
512
+ .addCommand(syncDefaultFoldersCommand)
513
+ .addCommand(generateTitlesCommand)
514
+ .addCommand(clearTitlesCommand)
515
+ .addCommand(selectedTitleCommand)
516
+ .addCommand(generate3pCommand)
517
+ .addCommand(generateFormatsCommand)
518
+ .addCommand(generateBodyCommand)
519
+ .addCommand(rateCommand)
520
+ .addCommand(commentCommand);
521
+ //# sourceMappingURL=youtube-productions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"youtube-productions.js","sourceRoot":"","sources":["../../../src/commands/api/youtube-productions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AA6C1E,MAAM,WAAW,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC;KACpC,WAAW,CAAC,0BAA0B,CAAC;KACvC,MAAM,CAAC,mBAAmB,EAAE,kBAAkB,CAAC;KAC/C,MAAM,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;KAC5C,MAAM,CAAC,kBAAkB,EAAE,QAAQ,CAAC;KACpC,MAAM,CAAC,QAAQ,EAAE,gBAAgB,CAAC;KAClC,MAAM,CACL,KAAK,EAAE,IAKN,EAAE,EAAE;IACH,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,IAAI,eAAe,EAAE,CAAC;QACrC,IAAI,IAAI,CAAC,MAAM;YAAE,MAAM,CAAC,GAAG,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QACnD,IAAI,IAAI,CAAC,KAAK;YAAE,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;QAChD,IAAI,IAAI,CAAC,MAAM;YAAE,MAAM,CAAC,GAAG,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ACrC,UAAU,CAAC,qBAAqB,CAAC;KACjC,UAAU,CAAC,kBAAkB,CAAC;KAC9B,UAAU,CAAC,oBAAoB,CAAC;KAChC,UAAU,CAAC,iBAAiB,CAAC;KAC7B,UAAU,CAAC,sBAAsB,CAAC;KAClC,UAAU,CAAC,mBAAmB,CAAC;KAC/B,UAAU,CAAC,WAAW,CAAC;KACvB,UAAU,CAAC,cAAc,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { Command } from "commander";
2
+ export declare const youtubeVideoCommand: Command;
@@ -0,0 +1,111 @@
1
+ import { Command } from "commander";
2
+ import chalk from "chalk";
3
+ import { api } from "../../lib/api.js";
4
+ import { printList, printDetail, handleError } from "../../lib/format.js";
5
+ const listCommand = new Command("list")
6
+ .description("List YouTube videos")
7
+ .option("--json", "Output as JSON")
8
+ .action(async (opts) => {
9
+ try {
10
+ const data = await api.get("/youtube-videos");
11
+ printList(data, [
12
+ { key: "title", label: "Title", width: 35 },
13
+ { key: "status", label: "Status", width: 12 },
14
+ { key: "videoId", label: "Video ID", width: 14 },
15
+ { key: "createdAt", label: "Created", width: 24 },
16
+ ], opts);
17
+ }
18
+ catch (err) {
19
+ handleError(err);
20
+ }
21
+ });
22
+ const getCommand = new Command("get")
23
+ .description("Get a YouTube video record")
24
+ .argument("<id>", "Video ID")
25
+ .option("--json", "Output as JSON")
26
+ .action(async (id, opts) => {
27
+ try {
28
+ const data = await api.get(`/youtube-videos/${id}`);
29
+ if (opts.json) {
30
+ console.log(JSON.stringify(data, null, 2));
31
+ return;
32
+ }
33
+ console.log(chalk.bold(data.title ?? data.url));
34
+ printDetail(data, [
35
+ { key: "id", label: "ID" },
36
+ { key: "url", label: "URL" },
37
+ { key: "videoId", label: "Video ID" },
38
+ { key: "status", label: "Status" },
39
+ { key: "errorMessage", label: "Error" },
40
+ { key: "createdAt", label: "Created" },
41
+ ], opts);
42
+ }
43
+ catch (err) {
44
+ handleError(err);
45
+ }
46
+ });
47
+ const submitCommand = new Command("submit")
48
+ .description("Submit a YouTube video URL for ingestion")
49
+ .requiredOption("--url <url>", "Video URL")
50
+ .option("--json", "Output as JSON")
51
+ .action(async (opts) => {
52
+ try {
53
+ const data = await api.post("/youtube-videos", {
54
+ url: opts.url,
55
+ });
56
+ if (opts.json) {
57
+ console.log(JSON.stringify(data, null, 2));
58
+ }
59
+ else {
60
+ const verb = data.duplicate ? "Already submitted" : "Submitted";
61
+ console.log(chalk.green("✓"), `${verb}: ${chalk.bold(data.id)}`);
62
+ }
63
+ }
64
+ catch (err) {
65
+ handleError(err);
66
+ }
67
+ });
68
+ const retryCommand = new Command("retry")
69
+ .description("Retry a failed YouTube video ingestion")
70
+ .argument("<id>", "Video ID")
71
+ .option("--json", "Output as JSON")
72
+ .action(async (id, opts) => {
73
+ try {
74
+ const data = await api.post(`/youtube-videos/${id}/retry`, {});
75
+ if (opts.json) {
76
+ console.log(JSON.stringify(data, null, 2));
77
+ }
78
+ else {
79
+ console.log(chalk.green("✓"), "Video ingestion requeued");
80
+ }
81
+ }
82
+ catch (err) {
83
+ handleError(err);
84
+ }
85
+ });
86
+ const deleteCommand = new Command("delete")
87
+ .description("Delete a YouTube video record")
88
+ .argument("<id>", "Video ID")
89
+ .option("--json", "Output as JSON")
90
+ .action(async (id, opts) => {
91
+ try {
92
+ await api.delete(`/youtube-videos/${id}`);
93
+ if (opts.json) {
94
+ console.log(JSON.stringify({ deleted: true, id }));
95
+ }
96
+ else {
97
+ console.log(chalk.green("✓"), "Video deleted");
98
+ }
99
+ }
100
+ catch (err) {
101
+ handleError(err);
102
+ }
103
+ });
104
+ export const youtubeVideoCommand = new Command("youtube-video")
105
+ .description("Manage ingested YouTube videos")
106
+ .addCommand(listCommand)
107
+ .addCommand(getCommand)
108
+ .addCommand(submitCommand)
109
+ .addCommand(retryCommand)
110
+ .addCommand(deleteCommand);
111
+ //# sourceMappingURL=youtube-videos.js.map