ugcinc 3.71.0 → 3.74.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.
@@ -602,6 +602,29 @@ function getAllNodes() {
602
602
  // - {branch-key}-{passthrough-id} (same type as input)
603
603
  outputs: [],
604
604
  },
605
+ {
606
+ type: "collect",
607
+ label: "Collect",
608
+ description: "Collect outputs from a for-each loop into an array",
609
+ category: "Control Flow",
610
+ nodeCategory: "generator",
611
+ // Input accepts any type from inside the loop
612
+ inputs: [
613
+ {
614
+ id: "value",
615
+ type: ["image", "video", "audio", "text", "object", "boolean", "number"],
616
+ required: true,
617
+ },
618
+ ],
619
+ // Output is an array of the input type
620
+ outputs: [
621
+ {
622
+ id: "array",
623
+ type: ["image[]", "video[]", "audio[]", "text[]", "object[]"],
624
+ required: true,
625
+ },
626
+ ],
627
+ },
605
628
  // === Terminal nodes ===
606
629
  {
607
630
  type: "auto-post",
package/dist/index.d.ts CHANGED
@@ -18,4 +18,4 @@ export { MediaClient } from './media';
18
18
  export { CommentsClient } from './comments';
19
19
  export type { RenderJobResponse, RenderJobStatus, SubmitImageRenderJobParams, SubmitVideoRenderJobParams, SubmitScreenshotAnimationRenderJobParams, SubmitInstagramDmRenderJobParams, SubmitIMessageDmRenderJobParams, IgDmMessage, ImDmMessage, RenderVideoEditorConfig, } from './render';
20
20
  export type { ClientConfig, } from './base';
21
- export type { SuccessResponse, ErrorResponse, ApiResponse, Account, AccountStat, AccountTask, EditProfileInfo, Task, TaskType, Post, PostType, PostStatus, PostStat, ApiKey, EditorConfig, VideoEditorNodeConfig, VideoEditorChannel, VideoEditorSegment, VideoEditorVideoSegment, VideoEditorAudioSegment, VideoEditorImageSegment, VideoEditorTextSegment, TimeMode, SegmentTimelinePosition, ImageEditorNodeConfig, ImageEditorElement, ImageEditorNodeInput, ImageEditorNodeOutput, DimensionPresetKey, EditorChannel, TimeValue, BaseSegmentProps, VisualSegmentProps, EditorSegment, VideoSegment, AudioSegment, ImageSegment, TextSegment, StaticSegment, PositionAnchor, RelativePositionConfig, GetAccountsParams, GetAccountStatsParams, GetAccountStatusParams, UpdateAccountInfoParams, UpdateAccountSocialParams, GetTasksParams, GetPostsParams, CreateSlideshowParams, GetPostStatsParams, GetPostStatusParams, CreateVideoParams, RefreshStatsParams, RefreshStatsResponse, RefreshStatsError, DailyAggregatedStat, GetDailyAggregatedStatsParams, DailyPostStat, GetDailyPostStatsParams, TopAccount, GetTopAccountsParams, TopPost, GetTopPostsParams, MediaType, NodePort, ResolvedPorts, NodeControlConfig, NodeTypeEnum, WorkflowNodeDefinition, WorkflowDefinition, CanvasState, TemplateNode, AutomationTemplate, AutomationRun, NodeRun, ExecutorNode, ExecutionEdge, OutputSchemaProperty, SelectionMode, ExhaustionBehavior, SelectionConfig, SelectionState, OutputMode, NodeOutputValues, OutputInput, OutputNodeConfig, ManualTriggerOutput, ManualTriggerNodeConfig, TriggerIterationMode, IterationExhaustionBehavior, CollectionSelectionMode, TriggerCollectionConfig, DayOfWeek, RecurrenceMediaOutput, RecurrenceMediaConfig, RecurrenceNodeConfig, AccountNodeConfig, MediaNodeEnabledType, RecurrenceMediaEnabledType, MediaNodeOutput, MediaNodeConfig, PostSchedulingMode, PostSchedulingConfig, AutoPostMode, AutoPostInputType, AutoPostInput, AutoPostNodeConfig, SaveToMediaInput, SaveToMediaNodeConfig, DeduplicateNodeConfig, ForEachOutputProperty, ForEachInputPort, ForEachNodeConfig, RandomValueType, RandomInputPort, RandomNodeMode, RandomNodeConfig, IfLogicOperator, IfBooleanInput, IfPassthroughInput, IfNodeConfig, RandomRouteBranch, RandomRoutePassthroughInput, RandomRouteObjectField, RandomRouteNodeConfig, BranchDefinition, BranchValueConfig, BranchPassthroughInput, BranchNodeConfig, VideoImportPlatform, VideoImportQuality, VideoImportNodeConfig, AutoCaptionPreset, AutoCaptionFontWeight, AutoCaptionPosition, AutoCaptionNodeConfig, ScreenshotAnimationNodeConfig, CreateDmMessage, CreateDmNodeConfig, VideoGenerationNodeConfig, ArrayType, PortType, LLMOutputField, LLMNodeConfig, UserMedia, SocialAudio, Media, MediaUse, GetMediaParams, CreateSocialAudioParams, UploadMediaParams, UploadMediaResponse, UpdateMediaTagParams, DeleteMediaParams, DeleteMediaResponse, CreateMediaFromUrlParams, ImportTextParams, ImportTextResponse, GetMediaUseParams, GetMediaUseResponse, Comment, CommentStatus, CreateCommentParams, CreateCommentResponse, GetCommentsParams, ValidationErrorType, ValidationError, ExportedNode, ExportedConnection, ExportedTemplate, AutomationExport, ExportedExecutor, ExportedEdge, ExportedRun, AutomationRunExport, } from './types';
21
+ export type { SuccessResponse, ErrorResponse, ApiResponse, Account, AccountStat, AccountTask, EditProfileInfo, Task, TaskType, Post, PostType, PostStatus, PostStat, ApiKey, EditorConfig, VideoEditorNodeConfig, VideoEditorChannel, VideoEditorSegment, VideoEditorVideoSegment, VideoEditorAudioSegment, VideoEditorImageSegment, VideoEditorTextSegment, TimeMode, SegmentTimelinePosition, ImageEditorNodeConfig, ImageEditorElement, ImageEditorNodeInput, ImageEditorNodeOutput, DimensionPresetKey, EditorChannel, TimeValue, BaseSegmentProps, VisualSegmentProps, EditorSegment, VideoSegment, AudioSegment, ImageSegment, TextSegment, StaticSegment, PositionAnchor, RelativePositionConfig, GetAccountsParams, GetAccountStatsParams, GetAccountStatusParams, UpdateAccountInfoParams, UpdateAccountSocialParams, GetTasksParams, GetPostsParams, CreateSlideshowParams, GetPostStatsParams, GetPostStatusParams, CreateVideoParams, RefreshStatsParams, RefreshStatsResponse, RefreshStatsError, DailyAggregatedStat, GetDailyAggregatedStatsParams, DailyPostStat, GetDailyPostStatsParams, TopAccount, GetTopAccountsParams, TopPost, GetTopPostsParams, MediaType, NodePort, ResolvedPorts, NodeControlConfig, NodeTypeEnum, WorkflowNodeDefinition, WorkflowDefinition, CanvasState, TemplateNode, AutomationTemplate, AutomationRun, NodeRun, ExecutorNode, ExecutionEdge, OutputSchemaProperty, SelectionMode, ExhaustionBehavior, SelectionConfig, SelectionState, OutputMode, NodeOutputValues, OutputInput, OutputNodeConfig, ObjectSchemaFieldLevel3, ObjectSchemaFieldLevel2, ObjectSchemaField, ManualTriggerOutput, ManualTriggerNodeConfig, TriggerIterationMode, IterationExhaustionBehavior, CollectionSelectionMode, TriggerCollectionConfig, DayOfWeek, RecurrenceMediaOutput, RecurrenceMediaConfig, RecurrenceNodeConfig, AccountNodeConfig, MediaNodeEnabledType, RecurrenceMediaEnabledType, MediaNodeOutput, MediaNodeConfig, PostSchedulingMode, PostSchedulingConfig, AutoPostMode, AutoPostInputType, AutoPostInput, AutoPostNodeConfig, SaveToMediaInput, SaveToMediaNodeConfig, DeduplicateNodeConfig, ForEachOutputProperty, ForEachInputPort, ForEachNodeConfig, RandomValueType, RandomInputPort, RandomNodeMode, RandomNodeConfig, IfLogicOperator, IfBooleanInput, IfPassthroughInput, IfNodeConfig, RandomRouteBranch, RandomRoutePassthroughInput, RandomRouteObjectField, RandomRouteNodeConfig, BranchDefinition, BranchValueConfig, BranchPassthroughInput, BranchNodeConfig, VideoImportPlatform, VideoImportQuality, VideoImportNodeConfig, AutoCaptionPreset, AutoCaptionFontWeight, AutoCaptionPosition, AutoCaptionNodeConfig, ScreenshotAnimationNodeConfig, CreateDmMessage, CreateDmNodeConfig, VideoGenerationNodeConfig, ArrayType, PortType, LLMOutputField, LLMNodeConfig, UserMedia, SocialAudio, Media, MediaUse, GetMediaParams, CreateSocialAudioParams, UploadMediaParams, UploadMediaResponse, UpdateMediaTagParams, DeleteMediaParams, DeleteMediaResponse, CreateMediaFromUrlParams, ImportTextParams, ImportTextResponse, GetMediaUseParams, GetMediaUseResponse, Comment, CommentStatus, CreateCommentParams, CreateCommentResponse, GetCommentsParams, ValidationErrorType, ValidationError, ExportedNode, ExportedConnection, ExportedTemplate, AutomationExport, ExportedExecutor, ExportedEdge, ExportedRun, AutomationRunExport, } from './types';
package/dist/types.d.ts CHANGED
@@ -846,7 +846,7 @@ export interface NodeControlConfig {
846
846
  */
847
847
  isInitializer?: boolean;
848
848
  }
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';
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';
850
850
  export interface OutputSchemaProperty {
851
851
  type: 'string' | 'number' | 'boolean' | 'array' | 'object';
852
852
  items?: 'string' | 'number' | 'boolean';
@@ -970,6 +970,7 @@ export interface WorkflowNodeDefinition {
970
970
  autoCaptionConfig?: AutoCaptionNodeConfig;
971
971
  screenshotAnimationConfig?: ScreenshotAnimationNodeConfig;
972
972
  createDmConfig?: CreateDmNodeConfig;
973
+ collectConfig?: CollectNodeConfig;
973
974
  };
974
975
  }
975
976
  export interface OutputInput {
@@ -982,13 +983,40 @@ export interface OutputInput {
982
983
  export interface OutputNodeConfig {
983
984
  inputs: OutputInput[];
984
985
  }
986
+ /**
987
+ * Level 3 (deepest) object schema field - primitives only, no further nesting
988
+ */
989
+ export interface ObjectSchemaFieldLevel3 {
990
+ name: string;
991
+ type: 'string' | 'number' | 'boolean';
992
+ }
993
+ /**
994
+ * Level 2 object schema field - can contain Level 3 nested objects
995
+ */
996
+ export interface ObjectSchemaFieldLevel2 {
997
+ name: string;
998
+ type: 'string' | 'number' | 'boolean' | 'object';
999
+ /** For nested objects at level 2 - can only contain primitive fields */
1000
+ objectSchema?: ObjectSchemaFieldLevel3[];
1001
+ }
1002
+ /**
1003
+ * Level 1 (top-level) object schema field - can contain Level 2 nested objects
1004
+ */
1005
+ export interface ObjectSchemaField {
1006
+ name: string;
1007
+ type: 'string' | 'number' | 'boolean' | 'object';
1008
+ /** For nested objects at level 1 - can contain up to one more level of nesting */
1009
+ objectSchema?: ObjectSchemaFieldLevel2[];
1010
+ }
985
1011
  /**
986
1012
  * Manual Trigger node output definition
987
1013
  */
988
1014
  export interface ManualTriggerOutput {
989
1015
  id: string;
990
- type: 'image' | 'video' | 'audio' | 'text' | 'social_audio' | 'account' | 'boolean';
1016
+ type: 'image' | 'video' | 'audio' | 'text' | 'social_audio' | 'account' | 'boolean' | 'object';
991
1017
  isArray?: boolean;
1018
+ /** Schema for object types - describes the structure of the object */
1019
+ objectSchema?: ObjectSchemaField[];
992
1020
  }
993
1021
  /**
994
1022
  * Iteration mode for trigger nodes with account iteration
@@ -1542,6 +1570,16 @@ export interface CreateDmNodeConfig {
1542
1570
  userHasStory: boolean;
1543
1571
  };
1544
1572
  }
1573
+ /**
1574
+ * Collect node configuration - collects outputs from for-each loop into an array
1575
+ * Note: Most config is set during expansion, not by user
1576
+ */
1577
+ export interface CollectNodeConfig {
1578
+ /** Expected number of items to collect (set during for-each expansion) */
1579
+ expectedCount?: number;
1580
+ /** Template ID of the for-each loop this collects from (for validation) */
1581
+ forEachTemplateId?: string;
1582
+ }
1545
1583
  /**
1546
1584
  * Video Generation Model IDs
1547
1585
  * 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.71.0",
3
+ "version": "3.74.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",