ugcinc 2.8.2 → 2.9.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/README.md CHANGED
@@ -46,9 +46,10 @@ For complete API documentation, including all endpoints, parameters, and example
46
46
  ### Accounts
47
47
  - Get accounts with filters (tag, org_group, user_group, status)
48
48
  - Get account status (tasks)
49
- - Update account info (tags, groups)
49
+ - Update account info (tags, groups, keywords, profiles)
50
50
  - Update social profile (avatar, nickname, bio)
51
51
  - Delete all posts from accounts (automated batch deletion)
52
+ - Reset warmup activity (reset or delete tasks)
52
53
 
53
54
  ### Posts
54
55
  - Create video posts (with specific account or auto-select)
@@ -113,6 +114,50 @@ if (response.ok) {
113
114
  }
114
115
  ```
115
116
 
117
+ **Update account info (tags, groups, keywords, profiles):**
118
+ ```typescript
119
+ // Update account metadata
120
+ const response = await client.accounts.updateInfo({
121
+ accountId: 'account-uuid',
122
+ tag: 'production',
123
+ org_group: 'team-a',
124
+ user_group: 'creators',
125
+ keywords: 'fitness,health,workout',
126
+ profiles: '@fitinfluencer1,@healthguru2'
127
+ });
128
+
129
+ if (response.ok) {
130
+ console.log('Account info updated:', response.data.account);
131
+ }
132
+ ```
133
+
134
+ **Reset warmup activity:**
135
+ ```typescript
136
+ // Reset warmup (tasks will re-run)
137
+ const response = await client.accounts.resetWarmup({
138
+ accountId: 'account-uuid',
139
+ delete_activity: false // Default: resets run count so tasks re-execute
140
+ });
141
+
142
+ if (response.ok) {
143
+ console.log(response.data.message); // "Successfully reset warmup for account (tasks will re-run)"
144
+ console.log(`Tasks affected: ${response.data.tasks_affected}`);
145
+ console.log(`Action: ${response.data.action}`); // "reset"
146
+ }
147
+
148
+ // Delete all warmup activity (removes tasks completely)
149
+ const response = await client.accounts.resetWarmup({
150
+ accountId: 'account-uuid',
151
+ delete_activity: true // Deletes all warmup tasks
152
+ });
153
+
154
+ if (response.ok) {
155
+ console.log(response.data.message); // "Successfully deleted all warmup activity for account"
156
+ console.log(`Tasks affected: ${response.data.tasks_affected}`);
157
+ console.log(`Action: ${response.data.action}`); // "deleted"
158
+ }
159
+ ```
160
+
116
161
  **Delete all posts from accounts:**
117
162
  ```typescript
118
163
  // Delete all posts from one or more accounts
@@ -1,5 +1,5 @@
1
1
  import { BaseClient } from './base';
2
- import type { Account, AccountTask, GetAccountsParams, GetAccountStatusParams, UpdateAccountInfoParams, UpdateAccountSocialParams, DeleteAccountPostsParams, DeleteAccountPostsResponse, ApiResponse } from './types';
2
+ import type { Account, AccountTask, GetAccountsParams, GetAccountStatusParams, UpdateAccountInfoParams, UpdateAccountSocialParams, DeleteAccountPostsParams, DeleteAccountPostsResponse, ResetWarmupParams, ResetWarmupResponse, ApiResponse } from './types';
3
3
  /**
4
4
  * Client for managing accounts
5
5
  */
@@ -13,7 +13,7 @@ export declare class AccountsClient extends BaseClient {
13
13
  */
14
14
  getStatus(params?: GetAccountStatusParams): Promise<ApiResponse<AccountTask[]>>;
15
15
  /**
16
- * Update account metadata (tag, org_group, user_group)
16
+ * Update account metadata (tag, org_group, user_group, keywords, profiles)
17
17
  */
18
18
  updateInfo(params: UpdateAccountInfoParams): Promise<ApiResponse<{
19
19
  message: string;
@@ -32,4 +32,10 @@ export declare class AccountsClient extends BaseClient {
32
32
  * Posts are deleted one by one and verified using the platform API
33
33
  */
34
34
  deleteAllPosts(params: DeleteAccountPostsParams): Promise<ApiResponse<DeleteAccountPostsResponse>>;
35
+ /**
36
+ * Reset warmup activity for an account
37
+ * By default, resets task run counts so they will re-run
38
+ * If delete_activity is true, deletes all warmup tasks instead
39
+ */
40
+ resetWarmup(params: ResetWarmupParams): Promise<ApiResponse<ResetWarmupResponse>>;
35
41
  }
package/dist/accounts.js CHANGED
@@ -19,7 +19,7 @@ class AccountsClient extends base_1.BaseClient {
19
19
  return this.post('/accounts/status', params ?? {});
20
20
  }
21
21
  /**
22
- * Update account metadata (tag, org_group, user_group)
22
+ * Update account metadata (tag, org_group, user_group, keywords, profiles)
23
23
  */
24
24
  async updateInfo(params) {
25
25
  return this.post('/accounts/update-info', params);
@@ -39,5 +39,13 @@ class AccountsClient extends base_1.BaseClient {
39
39
  async deleteAllPosts(params) {
40
40
  return this.post('/accounts/delete-posts', params);
41
41
  }
42
+ /**
43
+ * Reset warmup activity for an account
44
+ * By default, resets task run counts so they will re-run
45
+ * If delete_activity is true, deletes all warmup tasks instead
46
+ */
47
+ async resetWarmup(params) {
48
+ return this.post('/accounts/reset-warmup', params);
49
+ }
42
50
  }
43
51
  exports.AccountsClient = AccountsClient;
package/dist/types.d.ts CHANGED
@@ -125,6 +125,8 @@ export interface UpdateAccountInfoParams {
125
125
  tag?: string;
126
126
  org_group?: string;
127
127
  user_group?: string;
128
+ keywords?: string;
129
+ profiles?: string;
128
130
  }
129
131
  export interface UpdateAccountSocialParams {
130
132
  accountId: string;
@@ -144,6 +146,15 @@ export interface DeleteAccountPostsResponse {
144
146
  error: string;
145
147
  }>;
146
148
  }
149
+ export interface ResetWarmupParams {
150
+ accountId: string;
151
+ delete_activity?: boolean;
152
+ }
153
+ export interface ResetWarmupResponse {
154
+ message: string;
155
+ tasks_affected: number;
156
+ action: 'deleted' | 'reset';
157
+ }
147
158
  export interface GetTasksParams {
148
159
  accountIds?: string[];
149
160
  startDate?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ugcinc",
3
- "version": "2.8.2",
3
+ "version": "2.9.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",