ugcinc 1.4.2 → 1.4.4

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 CHANGED
@@ -1,5 +1,5 @@
1
1
  import { BaseClient } from './base';
2
- import type { Post, GetPostsParams, CreateSlideshowParams, GetPostStatusParams, CreateVideoParams, ApiResponse } from './types';
2
+ import type { Post, GetPostsParams, CreateSlideshowParams, GetPostStatusParams, CreateVideoParams, DeletePostsParams, RetryPostsParams, ApiResponse } from './types';
3
3
  /**
4
4
  * Client for managing posts
5
5
  */
@@ -24,4 +24,20 @@ export declare class PostsClient extends BaseClient {
24
24
  * Create a video post
25
25
  */
26
26
  createVideo(params: CreateVideoParams): Promise<ApiResponse<Post>>;
27
+ /**
28
+ * Delete posts
29
+ * Note: Posts with status "complete" (already posted) cannot be deleted
30
+ */
31
+ deletePosts(params: DeletePostsParams): Promise<ApiResponse<{
32
+ deleted: number;
33
+ ids: string[];
34
+ }>>;
35
+ /**
36
+ * Retry failed posts
37
+ * Note: Only posts with status "failed" can be retried
38
+ */
39
+ retryPosts(params: RetryPostsParams): Promise<ApiResponse<{
40
+ retried: number;
41
+ ids: string[];
42
+ }>>;
27
43
  }
package/dist/posts.js CHANGED
@@ -30,5 +30,19 @@ class PostsClient extends base_1.BaseClient {
30
30
  async createVideo(params) {
31
31
  return this.post('/post/video', params);
32
32
  }
33
+ /**
34
+ * Delete posts
35
+ * Note: Posts with status "complete" (already posted) cannot be deleted
36
+ */
37
+ async deletePosts(params) {
38
+ return this.post('/post/delete', params);
39
+ }
40
+ /**
41
+ * Retry failed posts
42
+ * Note: Only posts with status "failed" can be retried
43
+ */
44
+ async retryPosts(params) {
45
+ return this.post('/post/retry', params);
46
+ }
33
47
  }
34
48
  exports.PostsClient = PostsClient;
package/dist/types.d.ts CHANGED
@@ -162,6 +162,12 @@ export interface CreateVideoParams {
162
162
  videoUrl: string;
163
163
  strict?: boolean;
164
164
  }
165
+ export interface DeletePostsParams {
166
+ postIds: string[];
167
+ }
168
+ export interface RetryPostsParams {
169
+ postIds: string[];
170
+ }
165
171
  export interface RefreshStatsParams {
166
172
  org_group?: string;
167
173
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ugcinc",
3
- "version": "1.4.2",
3
+ "version": "1.4.4",
4
4
  "description": "TypeScript/JavaScript client for the UGC Inc API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",