ugcinc 4.1.0 → 4.1.2
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/nodes/account.d.ts +3 -14
- package/dist/automations/nodes/auto-caption.d.ts +17 -57
- package/dist/automations/nodes/auto-caption.js +15 -11
- package/dist/automations/nodes/auto-post.d.ts +7 -65
- package/dist/automations/nodes/auto-post.js +3 -4
- package/dist/automations/nodes/branch.d.ts +9 -45
- package/dist/automations/nodes/branch.js +0 -3
- package/dist/automations/nodes/collect.d.ts +4 -12
- package/dist/automations/nodes/collect.js +3 -7
- package/dist/automations/nodes/compose-workflow.d.ts +3 -15
- package/dist/automations/nodes/compose-workflow.js +33 -14
- package/dist/automations/nodes/create-dm.d.ts +20 -80
- package/dist/automations/nodes/create-dm.js +28 -30
- package/dist/automations/nodes/custom-model.d.ts +4 -4
- package/dist/automations/nodes/deduplicate.d.ts +2 -2
- package/dist/automations/nodes/destructure.d.ts +4 -3
- package/dist/automations/nodes/destructure.js +1 -1
- package/dist/automations/nodes/for-each.d.ts +2 -2
- package/dist/automations/nodes/generate-image.d.ts +2 -2
- package/dist/automations/nodes/generate-video.d.ts +2 -2
- package/dist/automations/nodes/if.d.ts +2 -2
- package/dist/automations/nodes/image-composer.d.ts +35 -21
- package/dist/automations/nodes/image-composer.js +40 -0
- package/dist/automations/nodes/index.d.ts +299 -7
- package/dist/automations/nodes/index.js +6 -7
- package/dist/automations/nodes/internal.d.ts +8 -0
- package/dist/automations/nodes/internal.js +10 -0
- package/dist/automations/nodes/llm.d.ts +2 -2
- package/dist/automations/nodes/manual-trigger.d.ts +10 -29
- package/dist/automations/nodes/manual-trigger.js +1 -1
- package/dist/automations/nodes/media.d.ts +4 -7
- package/dist/automations/nodes/not.d.ts +2 -2
- package/dist/automations/nodes/output.d.ts +4 -17
- package/dist/automations/nodes/random-route.d.ts +4 -31
- package/dist/automations/nodes/random-route.js +5 -5
- package/dist/automations/nodes/random.d.ts +4 -3
- package/dist/automations/nodes/random.js +3 -3
- package/dist/automations/nodes/recurrence.d.ts +4 -43
- package/dist/automations/nodes/recurrence.js +1 -1
- package/dist/automations/nodes/save-to-media.d.ts +4 -20
- package/dist/automations/nodes/save-to-media.js +1 -1
- package/dist/automations/nodes/screenshot-animation.d.ts +2 -2
- package/dist/automations/nodes/social-audio.d.ts +2 -2
- package/dist/automations/nodes/text.d.ts +2 -2
- package/dist/automations/nodes/transcript.d.ts +2 -2
- package/dist/automations/nodes/types.d.ts +44 -20
- package/dist/automations/nodes/types.js +1 -1
- package/dist/automations/nodes/video-composer.d.ts +2 -10
- package/dist/automations/nodes/video-composer.js +65 -19
- package/dist/automations/nodes/video-import.d.ts +2 -19
- package/dist/automations/nodes/video-import.js +2 -16
- package/dist/automations/types.d.ts +45 -158
- package/dist/automations/types.js +4 -76
- package/dist/graph-controller.d.ts +28 -11
- package/dist/graph-controller.js +53 -20
- package/dist/index.d.ts +37 -22
- package/dist/index.js +9 -2
- package/dist/render/compositions/IMessageDmComposition/types.d.ts +6 -6
- 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.d.ts +2 -1
- package/package.json +1 -1
|
@@ -11,71 +11,69 @@ const definition = (0, types_1.defineNode)({
|
|
|
11
11
|
selectionModes: null,
|
|
12
12
|
defaults: {
|
|
13
13
|
platform: 'instagram',
|
|
14
|
-
|
|
14
|
+
platformInputType: 'static',
|
|
15
15
|
lightMode: true,
|
|
16
|
-
|
|
16
|
+
lightModeInputType: 'static',
|
|
17
17
|
username: '',
|
|
18
|
-
|
|
18
|
+
usernameInputType: 'static',
|
|
19
19
|
time: '9:41',
|
|
20
|
-
|
|
20
|
+
timeInputType: 'static',
|
|
21
21
|
profilePicUrl: 'https://ugcinc.co/logo.png',
|
|
22
|
-
|
|
23
|
-
messagesIsVariable: false,
|
|
22
|
+
profilePicInputType: 'static',
|
|
24
23
|
messages: [
|
|
25
24
|
{ sender: 'user', text: 'Wow, this dm automation is realistic right 🤯' },
|
|
26
25
|
{ sender: 'recipient', text: "I know, it's like we're really in imessage" },
|
|
27
26
|
{ sender: 'recipient', text: 'Just be thankful we\'re not on android 😭😭😭' },
|
|
28
27
|
],
|
|
28
|
+
messagesInputType: 'static',
|
|
29
29
|
imageAttachmentUrl: undefined,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
userHasStory: false,
|
|
43
|
-
},
|
|
30
|
+
imageAttachmentInputType: 'static',
|
|
31
|
+
// iMessage-specific
|
|
32
|
+
imessageSenderBubbleColor: undefined,
|
|
33
|
+
imessageShowReadReceipt: false,
|
|
34
|
+
imessageReadReceiptText: 'Read',
|
|
35
|
+
imessageReadReceiptTimeInputType: 'static',
|
|
36
|
+
imessageUnreadBadgeText: '67',
|
|
37
|
+
imessageUnreadBadgeInputType: 'static',
|
|
38
|
+
imessageMessageHeaderTimestampText: '',
|
|
39
|
+
imessageMessageHeaderTimeInputType: 'static',
|
|
40
|
+
// Instagram-specific
|
|
41
|
+
instagramUserHasStory: false,
|
|
44
42
|
outputMode: 'per-input',
|
|
45
43
|
selectionMode: null,
|
|
46
44
|
},
|
|
47
45
|
computePorts: ({ config }) => {
|
|
48
46
|
const inputs = [];
|
|
49
|
-
if (config?.
|
|
47
|
+
if (config?.platformInputType === 'variable') {
|
|
50
48
|
inputs.push({ id: 'platform', type: 'text', isArray: false, required: true });
|
|
51
49
|
}
|
|
52
|
-
if (config?.
|
|
50
|
+
if (config?.lightModeInputType === 'variable') {
|
|
53
51
|
inputs.push({ id: 'light-mode', type: 'boolean', isArray: false, required: false });
|
|
54
52
|
}
|
|
55
|
-
if (config?.
|
|
53
|
+
if (config?.usernameInputType === 'variable') {
|
|
56
54
|
inputs.push({ id: 'username', type: 'text', isArray: false, required: true });
|
|
57
55
|
}
|
|
58
|
-
if (config?.
|
|
56
|
+
if (config?.timeInputType === 'variable') {
|
|
59
57
|
inputs.push({ id: 'time', type: 'text', isArray: false, required: false });
|
|
60
58
|
}
|
|
61
|
-
if (config?.
|
|
59
|
+
if (config?.profilePicInputType === 'variable') {
|
|
62
60
|
inputs.push({ id: 'profile-pic', type: 'image', isArray: false, required: false });
|
|
63
61
|
}
|
|
64
|
-
if (config?.
|
|
62
|
+
if (config?.messagesInputType === 'variable') {
|
|
65
63
|
inputs.push({ id: 'messages', type: 'object', isArray: true, required: true });
|
|
66
64
|
}
|
|
67
|
-
if (config?.
|
|
65
|
+
if (config?.imageAttachmentInputType === 'variable') {
|
|
68
66
|
inputs.push({ id: 'image-attachment', type: 'image', isArray: false, required: false });
|
|
69
67
|
}
|
|
70
68
|
// iMessage-specific
|
|
71
69
|
if (config?.platform === 'imessage') {
|
|
72
|
-
if (config.
|
|
70
|
+
if (config.imessageShowReadReceipt && config.imessageReadReceiptTimeInputType === 'variable') {
|
|
73
71
|
inputs.push({ id: 'read-receipt-time', type: 'text', isArray: false, required: false });
|
|
74
72
|
}
|
|
75
|
-
if (config.
|
|
73
|
+
if (config.imessageUnreadBadgeInputType === 'variable') {
|
|
76
74
|
inputs.push({ id: 'unread-badge', type: 'text', isArray: false, required: false });
|
|
77
75
|
}
|
|
78
|
-
if (config.
|
|
76
|
+
if (config.imessageMessageHeaderTimeInputType === 'variable') {
|
|
79
77
|
inputs.push({ id: 'message-header-time', type: 'text', isArray: false, required: false });
|
|
80
78
|
}
|
|
81
79
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
type CustomModelOutputType = 'image' | 'video' | 'audio';
|
|
2
|
-
interface CustomModelInputParam {
|
|
1
|
+
export type CustomModelOutputType = 'image' | 'video' | 'audio';
|
|
2
|
+
export interface CustomModelInputParam {
|
|
3
3
|
name: string;
|
|
4
4
|
type: string;
|
|
5
5
|
required: boolean;
|
|
@@ -14,6 +14,6 @@ declare const definition: import("./types").NodeDefinition<"generator", {
|
|
|
14
14
|
apiKey: string | undefined;
|
|
15
15
|
outputMode: "per-input";
|
|
16
16
|
selectionMode: null;
|
|
17
|
-
}>;
|
|
17
|
+
}, false>;
|
|
18
18
|
export default definition;
|
|
19
|
-
export type
|
|
19
|
+
export type CustomModelNodeConfig = typeof definition.defaults;
|
|
@@ -3,6 +3,6 @@ declare const definition: import("./types").NodeDefinition<"generator", {
|
|
|
3
3
|
deduplication: DeduplicationLevel;
|
|
4
4
|
outputMode: "per-input";
|
|
5
5
|
selectionMode: null;
|
|
6
|
-
}>;
|
|
6
|
+
}, false>;
|
|
7
7
|
export default definition;
|
|
8
|
-
export type
|
|
8
|
+
export type DeduplicateNodeConfig = typeof definition.defaults;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type InputType } from './types';
|
|
1
2
|
type IndexExpression = {
|
|
2
3
|
type: 'single';
|
|
3
4
|
index: number;
|
|
@@ -12,14 +13,14 @@ type IndexExpression = {
|
|
|
12
13
|
interface DestructureSelection {
|
|
13
14
|
portId: string;
|
|
14
15
|
indexExpr: IndexExpression;
|
|
15
|
-
|
|
16
|
+
inputType?: InputType;
|
|
16
17
|
propertyPath?: string;
|
|
17
18
|
}
|
|
18
19
|
declare const definition: import("./types").NodeDefinition<"generator", {
|
|
19
20
|
selections: DestructureSelection[];
|
|
20
21
|
outputMode: "per-input";
|
|
21
22
|
selectionMode: null;
|
|
22
|
-
}>;
|
|
23
|
+
}, false>;
|
|
23
24
|
export default definition;
|
|
24
25
|
export type { DestructureSelection, IndexExpression };
|
|
25
|
-
export type
|
|
26
|
+
export type DestructureNodeConfig = typeof definition.defaults;
|
|
@@ -40,7 +40,7 @@ const definition = (0, types_1.defineNode)({
|
|
|
40
40
|
}
|
|
41
41
|
for (const selection of selections) {
|
|
42
42
|
// If variable, add input port for index expression
|
|
43
|
-
if (selection.
|
|
43
|
+
if (selection.inputType === 'variable') {
|
|
44
44
|
inputs.push({
|
|
45
45
|
id: `idx-${selection.portId}`,
|
|
46
46
|
type: 'text',
|
|
@@ -17,7 +17,7 @@ declare const definition: import("./types").NodeDefinition<"generator", {
|
|
|
17
17
|
exposeIndex: boolean;
|
|
18
18
|
outputMode: "per-input";
|
|
19
19
|
selectionMode: null;
|
|
20
|
-
}>;
|
|
20
|
+
}, false>;
|
|
21
21
|
export default definition;
|
|
22
22
|
export type { ForEachOutputProperty, ForEachInputPort };
|
|
23
|
-
export type
|
|
23
|
+
export type ForEachNodeConfig = typeof definition.defaults;
|
|
@@ -9,8 +9,8 @@ declare const definition: import("./types").NodeDefinition<"generator", {
|
|
|
9
9
|
apiKey: string | undefined;
|
|
10
10
|
outputMode: "per-input";
|
|
11
11
|
selectionMode: null;
|
|
12
|
-
}>;
|
|
12
|
+
}, false>;
|
|
13
13
|
export default definition;
|
|
14
14
|
export { isEditModel };
|
|
15
15
|
export type { ImageGenerationTextModel, ImageGenerationEditModel, ImageGenerationModel };
|
|
16
|
-
export type
|
|
16
|
+
export type GenerateImageNodeConfig = typeof definition.defaults;
|
|
@@ -9,8 +9,8 @@ declare const definition: import("./types").NodeDefinition<"generator", {
|
|
|
9
9
|
apiKey: string | undefined;
|
|
10
10
|
outputMode: "per-input";
|
|
11
11
|
selectionMode: null;
|
|
12
|
-
}>;
|
|
12
|
+
}, false>;
|
|
13
13
|
export default definition;
|
|
14
14
|
export { isImageToVideoModel };
|
|
15
15
|
export type { VideoGenerationTextToVideoModel, VideoGenerationImageToVideoModel, VideoGenerationModel };
|
|
16
|
-
export type
|
|
16
|
+
export type GenerateVideoNodeConfig = typeof definition.defaults;
|
|
@@ -15,8 +15,8 @@ declare const definition: import("./types").NodeDefinition<"generator", {
|
|
|
15
15
|
passthroughInputs: IfPassthroughInput[];
|
|
16
16
|
outputMode: "per-input";
|
|
17
17
|
selectionMode: null;
|
|
18
|
-
}>;
|
|
18
|
+
}, false>;
|
|
19
19
|
export default definition;
|
|
20
20
|
export { IfLogicOperators };
|
|
21
21
|
export type { IfLogicOperator, IfBooleanInput, IfPassthroughInput };
|
|
22
|
-
export type
|
|
22
|
+
export type IfNodeConfig = typeof definition.defaults;
|
|
@@ -1,5 +1,36 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
1
|
+
import type { ImageEditorElement, DimensionPresetKey, FitMode, DynamicCropConfig } from '../../render/types';
|
|
2
|
+
/**
|
|
3
|
+
* Image editor node configuration
|
|
4
|
+
*
|
|
5
|
+
* This is the complete configuration for an image editor node,
|
|
6
|
+
* including canvas dimensions, elements, and crop settings.
|
|
7
|
+
*/
|
|
8
|
+
export interface ImageEditorNodeConfig {
|
|
9
|
+
/** Canvas width in pixels */
|
|
10
|
+
width: number;
|
|
11
|
+
/** Canvas height in pixels */
|
|
12
|
+
height: number;
|
|
13
|
+
/** Aspect ratio string (e.g., "9:16") */
|
|
14
|
+
aspectRatio: string;
|
|
15
|
+
/** Dimension preset key */
|
|
16
|
+
dimensionPreset: DimensionPresetKey;
|
|
17
|
+
/** Elements to render */
|
|
18
|
+
elements: ImageEditorElement[];
|
|
19
|
+
/** Background type: 'image' for image input, 'color' for solid color */
|
|
20
|
+
backgroundType?: 'image' | 'color';
|
|
21
|
+
/** Background color (hex) when backgroundType is 'color' */
|
|
22
|
+
backgroundColor?: string;
|
|
23
|
+
/** How the background image fits the canvas */
|
|
24
|
+
backgroundFit?: FitMode;
|
|
25
|
+
/** Cached background image URL for consistent preview */
|
|
26
|
+
previewBackgroundUrl?: string;
|
|
27
|
+
/** Cached image URLs for image elements (keyed by inputId) */
|
|
28
|
+
previewImageUrls?: Record<string, string>;
|
|
29
|
+
/** Cached text values for text elements (keyed by textInputId) */
|
|
30
|
+
previewTextValues?: Record<string, string>;
|
|
31
|
+
/** Dynamic cropping configuration */
|
|
32
|
+
dynamicCrop?: DynamicCropConfig;
|
|
33
|
+
}
|
|
3
34
|
declare const definition: import("./types").NodeDefinition<"generator", {
|
|
4
35
|
imageEditor: {
|
|
5
36
|
width: number;
|
|
@@ -11,23 +42,6 @@ declare const definition: import("./types").NodeDefinition<"generator", {
|
|
|
11
42
|
};
|
|
12
43
|
outputMode: "per-input";
|
|
13
44
|
selectionMode: null;
|
|
14
|
-
}>;
|
|
45
|
+
}, false>;
|
|
15
46
|
export default definition;
|
|
16
|
-
export type
|
|
17
|
-
/**
|
|
18
|
-
* Input to the image-composer node executor
|
|
19
|
-
*/
|
|
20
|
-
export interface ImageEditorNodeInput extends Record<string, unknown> {
|
|
21
|
-
type: 'image-composer';
|
|
22
|
-
config: ImageEditorNodeConfig;
|
|
23
|
-
imageUrls: Record<string, string>;
|
|
24
|
-
textValues: Record<string, string>;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Output from the image-composer node executor
|
|
28
|
-
*/
|
|
29
|
-
export interface ImageEditorNodeOutput extends Record<string, unknown>, NodeOutputValues {
|
|
30
|
-
width?: number;
|
|
31
|
-
height?: number;
|
|
32
|
-
aspectRatio?: string;
|
|
33
|
-
}
|
|
47
|
+
export type ImageComposerNodeConfig = typeof definition.defaults;
|
|
@@ -91,5 +91,45 @@ const definition = (0, types_1.defineNode)({
|
|
|
91
91
|
],
|
|
92
92
|
};
|
|
93
93
|
},
|
|
94
|
+
resolvePreview: (config) => {
|
|
95
|
+
const editorConfig = config?.imageEditor;
|
|
96
|
+
if (!editorConfig)
|
|
97
|
+
return null;
|
|
98
|
+
const sources = {};
|
|
99
|
+
const textContent = {};
|
|
100
|
+
// Add background URL if available
|
|
101
|
+
if (editorConfig.previewBackgroundUrl) {
|
|
102
|
+
sources['background'] = editorConfig.previewBackgroundUrl;
|
|
103
|
+
}
|
|
104
|
+
// Resolve image elements: inputId -> element.id
|
|
105
|
+
// Resolve text elements: textInputId -> element.id
|
|
106
|
+
for (const elem of editorConfig.elements) {
|
|
107
|
+
if (elem.type === 'image' && elem.inputId) {
|
|
108
|
+
const url = editorConfig.previewImageUrls?.[elem.inputId];
|
|
109
|
+
if (url) {
|
|
110
|
+
sources[elem.id] = url;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
else if (elem.type === 'text' && elem.textInputId) {
|
|
114
|
+
const text = editorConfig.previewTextValues?.[elem.textInputId];
|
|
115
|
+
if (text) {
|
|
116
|
+
textContent[elem.id] = text;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
return {
|
|
121
|
+
renderConfig: {
|
|
122
|
+
elements: editorConfig.elements,
|
|
123
|
+
width: editorConfig.width,
|
|
124
|
+
height: editorConfig.height,
|
|
125
|
+
backgroundType: editorConfig.backgroundType,
|
|
126
|
+
backgroundColor: editorConfig.backgroundColor,
|
|
127
|
+
backgroundFit: editorConfig.backgroundFit,
|
|
128
|
+
dynamicCrop: editorConfig.dynamicCrop,
|
|
129
|
+
},
|
|
130
|
+
sources,
|
|
131
|
+
textContent,
|
|
132
|
+
};
|
|
133
|
+
},
|
|
94
134
|
});
|
|
95
135
|
exports.default = definition;
|
|
@@ -1,14 +1,307 @@
|
|
|
1
|
-
import type { UserCreatableNodeType } from '../types';
|
|
2
1
|
import type { NodeDefinition } from './types';
|
|
3
|
-
type
|
|
2
|
+
import { internalNodeTypes, type InternalNodeType } from './internal';
|
|
4
3
|
/**
|
|
5
4
|
* Registry of all user-creatable node definitions.
|
|
6
5
|
* This is the single source of truth for node types.
|
|
7
|
-
*
|
|
8
|
-
* Note: Internal executor types like 'for-each-value' are not included here
|
|
9
|
-
* as they are created dynamically during execution, not by users.
|
|
10
6
|
*/
|
|
11
|
-
export declare const nodeDefinitions:
|
|
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: import("./auto-caption").AutoCaptionPreset;
|
|
15
|
+
fontName: string | undefined;
|
|
16
|
+
fontSize: number | undefined;
|
|
17
|
+
fontWeight: import("./auto-caption").AutoCaptionFontWeight | undefined;
|
|
18
|
+
fontColor: string | undefined;
|
|
19
|
+
highlightColor: string | undefined;
|
|
20
|
+
strokeColor: string | undefined;
|
|
21
|
+
strokeWidth: number | undefined;
|
|
22
|
+
backgroundColor: string | undefined;
|
|
23
|
+
position: import("./auto-caption").AutoCaptionPosition | 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: import("./auto-post").AutoPostMode;
|
|
34
|
+
inputType: import("./types").InputType;
|
|
35
|
+
imageInputs: Array<{
|
|
36
|
+
id: string;
|
|
37
|
+
}>;
|
|
38
|
+
socialAudioIsVariable: boolean;
|
|
39
|
+
socialAudioSelectedIds: string[];
|
|
40
|
+
schedulingMode: import("./auto-post").PostSchedulingMode;
|
|
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: import("./create-dm").DmPlatform;
|
|
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>;
|
|
12
305
|
/**
|
|
13
306
|
* Get all node definitions as an array
|
|
14
307
|
*/
|
|
@@ -17,4 +310,3 @@ export declare function getAllNodeDefinitions(): AnyNodeDefinition[];
|
|
|
17
310
|
* Get a node definition by its nodeId
|
|
18
311
|
*/
|
|
19
312
|
export declare function getNodeDefinition(nodeId: UserCreatableNodeType): AnyNodeDefinition | undefined;
|
|
20
|
-
export {};
|