ugcinc 2.80.6 → 2.82.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 CHANGED
@@ -1,5 +1,5 @@
1
1
  import { BaseClient } from './base';
2
- import type { Post, GetPostsParams, CreateSlideshowParams, GetPostStatusParams, CreateVideoParams, DeletePostsParams, DeletePostsResponse, RetryPostsParams, ApiResponse } from './types';
2
+ import type { Post, GetPostsParams, CreateSlideshowParams, GetPostStatusParams, CreateVideoParams, DeletePostsParams, DeletePostsResponse, RetryPostsParams, SetPostStatusParams, SetPostStatusResponse, ApiResponse } from './types';
3
3
  /**
4
4
  * Client for managing posts
5
5
  */
@@ -43,4 +43,11 @@ export declare class PostsClient extends BaseClient {
43
43
  retried: number;
44
44
  ids: string[];
45
45
  }>>;
46
+ /**
47
+ * Set post status (team role only)
48
+ *
49
+ * Allows setting the status of posts. This is primarily used to set posts to "hidden"
50
+ * which excludes them from stats and hides them from non-team users.
51
+ */
52
+ setPostStatus(params: SetPostStatusParams): Promise<ApiResponse<SetPostStatusResponse>>;
46
53
  }
package/dist/posts.js CHANGED
@@ -50,5 +50,14 @@ class PostsClient extends base_1.BaseClient {
50
50
  async retryPosts(params) {
51
51
  return this.post('/post/retry', params);
52
52
  }
53
+ /**
54
+ * Set post status (team role only)
55
+ *
56
+ * Allows setting the status of posts. This is primarily used to set posts to "hidden"
57
+ * which excludes them from stats and hides them from non-team users.
58
+ */
59
+ async setPostStatus(params) {
60
+ return this.post('/post/set-status', params);
61
+ }
53
62
  }
54
63
  exports.PostsClient = PostsClient;
package/dist/types.d.ts CHANGED
@@ -83,11 +83,12 @@ export interface Task {
83
83
  * Post types
84
84
  */
85
85
  export type PostType = 'video' | 'slideshow';
86
+ export type PostStatus = 'scheduled' | 'pending' | 'complete' | 'failed' | 'retrying' | 'deleting' | 'deleted' | 'hidden';
86
87
  export interface Post {
87
88
  id: string;
88
89
  account_id: string;
89
90
  type: PostType;
90
- status: string;
91
+ status: PostStatus;
91
92
  social_id: string | null;
92
93
  caption: string | null;
93
94
  media_urls: string[] | null;
@@ -276,6 +277,14 @@ export interface DeletePostsResponse {
276
277
  export interface RetryPostsParams {
277
278
  postIds: string[];
278
279
  }
280
+ export interface SetPostStatusParams {
281
+ postIds: string[];
282
+ status: string;
283
+ }
284
+ export interface SetPostStatusResponse {
285
+ updated: number;
286
+ ids: string[];
287
+ }
279
288
  export interface RefreshStatsParams {
280
289
  org_group?: string;
281
290
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ugcinc",
3
- "version": "2.80.6",
3
+ "version": "2.82.0",
4
4
  "description": "TypeScript/JavaScript client for the UGC Inc API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",