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
|
@@ -1,21 +1,24 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ObjectSchemaField } from './types';
|
|
2
2
|
export interface BranchDefinition {
|
|
3
3
|
key: string;
|
|
4
4
|
}
|
|
5
5
|
export interface BranchValueConfig {
|
|
6
|
-
|
|
6
|
+
isVariable?: boolean;
|
|
7
7
|
value?: unknown;
|
|
8
8
|
selectedMediaIds?: string[];
|
|
9
9
|
}
|
|
10
|
-
export interface
|
|
10
|
+
export interface BranchPassthroughInput {
|
|
11
11
|
id: string;
|
|
12
12
|
type: string;
|
|
13
13
|
isArray?: boolean;
|
|
14
14
|
branchValues?: Record<string, BranchValueConfig>;
|
|
15
|
+
objectSchema?: ObjectSchemaField[];
|
|
15
16
|
}
|
|
17
|
+
/** @deprecated Use BranchPassthroughInput instead */
|
|
18
|
+
export type PassthroughInput = BranchPassthroughInput;
|
|
16
19
|
declare const definition: import("./types").NodeDefinition<"generator", {
|
|
17
20
|
branches: BranchDefinition[];
|
|
18
|
-
passthroughInputs:
|
|
21
|
+
passthroughInputs: BranchPassthroughInput[];
|
|
19
22
|
defaultBranchKey: string;
|
|
20
23
|
outputMode: "per-input";
|
|
21
24
|
selectionMode: null;
|
|
@@ -19,7 +19,7 @@ const definition = (0, types_1.defineNode)({
|
|
|
19
19
|
outputMode: 'per-input',
|
|
20
20
|
selectionMode: null,
|
|
21
21
|
},
|
|
22
|
-
computePorts: ({ config }) => {
|
|
22
|
+
computePorts: ({ config, getConnectedOutput }) => {
|
|
23
23
|
const branches = config?.branches ?? [];
|
|
24
24
|
const passthroughInputs = config?.passthroughInputs ?? [];
|
|
25
25
|
const inputs = [];
|
|
@@ -28,18 +28,39 @@ const definition = (0, types_1.defineNode)({
|
|
|
28
28
|
for (const passthrough of passthroughInputs) {
|
|
29
29
|
const pType = passthrough.type;
|
|
30
30
|
const pIsArray = passthrough.isArray ?? false;
|
|
31
|
+
// Track input port IDs for this passthrough to check for connected schemas
|
|
32
|
+
const variableInputPortIds = [];
|
|
31
33
|
for (const branch of branches) {
|
|
32
34
|
const branchValue = passthrough.branchValues?.[branch.key];
|
|
33
|
-
if (branchValue?.
|
|
35
|
+
if (branchValue?.isVariable) {
|
|
36
|
+
const inputPortId = `${branch.key}-${passthrough.id}`;
|
|
37
|
+
variableInputPortIds.push(inputPortId);
|
|
34
38
|
inputs.push({
|
|
35
|
-
id:
|
|
39
|
+
id: inputPortId,
|
|
36
40
|
type: pType,
|
|
37
41
|
isArray: pIsArray,
|
|
38
42
|
required: true,
|
|
39
43
|
});
|
|
40
44
|
}
|
|
41
45
|
}
|
|
42
|
-
|
|
46
|
+
// Get objectSchema from connected input (if any) to propagate to output
|
|
47
|
+
let objectSchema = passthrough.objectSchema;
|
|
48
|
+
if (getConnectedOutput && !objectSchema) {
|
|
49
|
+
for (const inputPortId of variableInputPortIds) {
|
|
50
|
+
const connectedOutput = getConnectedOutput(inputPortId);
|
|
51
|
+
if (connectedOutput?.objectSchema) {
|
|
52
|
+
objectSchema = connectedOutput.objectSchema;
|
|
53
|
+
break; // Use the first connected schema found
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
outputs.push({
|
|
58
|
+
id: passthrough.id,
|
|
59
|
+
type: pType,
|
|
60
|
+
isArray: pIsArray,
|
|
61
|
+
required: true,
|
|
62
|
+
objectSchema,
|
|
63
|
+
});
|
|
43
64
|
}
|
|
44
65
|
return { inputs, outputs };
|
|
45
66
|
},
|
|
@@ -49,7 +49,7 @@ export declare const nodeDefinitions: {
|
|
|
49
49
|
}, false>;
|
|
50
50
|
readonly branch: NodeDefinition<"generator", {
|
|
51
51
|
branches: import("./branch").BranchDefinition[];
|
|
52
|
-
passthroughInputs: import("./branch").
|
|
52
|
+
passthroughInputs: import("./branch").BranchPassthroughInput[];
|
|
53
53
|
defaultBranchKey: string;
|
|
54
54
|
outputMode: "per-input";
|
|
55
55
|
selectionMode: null;
|
package/dist/index.d.ts
CHANGED
|
@@ -36,7 +36,7 @@ export { prepareImageComposerInput } from './automations/nodes/image-composer';
|
|
|
36
36
|
export type { AccountNodeConfig } from './automations/nodes/account';
|
|
37
37
|
export type { AutoCaptionNodeConfig, AutoCaptionPreset, AutoCaptionFontWeight, AutoCaptionPosition, } from './automations/nodes/auto-caption';
|
|
38
38
|
export type { AutoPostNodeConfig, AutoPostMode, PostSchedulingMode, } from './automations/nodes/auto-post';
|
|
39
|
-
export type { BranchNodeConfig, BranchDefinition, PassthroughInput, } from './automations/nodes/branch';
|
|
39
|
+
export type { BranchNodeConfig, BranchDefinition, BranchPassthroughInput, BranchValueConfig, PassthroughInput, } from './automations/nodes/branch';
|
|
40
40
|
export type { CollectNodeConfig } from './automations/nodes/collect';
|
|
41
41
|
export type { ComposeWorkflowNodeConfig } from './automations/nodes/compose-workflow';
|
|
42
42
|
export type { CreateDmNodeConfig, CreateDmMessage, DmPlatform, } from './automations/nodes/create-dm';
|
package/package.json
CHANGED
package/dist/automations.d.ts
DELETED
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Automations API Client
|
|
3
|
-
*
|
|
4
|
-
* Provides methods to interact with the UGC Inc Automations API.
|
|
5
|
-
* For graph logic (validation, port computation, connections), use graph-controller.ts
|
|
6
|
-
*/
|
|
7
|
-
import type { WorkflowDefinition, AutomationTemplate, AutomationRun, ExecutorNode, ExecutionEdge, ApiResponse, AutomationExport, AutomationRunExport } from './types';
|
|
8
|
-
import { BaseClient } from './base';
|
|
9
|
-
export declare class AutomationsClient extends BaseClient {
|
|
10
|
-
/**
|
|
11
|
-
* List all automation templates for an organization
|
|
12
|
-
*/
|
|
13
|
-
listTemplates(params: {
|
|
14
|
-
orgId: string;
|
|
15
|
-
}): Promise<ApiResponse<AutomationTemplate[]>>;
|
|
16
|
-
/**
|
|
17
|
-
* Get a specific automation template
|
|
18
|
-
*/
|
|
19
|
-
getTemplate(params: {
|
|
20
|
-
templateId: string;
|
|
21
|
-
}): Promise<ApiResponse<AutomationTemplate>>;
|
|
22
|
-
/**
|
|
23
|
-
* Create or update an automation template
|
|
24
|
-
* @param templateId - If provided, updates existing template instead of creating new one
|
|
25
|
-
* @param skipValidation - If true, skips workflow validation (for saving drafts)
|
|
26
|
-
*/
|
|
27
|
-
createTemplate(params: {
|
|
28
|
-
orgId: string;
|
|
29
|
-
name: string;
|
|
30
|
-
description?: string;
|
|
31
|
-
workflowDefinition: WorkflowDefinition;
|
|
32
|
-
templateId?: string;
|
|
33
|
-
skipValidation?: boolean;
|
|
34
|
-
}): Promise<ApiResponse<string>>;
|
|
35
|
-
/**
|
|
36
|
-
* Delete an automation template
|
|
37
|
-
*/
|
|
38
|
-
deleteTemplate(params: {
|
|
39
|
-
templateId: string;
|
|
40
|
-
}): Promise<ApiResponse<null>>;
|
|
41
|
-
/**
|
|
42
|
-
* Run an automation template
|
|
43
|
-
* @param variableInputs - Optional map of variable node IDs to their runtime values
|
|
44
|
-
* @param saveAsPreview - If true, saves the output as a preview for sub-workflows
|
|
45
|
-
* @param tag - Optional tag for organizing runs
|
|
46
|
-
*/
|
|
47
|
-
run(params: {
|
|
48
|
-
templateId: string;
|
|
49
|
-
orgId: string;
|
|
50
|
-
variableInputs?: Record<string, string>;
|
|
51
|
-
saveAsPreview?: boolean;
|
|
52
|
-
tag?: string;
|
|
53
|
-
}): Promise<ApiResponse<{
|
|
54
|
-
runId: string;
|
|
55
|
-
}>>;
|
|
56
|
-
/**
|
|
57
|
-
* Get automation run status
|
|
58
|
-
* Returns executors (expanded nodes) and edges (data flow connections)
|
|
59
|
-
*/
|
|
60
|
-
getStatus(params: {
|
|
61
|
-
runId: string;
|
|
62
|
-
}): Promise<ApiResponse<{
|
|
63
|
-
run: AutomationRun;
|
|
64
|
-
executors: ExecutorNode[];
|
|
65
|
-
edges: ExecutionEdge[];
|
|
66
|
-
}>>;
|
|
67
|
-
/**
|
|
68
|
-
* List automation runs for a template
|
|
69
|
-
*/
|
|
70
|
-
listRuns(params: {
|
|
71
|
-
templateId: string;
|
|
72
|
-
limit?: number;
|
|
73
|
-
}): Promise<ApiResponse<Array<{
|
|
74
|
-
run: AutomationRun;
|
|
75
|
-
nodeCount: number;
|
|
76
|
-
}>>>;
|
|
77
|
-
/**
|
|
78
|
-
* List all automation runs for the organization (across all templates)
|
|
79
|
-
* @param templateId - Optional filter to show runs from a specific automation only
|
|
80
|
-
*/
|
|
81
|
-
listAllRuns(params: {
|
|
82
|
-
limit?: number;
|
|
83
|
-
reviewStatus?: 'pending_review' | 'approved' | 'rejected' | 'all';
|
|
84
|
-
templateId?: string;
|
|
85
|
-
}): Promise<ApiResponse<Array<{
|
|
86
|
-
run: AutomationRun;
|
|
87
|
-
templateName: string;
|
|
88
|
-
nodeCount: number;
|
|
89
|
-
completedNodeCount: number;
|
|
90
|
-
}>>>;
|
|
91
|
-
/**
|
|
92
|
-
* Update review status for a run
|
|
93
|
-
*/
|
|
94
|
-
updateReviewStatus(params: {
|
|
95
|
-
runId: string;
|
|
96
|
-
reviewStatus: 'approved' | 'rejected';
|
|
97
|
-
}): Promise<ApiResponse<{
|
|
98
|
-
success: boolean;
|
|
99
|
-
}>>;
|
|
100
|
-
/**
|
|
101
|
-
* Validate a workflow definition without creating it
|
|
102
|
-
*/
|
|
103
|
-
validateWorkflow(params: {
|
|
104
|
-
workflowDefinition: WorkflowDefinition;
|
|
105
|
-
}): Promise<ApiResponse<{
|
|
106
|
-
valid: boolean;
|
|
107
|
-
errors: string[];
|
|
108
|
-
}>>;
|
|
109
|
-
/**
|
|
110
|
-
* Delete an automation run
|
|
111
|
-
*/
|
|
112
|
-
deleteRun(params: {
|
|
113
|
-
runId: string;
|
|
114
|
-
}): Promise<ApiResponse<null>>;
|
|
115
|
-
/**
|
|
116
|
-
* Export automation template for debugging
|
|
117
|
-
* Returns the complete template definition with nodes and connections
|
|
118
|
-
*/
|
|
119
|
-
exportTemplate(params: {
|
|
120
|
-
templateId: string;
|
|
121
|
-
}): Promise<ApiResponse<AutomationExport>>;
|
|
122
|
-
/**
|
|
123
|
-
* Export automation run for debugging
|
|
124
|
-
* Returns the complete run data including execution state, executor outputs, and edge values
|
|
125
|
-
*/
|
|
126
|
-
exportRun(params: {
|
|
127
|
-
runId: string;
|
|
128
|
-
}): Promise<ApiResponse<AutomationRunExport>>;
|
|
129
|
-
/**
|
|
130
|
-
* Stop a running automation
|
|
131
|
-
* Marks the run as failed and all pending executors as failed.
|
|
132
|
-
* In-flight executors will complete gracefully.
|
|
133
|
-
*/
|
|
134
|
-
stop(params: {
|
|
135
|
-
runId: string;
|
|
136
|
-
}): Promise<ApiResponse<null>>;
|
|
137
|
-
/**
|
|
138
|
-
* Get the recurrence status for an automation template
|
|
139
|
-
* Returns whether the template has a recurrence node, if it's published, and schedule info
|
|
140
|
-
*/
|
|
141
|
-
getRecurrenceStatus(params: {
|
|
142
|
-
templateId: string;
|
|
143
|
-
}): Promise<ApiResponse<{
|
|
144
|
-
hasRecurrence: boolean;
|
|
145
|
-
isPublished: boolean;
|
|
146
|
-
nextRunAt: string | null;
|
|
147
|
-
lastRunAt: string | null;
|
|
148
|
-
}>>;
|
|
149
|
-
/**
|
|
150
|
-
* Publish an automation - enables recurrence scheduling
|
|
151
|
-
* The automation will run automatically based on its recurrence configuration
|
|
152
|
-
*/
|
|
153
|
-
publish(params: {
|
|
154
|
-
templateId: string;
|
|
155
|
-
}): Promise<ApiResponse<null>>;
|
|
156
|
-
/**
|
|
157
|
-
* Unpublish an automation - disables recurrence and stops the scheduler workflow
|
|
158
|
-
* No more scheduled runs will occur until the automation is published again
|
|
159
|
-
*/
|
|
160
|
-
unpublish(params: {
|
|
161
|
-
templateId: string;
|
|
162
|
-
}): Promise<ApiResponse<null>>;
|
|
163
|
-
/**
|
|
164
|
-
* Run an automation once immediately
|
|
165
|
-
* If the automation is published, this also updates the schedule (restarts the scheduler)
|
|
166
|
-
* This is used for the "Run Once" button on recurrence automations
|
|
167
|
-
*/
|
|
168
|
-
runOnce(params: {
|
|
169
|
-
templateId: string;
|
|
170
|
-
}): Promise<ApiResponse<{
|
|
171
|
-
runIds: string[];
|
|
172
|
-
}>>;
|
|
173
|
-
}
|
package/dist/automations.js
DELETED
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Automations API Client
|
|
4
|
-
*
|
|
5
|
-
* Provides methods to interact with the UGC Inc Automations API.
|
|
6
|
-
* For graph logic (validation, port computation, connections), use graph-controller.ts
|
|
7
|
-
*/
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.AutomationsClient = void 0;
|
|
10
|
-
const base_1 = require("./base");
|
|
11
|
-
class AutomationsClient extends base_1.BaseClient {
|
|
12
|
-
/**
|
|
13
|
-
* List all automation templates for an organization
|
|
14
|
-
*/
|
|
15
|
-
async listTemplates(params) {
|
|
16
|
-
return this.request('/automations/list', {
|
|
17
|
-
method: 'POST',
|
|
18
|
-
body: JSON.stringify(params),
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Get a specific automation template
|
|
23
|
-
*/
|
|
24
|
-
async getTemplate(params) {
|
|
25
|
-
return this.request('/automations/get', {
|
|
26
|
-
method: 'POST',
|
|
27
|
-
body: JSON.stringify(params),
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Create or update an automation template
|
|
32
|
-
* @param templateId - If provided, updates existing template instead of creating new one
|
|
33
|
-
* @param skipValidation - If true, skips workflow validation (for saving drafts)
|
|
34
|
-
*/
|
|
35
|
-
async createTemplate(params) {
|
|
36
|
-
return this.request('/automations/create', {
|
|
37
|
-
method: 'POST',
|
|
38
|
-
body: JSON.stringify(params),
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Delete an automation template
|
|
43
|
-
*/
|
|
44
|
-
async deleteTemplate(params) {
|
|
45
|
-
return this.request('/automations/delete', {
|
|
46
|
-
method: 'POST',
|
|
47
|
-
body: JSON.stringify(params),
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Run an automation template
|
|
52
|
-
* @param variableInputs - Optional map of variable node IDs to their runtime values
|
|
53
|
-
* @param saveAsPreview - If true, saves the output as a preview for sub-workflows
|
|
54
|
-
* @param tag - Optional tag for organizing runs
|
|
55
|
-
*/
|
|
56
|
-
async run(params) {
|
|
57
|
-
return this.request('/automations/run', {
|
|
58
|
-
method: 'POST',
|
|
59
|
-
body: JSON.stringify(params),
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Get automation run status
|
|
64
|
-
* Returns executors (expanded nodes) and edges (data flow connections)
|
|
65
|
-
*/
|
|
66
|
-
async getStatus(params) {
|
|
67
|
-
return this.request('/automations/status', {
|
|
68
|
-
method: 'POST',
|
|
69
|
-
body: JSON.stringify(params),
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* List automation runs for a template
|
|
74
|
-
*/
|
|
75
|
-
async listRuns(params) {
|
|
76
|
-
return this.request('/automations/list-runs', {
|
|
77
|
-
method: 'POST',
|
|
78
|
-
body: JSON.stringify(params),
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* List all automation runs for the organization (across all templates)
|
|
83
|
-
* @param templateId - Optional filter to show runs from a specific automation only
|
|
84
|
-
*/
|
|
85
|
-
async listAllRuns(params) {
|
|
86
|
-
return this.request('/automations/list-all-runs', {
|
|
87
|
-
method: 'POST',
|
|
88
|
-
body: JSON.stringify(params),
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* Update review status for a run
|
|
93
|
-
*/
|
|
94
|
-
async updateReviewStatus(params) {
|
|
95
|
-
return this.request('/automations/update-review-status', {
|
|
96
|
-
method: 'POST',
|
|
97
|
-
body: JSON.stringify(params),
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* Validate a workflow definition without creating it
|
|
102
|
-
*/
|
|
103
|
-
async validateWorkflow(params) {
|
|
104
|
-
return this.request('/automations/validate', {
|
|
105
|
-
method: 'POST',
|
|
106
|
-
body: JSON.stringify(params),
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
/**
|
|
110
|
-
* Delete an automation run
|
|
111
|
-
*/
|
|
112
|
-
async deleteRun(params) {
|
|
113
|
-
return this.request('/automations/delete-run', {
|
|
114
|
-
method: 'POST',
|
|
115
|
-
body: JSON.stringify(params),
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
/**
|
|
119
|
-
* Export automation template for debugging
|
|
120
|
-
* Returns the complete template definition with nodes and connections
|
|
121
|
-
*/
|
|
122
|
-
async exportTemplate(params) {
|
|
123
|
-
return this.request('/automations/export', {
|
|
124
|
-
method: 'POST',
|
|
125
|
-
body: JSON.stringify(params),
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
/**
|
|
129
|
-
* Export automation run for debugging
|
|
130
|
-
* Returns the complete run data including execution state, executor outputs, and edge values
|
|
131
|
-
*/
|
|
132
|
-
async exportRun(params) {
|
|
133
|
-
return this.request('/automations/export-run', {
|
|
134
|
-
method: 'POST',
|
|
135
|
-
body: JSON.stringify(params),
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
|
-
/**
|
|
139
|
-
* Stop a running automation
|
|
140
|
-
* Marks the run as failed and all pending executors as failed.
|
|
141
|
-
* In-flight executors will complete gracefully.
|
|
142
|
-
*/
|
|
143
|
-
async stop(params) {
|
|
144
|
-
return this.request('/automations/stop', {
|
|
145
|
-
method: 'POST',
|
|
146
|
-
body: JSON.stringify(params),
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
// ===========================================================================
|
|
150
|
-
// Recurrence Scheduling
|
|
151
|
-
// ===========================================================================
|
|
152
|
-
/**
|
|
153
|
-
* Get the recurrence status for an automation template
|
|
154
|
-
* Returns whether the template has a recurrence node, if it's published, and schedule info
|
|
155
|
-
*/
|
|
156
|
-
async getRecurrenceStatus(params) {
|
|
157
|
-
return this.request('/automations/recurrence-status', {
|
|
158
|
-
method: 'POST',
|
|
159
|
-
body: JSON.stringify(params),
|
|
160
|
-
});
|
|
161
|
-
}
|
|
162
|
-
/**
|
|
163
|
-
* Publish an automation - enables recurrence scheduling
|
|
164
|
-
* The automation will run automatically based on its recurrence configuration
|
|
165
|
-
*/
|
|
166
|
-
async publish(params) {
|
|
167
|
-
return this.request('/automations/publish', {
|
|
168
|
-
method: 'POST',
|
|
169
|
-
body: JSON.stringify(params),
|
|
170
|
-
});
|
|
171
|
-
}
|
|
172
|
-
/**
|
|
173
|
-
* Unpublish an automation - disables recurrence and stops the scheduler workflow
|
|
174
|
-
* No more scheduled runs will occur until the automation is published again
|
|
175
|
-
*/
|
|
176
|
-
async unpublish(params) {
|
|
177
|
-
return this.request('/automations/unpublish', {
|
|
178
|
-
method: 'POST',
|
|
179
|
-
body: JSON.stringify(params),
|
|
180
|
-
});
|
|
181
|
-
}
|
|
182
|
-
/**
|
|
183
|
-
* Run an automation once immediately
|
|
184
|
-
* If the automation is published, this also updates the schedule (restarts the scheduler)
|
|
185
|
-
* This is used for the "Run Once" button on recurrence automations
|
|
186
|
-
*/
|
|
187
|
-
async runOnce(params) {
|
|
188
|
-
return this.request('/automations/run-once', {
|
|
189
|
-
method: 'POST',
|
|
190
|
-
body: JSON.stringify(params),
|
|
191
|
-
});
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
exports.AutomationsClient = AutomationsClient;
|
package/dist/node-runtime.d.ts
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Runtime types for node execution
|
|
3
|
-
* These types are used during workflow execution
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* Media type classification
|
|
7
|
-
*/
|
|
8
|
-
export type MediaType = 'video' | 'image' | 'audio' | 'text';
|
|
9
|
-
/**
|
|
10
|
-
* Selection mode for source nodes
|
|
11
|
-
*/
|
|
12
|
-
export type SelectionMode = 'random' | 'sequential';
|
|
13
|
-
/**
|
|
14
|
-
* Behavior when all items have been used
|
|
15
|
-
*/
|
|
16
|
-
export type ExhaustionBehavior = 'restart' | 'error';
|
|
17
|
-
/**
|
|
18
|
-
* Selection configuration for source nodes (image, video, audio)
|
|
19
|
-
*/
|
|
20
|
-
export interface SelectionConfig {
|
|
21
|
-
mode: SelectionMode;
|
|
22
|
-
enforceUniqueness: boolean;
|
|
23
|
-
exhaustionBehavior: ExhaustionBehavior;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Runtime state for tracking selection progress (persisted in node config)
|
|
27
|
-
*/
|
|
28
|
-
export interface SelectionState {
|
|
29
|
-
usedIndices: number[];
|
|
30
|
-
currentIndex: number;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Output mode for source nodes
|
|
34
|
-
* - 'per-input': Generate a unique value for each consumer input (default)
|
|
35
|
-
* - 'single': Use the same value for all consumer inputs
|
|
36
|
-
*/
|
|
37
|
-
export type OutputMode = 'per-input' | 'single';
|
|
38
|
-
/**
|
|
39
|
-
* Output node input configuration
|
|
40
|
-
*/
|
|
41
|
-
export interface OutputInput {
|
|
42
|
-
id: string;
|
|
43
|
-
title: string;
|
|
44
|
-
type: MediaType;
|
|
45
|
-
tag?: string;
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Output node configuration
|
|
49
|
-
*/
|
|
50
|
-
export interface OutputNodeConfig {
|
|
51
|
-
inputs: OutputInput[];
|
|
52
|
-
saveToMedia: boolean;
|
|
53
|
-
globalTag?: string;
|
|
54
|
-
makeUnique: boolean;
|
|
55
|
-
createPost?: boolean;
|
|
56
|
-
requireReview?: boolean;
|
|
57
|
-
}
|
package/dist/node-runtime.js
DELETED
package/dist/nodes/account.d.ts
DELETED
package/dist/nodes/account.js
DELETED
|
@@ -1,29 +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: 'account',
|
|
6
|
-
label: 'Account',
|
|
7
|
-
description: 'Select accounts to post from',
|
|
8
|
-
type: 'source',
|
|
9
|
-
category: 'Sources',
|
|
10
|
-
outputModes: ['per-input', 'single'],
|
|
11
|
-
selectionModes: ['random', 'sequential'],
|
|
12
|
-
defaults: {
|
|
13
|
-
accountIds: [],
|
|
14
|
-
outputMode: 'per-input',
|
|
15
|
-
selectionMode: 'random',
|
|
16
|
-
},
|
|
17
|
-
computePorts: () => ({
|
|
18
|
-
inputs: [],
|
|
19
|
-
outputs: [
|
|
20
|
-
{
|
|
21
|
-
id: 'account',
|
|
22
|
-
type: 'account',
|
|
23
|
-
isArray: false,
|
|
24
|
-
required: true,
|
|
25
|
-
},
|
|
26
|
-
],
|
|
27
|
-
}),
|
|
28
|
-
});
|
|
29
|
-
exports.default = definition;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
declare const definition: import("./types").NodeDefinition<"generator", {
|
|
2
|
-
fontName: string;
|
|
3
|
-
fontSize: number;
|
|
4
|
-
fontWeight: string;
|
|
5
|
-
fontColor: string;
|
|
6
|
-
highlightColor: string;
|
|
7
|
-
strokeColor: string;
|
|
8
|
-
strokeWidth: number;
|
|
9
|
-
position: string;
|
|
10
|
-
wordsPerSubtitle: number;
|
|
11
|
-
enableAnimation: boolean;
|
|
12
|
-
language: string;
|
|
13
|
-
outputMode: "per-input";
|
|
14
|
-
selectionMode: null;
|
|
15
|
-
}>;
|
|
16
|
-
export default definition;
|
|
17
|
-
export type AutoCaptionConfig = typeof definition.defaults;
|
|
@@ -1,46 +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-caption',
|
|
6
|
-
label: 'Auto Caption',
|
|
7
|
-
description: 'Add TikTok-style captions to videos',
|
|
8
|
-
type: 'generator',
|
|
9
|
-
category: 'Generation',
|
|
10
|
-
outputModes: ['per-input', 'single'],
|
|
11
|
-
selectionModes: null,
|
|
12
|
-
defaults: {
|
|
13
|
-
fontName: 'Montserrat',
|
|
14
|
-
fontSize: 80,
|
|
15
|
-
fontWeight: 'bold',
|
|
16
|
-
fontColor: 'white',
|
|
17
|
-
highlightColor: 'yellow',
|
|
18
|
-
strokeColor: 'black',
|
|
19
|
-
strokeWidth: 3,
|
|
20
|
-
position: 'bottom',
|
|
21
|
-
wordsPerSubtitle: 3,
|
|
22
|
-
enableAnimation: true,
|
|
23
|
-
language: 'en',
|
|
24
|
-
outputMode: 'per-input',
|
|
25
|
-
selectionMode: null,
|
|
26
|
-
},
|
|
27
|
-
computePorts: () => ({
|
|
28
|
-
inputs: [
|
|
29
|
-
{
|
|
30
|
-
id: 'video',
|
|
31
|
-
type: 'video',
|
|
32
|
-
isArray: false,
|
|
33
|
-
required: true,
|
|
34
|
-
},
|
|
35
|
-
],
|
|
36
|
-
outputs: [
|
|
37
|
-
{
|
|
38
|
-
id: 'output',
|
|
39
|
-
type: 'video',
|
|
40
|
-
isArray: false,
|
|
41
|
-
required: true,
|
|
42
|
-
},
|
|
43
|
-
],
|
|
44
|
-
}),
|
|
45
|
-
});
|
|
46
|
-
exports.default = definition;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { InputType } from './types';
|
|
2
|
-
type AutoPostMode = 'video' | 'slideshow';
|
|
3
|
-
declare const definition: import("./types").NodeDefinition<"terminal", {
|
|
4
|
-
mode: AutoPostMode;
|
|
5
|
-
inputType: InputType;
|
|
6
|
-
inputs: Array<{
|
|
7
|
-
id: string;
|
|
8
|
-
}>;
|
|
9
|
-
socialAudioIsVariable: boolean;
|
|
10
|
-
schedulingMode: string;
|
|
11
|
-
minDistanceHours: number;
|
|
12
|
-
maxPostsPerDay: number;
|
|
13
|
-
randomWindowStart: string;
|
|
14
|
-
randomWindowEnd: string;
|
|
15
|
-
timezone: string;
|
|
16
|
-
requireApproval: boolean;
|
|
17
|
-
outputMode: null;
|
|
18
|
-
selectionMode: null;
|
|
19
|
-
}>;
|
|
20
|
-
export default definition;
|
|
21
|
-
export type AutoPostConfig = typeof definition.defaults;
|