ugcinc 3.32.9 → 3.33.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/dist/automations.d.ts +1 -1
- package/dist/automations.js +137 -140
- package/dist/types.d.ts +2 -2
- package/package.json +1 -1
package/dist/automations.d.ts
CHANGED
|
@@ -177,7 +177,7 @@ export declare function getNodeByType(type: string): NodeControlConfig | undefin
|
|
|
177
177
|
* Get the schema of array items for a node's output port.
|
|
178
178
|
* Returns null if schema is unknown or the output is not an array.
|
|
179
179
|
*
|
|
180
|
-
* @param nodeType - The type of the node (e.g., 'transcript', '
|
|
180
|
+
* @param nodeType - The type of the node (e.g., 'transcript', 'llm')
|
|
181
181
|
* @param nodeConfig - The node's configuration object
|
|
182
182
|
* @param outputPortId - The ID of the output port to get schema for
|
|
183
183
|
* @returns The schema of array items, or null if unknown
|
package/dist/automations.js
CHANGED
|
@@ -193,8 +193,29 @@ exports.AutomationsClient = AutomationsClient;
|
|
|
193
193
|
*/
|
|
194
194
|
function getAllNodes() {
|
|
195
195
|
return [
|
|
196
|
+
// === Trigger nodes ===
|
|
197
|
+
{
|
|
198
|
+
type: "recurrence",
|
|
199
|
+
label: "Recurring",
|
|
200
|
+
description: "Run continuously",
|
|
201
|
+
category: "Triggers",
|
|
202
|
+
nodeCategory: "trigger",
|
|
203
|
+
inputs: [],
|
|
204
|
+
outputs: [],
|
|
205
|
+
isInitializer: true,
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
type: "manual-trigger",
|
|
209
|
+
label: "Manual Trigger",
|
|
210
|
+
description: "Trigger manually",
|
|
211
|
+
category: "Triggers",
|
|
212
|
+
nodeCategory: "trigger",
|
|
213
|
+
inputs: [],
|
|
214
|
+
// Dynamic outputs based on manualTriggerConfig.outputs
|
|
215
|
+
outputs: [],
|
|
216
|
+
isInitializer: true,
|
|
217
|
+
},
|
|
196
218
|
// === Source nodes ===
|
|
197
|
-
// Media first (consolidated node), then other sources
|
|
198
219
|
{
|
|
199
220
|
type: "media",
|
|
200
221
|
label: "Media",
|
|
@@ -205,19 +226,25 @@ function getAllNodes() {
|
|
|
205
226
|
outputs: [], // Dynamic based on enabledTypes config
|
|
206
227
|
},
|
|
207
228
|
{
|
|
208
|
-
type: "
|
|
209
|
-
label: "
|
|
210
|
-
description: "
|
|
229
|
+
type: "video-import",
|
|
230
|
+
label: "Import Video",
|
|
231
|
+
description: "Import videos from YouTube, TikTok, Instagram & more",
|
|
211
232
|
category: "Sources",
|
|
212
233
|
nodeCategory: "source",
|
|
213
|
-
inputs: [
|
|
214
|
-
outputs: [
|
|
234
|
+
inputs: [
|
|
215
235
|
{
|
|
216
|
-
id: "
|
|
236
|
+
id: "url",
|
|
217
237
|
type: "text",
|
|
218
238
|
required: true,
|
|
219
239
|
},
|
|
220
240
|
],
|
|
241
|
+
outputs: [
|
|
242
|
+
{
|
|
243
|
+
id: "video",
|
|
244
|
+
type: "video",
|
|
245
|
+
required: true,
|
|
246
|
+
},
|
|
247
|
+
],
|
|
221
248
|
},
|
|
222
249
|
{
|
|
223
250
|
type: "account",
|
|
@@ -235,22 +262,16 @@ function getAllNodes() {
|
|
|
235
262
|
],
|
|
236
263
|
},
|
|
237
264
|
{
|
|
238
|
-
type: "
|
|
239
|
-
label: "
|
|
240
|
-
description: "
|
|
265
|
+
type: "text",
|
|
266
|
+
label: "Text",
|
|
267
|
+
description: "Use text collections",
|
|
241
268
|
category: "Sources",
|
|
242
269
|
nodeCategory: "source",
|
|
243
|
-
inputs: [
|
|
244
|
-
{
|
|
245
|
-
id: "url",
|
|
246
|
-
type: "text",
|
|
247
|
-
required: true,
|
|
248
|
-
},
|
|
249
|
-
],
|
|
270
|
+
inputs: [], // Dynamic inputs based on template variables
|
|
250
271
|
outputs: [
|
|
251
272
|
{
|
|
252
|
-
id: "
|
|
253
|
-
type: "
|
|
273
|
+
id: "text",
|
|
274
|
+
type: "text",
|
|
254
275
|
required: true,
|
|
255
276
|
},
|
|
256
277
|
],
|
|
@@ -293,9 +314,50 @@ function getAllNodes() {
|
|
|
293
314
|
],
|
|
294
315
|
},
|
|
295
316
|
{
|
|
296
|
-
type: "
|
|
297
|
-
label: "
|
|
298
|
-
description: "
|
|
317
|
+
type: "compose-workflow",
|
|
318
|
+
label: "Compose Workflow",
|
|
319
|
+
description: "Embed other workflows",
|
|
320
|
+
category: "Generation",
|
|
321
|
+
nodeCategory: "generator",
|
|
322
|
+
// Inputs and outputs are dynamic based on the embedded workflow
|
|
323
|
+
inputs: [],
|
|
324
|
+
outputs: [],
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
type: "transcript",
|
|
328
|
+
label: "Transcribe",
|
|
329
|
+
description: "Transcribe video or audio with timestamps",
|
|
330
|
+
category: "Generation",
|
|
331
|
+
nodeCategory: "generator",
|
|
332
|
+
inputs: [
|
|
333
|
+
{
|
|
334
|
+
id: "media",
|
|
335
|
+
type: ["video", "audio"],
|
|
336
|
+
required: true,
|
|
337
|
+
},
|
|
338
|
+
],
|
|
339
|
+
outputs: [
|
|
340
|
+
{
|
|
341
|
+
id: "text",
|
|
342
|
+
type: "text",
|
|
343
|
+
required: true,
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
id: "segments",
|
|
347
|
+
type: "object",
|
|
348
|
+
required: true,
|
|
349
|
+
itemSchema: {
|
|
350
|
+
text: { type: 'string' },
|
|
351
|
+
start: { type: 'number' },
|
|
352
|
+
end: { type: 'number' },
|
|
353
|
+
},
|
|
354
|
+
},
|
|
355
|
+
],
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
type: "auto-caption",
|
|
359
|
+
label: "Auto Caption",
|
|
360
|
+
description: "Add TikTok-style captions to videos",
|
|
299
361
|
category: "Generation",
|
|
300
362
|
nodeCategory: "generator",
|
|
301
363
|
inputs: [
|
|
@@ -335,20 +397,42 @@ function getAllNodes() {
|
|
|
335
397
|
],
|
|
336
398
|
},
|
|
337
399
|
{
|
|
338
|
-
type: "
|
|
339
|
-
label: "
|
|
340
|
-
description: "
|
|
400
|
+
type: "deduplicate",
|
|
401
|
+
label: "Mass Repost",
|
|
402
|
+
description: "Make videos unique for safe reposting",
|
|
341
403
|
category: "Generation",
|
|
342
404
|
nodeCategory: "generator",
|
|
343
|
-
|
|
405
|
+
inputs: [
|
|
406
|
+
{
|
|
407
|
+
id: "video",
|
|
408
|
+
type: "video",
|
|
409
|
+
required: true,
|
|
410
|
+
},
|
|
411
|
+
],
|
|
412
|
+
outputs: [
|
|
413
|
+
{
|
|
414
|
+
id: "output",
|
|
415
|
+
type: "video",
|
|
416
|
+
required: true,
|
|
417
|
+
},
|
|
418
|
+
],
|
|
419
|
+
},
|
|
420
|
+
// === AI nodes ===
|
|
421
|
+
{
|
|
422
|
+
type: "llm",
|
|
423
|
+
label: "LLM",
|
|
424
|
+
description: "Generate LLM output",
|
|
425
|
+
category: "AI Generation",
|
|
426
|
+
nodeCategory: "generator",
|
|
427
|
+
// Dynamic inputs: extracted from systemPrompt {{variables}} + media refs
|
|
344
428
|
inputs: [],
|
|
429
|
+
// Dynamic outputs: based on outputFields config
|
|
345
430
|
outputs: [],
|
|
346
431
|
},
|
|
347
|
-
// === AI nodes ===
|
|
348
432
|
{
|
|
349
|
-
type: "generate-
|
|
350
|
-
label: "Generate
|
|
351
|
-
description: "Generate
|
|
433
|
+
type: "generate-video",
|
|
434
|
+
label: "Generate Video",
|
|
435
|
+
description: "Generate videos with AI",
|
|
352
436
|
category: "AI Generation",
|
|
353
437
|
nodeCategory: "generator",
|
|
354
438
|
inputs: [
|
|
@@ -357,20 +441,20 @@ function getAllNodes() {
|
|
|
357
441
|
type: "text",
|
|
358
442
|
required: true,
|
|
359
443
|
},
|
|
360
|
-
// Image input is dynamically added for
|
|
444
|
+
// Image input is dynamically added for image-to-video models
|
|
361
445
|
],
|
|
362
446
|
outputs: [
|
|
363
447
|
{
|
|
364
448
|
id: "output",
|
|
365
|
-
type: "
|
|
449
|
+
type: "video",
|
|
366
450
|
required: true,
|
|
367
451
|
},
|
|
368
452
|
],
|
|
369
453
|
},
|
|
370
454
|
{
|
|
371
|
-
type: "generate-
|
|
372
|
-
label: "Generate
|
|
373
|
-
description: "Generate
|
|
455
|
+
type: "generate-image",
|
|
456
|
+
label: "Generate Image",
|
|
457
|
+
description: "Generate images with AI",
|
|
374
458
|
category: "AI Generation",
|
|
375
459
|
nodeCategory: "generator",
|
|
376
460
|
inputs: [
|
|
@@ -379,12 +463,12 @@ function getAllNodes() {
|
|
|
379
463
|
type: "text",
|
|
380
464
|
required: true,
|
|
381
465
|
},
|
|
382
|
-
// Image input is dynamically added for
|
|
466
|
+
// Image input is dynamically added for edit models
|
|
383
467
|
],
|
|
384
468
|
outputs: [
|
|
385
469
|
{
|
|
386
470
|
id: "output",
|
|
387
|
-
type: "
|
|
471
|
+
type: "image",
|
|
388
472
|
required: true,
|
|
389
473
|
},
|
|
390
474
|
],
|
|
@@ -400,38 +484,22 @@ function getAllNodes() {
|
|
|
400
484
|
// Dynamic output based on model's output type
|
|
401
485
|
outputs: [],
|
|
402
486
|
},
|
|
487
|
+
// === Control Flow ===
|
|
403
488
|
{
|
|
404
|
-
type: "
|
|
405
|
-
label: "
|
|
406
|
-
description: "
|
|
407
|
-
category: "
|
|
489
|
+
type: "for-each",
|
|
490
|
+
label: "For Each",
|
|
491
|
+
description: "Iterate over an array, executing downstream nodes for each item",
|
|
492
|
+
category: "Control Flow",
|
|
408
493
|
nodeCategory: "generator",
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
label: "Manual Trigger",
|
|
418
|
-
description: "Trigger manually",
|
|
419
|
-
category: "Triggers",
|
|
420
|
-
nodeCategory: "trigger",
|
|
421
|
-
inputs: [],
|
|
422
|
-
// Dynamic outputs based on manualTriggerConfig.outputs
|
|
423
|
-
outputs: [],
|
|
424
|
-
isInitializer: true,
|
|
425
|
-
},
|
|
426
|
-
{
|
|
427
|
-
type: "recurrence",
|
|
428
|
-
label: "Recurring",
|
|
429
|
-
description: "Run continuously",
|
|
430
|
-
category: "Triggers",
|
|
431
|
-
nodeCategory: "trigger",
|
|
432
|
-
inputs: [],
|
|
494
|
+
inputs: [
|
|
495
|
+
{
|
|
496
|
+
id: "array",
|
|
497
|
+
type: "object",
|
|
498
|
+
required: true,
|
|
499
|
+
},
|
|
500
|
+
],
|
|
501
|
+
// Dynamic outputs based on forEachConfig (exposeItem, exposeIndex, outputProperties, inputPorts)
|
|
433
502
|
outputs: [],
|
|
434
|
-
isInitializer: true,
|
|
435
503
|
},
|
|
436
504
|
// === Terminal nodes ===
|
|
437
505
|
{
|
|
@@ -487,77 +555,6 @@ function getAllNodes() {
|
|
|
487
555
|
],
|
|
488
556
|
outputs: [],
|
|
489
557
|
},
|
|
490
|
-
// === Control Flow ===
|
|
491
|
-
{
|
|
492
|
-
type: "for-each",
|
|
493
|
-
label: "For Each",
|
|
494
|
-
description: "Iterate over an array, executing downstream nodes for each item",
|
|
495
|
-
category: "Control Flow",
|
|
496
|
-
nodeCategory: "generator",
|
|
497
|
-
inputs: [
|
|
498
|
-
{
|
|
499
|
-
id: "array",
|
|
500
|
-
type: "object",
|
|
501
|
-
required: true,
|
|
502
|
-
},
|
|
503
|
-
],
|
|
504
|
-
// Dynamic outputs based on forEachConfig (exposeItem, exposeIndex, outputProperties, inputPorts)
|
|
505
|
-
outputs: [],
|
|
506
|
-
},
|
|
507
|
-
// === Transcript ===
|
|
508
|
-
{
|
|
509
|
-
type: "transcript",
|
|
510
|
-
label: "Transcribe",
|
|
511
|
-
description: "Transcribe video or audio with timestamps",
|
|
512
|
-
category: "AI Generation",
|
|
513
|
-
nodeCategory: "generator",
|
|
514
|
-
inputs: [
|
|
515
|
-
{
|
|
516
|
-
id: "media",
|
|
517
|
-
type: ["video", "audio"],
|
|
518
|
-
required: true,
|
|
519
|
-
},
|
|
520
|
-
],
|
|
521
|
-
outputs: [
|
|
522
|
-
{
|
|
523
|
-
id: "text",
|
|
524
|
-
type: "text",
|
|
525
|
-
required: true,
|
|
526
|
-
},
|
|
527
|
-
{
|
|
528
|
-
id: "segments",
|
|
529
|
-
type: "object",
|
|
530
|
-
required: true,
|
|
531
|
-
itemSchema: {
|
|
532
|
-
text: { type: 'string' },
|
|
533
|
-
start: { type: 'number' },
|
|
534
|
-
end: { type: 'number' },
|
|
535
|
-
},
|
|
536
|
-
},
|
|
537
|
-
],
|
|
538
|
-
},
|
|
539
|
-
// === Auto Caption ===
|
|
540
|
-
{
|
|
541
|
-
type: "auto-caption",
|
|
542
|
-
label: "Auto Caption",
|
|
543
|
-
description: "Add TikTok-style captions to videos",
|
|
544
|
-
category: "Generation",
|
|
545
|
-
nodeCategory: "generator",
|
|
546
|
-
inputs: [
|
|
547
|
-
{
|
|
548
|
-
id: "video",
|
|
549
|
-
type: "video",
|
|
550
|
-
required: true,
|
|
551
|
-
},
|
|
552
|
-
],
|
|
553
|
-
outputs: [
|
|
554
|
-
{
|
|
555
|
-
id: "output",
|
|
556
|
-
type: "video",
|
|
557
|
-
required: true,
|
|
558
|
-
},
|
|
559
|
-
],
|
|
560
|
-
},
|
|
561
558
|
];
|
|
562
559
|
}
|
|
563
560
|
/**
|
|
@@ -609,7 +606,7 @@ function llmObjectSchemaToPropertySchema(fields) {
|
|
|
609
606
|
* Get the schema of array items for a node's output port.
|
|
610
607
|
* Returns null if schema is unknown or the output is not an array.
|
|
611
608
|
*
|
|
612
|
-
* @param nodeType - The type of the node (e.g., 'transcript', '
|
|
609
|
+
* @param nodeType - The type of the node (e.g., 'transcript', 'llm')
|
|
613
610
|
* @param nodeConfig - The node's configuration object
|
|
614
611
|
* @param outputPortId - The ID of the output port to get schema for
|
|
615
612
|
* @returns The schema of array items, or null if unknown
|
|
@@ -621,8 +618,8 @@ function getOutputSchema(nodeType, nodeConfig, outputPortId) {
|
|
|
621
618
|
if (outputPort?.itemSchema) {
|
|
622
619
|
return outputPort.itemSchema;
|
|
623
620
|
}
|
|
624
|
-
// For
|
|
625
|
-
if (nodeType === '
|
|
621
|
+
// For LLM nodes, derive from outputFields config
|
|
622
|
+
if (nodeType === 'llm' && nodeConfig) {
|
|
626
623
|
const llmConfig = nodeConfig.llm;
|
|
627
624
|
const outputFields = llmConfig?.outputFields;
|
|
628
625
|
if (outputFields) {
|
package/dist/types.d.ts
CHANGED
|
@@ -806,7 +806,7 @@ export interface NodePort {
|
|
|
806
806
|
* Functional category for automation nodes
|
|
807
807
|
* - trigger: Nodes that start an automation (manual-trigger, recurrence)
|
|
808
808
|
* - source: Nodes that provide input data (image, video, audio, social-audio, text, account)
|
|
809
|
-
* - generator: Nodes that transform or generate content (image-composer, video-composer, generate-image,
|
|
809
|
+
* - generator: Nodes that transform or generate content (image-composer, video-composer, generate-image, llm, compose-workflow)
|
|
810
810
|
* - terminal: Nodes that end an automation (output, auto-post, save-to-media)
|
|
811
811
|
*/
|
|
812
812
|
export type NodeCategory = 'trigger' | 'source' | 'generator' | 'terminal';
|
|
@@ -833,7 +833,7 @@ export interface NodeControlConfig {
|
|
|
833
833
|
*/
|
|
834
834
|
isInitializer?: boolean;
|
|
835
835
|
}
|
|
836
|
-
export type NodeTypeEnum = 'social-audio' | 'text' | 'media' | 'video-import' | 'image-composer' | 'video-composer' | 'generate-image' | 'generate-video' | 'custom-model' | '
|
|
836
|
+
export type NodeTypeEnum = 'social-audio' | 'text' | 'media' | 'video-import' | 'image-composer' | 'video-composer' | 'generate-image' | 'generate-video' | 'custom-model' | 'llm' | 'output' | 'manual-trigger' | 'recurrence' | 'compose-workflow' | 'account' | 'auto-post' | 'save-to-media' | 'deduplicate' | 'for-each' | 'transcript' | 'auto-caption' | 'screenshot-animation';
|
|
837
837
|
export interface OutputSchemaProperty {
|
|
838
838
|
type: 'string' | 'number' | 'boolean' | 'array' | 'object';
|
|
839
839
|
items?: 'string' | 'number' | 'boolean';
|