ugcinc 3.69.0 → 3.71.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.
- package/dist/automations.js +13 -1
- package/dist/index.d.ts +1 -1
- package/dist/types.d.ts +14 -7
- package/package.json +2 -2
package/dist/automations.js
CHANGED
|
@@ -682,7 +682,14 @@ function llmTypeToSchemaType(type) {
|
|
|
682
682
|
function llmObjectSchemaToPropertySchema(fields) {
|
|
683
683
|
const result = {};
|
|
684
684
|
for (const field of fields) {
|
|
685
|
-
if (field.type === '
|
|
685
|
+
if (field.type === 'object' && field.objectSchema) {
|
|
686
|
+
// Top-level object with nested schema
|
|
687
|
+
result[field.name] = {
|
|
688
|
+
type: 'object',
|
|
689
|
+
itemSchema: llmObjectSchemaToPropertySchema(field.objectSchema),
|
|
690
|
+
};
|
|
691
|
+
}
|
|
692
|
+
else if (field.type === 'array' && field.items === 'object' && field.objectSchema) {
|
|
686
693
|
// Nested array of objects
|
|
687
694
|
result[field.name] = {
|
|
688
695
|
type: 'object',
|
|
@@ -733,6 +740,11 @@ function getOutputSchema(nodeType, nodeConfig, outputPortId) {
|
|
|
733
740
|
const outputFields = llmConfig?.outputFields;
|
|
734
741
|
if (outputFields) {
|
|
735
742
|
const field = outputFields.find(f => f.name === outputPortId);
|
|
743
|
+
// Handle top-level object type
|
|
744
|
+
if (field?.type === 'object' && field.objectSchema) {
|
|
745
|
+
return llmObjectSchemaToPropertySchema(field.objectSchema);
|
|
746
|
+
}
|
|
747
|
+
// Handle array of objects
|
|
736
748
|
if (field?.type === 'array' && field.items === 'object' && field.objectSchema) {
|
|
737
749
|
return llmObjectSchemaToPropertySchema(field.objectSchema);
|
|
738
750
|
}
|
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, 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, 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
|
@@ -860,11 +860,11 @@ export interface LLMOutputField {
|
|
|
860
860
|
name: string;
|
|
861
861
|
/** Optional - guides LLM on expected content */
|
|
862
862
|
description?: string;
|
|
863
|
-
/** Output type */
|
|
864
|
-
type: 'string' | 'number' | 'boolean' | 'array';
|
|
863
|
+
/** Output type (includes 'object' for top-level objects) */
|
|
864
|
+
type: 'string' | 'number' | 'boolean' | 'array' | 'object';
|
|
865
865
|
/** For array types - the item type (including 'object' for arrays of objects) */
|
|
866
866
|
items?: 'string' | 'number' | 'boolean' | 'object';
|
|
867
|
-
/** For array of objects - nested field definitions (max 3 levels of nesting) */
|
|
867
|
+
/** For array of objects or top-level objects - nested field definitions (max 3 levels of nesting) */
|
|
868
868
|
objectSchema?: LLMOutputField[];
|
|
869
869
|
/** Exact array length constraint */
|
|
870
870
|
length?: number;
|
|
@@ -1372,6 +1372,15 @@ export interface BranchDefinition {
|
|
|
1372
1372
|
/** The key to match against (e.g., "happy", "sad", "neutral") */
|
|
1373
1373
|
key: string;
|
|
1374
1374
|
}
|
|
1375
|
+
/**
|
|
1376
|
+
* Per-branch value configuration - each branch can independently be variable or static
|
|
1377
|
+
*/
|
|
1378
|
+
export type BranchValueConfig = {
|
|
1379
|
+
isVariable: true;
|
|
1380
|
+
} | {
|
|
1381
|
+
isVariable: false;
|
|
1382
|
+
value: unknown;
|
|
1383
|
+
};
|
|
1375
1384
|
/**
|
|
1376
1385
|
* Branch node passthrough input definition
|
|
1377
1386
|
*/
|
|
@@ -1382,10 +1391,8 @@ export interface BranchPassthroughInput {
|
|
|
1382
1391
|
type: 'image' | 'video' | 'audio' | 'text' | 'number' | 'boolean' | 'account' | 'object';
|
|
1383
1392
|
/** Whether this is an array type */
|
|
1384
1393
|
isArray?: boolean;
|
|
1385
|
-
/**
|
|
1386
|
-
|
|
1387
|
-
/** Static values per branch when isVariable is false. Key is branch key, value is the static value. */
|
|
1388
|
-
branchValues?: Record<string, unknown>;
|
|
1394
|
+
/** Per-branch value configuration. Key is branch key. Each branch can be variable (input port) or static (value). */
|
|
1395
|
+
branchValues?: Record<string, BranchValueConfig>;
|
|
1389
1396
|
/** Object schema for object type (when type is 'object') */
|
|
1390
1397
|
objectSchema?: RandomRouteObjectField[];
|
|
1391
1398
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ugcinc",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.71.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",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"author": "UGC Inc",
|
|
22
22
|
"license": "MIT",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"ugcinc": "^3.
|
|
24
|
+
"ugcinc": "^3.70.0",
|
|
25
25
|
"zod": "^3.23.0"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|