ugcinc 3.28.0 → 3.29.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 +2 -22
- package/dist/index.d.ts +1 -1
- package/dist/media.d.ts +1 -14
- package/dist/media.js +0 -17
- package/dist/types.d.ts +8 -39
- package/package.json +1 -1
package/dist/automations.js
CHANGED
|
@@ -175,21 +175,6 @@ function getAllNodes() {
|
|
|
175
175
|
},
|
|
176
176
|
],
|
|
177
177
|
},
|
|
178
|
-
{
|
|
179
|
-
type: "social-audio",
|
|
180
|
-
label: "Social Media Audio",
|
|
181
|
-
description: "Link audios from social media",
|
|
182
|
-
category: "Sources",
|
|
183
|
-
nodeCategory: "source",
|
|
184
|
-
inputs: [],
|
|
185
|
-
outputs: [
|
|
186
|
-
{
|
|
187
|
-
id: "social-audio",
|
|
188
|
-
type: "social_audio",
|
|
189
|
-
required: true,
|
|
190
|
-
},
|
|
191
|
-
],
|
|
192
|
-
},
|
|
193
178
|
{
|
|
194
179
|
type: "account",
|
|
195
180
|
label: "Account",
|
|
@@ -391,8 +376,8 @@ function getAllNodes() {
|
|
|
391
376
|
category: "Output",
|
|
392
377
|
nodeCategory: "terminal",
|
|
393
378
|
// Dynamic inputs based on autoPostConfig.mode:
|
|
394
|
-
// - video mode: video (required), account, caption
|
|
395
|
-
// - slideshow mode: dynamic image inputs from config, account, caption
|
|
379
|
+
// - video mode: video (required), account, caption
|
|
380
|
+
// - slideshow mode: dynamic image inputs from config, account, caption
|
|
396
381
|
inputs: [
|
|
397
382
|
{
|
|
398
383
|
id: "account",
|
|
@@ -404,11 +389,6 @@ function getAllNodes() {
|
|
|
404
389
|
type: "text",
|
|
405
390
|
required: false,
|
|
406
391
|
},
|
|
407
|
-
{
|
|
408
|
-
id: "social-audio",
|
|
409
|
-
type: "social_audio",
|
|
410
|
-
required: false,
|
|
411
|
-
},
|
|
412
392
|
],
|
|
413
393
|
outputs: [],
|
|
414
394
|
},
|
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, 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, VideoGenerationNodeConfig, PortType, LLMOutputField, LLMNodeConfig, UserMedia,
|
|
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, VideoGenerationNodeConfig, PortType, LLMOutputField, LLMNodeConfig, UserMedia, Media, GetMediaParams, 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/media.d.ts
CHANGED
|
@@ -1,20 +1,14 @@
|
|
|
1
1
|
import { BaseClient } from './base';
|
|
2
|
-
import type { Media,
|
|
2
|
+
import type { Media, GetMediaParams, UploadMediaResponse, UpdateMediaTagParams, UpdateMediaTagsParams, UpdateMediaTagsResponse, DeleteMediaParams, DeleteMediaResponse, CreateMediaFromUrlParams, GetUploadTokenParams, UploadTokenResponse, ImportTextParams, ImportTextResponse, ApiResponse } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* Client for managing media files
|
|
5
5
|
*/
|
|
6
6
|
export declare class MediaClient extends BaseClient {
|
|
7
7
|
/**
|
|
8
8
|
* Get media for the organization
|
|
9
|
-
* Returns both user_media and social_audio combined
|
|
10
9
|
* Can filter by ids or tag
|
|
11
10
|
*/
|
|
12
11
|
getMedia(params?: GetMediaParams): Promise<ApiResponse<Media[]>>;
|
|
13
|
-
/**
|
|
14
|
-
* Get social audio for the organization
|
|
15
|
-
* Can filter by ids or tag
|
|
16
|
-
*/
|
|
17
|
-
getSocialAudio(params?: GetSocialAudioParams): Promise<ApiResponse<SocialAudio[]>>;
|
|
18
12
|
/**
|
|
19
13
|
* Create media from URL(s)
|
|
20
14
|
* Creates media records from files already uploaded to blob storage
|
|
@@ -28,14 +22,12 @@ export declare class MediaClient extends BaseClient {
|
|
|
28
22
|
getUploadToken(params: GetUploadTokenParams): Promise<ApiResponse<UploadTokenResponse>>;
|
|
29
23
|
/**
|
|
30
24
|
* Update tags on multiple media items in a single request
|
|
31
|
-
* Works for both user_media and social_audio
|
|
32
25
|
* @param params.updates - Array of {id, tag} pairs to update
|
|
33
26
|
*/
|
|
34
27
|
updateTags(params: UpdateMediaTagsParams): Promise<ApiResponse<UpdateMediaTagsResponse>>;
|
|
35
28
|
/**
|
|
36
29
|
* @deprecated Use updateTags() instead for bulk operations
|
|
37
30
|
* Update the tag on a single media item
|
|
38
|
-
* Works for both user_media and social_audio
|
|
39
31
|
*/
|
|
40
32
|
updateTag(params: UpdateMediaTagParams): Promise<ApiResponse<UpdateMediaTagsResponse>>;
|
|
41
33
|
/**
|
|
@@ -43,11 +35,6 @@ export declare class MediaClient extends BaseClient {
|
|
|
43
35
|
* Also deletes the files from blob storage
|
|
44
36
|
*/
|
|
45
37
|
delete(params: DeleteMediaParams): Promise<ApiResponse<DeleteMediaResponse>>;
|
|
46
|
-
/**
|
|
47
|
-
* Create a social audio from a TikTok URL
|
|
48
|
-
* Extracts audio and cover image from TikTok video or music URL
|
|
49
|
-
*/
|
|
50
|
-
createSocialAudio(params: CreateSocialAudioParams): Promise<ApiResponse<SocialAudio>>;
|
|
51
38
|
/**
|
|
52
39
|
* Import text content as media
|
|
53
40
|
* Creates text media entries from raw text content
|
package/dist/media.js
CHANGED
|
@@ -8,19 +8,11 @@ const base_1 = require("./base");
|
|
|
8
8
|
class MediaClient extends base_1.BaseClient {
|
|
9
9
|
/**
|
|
10
10
|
* Get media for the organization
|
|
11
|
-
* Returns both user_media and social_audio combined
|
|
12
11
|
* Can filter by ids or tag
|
|
13
12
|
*/
|
|
14
13
|
async getMedia(params) {
|
|
15
14
|
return this.post('/media', params ?? {});
|
|
16
15
|
}
|
|
17
|
-
/**
|
|
18
|
-
* Get social audio for the organization
|
|
19
|
-
* Can filter by ids or tag
|
|
20
|
-
*/
|
|
21
|
-
async getSocialAudio(params) {
|
|
22
|
-
return this.post('/media/social-audio', params ?? {});
|
|
23
|
-
}
|
|
24
16
|
/**
|
|
25
17
|
* Create media from URL(s)
|
|
26
18
|
* Creates media records from files already uploaded to blob storage
|
|
@@ -38,7 +30,6 @@ class MediaClient extends base_1.BaseClient {
|
|
|
38
30
|
}
|
|
39
31
|
/**
|
|
40
32
|
* Update tags on multiple media items in a single request
|
|
41
|
-
* Works for both user_media and social_audio
|
|
42
33
|
* @param params.updates - Array of {id, tag} pairs to update
|
|
43
34
|
*/
|
|
44
35
|
async updateTags(params) {
|
|
@@ -47,7 +38,6 @@ class MediaClient extends base_1.BaseClient {
|
|
|
47
38
|
/**
|
|
48
39
|
* @deprecated Use updateTags() instead for bulk operations
|
|
49
40
|
* Update the tag on a single media item
|
|
50
|
-
* Works for both user_media and social_audio
|
|
51
41
|
*/
|
|
52
42
|
async updateTag(params) {
|
|
53
43
|
return this.post('/media/update-tag', { updates: [params] });
|
|
@@ -59,13 +49,6 @@ class MediaClient extends base_1.BaseClient {
|
|
|
59
49
|
async delete(params) {
|
|
60
50
|
return this.post('/media/delete', params);
|
|
61
51
|
}
|
|
62
|
-
/**
|
|
63
|
-
* Create a social audio from a TikTok URL
|
|
64
|
-
* Extracts audio and cover image from TikTok video or music URL
|
|
65
|
-
*/
|
|
66
|
-
async createSocialAudio(params) {
|
|
67
|
-
return this.post('/media/social-audio/upload', params);
|
|
68
|
-
}
|
|
69
52
|
/**
|
|
70
53
|
* Import text content as media
|
|
71
54
|
* Creates text media entries from raw text content
|
package/dist/types.d.ts
CHANGED
|
@@ -249,7 +249,6 @@ export interface CreateSlideshowParams {
|
|
|
249
249
|
accountId: string | null;
|
|
250
250
|
caption?: string;
|
|
251
251
|
title?: string;
|
|
252
|
-
socialAudioId?: string;
|
|
253
252
|
postTime?: string;
|
|
254
253
|
imageUrls: string[];
|
|
255
254
|
strict?: boolean;
|
|
@@ -268,7 +267,6 @@ export interface GetPostStatusParams {
|
|
|
268
267
|
export interface CreateVideoParams {
|
|
269
268
|
accountId: string | null;
|
|
270
269
|
caption?: string;
|
|
271
|
-
socialAudioId?: string;
|
|
272
270
|
postTime?: string;
|
|
273
271
|
videoUrl: string;
|
|
274
272
|
strict?: boolean;
|
|
@@ -751,7 +749,7 @@ export type StaticSegment = ImageSegment | TextSegment;
|
|
|
751
749
|
/**
|
|
752
750
|
* Automation types
|
|
753
751
|
*/
|
|
754
|
-
export type MediaType = 'video' | 'image' | 'audio' | '
|
|
752
|
+
export type MediaType = 'video' | 'image' | 'audio' | 'text' | 'account' | 'date';
|
|
755
753
|
/**
|
|
756
754
|
* Extended port types (includes non-media types for special nodes)
|
|
757
755
|
*/
|
|
@@ -805,7 +803,7 @@ export interface NodePort {
|
|
|
805
803
|
/**
|
|
806
804
|
* Functional category for automation nodes
|
|
807
805
|
* - trigger: Nodes that start an automation (manual-trigger, recurrence)
|
|
808
|
-
* - source: Nodes that provide input data (image, video, audio,
|
|
806
|
+
* - source: Nodes that provide input data (image, video, audio, text, account)
|
|
809
807
|
* - generator: Nodes that transform or generate content (image-template, video-template, image-generation, text-generation, sub-agent)
|
|
810
808
|
* - terminal: Nodes that end an automation (output, auto-post, save-to-media)
|
|
811
809
|
*/
|
|
@@ -833,7 +831,7 @@ export interface NodeControlConfig {
|
|
|
833
831
|
*/
|
|
834
832
|
isInitializer?: boolean;
|
|
835
833
|
}
|
|
836
|
-
export type NodeTypeEnum = '
|
|
834
|
+
export type NodeTypeEnum = 'text' | 'media' | 'video-import' | 'image-template' | 'video-template' | 'image-generation' | 'video-generation' | 'custom-model' | 'text-generation' | 'output' | 'manual-trigger' | 'recurrence' | 'sub-agent' | 'account' | 'auto-post' | 'save-to-media' | 'deduplicate' | 'for-each' | 'transcript' | 'auto-caption';
|
|
837
835
|
export interface OutputSchemaProperty {
|
|
838
836
|
type: 'string' | 'number' | 'boolean' | 'array' | 'object';
|
|
839
837
|
items?: 'string' | 'number' | 'boolean';
|
|
@@ -952,7 +950,7 @@ export interface WorkflowNodeDefinition {
|
|
|
952
950
|
export interface OutputInput {
|
|
953
951
|
id: string;
|
|
954
952
|
title: string;
|
|
955
|
-
type: 'image' | 'video' | 'audio' | '
|
|
953
|
+
type: 'image' | 'video' | 'audio' | 'text';
|
|
956
954
|
}
|
|
957
955
|
export interface OutputNodeConfig {
|
|
958
956
|
inputs: OutputInput[];
|
|
@@ -962,7 +960,7 @@ export interface OutputNodeConfig {
|
|
|
962
960
|
*/
|
|
963
961
|
export interface ManualTriggerOutput {
|
|
964
962
|
id: string;
|
|
965
|
-
type: 'image' | 'video' | 'audio' | 'text' | '
|
|
963
|
+
type: 'image' | 'video' | 'audio' | 'text' | 'account';
|
|
966
964
|
}
|
|
967
965
|
/**
|
|
968
966
|
* Iteration mode for trigger nodes with account iteration
|
|
@@ -1014,7 +1012,7 @@ export interface RecurrenceMediaOutput {
|
|
|
1014
1012
|
/** Unique ID for this output port (e.g., "background-image", "overlay") */
|
|
1015
1013
|
id: string;
|
|
1016
1014
|
/** Media type for this port */
|
|
1017
|
-
type: 'image' | 'video' | 'audio' | 'text'
|
|
1015
|
+
type: 'image' | 'video' | 'audio' | 'text';
|
|
1018
1016
|
/** Selection mode for this output's media source */
|
|
1019
1017
|
selectionMode: 'specific' | 'by-tag';
|
|
1020
1018
|
/** Media IDs for this output (used when selectionMode is 'specific') */
|
|
@@ -1070,7 +1068,7 @@ export type MediaNodeEnabledType = 'image' | 'video' | 'audio';
|
|
|
1070
1068
|
* Recurrence media enabled type
|
|
1071
1069
|
* Includes all media types that can be output from recurrence nodes
|
|
1072
1070
|
*/
|
|
1073
|
-
export type RecurrenceMediaEnabledType = 'image' | 'video' | 'audio' | 'text'
|
|
1071
|
+
export type RecurrenceMediaEnabledType = 'image' | 'video' | 'audio' | 'text';
|
|
1074
1072
|
/**
|
|
1075
1073
|
* Media node configuration - consolidated source node for image, video, and audio
|
|
1076
1074
|
*/
|
|
@@ -1145,13 +1143,6 @@ export interface AutoPostNodeConfig {
|
|
|
1145
1143
|
inputs?: AutoPostInput[];
|
|
1146
1144
|
/** Scheduling configuration */
|
|
1147
1145
|
scheduling?: PostSchedulingConfig;
|
|
1148
|
-
/** Social audio configuration */
|
|
1149
|
-
socialAudio?: {
|
|
1150
|
-
/** If true, read from input port; if false, use selectedIds */
|
|
1151
|
-
isVariable: boolean;
|
|
1152
|
-
/** Selected social audio IDs (when isVariable is false) - one is randomly chosen when posting */
|
|
1153
|
-
selectedIds?: string[];
|
|
1154
|
-
};
|
|
1155
1146
|
}
|
|
1156
1147
|
/**
|
|
1157
1148
|
* Save To Media node input definition
|
|
@@ -1461,29 +1452,11 @@ export interface UserMedia {
|
|
|
1461
1452
|
created_at: string;
|
|
1462
1453
|
media_type: 'user_media';
|
|
1463
1454
|
}
|
|
1464
|
-
export
|
|
1465
|
-
id: string;
|
|
1466
|
-
org_id: string;
|
|
1467
|
-
name: string | null;
|
|
1468
|
-
tag: string | null;
|
|
1469
|
-
social_post_link: string | null;
|
|
1470
|
-
social_audio_link: string | null;
|
|
1471
|
-
platform_type: 'tiktok' | null;
|
|
1472
|
-
preview_url: string | null;
|
|
1473
|
-
audio_url: string | null;
|
|
1474
|
-
created_at: string;
|
|
1475
|
-
media_type: 'social_audio';
|
|
1476
|
-
type: 'social_audio';
|
|
1477
|
-
}
|
|
1478
|
-
export type Media = UserMedia | SocialAudio;
|
|
1455
|
+
export type Media = UserMedia;
|
|
1479
1456
|
export interface GetMediaParams {
|
|
1480
1457
|
ids?: string[];
|
|
1481
1458
|
tag?: string;
|
|
1482
1459
|
}
|
|
1483
|
-
export interface GetSocialAudioParams {
|
|
1484
|
-
ids?: string[];
|
|
1485
|
-
tag?: string;
|
|
1486
|
-
}
|
|
1487
1460
|
export interface UploadMediaParams {
|
|
1488
1461
|
files: File[];
|
|
1489
1462
|
tag?: string;
|
|
@@ -1530,10 +1503,6 @@ export interface DeleteMediaResponse {
|
|
|
1530
1503
|
}>;
|
|
1531
1504
|
message: string;
|
|
1532
1505
|
}
|
|
1533
|
-
export interface CreateSocialAudioParams {
|
|
1534
|
-
url: string;
|
|
1535
|
-
tag?: string;
|
|
1536
|
-
}
|
|
1537
1506
|
export interface ImportTextParams {
|
|
1538
1507
|
texts: Array<{
|
|
1539
1508
|
content: string;
|