ugcinc 4.0.2 → 4.1.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.
Files changed (161) hide show
  1. package/dist/accounts.d.ts +146 -1
  2. package/dist/automations/index.d.ts +174 -0
  3. package/dist/automations/index.js +194 -0
  4. package/dist/automations/nodes/account.d.ts +6 -0
  5. package/dist/automations/nodes/account.js +28 -0
  6. package/dist/automations/nodes/auto-caption.d.ts +23 -0
  7. package/dist/automations/nodes/auto-caption.js +49 -0
  8. package/dist/automations/nodes/auto-post.d.ts +22 -0
  9. package/dist/automations/nodes/auto-post.js +52 -0
  10. package/dist/automations/nodes/branch.d.ts +21 -0
  11. package/dist/automations/nodes/branch.js +46 -0
  12. package/dist/automations/nodes/collect.d.ts +7 -0
  13. package/dist/automations/nodes/collect.js +51 -0
  14. package/dist/automations/nodes/compose-workflow.d.ts +8 -0
  15. package/dist/automations/nodes/compose-workflow.js +61 -0
  16. package/dist/automations/nodes/create-dm.d.ts +35 -0
  17. package/dist/automations/nodes/create-dm.js +86 -0
  18. package/dist/automations/nodes/custom-model.d.ts +18 -0
  19. package/dist/automations/nodes/custom-model.js +52 -0
  20. package/dist/automations/nodes/deduplicate.d.ts +7 -0
  21. package/dist/automations/nodes/deduplicate.js +36 -0
  22. package/dist/automations/nodes/destructure.d.ts +25 -0
  23. package/dist/automations/nodes/destructure.js +65 -0
  24. package/dist/automations/nodes/for-each.d.ts +22 -0
  25. package/dist/automations/nodes/for-each.js +84 -0
  26. package/dist/automations/nodes/generate-image.d.ts +15 -0
  27. package/dist/automations/nodes/generate-image.js +45 -0
  28. package/dist/automations/nodes/generate-video.d.ts +15 -0
  29. package/dist/automations/nodes/generate-video.js +45 -0
  30. package/dist/automations/nodes/if.d.ts +21 -0
  31. package/dist/automations/nodes/if.js +44 -0
  32. package/dist/automations/nodes/image-composer.d.ts +46 -0
  33. package/dist/automations/nodes/image-composer.js +135 -0
  34. package/dist/automations/nodes/index.d.ts +312 -0
  35. package/dist/automations/nodes/index.js +92 -0
  36. package/dist/automations/nodes/internal.d.ts +8 -0
  37. package/dist/automations/nodes/internal.js +10 -0
  38. package/dist/automations/nodes/llm.d.ts +26 -0
  39. package/dist/automations/nodes/llm.js +85 -0
  40. package/dist/automations/nodes/manual-trigger.d.ts +14 -0
  41. package/dist/automations/nodes/manual-trigger.js +32 -0
  42. package/dist/automations/nodes/media.d.ts +13 -0
  43. package/dist/automations/nodes/media.js +40 -0
  44. package/dist/automations/nodes/not.d.ts +5 -0
  45. package/dist/automations/nodes/not.js +35 -0
  46. package/dist/automations/nodes/output.d.ts +16 -0
  47. package/dist/automations/nodes/output.js +32 -0
  48. package/dist/automations/nodes/random-route.d.ts +24 -0
  49. package/dist/automations/nodes/random-route.js +53 -0
  50. package/dist/automations/nodes/random.d.ts +16 -0
  51. package/dist/automations/nodes/random.js +50 -0
  52. package/dist/automations/nodes/recurrence.d.ts +29 -0
  53. package/dist/automations/nodes/recurrence.js +50 -0
  54. package/dist/automations/nodes/save-to-media.d.ts +15 -0
  55. package/dist/automations/nodes/save-to-media.js +31 -0
  56. package/dist/automations/nodes/screenshot-animation.d.ts +6 -0
  57. package/dist/automations/nodes/screenshot-animation.js +36 -0
  58. package/dist/automations/nodes/social-audio.d.ts +7 -0
  59. package/dist/automations/nodes/social-audio.js +30 -0
  60. package/dist/automations/nodes/text.d.ts +6 -0
  61. package/dist/automations/nodes/text.js +41 -0
  62. package/dist/automations/nodes/transcript.d.ts +5 -0
  63. package/dist/automations/nodes/transcript.js +46 -0
  64. package/dist/automations/nodes/types.d.ts +202 -0
  65. package/dist/automations/nodes/types.js +22 -0
  66. package/dist/automations/nodes/video-composer.d.ts +16 -0
  67. package/dist/automations/nodes/video-composer.js +117 -0
  68. package/dist/automations/nodes/video-import.d.ts +9 -0
  69. package/dist/automations/nodes/video-import.js +23 -0
  70. package/dist/automations/types.d.ts +431 -0
  71. package/dist/automations/types.js +29 -0
  72. package/dist/automations.d.ts +5 -33
  73. package/dist/automations.js +6 -647
  74. package/dist/comments.d.ts +26 -1
  75. package/dist/comments.js +3 -0
  76. package/dist/graph-controller.d.ts +211 -0
  77. package/dist/graph-controller.js +656 -0
  78. package/dist/index.d.ts +22 -9
  79. package/dist/index.js +47 -24
  80. package/dist/internal-utils.d.ts +8 -0
  81. package/dist/internal-utils.js +22 -0
  82. package/dist/media.d.ts +135 -1
  83. package/dist/nodes/account.d.ts +7 -0
  84. package/dist/nodes/account.js +29 -0
  85. package/dist/nodes/auto-caption.d.ts +17 -0
  86. package/dist/nodes/auto-caption.js +46 -0
  87. package/dist/nodes/auto-post.d.ts +21 -0
  88. package/dist/nodes/auto-post.js +54 -0
  89. package/dist/nodes/branch.d.ts +12 -0
  90. package/dist/nodes/branch.js +50 -0
  91. package/dist/nodes/collect.d.ts +6 -0
  92. package/dist/nodes/collect.js +56 -0
  93. package/dist/nodes/compose-workflow.d.ts +21 -0
  94. package/dist/nodes/compose-workflow.js +42 -0
  95. package/dist/nodes/create-dm.d.ts +40 -0
  96. package/dist/nodes/create-dm.js +88 -0
  97. package/dist/nodes/custom-model.d.ts +19 -0
  98. package/dist/nodes/custom-model.js +52 -0
  99. package/dist/nodes/deduplicate.d.ts +8 -0
  100. package/dist/nodes/deduplicate.js +36 -0
  101. package/dist/nodes/destructure.d.ts +25 -0
  102. package/dist/nodes/destructure.js +65 -0
  103. package/dist/nodes/for-each.d.ts +23 -0
  104. package/dist/nodes/for-each.js +84 -0
  105. package/dist/nodes/generate-image.d.ts +16 -0
  106. package/dist/nodes/generate-image.js +45 -0
  107. package/dist/nodes/generate-video.d.ts +16 -0
  108. package/dist/nodes/generate-video.js +45 -0
  109. package/dist/nodes/if.d.ts +22 -0
  110. package/dist/nodes/if.js +44 -0
  111. package/dist/nodes/image-composer.d.ts +14 -0
  112. package/dist/nodes/image-composer.js +95 -0
  113. package/dist/nodes/index.d.ts +20 -0
  114. package/dist/nodes/index.js +93 -0
  115. package/dist/nodes/llm.d.ts +27 -0
  116. package/dist/nodes/llm.js +85 -0
  117. package/dist/nodes/manual-trigger.d.ts +16 -0
  118. package/dist/nodes/manual-trigger.js +32 -0
  119. package/dist/nodes/media.d.ts +17 -0
  120. package/dist/nodes/media.js +40 -0
  121. package/dist/nodes/not.d.ts +6 -0
  122. package/dist/nodes/not.js +35 -0
  123. package/dist/nodes/output.d.ts +9 -0
  124. package/dist/nodes/output.js +32 -0
  125. package/dist/nodes/random-route.d.ts +3 -0
  126. package/dist/nodes/random-route.js +50 -0
  127. package/dist/nodes/random.d.ts +3 -0
  128. package/dist/nodes/random.js +48 -0
  129. package/dist/nodes/recurrence.d.ts +3 -0
  130. package/dist/nodes/recurrence.js +45 -0
  131. package/dist/nodes/save-to-media.d.ts +3 -0
  132. package/dist/nodes/save-to-media.js +26 -0
  133. package/dist/nodes/screenshot-animation.d.ts +7 -0
  134. package/dist/nodes/screenshot-animation.js +36 -0
  135. package/dist/nodes/social-audio.d.ts +3 -0
  136. package/dist/nodes/social-audio.js +26 -0
  137. package/dist/nodes/text.d.ts +3 -0
  138. package/dist/nodes/text.js +38 -0
  139. package/dist/nodes/transcript.d.ts +3 -0
  140. package/dist/nodes/transcript.js +42 -0
  141. package/dist/nodes/types.d.ts +146 -0
  142. package/dist/nodes/types.js +22 -0
  143. package/dist/nodes/video-composer.d.ts +3 -0
  144. package/dist/nodes/video-composer.js +67 -0
  145. package/dist/nodes/video-import.d.ts +3 -0
  146. package/dist/nodes/video-import.js +35 -0
  147. package/dist/org.d.ts +13 -1
  148. package/dist/ports.js +3 -9
  149. package/dist/posts.d.ts +88 -1
  150. package/dist/render/compositions/IMessageDmComposition/types.d.ts +24 -24
  151. package/dist/render/compositions/ImageEditorComposition.js +2 -8
  152. package/dist/render/compositions/VideoEditorComposition.js +2 -24
  153. package/dist/render/types/element.d.ts +0 -33
  154. package/dist/render/types/index.d.ts +1 -1
  155. package/dist/render/types/video.d.ts +2 -2
  156. package/dist/render.d.ts +2 -1
  157. package/dist/stats.d.ts +128 -1
  158. package/dist/tasks.d.ts +20 -1
  159. package/dist/types.d.ts +1 -2216
  160. package/dist/types.js +2 -124
  161. package/package.json +1 -1
@@ -0,0 +1,16 @@
1
+ import type { BasePortType } from '../types';
2
+ import { type ObjectSchemaField } from './types';
3
+ export interface OutputInput {
4
+ id: string;
5
+ type: BasePortType;
6
+ tag?: string;
7
+ isArray?: boolean;
8
+ objectSchema?: ObjectSchemaField[];
9
+ }
10
+ declare const definition: import("./types").NodeDefinition<"terminal", {
11
+ inputs: OutputInput[];
12
+ mainPreviewInputId: string | undefined;
13
+ outputMode: null;
14
+ selectionMode: null;
15
+ }, false>;
16
+ export default definition;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const types_1 = require("./types");
4
+ const definition = (0, types_1.defineNode)({
5
+ nodeId: 'passthrough',
6
+ label: 'Pass-Through',
7
+ description: 'Pass data to parent workflow',
8
+ type: 'terminal',
9
+ category: 'Output',
10
+ outputModes: null,
11
+ selectionModes: null,
12
+ defaults: {
13
+ inputs: [{ id: 'result', type: 'image' }],
14
+ mainPreviewInputId: undefined,
15
+ outputMode: null,
16
+ selectionMode: null,
17
+ },
18
+ computePorts: ({ config }) => {
19
+ const configInputs = config?.inputs ?? [];
20
+ const inputs = configInputs.map(input => ({
21
+ id: input.id,
22
+ type: input.type,
23
+ isArray: input.isArray ?? false,
24
+ required: false,
25
+ }));
26
+ return {
27
+ inputs,
28
+ outputs: [],
29
+ };
30
+ },
31
+ });
32
+ exports.default = definition;
@@ -0,0 +1,24 @@
1
+ import { type InputType } from './types';
2
+ export interface RandomRouteBranch {
3
+ id: string;
4
+ probability: number;
5
+ }
6
+ export interface RandomRouteObjectField {
7
+ name: string;
8
+ type: 'string' | 'number' | 'boolean';
9
+ }
10
+ export interface RandomRoutePassthroughInput {
11
+ id: string;
12
+ type: 'image' | 'video' | 'audio' | 'text' | 'number' | 'boolean' | 'account' | 'object';
13
+ isArray?: boolean;
14
+ inputType?: InputType;
15
+ defaultValue?: unknown;
16
+ objectSchema?: RandomRouteObjectField[];
17
+ }
18
+ declare const definition: import("./types").NodeDefinition<"generator", {
19
+ branches: RandomRouteBranch[];
20
+ passthroughInputs: RandomRoutePassthroughInput[];
21
+ outputMode: "single";
22
+ selectionMode: null;
23
+ }, false>;
24
+ export default definition;
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const types_1 = require("./types");
4
+ const definition = (0, types_1.defineNode)({
5
+ nodeId: 'random-route',
6
+ label: 'Random Branch',
7
+ description: 'Route inputs to a randomly selected branch',
8
+ type: 'generator',
9
+ category: 'Control Flow',
10
+ outputModes: ['per-input', 'single'],
11
+ selectionModes: null,
12
+ defaults: {
13
+ branches: [
14
+ { id: 'branch-1', probability: 50 },
15
+ { id: 'branch-2', probability: 50 },
16
+ ],
17
+ passthroughInputs: [
18
+ { id: 'input', type: 'image', isArray: false, inputType: 'static' },
19
+ ],
20
+ outputMode: 'single',
21
+ selectionMode: null,
22
+ },
23
+ computePorts: ({ config }) => {
24
+ const branches = config?.branches ?? [];
25
+ const passthroughInputs = config?.passthroughInputs ?? [];
26
+ const inputs = [];
27
+ const outputs = [];
28
+ // Input ports: only passthroughs where inputType is 'variable'
29
+ for (const passthrough of passthroughInputs) {
30
+ if (passthrough.inputType === 'variable') {
31
+ inputs.push({
32
+ id: passthrough.id,
33
+ type: passthrough.type,
34
+ isArray: passthrough.isArray ?? false,
35
+ required: true,
36
+ });
37
+ }
38
+ }
39
+ // Output ports: {branch.id}-{passthrough.id} for each combination
40
+ for (const branch of branches) {
41
+ for (const passthrough of passthroughInputs) {
42
+ outputs.push({
43
+ id: `${branch.id}-${passthrough.id}`,
44
+ type: passthrough.type,
45
+ isArray: passthrough.isArray ?? false,
46
+ required: true,
47
+ });
48
+ }
49
+ }
50
+ return { inputs, outputs };
51
+ },
52
+ });
53
+ exports.default = definition;
@@ -0,0 +1,16 @@
1
+ import { type InputType } from './types';
2
+ export interface RandomInputPort {
3
+ id: string;
4
+ probability: number;
5
+ inputType: InputType;
6
+ defaultValue?: unknown;
7
+ }
8
+ declare const definition: import("./types").NodeDefinition<"generator", {
9
+ mode: "array" | "multi-input";
10
+ valueType: string;
11
+ exposeIndex: boolean;
12
+ inputPorts: RandomInputPort[];
13
+ outputMode: "single";
14
+ selectionMode: null;
15
+ }, false>;
16
+ export default definition;
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const types_1 = require("./types");
4
+ const definition = (0, types_1.defineNode)({
5
+ nodeId: 'random',
6
+ label: 'Random Select',
7
+ description: 'Randomly select from an array or weighted inputs',
8
+ type: 'generator',
9
+ category: 'Control Flow',
10
+ outputModes: ['per-input', 'single'],
11
+ selectionModes: null,
12
+ defaults: {
13
+ mode: 'array',
14
+ valueType: 'object',
15
+ exposeIndex: false,
16
+ inputPorts: [],
17
+ outputMode: 'single',
18
+ selectionMode: null,
19
+ },
20
+ computePorts: ({ config }) => {
21
+ const mode = config?.mode ?? 'array';
22
+ const valueType = (config?.valueType ?? 'object');
23
+ const exposeIndex = config?.exposeIndex ?? false;
24
+ const inputPorts = config?.inputPorts ?? [];
25
+ const inputs = [];
26
+ const outputs = [];
27
+ if (mode === 'array') {
28
+ inputs.push({ id: 'array', type: 'object', isArray: false, required: true });
29
+ }
30
+ else {
31
+ // Multi-input mode: only add ports where inputType is 'variable'
32
+ for (const port of inputPorts) {
33
+ if (port.inputType === 'variable') {
34
+ inputs.push({
35
+ id: port.id,
36
+ type: valueType,
37
+ isArray: false,
38
+ required: true,
39
+ });
40
+ }
41
+ }
42
+ }
43
+ outputs.push({ id: 'output', type: valueType, isArray: false, required: true });
44
+ if (mode === 'array' && exposeIndex) {
45
+ outputs.push({ id: 'index', type: 'number', isArray: false, required: true });
46
+ }
47
+ return { inputs, outputs };
48
+ },
49
+ });
50
+ exports.default = definition;
@@ -0,0 +1,29 @@
1
+ import { type TriggerCollectionConfig, type MediaItemType } from './types';
2
+ export type DayOfWeek = 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday' | 'sunday';
3
+ export interface RecurrenceMediaOutput {
4
+ id: string;
5
+ type: MediaItemType;
6
+ selectionMode: 'specific' | 'by-tag';
7
+ selectedMediaIds?: string[];
8
+ mediaTag?: string;
9
+ }
10
+ export interface RecurrenceMediaConfig {
11
+ enabled: boolean;
12
+ outputs: RecurrenceMediaOutput[];
13
+ }
14
+ declare const definition: import("./types").NodeDefinition<"trigger", {
15
+ frequencyType: "per-day" | "periodic";
16
+ runsPerDay: number;
17
+ periodDays: number;
18
+ daysOfWeek: DayOfWeek[];
19
+ timingType: "specific" | "random-window";
20
+ specificTimes: string[];
21
+ randomWindowStart: string;
22
+ randomWindowEnd: string;
23
+ timezone: string;
24
+ collectionInput: TriggerCollectionConfig | undefined;
25
+ mediaInput: RecurrenceMediaConfig | undefined;
26
+ outputMode: null;
27
+ selectionMode: null;
28
+ }, false>;
29
+ export default definition;
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const types_1 = require("./types");
4
+ const definition = (0, types_1.defineNode)({
5
+ nodeId: 'recurrence',
6
+ label: 'Recurring',
7
+ description: 'Run continuously',
8
+ type: 'trigger',
9
+ category: 'Triggers',
10
+ outputModes: null,
11
+ selectionModes: null,
12
+ defaults: {
13
+ frequencyType: 'per-day',
14
+ runsPerDay: 1,
15
+ periodDays: 7,
16
+ daysOfWeek: ['monday', 'tuesday', 'wednesday', 'thursday', 'friday'],
17
+ timingType: 'random-window',
18
+ specificTimes: ['09:00'],
19
+ randomWindowStart: '09:00',
20
+ randomWindowEnd: '17:00',
21
+ timezone: 'America/New_York',
22
+ collectionInput: undefined,
23
+ mediaInput: undefined,
24
+ outputMode: null,
25
+ selectionMode: null,
26
+ },
27
+ computePorts: ({ config }) => {
28
+ const collectionInputEnabled = config?.collectionInput?.enabled;
29
+ const mediaOutputs = config?.mediaInput?.outputs ?? [];
30
+ const outputs = [];
31
+ // Add account output if collection input is enabled
32
+ if (collectionInputEnabled) {
33
+ outputs.push({ id: 'account', type: 'account', isArray: false, required: true });
34
+ }
35
+ // Add media outputs
36
+ for (const output of mediaOutputs) {
37
+ outputs.push({
38
+ id: output.id,
39
+ type: output.type,
40
+ isArray: false,
41
+ required: true,
42
+ });
43
+ }
44
+ return {
45
+ inputs: [],
46
+ outputs,
47
+ };
48
+ },
49
+ });
50
+ exports.default = definition;
@@ -0,0 +1,15 @@
1
+ type SaveToMediaType = 'image' | 'video' | 'audio' | 'text';
2
+ export interface SaveToMediaInput {
3
+ id: string;
4
+ type: SaveToMediaType;
5
+ tag?: string;
6
+ }
7
+ declare const definition: import("./types").NodeDefinition<"terminal", {
8
+ inputs: SaveToMediaInput[];
9
+ globalTag: string | undefined;
10
+ includeDateTag: boolean;
11
+ makeUnique: boolean;
12
+ outputMode: null;
13
+ selectionMode: null;
14
+ }, false>;
15
+ export default definition;
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const types_1 = require("./types");
4
+ const definition = (0, types_1.defineNode)({
5
+ nodeId: 'save-to-media',
6
+ label: 'Save To Media',
7
+ description: 'Save outputs to media library',
8
+ type: 'terminal',
9
+ category: 'Output',
10
+ outputModes: null,
11
+ selectionModes: null,
12
+ defaults: {
13
+ inputs: [{ id: 'input', type: 'image' }],
14
+ globalTag: undefined,
15
+ includeDateTag: false,
16
+ makeUnique: false,
17
+ outputMode: null,
18
+ selectionMode: null,
19
+ },
20
+ computePorts: ({ config }) => {
21
+ const configInputs = config?.inputs ?? [];
22
+ const inputs = configInputs.map(input => ({
23
+ id: input.id,
24
+ type: input.type,
25
+ isArray: false,
26
+ required: true,
27
+ }));
28
+ return { inputs, outputs: [] };
29
+ },
30
+ });
31
+ exports.default = definition;
@@ -0,0 +1,6 @@
1
+ declare const definition: import("./types").NodeDefinition<"generator", {
2
+ holdDurationMs: number;
3
+ outputMode: "per-input";
4
+ selectionMode: null;
5
+ }, false>;
6
+ export default definition;
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const types_1 = require("./types");
4
+ const definition = (0, types_1.defineNode)({
5
+ nodeId: 'screenshot-animation',
6
+ label: 'Animate Screenshot',
7
+ description: 'Create an iPhone screenshot animation from an image',
8
+ type: 'generator',
9
+ category: 'Generation',
10
+ outputModes: ['per-input', 'single'],
11
+ selectionModes: null,
12
+ defaults: {
13
+ holdDurationMs: 500,
14
+ outputMode: 'per-input',
15
+ selectionMode: null,
16
+ },
17
+ computePorts: () => ({
18
+ inputs: [
19
+ {
20
+ id: 'image',
21
+ type: 'image',
22
+ isArray: false,
23
+ required: true,
24
+ },
25
+ ],
26
+ outputs: [
27
+ {
28
+ id: 'output',
29
+ type: 'video',
30
+ isArray: false,
31
+ required: true,
32
+ },
33
+ ],
34
+ }),
35
+ });
36
+ exports.default = definition;
@@ -0,0 +1,7 @@
1
+ declare const definition: import("./types").NodeDefinition<"source", {
2
+ urls: string[];
3
+ selectedMediaIds: string[];
4
+ selectionMode: "random";
5
+ outputMode: "per-input";
6
+ }, false>;
7
+ export default definition;
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const types_1 = require("./types");
4
+ const definition = (0, types_1.defineNode)({
5
+ nodeId: 'social-audio',
6
+ label: 'Social Audio',
7
+ description: 'Select trending audio for posts',
8
+ type: 'source',
9
+ category: 'Sources',
10
+ outputModes: ['per-input', 'single'],
11
+ selectionModes: ['random', 'sequential'],
12
+ defaults: {
13
+ urls: [],
14
+ selectedMediaIds: [],
15
+ selectionMode: 'random',
16
+ outputMode: 'per-input',
17
+ },
18
+ computePorts: () => ({
19
+ inputs: [],
20
+ outputs: [
21
+ {
22
+ id: 'social-audio',
23
+ type: 'social_audio',
24
+ isArray: false,
25
+ required: true,
26
+ },
27
+ ],
28
+ }),
29
+ });
30
+ exports.default = definition;
@@ -0,0 +1,6 @@
1
+ declare const definition: import("./types").NodeDefinition<"source", {
2
+ textOptions: string[];
3
+ selectionMode: "random";
4
+ outputMode: "per-input";
5
+ }, false>;
6
+ export default definition;
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const types_1 = require("./types");
4
+ const internal_utils_1 = require("../../internal-utils");
5
+ const definition = (0, types_1.defineNode)({
6
+ nodeId: 'text',
7
+ label: 'Text',
8
+ description: 'Use text collections',
9
+ type: 'source',
10
+ category: 'Sources',
11
+ outputModes: ['per-input', 'single'],
12
+ selectionModes: ['random', 'sequential'],
13
+ defaults: {
14
+ textOptions: [],
15
+ selectionMode: 'random',
16
+ outputMode: 'per-input',
17
+ },
18
+ computePorts: ({ config }) => {
19
+ const textOptions = (config?.textOptions ?? []);
20
+ const variables = (0, internal_utils_1.extractTemplateVariables)(textOptions);
21
+ // Generate inputs from template variables
22
+ const inputs = variables.map(variable => ({
23
+ id: variable,
24
+ type: 'text',
25
+ isArray: false,
26
+ required: false,
27
+ }));
28
+ return {
29
+ inputs,
30
+ outputs: [
31
+ {
32
+ id: 'text',
33
+ type: 'text',
34
+ isArray: false,
35
+ required: true,
36
+ },
37
+ ],
38
+ };
39
+ },
40
+ });
41
+ exports.default = definition;
@@ -0,0 +1,5 @@
1
+ declare const definition: import("./types").NodeDefinition<"generator", {
2
+ outputMode: "per-input";
3
+ selectionMode: null;
4
+ }, false>;
5
+ export default definition;
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const types_1 = require("./types");
4
+ const definition = (0, types_1.defineNode)({
5
+ nodeId: 'transcript',
6
+ label: 'Transcribe',
7
+ description: 'Transcribe video or audio with timestamps',
8
+ type: 'generator',
9
+ category: 'Generation',
10
+ outputModes: ['per-input', 'single'],
11
+ selectionModes: null,
12
+ defaults: {
13
+ outputMode: 'per-input',
14
+ selectionMode: null,
15
+ },
16
+ computePorts: () => ({
17
+ inputs: [
18
+ {
19
+ id: 'media',
20
+ type: ['video', 'audio'],
21
+ isArray: false,
22
+ required: true,
23
+ },
24
+ ],
25
+ outputs: [
26
+ {
27
+ id: 'text',
28
+ type: 'text',
29
+ isArray: false,
30
+ required: true,
31
+ },
32
+ {
33
+ id: 'segments',
34
+ type: 'object',
35
+ isArray: false,
36
+ required: true,
37
+ objectSchema: [
38
+ { name: 'text', type: 'string' },
39
+ { name: 'start', type: 'number' },
40
+ { name: 'end', type: 'number' },
41
+ ],
42
+ },
43
+ ],
44
+ }),
45
+ });
46
+ exports.default = definition;