ugcinc 2.98.0 → 2.99.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.
- package/dist/automations.js +85 -73
- package/dist/index.d.ts +1 -1
- package/dist/types.d.ts +27 -1
- package/package.json +1 -1
package/dist/automations.js
CHANGED
|
@@ -109,98 +109,109 @@ exports.AutomationsClient = AutomationsClient;
|
|
|
109
109
|
function getAllNodes() {
|
|
110
110
|
return [
|
|
111
111
|
// === Source nodes ===
|
|
112
|
+
// Media first (consolidated node), then other sources
|
|
112
113
|
{
|
|
113
|
-
type: "
|
|
114
|
-
label: "
|
|
115
|
-
description: "Import
|
|
116
|
-
category: "
|
|
114
|
+
type: "media",
|
|
115
|
+
label: "Media",
|
|
116
|
+
description: "Import images, videos, and audio files",
|
|
117
|
+
category: "Sources",
|
|
117
118
|
nodeCategory: "source",
|
|
118
119
|
inputs: [],
|
|
120
|
+
outputs: [], // Dynamic based on enabledTypes config
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
type: "text",
|
|
124
|
+
label: "Text",
|
|
125
|
+
description: "Create text with templated variables",
|
|
126
|
+
category: "Sources",
|
|
127
|
+
nodeCategory: "source",
|
|
128
|
+
inputs: [], // Dynamic inputs based on template variables
|
|
119
129
|
outputs: [
|
|
120
130
|
{
|
|
121
|
-
id: "
|
|
122
|
-
title: "
|
|
123
|
-
type: "
|
|
131
|
+
id: "text",
|
|
132
|
+
title: "text",
|
|
133
|
+
type: "text",
|
|
124
134
|
required: true,
|
|
125
135
|
},
|
|
126
136
|
],
|
|
127
137
|
},
|
|
128
138
|
{
|
|
129
|
-
type: "
|
|
130
|
-
label: "
|
|
131
|
-
description: "
|
|
132
|
-
category: "
|
|
139
|
+
type: "social-audio",
|
|
140
|
+
label: "Social Media Audio",
|
|
141
|
+
description: "Link audios from social media",
|
|
142
|
+
category: "Sources",
|
|
133
143
|
nodeCategory: "source",
|
|
134
144
|
inputs: [],
|
|
135
145
|
outputs: [
|
|
136
146
|
{
|
|
137
|
-
id: "
|
|
138
|
-
title: "
|
|
139
|
-
type: "
|
|
147
|
+
id: "social_audio",
|
|
148
|
+
title: "social_audio",
|
|
149
|
+
type: "social_audio",
|
|
140
150
|
required: true,
|
|
141
151
|
},
|
|
142
152
|
],
|
|
143
153
|
},
|
|
144
154
|
{
|
|
145
|
-
type: "
|
|
146
|
-
label: "
|
|
147
|
-
description: "
|
|
148
|
-
category: "
|
|
155
|
+
type: "account",
|
|
156
|
+
label: "Account",
|
|
157
|
+
description: "Select accounts to post from",
|
|
158
|
+
category: "Sources",
|
|
149
159
|
nodeCategory: "source",
|
|
150
160
|
inputs: [],
|
|
151
161
|
outputs: [
|
|
152
162
|
{
|
|
153
|
-
id: "
|
|
154
|
-
title: "
|
|
155
|
-
type: "
|
|
163
|
+
id: "account",
|
|
164
|
+
title: "Account",
|
|
165
|
+
type: "account",
|
|
156
166
|
required: true,
|
|
157
167
|
},
|
|
158
168
|
],
|
|
159
169
|
},
|
|
170
|
+
// Hidden legacy source nodes (replaced by media node)
|
|
160
171
|
{
|
|
161
|
-
type: "
|
|
162
|
-
label: "
|
|
163
|
-
description: "Import
|
|
164
|
-
category: "
|
|
172
|
+
type: "image",
|
|
173
|
+
label: "Image",
|
|
174
|
+
description: "Import image files",
|
|
175
|
+
category: "Sources",
|
|
165
176
|
nodeCategory: "source",
|
|
166
177
|
inputs: [],
|
|
167
178
|
outputs: [
|
|
168
179
|
{
|
|
169
|
-
id: "
|
|
170
|
-
title: "
|
|
171
|
-
type: "
|
|
180
|
+
id: "image",
|
|
181
|
+
title: "image",
|
|
182
|
+
type: "image",
|
|
172
183
|
required: true,
|
|
173
184
|
},
|
|
174
185
|
],
|
|
175
186
|
},
|
|
176
187
|
{
|
|
177
|
-
type: "
|
|
178
|
-
label: "
|
|
179
|
-
description: "
|
|
180
|
-
category: "
|
|
188
|
+
type: "video",
|
|
189
|
+
label: "Video",
|
|
190
|
+
description: "Import video files",
|
|
191
|
+
category: "Sources",
|
|
181
192
|
nodeCategory: "source",
|
|
182
|
-
inputs: [],
|
|
193
|
+
inputs: [],
|
|
183
194
|
outputs: [
|
|
184
195
|
{
|
|
185
|
-
id: "
|
|
186
|
-
title: "
|
|
187
|
-
type: "
|
|
196
|
+
id: "video",
|
|
197
|
+
title: "video",
|
|
198
|
+
type: "video",
|
|
188
199
|
required: true,
|
|
189
200
|
},
|
|
190
201
|
],
|
|
191
202
|
},
|
|
192
203
|
{
|
|
193
|
-
type: "
|
|
194
|
-
label: "
|
|
195
|
-
description: "
|
|
196
|
-
category: "
|
|
204
|
+
type: "audio",
|
|
205
|
+
label: "Audio",
|
|
206
|
+
description: "Import audio files",
|
|
207
|
+
category: "Sources",
|
|
197
208
|
nodeCategory: "source",
|
|
198
209
|
inputs: [],
|
|
199
210
|
outputs: [
|
|
200
211
|
{
|
|
201
|
-
id: "
|
|
202
|
-
title: "
|
|
203
|
-
type: "
|
|
212
|
+
id: "audio",
|
|
213
|
+
title: "audio",
|
|
214
|
+
type: "audio",
|
|
204
215
|
required: true,
|
|
205
216
|
},
|
|
206
217
|
],
|
|
@@ -210,7 +221,7 @@ function getAllNodes() {
|
|
|
210
221
|
type: "image-editor",
|
|
211
222
|
label: "Image Template",
|
|
212
223
|
description: "Edit and transform images",
|
|
213
|
-
category: "
|
|
224
|
+
category: "Generation",
|
|
214
225
|
nodeCategory: "generator",
|
|
215
226
|
inputs: [
|
|
216
227
|
{
|
|
@@ -233,7 +244,7 @@ function getAllNodes() {
|
|
|
233
244
|
type: "video-editor",
|
|
234
245
|
label: "Video Template",
|
|
235
246
|
description: "Edit and transform videos",
|
|
236
|
-
category: "
|
|
247
|
+
category: "Generation",
|
|
237
248
|
nodeCategory: "generator",
|
|
238
249
|
inputs: [], // Dynamic inputs based on segments in editor config
|
|
239
250
|
outputs: [
|
|
@@ -245,6 +256,17 @@ function getAllNodes() {
|
|
|
245
256
|
},
|
|
246
257
|
],
|
|
247
258
|
},
|
|
259
|
+
{
|
|
260
|
+
type: "workflow",
|
|
261
|
+
label: "Sub-Agent",
|
|
262
|
+
description: "Embed another workflow as a sub-agent",
|
|
263
|
+
category: "Generation",
|
|
264
|
+
nodeCategory: "generator",
|
|
265
|
+
// Inputs and outputs are dynamic based on the embedded workflow
|
|
266
|
+
inputs: [],
|
|
267
|
+
outputs: [],
|
|
268
|
+
},
|
|
269
|
+
// === AI nodes ===
|
|
248
270
|
{
|
|
249
271
|
type: "image-generation",
|
|
250
272
|
label: "Image Generation",
|
|
@@ -271,8 +293,8 @@ function getAllNodes() {
|
|
|
271
293
|
},
|
|
272
294
|
{
|
|
273
295
|
type: "llm",
|
|
274
|
-
label: "
|
|
275
|
-
description: "
|
|
296
|
+
label: "Text Generation",
|
|
297
|
+
description: "Generate text using Large Language Models",
|
|
276
298
|
category: "AI",
|
|
277
299
|
nodeCategory: "generator",
|
|
278
300
|
// Dynamic inputs: extracted from systemPrompt {{variables}} + media refs
|
|
@@ -280,16 +302,6 @@ function getAllNodes() {
|
|
|
280
302
|
// Dynamic outputs: based on outputFields config
|
|
281
303
|
outputs: [],
|
|
282
304
|
},
|
|
283
|
-
{
|
|
284
|
-
type: "workflow",
|
|
285
|
-
label: "Workflow",
|
|
286
|
-
description: "Embed another workflow as a sub-workflow",
|
|
287
|
-
category: "Flow",
|
|
288
|
-
nodeCategory: "generator",
|
|
289
|
-
// Inputs and outputs are dynamic based on the embedded workflow
|
|
290
|
-
inputs: [],
|
|
291
|
-
outputs: [],
|
|
292
|
-
},
|
|
293
305
|
// === Trigger nodes ===
|
|
294
306
|
{
|
|
295
307
|
type: "manual-trigger",
|
|
@@ -313,22 +325,6 @@ function getAllNodes() {
|
|
|
313
325
|
isInitializer: true,
|
|
314
326
|
},
|
|
315
327
|
// === Terminal nodes ===
|
|
316
|
-
{
|
|
317
|
-
type: "output",
|
|
318
|
-
label: "Output",
|
|
319
|
-
description: "Final output of the automation",
|
|
320
|
-
category: "Output",
|
|
321
|
-
nodeCategory: "terminal",
|
|
322
|
-
inputs: [
|
|
323
|
-
{
|
|
324
|
-
id: "result",
|
|
325
|
-
title: "Result",
|
|
326
|
-
type: ["image", "video", "audio", "text"],
|
|
327
|
-
required: true,
|
|
328
|
-
},
|
|
329
|
-
],
|
|
330
|
-
outputs: [],
|
|
331
|
-
},
|
|
332
328
|
{
|
|
333
329
|
type: "post-video",
|
|
334
330
|
label: "Post Video",
|
|
@@ -414,6 +410,22 @@ function getAllNodes() {
|
|
|
414
410
|
inputs: [],
|
|
415
411
|
outputs: [],
|
|
416
412
|
},
|
|
413
|
+
{
|
|
414
|
+
type: "output",
|
|
415
|
+
label: "Output",
|
|
416
|
+
description: "Final output of the automation",
|
|
417
|
+
category: "Output",
|
|
418
|
+
nodeCategory: "terminal",
|
|
419
|
+
inputs: [
|
|
420
|
+
{
|
|
421
|
+
id: "result",
|
|
422
|
+
title: "Result",
|
|
423
|
+
type: ["image", "video", "audio", "text"],
|
|
424
|
+
required: true,
|
|
425
|
+
},
|
|
426
|
+
],
|
|
427
|
+
outputs: [],
|
|
428
|
+
},
|
|
417
429
|
];
|
|
418
430
|
}
|
|
419
431
|
/**
|
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, ExecutorNode, ExecutionEdge, OutputSchemaProperty, SelectionMode, ExhaustionBehavior, SelectionConfig, SelectionState, OutputMode, NodeOutputValues, OutputInput, OutputNodeConfig, ManualTriggerOutput, ManualTriggerNodeConfig, TriggerIterationMode, IterationExhaustionBehavior, TriggerCollectionConfig, DayOfWeek, RecurrenceNodeConfig, AccountNodeConfig, PostVideoNodeConfig, PostSlideshowInput, PostSlideshowNodeConfig, SaveToMediaInput, SaveToMediaNodeConfig, PortType, 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, ManualTriggerOutput, ManualTriggerNodeConfig, TriggerIterationMode, IterationExhaustionBehavior, TriggerCollectionConfig, DayOfWeek, RecurrenceNodeConfig, AccountNodeConfig, MediaNodeEnabledType, MediaNodeConfig, PostVideoNodeConfig, PostSlideshowInput, PostSlideshowNodeConfig, SaveToMediaInput, SaveToMediaNodeConfig, PortType, LLMOutputField, LLMNodeConfig, UserMedia, SocialAudio, Media, GetMediaParams, UploadMediaParams, UploadMediaResponse, UpdateMediaTagParams, DeleteMediaParams, DeleteMediaResponse, CreateSocialAudioParams, CreateMediaFromUrlParams, ImportTextParams, ImportTextResponse, Comment, CommentStatus, CreateCommentParams, CreateCommentResponse, GetCommentsParams, } from './types';
|
package/dist/types.d.ts
CHANGED
|
@@ -825,7 +825,7 @@ export interface NodeControlConfig {
|
|
|
825
825
|
*/
|
|
826
826
|
isInitializer?: boolean;
|
|
827
827
|
}
|
|
828
|
-
export type NodeTypeEnum = 'image' | 'video' | 'audio' | 'social-audio' | 'text' | 'image-editor' | 'video-editor' | 'image-generation' | 'llm' | 'output' | 'manual-trigger' | 'recurrence' | 'workflow' | 'account' | 'post-video' | 'post-slideshow' | 'save-to-media';
|
|
828
|
+
export type NodeTypeEnum = 'image' | 'video' | 'audio' | 'social-audio' | 'text' | 'media' | 'image-editor' | 'video-editor' | 'image-generation' | 'llm' | 'output' | 'manual-trigger' | 'recurrence' | 'workflow' | 'account' | 'post-video' | 'post-slideshow' | 'save-to-media';
|
|
829
829
|
export interface OutputSchemaProperty {
|
|
830
830
|
type: 'string' | 'number' | 'boolean' | 'array' | 'object';
|
|
831
831
|
items?: 'string' | 'number' | 'boolean';
|
|
@@ -922,6 +922,7 @@ export interface WorkflowNodeDefinition {
|
|
|
922
922
|
workflowPassThrough?: Record<string, boolean>;
|
|
923
923
|
outputConfig?: OutputNodeConfig;
|
|
924
924
|
accountConfig?: AccountNodeConfig;
|
|
925
|
+
mediaConfig?: MediaNodeConfig;
|
|
925
926
|
postVideoConfig?: PostVideoNodeConfig;
|
|
926
927
|
postSlideshowConfig?: PostSlideshowNodeConfig;
|
|
927
928
|
saveToMediaConfig?: SaveToMediaNodeConfig;
|
|
@@ -1016,6 +1017,31 @@ export interface AccountNodeConfig {
|
|
|
1016
1017
|
mode?: 'random' | 'sequential';
|
|
1017
1018
|
};
|
|
1018
1019
|
}
|
|
1020
|
+
/**
|
|
1021
|
+
* Media node enabled type (image, video, or audio)
|
|
1022
|
+
*/
|
|
1023
|
+
export type MediaNodeEnabledType = 'image' | 'video' | 'audio';
|
|
1024
|
+
/**
|
|
1025
|
+
* Media node configuration - consolidated source node for image, video, and audio
|
|
1026
|
+
*/
|
|
1027
|
+
export interface MediaNodeConfig {
|
|
1028
|
+
/** Which media types are enabled for this node */
|
|
1029
|
+
enabledTypes: MediaNodeEnabledType[];
|
|
1030
|
+
/** Selected media IDs per type */
|
|
1031
|
+
selectedMediaIds?: {
|
|
1032
|
+
image?: string[];
|
|
1033
|
+
video?: string[];
|
|
1034
|
+
audio?: string[];
|
|
1035
|
+
};
|
|
1036
|
+
/** Selection configuration per type */
|
|
1037
|
+
selectionConfig?: {
|
|
1038
|
+
image?: SelectionConfig;
|
|
1039
|
+
video?: SelectionConfig;
|
|
1040
|
+
audio?: SelectionConfig;
|
|
1041
|
+
};
|
|
1042
|
+
/** Output mode */
|
|
1043
|
+
outputMode?: OutputMode;
|
|
1044
|
+
}
|
|
1019
1045
|
/**
|
|
1020
1046
|
* Post Video node configuration - posts a video to social media
|
|
1021
1047
|
*/
|