ugcinc 4.1.21 → 4.1.23
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/branch.d.ts +7 -4
- package/dist/automations/nodes/branch.js +25 -4
- package/dist/automations/nodes/index.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/package.json +1 -1
- package/dist/automations.d.ts +0 -173
- package/dist/automations.js +0 -194
- package/dist/node-runtime.d.ts +0 -57
- package/dist/node-runtime.js +0 -6
- package/dist/nodes/account.d.ts +0 -7
- package/dist/nodes/account.js +0 -29
- package/dist/nodes/auto-caption.d.ts +0 -17
- package/dist/nodes/auto-caption.js +0 -46
- package/dist/nodes/auto-post.d.ts +0 -21
- package/dist/nodes/auto-post.js +0 -54
- package/dist/nodes/branch.d.ts +0 -12
- package/dist/nodes/branch.js +0 -50
- package/dist/nodes/collect.d.ts +0 -6
- package/dist/nodes/collect.js +0 -56
- package/dist/nodes/compose-workflow.d.ts +0 -21
- package/dist/nodes/compose-workflow.js +0 -42
- package/dist/nodes/create-dm.d.ts +0 -40
- package/dist/nodes/create-dm.js +0 -88
- package/dist/nodes/custom-model.d.ts +0 -19
- package/dist/nodes/custom-model.js +0 -52
- package/dist/nodes/deduplicate.d.ts +0 -8
- package/dist/nodes/deduplicate.js +0 -36
- package/dist/nodes/destructure.d.ts +0 -25
- package/dist/nodes/destructure.js +0 -65
- package/dist/nodes/for-each.d.ts +0 -23
- package/dist/nodes/for-each.js +0 -84
- package/dist/nodes/generate-image.d.ts +0 -16
- package/dist/nodes/generate-image.js +0 -45
- package/dist/nodes/generate-video.d.ts +0 -16
- package/dist/nodes/generate-video.js +0 -45
- package/dist/nodes/if.d.ts +0 -22
- package/dist/nodes/if.js +0 -44
- package/dist/nodes/image-composer.d.ts +0 -14
- package/dist/nodes/image-composer.js +0 -95
- package/dist/nodes/index.d.ts +0 -20
- package/dist/nodes/index.js +0 -93
- package/dist/nodes/llm.d.ts +0 -27
- package/dist/nodes/llm.js +0 -85
- package/dist/nodes/manual-trigger.d.ts +0 -16
- package/dist/nodes/manual-trigger.js +0 -32
- package/dist/nodes/media.d.ts +0 -17
- package/dist/nodes/media.js +0 -40
- package/dist/nodes/not.d.ts +0 -6
- package/dist/nodes/not.js +0 -35
- package/dist/nodes/output.d.ts +0 -9
- package/dist/nodes/output.js +0 -32
- package/dist/nodes/random-route.d.ts +0 -3
- package/dist/nodes/random-route.js +0 -50
- package/dist/nodes/random.d.ts +0 -3
- package/dist/nodes/random.js +0 -48
- package/dist/nodes/recurrence.d.ts +0 -3
- package/dist/nodes/recurrence.js +0 -45
- package/dist/nodes/save-to-media.d.ts +0 -3
- package/dist/nodes/save-to-media.js +0 -26
- package/dist/nodes/screenshot-animation.d.ts +0 -7
- package/dist/nodes/screenshot-animation.js +0 -36
- package/dist/nodes/social-audio.d.ts +0 -3
- package/dist/nodes/social-audio.js +0 -26
- package/dist/nodes/text.d.ts +0 -3
- package/dist/nodes/text.js +0 -38
- package/dist/nodes/transcript.d.ts +0 -3
- package/dist/nodes/transcript.js +0 -42
- package/dist/nodes/types.d.ts +0 -146
- package/dist/nodes/types.js +0 -22
- package/dist/nodes/video-composer.d.ts +0 -3
- package/dist/nodes/video-composer.js +0 -67
- package/dist/nodes/video-import.d.ts +0 -3
- package/dist/nodes/video-import.js +0 -35
- package/dist/ports.d.ts +0 -54
- package/dist/ports.js +0 -327
package/dist/nodes/auto-post.js
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
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: 'auto-post',
|
|
6
|
-
label: 'Auto Post',
|
|
7
|
-
description: 'Publish a video or slideshow',
|
|
8
|
-
type: 'terminal',
|
|
9
|
-
category: 'Output',
|
|
10
|
-
outputModes: null,
|
|
11
|
-
selectionModes: null,
|
|
12
|
-
defaults: {
|
|
13
|
-
mode: 'video',
|
|
14
|
-
inputType: 'static',
|
|
15
|
-
inputs: [],
|
|
16
|
-
socialAudioIsVariable: false,
|
|
17
|
-
schedulingMode: 'scheduled',
|
|
18
|
-
minDistanceHours: 4,
|
|
19
|
-
maxPostsPerDay: 3,
|
|
20
|
-
randomWindowStart: '09:00',
|
|
21
|
-
randomWindowEnd: '21:00',
|
|
22
|
-
timezone: 'America/New_York',
|
|
23
|
-
requireApproval: false,
|
|
24
|
-
outputMode: null,
|
|
25
|
-
selectionMode: null,
|
|
26
|
-
},
|
|
27
|
-
computePorts: ({ config }) => {
|
|
28
|
-
const mode = config?.mode ?? 'video';
|
|
29
|
-
const inputs = [];
|
|
30
|
-
if (mode === 'video') {
|
|
31
|
-
inputs.push({ id: 'video', type: 'video', isArray: false, required: true });
|
|
32
|
-
}
|
|
33
|
-
else {
|
|
34
|
-
const inputType = config?.inputType ?? 'static';
|
|
35
|
-
if (inputType === 'variable') {
|
|
36
|
-
inputs.push({ id: 'images', type: 'object', isArray: false, required: true });
|
|
37
|
-
}
|
|
38
|
-
else {
|
|
39
|
-
const imageInputs = config?.inputs ?? [{ id: 'image1' }, { id: 'image2' }, { id: 'image3' }];
|
|
40
|
-
for (const input of imageInputs) {
|
|
41
|
-
inputs.push({ id: input.id, type: 'image', isArray: false, required: true });
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
// Static inputs for both modes
|
|
46
|
-
inputs.push({ id: 'account', type: 'account', isArray: false, required: true }, { id: 'caption', type: 'text', isArray: false, required: false });
|
|
47
|
-
// Social audio variable input
|
|
48
|
-
if (config?.socialAudioIsVariable) {
|
|
49
|
-
inputs.push({ id: 'social-audio', type: 'audio', isArray: false, required: false });
|
|
50
|
-
}
|
|
51
|
-
return { inputs, outputs: [] };
|
|
52
|
-
},
|
|
53
|
-
});
|
|
54
|
-
exports.default = definition;
|
package/dist/nodes/branch.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { PassthroughInput } from './types';
|
|
2
|
-
declare const definition: import("./types").NodeDefinition<"generator", {
|
|
3
|
-
branches: {
|
|
4
|
-
key: string;
|
|
5
|
-
}[];
|
|
6
|
-
passthroughInputs: PassthroughInput[];
|
|
7
|
-
defaultBranchKey: string;
|
|
8
|
-
outputMode: "per-input";
|
|
9
|
-
selectionMode: null;
|
|
10
|
-
}>;
|
|
11
|
-
export default definition;
|
|
12
|
-
export type BranchConfig = typeof definition.defaults;
|
package/dist/nodes/branch.js
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
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: 'branch',
|
|
6
|
-
label: 'Branch',
|
|
7
|
-
description: 'Route inputs based on a key match',
|
|
8
|
-
type: 'generator',
|
|
9
|
-
category: 'Control Flow',
|
|
10
|
-
outputModes: ['per-input', 'single'],
|
|
11
|
-
selectionModes: null,
|
|
12
|
-
defaults: {
|
|
13
|
-
branches: [
|
|
14
|
-
{ key: 'option-a' },
|
|
15
|
-
{ key: 'option-b' },
|
|
16
|
-
],
|
|
17
|
-
passthroughInputs: [{ id: 'input', type: 'image', isArray: false }],
|
|
18
|
-
defaultBranchKey: 'option-a',
|
|
19
|
-
outputMode: 'per-input',
|
|
20
|
-
selectionMode: null,
|
|
21
|
-
},
|
|
22
|
-
computePorts: ({ config }) => {
|
|
23
|
-
const branches = config?.branches ?? [];
|
|
24
|
-
const passthroughInputs = config?.passthroughInputs ?? [];
|
|
25
|
-
const inputs = [];
|
|
26
|
-
const outputs = [];
|
|
27
|
-
// Always add key input for branch selection
|
|
28
|
-
inputs.push({ id: 'key', type: 'text', isArray: false, required: true });
|
|
29
|
-
// Add input ports for each branch × passthrough where isVariable is true
|
|
30
|
-
for (const passthrough of passthroughInputs) {
|
|
31
|
-
const pType = passthrough.type;
|
|
32
|
-
const pIsArray = passthrough.isArray ?? false;
|
|
33
|
-
for (const branch of branches) {
|
|
34
|
-
const branchValue = passthrough.branchValues?.[branch.key];
|
|
35
|
-
if (branchValue?.inputType === 'variable') {
|
|
36
|
-
inputs.push({
|
|
37
|
-
id: `${branch.key}-${passthrough.id}`,
|
|
38
|
-
type: pType,
|
|
39
|
-
isArray: pIsArray,
|
|
40
|
-
required: true,
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
// One output per passthrough
|
|
45
|
-
outputs.push({ id: passthrough.id, type: pType, isArray: pIsArray, required: true });
|
|
46
|
-
}
|
|
47
|
-
return { inputs, outputs };
|
|
48
|
-
},
|
|
49
|
-
});
|
|
50
|
-
exports.default = definition;
|
package/dist/nodes/collect.d.ts
DELETED
package/dist/nodes/collect.js
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
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: 'collect',
|
|
6
|
-
label: 'Collect',
|
|
7
|
-
description: 'Collect outputs from a for-each loop into an array',
|
|
8
|
-
type: 'generator',
|
|
9
|
-
category: 'Control Flow',
|
|
10
|
-
outputModes: ['per-input', 'single'],
|
|
11
|
-
selectionModes: null,
|
|
12
|
-
defaults: {
|
|
13
|
-
outputMode: 'single', // Collect produces a single output after all loop iterations complete
|
|
14
|
-
selectionMode: null,
|
|
15
|
-
},
|
|
16
|
-
computePorts: ({ getConnectedOutput }) => {
|
|
17
|
-
// Input: accepts any non-array type (union)
|
|
18
|
-
const inputTypes = ['image', 'video', 'audio', 'text', 'object', 'boolean', 'number'];
|
|
19
|
-
// Default output: union of all types (will be array)
|
|
20
|
-
const defaultOutputTypes = ['image', 'video', 'audio', 'text', 'object'];
|
|
21
|
-
// Determine output type from connected input (inverse of for-each pattern)
|
|
22
|
-
let outputType = defaultOutputTypes;
|
|
23
|
-
let outputIsArray = true;
|
|
24
|
-
if (getConnectedOutput) {
|
|
25
|
-
const connectedOutput = getConnectedOutput('value');
|
|
26
|
-
if (connectedOutput?.type) {
|
|
27
|
-
const connType = connectedOutput.type;
|
|
28
|
-
// Handle single type (not a union)
|
|
29
|
-
if (!Array.isArray(connType) && !connectedOutput.isArray) {
|
|
30
|
-
// If connected to a non-array type, output is an array of that type
|
|
31
|
-
outputType = connType;
|
|
32
|
-
outputIsArray = true;
|
|
33
|
-
}
|
|
34
|
-
// If connected to a union type, can't narrow - keep default union
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
const inputs = [
|
|
38
|
-
{
|
|
39
|
-
id: 'value',
|
|
40
|
-
type: inputTypes,
|
|
41
|
-
isArray: false,
|
|
42
|
-
required: true,
|
|
43
|
-
},
|
|
44
|
-
];
|
|
45
|
-
const outputs = [
|
|
46
|
-
{
|
|
47
|
-
id: 'array',
|
|
48
|
-
type: outputType,
|
|
49
|
-
isArray: outputIsArray,
|
|
50
|
-
required: true,
|
|
51
|
-
},
|
|
52
|
-
];
|
|
53
|
-
return { inputs, outputs };
|
|
54
|
-
},
|
|
55
|
-
});
|
|
56
|
-
exports.default = definition;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { ResolvedPorts, EnumOption } from '../types';
|
|
2
|
-
import { type ObjectSchemaField } from './types';
|
|
3
|
-
declare const definition: import("./types").NodeDefinition<"generator", {
|
|
4
|
-
workflowTemplateId: string | undefined;
|
|
5
|
-
workflowVariableNodes: Array<{
|
|
6
|
-
id: string;
|
|
7
|
-
name?: string;
|
|
8
|
-
variableType?: "image" | "video" | "audio" | "text" | "enum";
|
|
9
|
-
enumOptions?: EnumOption[];
|
|
10
|
-
}>;
|
|
11
|
-
workflowOutputSchema: Record<string, {
|
|
12
|
-
type: string;
|
|
13
|
-
isArray?: boolean;
|
|
14
|
-
objectSchema?: ObjectSchemaField[];
|
|
15
|
-
}>;
|
|
16
|
-
resolvedPorts: ResolvedPorts | undefined;
|
|
17
|
-
outputMode: "per-input";
|
|
18
|
-
selectionMode: null;
|
|
19
|
-
}>;
|
|
20
|
-
export default definition;
|
|
21
|
-
export type ComposeWorkflowConfig = typeof definition.defaults;
|
|
@@ -1,42 +0,0 @@
|
|
|
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: 'compose-workflow',
|
|
6
|
-
label: 'Compose Workflow',
|
|
7
|
-
description: 'Embed other workflows',
|
|
8
|
-
type: 'generator',
|
|
9
|
-
category: 'Generation',
|
|
10
|
-
outputModes: ['per-input', 'single'],
|
|
11
|
-
selectionModes: null,
|
|
12
|
-
defaults: {
|
|
13
|
-
workflowTemplateId: undefined,
|
|
14
|
-
workflowVariableNodes: [],
|
|
15
|
-
workflowOutputSchema: {},
|
|
16
|
-
resolvedPorts: undefined,
|
|
17
|
-
outputMode: 'per-input',
|
|
18
|
-
selectionMode: null,
|
|
19
|
-
},
|
|
20
|
-
computePorts: ({ config }) => {
|
|
21
|
-
const variableNodes = config?.workflowVariableNodes ?? [];
|
|
22
|
-
const outputSchema = config?.workflowOutputSchema ?? {};
|
|
23
|
-
// Inputs from workflow variable nodes
|
|
24
|
-
const inputs = variableNodes.map(v => ({
|
|
25
|
-
id: v.id,
|
|
26
|
-
type: (v.variableType ?? 'text'),
|
|
27
|
-
isArray: false,
|
|
28
|
-
required: true,
|
|
29
|
-
...(v.variableType === 'enum' && v.enumOptions ? { enumOptions: v.enumOptions } : {}),
|
|
30
|
-
}));
|
|
31
|
-
// Outputs from workflow output schema
|
|
32
|
-
const outputs = Object.entries(outputSchema).map(([id, schema]) => ({
|
|
33
|
-
id,
|
|
34
|
-
type: schema.type,
|
|
35
|
-
isArray: schema.isArray ?? false,
|
|
36
|
-
required: true,
|
|
37
|
-
...(schema.objectSchema && { objectSchema: schema.objectSchema }),
|
|
38
|
-
}));
|
|
39
|
-
return { inputs, outputs };
|
|
40
|
-
},
|
|
41
|
-
});
|
|
42
|
-
exports.default = definition;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import type { InputType } from './types';
|
|
2
|
-
type DmPlatform = 'imessage' | 'instagram';
|
|
3
|
-
interface DmMessage {
|
|
4
|
-
sender: 'user' | 'recipient';
|
|
5
|
-
text: string;
|
|
6
|
-
hasImage?: boolean;
|
|
7
|
-
}
|
|
8
|
-
declare const definition: import("./types").NodeDefinition<"generator", {
|
|
9
|
-
platform: DmPlatform;
|
|
10
|
-
platformIsVariable: boolean;
|
|
11
|
-
lightMode: boolean;
|
|
12
|
-
lightModeIsVariable: boolean;
|
|
13
|
-
username: string;
|
|
14
|
-
usernameIsVariable: boolean;
|
|
15
|
-
time: string;
|
|
16
|
-
timeIsVariable: boolean;
|
|
17
|
-
profilePicUrl: string;
|
|
18
|
-
profilePicIsVariable: boolean;
|
|
19
|
-
messagesInputType: InputType;
|
|
20
|
-
messages: DmMessage[];
|
|
21
|
-
imageAttachmentUrl: string | undefined;
|
|
22
|
-
imageAttachmentIsVariable: boolean;
|
|
23
|
-
imessage: {
|
|
24
|
-
senderBubbleColor: string | undefined;
|
|
25
|
-
showReadReceipt: boolean;
|
|
26
|
-
readReceiptText: string;
|
|
27
|
-
readReceiptTimeIsVariable: boolean;
|
|
28
|
-
unreadBadgeText: string;
|
|
29
|
-
unreadBadgeIsVariable: boolean;
|
|
30
|
-
messageHeaderTimestampText: string;
|
|
31
|
-
messageHeaderTimeIsVariable: boolean;
|
|
32
|
-
};
|
|
33
|
-
instagram: {
|
|
34
|
-
userHasStory: boolean;
|
|
35
|
-
};
|
|
36
|
-
outputMode: "per-input";
|
|
37
|
-
selectionMode: null;
|
|
38
|
-
}>;
|
|
39
|
-
export default definition;
|
|
40
|
-
export type CreateDmConfig = typeof definition.defaults;
|
package/dist/nodes/create-dm.js
DELETED
|
@@ -1,88 +0,0 @@
|
|
|
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: 'create-dm',
|
|
6
|
-
label: 'Create DM',
|
|
7
|
-
description: 'Create fake DM screenshots for iMessage or Instagram',
|
|
8
|
-
type: 'generator',
|
|
9
|
-
category: 'Generation',
|
|
10
|
-
outputModes: ['per-input', 'single'],
|
|
11
|
-
selectionModes: null,
|
|
12
|
-
defaults: {
|
|
13
|
-
platform: 'instagram',
|
|
14
|
-
platformIsVariable: false,
|
|
15
|
-
lightMode: true,
|
|
16
|
-
lightModeIsVariable: false,
|
|
17
|
-
username: '',
|
|
18
|
-
usernameIsVariable: false,
|
|
19
|
-
time: '9:41',
|
|
20
|
-
timeIsVariable: false,
|
|
21
|
-
profilePicUrl: 'https://ugcinc.co/logo.png',
|
|
22
|
-
profilePicIsVariable: false,
|
|
23
|
-
messagesInputType: 'static',
|
|
24
|
-
messages: [
|
|
25
|
-
{ sender: 'user', text: 'Wow, this dm automation is realistic right 🤯' },
|
|
26
|
-
{ sender: 'recipient', text: "I know, it's like we're really in imessage" },
|
|
27
|
-
{ sender: 'recipient', text: 'Just be thankful we\'re not on android 😭😭😭' },
|
|
28
|
-
],
|
|
29
|
-
imageAttachmentUrl: undefined,
|
|
30
|
-
imageAttachmentIsVariable: false,
|
|
31
|
-
imessage: {
|
|
32
|
-
senderBubbleColor: undefined,
|
|
33
|
-
showReadReceipt: false,
|
|
34
|
-
readReceiptText: 'Read',
|
|
35
|
-
readReceiptTimeIsVariable: false,
|
|
36
|
-
unreadBadgeText: '67',
|
|
37
|
-
unreadBadgeIsVariable: false,
|
|
38
|
-
messageHeaderTimestampText: '',
|
|
39
|
-
messageHeaderTimeIsVariable: false,
|
|
40
|
-
},
|
|
41
|
-
instagram: {
|
|
42
|
-
userHasStory: false,
|
|
43
|
-
},
|
|
44
|
-
outputMode: 'per-input',
|
|
45
|
-
selectionMode: null,
|
|
46
|
-
},
|
|
47
|
-
computePorts: ({ config }) => {
|
|
48
|
-
const inputs = [];
|
|
49
|
-
if (config?.platformIsVariable) {
|
|
50
|
-
inputs.push({ id: 'platform', type: 'text', isArray: false, required: true });
|
|
51
|
-
}
|
|
52
|
-
if (config?.lightModeIsVariable) {
|
|
53
|
-
inputs.push({ id: 'light-mode', type: 'boolean', isArray: false, required: false });
|
|
54
|
-
}
|
|
55
|
-
if (config?.usernameIsVariable) {
|
|
56
|
-
inputs.push({ id: 'username', type: 'text', isArray: false, required: true });
|
|
57
|
-
}
|
|
58
|
-
if (config?.timeIsVariable) {
|
|
59
|
-
inputs.push({ id: 'time', type: 'text', isArray: false, required: false });
|
|
60
|
-
}
|
|
61
|
-
if (config?.profilePicIsVariable) {
|
|
62
|
-
inputs.push({ id: 'profile-pic', type: 'image', isArray: false, required: false });
|
|
63
|
-
}
|
|
64
|
-
if (config?.messagesInputType === 'variable') {
|
|
65
|
-
inputs.push({ id: 'messages', type: 'object', isArray: true, required: true });
|
|
66
|
-
}
|
|
67
|
-
if (config?.imageAttachmentIsVariable) {
|
|
68
|
-
inputs.push({ id: 'image-attachment', type: 'image', isArray: false, required: false });
|
|
69
|
-
}
|
|
70
|
-
// iMessage-specific
|
|
71
|
-
if (config?.platform === 'imessage') {
|
|
72
|
-
if (config.imessage?.showReadReceipt && config.imessage?.readReceiptTimeIsVariable) {
|
|
73
|
-
inputs.push({ id: 'read-receipt-time', type: 'text', isArray: false, required: false });
|
|
74
|
-
}
|
|
75
|
-
if (config.imessage?.unreadBadgeIsVariable) {
|
|
76
|
-
inputs.push({ id: 'unread-badge', type: 'text', isArray: false, required: false });
|
|
77
|
-
}
|
|
78
|
-
if (config.imessage?.messageHeaderTimeIsVariable) {
|
|
79
|
-
inputs.push({ id: 'message-header-time', type: 'text', isArray: false, required: false });
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
return {
|
|
83
|
-
inputs,
|
|
84
|
-
outputs: [{ id: 'output', type: 'image', isArray: false, required: true }],
|
|
85
|
-
};
|
|
86
|
-
},
|
|
87
|
-
});
|
|
88
|
-
exports.default = definition;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
type CustomModelOutputType = 'image' | 'video' | 'audio';
|
|
2
|
-
interface CustomModelInputParam {
|
|
3
|
-
name: string;
|
|
4
|
-
type: string;
|
|
5
|
-
required: boolean;
|
|
6
|
-
description?: string;
|
|
7
|
-
default?: unknown;
|
|
8
|
-
}
|
|
9
|
-
declare const definition: import("./types").NodeDefinition<"generator", {
|
|
10
|
-
modelId: string;
|
|
11
|
-
modelName: string;
|
|
12
|
-
outputType: CustomModelOutputType;
|
|
13
|
-
inputParams: CustomModelInputParam[];
|
|
14
|
-
apiKey: string | undefined;
|
|
15
|
-
outputMode: "per-input";
|
|
16
|
-
selectionMode: null;
|
|
17
|
-
}>;
|
|
18
|
-
export default definition;
|
|
19
|
-
export type CustomModelConfig = typeof definition.defaults;
|
|
@@ -1,52 +0,0 @@
|
|
|
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: 'custom-model',
|
|
6
|
-
label: 'Custom Model',
|
|
7
|
-
description: 'Call any fal.ai model',
|
|
8
|
-
type: 'generator',
|
|
9
|
-
category: 'AI Generation',
|
|
10
|
-
outputModes: ['per-input', 'single'],
|
|
11
|
-
selectionModes: null,
|
|
12
|
-
defaults: {
|
|
13
|
-
modelId: '',
|
|
14
|
-
modelName: '',
|
|
15
|
-
outputType: 'image',
|
|
16
|
-
inputParams: [],
|
|
17
|
-
apiKey: undefined,
|
|
18
|
-
outputMode: 'per-input',
|
|
19
|
-
selectionMode: null,
|
|
20
|
-
},
|
|
21
|
-
computePorts: ({ config }) => {
|
|
22
|
-
const inputParams = config?.inputParams ?? [];
|
|
23
|
-
const outputType = config?.outputType ?? 'image';
|
|
24
|
-
// Generate input ports from inputParams
|
|
25
|
-
// Only params with name 'prompt' or type image/video/audio become input ports
|
|
26
|
-
const inputs = inputParams
|
|
27
|
-
.filter(param => param.name === 'prompt' ||
|
|
28
|
-
param.type === 'image' ||
|
|
29
|
-
param.type === 'video' ||
|
|
30
|
-
param.type === 'audio')
|
|
31
|
-
.map(param => ({
|
|
32
|
-
id: param.name,
|
|
33
|
-
type: (param.type === 'image' || param.type === 'video' || param.type === 'audio')
|
|
34
|
-
? param.type
|
|
35
|
-
: 'text',
|
|
36
|
-
isArray: false,
|
|
37
|
-
required: param.required,
|
|
38
|
-
}));
|
|
39
|
-
return {
|
|
40
|
-
inputs,
|
|
41
|
-
outputs: [
|
|
42
|
-
{
|
|
43
|
-
id: 'output',
|
|
44
|
-
type: outputType,
|
|
45
|
-
isArray: false,
|
|
46
|
-
required: true,
|
|
47
|
-
},
|
|
48
|
-
],
|
|
49
|
-
};
|
|
50
|
-
},
|
|
51
|
-
});
|
|
52
|
-
exports.default = definition;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { DeduplicationLevel } from '../render/types';
|
|
2
|
-
declare const definition: import("./types").NodeDefinition<"generator", {
|
|
3
|
-
deduplication: DeduplicationLevel;
|
|
4
|
-
outputMode: "per-input";
|
|
5
|
-
selectionMode: null;
|
|
6
|
-
}>;
|
|
7
|
-
export default definition;
|
|
8
|
-
export type DeduplicateConfig = typeof definition.defaults;
|
|
@@ -1,36 +0,0 @@
|
|
|
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: 'deduplicate',
|
|
6
|
-
label: 'Mass Repost',
|
|
7
|
-
description: 'Make videos unique for safe reposting',
|
|
8
|
-
type: 'generator',
|
|
9
|
-
category: 'Generation',
|
|
10
|
-
outputModes: ['per-input', 'single'],
|
|
11
|
-
selectionModes: null,
|
|
12
|
-
defaults: {
|
|
13
|
-
deduplication: 'level3',
|
|
14
|
-
outputMode: 'per-input',
|
|
15
|
-
selectionMode: null,
|
|
16
|
-
},
|
|
17
|
-
computePorts: () => ({
|
|
18
|
-
inputs: [
|
|
19
|
-
{
|
|
20
|
-
id: 'video',
|
|
21
|
-
type: 'video',
|
|
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;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
type IndexExpression = {
|
|
2
|
-
type: 'single';
|
|
3
|
-
index: number;
|
|
4
|
-
} | {
|
|
5
|
-
type: 'range';
|
|
6
|
-
start: number;
|
|
7
|
-
end: number;
|
|
8
|
-
} | {
|
|
9
|
-
type: 'list';
|
|
10
|
-
indexes: number[];
|
|
11
|
-
};
|
|
12
|
-
interface DestructureSelection {
|
|
13
|
-
portId: string;
|
|
14
|
-
indexExpr: IndexExpression;
|
|
15
|
-
isVariable?: boolean;
|
|
16
|
-
propertyPath?: string;
|
|
17
|
-
}
|
|
18
|
-
declare const definition: import("./types").NodeDefinition<"generator", {
|
|
19
|
-
selections: DestructureSelection[];
|
|
20
|
-
outputMode: "per-input";
|
|
21
|
-
selectionMode: null;
|
|
22
|
-
}>;
|
|
23
|
-
export default definition;
|
|
24
|
-
export type { DestructureSelection, IndexExpression };
|
|
25
|
-
export type DestructureConfig = typeof definition.defaults;
|
|
@@ -1,65 +0,0 @@
|
|
|
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: 'destructure',
|
|
6
|
-
label: 'Destructure',
|
|
7
|
-
description: 'Extract specific elements from an array by index or range',
|
|
8
|
-
type: 'generator',
|
|
9
|
-
category: 'Control Flow',
|
|
10
|
-
outputModes: ['per-input', 'single'],
|
|
11
|
-
selectionModes: null,
|
|
12
|
-
defaults: {
|
|
13
|
-
selections: [],
|
|
14
|
-
outputMode: 'per-input',
|
|
15
|
-
selectionMode: null,
|
|
16
|
-
},
|
|
17
|
-
computePorts: ({ config, getConnectedOutput }) => {
|
|
18
|
-
const selections = config?.selections ?? [];
|
|
19
|
-
// Input accepts any array type
|
|
20
|
-
const inputTypes = ['image', 'video', 'audio', 'text', 'object'];
|
|
21
|
-
const inputs = [
|
|
22
|
-
{
|
|
23
|
-
id: 'array',
|
|
24
|
-
type: inputTypes,
|
|
25
|
-
isArray: true,
|
|
26
|
-
required: true,
|
|
27
|
-
},
|
|
28
|
-
];
|
|
29
|
-
const outputs = [];
|
|
30
|
-
// Determine base type from connected input
|
|
31
|
-
let baseType = 'object';
|
|
32
|
-
if (getConnectedOutput) {
|
|
33
|
-
const connectedOutput = getConnectedOutput('array');
|
|
34
|
-
if (connectedOutput?.type && connectedOutput.isArray) {
|
|
35
|
-
const connType = connectedOutput.type;
|
|
36
|
-
if (!Array.isArray(connType)) {
|
|
37
|
-
baseType = connType;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
for (const selection of selections) {
|
|
42
|
-
// If variable, add input port for index expression
|
|
43
|
-
if (selection.isVariable) {
|
|
44
|
-
inputs.push({
|
|
45
|
-
id: `idx-${selection.portId}`,
|
|
46
|
-
type: 'text',
|
|
47
|
-
isArray: false,
|
|
48
|
-
required: true,
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
// Output type depends on index expression:
|
|
52
|
-
// - 'single' -> single item (isArray: false)
|
|
53
|
-
// - 'range' or 'list' -> array of items (isArray: true)
|
|
54
|
-
const outputIsArray = selection.indexExpr.type !== 'single';
|
|
55
|
-
outputs.push({
|
|
56
|
-
id: selection.portId,
|
|
57
|
-
type: baseType,
|
|
58
|
-
isArray: outputIsArray,
|
|
59
|
-
required: true,
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
return { inputs, outputs };
|
|
63
|
-
},
|
|
64
|
-
});
|
|
65
|
-
exports.default = definition;
|
package/dist/nodes/for-each.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { BasePortType } from '../types';
|
|
2
|
-
interface ForEachOutputProperty {
|
|
3
|
-
portId: string;
|
|
4
|
-
propertyPath: string;
|
|
5
|
-
type: BasePortType;
|
|
6
|
-
isArray: boolean;
|
|
7
|
-
}
|
|
8
|
-
interface ForEachInputPort {
|
|
9
|
-
id: string;
|
|
10
|
-
type: BasePortType;
|
|
11
|
-
isArray: boolean;
|
|
12
|
-
}
|
|
13
|
-
declare const definition: import("./types").NodeDefinition<"generator", {
|
|
14
|
-
outputProperties: ForEachOutputProperty[];
|
|
15
|
-
inputPorts: ForEachInputPort[];
|
|
16
|
-
exposeItem: boolean;
|
|
17
|
-
exposeIndex: boolean;
|
|
18
|
-
outputMode: "per-input";
|
|
19
|
-
selectionMode: null;
|
|
20
|
-
}>;
|
|
21
|
-
export default definition;
|
|
22
|
-
export type { ForEachOutputProperty, ForEachInputPort };
|
|
23
|
-
export type ForEachConfig = typeof definition.defaults;
|