ugcinc 2.74.1 → 2.76.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
@@ -90,6 +90,7 @@ export interface Post {
90
90
  caption: string | null;
91
91
  media_urls: string[] | null;
92
92
  music_post_id: string | null;
93
+ social_audio_id: string | null;
93
94
  scheduled_at: string | null;
94
95
  postUrl?: string;
95
96
  }
@@ -124,7 +125,10 @@ export interface GetAccountStatusParams {
124
125
  accountIds?: string[];
125
126
  includeCompleted?: boolean;
126
127
  }
127
- export interface UpdateAccountInfoParams {
128
+ /**
129
+ * Individual account info update for bulk operations
130
+ */
131
+ export interface AccountInfoUpdate {
128
132
  accountId: string;
129
133
  tag?: string;
130
134
  org_group?: string;
@@ -135,12 +139,62 @@ export interface UpdateAccountInfoParams {
135
139
  warmupVersion?: 'original' | 'v1_smart';
136
140
  postVersion?: 'original' | 'v1_custom';
137
141
  }
138
- export interface UpdateAccountSocialParams {
142
+ /**
143
+ * Parameters for updating account info (bulk)
144
+ */
145
+ export interface UpdateAccountInfoParams {
146
+ updates: AccountInfoUpdate[];
147
+ }
148
+ /**
149
+ * Result for individual account info update
150
+ */
151
+ export interface AccountInfoUpdateResult {
152
+ accountId: string;
153
+ success: boolean;
154
+ account?: Account;
155
+ error?: string;
156
+ }
157
+ /**
158
+ * Response for bulk account info updates
159
+ */
160
+ export interface UpdateAccountInfoResponse {
161
+ message: string;
162
+ successful: number;
163
+ failed: number;
164
+ results: AccountInfoUpdateResult[];
165
+ }
166
+ /**
167
+ * Individual account social update for bulk operations
168
+ */
169
+ export interface AccountSocialUpdate {
139
170
  accountId: string;
140
171
  avatarUrl?: string;
141
172
  nickName?: string;
142
173
  bio?: string;
143
174
  }
175
+ /**
176
+ * Parameters for updating account social profile (bulk)
177
+ */
178
+ export interface UpdateAccountSocialParams {
179
+ updates: AccountSocialUpdate[];
180
+ }
181
+ /**
182
+ * Result for individual account social update
183
+ */
184
+ export interface AccountSocialUpdateResult {
185
+ accountId: string;
186
+ success: boolean;
187
+ error?: string;
188
+ }
189
+ /**
190
+ * Response for bulk account social updates
191
+ */
192
+ export interface UpdateAccountSocialResponse {
193
+ message: string;
194
+ successful: number;
195
+ failed: number;
196
+ results: AccountSocialUpdateResult[];
197
+ }
144
198
  export interface DeleteAccountPostsParams {
145
199
  accountIds: string[];
146
200
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ugcinc",
3
- "version": "2.74.1",
3
+ "version": "2.76.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",