ugcinc 2.66.0 → 2.68.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/comments.d.ts +27 -6
- package/dist/comments.js +29 -6
- package/dist/index.d.ts +1 -1
- package/dist/stats.d.ts +11 -1
- package/dist/stats.js +12 -0
- package/dist/types.d.ts +36 -2
- 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, GetCommentStatusParams, CommentStatusResponse, ApiResponse } from './types';
|
|
2
|
+
import type { CreateCommentParams, CreateCommentResponse, GetCommentStatusParams, CommentStatusResponse, GetCommentsParams, Comment, ApiResponse } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* Client for managing comments
|
|
5
5
|
*/
|
|
@@ -8,7 +8,7 @@ export declare class CommentsClient extends BaseClient {
|
|
|
8
8
|
* Create a comment task
|
|
9
9
|
*
|
|
10
10
|
* Initiates a comment task on a TikTok post using the specified account.
|
|
11
|
-
* Returns a
|
|
11
|
+
* Returns a commentId that can be used to check the status of the comment.
|
|
12
12
|
*
|
|
13
13
|
* @example
|
|
14
14
|
* ```typescript
|
|
@@ -19,21 +19,21 @@ export declare class CommentsClient extends BaseClient {
|
|
|
19
19
|
* });
|
|
20
20
|
*
|
|
21
21
|
* if (response.ok) {
|
|
22
|
-
* console.log('
|
|
22
|
+
* console.log('Comment ID:', response.data.commentId);
|
|
23
23
|
* }
|
|
24
24
|
* ```
|
|
25
25
|
*/
|
|
26
26
|
createComment(params: CreateCommentParams): Promise<ApiResponse<CreateCommentResponse>>;
|
|
27
27
|
/**
|
|
28
|
-
* Get comment
|
|
28
|
+
* Get comment status (live check)
|
|
29
29
|
*
|
|
30
|
-
* Check the status of a
|
|
30
|
+
* Check the current status of a comment by querying the automation API.
|
|
31
31
|
* Returns the current status and comment URL if completed.
|
|
32
32
|
*
|
|
33
33
|
* @example
|
|
34
34
|
* ```typescript
|
|
35
35
|
* const response = await client.comments.getStatus({
|
|
36
|
-
*
|
|
36
|
+
* commentId: 'comment-123'
|
|
37
37
|
* });
|
|
38
38
|
*
|
|
39
39
|
* if (response.ok) {
|
|
@@ -46,4 +46,25 @@ export declare class CommentsClient extends BaseClient {
|
|
|
46
46
|
* ```
|
|
47
47
|
*/
|
|
48
48
|
getStatus(params: GetCommentStatusParams): Promise<ApiResponse<CommentStatusResponse>>;
|
|
49
|
+
/**
|
|
50
|
+
* Get comments
|
|
51
|
+
*
|
|
52
|
+
* Get comments for the organization, optionally filtered by commentIds, accountIds, or tag.
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```typescript
|
|
56
|
+
* // Get all comments
|
|
57
|
+
* const response = await client.comments.getComments();
|
|
58
|
+
*
|
|
59
|
+
* // Get specific comments by IDs
|
|
60
|
+
* const response = await client.comments.getComments({ commentIds: ['id1', 'id2'] });
|
|
61
|
+
*
|
|
62
|
+
* // Get comments for specific accounts
|
|
63
|
+
* const response = await client.comments.getComments({ accountIds: ['acc1', 'acc2'] });
|
|
64
|
+
*
|
|
65
|
+
* // Get comments for accounts with a specific tag
|
|
66
|
+
* const response = await client.comments.getComments({ tag: 'campaign-1' });
|
|
67
|
+
* ```
|
|
68
|
+
*/
|
|
69
|
+
getComments(params?: GetCommentsParams): Promise<ApiResponse<Comment[]>>;
|
|
49
70
|
}
|
package/dist/comments.js
CHANGED
|
@@ -10,7 +10,7 @@ class CommentsClient extends base_1.BaseClient {
|
|
|
10
10
|
* Create a comment task
|
|
11
11
|
*
|
|
12
12
|
* Initiates a comment task on a TikTok post using the specified account.
|
|
13
|
-
* Returns a
|
|
13
|
+
* Returns a commentId that can be used to check the status of the comment.
|
|
14
14
|
*
|
|
15
15
|
* @example
|
|
16
16
|
* ```typescript
|
|
@@ -21,7 +21,7 @@ class CommentsClient extends base_1.BaseClient {
|
|
|
21
21
|
* });
|
|
22
22
|
*
|
|
23
23
|
* if (response.ok) {
|
|
24
|
-
* console.log('
|
|
24
|
+
* console.log('Comment ID:', response.data.commentId);
|
|
25
25
|
* }
|
|
26
26
|
* ```
|
|
27
27
|
*/
|
|
@@ -29,15 +29,15 @@ class CommentsClient extends base_1.BaseClient {
|
|
|
29
29
|
return this.post('/comment/create', params);
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
32
|
-
* Get comment
|
|
32
|
+
* Get comment status (live check)
|
|
33
33
|
*
|
|
34
|
-
* Check the status of a
|
|
34
|
+
* Check the current status of a comment by querying the automation API.
|
|
35
35
|
* Returns the current status and comment URL if completed.
|
|
36
36
|
*
|
|
37
37
|
* @example
|
|
38
38
|
* ```typescript
|
|
39
39
|
* const response = await client.comments.getStatus({
|
|
40
|
-
*
|
|
40
|
+
* commentId: 'comment-123'
|
|
41
41
|
* });
|
|
42
42
|
*
|
|
43
43
|
* if (response.ok) {
|
|
@@ -50,7 +50,30 @@ class CommentsClient extends base_1.BaseClient {
|
|
|
50
50
|
* ```
|
|
51
51
|
*/
|
|
52
52
|
async getStatus(params) {
|
|
53
|
-
return this.post('/comment', params);
|
|
53
|
+
return this.post('/comment/status', params);
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Get comments
|
|
57
|
+
*
|
|
58
|
+
* Get comments for the organization, optionally filtered by commentIds, accountIds, or tag.
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```typescript
|
|
62
|
+
* // Get all comments
|
|
63
|
+
* const response = await client.comments.getComments();
|
|
64
|
+
*
|
|
65
|
+
* // Get specific comments by IDs
|
|
66
|
+
* const response = await client.comments.getComments({ commentIds: ['id1', 'id2'] });
|
|
67
|
+
*
|
|
68
|
+
* // Get comments for specific accounts
|
|
69
|
+
* const response = await client.comments.getComments({ accountIds: ['acc1', 'acc2'] });
|
|
70
|
+
*
|
|
71
|
+
* // Get comments for accounts with a specific tag
|
|
72
|
+
* const response = await client.comments.getComments({ tag: 'campaign-1' });
|
|
73
|
+
* ```
|
|
74
|
+
*/
|
|
75
|
+
async getComments(params) {
|
|
76
|
+
return this.post('/comment', params ?? {});
|
|
54
77
|
}
|
|
55
78
|
}
|
|
56
79
|
exports.CommentsClient = CommentsClient;
|
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, UserMedia, SocialAudio, Media, GetMediaParams, UploadMediaParams, UploadMediaResponse, UpdateMediaTagParams, DeleteMediaParams, DeleteMediaResponse, CreateSocialAudioParams, CreateMediaFromUrlParams, CreateCommentParams, CreateCommentResponse, GetCommentStatusParams, CommentStatusResponse, } from './types';
|
|
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, UserMedia, SocialAudio, Media, GetMediaParams, UploadMediaParams, UploadMediaResponse, UpdateMediaTagParams, DeleteMediaParams, DeleteMediaResponse, CreateSocialAudioParams, CreateMediaFromUrlParams, Comment, CreateCommentParams, CreateCommentResponse, GetCommentStatusParams, CommentStatusResponse, GetCommentsParams, } from './types';
|
package/dist/stats.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseClient } from './base';
|
|
2
|
-
import type { AccountStat, PostStat, GetAccountStatsParams, GetPostStatsParams, RefreshStatsParams, RefreshStatsResponse, DailyAggregatedStat, GetDailyAggregatedStatsParams, DailyPostStat, GetDailyPostStatsParams, TopAccount, GetTopAccountsParams, TopPost, GetTopPostsParams, ApiResponse } from './types';
|
|
2
|
+
import type { AccountStat, PostStat, GetAccountStatsParams, GetPostStatsParams, RefreshStatsParams, RefreshStatsResponse, DailyAggregatedStat, GetDailyAggregatedStatsParams, DailyAccountStat, GetDailyAccountStatsParams, DailyPostStat, GetDailyPostStatsParams, TopAccount, GetTopAccountsParams, TopPost, GetTopPostsParams, ApiResponse } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* Client for managing statistics
|
|
5
5
|
*/
|
|
@@ -74,6 +74,16 @@ export declare class StatsClient extends BaseClient {
|
|
|
74
74
|
* ```
|
|
75
75
|
*/
|
|
76
76
|
getDailyAggregated(params: GetDailyAggregatedStatsParams): Promise<ApiResponse<DailyAggregatedStat[]>>;
|
|
77
|
+
/**
|
|
78
|
+
* Get daily account statistics for all accounts in an org
|
|
79
|
+
*
|
|
80
|
+
* Returns per-account daily changes (deltas) for followers, following, views, likes.
|
|
81
|
+
* Perfect for granular local filtering in dashboard charts.
|
|
82
|
+
*
|
|
83
|
+
* @param params - Date range and filter parameters (startDate and endDate required)
|
|
84
|
+
* @returns Array of daily account statistics
|
|
85
|
+
*/
|
|
86
|
+
getDailyAccountStats(params: GetDailyAccountStatsParams): Promise<ApiResponse<DailyAccountStat[]>>;
|
|
77
87
|
/**
|
|
78
88
|
* Get daily post statistics for chart tooltips
|
|
79
89
|
*
|
package/dist/stats.js
CHANGED
|
@@ -82,6 +82,18 @@ class StatsClient extends base_1.BaseClient {
|
|
|
82
82
|
async getDailyAggregated(params) {
|
|
83
83
|
return this.post('/stats/aggregated/daily', params);
|
|
84
84
|
}
|
|
85
|
+
/**
|
|
86
|
+
* Get daily account statistics for all accounts in an org
|
|
87
|
+
*
|
|
88
|
+
* Returns per-account daily changes (deltas) for followers, following, views, likes.
|
|
89
|
+
* Perfect for granular local filtering in dashboard charts.
|
|
90
|
+
*
|
|
91
|
+
* @param params - Date range and filter parameters (startDate and endDate required)
|
|
92
|
+
* @returns Array of daily account statistics
|
|
93
|
+
*/
|
|
94
|
+
async getDailyAccountStats(params) {
|
|
95
|
+
return this.post('/stats/granular/daily-accounts', params);
|
|
96
|
+
}
|
|
85
97
|
/**
|
|
86
98
|
* Get daily post statistics for chart tooltips
|
|
87
99
|
*
|
package/dist/types.d.ts
CHANGED
|
@@ -253,6 +253,22 @@ export interface GetDailyAggregatedStatsParams {
|
|
|
253
253
|
org_group?: string;
|
|
254
254
|
user_group?: string;
|
|
255
255
|
}
|
|
256
|
+
export interface DailyAccountStat {
|
|
257
|
+
date: Date | string;
|
|
258
|
+
account_id: string;
|
|
259
|
+
followers: number;
|
|
260
|
+
following: number;
|
|
261
|
+
views: number;
|
|
262
|
+
likes: number;
|
|
263
|
+
}
|
|
264
|
+
export interface GetDailyAccountStatsParams {
|
|
265
|
+
startDate: string;
|
|
266
|
+
endDate: string;
|
|
267
|
+
accountIds?: string[];
|
|
268
|
+
tag?: string;
|
|
269
|
+
org_group?: string;
|
|
270
|
+
user_group?: string;
|
|
271
|
+
}
|
|
256
272
|
export interface DailyPostStat {
|
|
257
273
|
date: Date | string;
|
|
258
274
|
post_id: string;
|
|
@@ -794,6 +810,8 @@ export interface NodeRun {
|
|
|
794
810
|
output_data: Record<string, unknown> | null;
|
|
795
811
|
created_at: string;
|
|
796
812
|
completed_at: string | null;
|
|
813
|
+
/** Sub-workflow node runs (only present for workflow nodes) */
|
|
814
|
+
subNodes?: NodeRun[];
|
|
797
815
|
}
|
|
798
816
|
/**
|
|
799
817
|
* Media types
|
|
@@ -880,16 +898,27 @@ export interface UploadTokenResponse {
|
|
|
880
898
|
/**
|
|
881
899
|
* Comment types
|
|
882
900
|
*/
|
|
901
|
+
export interface Comment {
|
|
902
|
+
id: string;
|
|
903
|
+
accountId: string;
|
|
904
|
+
postUrl: string;
|
|
905
|
+
commentText: string;
|
|
906
|
+
status: 'pending' | 'running' | 'completed' | 'failed';
|
|
907
|
+
commentUrl?: string | null;
|
|
908
|
+
error?: string | null;
|
|
909
|
+
createdAt?: string;
|
|
910
|
+
completedAt?: string | null;
|
|
911
|
+
}
|
|
883
912
|
export interface CreateCommentParams {
|
|
884
913
|
accountId: string;
|
|
885
914
|
postUrl: string;
|
|
886
915
|
commentText: string;
|
|
887
916
|
}
|
|
888
917
|
export interface CreateCommentResponse {
|
|
889
|
-
|
|
918
|
+
commentId: string;
|
|
890
919
|
}
|
|
891
920
|
export interface GetCommentStatusParams {
|
|
892
|
-
|
|
921
|
+
commentId: string;
|
|
893
922
|
}
|
|
894
923
|
export type CommentStatusResponse = {
|
|
895
924
|
status: "pending";
|
|
@@ -902,3 +931,8 @@ export type CommentStatusResponse = {
|
|
|
902
931
|
status: "completed";
|
|
903
932
|
commentUrl: string;
|
|
904
933
|
};
|
|
934
|
+
export interface GetCommentsParams {
|
|
935
|
+
commentIds?: string[];
|
|
936
|
+
accountIds?: string[];
|
|
937
|
+
tag?: string;
|
|
938
|
+
}
|