ugcinc 2.1.0 → 2.2.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/posts.d.ts +9 -6
- package/dist/posts.js +7 -1
- package/dist/types.d.ts +13 -0
- package/package.json +1 -1
package/dist/posts.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseClient } from './base';
|
|
2
|
-
import type { Post, GetPostsParams, CreateSlideshowParams, GetPostStatusParams, CreateVideoParams, DeletePostsParams, RetryPostsParams, ApiResponse } from './types';
|
|
2
|
+
import type { Post, GetPostsParams, CreateSlideshowParams, GetPostStatusParams, CreateVideoParams, DeletePostsParams, DeletePostsResponse, RetryPostsParams, ApiResponse } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* Client for managing posts
|
|
5
5
|
*/
|
|
@@ -26,12 +26,15 @@ export declare class PostsClient extends BaseClient {
|
|
|
26
26
|
createVideo(params: CreateVideoParams): Promise<ApiResponse<Post>>;
|
|
27
27
|
/**
|
|
28
28
|
* Delete posts
|
|
29
|
-
*
|
|
29
|
+
*
|
|
30
|
+
* Handles both unpublished and published posts:
|
|
31
|
+
* - Unpublished posts (scheduled, pending, failed, retrying) are deleted immediately
|
|
32
|
+
* - Published posts (complete) trigger a deletion flow that removes the post from the social platform
|
|
33
|
+
*
|
|
34
|
+
* For published posts being deleted, the status changes to "deleting" and then "deleted" once complete.
|
|
35
|
+
* Monitor deletion progress using getStatus().
|
|
30
36
|
*/
|
|
31
|
-
deletePosts(params: DeletePostsParams): Promise<ApiResponse<
|
|
32
|
-
deleted: number;
|
|
33
|
-
ids: string[];
|
|
34
|
-
}>>;
|
|
37
|
+
deletePosts(params: DeletePostsParams): Promise<ApiResponse<DeletePostsResponse>>;
|
|
35
38
|
/**
|
|
36
39
|
* Retry failed posts
|
|
37
40
|
* Note: Only posts with status "failed" can be retried
|
package/dist/posts.js
CHANGED
|
@@ -32,7 +32,13 @@ class PostsClient extends base_1.BaseClient {
|
|
|
32
32
|
}
|
|
33
33
|
/**
|
|
34
34
|
* Delete posts
|
|
35
|
-
*
|
|
35
|
+
*
|
|
36
|
+
* Handles both unpublished and published posts:
|
|
37
|
+
* - Unpublished posts (scheduled, pending, failed, retrying) are deleted immediately
|
|
38
|
+
* - Published posts (complete) trigger a deletion flow that removes the post from the social platform
|
|
39
|
+
*
|
|
40
|
+
* For published posts being deleted, the status changes to "deleting" and then "deleted" once complete.
|
|
41
|
+
* Monitor deletion progress using getStatus().
|
|
36
42
|
*/
|
|
37
43
|
async deletePosts(params) {
|
|
38
44
|
return this.post('/post/delete', params);
|
package/dist/types.d.ts
CHANGED
|
@@ -30,6 +30,9 @@ export interface Account {
|
|
|
30
30
|
warmup_enabled: boolean | null;
|
|
31
31
|
keywords: string | null;
|
|
32
32
|
profiles: string | null;
|
|
33
|
+
niches: string | null;
|
|
34
|
+
age_range: string | null;
|
|
35
|
+
sex: string | null;
|
|
33
36
|
status: 'pending' | 'initialized' | 'setup' | 'error';
|
|
34
37
|
}
|
|
35
38
|
export interface AccountStat {
|
|
@@ -174,6 +177,16 @@ export interface CreateVideoParams {
|
|
|
174
177
|
export interface DeletePostsParams {
|
|
175
178
|
postIds: string[];
|
|
176
179
|
}
|
|
180
|
+
export interface DeletePostsResponse {
|
|
181
|
+
deleted: number;
|
|
182
|
+
deleting: number;
|
|
183
|
+
deletedIds: string[];
|
|
184
|
+
deletingIds: string[];
|
|
185
|
+
errors?: Array<{
|
|
186
|
+
postId: string;
|
|
187
|
+
error: string;
|
|
188
|
+
}>;
|
|
189
|
+
}
|
|
177
190
|
export interface RetryPostsParams {
|
|
178
191
|
postIds: string[];
|
|
179
192
|
}
|