ugcinc 2.74.1 → 2.75.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
@@ -121,20 +121,63 @@ if (response.ok) {
121
121
 
122
122
  **Update account info (tags, groups, keywords, profiles, description, warmup version):**
123
123
  ```typescript
124
- // Update account metadata
124
+ // Update multiple accounts at once
125
125
  const response = await client.accounts.updateInfo({
126
- accountId: 'account-uuid',
127
- tag: 'production',
128
- org_group: 'team-a',
129
- user_group: 'creators',
130
- keywords: 'fitness,health,workout',
131
- profiles: '@fitinfluencer1,@healthguru2',
132
- description: 'health and wellness content',
133
- warmupVersion: 'v1_smart' // 'original' or 'v1_smart'
126
+ updates: [
127
+ {
128
+ accountId: 'account-uuid-1',
129
+ tag: 'production',
130
+ org_group: 'team-a',
131
+ user_group: 'creators',
132
+ keywords: 'fitness,health,workout',
133
+ profiles: '@fitinfluencer1,@healthguru2',
134
+ description: 'health and wellness content',
135
+ warmupVersion: 'v1_smart' // 'original' or 'v1_smart'
136
+ },
137
+ {
138
+ accountId: 'account-uuid-2',
139
+ tag: 'staging',
140
+ warmupVersion: 'original'
141
+ }
142
+ ]
143
+ });
144
+
145
+ if (response.ok) {
146
+ console.log(`Updated ${response.data.successful} accounts`);
147
+ if (response.data.failed > 0) {
148
+ console.log('Failed updates:', response.data.results.filter(r => !r.success));
149
+ }
150
+ }
151
+ ```
152
+
153
+ **Update social profile (avatar, nickname, bio):**
154
+ ```typescript
155
+ // Update social profiles for multiple accounts at once
156
+ // Note: Rate limits apply per account:
157
+ // - Nickname: once every 7 days
158
+ // - Avatar: once every 24 hours
159
+ // - Bio: once every 24 hours
160
+ const response = await client.accounts.updateSocial({
161
+ updates: [
162
+ {
163
+ accountId: 'account-uuid-1',
164
+ nickName: 'Cool Creator ✨',
165
+ bio: 'Content creator 🎥 | Follow for daily tips'
166
+ },
167
+ {
168
+ accountId: 'account-uuid-2',
169
+ avatarUrl: 'https://example.com/new-avatar.jpg'
170
+ }
171
+ ]
134
172
  });
135
173
 
136
174
  if (response.ok) {
137
- console.log('Account info updated:', response.data.account);
175
+ console.log(`Profile updates scheduled for ${response.data.successful} accounts`);
176
+ if (response.data.failed > 0) {
177
+ response.data.results.filter(r => !r.success).forEach(r => {
178
+ console.log(`Account ${r.accountId} failed: ${r.error}`);
179
+ });
180
+ }
138
181
  }
139
182
  ```
140
183
 
@@ -1,5 +1,5 @@
1
1
  import { BaseClient } from './base';
2
- import type { Account, AccountTask, GetAccountsParams, GetAccountStatusParams, UpdateAccountInfoParams, UpdateAccountSocialParams, DeleteAccountPostsParams, DeleteAccountPostsResponse, ResetWarmupParams, ResetWarmupResponse, ApiResponse } from './types';
2
+ import type { Account, AccountTask, GetAccountsParams, GetAccountStatusParams, UpdateAccountInfoParams, UpdateAccountInfoResponse, UpdateAccountSocialParams, UpdateAccountSocialResponse, DeleteAccountPostsParams, DeleteAccountPostsResponse, ResetWarmupParams, ResetWarmupResponse, ApiResponse } from './types';
3
3
  /**
4
4
  * Client for managing accounts
5
5
  */
@@ -13,19 +13,38 @@ 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, keywords, profiles, description, warmupVersion, postVersion)
16
+ * Update account metadata for one or more accounts
17
+ * Supports: tag, org_group, user_group, keywords, profiles, description, warmupVersion, postVersion
18
+ *
19
+ * @example
20
+ * // Update multiple accounts
21
+ * const response = await client.accounts.updateInfo({
22
+ * updates: [
23
+ * { accountId: 'acc_1', tag: 'premium', keywords: 'fitness,health' },
24
+ * { accountId: 'acc_2', tag: 'standard', warmupVersion: 'v1_smart' }
25
+ * ]
26
+ * });
17
27
  */
18
- updateInfo(params: UpdateAccountInfoParams): Promise<ApiResponse<{
19
- message: string;
20
- account: Account;
21
- }>>;
28
+ updateInfo(params: UpdateAccountInfoParams): Promise<ApiResponse<UpdateAccountInfoResponse>>;
22
29
  /**
23
- * Update account social profile (avatar, nickname, bio)
24
- * Note: Nickname can only be updated once every 7 days
30
+ * Update account social profile for one or more accounts
31
+ * Supports: avatarUrl, nickName, bio
32
+ *
33
+ * Note: Rate limits apply per account:
34
+ * - Nickname: once every 7 days
35
+ * - Avatar: once every 24 hours
36
+ * - Bio: once every 24 hours
37
+ *
38
+ * @example
39
+ * // Update multiple accounts
40
+ * const response = await client.accounts.updateSocial({
41
+ * updates: [
42
+ * { accountId: 'acc_1', nickName: 'New Name 1', bio: 'New bio 1' },
43
+ * { accountId: 'acc_2', avatarUrl: 'https://example.com/avatar.jpg' }
44
+ * ]
45
+ * });
25
46
  */
26
- updateSocial(params: UpdateAccountSocialParams): Promise<ApiResponse<{
27
- message: string;
28
- }>>;
47
+ updateSocial(params: UpdateAccountSocialParams): Promise<ApiResponse<UpdateAccountSocialResponse>>;
29
48
  /**
30
49
  * Delete all posts from one or more accounts
31
50
  * Creates a clear_posts task that automatically deletes all posts from the account(s)
package/dist/accounts.js CHANGED
@@ -19,14 +19,38 @@ 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, keywords, profiles, description, warmupVersion, postVersion)
22
+ * Update account metadata for one or more accounts
23
+ * Supports: tag, org_group, user_group, keywords, profiles, description, warmupVersion, postVersion
24
+ *
25
+ * @example
26
+ * // Update multiple accounts
27
+ * const response = await client.accounts.updateInfo({
28
+ * updates: [
29
+ * { accountId: 'acc_1', tag: 'premium', keywords: 'fitness,health' },
30
+ * { accountId: 'acc_2', tag: 'standard', warmupVersion: 'v1_smart' }
31
+ * ]
32
+ * });
23
33
  */
24
34
  async updateInfo(params) {
25
35
  return this.post('/accounts/update-info', params);
26
36
  }
27
37
  /**
28
- * Update account social profile (avatar, nickname, bio)
29
- * Note: Nickname can only be updated once every 7 days
38
+ * Update account social profile for one or more accounts
39
+ * Supports: avatarUrl, nickName, bio
40
+ *
41
+ * Note: Rate limits apply per account:
42
+ * - Nickname: once every 7 days
43
+ * - Avatar: once every 24 hours
44
+ * - Bio: once every 24 hours
45
+ *
46
+ * @example
47
+ * // Update multiple accounts
48
+ * const response = await client.accounts.updateSocial({
49
+ * updates: [
50
+ * { accountId: 'acc_1', nickName: 'New Name 1', bio: 'New bio 1' },
51
+ * { accountId: 'acc_2', avatarUrl: 'https://example.com/avatar.jpg' }
52
+ * ]
53
+ * });
30
54
  */
31
55
  async updateSocial(params) {
32
56
  return this.post('/accounts/update-social', params);
package/dist/types.d.ts CHANGED
@@ -124,7 +124,10 @@ export interface GetAccountStatusParams {
124
124
  accountIds?: string[];
125
125
  includeCompleted?: boolean;
126
126
  }
127
- export interface UpdateAccountInfoParams {
127
+ /**
128
+ * Individual account info update for bulk operations
129
+ */
130
+ export interface AccountInfoUpdate {
128
131
  accountId: string;
129
132
  tag?: string;
130
133
  org_group?: string;
@@ -135,12 +138,62 @@ export interface UpdateAccountInfoParams {
135
138
  warmupVersion?: 'original' | 'v1_smart';
136
139
  postVersion?: 'original' | 'v1_custom';
137
140
  }
138
- export interface UpdateAccountSocialParams {
141
+ /**
142
+ * Parameters for updating account info (bulk)
143
+ */
144
+ export interface UpdateAccountInfoParams {
145
+ updates: AccountInfoUpdate[];
146
+ }
147
+ /**
148
+ * Result for individual account info update
149
+ */
150
+ export interface AccountInfoUpdateResult {
151
+ accountId: string;
152
+ success: boolean;
153
+ account?: Account;
154
+ error?: string;
155
+ }
156
+ /**
157
+ * Response for bulk account info updates
158
+ */
159
+ export interface UpdateAccountInfoResponse {
160
+ message: string;
161
+ successful: number;
162
+ failed: number;
163
+ results: AccountInfoUpdateResult[];
164
+ }
165
+ /**
166
+ * Individual account social update for bulk operations
167
+ */
168
+ export interface AccountSocialUpdate {
139
169
  accountId: string;
140
170
  avatarUrl?: string;
141
171
  nickName?: string;
142
172
  bio?: string;
143
173
  }
174
+ /**
175
+ * Parameters for updating account social profile (bulk)
176
+ */
177
+ export interface UpdateAccountSocialParams {
178
+ updates: AccountSocialUpdate[];
179
+ }
180
+ /**
181
+ * Result for individual account social update
182
+ */
183
+ export interface AccountSocialUpdateResult {
184
+ accountId: string;
185
+ success: boolean;
186
+ error?: string;
187
+ }
188
+ /**
189
+ * Response for bulk account social updates
190
+ */
191
+ export interface UpdateAccountSocialResponse {
192
+ message: string;
193
+ successful: number;
194
+ failed: number;
195
+ results: AccountSocialUpdateResult[];
196
+ }
144
197
  export interface DeleteAccountPostsParams {
145
198
  accountIds: string[];
146
199
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ugcinc",
3
- "version": "2.74.1",
3
+ "version": "2.75.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",