ugcinc 1.4.2 → 1.4.3

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, ApiResponse } from './types';
3
3
  /**
4
4
  * Client for managing posts
5
5
  */
@@ -24,4 +24,12 @@ 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
+ }>>;
27
35
  }
package/dist/posts.js CHANGED
@@ -30,5 +30,12 @@ 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
+ }
33
40
  }
34
41
  exports.PostsClient = PostsClient;
package/dist/types.d.ts CHANGED
@@ -162,6 +162,9 @@ export interface CreateVideoParams {
162
162
  videoUrl: string;
163
163
  strict?: boolean;
164
164
  }
165
+ export interface DeletePostsParams {
166
+ postIds: string[];
167
+ }
165
168
  export interface RefreshStatsParams {
166
169
  org_group?: string;
167
170
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ugcinc",
3
- "version": "1.4.2",
3
+ "version": "1.4.3",
4
4
  "description": "TypeScript/JavaScript client for the UGC Inc API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",