ugcinc 3.33.1 → 3.34.1

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.
@@ -501,6 +501,21 @@ function getAllNodes() {
501
501
  // Dynamic outputs based on forEachConfig (exposeItem, exposeIndex, outputProperties, inputPorts)
502
502
  outputs: [],
503
503
  },
504
+ {
505
+ type: "random",
506
+ label: "Random",
507
+ description: "Randomly select from an array or weighted inputs",
508
+ category: "Control Flow",
509
+ nodeCategory: "generator",
510
+ // Dynamic inputs based on randomConfig.mode:
511
+ // - array mode: single 'array' input
512
+ // - multi-input mode: dynamic inputs from randomConfig.inputPorts
513
+ inputs: [],
514
+ // Dynamic outputs based on randomConfig:
515
+ // - output (type determined by randomConfig.valueType)
516
+ // - index (if randomConfig.exposeIndex is true, array mode only)
517
+ outputs: [],
518
+ },
504
519
  // === Terminal nodes ===
505
520
  {
506
521
  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, 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, 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, MediaNodeConfig, PostSchedulingMode, PostSchedulingConfig, AutoPostMode, AutoPostInputType, AutoPostInput, AutoPostNodeConfig, SaveToMediaInput, SaveToMediaNodeConfig, DeduplicateNodeConfig, ForEachOutputProperty, ForEachInputPort, ForEachNodeConfig, VideoImportPlatform, VideoImportQuality, VideoImportNodeConfig, AutoCaptionPreset, AutoCaptionFontWeight, AutoCaptionPosition, AutoCaptionNodeConfig, ScreenshotAnimationNodeConfig, VideoGenerationNodeConfig, PortType, LLMOutputField, LLMNodeConfig, UserMedia, SocialAudio, Media, GetMediaParams, CreateSocialAudioParams, UploadMediaParams, UploadMediaResponse, UpdateMediaTagParams, DeleteMediaParams, DeleteMediaResponse, CreateMediaFromUrlParams, ImportTextParams, ImportTextResponse, 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, 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, MediaNodeConfig, PostSchedulingMode, PostSchedulingConfig, AutoPostMode, AutoPostInputType, AutoPostInput, AutoPostNodeConfig, SaveToMediaInput, SaveToMediaNodeConfig, DeduplicateNodeConfig, ForEachOutputProperty, ForEachInputPort, ForEachNodeConfig, RandomValueType, RandomInputPort, RandomNodeMode, RandomNodeConfig, VideoImportPlatform, VideoImportQuality, VideoImportNodeConfig, AutoCaptionPreset, AutoCaptionFontWeight, AutoCaptionPosition, AutoCaptionNodeConfig, ScreenshotAnimationNodeConfig, VideoGenerationNodeConfig, PortType, LLMOutputField, LLMNodeConfig, UserMedia, SocialAudio, Media, GetMediaParams, CreateSocialAudioParams, UploadMediaParams, UploadMediaResponse, UpdateMediaTagParams, DeleteMediaParams, DeleteMediaResponse, CreateMediaFromUrlParams, ImportTextParams, ImportTextResponse, Comment, CommentStatus, CreateCommentParams, CreateCommentResponse, GetCommentsParams, ValidationErrorType, ValidationError, ExportedNode, ExportedConnection, ExportedTemplate, AutomationExport, ExportedExecutor, ExportedEdge, ExportedRun, AutomationRunExport, } from './types';
package/dist/types.d.ts CHANGED
@@ -833,7 +833,7 @@ export interface NodeControlConfig {
833
833
  */
834
834
  isInitializer?: boolean;
835
835
  }
836
- 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' | 'transcript' | 'auto-caption' | 'screenshot-animation';
836
+ 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' | 'transcript' | 'auto-caption' | 'screenshot-animation';
837
837
  export interface OutputSchemaProperty {
838
838
  type: 'string' | 'number' | 'boolean' | 'array' | 'object';
839
839
  items?: 'string' | 'number' | 'boolean';
@@ -946,6 +946,7 @@ export interface WorkflowNodeDefinition {
946
946
  videoGeneration?: VideoGenerationNodeConfig;
947
947
  customModelConfig?: CustomModelNodeConfig;
948
948
  forEachConfig?: ForEachNodeConfig;
949
+ randomConfig?: RandomNodeConfig;
949
950
  autoCaptionConfig?: AutoCaptionNodeConfig;
950
951
  screenshotAnimationConfig?: ScreenshotAnimationNodeConfig;
951
952
  };
@@ -1222,6 +1223,39 @@ export interface ForEachNodeConfig {
1222
1223
  /** Whether to expose the iteration index as an output (default: false) */
1223
1224
  exposeIndex?: boolean;
1224
1225
  }
1226
+ /**
1227
+ * Random node value type - determines the type for all inputs and outputs
1228
+ */
1229
+ export type RandomValueType = 'image' | 'video' | 'audio' | 'text' | 'object' | 'account';
1230
+ /**
1231
+ * Random node input port configuration (for multi-input mode)
1232
+ * Each input has an associated probability weight
1233
+ */
1234
+ export interface RandomInputPort {
1235
+ /** The port ID (lowercase, hyphens/underscores only) */
1236
+ id: string;
1237
+ /** Probability weight as integer (0-100, all must sum to 100) */
1238
+ probability: number;
1239
+ }
1240
+ /**
1241
+ * Random node mode
1242
+ * - 'array': Select a random element from an array input
1243
+ * - 'multi-input': Select from multiple individual inputs with weighted probabilities
1244
+ */
1245
+ export type RandomNodeMode = 'array' | 'multi-input';
1246
+ /**
1247
+ * Random node configuration - randomly selects from array or weighted inputs
1248
+ */
1249
+ export interface RandomNodeConfig {
1250
+ /** Selection mode */
1251
+ mode: RandomNodeMode;
1252
+ /** Type for all inputs/outputs (enforced to be uniform) */
1253
+ valueType: RandomValueType;
1254
+ /** Whether to expose the selected index as an output (array mode only, default: false) */
1255
+ exposeIndex?: boolean;
1256
+ /** Input ports with probability weights (multi-input mode only) */
1257
+ inputPorts?: RandomInputPort[];
1258
+ }
1225
1259
  /**
1226
1260
  * Supported platforms for video import
1227
1261
  * Note: YouTube is not yet implemented
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ugcinc",
3
- "version": "3.33.1",
3
+ "version": "3.34.1",
4
4
  "description": "TypeScript/JavaScript client for the UGC Inc API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",