ugcinc 2.50.1 → 2.52.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 +0 -8
- package/dist/automations.js +0 -10
- package/dist/index.d.ts +1 -1
- package/dist/types.d.ts +72 -52
- package/package.json +1 -1
package/dist/automations.d.ts
CHANGED
|
@@ -75,14 +75,6 @@ export declare class AutomationsClient extends BaseClient {
|
|
|
75
75
|
valid: boolean;
|
|
76
76
|
errors: string[];
|
|
77
77
|
}>>;
|
|
78
|
-
/**
|
|
79
|
-
* Submit a client-rendered image for a node awaiting client render
|
|
80
|
-
* This is called by the webapp when the browser finishes rendering an image editor node
|
|
81
|
-
*/
|
|
82
|
-
submitClientRender(params: {
|
|
83
|
-
nodeRunId: string;
|
|
84
|
-
imageUrl: string;
|
|
85
|
-
}): Promise<ApiResponse<null>>;
|
|
86
78
|
}
|
|
87
79
|
/**
|
|
88
80
|
* Get all available automation nodes
|
package/dist/automations.js
CHANGED
|
@@ -82,16 +82,6 @@ class AutomationsClient extends base_1.BaseClient {
|
|
|
82
82
|
body: JSON.stringify(params),
|
|
83
83
|
});
|
|
84
84
|
}
|
|
85
|
-
/**
|
|
86
|
-
* Submit a client-rendered image for a node awaiting client render
|
|
87
|
-
* This is called by the webapp when the browser finishes rendering an image editor node
|
|
88
|
-
*/
|
|
89
|
-
async submitClientRender(params) {
|
|
90
|
-
return this.request('/automations/submit-client-render', {
|
|
91
|
-
method: 'POST',
|
|
92
|
-
body: JSON.stringify(params),
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
85
|
}
|
|
96
86
|
exports.AutomationsClient = AutomationsClient;
|
|
97
87
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -13,4 +13,4 @@ export { RenderClient } from './render';
|
|
|
13
13
|
export { AutomationsClient, getAllNodes, getNodeByType } from './automations';
|
|
14
14
|
export { MediaClient } from './media';
|
|
15
15
|
export type { ClientConfig, } from './base';
|
|
16
|
-
export type { SuccessResponse, ErrorResponse, ApiResponse, Account, AccountStat, AccountTask, EditProfileInfo, Task, TaskType, Post, PostType, PostStat, ApiKey, EditorConfig, VideoEditorConfig, ImageEditorConfig, EditorChannel, TimeValue, BaseSegmentProps, VisualSegmentProps, EditorSegment, VideoSegment, AudioSegment, ImageSegment, TextSegment, StaticSegment, PositionAnchor, RelativePositionConfig, RenderJobSubmit, RenderVideoRequest, RenderImageRequest, RenderJobResponse, RenderJobStatus, 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, AutomationTemplate, AutomationRun, NodeRun, OutputSchemaProperty, SelectionMode, ExhaustionBehavior, SelectionConfig, SelectionState, OutputMode, OutputInput, OutputNodeConfig,
|
|
16
|
+
export type { SuccessResponse, ErrorResponse, ApiResponse, Account, AccountStat, AccountTask, EditProfileInfo, Task, TaskType, Post, PostType, PostStat, ApiKey, EditorConfig, VideoEditorConfig, ImageEditorConfig, ImageEditorNodeConfig, ImageEditorElement, EditorChannel, TimeValue, BaseSegmentProps, VisualSegmentProps, EditorSegment, VideoSegment, AudioSegment, ImageSegment, TextSegment, StaticSegment, PositionAnchor, RelativePositionConfig, RenderJobSubmit, RenderVideoRequest, RenderImageRequest, RenderJobResponse, RenderJobStatus, 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, AutomationTemplate, AutomationRun, NodeRun, OutputSchemaProperty, SelectionMode, ExhaustionBehavior, SelectionConfig, SelectionState, OutputMode, OutputInput, OutputNodeConfig, UserMedia, SocialAudio, Media, GetMediaParams, UploadMediaParams, UploadMediaResponse, UpdateMediaTagParams, DeleteMediaParams, DeleteMediaResponse, CreateSocialAudioParams, CreateMediaFromUrlParams, } from './types';
|
package/dist/types.d.ts
CHANGED
|
@@ -373,8 +373,76 @@ export interface ImageEditorConfig extends BaseEditorConfig {
|
|
|
373
373
|
segments: StaticSegment[];
|
|
374
374
|
}>;
|
|
375
375
|
dynamicCrop?: DynamicCropConfig;
|
|
376
|
-
|
|
377
|
-
|
|
376
|
+
}
|
|
377
|
+
export interface ImageEditorElement {
|
|
378
|
+
id: string;
|
|
379
|
+
type: 'image' | 'text';
|
|
380
|
+
x: number;
|
|
381
|
+
y: number;
|
|
382
|
+
width: number;
|
|
383
|
+
height: number;
|
|
384
|
+
zIndex: number;
|
|
385
|
+
rotation?: number;
|
|
386
|
+
locked?: boolean;
|
|
387
|
+
relativePositionX?: {
|
|
388
|
+
elementId: string;
|
|
389
|
+
anchor: 'left' | 'right';
|
|
390
|
+
selfAnchor?: 'left' | 'center' | 'right';
|
|
391
|
+
offset: number;
|
|
392
|
+
};
|
|
393
|
+
relativePositionY?: {
|
|
394
|
+
elementId: string;
|
|
395
|
+
anchor: 'top' | 'bottom';
|
|
396
|
+
selfAnchor?: 'top' | 'middle' | 'bottom';
|
|
397
|
+
offset: number;
|
|
398
|
+
};
|
|
399
|
+
text?: string;
|
|
400
|
+
textInputId?: string;
|
|
401
|
+
color?: string;
|
|
402
|
+
outlineWidth?: number;
|
|
403
|
+
strokeColor?: string;
|
|
404
|
+
font?: 'arial' | 'tiktok' | 'apple';
|
|
405
|
+
fontSize?: number;
|
|
406
|
+
fontWeight?: 'normal' | 'bold';
|
|
407
|
+
lineHeight?: number;
|
|
408
|
+
letterSpacing?: number;
|
|
409
|
+
textAlign?: 'left' | 'center' | 'right' | 'justify';
|
|
410
|
+
verticalAlign?: 'top' | 'middle' | 'bottom';
|
|
411
|
+
backgroundColor?: string;
|
|
412
|
+
backgroundOpacity?: number;
|
|
413
|
+
backgroundBorderRadius?: {
|
|
414
|
+
topLeft?: number;
|
|
415
|
+
topRight?: number;
|
|
416
|
+
bottomRight?: number;
|
|
417
|
+
bottomLeft?: number;
|
|
418
|
+
};
|
|
419
|
+
paddingTop?: number;
|
|
420
|
+
paddingRight?: number;
|
|
421
|
+
paddingBottom?: number;
|
|
422
|
+
paddingLeft?: number;
|
|
423
|
+
autoWidth?: boolean;
|
|
424
|
+
boxAlign?: 'left' | 'center' | 'right';
|
|
425
|
+
inputId?: string;
|
|
426
|
+
fit?: 'cover' | 'contain' | 'fill';
|
|
427
|
+
opacity?: number;
|
|
428
|
+
borderRadius?: number | {
|
|
429
|
+
topLeft?: number;
|
|
430
|
+
topRight?: number;
|
|
431
|
+
bottomRight?: number;
|
|
432
|
+
bottomLeft?: number;
|
|
433
|
+
};
|
|
434
|
+
}
|
|
435
|
+
export interface ImageEditorNodeConfig {
|
|
436
|
+
width: number;
|
|
437
|
+
height: number;
|
|
438
|
+
aspectRatio: string;
|
|
439
|
+
dimensionPreset: string;
|
|
440
|
+
elements: ImageEditorElement[];
|
|
441
|
+
backgroundFit?: 'cover' | 'contain' | 'fill';
|
|
442
|
+
previewBackgroundUrl?: string;
|
|
443
|
+
previewImageUrls?: Record<string, string>;
|
|
444
|
+
previewTextValues?: Record<string, string>;
|
|
445
|
+
dynamicCrop?: DynamicCropConfig;
|
|
378
446
|
}
|
|
379
447
|
export interface EditorConfig extends BaseEditorConfig {
|
|
380
448
|
channels: Array<{
|
|
@@ -776,7 +844,7 @@ export interface WorkflowNodeDefinition {
|
|
|
776
844
|
urls?: string[];
|
|
777
845
|
textOptions?: string[];
|
|
778
846
|
videoEditor?: VideoEditorConfig;
|
|
779
|
-
imageEditor?: ImageEditorConfig;
|
|
847
|
+
imageEditor?: ImageEditorConfig | ImageEditorNodeConfig;
|
|
780
848
|
outputSchema?: Record<string, OutputSchemaProperty>;
|
|
781
849
|
selectionConfig?: SelectionConfig;
|
|
782
850
|
selectionState?: SelectionState;
|
|
@@ -839,60 +907,12 @@ export interface NodeRun {
|
|
|
839
907
|
automation_run_id: string;
|
|
840
908
|
template_node_id: string;
|
|
841
909
|
type: NodeTypeEnum;
|
|
842
|
-
|
|
910
|
+
node_state: 'pending' | 'running' | 'completed' | 'failed';
|
|
843
911
|
input_data: Record<string, unknown> | null;
|
|
844
912
|
output_data: Record<string, unknown> | null;
|
|
845
913
|
created_at: string;
|
|
846
914
|
completed_at: string | null;
|
|
847
915
|
}
|
|
848
|
-
/**
|
|
849
|
-
* Client-side render element for image editor
|
|
850
|
-
* Contains all resolved properties needed for browser-based rendering
|
|
851
|
-
*/
|
|
852
|
-
export interface ClientRenderElement {
|
|
853
|
-
id: string;
|
|
854
|
-
type: 'text' | 'image';
|
|
855
|
-
x: number;
|
|
856
|
-
y: number;
|
|
857
|
-
width: number;
|
|
858
|
-
height: number;
|
|
859
|
-
zIndex: number;
|
|
860
|
-
rotation?: number;
|
|
861
|
-
text?: string;
|
|
862
|
-
color?: string;
|
|
863
|
-
font?: 'tiktok' | 'apple' | 'arial';
|
|
864
|
-
fontSize?: number;
|
|
865
|
-
fontWeight?: 'normal' | 'bold';
|
|
866
|
-
lineHeight?: number;
|
|
867
|
-
letterSpacing?: number;
|
|
868
|
-
textAlign?: 'left' | 'center' | 'right';
|
|
869
|
-
verticalAlign?: 'top' | 'middle' | 'bottom';
|
|
870
|
-
outlineWidth?: number;
|
|
871
|
-
strokeColor?: string;
|
|
872
|
-
backgroundColor?: string;
|
|
873
|
-
backgroundOpacity?: number;
|
|
874
|
-
backgroundBorderRadius?: BorderRadiusConfig;
|
|
875
|
-
paddingTop?: number;
|
|
876
|
-
paddingRight?: number;
|
|
877
|
-
paddingBottom?: number;
|
|
878
|
-
paddingLeft?: number;
|
|
879
|
-
autoWidth?: boolean;
|
|
880
|
-
boxAlign?: 'left' | 'center' | 'right';
|
|
881
|
-
imageUrl?: string;
|
|
882
|
-
fit?: 'cover' | 'contain' | 'fill';
|
|
883
|
-
opacity?: number;
|
|
884
|
-
borderRadius?: number | BorderRadiusConfig;
|
|
885
|
-
}
|
|
886
|
-
/**
|
|
887
|
-
* Client-side render inputs - stored in node_run.output_data when awaiting_client_render
|
|
888
|
-
*/
|
|
889
|
-
export interface ClientRenderInputs {
|
|
890
|
-
width: number;
|
|
891
|
-
height: number;
|
|
892
|
-
backgroundUrl?: string;
|
|
893
|
-
backgroundFit?: 'cover' | 'contain' | 'fill';
|
|
894
|
-
elements: ClientRenderElement[];
|
|
895
|
-
}
|
|
896
916
|
/**
|
|
897
917
|
* Media types
|
|
898
918
|
*/
|