ugcinc 3.76.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
@@ -849,7 +849,7 @@ export interface NodeControlConfig {
849
849
  */
850
850
  isInitializer?: boolean;
851
851
  }
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';
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';
853
853
  export interface OutputSchemaProperty {
854
854
  type: 'string' | 'number' | 'boolean' | 'array' | 'object';
855
855
  items?: 'string' | 'number' | 'boolean';
@@ -974,6 +974,7 @@ export interface WorkflowNodeDefinition {
974
974
  screenshotAnimationConfig?: ScreenshotAnimationNodeConfig;
975
975
  createDmConfig?: CreateDmNodeConfig;
976
976
  collectConfig?: CollectNodeConfig;
977
+ destructureConfig?: DestructureNodeConfig;
977
978
  };
978
979
  }
979
980
  export interface OutputInput {
@@ -1587,6 +1588,22 @@ export interface CollectNodeConfig {
1587
1588
  /** Template ID of the for-each loop this collects from (for validation) */
1588
1589
  forEachTemplateId?: string;
1589
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
+ }
1590
1607
  /**
1591
1608
  * Video Generation Model IDs
1592
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.76.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",