ugcinc 1.0.9 → 1.1.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/index.d.ts +1 -1
- package/dist/stats.d.ts +3 -2
- package/dist/stats.js +3 -2
- package/dist/types.d.ts +10 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -9,4 +9,4 @@ export { TasksClient } from './tasks';
|
|
|
9
9
|
export { PostsClient } from './posts';
|
|
10
10
|
export { StatsClient } from './stats';
|
|
11
11
|
export type { ClientConfig, } from './base';
|
|
12
|
-
export type { SuccessResponse, ErrorResponse, ApiResponse, Account, AccountStat, AccountTask, EditProfileInfo, Task, TaskType, Post, PostType, PostStat, GetAccountsParams, GetAccountStatsParams, GetAccountStatusParams, UpdateAccountInfoParams, GetTasksParams, GetPostsParams, CreateSlideshowParams, GetPostStatsParams, GetPostStatusParams, CreateVideoParams, RefreshStatsParams, RefreshStatsResponse, } from './types';
|
|
12
|
+
export type { SuccessResponse, ErrorResponse, ApiResponse, Account, AccountStat, AccountTask, EditProfileInfo, Task, TaskType, Post, PostType, PostStat, GetAccountsParams, GetAccountStatsParams, GetAccountStatusParams, UpdateAccountInfoParams, UpdateAccountSocialParams, GetTasksParams, GetPostsParams, CreateSlideshowParams, GetPostStatsParams, GetPostStatusParams, CreateVideoParams, RefreshStatsParams, RefreshStatsResponse, RefreshStatsError, } from './types';
|
package/dist/stats.d.ts
CHANGED
|
@@ -13,8 +13,9 @@ export declare class StatsClient extends BaseClient {
|
|
|
13
13
|
*/
|
|
14
14
|
getPostStats(params?: GetPostStatsParams): Promise<ApiResponse<PostStat[]>>;
|
|
15
15
|
/**
|
|
16
|
-
* Refresh statistics for
|
|
16
|
+
* Refresh statistics for all accounts in the organization (optionally filtered by org_group)
|
|
17
17
|
* Fetches live data from TikTok/Instagram API and creates new stat records
|
|
18
|
+
* Note: Can only be called once per hour per organization (or per org_group if specified)
|
|
18
19
|
*/
|
|
19
|
-
refresh(params
|
|
20
|
+
refresh(params?: RefreshStatsParams): Promise<ApiResponse<RefreshStatsResponse>>;
|
|
20
21
|
}
|
package/dist/stats.js
CHANGED
|
@@ -19,11 +19,12 @@ class StatsClient extends base_1.BaseClient {
|
|
|
19
19
|
return this.post('/stats/posts', params ?? {});
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
|
-
* Refresh statistics for
|
|
22
|
+
* Refresh statistics for all accounts in the organization (optionally filtered by org_group)
|
|
23
23
|
* Fetches live data from TikTok/Instagram API and creates new stat records
|
|
24
|
+
* Note: Can only be called once per hour per organization (or per org_group if specified)
|
|
24
25
|
*/
|
|
25
26
|
async refresh(params) {
|
|
26
|
-
return this.post('/stats/refresh', params);
|
|
27
|
+
return this.post('/stats/refresh', params ?? {});
|
|
27
28
|
}
|
|
28
29
|
}
|
|
29
30
|
exports.StatsClient = StatsClient;
|
package/dist/types.d.ts
CHANGED
|
@@ -157,10 +157,18 @@ export interface CreateVideoParams {
|
|
|
157
157
|
strict?: boolean;
|
|
158
158
|
}
|
|
159
159
|
export interface RefreshStatsParams {
|
|
160
|
+
org_group?: string;
|
|
161
|
+
}
|
|
162
|
+
export interface RefreshStatsError {
|
|
160
163
|
accountId: string;
|
|
164
|
+
username: string;
|
|
165
|
+
error: string;
|
|
161
166
|
}
|
|
162
167
|
export interface RefreshStatsResponse {
|
|
163
|
-
|
|
164
|
-
|
|
168
|
+
accounts_refreshed: number;
|
|
169
|
+
accounts_failed: number;
|
|
170
|
+
total_accounts: number;
|
|
171
|
+
account_stats: AccountStat[];
|
|
165
172
|
post_stats_count: number;
|
|
173
|
+
errors?: RefreshStatsError[];
|
|
166
174
|
}
|