ugcinc 2.73.0 → 2.73.2
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/comments.d.ts +12 -23
- package/dist/comments.js +11 -24
- package/dist/index.d.ts +1 -1
- package/dist/types.d.ts +28 -16
- package/package.json +1 -1
package/dist/comments.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseClient } from './base';
|
|
2
|
-
import type { CreateCommentParams, CreateCommentResponse,
|
|
2
|
+
import type { CreateCommentParams, CreateCommentResponse, GetCommentsParams, Comment, ApiResponse } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* Client for managing comments
|
|
5
5
|
*/
|
|
@@ -24,32 +24,11 @@ export declare class CommentsClient extends BaseClient {
|
|
|
24
24
|
* ```
|
|
25
25
|
*/
|
|
26
26
|
createComment(params: CreateCommentParams): Promise<ApiResponse<CreateCommentResponse>>;
|
|
27
|
-
/**
|
|
28
|
-
* Get comment status (live check)
|
|
29
|
-
*
|
|
30
|
-
* Check the current status of a comment by querying the automation API.
|
|
31
|
-
* Returns the current status and comment URL if completed.
|
|
32
|
-
*
|
|
33
|
-
* @example
|
|
34
|
-
* ```typescript
|
|
35
|
-
* const response = await client.comments.getStatus({
|
|
36
|
-
* commentId: 'comment-123'
|
|
37
|
-
* });
|
|
38
|
-
*
|
|
39
|
-
* if (response.ok) {
|
|
40
|
-
* if (response.data.status === 'completed') {
|
|
41
|
-
* console.log('Comment URL:', response.data.commentUrl);
|
|
42
|
-
* } else if (response.data.status === 'failed') {
|
|
43
|
-
* console.log('Error:', response.data.error);
|
|
44
|
-
* }
|
|
45
|
-
* }
|
|
46
|
-
* ```
|
|
47
|
-
*/
|
|
48
|
-
getStatus(params: GetCommentStatusParams): Promise<ApiResponse<CommentStatusResponse>>;
|
|
49
27
|
/**
|
|
50
28
|
* Get comments
|
|
51
29
|
*
|
|
52
30
|
* Get comments for the organization, optionally filtered by commentIds, accountIds, or tag.
|
|
31
|
+
* The returned comments include their current status.
|
|
53
32
|
*
|
|
54
33
|
* @example
|
|
55
34
|
* ```typescript
|
|
@@ -64,6 +43,16 @@ export declare class CommentsClient extends BaseClient {
|
|
|
64
43
|
*
|
|
65
44
|
* // Get comments for accounts with a specific tag
|
|
66
45
|
* const response = await client.comments.getComments({ tag: 'campaign-1' });
|
|
46
|
+
*
|
|
47
|
+
* // Check status of a specific comment
|
|
48
|
+
* const response = await client.comments.getComments({ commentIds: ['comment-123'] });
|
|
49
|
+
* if (response.ok && response.data.length > 0) {
|
|
50
|
+
* const comment = response.data[0];
|
|
51
|
+
* console.log('Status:', comment.status);
|
|
52
|
+
* if (comment.status === 'completed') {
|
|
53
|
+
* console.log('Comment URL:', comment.commentUrl);
|
|
54
|
+
* }
|
|
55
|
+
* }
|
|
67
56
|
* ```
|
|
68
57
|
*/
|
|
69
58
|
getComments(params?: GetCommentsParams): Promise<ApiResponse<Comment[]>>;
|
package/dist/comments.js
CHANGED
|
@@ -28,34 +28,11 @@ class CommentsClient extends base_1.BaseClient {
|
|
|
28
28
|
async createComment(params) {
|
|
29
29
|
return this.post('/comment/create', params);
|
|
30
30
|
}
|
|
31
|
-
/**
|
|
32
|
-
* Get comment status (live check)
|
|
33
|
-
*
|
|
34
|
-
* Check the current status of a comment by querying the automation API.
|
|
35
|
-
* Returns the current status and comment URL if completed.
|
|
36
|
-
*
|
|
37
|
-
* @example
|
|
38
|
-
* ```typescript
|
|
39
|
-
* const response = await client.comments.getStatus({
|
|
40
|
-
* commentId: 'comment-123'
|
|
41
|
-
* });
|
|
42
|
-
*
|
|
43
|
-
* if (response.ok) {
|
|
44
|
-
* if (response.data.status === 'completed') {
|
|
45
|
-
* console.log('Comment URL:', response.data.commentUrl);
|
|
46
|
-
* } else if (response.data.status === 'failed') {
|
|
47
|
-
* console.log('Error:', response.data.error);
|
|
48
|
-
* }
|
|
49
|
-
* }
|
|
50
|
-
* ```
|
|
51
|
-
*/
|
|
52
|
-
async getStatus(params) {
|
|
53
|
-
return this.post('/comment/status', params);
|
|
54
|
-
}
|
|
55
31
|
/**
|
|
56
32
|
* Get comments
|
|
57
33
|
*
|
|
58
34
|
* Get comments for the organization, optionally filtered by commentIds, accountIds, or tag.
|
|
35
|
+
* The returned comments include their current status.
|
|
59
36
|
*
|
|
60
37
|
* @example
|
|
61
38
|
* ```typescript
|
|
@@ -70,6 +47,16 @@ class CommentsClient extends base_1.BaseClient {
|
|
|
70
47
|
*
|
|
71
48
|
* // Get comments for accounts with a specific tag
|
|
72
49
|
* const response = await client.comments.getComments({ tag: 'campaign-1' });
|
|
50
|
+
*
|
|
51
|
+
* // Check status of a specific comment
|
|
52
|
+
* const response = await client.comments.getComments({ commentIds: ['comment-123'] });
|
|
53
|
+
* if (response.ok && response.data.length > 0) {
|
|
54
|
+
* const comment = response.data[0];
|
|
55
|
+
* console.log('Status:', comment.status);
|
|
56
|
+
* if (comment.status === 'completed') {
|
|
57
|
+
* console.log('Comment URL:', comment.commentUrl);
|
|
58
|
+
* }
|
|
59
|
+
* }
|
|
73
60
|
* ```
|
|
74
61
|
*/
|
|
75
62
|
async getComments(params) {
|
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, 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, AutomationTemplate, AutomationRun, NodeRun, OutputSchemaProperty, SelectionMode, ExhaustionBehavior, SelectionConfig, SelectionState, OutputMode, OutputInput, OutputNodeConfig, LLMOutputField, LLMNodeConfig, UserMedia, SocialAudio, Media, GetMediaParams, UploadMediaParams, UploadMediaResponse, UpdateMediaTagParams, DeleteMediaParams, DeleteMediaResponse, CreateSocialAudioParams, CreateMediaFromUrlParams, ImportTextParams, ImportTextResponse, Comment, CreateCommentParams, CreateCommentResponse,
|
|
18
|
+
export type { SuccessResponse, ErrorResponse, ApiResponse, Account, AccountStat, AccountTask, EditProfileInfo, Task, TaskType, Post, PostType, 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, 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/types.d.ts
CHANGED
|
@@ -836,17 +836,42 @@ export interface WorkflowDefinition {
|
|
|
836
836
|
nodes: WorkflowNodeDefinition[];
|
|
837
837
|
canvasState?: CanvasState;
|
|
838
838
|
}
|
|
839
|
+
/**
|
|
840
|
+
* Template node as stored in the database
|
|
841
|
+
*/
|
|
842
|
+
export interface TemplateNode {
|
|
843
|
+
id: string;
|
|
844
|
+
template_id: string;
|
|
845
|
+
node_id: string;
|
|
846
|
+
type: NodeTypeEnum;
|
|
847
|
+
name: string | null;
|
|
848
|
+
x: number;
|
|
849
|
+
y: number;
|
|
850
|
+
inputs: Record<string, {
|
|
851
|
+
sourceNodeId: string;
|
|
852
|
+
sourceOutputId: string;
|
|
853
|
+
}>;
|
|
854
|
+
config: WorkflowNodeDefinition['config'] | null;
|
|
855
|
+
cached_output: Record<string, unknown> | null;
|
|
856
|
+
cached_at: string | null;
|
|
857
|
+
cached_run_id: string | null;
|
|
858
|
+
cached_variable_inputs: Record<string, string> | null;
|
|
859
|
+
created_at: string;
|
|
860
|
+
updated_at: string;
|
|
861
|
+
}
|
|
839
862
|
export interface AutomationTemplate {
|
|
840
863
|
id: string;
|
|
841
864
|
org_id: string;
|
|
842
865
|
name: string;
|
|
843
866
|
description: string | null;
|
|
844
|
-
|
|
867
|
+
canvas_state: CanvasState | null;
|
|
868
|
+
nodes: TemplateNode[];
|
|
845
869
|
preview_output: string | null;
|
|
846
870
|
output_schema: Record<string, {
|
|
847
871
|
type: string;
|
|
848
872
|
}> | null;
|
|
849
873
|
created_at: string;
|
|
874
|
+
updated_at: string;
|
|
850
875
|
}
|
|
851
876
|
export interface AutomationRun {
|
|
852
877
|
id: string;
|
|
@@ -969,12 +994,13 @@ export interface UploadTokenResponse {
|
|
|
969
994
|
/**
|
|
970
995
|
* Comment types
|
|
971
996
|
*/
|
|
997
|
+
export type CommentStatus = 'scheduled' | 'pending' | 'verifying' | 'completed' | 'failed';
|
|
972
998
|
export interface Comment {
|
|
973
999
|
id: string;
|
|
974
1000
|
accountId: string;
|
|
975
1001
|
postUrl: string;
|
|
976
1002
|
commentText: string;
|
|
977
|
-
status:
|
|
1003
|
+
status: CommentStatus;
|
|
978
1004
|
commentUrl?: string | null;
|
|
979
1005
|
error?: string | null;
|
|
980
1006
|
createdAt?: string;
|
|
@@ -988,20 +1014,6 @@ export interface CreateCommentParams {
|
|
|
988
1014
|
export interface CreateCommentResponse {
|
|
989
1015
|
commentId: string;
|
|
990
1016
|
}
|
|
991
|
-
export interface GetCommentStatusParams {
|
|
992
|
-
commentId: string;
|
|
993
|
-
}
|
|
994
|
-
export type CommentStatusResponse = {
|
|
995
|
-
status: "pending";
|
|
996
|
-
} | {
|
|
997
|
-
status: "running";
|
|
998
|
-
} | {
|
|
999
|
-
status: "failed";
|
|
1000
|
-
error: string;
|
|
1001
|
-
} | {
|
|
1002
|
-
status: "completed";
|
|
1003
|
-
commentUrl: string;
|
|
1004
|
-
};
|
|
1005
1017
|
export interface GetCommentsParams {
|
|
1006
1018
|
commentIds?: string[];
|
|
1007
1019
|
accountIds?: string[];
|