ugcinc 4.3.0 → 4.3.1

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.
@@ -205,6 +205,21 @@ export interface CreateAccountsResponse {
205
205
  failed: number;
206
206
  accounts: CreateAccountResult[];
207
207
  }
208
+ export type TroubleshootFailReason = 'proxy_issue';
209
+ export interface TroubleshootAccount {
210
+ id: string;
211
+ username: string | null;
212
+ type: string;
213
+ status: string;
214
+ tag: string | null;
215
+ healthy: boolean;
216
+ fail_reason: TroubleshootFailReason | null;
217
+ failed_tasks: number;
218
+ total_tasks: number;
219
+ }
220
+ export interface TroubleshootParams {
221
+ accountIds?: string[];
222
+ }
208
223
  /**
209
224
  * Client for managing accounts
210
225
  */
@@ -294,4 +309,17 @@ export declare class AccountsClient extends BaseClient {
294
309
  * });
295
310
  */
296
311
  createAccounts(params: CreateAccountsParams): Promise<ApiResponse<CreateAccountsResponse>>;
312
+ /**
313
+ * Troubleshoot active accounts — checks proxy health and task stats
314
+ * Returns a health status and fail reason for each active emulated account
315
+ *
316
+ * @example
317
+ * const response = await client.accounts.troubleshoot();
318
+ *
319
+ * if (response.ok) {
320
+ * const unhealthy = response.data.filter(a => !a.healthy);
321
+ * console.log(`${unhealthy.length} accounts have issues`);
322
+ * }
323
+ */
324
+ troubleshoot(params?: TroubleshootParams): Promise<ApiResponse<TroubleshootAccount[]>>;
297
325
  }
package/dist/accounts.js CHANGED
@@ -107,5 +107,20 @@ class AccountsClient extends base_1.BaseClient {
107
107
  async createAccounts(params) {
108
108
  return this.post('/accounts/create', params);
109
109
  }
110
+ /**
111
+ * Troubleshoot active accounts — checks proxy health and task stats
112
+ * Returns a health status and fail reason for each active emulated account
113
+ *
114
+ * @example
115
+ * const response = await client.accounts.troubleshoot();
116
+ *
117
+ * if (response.ok) {
118
+ * const unhealthy = response.data.filter(a => !a.healthy);
119
+ * console.log(`${unhealthy.length} accounts have issues`);
120
+ * }
121
+ */
122
+ async troubleshoot(params) {
123
+ return this.post('/accounts/troubleshoot', params ?? {});
124
+ }
110
125
  }
111
126
  exports.AccountsClient = AccountsClient;
package/dist/index.d.ts CHANGED
@@ -25,7 +25,7 @@ export type { PortId } from './port-id';
25
25
  export { extractTemplateVariables, processTemplate, substituteVariables } from './automations/utils';
26
26
  export type { InputType } from './automations/nodes/types';
27
27
  export type { ClientConfig } from './base';
28
- export type { Account, AccountStat, AccountTask, EditProfileInfo, GetAccountsParams, GetAccountStatsParams, GetAccountStatusParams, AccountInfoUpdate, UpdateAccountInfoParams, AccountInfoUpdateResult, UpdateAccountInfoResponse, AccountSocialUpdate, UpdateAccountSocialParams, AccountSocialUpdateResult, UpdateAccountSocialResponse, DeleteAccountPostsParams, DeleteAccountPostsResponse, ResetWarmupParams, ResetWarmupResponse, NicheSwitchUpdate, NicheSwitchParams, NicheSwitchResult, NicheSwitchResponse, CreateAccountInput, CreateAccountsParams, CreateAccountResult, CreateAccountsResponse, } from './accounts';
28
+ export type { Account, AccountStat, AccountTask, EditProfileInfo, GetAccountsParams, GetAccountStatsParams, GetAccountStatusParams, AccountInfoUpdate, UpdateAccountInfoParams, AccountInfoUpdateResult, UpdateAccountInfoResponse, AccountSocialUpdate, UpdateAccountSocialParams, AccountSocialUpdateResult, UpdateAccountSocialResponse, DeleteAccountPostsParams, DeleteAccountPostsResponse, ResetWarmupParams, ResetWarmupResponse, NicheSwitchUpdate, NicheSwitchParams, NicheSwitchResult, NicheSwitchResponse, CreateAccountInput, CreateAccountsParams, CreateAccountResult, CreateAccountsResponse, TroubleshootFailReason, TroubleshootAccount, TroubleshootParams, } from './accounts';
29
29
  export type { TaskType, Task, GetTasksParams } from './tasks';
30
30
  export type { PostType, PostStatus, Post, PostStat, GetPostsParams, CreateSlideshowParams, GetPostStatsParams, GetPostStatusParams, CreateVideoParams, UpdatePostParams, DeletePostsParams, DeletePostsResponse, RetryPostsParams, SetPostStatusParams, SetPostStatusResponse, } from './posts';
31
31
  export type { RefreshStatsParams, RefreshStatsError, RefreshStatsResponse, DailyAggregatedStat, GetDailyAggregatedStatsParams, DailyAccountStat, GetDailyAccountStatsParams, DailyPostStat, GetDailyPostStatsParams, DashboardDailyStat, GetDashboardDailyStatsParams, TopAccount, GetTopAccountsParams, TopPost, GetTopPostsParams, } from './stats';
@@ -124,4 +124,14 @@ exports.accountTools = [
124
124
  return client.accounts.createAccounts(params);
125
125
  },
126
126
  },
127
+ {
128
+ name: 'troubleshoot_accounts',
129
+ description: 'Check health of active accounts. Returns whether each account is healthy and a fail_reason if not. Currently detects proxy_issue (proxy is down or missing).',
130
+ schema: zod_1.z.object({
131
+ accountIds: zod_1.z.array(zod_1.z.string()).optional().describe('Specific account IDs to check. If omitted, checks all active accounts.'),
132
+ }).optional(),
133
+ execute: async (client, params) => {
134
+ return client.accounts.troubleshoot(params ?? undefined);
135
+ },
136
+ },
127
137
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ugcinc",
3
- "version": "4.3.0",
3
+ "version": "4.3.1",
4
4
  "description": "TypeScript/JavaScript client for the UGC Inc API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",