ugcinc 3.8.1 → 3.10.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.d.ts +15 -1
- package/dist/automations.js +20 -0
- package/dist/index.d.ts +1 -1
- package/dist/types.d.ts +123 -0
- package/package.json +1 -1
package/dist/automations.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { NodeControlConfig, NodeCategory, MediaType, NodePort, NodeTypeEnum, WorkflowDefinition, AutomationTemplate, AutomationRun, ExecutorNode, ExecutionEdge, ApiResponse } from './types';
|
|
1
|
+
import type { NodeControlConfig, NodeCategory, MediaType, NodePort, NodeTypeEnum, WorkflowDefinition, AutomationTemplate, AutomationRun, ExecutorNode, ExecutionEdge, ApiResponse, AutomationExport, AutomationRunExport } from './types';
|
|
2
2
|
import { BaseClient } from './base';
|
|
3
3
|
export declare class AutomationsClient extends BaseClient {
|
|
4
4
|
/**
|
|
@@ -104,6 +104,20 @@ export declare class AutomationsClient extends BaseClient {
|
|
|
104
104
|
deleteRun(params: {
|
|
105
105
|
runId: string;
|
|
106
106
|
}): Promise<ApiResponse<null>>;
|
|
107
|
+
/**
|
|
108
|
+
* Export automation template for debugging
|
|
109
|
+
* Returns the complete template definition with nodes and connections
|
|
110
|
+
*/
|
|
111
|
+
exportTemplate(params: {
|
|
112
|
+
templateId: string;
|
|
113
|
+
}): Promise<ApiResponse<AutomationExport>>;
|
|
114
|
+
/**
|
|
115
|
+
* Export automation run for debugging
|
|
116
|
+
* Returns the complete run data including execution state, executor outputs, and edge values
|
|
117
|
+
*/
|
|
118
|
+
exportRun(params: {
|
|
119
|
+
runId: string;
|
|
120
|
+
}): Promise<ApiResponse<AutomationRunExport>>;
|
|
107
121
|
}
|
|
108
122
|
/**
|
|
109
123
|
* Get all available automation nodes
|
package/dist/automations.js
CHANGED
|
@@ -110,6 +110,26 @@ class AutomationsClient extends base_1.BaseClient {
|
|
|
110
110
|
body: JSON.stringify(params),
|
|
111
111
|
});
|
|
112
112
|
}
|
|
113
|
+
/**
|
|
114
|
+
* Export automation template for debugging
|
|
115
|
+
* Returns the complete template definition with nodes and connections
|
|
116
|
+
*/
|
|
117
|
+
async exportTemplate(params) {
|
|
118
|
+
return this.request('/automations/export', {
|
|
119
|
+
method: 'POST',
|
|
120
|
+
body: JSON.stringify(params),
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Export automation run for debugging
|
|
125
|
+
* Returns the complete run data including execution state, executor outputs, and edge values
|
|
126
|
+
*/
|
|
127
|
+
async exportRun(params) {
|
|
128
|
+
return this.request('/automations/export-run', {
|
|
129
|
+
method: 'POST',
|
|
130
|
+
body: JSON.stringify(params),
|
|
131
|
+
});
|
|
132
|
+
}
|
|
113
133
|
}
|
|
114
134
|
exports.AutomationsClient = AutomationsClient;
|
|
115
135
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -17,4 +17,4 @@ export { MediaClient } from './media';
|
|
|
17
17
|
export { CommentsClient } from './comments';
|
|
18
18
|
export type { RenderJobResponse, RenderJobStatus, SubmitImageRenderJobParams, SubmitVideoRenderJobParams, RenderVideoEditorConfig, } from './render';
|
|
19
19
|
export type { ClientConfig, } from './base';
|
|
20
|
-
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, TriggerCollectionConfig, DayOfWeek, RecurrenceNodeConfig, AccountNodeConfig, MediaNodeEnabledType, MediaNodeConfig, PostSchedulingMode, PostScheduledSubMode, PostRateLimitFrequency, PostSchedulingConfig, PostVideoNodeConfig, PostSlideshowInput, PostSlideshowNodeConfig, SaveToMediaInput, SaveToMediaNodeConfig, DeduplicateNodeConfig, ForEachOutputProperty, ForEachNodeConfig, VideoImportPlatform, VideoImportQuality, VideoImportNodeConfig, AutoCaptionPreset, AutoCaptionFontWeight, AutoCaptionPosition, AutoCaptionNodeConfig, VideoGenerationNodeConfig, PortType, LLMOutputField, LLMNodeConfig, UserMedia, SocialAudio, Media, GetMediaParams, UploadMediaParams, UploadMediaResponse, UpdateMediaTagParams, DeleteMediaParams, DeleteMediaResponse, CreateSocialAudioParams, CreateMediaFromUrlParams, ImportTextParams, ImportTextResponse, Comment, CommentStatus, CreateCommentParams, CreateCommentResponse, GetCommentsParams, ValidationErrorType, ValidationError, } from './types';
|
|
20
|
+
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, TriggerCollectionConfig, DayOfWeek, RecurrenceNodeConfig, AccountNodeConfig, MediaNodeEnabledType, MediaNodeConfig, PostSchedulingMode, PostScheduledSubMode, PostRateLimitFrequency, PostSchedulingConfig, PostVideoNodeConfig, PostSlideshowInput, PostSlideshowNodeConfig, SaveToMediaInput, SaveToMediaNodeConfig, DeduplicateNodeConfig, ForEachOutputProperty, ForEachInputPort, ForEachNodeConfig, VideoImportPlatform, VideoImportQuality, VideoImportNodeConfig, AutoCaptionPreset, AutoCaptionFontWeight, AutoCaptionPosition, AutoCaptionNodeConfig, VideoGenerationNodeConfig, PortType, LLMOutputField, LLMNodeConfig, UserMedia, SocialAudio, Media, GetMediaParams, UploadMediaParams, UploadMediaResponse, UpdateMediaTagParams, DeleteMediaParams, DeleteMediaResponse, CreateSocialAudioParams, 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
|
@@ -1158,12 +1158,27 @@ export interface ForEachOutputProperty {
|
|
|
1158
1158
|
/** The output type for the port */
|
|
1159
1159
|
type: 'text' | 'object';
|
|
1160
1160
|
}
|
|
1161
|
+
/**
|
|
1162
|
+
* For-each input port configuration
|
|
1163
|
+
* Defines passthrough inputs that capture single values before expansion
|
|
1164
|
+
* and pass them unchanged to all iterations (Mode 2: Single-Value Passthrough)
|
|
1165
|
+
*/
|
|
1166
|
+
export interface ForEachInputPort {
|
|
1167
|
+
/** The port ID (lowercase, hyphens/underscores only) */
|
|
1168
|
+
id: string;
|
|
1169
|
+
/** Display title for the port */
|
|
1170
|
+
title: string;
|
|
1171
|
+
/** The port type */
|
|
1172
|
+
type: 'image' | 'video' | 'audio' | 'text' | 'object' | 'account';
|
|
1173
|
+
}
|
|
1161
1174
|
/**
|
|
1162
1175
|
* For-each node configuration
|
|
1163
1176
|
*/
|
|
1164
1177
|
export interface ForEachNodeConfig {
|
|
1165
1178
|
/** Properties to extract from each item and expose as separate outputs */
|
|
1166
1179
|
outputProperties?: ForEachOutputProperty[];
|
|
1180
|
+
/** Input ports for single-value passthrough (Mode 2) */
|
|
1181
|
+
inputPorts?: ForEachInputPort[];
|
|
1167
1182
|
}
|
|
1168
1183
|
/**
|
|
1169
1184
|
* Supported platforms for video import
|
|
@@ -1370,6 +1385,7 @@ export interface ExecutorNode {
|
|
|
1370
1385
|
type: NodeTypeEnum;
|
|
1371
1386
|
status: 'pending' | 'running' | 'completed' | 'failed';
|
|
1372
1387
|
output_value: unknown | null;
|
|
1388
|
+
error_message: string | null;
|
|
1373
1389
|
created_at: string;
|
|
1374
1390
|
completed_at: string | null;
|
|
1375
1391
|
}
|
|
@@ -1539,3 +1555,110 @@ export interface ValidationError {
|
|
|
1539
1555
|
portId?: string;
|
|
1540
1556
|
message: string;
|
|
1541
1557
|
}
|
|
1558
|
+
/**
|
|
1559
|
+
* Exported node representation for debugging
|
|
1560
|
+
*/
|
|
1561
|
+
export interface ExportedNode {
|
|
1562
|
+
nodeId: string;
|
|
1563
|
+
type: string;
|
|
1564
|
+
name: string | null;
|
|
1565
|
+
position: {
|
|
1566
|
+
x: number;
|
|
1567
|
+
y: number;
|
|
1568
|
+
};
|
|
1569
|
+
inputs: Record<string, {
|
|
1570
|
+
sourceNodeId: string;
|
|
1571
|
+
sourceOutputId: string;
|
|
1572
|
+
}>;
|
|
1573
|
+
config: Record<string, unknown>;
|
|
1574
|
+
}
|
|
1575
|
+
/**
|
|
1576
|
+
* Exported connection representation
|
|
1577
|
+
*/
|
|
1578
|
+
export interface ExportedConnection {
|
|
1579
|
+
from: {
|
|
1580
|
+
nodeId: string;
|
|
1581
|
+
port: string;
|
|
1582
|
+
};
|
|
1583
|
+
to: {
|
|
1584
|
+
nodeId: string;
|
|
1585
|
+
port: string;
|
|
1586
|
+
};
|
|
1587
|
+
}
|
|
1588
|
+
/**
|
|
1589
|
+
* Exported template data
|
|
1590
|
+
*/
|
|
1591
|
+
export interface ExportedTemplate {
|
|
1592
|
+
id: string;
|
|
1593
|
+
name: string;
|
|
1594
|
+
description: string | null;
|
|
1595
|
+
canvasState: {
|
|
1596
|
+
zoom: number;
|
|
1597
|
+
panX: number;
|
|
1598
|
+
panY: number;
|
|
1599
|
+
} | null;
|
|
1600
|
+
outputSchema: Record<string, {
|
|
1601
|
+
type: string;
|
|
1602
|
+
}> | null;
|
|
1603
|
+
createdAt: string;
|
|
1604
|
+
updatedAt: string;
|
|
1605
|
+
}
|
|
1606
|
+
/**
|
|
1607
|
+
* Full automation export (template + nodes + connections)
|
|
1608
|
+
*/
|
|
1609
|
+
export interface AutomationExport {
|
|
1610
|
+
template: ExportedTemplate;
|
|
1611
|
+
nodes: ExportedNode[];
|
|
1612
|
+
connections: ExportedConnection[];
|
|
1613
|
+
}
|
|
1614
|
+
/**
|
|
1615
|
+
* Exported executor data
|
|
1616
|
+
*/
|
|
1617
|
+
export interface ExportedExecutor {
|
|
1618
|
+
id: string;
|
|
1619
|
+
nodeTemplateId: string;
|
|
1620
|
+
executorIndex: number;
|
|
1621
|
+
type: string;
|
|
1622
|
+
status: string;
|
|
1623
|
+
outputValue: unknown;
|
|
1624
|
+
errorMessage: string | null;
|
|
1625
|
+
createdAt: string;
|
|
1626
|
+
completedAt: string | null;
|
|
1627
|
+
}
|
|
1628
|
+
/**
|
|
1629
|
+
* Exported edge data
|
|
1630
|
+
*/
|
|
1631
|
+
export interface ExportedEdge {
|
|
1632
|
+
sourceExecutorId: string;
|
|
1633
|
+
sourceNodeId: string;
|
|
1634
|
+
sourcePort: string;
|
|
1635
|
+
targetExecutorId: string;
|
|
1636
|
+
targetNodeId: string;
|
|
1637
|
+
targetPort: string;
|
|
1638
|
+
value: unknown;
|
|
1639
|
+
}
|
|
1640
|
+
/**
|
|
1641
|
+
* Exported run data
|
|
1642
|
+
*/
|
|
1643
|
+
export interface ExportedRun {
|
|
1644
|
+
id: string;
|
|
1645
|
+
templateId: string;
|
|
1646
|
+
templateName: string;
|
|
1647
|
+
status: string;
|
|
1648
|
+
variableInputs: Record<string, string> | null;
|
|
1649
|
+
createdAt: string;
|
|
1650
|
+
completedAt: string | null;
|
|
1651
|
+
}
|
|
1652
|
+
/**
|
|
1653
|
+
* Full automation run export
|
|
1654
|
+
*/
|
|
1655
|
+
export interface AutomationRunExport {
|
|
1656
|
+
run: ExportedRun;
|
|
1657
|
+
template: ExportedTemplate;
|
|
1658
|
+
nodes: ExportedNode[];
|
|
1659
|
+
connections: ExportedConnection[];
|
|
1660
|
+
execution: {
|
|
1661
|
+
executors: ExportedExecutor[];
|
|
1662
|
+
edges: ExportedEdge[];
|
|
1663
|
+
};
|
|
1664
|
+
}
|