ugcinc 3.75.0 → 3.77.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.
@@ -625,6 +625,23 @@ function getAllNodes() {
625
625
  },
626
626
  ],
627
627
  },
628
+ {
629
+ type: "destructure",
630
+ label: "Destructure",
631
+ description: "Extract specific elements from an array by index or range",
632
+ category: "Control Flow",
633
+ nodeCategory: "generator",
634
+ // Input is any array type
635
+ inputs: [
636
+ {
637
+ id: "array",
638
+ type: ["image[]", "video[]", "audio[]", "text[]", "object[]"],
639
+ required: true,
640
+ },
641
+ ],
642
+ // Dynamic outputs based on config.selections
643
+ outputs: [],
644
+ },
628
645
  // === Terminal nodes ===
629
646
  {
630
647
  type: "auto-post",
package/dist/types.d.ts CHANGED
@@ -796,7 +796,10 @@ export interface NodeOutputValues {
796
796
  * Schema definition for a property within an array item
797
797
  */
798
798
  export interface PropertySchema {
799
- type: 'string' | 'number' | 'boolean' | 'object';
799
+ type: 'string' | 'number' | 'boolean' | 'object' | 'array';
800
+ /** For arrays - the item type */
801
+ items?: 'string' | 'number' | 'boolean' | 'object';
802
+ /** For nested objects or array of objects */
800
803
  itemSchema?: Record<string, PropertySchema>;
801
804
  }
802
805
  export interface NodePort {
@@ -846,7 +849,7 @@ export interface NodeControlConfig {
846
849
  */
847
850
  isInitializer?: boolean;
848
851
  }
849
- export type NodeTypeEnum = 'social-audio' | 'text' | 'media' | 'video-import' | 'image-composer' | 'video-composer' | 'generate-image' | 'generate-video' | 'custom-model' | 'llm' | 'output' | 'manual-trigger' | 'recurrence' | 'compose-workflow' | 'account' | 'auto-post' | 'save-to-media' | 'deduplicate' | 'for-each' | 'random' | 'random-route' | 'branch' | 'if' | 'not' | 'transcript' | 'auto-caption' | 'screenshot-animation' | 'create-dm' | 'collect';
852
+ export type NodeTypeEnum = 'social-audio' | 'text' | 'media' | 'video-import' | 'image-composer' | 'video-composer' | 'generate-image' | 'generate-video' | 'custom-model' | 'llm' | 'output' | 'manual-trigger' | 'recurrence' | 'compose-workflow' | 'account' | 'auto-post' | 'save-to-media' | 'deduplicate' | 'for-each' | 'random' | 'random-route' | 'branch' | 'if' | 'not' | 'transcript' | 'auto-caption' | 'screenshot-animation' | 'create-dm' | 'collect' | 'destructure';
850
853
  export interface OutputSchemaProperty {
851
854
  type: 'string' | 'number' | 'boolean' | 'array' | 'object';
852
855
  items?: 'string' | 'number' | 'boolean';
@@ -971,6 +974,7 @@ export interface WorkflowNodeDefinition {
971
974
  screenshotAnimationConfig?: ScreenshotAnimationNodeConfig;
972
975
  createDmConfig?: CreateDmNodeConfig;
973
976
  collectConfig?: CollectNodeConfig;
977
+ destructureConfig?: DestructureNodeConfig;
974
978
  };
975
979
  }
976
980
  export interface OutputInput {
@@ -1584,6 +1588,22 @@ export interface CollectNodeConfig {
1584
1588
  /** Template ID of the for-each loop this collects from (for validation) */
1585
1589
  forEachTemplateId?: string;
1586
1590
  }
1591
+ /**
1592
+ * Destructure node selection - defines which indexes to extract from an array
1593
+ */
1594
+ export interface DestructureSelection {
1595
+ /** Port ID for this selection output (lowercase, hyphens/underscores only) */
1596
+ portId: string;
1597
+ /** Index expression: single index "0", comma-separated "0, 2, 4", ranges "0-3", or mixed "0, 2-4, 7" */
1598
+ indexExpr: string;
1599
+ }
1600
+ /**
1601
+ * Destructure node configuration - extracts specific elements from an array
1602
+ */
1603
+ export interface DestructureNodeConfig {
1604
+ /** List of selections - each becomes an output port */
1605
+ selections: DestructureSelection[];
1606
+ }
1587
1607
  /**
1588
1608
  * Video Generation Model IDs
1589
1609
  * Text-to-video models take just a prompt, image-to-video models require an image input
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ugcinc",
3
- "version": "3.75.0",
3
+ "version": "3.77.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",