ugcinc 2.95.0 → 2.97.0

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.
@@ -1,4 +1,4 @@
1
- import type { NodeControlConfig, MediaType, NodePort, NodeTypeEnum, WorkflowDefinition, AutomationTemplate, AutomationRun, ExecutorNode, ExecutionEdge, ApiResponse } from './types';
1
+ import type { NodeControlConfig, NodeCategory, MediaType, NodePort, NodeTypeEnum, WorkflowDefinition, AutomationTemplate, AutomationRun, ExecutorNode, ExecutionEdge, ApiResponse } from './types';
2
2
  import { BaseClient } from './base';
3
3
  export declare class AutomationsClient extends BaseClient {
4
4
  /**
@@ -107,4 +107,4 @@ export declare function getAllNodes(): NodeControlConfig[];
107
107
  * Get a specific node by type
108
108
  */
109
109
  export declare function getNodeByType(type: string): NodeControlConfig | undefined;
110
- export type { NodeControlConfig, MediaType, NodePort, NodeTypeEnum };
110
+ export type { NodeControlConfig, NodeCategory, MediaType, NodePort, NodeTypeEnum };
@@ -108,11 +108,13 @@ exports.AutomationsClient = AutomationsClient;
108
108
  */
109
109
  function getAllNodes() {
110
110
  return [
111
+ // === Source nodes ===
111
112
  {
112
113
  type: "image",
113
114
  label: "Image",
114
115
  description: "Import image files",
115
116
  category: "Input",
117
+ nodeCategory: "source",
116
118
  inputs: [],
117
119
  outputs: [
118
120
  {
@@ -128,6 +130,7 @@ function getAllNodes() {
128
130
  label: "Video",
129
131
  description: "Import video files",
130
132
  category: "Input",
133
+ nodeCategory: "source",
131
134
  inputs: [],
132
135
  outputs: [
133
136
  {
@@ -143,6 +146,7 @@ function getAllNodes() {
143
146
  label: "Audio",
144
147
  description: "Import audio files",
145
148
  category: "Input",
149
+ nodeCategory: "source",
146
150
  inputs: [],
147
151
  outputs: [
148
152
  {
@@ -158,6 +162,7 @@ function getAllNodes() {
158
162
  label: "Social Audio",
159
163
  description: "Import social audio tracks",
160
164
  category: "Input",
165
+ nodeCategory: "source",
161
166
  inputs: [],
162
167
  outputs: [
163
168
  {
@@ -173,6 +178,7 @@ function getAllNodes() {
173
178
  label: "Text",
174
179
  description: "Create text with templated variables",
175
180
  category: "Input",
181
+ nodeCategory: "source",
176
182
  inputs: [], // Dynamic inputs based on template variables
177
183
  outputs: [
178
184
  {
@@ -183,11 +189,29 @@ function getAllNodes() {
183
189
  },
184
190
  ],
185
191
  },
192
+ {
193
+ type: "account",
194
+ label: "Account",
195
+ description: "Select accounts to post from",
196
+ category: "Input",
197
+ nodeCategory: "source",
198
+ inputs: [],
199
+ outputs: [
200
+ {
201
+ id: "account",
202
+ title: "Account",
203
+ type: "account",
204
+ required: true,
205
+ },
206
+ ],
207
+ },
208
+ // === Generator nodes ===
186
209
  {
187
210
  type: "image-editor",
188
- label: "Image Editor",
211
+ label: "Templated Image",
189
212
  description: "Edit and transform images",
190
213
  category: "Templated Generation",
214
+ nodeCategory: "generator",
191
215
  inputs: [
192
216
  {
193
217
  id: "background",
@@ -207,9 +231,10 @@ function getAllNodes() {
207
231
  },
208
232
  {
209
233
  type: "video-editor",
210
- label: "Video Editor",
234
+ label: "Templated Video",
211
235
  description: "Edit and transform videos",
212
236
  category: "Templated Generation",
237
+ nodeCategory: "generator",
213
238
  inputs: [], // Dynamic inputs based on segments in editor config
214
239
  outputs: [
215
240
  {
@@ -225,6 +250,7 @@ function getAllNodes() {
225
250
  label: "Image Generation",
226
251
  description: "Generate images using AI models",
227
252
  category: "AI",
253
+ nodeCategory: "generator",
228
254
  inputs: [
229
255
  {
230
256
  id: "prompt",
@@ -248,16 +274,29 @@ function getAllNodes() {
248
274
  label: "LLM",
249
275
  description: "Process input with a Large Language Model",
250
276
  category: "AI",
277
+ nodeCategory: "generator",
251
278
  // Dynamic inputs: extracted from systemPrompt {{variables}} + media refs
252
279
  inputs: [],
253
280
  // Dynamic outputs: based on outputFields config
254
281
  outputs: [],
255
282
  },
283
+ {
284
+ type: "workflow",
285
+ label: "Workflow",
286
+ description: "Embed another workflow as a sub-workflow",
287
+ category: "Flow",
288
+ nodeCategory: "generator",
289
+ // Inputs and outputs are dynamic based on the embedded workflow
290
+ inputs: [],
291
+ outputs: [],
292
+ },
293
+ // === Trigger nodes ===
256
294
  {
257
295
  type: "manual-trigger",
258
296
  label: "Manual Trigger",
259
297
  description: "Define inputs required when manually running this automation",
260
298
  category: "Triggers",
299
+ nodeCategory: "trigger",
261
300
  inputs: [],
262
301
  // Dynamic outputs based on manualTriggerConfig.outputs
263
302
  outputs: [],
@@ -268,40 +307,18 @@ function getAllNodes() {
268
307
  label: "Recurring",
269
308
  description: "Schedule recurring automation runs",
270
309
  category: "Triggers",
310
+ nodeCategory: "trigger",
271
311
  inputs: [],
272
312
  outputs: [],
273
313
  isInitializer: true,
274
314
  },
275
- {
276
- type: "workflow",
277
- label: "Workflow",
278
- description: "Embed another workflow as a sub-workflow",
279
- category: "Flow",
280
- // Inputs and outputs are dynamic based on the embedded workflow
281
- inputs: [],
282
- outputs: [],
283
- },
284
- {
285
- type: "account",
286
- label: "Account",
287
- description: "Select accounts to post from",
288
- category: "Input",
289
- inputs: [],
290
- outputs: [
291
- {
292
- id: "account",
293
- title: "Account",
294
- type: "account",
295
- required: true,
296
- },
297
- ],
298
- },
299
- // === Output nodes (terminal nodes) ===
315
+ // === Terminal nodes ===
300
316
  {
301
317
  type: "output",
302
318
  label: "Output",
303
319
  description: "Final output of the automation",
304
320
  category: "Output",
321
+ nodeCategory: "terminal",
305
322
  inputs: [
306
323
  {
307
324
  id: "result",
@@ -317,6 +334,7 @@ function getAllNodes() {
317
334
  label: "Post Video",
318
335
  description: "Post a video to social media",
319
336
  category: "Output",
337
+ nodeCategory: "terminal",
320
338
  inputs: [
321
339
  {
322
340
  id: "video",
@@ -356,6 +374,7 @@ function getAllNodes() {
356
374
  label: "Post Slideshow",
357
375
  description: "Post a slideshow to social media",
358
376
  category: "Output",
377
+ nodeCategory: "terminal",
359
378
  // Dynamic inputs based on postSlideshowConfig.inputs
360
379
  inputs: [
361
380
  {
@@ -390,6 +409,7 @@ function getAllNodes() {
390
409
  label: "Save To Media",
391
410
  description: "Save outputs to media library",
392
411
  category: "Output",
412
+ nodeCategory: "terminal",
393
413
  // Dynamic inputs based on config
394
414
  inputs: [],
395
415
  outputs: [],
package/dist/types.d.ts CHANGED
@@ -794,11 +794,22 @@ export interface NodePort {
794
794
  type: MediaType | MediaType[];
795
795
  required: boolean;
796
796
  }
797
+ /**
798
+ * Functional category for automation nodes
799
+ * - trigger: Nodes that start an automation (manual-trigger, recurrence)
800
+ * - source: Nodes that provide input data (image, video, audio, social-audio, text, account)
801
+ * - generator: Nodes that transform or generate content (image-editor, video-editor, image-generation, llm, workflow)
802
+ * - terminal: Nodes that end an automation (output, post-video, post-slideshow, save-to-media)
803
+ */
804
+ export type NodeCategory = 'trigger' | 'source' | 'generator' | 'terminal';
797
805
  export interface NodeControlConfig {
798
806
  type: string;
799
807
  label: string;
800
808
  description: string;
809
+ /** UI display category for grouping in add node modal */
801
810
  category: string;
811
+ /** Functional category for node behavior classification */
812
+ nodeCategory: NodeCategory;
802
813
  inputs: NodePort[];
803
814
  outputs: NodePort[];
804
815
  /**
@@ -807,6 +818,7 @@ export interface NodeControlConfig {
807
818
  */
808
819
  supportsPerInputMode?: boolean;
809
820
  /**
821
+ * @deprecated Use nodeCategory === 'trigger' instead
810
822
  * If true, this is an initializer node (starts an automation).
811
823
  * Only one initializer node is allowed per automation.
812
824
  * Manual Trigger and Recurrence nodes are initializers.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ugcinc",
3
- "version": "2.95.0",
3
+ "version": "2.97.0",
4
4
  "description": "TypeScript/JavaScript client for the UGC Inc API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",