ugcinc 2.85.0 → 2.87.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 +4 -2
- package/dist/automations.js +112 -0
- package/dist/index.d.ts +1 -1
- package/dist/render.d.ts +14 -0
- package/dist/render.js +9 -0
- package/dist/types.d.ts +31 -1
- package/package.json +1 -1
package/dist/automations.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { NodeControlConfig, MediaType, NodePort, NodeTypeEnum, WorkflowDefinition, AutomationTemplate, AutomationRun,
|
|
1
|
+
import type { NodeControlConfig, MediaType, NodePort, NodeTypeEnum, WorkflowDefinition, AutomationTemplate, AutomationRun, ExecutorNode, ExecutionEdge, ApiResponse } from './types';
|
|
2
2
|
import { BaseClient } from './base';
|
|
3
3
|
export declare class AutomationsClient extends BaseClient {
|
|
4
4
|
/**
|
|
@@ -49,12 +49,14 @@ export declare class AutomationsClient extends BaseClient {
|
|
|
49
49
|
}>>;
|
|
50
50
|
/**
|
|
51
51
|
* Get automation run status
|
|
52
|
+
* Returns executors (expanded nodes) and edges (data flow connections)
|
|
52
53
|
*/
|
|
53
54
|
getStatus(params: {
|
|
54
55
|
runId: string;
|
|
55
56
|
}): Promise<ApiResponse<{
|
|
56
57
|
run: AutomationRun;
|
|
57
|
-
|
|
58
|
+
executors: ExecutorNode[];
|
|
59
|
+
edges: ExecutionEdge[];
|
|
58
60
|
}>>;
|
|
59
61
|
/**
|
|
60
62
|
* List automation runs for a template
|
package/dist/automations.js
CHANGED
|
@@ -57,6 +57,7 @@ class AutomationsClient extends base_1.BaseClient {
|
|
|
57
57
|
}
|
|
58
58
|
/**
|
|
59
59
|
* Get automation run status
|
|
60
|
+
* Returns executors (expanded nodes) and edges (data flow connections)
|
|
60
61
|
*/
|
|
61
62
|
async getStatus(params) {
|
|
62
63
|
return this.request('/automations/status', {
|
|
@@ -291,6 +292,117 @@ function getAllNodes() {
|
|
|
291
292
|
inputs: [],
|
|
292
293
|
outputs: [],
|
|
293
294
|
},
|
|
295
|
+
{
|
|
296
|
+
type: "account",
|
|
297
|
+
label: "Account",
|
|
298
|
+
description: "Select accounts to post from",
|
|
299
|
+
category: "Input",
|
|
300
|
+
inputs: [],
|
|
301
|
+
outputs: [
|
|
302
|
+
{
|
|
303
|
+
id: "account",
|
|
304
|
+
title: "Account",
|
|
305
|
+
type: "account",
|
|
306
|
+
required: true,
|
|
307
|
+
},
|
|
308
|
+
],
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
type: "post-video",
|
|
312
|
+
label: "Post Video",
|
|
313
|
+
description: "Post a video to social media",
|
|
314
|
+
category: "Output",
|
|
315
|
+
inputs: [
|
|
316
|
+
{
|
|
317
|
+
id: "video",
|
|
318
|
+
title: "Video",
|
|
319
|
+
type: "video",
|
|
320
|
+
required: true,
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
id: "account",
|
|
324
|
+
title: "Account",
|
|
325
|
+
type: "account",
|
|
326
|
+
required: true,
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
id: "caption",
|
|
330
|
+
title: "Caption",
|
|
331
|
+
type: "text",
|
|
332
|
+
required: false,
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
id: "socialAudio",
|
|
336
|
+
title: "Social Audio",
|
|
337
|
+
type: "audio",
|
|
338
|
+
required: false,
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
id: "postDate",
|
|
342
|
+
title: "Post Date",
|
|
343
|
+
type: "date",
|
|
344
|
+
required: false,
|
|
345
|
+
},
|
|
346
|
+
],
|
|
347
|
+
outputs: [
|
|
348
|
+
{
|
|
349
|
+
id: "postUrl",
|
|
350
|
+
title: "Post URL",
|
|
351
|
+
type: "text",
|
|
352
|
+
required: true,
|
|
353
|
+
},
|
|
354
|
+
],
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
type: "post-slideshow",
|
|
358
|
+
label: "Post Slideshow",
|
|
359
|
+
description: "Post a slideshow to social media",
|
|
360
|
+
category: "Output",
|
|
361
|
+
// Dynamic inputs based on imageCount in config
|
|
362
|
+
inputs: [
|
|
363
|
+
{
|
|
364
|
+
id: "account",
|
|
365
|
+
title: "Account",
|
|
366
|
+
type: "account",
|
|
367
|
+
required: true,
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
id: "caption",
|
|
371
|
+
title: "Caption",
|
|
372
|
+
type: "text",
|
|
373
|
+
required: false,
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
id: "socialAudio",
|
|
377
|
+
title: "Social Audio",
|
|
378
|
+
type: "audio",
|
|
379
|
+
required: false,
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
id: "postDate",
|
|
383
|
+
title: "Post Date",
|
|
384
|
+
type: "date",
|
|
385
|
+
required: false,
|
|
386
|
+
},
|
|
387
|
+
],
|
|
388
|
+
outputs: [
|
|
389
|
+
{
|
|
390
|
+
id: "postUrl",
|
|
391
|
+
title: "Post URL",
|
|
392
|
+
type: "text",
|
|
393
|
+
required: true,
|
|
394
|
+
},
|
|
395
|
+
],
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
type: "save-to-media",
|
|
399
|
+
label: "Save To Media",
|
|
400
|
+
description: "Save outputs to media library",
|
|
401
|
+
category: "Output",
|
|
402
|
+
// Dynamic inputs based on config
|
|
403
|
+
inputs: [],
|
|
404
|
+
outputs: [],
|
|
405
|
+
},
|
|
294
406
|
];
|
|
295
407
|
}
|
|
296
408
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -15,4 +15,4 @@ export { MediaClient } from './media';
|
|
|
15
15
|
export { CommentsClient } from './comments';
|
|
16
16
|
export type { RenderJobResponse, RenderJobStatus, SubmitImageRenderJobParams, SubmitVideoRenderJobParams, RenderVideoEditorConfig, } from './render';
|
|
17
17
|
export type { ClientConfig, } from './base';
|
|
18
|
-
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, OutputSchemaProperty, SelectionMode, ExhaustionBehavior, SelectionConfig, SelectionState, OutputMode, NodeOutputValues, OutputInput, OutputNodeConfig, LLMOutputField, LLMNodeConfig, UserMedia, SocialAudio, Media, GetMediaParams, UploadMediaParams, UploadMediaResponse, UpdateMediaTagParams, DeleteMediaParams, DeleteMediaResponse, CreateSocialAudioParams, CreateMediaFromUrlParams, ImportTextParams, ImportTextResponse, Comment, CommentStatus, CreateCommentParams, CreateCommentResponse, GetCommentsParams, } from './types';
|
|
18
|
+
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, LLMOutputField, LLMNodeConfig, UserMedia, SocialAudio, Media, GetMediaParams, UploadMediaParams, UploadMediaResponse, UpdateMediaTagParams, DeleteMediaParams, DeleteMediaResponse, CreateSocialAudioParams, CreateMediaFromUrlParams, ImportTextParams, ImportTextResponse, Comment, CommentStatus, CreateCommentParams, CreateCommentResponse, GetCommentsParams, } from './types';
|
package/dist/render.d.ts
CHANGED
|
@@ -24,6 +24,12 @@ export interface SubmitImageRenderJobParams {
|
|
|
24
24
|
textValues: Record<string, string>;
|
|
25
25
|
output_type?: 'image';
|
|
26
26
|
image_format?: 'png' | 'jpeg';
|
|
27
|
+
/** If true, inject CapCut-style metadata into the output */
|
|
28
|
+
injectCapcutMetadata?: boolean;
|
|
29
|
+
/** OS to report in CapCut metadata ("ios" or "android") */
|
|
30
|
+
capcutOs?: 'ios' | 'android';
|
|
31
|
+
/** Region code to report in CapCut metadata */
|
|
32
|
+
capcutRegion?: string;
|
|
27
33
|
}
|
|
28
34
|
export type RenderVideoEditorConfig = VideoEditorNodeConfig;
|
|
29
35
|
export interface SubmitVideoRenderJobParams {
|
|
@@ -32,6 +38,14 @@ export interface SubmitVideoRenderJobParams {
|
|
|
32
38
|
output_type?: 'video' | 'image';
|
|
33
39
|
image_format?: 'png' | 'jpeg';
|
|
34
40
|
video_codec?: 'h264' | 'h265';
|
|
41
|
+
/** If true, inject CapCut-style metadata into the output */
|
|
42
|
+
injectCapcutMetadata?: boolean;
|
|
43
|
+
/** OS to report in CapCut metadata ("ios" or "android") */
|
|
44
|
+
capcutOs?: 'ios' | 'android';
|
|
45
|
+
/** Region code to report in CapCut metadata */
|
|
46
|
+
capcutRegion?: string;
|
|
47
|
+
/** If true, re-encode video to H.265/HEVC codec */
|
|
48
|
+
reencodeH265?: boolean;
|
|
35
49
|
}
|
|
36
50
|
/**
|
|
37
51
|
* Client for rendering operations
|
package/dist/render.js
CHANGED
|
@@ -36,6 +36,10 @@ class RenderClient {
|
|
|
36
36
|
},
|
|
37
37
|
output_type: params.output_type ?? 'image',
|
|
38
38
|
image_format: params.image_format ?? 'png',
|
|
39
|
+
// CapCut metadata injection options
|
|
40
|
+
inject_capcut_metadata: params.injectCapcutMetadata ?? false,
|
|
41
|
+
capcut_os: params.capcutOs ?? 'ios',
|
|
42
|
+
capcut_region: params.capcutRegion ?? 'US',
|
|
39
43
|
})
|
|
40
44
|
});
|
|
41
45
|
const text = await response.text();
|
|
@@ -91,6 +95,11 @@ class RenderClient {
|
|
|
91
95
|
output_type: params.output_type,
|
|
92
96
|
image_format: params.image_format,
|
|
93
97
|
video_codec: params.video_codec,
|
|
98
|
+
// CapCut metadata injection options
|
|
99
|
+
inject_capcut_metadata: params.injectCapcutMetadata ?? false,
|
|
100
|
+
capcut_os: params.capcutOs ?? 'ios',
|
|
101
|
+
capcut_region: params.capcutRegion ?? 'US',
|
|
102
|
+
reencode_h265: params.reencodeH265 ?? false,
|
|
94
103
|
})
|
|
95
104
|
});
|
|
96
105
|
const text = await response.text();
|
package/dist/types.d.ts
CHANGED
|
@@ -747,7 +747,7 @@ export type StaticSegment = ImageSegment | TextSegment;
|
|
|
747
747
|
/**
|
|
748
748
|
* Automation types
|
|
749
749
|
*/
|
|
750
|
-
export type MediaType = 'video' | 'image' | 'audio' | 'social_audio' | 'text';
|
|
750
|
+
export type MediaType = 'video' | 'image' | 'audio' | 'social_audio' | 'text' | 'account' | 'date';
|
|
751
751
|
/**
|
|
752
752
|
* Selection order configuration for media nodes
|
|
753
753
|
*/
|
|
@@ -978,6 +978,10 @@ export interface AutomationRun {
|
|
|
978
978
|
created_at: string;
|
|
979
979
|
completed_at: string | null;
|
|
980
980
|
}
|
|
981
|
+
/**
|
|
982
|
+
* @deprecated NodeRun is part of the old execution model.
|
|
983
|
+
* Use ExecutorNode from the new edge-based execution model instead.
|
|
984
|
+
*/
|
|
981
985
|
export interface NodeRun {
|
|
982
986
|
id: string;
|
|
983
987
|
automation_run_id: string;
|
|
@@ -991,6 +995,32 @@ export interface NodeRun {
|
|
|
991
995
|
/** Sub-workflow node runs (only present for workflow nodes) */
|
|
992
996
|
subNodes?: NodeRun[];
|
|
993
997
|
}
|
|
998
|
+
/**
|
|
999
|
+
* Executor node from the edge-based execution model.
|
|
1000
|
+
* Each executor represents one instance of a template node during execution.
|
|
1001
|
+
*/
|
|
1002
|
+
export interface ExecutorNode {
|
|
1003
|
+
id: string;
|
|
1004
|
+
template_node_id: string;
|
|
1005
|
+
executor_index: number;
|
|
1006
|
+
type: NodeTypeEnum;
|
|
1007
|
+
status: 'pending' | 'running' | 'completed' | 'failed';
|
|
1008
|
+
output_value: unknown | null;
|
|
1009
|
+
created_at: string;
|
|
1010
|
+
completed_at: string | null;
|
|
1011
|
+
}
|
|
1012
|
+
/**
|
|
1013
|
+
* Execution edge from the edge-based execution model.
|
|
1014
|
+
* Represents a data flow connection between two executors.
|
|
1015
|
+
*/
|
|
1016
|
+
export interface ExecutionEdge {
|
|
1017
|
+
id: string;
|
|
1018
|
+
source_executor_id: string;
|
|
1019
|
+
source_port: string;
|
|
1020
|
+
target_executor_id: string;
|
|
1021
|
+
target_port: string;
|
|
1022
|
+
value: unknown | null;
|
|
1023
|
+
}
|
|
994
1024
|
/**
|
|
995
1025
|
* Media types
|
|
996
1026
|
*/
|