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.
- package/dist/accounts.d.ts +146 -1
- package/dist/automations/index.d.ts +174 -0
- package/dist/automations/index.js +194 -0
- package/dist/automations/nodes/account.d.ts +6 -0
- package/dist/automations/nodes/account.js +28 -0
- package/dist/automations/nodes/auto-caption.d.ts +23 -0
- package/dist/automations/nodes/auto-caption.js +49 -0
- package/dist/automations/nodes/auto-post.d.ts +22 -0
- package/dist/automations/nodes/auto-post.js +52 -0
- package/dist/automations/nodes/branch.d.ts +21 -0
- package/dist/automations/nodes/branch.js +46 -0
- package/dist/automations/nodes/collect.d.ts +7 -0
- package/dist/automations/nodes/collect.js +51 -0
- package/dist/automations/nodes/compose-workflow.d.ts +8 -0
- package/dist/automations/nodes/compose-workflow.js +61 -0
- package/dist/automations/nodes/create-dm.d.ts +35 -0
- package/dist/automations/nodes/create-dm.js +86 -0
- package/dist/automations/nodes/custom-model.d.ts +18 -0
- package/dist/automations/nodes/custom-model.js +52 -0
- package/dist/automations/nodes/deduplicate.d.ts +7 -0
- package/dist/automations/nodes/deduplicate.js +36 -0
- package/dist/automations/nodes/destructure.d.ts +25 -0
- package/dist/automations/nodes/destructure.js +65 -0
- package/dist/automations/nodes/for-each.d.ts +22 -0
- package/dist/automations/nodes/for-each.js +84 -0
- package/dist/automations/nodes/generate-image.d.ts +15 -0
- package/dist/automations/nodes/generate-image.js +45 -0
- package/dist/automations/nodes/generate-video.d.ts +15 -0
- package/dist/automations/nodes/generate-video.js +45 -0
- package/dist/automations/nodes/if.d.ts +21 -0
- package/dist/automations/nodes/if.js +44 -0
- package/dist/automations/nodes/image-composer.d.ts +46 -0
- package/dist/automations/nodes/image-composer.js +135 -0
- package/dist/automations/nodes/index.d.ts +312 -0
- package/dist/automations/nodes/index.js +92 -0
- package/dist/automations/nodes/internal.d.ts +8 -0
- package/dist/automations/nodes/internal.js +10 -0
- package/dist/automations/nodes/llm.d.ts +26 -0
- package/dist/automations/nodes/llm.js +85 -0
- package/dist/automations/nodes/manual-trigger.d.ts +14 -0
- package/dist/automations/nodes/manual-trigger.js +32 -0
- package/dist/automations/nodes/media.d.ts +13 -0
- package/dist/automations/nodes/media.js +40 -0
- package/dist/automations/nodes/not.d.ts +5 -0
- package/dist/automations/nodes/not.js +35 -0
- package/dist/automations/nodes/output.d.ts +16 -0
- package/dist/automations/nodes/output.js +32 -0
- package/dist/automations/nodes/random-route.d.ts +24 -0
- package/dist/automations/nodes/random-route.js +53 -0
- package/dist/automations/nodes/random.d.ts +16 -0
- package/dist/automations/nodes/random.js +50 -0
- package/dist/automations/nodes/recurrence.d.ts +29 -0
- package/dist/automations/nodes/recurrence.js +50 -0
- package/dist/automations/nodes/save-to-media.d.ts +15 -0
- package/dist/automations/nodes/save-to-media.js +31 -0
- package/dist/automations/nodes/screenshot-animation.d.ts +6 -0
- package/dist/automations/nodes/screenshot-animation.js +36 -0
- package/dist/automations/nodes/social-audio.d.ts +7 -0
- package/dist/automations/nodes/social-audio.js +30 -0
- package/dist/automations/nodes/text.d.ts +6 -0
- package/dist/automations/nodes/text.js +41 -0
- package/dist/automations/nodes/transcript.d.ts +5 -0
- package/dist/automations/nodes/transcript.js +46 -0
- package/dist/automations/nodes/types.d.ts +202 -0
- package/dist/automations/nodes/types.js +22 -0
- package/dist/automations/nodes/video-composer.d.ts +16 -0
- package/dist/automations/nodes/video-composer.js +117 -0
- package/dist/automations/nodes/video-import.d.ts +9 -0
- package/dist/automations/nodes/video-import.js +23 -0
- package/dist/automations/types.d.ts +431 -0
- package/dist/automations/types.js +29 -0
- package/dist/automations.d.ts +5 -33
- package/dist/automations.js +6 -647
- package/dist/comments.d.ts +26 -1
- package/dist/comments.js +3 -0
- package/dist/graph-controller.d.ts +211 -0
- package/dist/graph-controller.js +656 -0
- package/dist/index.d.ts +22 -9
- package/dist/index.js +47 -24
- package/dist/internal-utils.d.ts +8 -0
- package/dist/internal-utils.js +22 -0
- package/dist/media.d.ts +135 -1
- package/dist/nodes/account.d.ts +7 -0
- package/dist/nodes/account.js +29 -0
- package/dist/nodes/auto-caption.d.ts +17 -0
- package/dist/nodes/auto-caption.js +46 -0
- package/dist/nodes/auto-post.d.ts +21 -0
- package/dist/nodes/auto-post.js +54 -0
- package/dist/nodes/branch.d.ts +12 -0
- package/dist/nodes/branch.js +50 -0
- package/dist/nodes/collect.d.ts +6 -0
- package/dist/nodes/collect.js +56 -0
- package/dist/nodes/compose-workflow.d.ts +21 -0
- package/dist/nodes/compose-workflow.js +42 -0
- package/dist/nodes/create-dm.d.ts +40 -0
- package/dist/nodes/create-dm.js +88 -0
- package/dist/nodes/custom-model.d.ts +19 -0
- package/dist/nodes/custom-model.js +52 -0
- package/dist/nodes/deduplicate.d.ts +8 -0
- package/dist/nodes/deduplicate.js +36 -0
- package/dist/nodes/destructure.d.ts +25 -0
- package/dist/nodes/destructure.js +65 -0
- package/dist/nodes/for-each.d.ts +23 -0
- package/dist/nodes/for-each.js +84 -0
- package/dist/nodes/generate-image.d.ts +16 -0
- package/dist/nodes/generate-image.js +45 -0
- package/dist/nodes/generate-video.d.ts +16 -0
- package/dist/nodes/generate-video.js +45 -0
- package/dist/nodes/if.d.ts +22 -0
- package/dist/nodes/if.js +44 -0
- package/dist/nodes/image-composer.d.ts +14 -0
- package/dist/nodes/image-composer.js +95 -0
- package/dist/nodes/index.d.ts +20 -0
- package/dist/nodes/index.js +93 -0
- package/dist/nodes/llm.d.ts +27 -0
- package/dist/nodes/llm.js +85 -0
- package/dist/nodes/manual-trigger.d.ts +16 -0
- package/dist/nodes/manual-trigger.js +32 -0
- package/dist/nodes/media.d.ts +17 -0
- package/dist/nodes/media.js +40 -0
- package/dist/nodes/not.d.ts +6 -0
- package/dist/nodes/not.js +35 -0
- package/dist/nodes/output.d.ts +9 -0
- package/dist/nodes/output.js +32 -0
- package/dist/nodes/random-route.d.ts +3 -0
- package/dist/nodes/random-route.js +50 -0
- package/dist/nodes/random.d.ts +3 -0
- package/dist/nodes/random.js +48 -0
- package/dist/nodes/recurrence.d.ts +3 -0
- package/dist/nodes/recurrence.js +45 -0
- package/dist/nodes/save-to-media.d.ts +3 -0
- package/dist/nodes/save-to-media.js +26 -0
- package/dist/nodes/screenshot-animation.d.ts +7 -0
- package/dist/nodes/screenshot-animation.js +36 -0
- package/dist/nodes/social-audio.d.ts +3 -0
- package/dist/nodes/social-audio.js +26 -0
- package/dist/nodes/text.d.ts +3 -0
- package/dist/nodes/text.js +38 -0
- package/dist/nodes/transcript.d.ts +3 -0
- package/dist/nodes/transcript.js +42 -0
- package/dist/nodes/types.d.ts +146 -0
- package/dist/nodes/types.js +22 -0
- package/dist/nodes/video-composer.d.ts +3 -0
- package/dist/nodes/video-composer.js +67 -0
- package/dist/nodes/video-import.d.ts +3 -0
- package/dist/nodes/video-import.js +35 -0
- package/dist/org.d.ts +13 -1
- package/dist/ports.js +3 -9
- package/dist/posts.d.ts +88 -1
- package/dist/render/compositions/IMessageDmComposition/types.d.ts +24 -24
- package/dist/render/compositions/ImageEditorComposition.js +2 -8
- package/dist/render/compositions/VideoEditorComposition.js +2 -24
- package/dist/render/types/element.d.ts +0 -33
- package/dist/render/types/index.d.ts +1 -1
- package/dist/render/types/video.d.ts +2 -2
- package/dist/render.d.ts +2 -1
- package/dist/stats.d.ts +128 -1
- package/dist/tasks.d.ts +20 -1
- package/dist/types.d.ts +1 -2216
- package/dist/types.js +2 -124
- package/package.json +1 -1
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
import type { NodeDefinition } from './types';
|
|
2
|
+
import { internalNodeTypes, type InternalNodeType } from './internal';
|
|
3
|
+
/**
|
|
4
|
+
* Registry of all user-creatable node definitions.
|
|
5
|
+
* This is the single source of truth for node types.
|
|
6
|
+
*/
|
|
7
|
+
export declare const nodeDefinitions: {
|
|
8
|
+
readonly account: NodeDefinition<"source", {
|
|
9
|
+
accountIds: string[];
|
|
10
|
+
outputMode: "per-input";
|
|
11
|
+
selectionMode: "random";
|
|
12
|
+
}, false>;
|
|
13
|
+
readonly 'auto-caption': NodeDefinition<"generator", {
|
|
14
|
+
preset: "hormozi" | "minimal" | "bold-pop" | "clean" | "neon";
|
|
15
|
+
fontName: string | undefined;
|
|
16
|
+
fontSize: number | undefined;
|
|
17
|
+
fontWeight: ("normal" | "bold" | "black") | undefined;
|
|
18
|
+
fontColor: string | undefined;
|
|
19
|
+
highlightColor: string | undefined;
|
|
20
|
+
strokeColor: string | undefined;
|
|
21
|
+
strokeWidth: number | undefined;
|
|
22
|
+
backgroundColor: string | undefined;
|
|
23
|
+
position: ("top" | "center" | "bottom") | undefined;
|
|
24
|
+
yOffset: number | undefined;
|
|
25
|
+
maxWidth: number | undefined;
|
|
26
|
+
wordsPerSubtitle: number | undefined;
|
|
27
|
+
enableAnimation: boolean | undefined;
|
|
28
|
+
language: string | undefined;
|
|
29
|
+
outputMode: "per-input";
|
|
30
|
+
selectionMode: null;
|
|
31
|
+
}, false>;
|
|
32
|
+
readonly 'auto-post': NodeDefinition<"terminal", {
|
|
33
|
+
mode: "video" | "slideshow";
|
|
34
|
+
inputType: import("./types").InputType;
|
|
35
|
+
imageInputs: Array<{
|
|
36
|
+
id: string;
|
|
37
|
+
}>;
|
|
38
|
+
socialAudioIsVariable: boolean;
|
|
39
|
+
socialAudioSelectedIds: string[];
|
|
40
|
+
schedulingMode: "scheduled" | "queue";
|
|
41
|
+
minDistanceHours: number;
|
|
42
|
+
maxPostsPerDay: number;
|
|
43
|
+
randomWindowStart: string;
|
|
44
|
+
randomWindowEnd: string;
|
|
45
|
+
timezone: string;
|
|
46
|
+
requireApproval: boolean;
|
|
47
|
+
outputMode: null;
|
|
48
|
+
selectionMode: null;
|
|
49
|
+
}, false>;
|
|
50
|
+
readonly branch: NodeDefinition<"generator", {
|
|
51
|
+
branches: import("./branch").BranchDefinition[];
|
|
52
|
+
passthroughInputs: import("./branch").PassthroughInput[];
|
|
53
|
+
defaultBranchKey: string;
|
|
54
|
+
outputMode: "per-input";
|
|
55
|
+
selectionMode: null;
|
|
56
|
+
}, false>;
|
|
57
|
+
readonly collect: NodeDefinition<"generator", {
|
|
58
|
+
expectedCount: number | undefined;
|
|
59
|
+
forEachTemplateId: string | undefined;
|
|
60
|
+
outputMode: "single";
|
|
61
|
+
selectionMode: null;
|
|
62
|
+
}, false>;
|
|
63
|
+
readonly 'compose-workflow': NodeDefinition<"generator", {
|
|
64
|
+
workflowTemplateId: string | undefined;
|
|
65
|
+
resolvedPorts: import("../types").ResolvedPorts | undefined;
|
|
66
|
+
outputMode: "per-input";
|
|
67
|
+
selectionMode: null;
|
|
68
|
+
}, false>;
|
|
69
|
+
readonly 'create-dm': NodeDefinition<"generator", {
|
|
70
|
+
platform: "instagram" | "imessage";
|
|
71
|
+
platformInputType: import("./types").InputType;
|
|
72
|
+
lightMode: boolean;
|
|
73
|
+
lightModeInputType: import("./types").InputType;
|
|
74
|
+
username: string;
|
|
75
|
+
usernameInputType: import("./types").InputType;
|
|
76
|
+
time: string;
|
|
77
|
+
timeInputType: import("./types").InputType;
|
|
78
|
+
profilePicUrl: string;
|
|
79
|
+
profilePicInputType: import("./types").InputType;
|
|
80
|
+
messages: import("./create-dm").CreateDmMessage[];
|
|
81
|
+
messagesInputType: import("./types").InputType;
|
|
82
|
+
imageAttachmentUrl: string | undefined;
|
|
83
|
+
imageAttachmentInputType: import("./types").InputType;
|
|
84
|
+
imessageSenderBubbleColor: string | undefined;
|
|
85
|
+
imessageShowReadReceipt: boolean;
|
|
86
|
+
imessageReadReceiptText: string;
|
|
87
|
+
imessageReadReceiptTimeInputType: import("./types").InputType;
|
|
88
|
+
imessageUnreadBadgeText: string;
|
|
89
|
+
imessageUnreadBadgeInputType: import("./types").InputType;
|
|
90
|
+
imessageMessageHeaderTimestampText: string;
|
|
91
|
+
imessageMessageHeaderTimeInputType: import("./types").InputType;
|
|
92
|
+
instagramUserHasStory: boolean;
|
|
93
|
+
outputMode: "per-input";
|
|
94
|
+
selectionMode: null;
|
|
95
|
+
}, false>;
|
|
96
|
+
readonly 'custom-model': NodeDefinition<"generator", {
|
|
97
|
+
modelId: string;
|
|
98
|
+
modelName: string;
|
|
99
|
+
outputType: import("./custom-model").CustomModelOutputType;
|
|
100
|
+
inputParams: import("./custom-model").CustomModelInputParam[];
|
|
101
|
+
apiKey: string | undefined;
|
|
102
|
+
outputMode: "per-input";
|
|
103
|
+
selectionMode: null;
|
|
104
|
+
}, false>;
|
|
105
|
+
readonly deduplicate: NodeDefinition<"generator", {
|
|
106
|
+
deduplication: import("../../render").DeduplicationLevel;
|
|
107
|
+
outputMode: "per-input";
|
|
108
|
+
selectionMode: null;
|
|
109
|
+
}, false>;
|
|
110
|
+
readonly destructure: NodeDefinition<"generator", {
|
|
111
|
+
selections: import("./destructure").DestructureSelection[];
|
|
112
|
+
outputMode: "per-input";
|
|
113
|
+
selectionMode: null;
|
|
114
|
+
}, false>;
|
|
115
|
+
readonly 'for-each': NodeDefinition<"generator", {
|
|
116
|
+
outputProperties: import("./for-each").ForEachOutputProperty[];
|
|
117
|
+
inputPorts: import("./for-each").ForEachInputPort[];
|
|
118
|
+
exposeItem: boolean;
|
|
119
|
+
exposeIndex: boolean;
|
|
120
|
+
outputMode: "per-input";
|
|
121
|
+
selectionMode: null;
|
|
122
|
+
}, false>;
|
|
123
|
+
readonly 'generate-image': NodeDefinition<"generator", {
|
|
124
|
+
model: import("./generate-image").ImageGenerationModel;
|
|
125
|
+
aspectRatio: string;
|
|
126
|
+
numImages: number;
|
|
127
|
+
apiKey: string | undefined;
|
|
128
|
+
outputMode: "per-input";
|
|
129
|
+
selectionMode: null;
|
|
130
|
+
}, false>;
|
|
131
|
+
readonly 'generate-video': NodeDefinition<"generator", {
|
|
132
|
+
model: import("./generate-video").VideoGenerationModel;
|
|
133
|
+
aspectRatio: string;
|
|
134
|
+
duration: number;
|
|
135
|
+
apiKey: string | undefined;
|
|
136
|
+
outputMode: "per-input";
|
|
137
|
+
selectionMode: null;
|
|
138
|
+
}, false>;
|
|
139
|
+
readonly if: NodeDefinition<"generator", {
|
|
140
|
+
logicOperator: import("./if").IfLogicOperator;
|
|
141
|
+
booleanInputs: import("./if").IfBooleanInput[];
|
|
142
|
+
passthroughInputs: import("./if").IfPassthroughInput[];
|
|
143
|
+
outputMode: "per-input";
|
|
144
|
+
selectionMode: null;
|
|
145
|
+
}, false>;
|
|
146
|
+
readonly 'image-composer': NodeDefinition<"generator", {
|
|
147
|
+
imageEditor: {
|
|
148
|
+
width: number;
|
|
149
|
+
height: number;
|
|
150
|
+
aspectRatio: string;
|
|
151
|
+
dimensionPreset: string;
|
|
152
|
+
backgroundType: string;
|
|
153
|
+
elements: never[];
|
|
154
|
+
};
|
|
155
|
+
outputMode: "per-input";
|
|
156
|
+
selectionMode: null;
|
|
157
|
+
}, false>;
|
|
158
|
+
readonly llm: NodeDefinition<"generator", {
|
|
159
|
+
provider: import("./llm").LLMProvider;
|
|
160
|
+
model: string;
|
|
161
|
+
temperature: number;
|
|
162
|
+
maxTokens: number | undefined;
|
|
163
|
+
systemPrompt: string;
|
|
164
|
+
outputFields: import("./types").ObjectSchemaField[];
|
|
165
|
+
useStructuredOutput: boolean;
|
|
166
|
+
imageInputRefs: string[];
|
|
167
|
+
videoInputRefs: string[];
|
|
168
|
+
apiKeys: import("./llm").LLMApiKeys | undefined;
|
|
169
|
+
outputMode: "per-input";
|
|
170
|
+
selectionMode: null;
|
|
171
|
+
}, false>;
|
|
172
|
+
readonly 'manual-trigger': NodeDefinition<"trigger", {
|
|
173
|
+
outputs: Array<{
|
|
174
|
+
id: string;
|
|
175
|
+
type: import("../types").BasePortType;
|
|
176
|
+
isArray?: boolean;
|
|
177
|
+
objectSchema?: import("./types").ObjectSchemaField[];
|
|
178
|
+
enumOptions?: import("../types").EnumOption[];
|
|
179
|
+
}>;
|
|
180
|
+
outputMode: null;
|
|
181
|
+
selectionMode: null;
|
|
182
|
+
}, false>;
|
|
183
|
+
readonly media: NodeDefinition<"source", {
|
|
184
|
+
outputs: {
|
|
185
|
+
id: string;
|
|
186
|
+
type: import("./types").MediaNodeSelectionType;
|
|
187
|
+
isArray: boolean;
|
|
188
|
+
selectedMediaIds: string[];
|
|
189
|
+
selectionConfig: import("./types").SelectionConfig | undefined;
|
|
190
|
+
}[];
|
|
191
|
+
outputMode: "per-input";
|
|
192
|
+
selectionMode: "random";
|
|
193
|
+
}, false>;
|
|
194
|
+
readonly not: NodeDefinition<"generator", {
|
|
195
|
+
outputMode: "per-input";
|
|
196
|
+
selectionMode: null;
|
|
197
|
+
}, false>;
|
|
198
|
+
readonly passthrough: NodeDefinition<"terminal", {
|
|
199
|
+
inputs: import("./output").OutputInput[];
|
|
200
|
+
mainPreviewInputId: string | undefined;
|
|
201
|
+
outputMode: null;
|
|
202
|
+
selectionMode: null;
|
|
203
|
+
}, false>;
|
|
204
|
+
readonly random: NodeDefinition<"generator", {
|
|
205
|
+
mode: "array" | "multi-input";
|
|
206
|
+
valueType: string;
|
|
207
|
+
exposeIndex: boolean;
|
|
208
|
+
inputPorts: import("./random").RandomInputPort[];
|
|
209
|
+
outputMode: "single";
|
|
210
|
+
selectionMode: null;
|
|
211
|
+
}, false>;
|
|
212
|
+
readonly 'random-route': NodeDefinition<"generator", {
|
|
213
|
+
branches: import("./random-route").RandomRouteBranch[];
|
|
214
|
+
passthroughInputs: import("./random-route").RandomRoutePassthroughInput[];
|
|
215
|
+
outputMode: "single";
|
|
216
|
+
selectionMode: null;
|
|
217
|
+
}, false>;
|
|
218
|
+
readonly recurrence: NodeDefinition<"trigger", {
|
|
219
|
+
frequencyType: "per-day" | "periodic";
|
|
220
|
+
runsPerDay: number;
|
|
221
|
+
periodDays: number;
|
|
222
|
+
daysOfWeek: import("./recurrence").DayOfWeek[];
|
|
223
|
+
timingType: "specific" | "random-window";
|
|
224
|
+
specificTimes: string[];
|
|
225
|
+
randomWindowStart: string;
|
|
226
|
+
randomWindowEnd: string;
|
|
227
|
+
timezone: string;
|
|
228
|
+
collectionInput: import("./types").TriggerCollectionConfig | undefined;
|
|
229
|
+
mediaInput: import("./recurrence").RecurrenceMediaConfig | undefined;
|
|
230
|
+
outputMode: null;
|
|
231
|
+
selectionMode: null;
|
|
232
|
+
}, false>;
|
|
233
|
+
readonly 'save-to-media': NodeDefinition<"terminal", {
|
|
234
|
+
inputs: import("./save-to-media").SaveToMediaInput[];
|
|
235
|
+
globalTag: string | undefined;
|
|
236
|
+
includeDateTag: boolean;
|
|
237
|
+
makeUnique: boolean;
|
|
238
|
+
outputMode: null;
|
|
239
|
+
selectionMode: null;
|
|
240
|
+
}, false>;
|
|
241
|
+
readonly 'screenshot-animation': NodeDefinition<"generator", {
|
|
242
|
+
holdDurationMs: number;
|
|
243
|
+
outputMode: "per-input";
|
|
244
|
+
selectionMode: null;
|
|
245
|
+
}, false>;
|
|
246
|
+
readonly 'social-audio': NodeDefinition<"source", {
|
|
247
|
+
urls: string[];
|
|
248
|
+
selectedMediaIds: string[];
|
|
249
|
+
selectionMode: "random";
|
|
250
|
+
outputMode: "per-input";
|
|
251
|
+
}, false>;
|
|
252
|
+
readonly text: NodeDefinition<"source", {
|
|
253
|
+
textOptions: string[];
|
|
254
|
+
selectionMode: "random";
|
|
255
|
+
outputMode: "per-input";
|
|
256
|
+
}, false>;
|
|
257
|
+
readonly transcript: NodeDefinition<"generator", {
|
|
258
|
+
outputMode: "per-input";
|
|
259
|
+
selectionMode: null;
|
|
260
|
+
}, false>;
|
|
261
|
+
readonly 'video-composer': NodeDefinition<"generator", {
|
|
262
|
+
videoEditor: {
|
|
263
|
+
width: number;
|
|
264
|
+
height: number;
|
|
265
|
+
fps: number;
|
|
266
|
+
dimensionPreset: string;
|
|
267
|
+
channels: {
|
|
268
|
+
id: string;
|
|
269
|
+
name: string;
|
|
270
|
+
segments: never[];
|
|
271
|
+
}[];
|
|
272
|
+
};
|
|
273
|
+
outputMode: "per-input";
|
|
274
|
+
selectionMode: null;
|
|
275
|
+
}, false>;
|
|
276
|
+
readonly 'video-import': NodeDefinition<"source", {
|
|
277
|
+
platform: import("./video-import").VideoImportPlatform;
|
|
278
|
+
videoQuality: import("./video-import").VideoImportQuality;
|
|
279
|
+
outputMode: "per-input";
|
|
280
|
+
selectionMode: "random";
|
|
281
|
+
}, false>;
|
|
282
|
+
};
|
|
283
|
+
/** User-creatable node types (derived from nodeDefinitions keys) */
|
|
284
|
+
export type UserCreatableNodeType = keyof typeof nodeDefinitions;
|
|
285
|
+
/** All node types including internal executor types */
|
|
286
|
+
export type NodeType = UserCreatableNodeType | InternalNodeType;
|
|
287
|
+
/** Extract config type from a node definition */
|
|
288
|
+
type ConfigOf<T> = T extends {
|
|
289
|
+
defaults: infer D;
|
|
290
|
+
} ? D : never;
|
|
291
|
+
/** Union of all node config types */
|
|
292
|
+
export type NodeConfig = ConfigOf<(typeof nodeDefinitions)[UserCreatableNodeType]>;
|
|
293
|
+
/**
|
|
294
|
+
* Config type lookup by node ID.
|
|
295
|
+
* Use WorkflowConfig['node-id'] to get the config type for a specific node.
|
|
296
|
+
* @example WorkflowConfig['llm'] // LLM node config type
|
|
297
|
+
* @example WorkflowConfig['account'] // Account node config type
|
|
298
|
+
*/
|
|
299
|
+
export type WorkflowConfig = {
|
|
300
|
+
[K in UserCreatableNodeType]: ConfigOf<(typeof nodeDefinitions)[K]>;
|
|
301
|
+
};
|
|
302
|
+
export { internalNodeTypes, type InternalNodeType };
|
|
303
|
+
export type { NodeDefinition } from './types';
|
|
304
|
+
type AnyNodeDefinition = NodeDefinition<any, any, any>;
|
|
305
|
+
/**
|
|
306
|
+
* Get all node definitions as an array
|
|
307
|
+
*/
|
|
308
|
+
export declare function getAllNodeDefinitions(): AnyNodeDefinition[];
|
|
309
|
+
/**
|
|
310
|
+
* Get a node definition by its nodeId
|
|
311
|
+
*/
|
|
312
|
+
export declare function getNodeDefinition(nodeId: UserCreatableNodeType): AnyNodeDefinition | undefined;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.internalNodeTypes = exports.nodeDefinitions = void 0;
|
|
7
|
+
exports.getAllNodeDefinitions = getAllNodeDefinitions;
|
|
8
|
+
exports.getNodeDefinition = getNodeDefinition;
|
|
9
|
+
const internal_1 = require("./internal");
|
|
10
|
+
Object.defineProperty(exports, "internalNodeTypes", { enumerable: true, get: function () { return internal_1.internalNodeTypes; } });
|
|
11
|
+
// Import all node definitions
|
|
12
|
+
const account_1 = __importDefault(require("./account"));
|
|
13
|
+
const auto_caption_1 = __importDefault(require("./auto-caption"));
|
|
14
|
+
const auto_post_1 = __importDefault(require("./auto-post"));
|
|
15
|
+
const branch_1 = __importDefault(require("./branch"));
|
|
16
|
+
const collect_1 = __importDefault(require("./collect"));
|
|
17
|
+
const compose_workflow_1 = __importDefault(require("./compose-workflow"));
|
|
18
|
+
const create_dm_1 = __importDefault(require("./create-dm"));
|
|
19
|
+
const custom_model_1 = __importDefault(require("./custom-model"));
|
|
20
|
+
const deduplicate_1 = __importDefault(require("./deduplicate"));
|
|
21
|
+
const destructure_1 = __importDefault(require("./destructure"));
|
|
22
|
+
const for_each_1 = __importDefault(require("./for-each"));
|
|
23
|
+
const generate_image_1 = __importDefault(require("./generate-image"));
|
|
24
|
+
const generate_video_1 = __importDefault(require("./generate-video"));
|
|
25
|
+
const if_1 = __importDefault(require("./if"));
|
|
26
|
+
const image_composer_1 = __importDefault(require("./image-composer"));
|
|
27
|
+
const llm_1 = __importDefault(require("./llm"));
|
|
28
|
+
const manual_trigger_1 = __importDefault(require("./manual-trigger"));
|
|
29
|
+
const media_1 = __importDefault(require("./media"));
|
|
30
|
+
const not_1 = __importDefault(require("./not"));
|
|
31
|
+
const output_1 = __importDefault(require("./output"));
|
|
32
|
+
const random_1 = __importDefault(require("./random"));
|
|
33
|
+
const random_route_1 = __importDefault(require("./random-route"));
|
|
34
|
+
const recurrence_1 = __importDefault(require("./recurrence"));
|
|
35
|
+
const save_to_media_1 = __importDefault(require("./save-to-media"));
|
|
36
|
+
const screenshot_animation_1 = __importDefault(require("./screenshot-animation"));
|
|
37
|
+
const social_audio_1 = __importDefault(require("./social-audio"));
|
|
38
|
+
const text_1 = __importDefault(require("./text"));
|
|
39
|
+
const transcript_1 = __importDefault(require("./transcript"));
|
|
40
|
+
const video_composer_1 = __importDefault(require("./video-composer"));
|
|
41
|
+
const video_import_1 = __importDefault(require("./video-import"));
|
|
42
|
+
// =============================================================================
|
|
43
|
+
// Registry
|
|
44
|
+
// =============================================================================
|
|
45
|
+
/**
|
|
46
|
+
* Registry of all user-creatable node definitions.
|
|
47
|
+
* This is the single source of truth for node types.
|
|
48
|
+
*/
|
|
49
|
+
exports.nodeDefinitions = {
|
|
50
|
+
'account': account_1.default,
|
|
51
|
+
'auto-caption': auto_caption_1.default,
|
|
52
|
+
'auto-post': auto_post_1.default,
|
|
53
|
+
'branch': branch_1.default,
|
|
54
|
+
'collect': collect_1.default,
|
|
55
|
+
'compose-workflow': compose_workflow_1.default,
|
|
56
|
+
'create-dm': create_dm_1.default,
|
|
57
|
+
'custom-model': custom_model_1.default,
|
|
58
|
+
'deduplicate': deduplicate_1.default,
|
|
59
|
+
'destructure': destructure_1.default,
|
|
60
|
+
'for-each': for_each_1.default,
|
|
61
|
+
'generate-image': generate_image_1.default,
|
|
62
|
+
'generate-video': generate_video_1.default,
|
|
63
|
+
'if': if_1.default,
|
|
64
|
+
'image-composer': image_composer_1.default,
|
|
65
|
+
'llm': llm_1.default,
|
|
66
|
+
'manual-trigger': manual_trigger_1.default,
|
|
67
|
+
'media': media_1.default,
|
|
68
|
+
'not': not_1.default,
|
|
69
|
+
'passthrough': output_1.default,
|
|
70
|
+
'random': random_1.default,
|
|
71
|
+
'random-route': random_route_1.default,
|
|
72
|
+
'recurrence': recurrence_1.default,
|
|
73
|
+
'save-to-media': save_to_media_1.default,
|
|
74
|
+
'screenshot-animation': screenshot_animation_1.default,
|
|
75
|
+
'social-audio': social_audio_1.default,
|
|
76
|
+
'text': text_1.default,
|
|
77
|
+
'transcript': transcript_1.default,
|
|
78
|
+
'video-composer': video_composer_1.default,
|
|
79
|
+
'video-import': video_import_1.default,
|
|
80
|
+
};
|
|
81
|
+
/**
|
|
82
|
+
* Get all node definitions as an array
|
|
83
|
+
*/
|
|
84
|
+
function getAllNodeDefinitions() {
|
|
85
|
+
return Object.values(exports.nodeDefinitions);
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Get a node definition by its nodeId
|
|
89
|
+
*/
|
|
90
|
+
function getNodeDefinition(nodeId) {
|
|
91
|
+
return exports.nodeDefinitions[nodeId];
|
|
92
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal Node Types
|
|
3
|
+
*
|
|
4
|
+
* These are node types that are created dynamically during execution.
|
|
5
|
+
* They are not user-creatable and don't have definitions in the nodeDefinitions map.
|
|
6
|
+
*/
|
|
7
|
+
export declare const internalNodeTypes: readonly ["for-each-value"];
|
|
8
|
+
export type InternalNodeType = (typeof internalNodeTypes)[number];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Internal Node Types
|
|
4
|
+
*
|
|
5
|
+
* These are node types that are created dynamically during execution.
|
|
6
|
+
* They are not user-creatable and don't have definitions in the nodeDefinitions map.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.internalNodeTypes = void 0;
|
|
10
|
+
exports.internalNodeTypes = ['for-each-value'];
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type ObjectSchemaField } from './types';
|
|
2
|
+
declare const LLMProviders: readonly ["groq", "openai", "claude", "gemini"];
|
|
3
|
+
type LLMProvider = typeof LLMProviders[number];
|
|
4
|
+
interface LLMApiKeys {
|
|
5
|
+
openai?: string;
|
|
6
|
+
claude?: string;
|
|
7
|
+
gemini?: string;
|
|
8
|
+
groq?: string;
|
|
9
|
+
}
|
|
10
|
+
declare const definition: import("./types").NodeDefinition<"generator", {
|
|
11
|
+
provider: LLMProvider;
|
|
12
|
+
model: string;
|
|
13
|
+
temperature: number;
|
|
14
|
+
maxTokens: number | undefined;
|
|
15
|
+
systemPrompt: string;
|
|
16
|
+
outputFields: ObjectSchemaField[];
|
|
17
|
+
useStructuredOutput: boolean;
|
|
18
|
+
imageInputRefs: string[];
|
|
19
|
+
videoInputRefs: string[];
|
|
20
|
+
apiKeys: LLMApiKeys | undefined;
|
|
21
|
+
outputMode: "per-input";
|
|
22
|
+
selectionMode: null;
|
|
23
|
+
}, false>;
|
|
24
|
+
export default definition;
|
|
25
|
+
export { LLMProviders };
|
|
26
|
+
export type { LLMProvider, LLMApiKeys };
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LLMProviders = void 0;
|
|
4
|
+
const internal_utils_1 = require("../../internal-utils");
|
|
5
|
+
const types_1 = require("./types");
|
|
6
|
+
const LLMProviders = ['groq', 'openai', 'claude', 'gemini'];
|
|
7
|
+
exports.LLMProviders = LLMProviders;
|
|
8
|
+
const definition = (0, types_1.defineNode)({
|
|
9
|
+
nodeId: 'llm',
|
|
10
|
+
label: 'LLM',
|
|
11
|
+
description: 'Generate LLM output',
|
|
12
|
+
type: 'generator',
|
|
13
|
+
category: 'AI Generation',
|
|
14
|
+
outputModes: ['per-input', 'single'],
|
|
15
|
+
selectionModes: null,
|
|
16
|
+
defaults: {
|
|
17
|
+
provider: 'claude',
|
|
18
|
+
model: 'claude-sonnet-4-5',
|
|
19
|
+
temperature: 0.7,
|
|
20
|
+
maxTokens: undefined,
|
|
21
|
+
systemPrompt: '',
|
|
22
|
+
outputFields: [{ name: 'output', type: 'string' }],
|
|
23
|
+
useStructuredOutput: true,
|
|
24
|
+
imageInputRefs: [],
|
|
25
|
+
videoInputRefs: [],
|
|
26
|
+
apiKeys: undefined,
|
|
27
|
+
outputMode: 'per-input',
|
|
28
|
+
selectionMode: null,
|
|
29
|
+
},
|
|
30
|
+
computePorts: ({ config }) => {
|
|
31
|
+
// Input ports from template variables + media refs
|
|
32
|
+
const systemPrompt = config?.systemPrompt ?? '';
|
|
33
|
+
const variables = (0, internal_utils_1.extractTemplateVariables)([systemPrompt]);
|
|
34
|
+
const imageInputRefs = config?.imageInputRefs ?? [];
|
|
35
|
+
const videoInputRefs = config?.videoInputRefs ?? [];
|
|
36
|
+
const inputs = [
|
|
37
|
+
...variables.map(v => ({
|
|
38
|
+
id: v,
|
|
39
|
+
type: ['text', 'object', 'boolean'],
|
|
40
|
+
isArray: false,
|
|
41
|
+
required: true,
|
|
42
|
+
})),
|
|
43
|
+
...imageInputRefs.map(ref => ({
|
|
44
|
+
id: ref,
|
|
45
|
+
type: 'image',
|
|
46
|
+
isArray: false,
|
|
47
|
+
required: true,
|
|
48
|
+
})),
|
|
49
|
+
...videoInputRefs.map(ref => ({
|
|
50
|
+
id: ref,
|
|
51
|
+
type: 'video',
|
|
52
|
+
isArray: false,
|
|
53
|
+
required: true,
|
|
54
|
+
})),
|
|
55
|
+
];
|
|
56
|
+
// Output ports from outputFields
|
|
57
|
+
const outputFields = (config?.outputFields ?? [{ name: 'output', type: 'string' }]);
|
|
58
|
+
const outputs = outputFields.map(f => {
|
|
59
|
+
let pType;
|
|
60
|
+
let pIsArray;
|
|
61
|
+
if (f.type === 'array') {
|
|
62
|
+
pType = f.items === 'object' ? 'object' : 'text';
|
|
63
|
+
pIsArray = true;
|
|
64
|
+
}
|
|
65
|
+
else if (f.type === 'object') {
|
|
66
|
+
pType = 'object';
|
|
67
|
+
pIsArray = false;
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
pType = 'text';
|
|
71
|
+
pIsArray = false;
|
|
72
|
+
}
|
|
73
|
+
return {
|
|
74
|
+
id: f.name,
|
|
75
|
+
type: pType,
|
|
76
|
+
isArray: pIsArray,
|
|
77
|
+
required: f.required ?? true,
|
|
78
|
+
// Include objectSchema for object/array-of-object types
|
|
79
|
+
...(f.objectSchema && { objectSchema: f.objectSchema }),
|
|
80
|
+
};
|
|
81
|
+
});
|
|
82
|
+
return { inputs, outputs };
|
|
83
|
+
},
|
|
84
|
+
});
|
|
85
|
+
exports.default = definition;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { BasePortType, EnumOption } from '../types';
|
|
2
|
+
import { type ObjectSchemaField } from './types';
|
|
3
|
+
declare const definition: import("./types").NodeDefinition<"trigger", {
|
|
4
|
+
outputs: Array<{
|
|
5
|
+
id: string;
|
|
6
|
+
type: BasePortType;
|
|
7
|
+
isArray?: boolean;
|
|
8
|
+
objectSchema?: ObjectSchemaField[];
|
|
9
|
+
enumOptions?: EnumOption[];
|
|
10
|
+
}>;
|
|
11
|
+
outputMode: null;
|
|
12
|
+
selectionMode: null;
|
|
13
|
+
}, false>;
|
|
14
|
+
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: 'manual-trigger',
|
|
6
|
+
label: 'Manual Trigger',
|
|
7
|
+
description: 'Trigger manually',
|
|
8
|
+
type: 'trigger',
|
|
9
|
+
category: 'Triggers',
|
|
10
|
+
outputModes: null,
|
|
11
|
+
selectionModes: null,
|
|
12
|
+
defaults: {
|
|
13
|
+
outputs: [{ id: 'input-1', type: 'image' }],
|
|
14
|
+
outputMode: null,
|
|
15
|
+
selectionMode: null,
|
|
16
|
+
},
|
|
17
|
+
computePorts: ({ config }) => {
|
|
18
|
+
const configOutputs = config?.outputs ?? [];
|
|
19
|
+
const outputs = configOutputs.map(output => ({
|
|
20
|
+
id: output.id,
|
|
21
|
+
type: output.type,
|
|
22
|
+
isArray: output.isArray ?? false,
|
|
23
|
+
required: true,
|
|
24
|
+
...(output.type === 'enum' && output.enumOptions ? { enumOptions: output.enumOptions } : {}),
|
|
25
|
+
}));
|
|
26
|
+
return {
|
|
27
|
+
inputs: [],
|
|
28
|
+
outputs,
|
|
29
|
+
};
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
exports.default = definition;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type SelectionConfig, type MediaNodeSelectionType } from './types';
|
|
2
|
+
declare const definition: import("./types").NodeDefinition<"source", {
|
|
3
|
+
outputs: {
|
|
4
|
+
id: string;
|
|
5
|
+
type: MediaNodeSelectionType;
|
|
6
|
+
isArray: boolean;
|
|
7
|
+
selectedMediaIds: string[];
|
|
8
|
+
selectionConfig: SelectionConfig | undefined;
|
|
9
|
+
}[];
|
|
10
|
+
outputMode: "per-input";
|
|
11
|
+
selectionMode: "random";
|
|
12
|
+
}, false>;
|
|
13
|
+
export default definition;
|
|
@@ -0,0 +1,40 @@
|
|
|
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: 'media',
|
|
6
|
+
label: 'Media',
|
|
7
|
+
description: 'Use saved media',
|
|
8
|
+
type: 'source',
|
|
9
|
+
category: 'Sources',
|
|
10
|
+
outputModes: ['per-input', 'single'],
|
|
11
|
+
selectionModes: ['random', 'sequential'],
|
|
12
|
+
defaults: {
|
|
13
|
+
outputs: [{
|
|
14
|
+
id: 'image-1',
|
|
15
|
+
type: 'image',
|
|
16
|
+
isArray: false,
|
|
17
|
+
selectedMediaIds: [],
|
|
18
|
+
selectionConfig: undefined,
|
|
19
|
+
}],
|
|
20
|
+
outputMode: 'per-input',
|
|
21
|
+
selectionMode: 'random',
|
|
22
|
+
},
|
|
23
|
+
computePorts: ({ config }) => {
|
|
24
|
+
const outputConfigs = config?.outputs ?? [];
|
|
25
|
+
// Generate output ports from config (only those with selected media)
|
|
26
|
+
const outputs = outputConfigs
|
|
27
|
+
.filter(o => o.selectedMediaIds.length > 0)
|
|
28
|
+
.map(o => ({
|
|
29
|
+
id: o.id,
|
|
30
|
+
type: o.type,
|
|
31
|
+
isArray: o.isArray,
|
|
32
|
+
required: true,
|
|
33
|
+
}));
|
|
34
|
+
return {
|
|
35
|
+
inputs: [],
|
|
36
|
+
outputs,
|
|
37
|
+
};
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
exports.default = definition;
|
|
@@ -0,0 +1,35 @@
|
|
|
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: 'not',
|
|
6
|
+
label: 'Not',
|
|
7
|
+
description: 'Invert a boolean value',
|
|
8
|
+
type: 'generator',
|
|
9
|
+
category: 'Control Flow',
|
|
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: 'input',
|
|
20
|
+
type: 'boolean',
|
|
21
|
+
isArray: false,
|
|
22
|
+
required: true,
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
outputs: [
|
|
26
|
+
{
|
|
27
|
+
id: 'output',
|
|
28
|
+
type: 'boolean',
|
|
29
|
+
isArray: false,
|
|
30
|
+
required: true,
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
}),
|
|
34
|
+
});
|
|
35
|
+
exports.default = definition;
|