ugcinc 2.73.1 → 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 +2 -15
- 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, 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, 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
|
@@ -994,12 +994,13 @@ export interface UploadTokenResponse {
|
|
|
994
994
|
/**
|
|
995
995
|
* Comment types
|
|
996
996
|
*/
|
|
997
|
+
export type CommentStatus = 'scheduled' | 'pending' | 'verifying' | 'completed' | 'failed';
|
|
997
998
|
export interface Comment {
|
|
998
999
|
id: string;
|
|
999
1000
|
accountId: string;
|
|
1000
1001
|
postUrl: string;
|
|
1001
1002
|
commentText: string;
|
|
1002
|
-
status:
|
|
1003
|
+
status: CommentStatus;
|
|
1003
1004
|
commentUrl?: string | null;
|
|
1004
1005
|
error?: string | null;
|
|
1005
1006
|
createdAt?: string;
|
|
@@ -1013,20 +1014,6 @@ export interface CreateCommentParams {
|
|
|
1013
1014
|
export interface CreateCommentResponse {
|
|
1014
1015
|
commentId: string;
|
|
1015
1016
|
}
|
|
1016
|
-
export interface GetCommentStatusParams {
|
|
1017
|
-
commentId: string;
|
|
1018
|
-
}
|
|
1019
|
-
export type CommentStatusResponse = {
|
|
1020
|
-
status: "pending";
|
|
1021
|
-
} | {
|
|
1022
|
-
status: "running";
|
|
1023
|
-
} | {
|
|
1024
|
-
status: "failed";
|
|
1025
|
-
error: string;
|
|
1026
|
-
} | {
|
|
1027
|
-
status: "completed";
|
|
1028
|
-
commentUrl: string;
|
|
1029
|
-
};
|
|
1030
1017
|
export interface GetCommentsParams {
|
|
1031
1018
|
commentIds?: string[];
|
|
1032
1019
|
accountIds?: string[];
|