ugcinc 4.2.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.
- package/dist/accounts.d.ts +29 -0
- package/dist/accounts.js +15 -0
- package/dist/index.d.ts +2 -2
- package/dist/org.d.ts +9 -0
- package/dist/org.js +7 -0
- package/dist/skills.js +7 -1
- package/dist/tools/accounts.js +10 -0
- package/dist/tools/org.js +8 -0
- package/package.json +1 -1
package/dist/accounts.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import type { ApiResponse } from './types';
|
|
|
3
3
|
export interface Account {
|
|
4
4
|
id: string;
|
|
5
5
|
org_id: string;
|
|
6
|
+
org_name: string | null;
|
|
6
7
|
type: string;
|
|
7
8
|
tag: string | null;
|
|
8
9
|
org_group: string | null;
|
|
@@ -204,6 +205,21 @@ export interface CreateAccountsResponse {
|
|
|
204
205
|
failed: number;
|
|
205
206
|
accounts: CreateAccountResult[];
|
|
206
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
|
+
}
|
|
207
223
|
/**
|
|
208
224
|
* Client for managing accounts
|
|
209
225
|
*/
|
|
@@ -293,4 +309,17 @@ export declare class AccountsClient extends BaseClient {
|
|
|
293
309
|
* });
|
|
294
310
|
*/
|
|
295
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[]>>;
|
|
296
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,11 +25,11 @@ 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';
|
|
32
|
-
export type { ApiKey, DeleteApiKeyParams, EditApiKeyParams, IntegrationKey, IntegrationProvider, UpsertIntegrationKeyParams, DeleteIntegrationKeyParams } from './org';
|
|
32
|
+
export type { Org, ApiKey, DeleteApiKeyParams, EditApiKeyParams, IntegrationKey, IntegrationProvider, UpsertIntegrationKeyParams, DeleteIntegrationKeyParams } from './org';
|
|
33
33
|
export type { UserMedia, MediaUse, SocialAudio, Media, GetMediaParams, GetSocialAudioParams, UploadMediaParams, UploadMediaResponse, MediaTagUpdate, UpdateMediaTagsParams, MediaTagUpdateResult, UpdateMediaTagsResponse, UpdateMediaTagParams, UpdateMediaNameParams, DeleteMediaParams, DeleteMediaResponse, CreateSocialAudioParams, ImportTextParams, ImportTextResponse, CreateMediaFromUrlParams, GetMediaUseParams, GetMediaUseResponse, FilterMediaParams, FilterMediaResponse, GetUploadTokenParams, UploadTokenResponse, } from './media';
|
|
34
34
|
export type { CommentStatus, Comment, CreateCommentParams, CreateCommentResponse, GetCommentsParams, } from './comments';
|
|
35
35
|
export type { BillingInfo, CancelSubscriptionResponse, PortalUrlResponse, DeactivateAccountParams, DeactivateAccountResponse, RequestReplacementParams, RequestReplacementResponse, RequestRefundParams, RequestRefundResponse, BillingRequestInfo, PortalParams, } from './billing';
|
package/dist/org.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { BaseClient } from './base';
|
|
2
2
|
import type { ApiResponse } from './types';
|
|
3
|
+
export interface Org {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string | null;
|
|
6
|
+
}
|
|
3
7
|
export interface ApiKey {
|
|
4
8
|
id: string;
|
|
5
9
|
name: string;
|
|
@@ -33,6 +37,11 @@ export interface DeleteIntegrationKeyParams {
|
|
|
33
37
|
* Client for managing organization resources
|
|
34
38
|
*/
|
|
35
39
|
export declare class OrganizationClient extends BaseClient {
|
|
40
|
+
/**
|
|
41
|
+
* Get organizations linked to your API key
|
|
42
|
+
* Org-scoped key returns the single org; profile-scoped key returns all linked orgs
|
|
43
|
+
*/
|
|
44
|
+
getOrgs(): Promise<ApiResponse<Org[]>>;
|
|
36
45
|
/**
|
|
37
46
|
* Update the organization's name
|
|
38
47
|
* @param params - The new name for the organization
|
package/dist/org.js
CHANGED
|
@@ -6,6 +6,13 @@ const base_1 = require("./base");
|
|
|
6
6
|
* Client for managing organization resources
|
|
7
7
|
*/
|
|
8
8
|
class OrganizationClient extends base_1.BaseClient {
|
|
9
|
+
/**
|
|
10
|
+
* Get organizations linked to your API key
|
|
11
|
+
* Org-scoped key returns the single org; profile-scoped key returns all linked orgs
|
|
12
|
+
*/
|
|
13
|
+
async getOrgs() {
|
|
14
|
+
return this.get('/org');
|
|
15
|
+
}
|
|
9
16
|
/**
|
|
10
17
|
* Update the organization's name
|
|
11
18
|
* @param params - The new name for the organization
|
package/dist/skills.js
CHANGED
|
@@ -18,8 +18,14 @@ Auth: \`npx ugcinc auth <api_key> [--admin]\`. Only needed once. Use \`--admin\`
|
|
|
18
18
|
|
|
19
19
|
## Tools
|
|
20
20
|
|
|
21
|
+
### list_orgs
|
|
22
|
+
List organizations linked to your API key.
|
|
23
|
+
\`\`\`bash
|
|
24
|
+
${run} list_orgs
|
|
25
|
+
\`\`\`
|
|
26
|
+
|
|
21
27
|
### list_accounts
|
|
22
|
-
List accounts with optional filters.
|
|
28
|
+
List accounts with optional filters. Each account includes \`org_name\`.
|
|
23
29
|
\`\`\`bash
|
|
24
30
|
${run} list_accounts
|
|
25
31
|
${run} list_accounts '{"tag":"fitness"}'
|
package/dist/tools/accounts.js
CHANGED
|
@@ -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/dist/tools/org.js
CHANGED
|
@@ -3,6 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.orgTools = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
exports.orgTools = [
|
|
6
|
+
{
|
|
7
|
+
name: 'list_orgs',
|
|
8
|
+
description: 'List organizations linked to your API key. Returns org IDs and names.',
|
|
9
|
+
schema: zod_1.z.object({}).optional(),
|
|
10
|
+
execute: async (client) => {
|
|
11
|
+
return client.org.getOrgs();
|
|
12
|
+
},
|
|
13
|
+
},
|
|
6
14
|
{
|
|
7
15
|
name: 'update_org_name',
|
|
8
16
|
description: 'Update the name of the organization.',
|