@myapihq/cli 2.16.1 → 2.16.2
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/commands/account.d.ts +1 -0
- package/dist/commands/account.js +1 -1
- package/dist/commands/audience.d.ts +1 -0
- package/dist/commands/audience.js +1 -1
- package/dist/commands/authproduct.d.ts +1 -0
- package/dist/commands/authproduct.js +1 -1
- package/dist/commands/billing.d.ts +1 -0
- package/dist/commands/billing.js +1 -1
- package/dist/commands/company.d.ts +1 -0
- package/dist/commands/company.js +1 -1
- package/dist/commands/container.d.ts +1 -0
- package/dist/commands/container.js +1 -1
- package/dist/commands/crm/companies.d.ts +1 -0
- package/dist/commands/crm/companies.js +1 -1
- package/dist/commands/crm/contacts.d.ts +1 -0
- package/dist/commands/crm/contacts.js +1 -1
- package/dist/commands/database.d.ts +1 -0
- package/dist/commands/database.js +1 -1
- package/dist/commands/domain.d.ts +1 -0
- package/dist/commands/domain.js +1 -1
- package/dist/commands/feedback.d.ts +1 -0
- package/dist/commands/feedback.js +1 -1
- package/dist/commands/fn.d.ts +1 -0
- package/dist/commands/fn.js +1 -1
- package/dist/commands/funnel.d.ts +1 -0
- package/dist/commands/funnel.js +1 -1
- package/dist/commands/git.d.ts +1 -0
- package/dist/commands/git.js +1 -1
- package/dist/commands/image.d.ts +1 -0
- package/dist/commands/image.js +1 -1
- package/dist/commands/llm.d.ts +1 -0
- package/dist/commands/llm.js +1 -1
- package/dist/commands/manifest.d.ts +17 -0
- package/dist/commands/manifest.js +149 -0
- package/dist/commands/manifest.test.d.ts +1 -0
- package/dist/commands/manifest.test.js +60 -0
- package/dist/commands/org.d.ts +1 -0
- package/dist/commands/org.js +1 -1
- package/dist/commands/payments.d.ts +1 -0
- package/dist/commands/payments.js +1 -1
- package/dist/commands/people.d.ts +1 -0
- package/dist/commands/people.js +1 -1
- package/dist/commands/pixel.d.ts +1 -0
- package/dist/commands/pixel.js +1 -1
- package/dist/commands/queue.d.ts +1 -0
- package/dist/commands/queue.js +1 -1
- package/dist/commands/storage.d.ts +1 -0
- package/dist/commands/storage.js +1 -1
- package/dist/commands/task.d.ts +1 -0
- package/dist/commands/task.js +1 -1
- package/dist/commands/url.d.ts +1 -0
- package/dist/commands/url.js +1 -1
- package/dist/commands/webhook.d.ts +1 -0
- package/dist/commands/webhook.js +1 -1
- package/dist/commands/workflow.d.ts +1 -0
- package/dist/commands/workflow.js +1 -1
- package/dist/exposes.test.js +1 -0
- package/dist/index.js +8 -0
- package/dist/skills/my-domain-api/SKILL.md +3 -2
- package/dist/skills/my-image-api/SKILL.md +3 -2
- package/dist/skills/my-queue-api/SKILL.md +3 -2
- package/dist/skills/my-webhook-api/SKILL.md +3 -2
- package/package.json +2 -2
|
@@ -5,6 +5,7 @@ export declare const EXPOSES: Exposes;
|
|
|
5
5
|
export declare const SCHEMA: FlagSchema;
|
|
6
6
|
export declare const HELP = "Usage: myapi account <subcommand>\n\nSubcommands:\n api-keys Manage API keys \u00B7 list / create / revoke\n config Manage CLI defaults (org, funnel, domain) \u00B7 supports set-org / set-funnel / set-domain\n import-key Import an existing API key non-interactively\n install-skills DEPRECATED \u2014 use `myapi install-skills` instead\n keys Alias for api-keys\n link [email] Upgrade anonymous account to registered (or add a second session)\n Use myapi account setup to create a completely new account\n login Sign in via your browser \u2014 Google or email code (preview: --mock)\n mailing-address Get or set the account's mailing address (CAN-SPAM)\n registrant Manage stored WHOIS contact info for domain registration \u00B7 set / get / clear\n setup Configure your account\n switch [index] Switch active account by index or email\n whoami Show current account \u00B7 supports --json";
|
|
7
7
|
export declare const INSTALL_SKILLS_HELP = "Usage: myapi install-skills\n\nInstalls the MyAPI skills pack for AI coding agents (Claude, Codex, Gemini, \u2026).\n\nThis command writes skill definition files to:\n ~/.agents/skills/myapi/\n\nAnd creates symlinks in the appropriate agent config directories:\n ~/.claude/ (Claude)\n ~/.gemini/ (Gemini)\n ~/.cursor/ (Cursor, if detected)\n\nThese files teach agents how to use the MyAPI CLI and API directly.\nRun this command again to update existing skills to the latest version.\n\nNote: `myapi account install-skills` is deprecated and will be removed in the next minor.\nUse `myapi install-skills` going forward.";
|
|
8
|
+
export declare const SUBCOMMAND_USAGE: Record<string, string>;
|
|
8
9
|
export declare function link(flags?: Flags, emailArg?: string): Promise<void>;
|
|
9
10
|
export declare function whoami(flags?: Flags): Promise<void>;
|
|
10
11
|
export declare function switchCmd(flags?: Flags, indexArg?: string): Promise<void>;
|
package/dist/commands/account.js
CHANGED
|
@@ -115,7 +115,7 @@ Subcommands:
|
|
|
115
115
|
get Print the stored registrant (or "not set").
|
|
116
116
|
set Interactive prompt for all fields. Or pass --registrant-json
|
|
117
117
|
'<json>' to set non-interactively (agent-friendly).`;
|
|
118
|
-
const SUBCOMMAND_USAGE = {
|
|
118
|
+
export const SUBCOMMAND_USAGE = {
|
|
119
119
|
'mailing-address': `myapi account mailing-address Show current value (null if unset)
|
|
120
120
|
myapi account mailing-address "<address>" Set the mailing address
|
|
121
121
|
|
|
@@ -3,4 +3,5 @@ import { type Flags } from '../helpers.js';
|
|
|
3
3
|
import type { Exposes } from '../exposes.js';
|
|
4
4
|
export declare const EXPOSES: Exposes;
|
|
5
5
|
export declare const SCHEMA: FlagSchema;
|
|
6
|
+
export declare const SUBCOMMAND_USAGE: Record<string, string>;
|
|
6
7
|
export declare function run(subcommand: string | undefined, args: string[], flags: Flags): Promise<void>;
|
|
@@ -169,7 +169,7 @@ async function refresh(id, flags) {
|
|
|
169
169
|
const sign = res.delta > 0 ? '+' : '';
|
|
170
170
|
success(`Refreshed. ${res.previous} → ${res.total} (${sign}${res.delta})`);
|
|
171
171
|
}
|
|
172
|
-
const SUBCOMMAND_USAGE = {
|
|
172
|
+
export const SUBCOMMAND_USAGE = {
|
|
173
173
|
'create': `myapi audience create <name> --from <people|company> --filter <json> [--description <text>] [--org <id>]
|
|
174
174
|
|
|
175
175
|
The Goldfox filter shape is shared across people/company/audience:
|
|
@@ -3,5 +3,6 @@ import { type Flags } from '../helpers.js';
|
|
|
3
3
|
import type { Exposes } from '../exposes.js';
|
|
4
4
|
export declare const SCHEMA: FlagSchema;
|
|
5
5
|
export declare const EXPOSES: Exposes;
|
|
6
|
+
export declare const SUBCOMMAND_USAGE: Record<string, string>;
|
|
6
7
|
export declare const HELP = "Usage: myapi auth <subcommand>\n\nAuthentication for your app's end users \u2014 a managed OIDC identity provider\n(\u00E0 la Kinde/Auth0). One auth tenant per org; register OIDC clients (apps)\nagainst it; sign users in via the hosted login page or the JS SDK; verify\ntokens locally against the tenant JWKS.\n\nEnd users sign in with managed Google, email/password, or magic links \u2014 pick\nwhich via `tenant create --connections`. (Operator/account commands moved to\n`myapi account`.)\n\nSubcommands:\n client Register, list, delete, and rotate OIDC clients (your apps)\n domain Serve auth on your own domain (auth.acme.com)\n tenant Show or create your org's OIDC auth tenant (+ sign-in methods)\n usage Monthly active users (MAU) for the current period";
|
|
7
8
|
export declare function run(subcommand: string | undefined, args: string[], flags: Flags): Promise<void>;
|
|
@@ -29,7 +29,7 @@ export const EXPOSES = [
|
|
|
29
29
|
'POST /auth/orgs/{org_id}/domain/verify',
|
|
30
30
|
'DELETE /auth/orgs/{org_id}/domain',
|
|
31
31
|
];
|
|
32
|
-
const SUBCOMMAND_USAGE = {
|
|
32
|
+
export const SUBCOMMAND_USAGE = {
|
|
33
33
|
'tenant': `myapi auth tenant [show|create] [--connections <list>] [--theme <json>] [--org <id>] [--json]
|
|
34
34
|
|
|
35
35
|
Your org's OIDC auth tenant — the identity provider your app's end users sign
|
|
@@ -4,6 +4,7 @@ import type { Flags } from '../helpers.js';
|
|
|
4
4
|
import type { Exposes } from '../exposes.js';
|
|
5
5
|
export declare const SCHEMA: FlagSchema;
|
|
6
6
|
export declare const EXPOSES: Exposes;
|
|
7
|
+
export declare const SUBCOMMAND_USAGE: Record<string, string>;
|
|
7
8
|
export declare function run(subcommand: string | undefined, args: string[], flags: Flags): Promise<void>;
|
|
8
9
|
export declare function balance(flags: Flags): Promise<void>;
|
|
9
10
|
export declare function history(flags: Flags): Promise<void>;
|
package/dist/commands/billing.js
CHANGED
|
@@ -21,7 +21,7 @@ export const EXPOSES = [
|
|
|
21
21
|
'PUT /hq/billing/auto-recharge',
|
|
22
22
|
'DELETE /hq/billing/auto-recharge',
|
|
23
23
|
];
|
|
24
|
-
const SUBCOMMAND_USAGE = {
|
|
24
|
+
export const SUBCOMMAND_USAGE = {
|
|
25
25
|
'auto-recharge': `myapi billing auto-recharge [show | set | disable]
|
|
26
26
|
|
|
27
27
|
Keep the prepaid wallet funded without a human in the loop: when the balance
|
|
@@ -3,4 +3,5 @@ import { type Flags } from '../helpers.js';
|
|
|
3
3
|
import type { Exposes } from '../exposes.js';
|
|
4
4
|
export declare const EXPOSES: Exposes;
|
|
5
5
|
export declare const SCHEMA: FlagSchema;
|
|
6
|
+
export declare const SUBCOMMAND_USAGE: Record<string, string>;
|
|
6
7
|
export declare function run(subcommand: string | undefined, args: string[], flags: Flags): Promise<void>;
|
package/dist/commands/company.js
CHANGED
|
@@ -97,7 +97,7 @@ async function get(companyId, flags) {
|
|
|
97
97
|
const res = await sdkCompany.getCompany(config.api_key, orgId, companyId, includePeople);
|
|
98
98
|
printJson(res);
|
|
99
99
|
}
|
|
100
|
-
const SUBCOMMAND_USAGE = {
|
|
100
|
+
export const SUBCOMMAND_USAGE = {
|
|
101
101
|
'search': `myapi company search [--confidence <csv>] [--country <csv>] [--country-consistent]
|
|
102
102
|
[--tld-class <csv>] [--has-c-level] [--has-careers-page]
|
|
103
103
|
[--has-decision-maker] [--has-investors-page] [--has-shop-page]
|
|
@@ -21,4 +21,5 @@ export declare function rollback(id: string, flags: Flags): Promise<void>;
|
|
|
21
21
|
export declare function logs(id: string, flags: Flags): Promise<void>;
|
|
22
22
|
export declare function domain(id: string, domainArg: string | undefined, flags: Flags): Promise<void>;
|
|
23
23
|
export declare function buildLogs(id: string | undefined, flags: Flags): Promise<void>;
|
|
24
|
+
export declare const SUBCOMMAND_USAGE: Record<string, string>;
|
|
24
25
|
export declare function run(subcommand: string | undefined, args: string[], flags: Flags): Promise<void>;
|
|
@@ -570,7 +570,7 @@ export async function buildLogs(id, flags) {
|
|
|
570
570
|
info(l);
|
|
571
571
|
}
|
|
572
572
|
// ── Dispatcher ───────────────────────────────────────────────────────────────
|
|
573
|
-
const SUBCOMMAND_USAGE = {
|
|
573
|
+
export const SUBCOMMAND_USAGE = {
|
|
574
574
|
'create': `myapi container create --name <name> [--type service|worker|job] [--cron <expr>]
|
|
575
575
|
[--cpu <n>] [--memory <size>] [--min-instances <n>]
|
|
576
576
|
[--max-instances <n>] [--port <n>] [--env K=V,...] [--org <id>]
|
|
@@ -3,4 +3,5 @@ import { type Flags } from '../../helpers.js';
|
|
|
3
3
|
import type { Exposes } from '../../exposes.js';
|
|
4
4
|
export declare const EXPOSES: Exposes;
|
|
5
5
|
export declare const SCHEMA: FlagSchema;
|
|
6
|
+
export declare const SUBCOMMAND_USAGE: Record<string, string>;
|
|
6
7
|
export declare function run(subcommand: string | undefined, args: string[], flags: Flags): Promise<void>;
|
|
@@ -142,7 +142,7 @@ async function promote(domain, flags) {
|
|
|
142
142
|
success(`Promoted ${c.domain} → ${c.id}`);
|
|
143
143
|
}
|
|
144
144
|
// ── Dispatcher ──────────────────────────────────────────────────────────
|
|
145
|
-
const SUBCOMMAND_USAGE = {
|
|
145
|
+
export const SUBCOMMAND_USAGE = {
|
|
146
146
|
list: 'myapi crm companies list [--limit N] [--offset N] [--org <id>] [--json]',
|
|
147
147
|
search: `myapi crm companies search [--stage <csv>] [--origin <csv>] [--domain <d>]
|
|
148
148
|
[--include-deleted] [--limit N] [--offset N] [--org <id>] [--json]
|
|
@@ -3,4 +3,5 @@ import { type Flags } from '../../helpers.js';
|
|
|
3
3
|
import type { Exposes } from '../../exposes.js';
|
|
4
4
|
export declare const EXPOSES: Exposes;
|
|
5
5
|
export declare const SCHEMA: FlagSchema;
|
|
6
|
+
export declare const SUBCOMMAND_USAGE: Record<string, string>;
|
|
6
7
|
export declare function run(subcommand: string | undefined, args: string[], flags: Flags): Promise<void>;
|
|
@@ -177,7 +177,7 @@ async function events(id, flags) {
|
|
|
177
177
|
info(`\n— More — pass --cursor "${res.next_cursor}" to continue`);
|
|
178
178
|
}
|
|
179
179
|
// ── Dispatcher ──────────────────────────────────────────────────────────
|
|
180
|
-
const SUBCOMMAND_USAGE = {
|
|
180
|
+
export const SUBCOMMAND_USAGE = {
|
|
181
181
|
list: 'myapi crm contacts list [--limit N] [--offset N] [--org <id>] [--json]',
|
|
182
182
|
search: `myapi crm contacts search [--stage <csv>] [--origin <csv>] [--email <e>]
|
|
183
183
|
[--company-id <id>] [--min-last-engagement-days N] [--max-last-engagement-days N]
|
|
@@ -3,4 +3,5 @@ import { type Flags } from '../helpers.js';
|
|
|
3
3
|
import type { Exposes } from '../exposes.js';
|
|
4
4
|
export declare const EXPOSES: Exposes;
|
|
5
5
|
export declare const SCHEMA: FlagSchema;
|
|
6
|
+
export declare const SUBCOMMAND_USAGE: Record<string, string>;
|
|
6
7
|
export declare function run(subcommand: string | undefined, args: string[], flags: Flags): Promise<void>;
|
|
@@ -192,7 +192,7 @@ async function keyDel(key, flags) {
|
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
194
|
// ── Dispatcher ───────────────────────────────────────────────────────────
|
|
195
|
-
const SUBCOMMAND_USAGE = {
|
|
195
|
+
export const SUBCOMMAND_USAGE = {
|
|
196
196
|
'namespaces': 'myapi database namespaces [--org <id>] [--json]',
|
|
197
197
|
'create': 'myapi database create <name> [--org <id>]',
|
|
198
198
|
'delete-namespace': `myapi database delete-namespace <name> [--org <id>]
|
|
@@ -30,4 +30,5 @@ export declare function retryProvisioning(domainArg: string, flags: Flags): Prom
|
|
|
30
30
|
export declare function mailServerResync(domainArg: string, flags: Flags): Promise<void>;
|
|
31
31
|
export declare function settings(domainArg: string, flags: Flags): Promise<void>;
|
|
32
32
|
export declare function updateSettings(domainArg: string, flags: Flags): Promise<void>;
|
|
33
|
+
export declare const SUBCOMMAND_USAGE: Record<string, string>;
|
|
33
34
|
export declare function run(subcommand: string | undefined, args: string[], flags: Flags): Promise<void>;
|
package/dist/commands/domain.js
CHANGED
|
@@ -568,7 +568,7 @@ async function recordsRun(sub, args, flags) {
|
|
|
568
568
|
}
|
|
569
569
|
}
|
|
570
570
|
// ── Dispatcher ───────────────────────────────────────────────────────────────
|
|
571
|
-
const SUBCOMMAND_USAGE = {
|
|
571
|
+
export const SUBCOMMAND_USAGE = {
|
|
572
572
|
'list': `myapi domain list [--filter=all|unassigned|org] [--org <id>] [--json]
|
|
573
573
|
|
|
574
574
|
--filter=all All domains owned by the account.
|
|
@@ -8,4 +8,5 @@ export declare function create(bodyArg: string | undefined, flags: Flags): Promi
|
|
|
8
8
|
export declare function resolve(id: string, flags: Flags): Promise<void>;
|
|
9
9
|
export declare function del(id: string | undefined, flags: Flags): Promise<void>;
|
|
10
10
|
export declare function widget(sub: string | undefined, arg: string | undefined, flags: Flags): Promise<void>;
|
|
11
|
+
export declare const SUBCOMMAND_USAGE: Record<string, string>;
|
|
11
12
|
export declare function run(subcommand: string | undefined, args: string[], flags: Flags): Promise<void>;
|
|
@@ -284,7 +284,7 @@ export async function widget(sub, arg, flags) {
|
|
|
284
284
|
}
|
|
285
285
|
error('Usage: myapi feedback widget create <name> [--origins <list>]\n myapi feedback widget list\n myapi feedback widget update <id> [--routes <list>] [--origins <list>]\n myapi feedback widget revoke <id>');
|
|
286
286
|
}
|
|
287
|
-
const SUBCOMMAND_USAGE = {
|
|
287
|
+
export const SUBCOMMAND_USAGE = {
|
|
288
288
|
'delete': `myapi feedback delete <id> [--yes] [--org <id>]
|
|
289
289
|
|
|
290
290
|
Erases an item. \`resolve\` closes one and keeps it; this removes it — for spam,
|
package/dist/commands/fn.d.ts
CHANGED
|
@@ -15,4 +15,5 @@ export declare function _parseSetPairs(raw: string | string[]): Record<string, s
|
|
|
15
15
|
export declare function scopes(id: string | undefined, flags: Flags): Promise<void>;
|
|
16
16
|
export declare function setEnv(id: string, name: string, value: string, flags: Flags): Promise<void>;
|
|
17
17
|
export declare function runs(id: string, flags: Flags): Promise<void>;
|
|
18
|
+
export declare const SUBCOMMAND_USAGE: Record<string, string>;
|
|
18
19
|
export declare function run(subcommand: string | undefined, args: string[], flags: Flags): Promise<void>;
|
package/dist/commands/fn.js
CHANGED
|
@@ -320,7 +320,7 @@ export async function runs(id, flags) {
|
|
|
320
320
|
});
|
|
321
321
|
}
|
|
322
322
|
// ── Dispatcher ───────────────────────────────────────────────────────────────
|
|
323
|
-
const SUBCOMMAND_USAGE = {
|
|
323
|
+
export const SUBCOMMAND_USAGE = {
|
|
324
324
|
'create': `myapi fn create --name <name> [--cron <expr>] [--scope <slot>[,<slot>...]] [--org <id>]
|
|
325
325
|
|
|
326
326
|
Persists a function record + issues a scoped API key. Deploy code separately
|
|
@@ -24,4 +24,5 @@ export declare function push(slug: string, flags: Flags): Promise<void>;
|
|
|
24
24
|
export declare function formCmd(funnelArg: string | undefined, flags: Flags): Promise<void>;
|
|
25
25
|
export declare function verify(slug: string, flags: Flags): Promise<void>;
|
|
26
26
|
export declare function publish(dir: string, flags: Flags): Promise<void>;
|
|
27
|
+
export declare const SUBCOMMAND_USAGE: Record<string, string>;
|
|
27
28
|
export declare function run(subcommand: string | undefined, args: string[], flags: Flags): Promise<void>;
|
package/dist/commands/funnel.js
CHANGED
|
@@ -614,7 +614,7 @@ Publishing to the prod channel replaces the entire live site.
|
|
|
614
614
|
info(`Live: ${result.published_url}`);
|
|
615
615
|
}
|
|
616
616
|
// ── Dispatcher ───────────────────────────────────────────────────────────────
|
|
617
|
-
const SUBCOMMAND_USAGE = {
|
|
617
|
+
export const SUBCOMMAND_USAGE = {
|
|
618
618
|
'create': 'myapi funnel create [--name <name>] [--org <id>]',
|
|
619
619
|
'delete': 'myapi funnel delete <id> [--org <id>]',
|
|
620
620
|
'form': `myapi funnel form [funnel-id] [--slug <slug>] [--fields <spec>]
|
package/dist/commands/git.d.ts
CHANGED
|
@@ -19,4 +19,5 @@ export declare function deleteBranch(repo: string, branch: string, flags: Flags)
|
|
|
19
19
|
export declare function tag(repo: string, name: string, flags: Flags): Promise<void>;
|
|
20
20
|
export declare function merge(repo: string, flags: Flags): Promise<void>;
|
|
21
21
|
export declare function repack(repo: string, flags: Flags): Promise<void>;
|
|
22
|
+
export declare const SUBCOMMAND_USAGE: Record<string, string>;
|
|
22
23
|
export declare function run(subcommand: string | undefined, args: string[], flags: Flags): Promise<void>;
|
package/dist/commands/git.js
CHANGED
|
@@ -345,7 +345,7 @@ export async function repack(repo, flags) {
|
|
|
345
345
|
info(`Packs: ${res.packs_before} → ${res.packs_after} · ${res.objects} objects`);
|
|
346
346
|
}
|
|
347
347
|
// ── Dispatcher ───────────────────────────────────────────────────────────────
|
|
348
|
-
const SUBCOMMAND_USAGE = {
|
|
348
|
+
export const SUBCOMMAND_USAGE = {
|
|
349
349
|
'create': 'myapi git create <name> [--default-branch <b>] [--org <id>]',
|
|
350
350
|
'list': 'myapi git list [--org <id>] [--json]',
|
|
351
351
|
'get': 'myapi git get <repo> [--org <id>] [--json]',
|
package/dist/commands/image.d.ts
CHANGED
|
@@ -3,4 +3,5 @@ import { type Flags } from '../helpers.js';
|
|
|
3
3
|
import type { Exposes } from '../exposes.js';
|
|
4
4
|
export declare const EXPOSES: Exposes;
|
|
5
5
|
export declare const SCHEMA: FlagSchema;
|
|
6
|
+
export declare const SUBCOMMAND_USAGE: Record<string, string>;
|
|
6
7
|
export declare function run(subcommand: string | undefined, args: string[], flags: Flags): Promise<void>;
|
package/dist/commands/image.js
CHANGED
|
@@ -153,7 +153,7 @@ async function models(flags) {
|
|
|
153
153
|
})), { flags, empty: 'No image models available.' });
|
|
154
154
|
}
|
|
155
155
|
// ── Dispatcher ───────────────────────────────────────────────────────────────
|
|
156
|
-
const SUBCOMMAND_USAGE = {
|
|
156
|
+
export const SUBCOMMAND_USAGE = {
|
|
157
157
|
'list': 'myapi image list [--org <id>] [--json]',
|
|
158
158
|
'generate': `myapi image generate <prompt> [--model <id>] [--ratio 1:1|16:9|9:16|4:3|3:4] [--style <s>] [--colors <hex,hex>] [--text] [--org <id>]
|
|
159
159
|
myapi image generate --prompt "<text>" ...
|
package/dist/commands/llm.d.ts
CHANGED
|
@@ -4,4 +4,5 @@ import type { Exposes } from '../exposes.js';
|
|
|
4
4
|
export declare const EXPOSES: Exposes;
|
|
5
5
|
export declare const SCHEMA: FlagSchema;
|
|
6
6
|
export declare function _parseJsonObjectFlag(raw: unknown, flagName: string): Record<string, unknown> | undefined;
|
|
7
|
+
export declare const SUBCOMMAND_USAGE: Record<string, string>;
|
|
7
8
|
export declare function run(subcommand: string | undefined, args: string[], flags: Flags): Promise<void>;
|
package/dist/commands/llm.js
CHANGED
|
@@ -314,7 +314,7 @@ async function draft(inputArg, flags) {
|
|
|
314
314
|
printVerbFooter(res.usage);
|
|
315
315
|
}
|
|
316
316
|
// ── help ─────────────────────────────────────────────────────────────────
|
|
317
|
-
const SUBCOMMAND_USAGE = {
|
|
317
|
+
export const SUBCOMMAND_USAGE = {
|
|
318
318
|
complete: `myapi llm complete "<prompt>" [--model <id>]
|
|
319
319
|
[--system "<system msg>"] [--max-tokens N] [--temperature 0..1]
|
|
320
320
|
[--stop <csv>] [--file <path>] [--org <id>] [--json]
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Exposes } from '../exposes.js';
|
|
2
|
+
export declare const EXPOSES: Exposes;
|
|
3
|
+
export interface CommandPath {
|
|
4
|
+
/** Space-joined path after the binary, e.g. "email mailbox create". */
|
|
5
|
+
path: string;
|
|
6
|
+
/** The command's own usage line, when it publishes one. */
|
|
7
|
+
usage?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface Manifest {
|
|
10
|
+
binary: string;
|
|
11
|
+
version: string;
|
|
12
|
+
paths: CommandPath[];
|
|
13
|
+
/** Disagreements between the two sources. Non-empty means this file lies. */
|
|
14
|
+
warnings: string[];
|
|
15
|
+
}
|
|
16
|
+
export declare function buildManifest(version: string): Promise<Manifest>;
|
|
17
|
+
export declare function run(version: string, flags: Record<string, unknown>): Promise<void>;
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
// `myapi __commands` — the CLI's own list of what it can be asked to do.
|
|
2
|
+
//
|
|
3
|
+
// WHY THIS EXISTS
|
|
4
|
+
//
|
|
5
|
+
// myapihq.com, mydomainapi.com and myemailapi.com each spent months telling
|
|
6
|
+
// visitors to install an npm package that 404s (`myapihq`, `mydomainapi`,
|
|
7
|
+
// `myemailapi`) and to run a binary that has never existed (`myapihq login`;
|
|
8
|
+
// it is `myapi`). Every command on those pages was unrunnable. Nothing
|
|
9
|
+
// noticed, because the pages live in a different repo from the CLI and
|
|
10
|
+
// nothing connected the two.
|
|
11
|
+
//
|
|
12
|
+
// A checker in that repo needs one thing: an authoritative answer to "is
|
|
13
|
+
// `myapi domain records list` a real command?". The obvious way to get it —
|
|
14
|
+
// run `myapi <path> --help` and look for an error — does not work:
|
|
15
|
+
//
|
|
16
|
+
// $ myapi domain bogus --help # exit 0, "Unknown subcommand"
|
|
17
|
+
// $ myapi domain records bogus --help # exit 0, prints the records help
|
|
18
|
+
//
|
|
19
|
+
// Exit codes do not distinguish, and at depth three the help text does not
|
|
20
|
+
// either. A probe-based checker would pass on a typo and report success,
|
|
21
|
+
// which is the failure this whole exercise is about. So the CLI states its
|
|
22
|
+
// command list outright, in a form another program can read.
|
|
23
|
+
//
|
|
24
|
+
// The output is a flat list of paths on purpose: a checker asks "does this
|
|
25
|
+
// string start with a known path", which is a set lookup, not a tree walk.
|
|
26
|
+
import * as fs from 'node:fs';
|
|
27
|
+
import * as path from 'node:path';
|
|
28
|
+
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
29
|
+
import { COMMANDS, SUBCOMMANDS } from '../completion.js';
|
|
30
|
+
// Reads the CLI's own dist directory and nothing else — no network, no auth.
|
|
31
|
+
// That is what lets the site checker run it against the published package
|
|
32
|
+
// without credentials.
|
|
33
|
+
export const EXPOSES = [];
|
|
34
|
+
const HERE = path.dirname(fileURLToPath(import.meta.url));
|
|
35
|
+
// Modules whose filename is not the command that reaches them. Anything else
|
|
36
|
+
// unmapped becomes a warning rather than being dropped — a command silently
|
|
37
|
+
// missing from this list would make the checker reject a valid command, and
|
|
38
|
+
// "your marketing page is wrong" is an expensive thing to be wrong about.
|
|
39
|
+
const MODULE_ALIAS = {
|
|
40
|
+
authproduct: 'auth',
|
|
41
|
+
};
|
|
42
|
+
// Commands implemented inline in index.ts, with no module of their own.
|
|
43
|
+
const INLINE = new Set(['completion', 'help', 'install-skills', 'whoami', 'login', 'setup', 'status', 'update', 'doctor']);
|
|
44
|
+
async function usageMapFor(file) {
|
|
45
|
+
const mod = await import(pathToFileURL(file).href).catch(() => null);
|
|
46
|
+
const usage = mod?.SUBCOMMAND_USAGE;
|
|
47
|
+
return usage && typeof usage === 'object' ? usage : null;
|
|
48
|
+
}
|
|
49
|
+
// Shipped code runs from dist/ (.js); the test suite runs the sources (.ts).
|
|
50
|
+
// Matching only .js made the enrichment pass find nothing under vitest and
|
|
51
|
+
// return a manifest with every path present and not one usage string — no
|
|
52
|
+
// error, no warning, just quietly less than it claimed.
|
|
53
|
+
const MODULE_RE = /\.(js|ts)$/;
|
|
54
|
+
const isModule = (name) => MODULE_RE.test(name) && !name.endsWith('.test.js') && !name.endsWith('.test.ts') && !name.endsWith('.d.ts');
|
|
55
|
+
export async function buildManifest(version) {
|
|
56
|
+
const paths = [];
|
|
57
|
+
const warnings = [];
|
|
58
|
+
const seen = new Set();
|
|
59
|
+
const byPath = new Map();
|
|
60
|
+
const add = (p, usage) => {
|
|
61
|
+
const existing = byPath.get(p);
|
|
62
|
+
if (existing) {
|
|
63
|
+
// The completion tables are walked first and carry no usage strings, so
|
|
64
|
+
// a plain `return` here would mean every usage string is silently
|
|
65
|
+
// dropped — the manifest still looked complete, which is the exact
|
|
66
|
+
// shape of bug this file exists to prevent.
|
|
67
|
+
if (usage && !existing.usage)
|
|
68
|
+
existing.usage = usage;
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
seen.add(p);
|
|
72
|
+
const entry = usage ? { path: p, usage } : { path: p };
|
|
73
|
+
byPath.set(p, entry);
|
|
74
|
+
paths.push(entry);
|
|
75
|
+
};
|
|
76
|
+
// Spine: the completion tables. They are the one place that already had to
|
|
77
|
+
// enumerate every command, and a smoke test fails if `myapi --help` lists a
|
|
78
|
+
// top-level command they omit.
|
|
79
|
+
for (const cmd of COMMANDS)
|
|
80
|
+
add(cmd);
|
|
81
|
+
for (const [cmd, subs] of Object.entries(SUBCOMMANDS)) {
|
|
82
|
+
if (!COMMANDS.includes(cmd))
|
|
83
|
+
warnings.push(`SUBCOMMANDS has "${cmd}", which is not in COMMANDS`);
|
|
84
|
+
for (const sub of subs)
|
|
85
|
+
add(`${cmd} ${sub}`);
|
|
86
|
+
}
|
|
87
|
+
// Enrichment: usage strings, and the third level. `email mailbox create` is
|
|
88
|
+
// real and the completion tables stop one level above it.
|
|
89
|
+
for (const entry of fs.readdirSync(HERE, { withFileTypes: true })) {
|
|
90
|
+
if (entry.isDirectory()) {
|
|
91
|
+
const ns = entry.name;
|
|
92
|
+
if (!COMMANDS.includes(ns)) {
|
|
93
|
+
warnings.push(`command directory "${ns}" is not in COMMANDS`);
|
|
94
|
+
continue;
|
|
95
|
+
}
|
|
96
|
+
for (const f of fs.readdirSync(path.join(HERE, ns))) {
|
|
97
|
+
if (!isModule(f))
|
|
98
|
+
continue;
|
|
99
|
+
const group = f.replace(MODULE_RE, '');
|
|
100
|
+
const usage = await usageMapFor(path.join(HERE, ns, f));
|
|
101
|
+
if (!usage)
|
|
102
|
+
continue;
|
|
103
|
+
if (group === 'index') {
|
|
104
|
+
for (const [sub, u] of Object.entries(usage))
|
|
105
|
+
add(`${ns} ${sub}`, u);
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
add(`${ns} ${group}`);
|
|
109
|
+
for (const [sub, u] of Object.entries(usage))
|
|
110
|
+
add(`${ns} ${group} ${sub}`, u);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
continue;
|
|
114
|
+
}
|
|
115
|
+
if (!isModule(entry.name))
|
|
116
|
+
continue;
|
|
117
|
+
const base = entry.name.replace(MODULE_RE, '');
|
|
118
|
+
const cmd = MODULE_ALIAS[base] ?? base;
|
|
119
|
+
const usage = await usageMapFor(path.join(HERE, entry.name));
|
|
120
|
+
if (!usage)
|
|
121
|
+
continue;
|
|
122
|
+
if (!COMMANDS.includes(cmd)) {
|
|
123
|
+
// Not fatal: `verify.js` backs `email verify`, not a top-level command.
|
|
124
|
+
if (!INLINE.has(cmd))
|
|
125
|
+
warnings.push(`module "${base}.js" publishes subcommands but "${cmd}" is not a top-level command`);
|
|
126
|
+
continue;
|
|
127
|
+
}
|
|
128
|
+
for (const [sub, u] of Object.entries(usage))
|
|
129
|
+
add(`${cmd} ${sub}`, u);
|
|
130
|
+
}
|
|
131
|
+
// The spine alone always yields a plausible-looking manifest, so "the
|
|
132
|
+
// enrichment pass found nothing" is invisible unless it is stated. It means
|
|
133
|
+
// the walk is looking in the wrong place — and a checker trusting a manifest
|
|
134
|
+
// that is quietly missing a level will call correct copy wrong.
|
|
135
|
+
if (!paths.some(p => p.usage)) {
|
|
136
|
+
warnings.push(`no command modules found under ${HERE} — the manifest covers only the completion tables`);
|
|
137
|
+
}
|
|
138
|
+
paths.sort((a, b) => a.path.localeCompare(b.path));
|
|
139
|
+
return { binary: 'myapi', version, paths, warnings };
|
|
140
|
+
}
|
|
141
|
+
export async function run(version, flags) {
|
|
142
|
+
const manifest = await buildManifest(version);
|
|
143
|
+
if (flags.json === false) {
|
|
144
|
+
for (const p of manifest.paths)
|
|
145
|
+
console.log(p.path);
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
console.log(JSON.stringify(manifest, null, 2));
|
|
149
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
// The manifest is consumed by a checker in another repo (myapi-hq) that
|
|
2
|
+
// decides whether the marketing sites advertise commands that exist. Two ways
|
|
3
|
+
// it can do harm, and a test for each:
|
|
4
|
+
//
|
|
5
|
+
// - claiming a real command is unknown → CI fails on correct copy, and the
|
|
6
|
+
// next person deletes the check rather than debug it;
|
|
7
|
+
// - claiming an unknown command is real → the thing it was built to catch
|
|
8
|
+
// walks straight past it, which is how three domains spent months telling
|
|
9
|
+
// visitors to run `myapihq login`.
|
|
10
|
+
import { describe, it, expect } from 'vitest';
|
|
11
|
+
import { buildManifest } from './manifest.js';
|
|
12
|
+
import { COMMANDS, SUBCOMMANDS } from '../completion.js';
|
|
13
|
+
const manifest = await buildManifest('0.0.0-test');
|
|
14
|
+
const paths = new Set(manifest.paths.map(p => p.path));
|
|
15
|
+
describe('command manifest', () => {
|
|
16
|
+
it('reports no disagreement between its two sources', () => {
|
|
17
|
+
// Non-empty warnings mean the completion tables and the command modules
|
|
18
|
+
// describe different CLIs, so neither can be trusted to answer "is this
|
|
19
|
+
// real". Surfacing that is the point; passing anyway would not be.
|
|
20
|
+
expect(manifest.warnings).toEqual([]);
|
|
21
|
+
});
|
|
22
|
+
it('contains every top-level command and every completion subcommand', () => {
|
|
23
|
+
for (const c of COMMANDS)
|
|
24
|
+
expect(paths, `missing top-level "${c}"`).toContain(c);
|
|
25
|
+
for (const [cmd, subs] of Object.entries(SUBCOMMANDS)) {
|
|
26
|
+
for (const sub of subs)
|
|
27
|
+
expect(paths, `missing "${cmd} ${sub}"`).toContain(`${cmd} ${sub}`);
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
it('contains the commands the public sites advertise', () => {
|
|
31
|
+
// Verbatim from myapi-hq/frontend/configs/{myapihq,mydomainapi,myemailapi}.com.json.
|
|
32
|
+
// If a rename drops one of these, the site is wrong the moment it ships and
|
|
33
|
+
// this is where that gets said.
|
|
34
|
+
for (const p of [
|
|
35
|
+
'account setup', 'install-skills', 'status', 'keys create',
|
|
36
|
+
'domain check', 'domain register', 'domain import', 'domain list', 'domain records',
|
|
37
|
+
'email mailbox', 'email message', 'email verify', 'billing balance',
|
|
38
|
+
]) {
|
|
39
|
+
expect(paths, `site advertises "myapi ${p}"`).toContain(p);
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
it('does not invent commands', () => {
|
|
43
|
+
for (const bogus of ['bogus', 'domain bogus', 'email bogus', 'myapihq login']) {
|
|
44
|
+
expect(paths).not.toContain(bogus);
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
it('attaches usage strings, not just paths', () => {
|
|
48
|
+
// Regression guard. The completion tables are walked first and carry no
|
|
49
|
+
// usage; an early `return` on an already-seen path silently dropped every
|
|
50
|
+
// usage string while the manifest still looked complete. Assert on a
|
|
51
|
+
// command that only the module registry can describe.
|
|
52
|
+
const withUsage = manifest.paths.filter(p => p.usage);
|
|
53
|
+
expect(withUsage.length).toBeGreaterThan(100);
|
|
54
|
+
const del = manifest.paths.find(p => p.path === 'queue delete');
|
|
55
|
+
expect(del?.usage).toContain('myapi queue delete');
|
|
56
|
+
});
|
|
57
|
+
it('states the binary name the sites must use', () => {
|
|
58
|
+
expect(manifest.binary).toBe('myapi');
|
|
59
|
+
});
|
|
60
|
+
});
|
package/dist/commands/org.d.ts
CHANGED
|
@@ -9,4 +9,5 @@ export declare function get(id: string, flags: Flags): Promise<void>;
|
|
|
9
9
|
export declare function del(id: string, flags: Flags): Promise<void>;
|
|
10
10
|
export declare function update(restArgs: string[], flags: Flags): Promise<void>;
|
|
11
11
|
export declare function importOrg(args: string[], flags: Flags): Promise<void>;
|
|
12
|
+
export declare const SUBCOMMAND_USAGE: Record<string, string>;
|
|
12
13
|
export declare function run(subcommand: string | undefined, args: string[], flags: Flags): Promise<void>;
|
package/dist/commands/org.js
CHANGED
|
@@ -192,7 +192,7 @@ export async function importOrg(args, flags) {
|
|
|
192
192
|
success(`Import complete! Org ID: ${org.id}`);
|
|
193
193
|
}
|
|
194
194
|
// ── Dispatcher ───────────────────────────────────────────────────────────────
|
|
195
|
-
const SUBCOMMAND_USAGE = {
|
|
195
|
+
export const SUBCOMMAND_USAGE = {
|
|
196
196
|
'list': 'myapi org list [--json]',
|
|
197
197
|
'update': `myapi org update [<id>] [--name <str>] [--tagline <str>] [--description <str>] [--business-sector <str>] [--logo-url <url>] [--json]
|
|
198
198
|
|
|
@@ -10,4 +10,5 @@ export declare function charge(flags: Flags): Promise<void>;
|
|
|
10
10
|
export declare function list(flags: Flags): Promise<void>;
|
|
11
11
|
export declare function get(id: string, flags: Flags): Promise<void>;
|
|
12
12
|
export declare function refund(id: string, flags: Flags): Promise<void>;
|
|
13
|
+
export declare const SUBCOMMAND_USAGE: Record<string, string>;
|
|
13
14
|
export declare function run(subcommand: string | undefined, args: string[], flags: Flags): Promise<void>;
|
|
@@ -173,7 +173,7 @@ export async function refund(id, flags) {
|
|
|
173
173
|
success(`Charge ${res.id} refunded (status: ${res.status}).`);
|
|
174
174
|
}
|
|
175
175
|
// ── Dispatcher ───────────────────────────────────────────────────────────────
|
|
176
|
-
const SUBCOMMAND_USAGE = {
|
|
176
|
+
export const SUBCOMMAND_USAGE = {
|
|
177
177
|
'connect': `myapi payments connect --stripe-key <sk_...> [--org <id>]
|
|
178
178
|
|
|
179
179
|
Links your own Stripe account (T0 — bring-your-own-Stripe). The key is
|
|
@@ -3,4 +3,5 @@ import { type Flags } from '../helpers.js';
|
|
|
3
3
|
import type { Exposes } from '../exposes.js';
|
|
4
4
|
export declare const EXPOSES: Exposes;
|
|
5
5
|
export declare const SCHEMA: FlagSchema;
|
|
6
|
+
export declare const SUBCOMMAND_USAGE: Record<string, string>;
|
|
6
7
|
export declare function run(subcommand: string | undefined, args: string[], flags: Flags): Promise<void>;
|
package/dist/commands/people.js
CHANGED
|
@@ -83,7 +83,7 @@ async function get(personId, flags) {
|
|
|
83
83
|
const res = await sdkPeople.getPerson(config.api_key, orgId, personId);
|
|
84
84
|
printJson(res);
|
|
85
85
|
}
|
|
86
|
-
const SUBCOMMAND_USAGE = {
|
|
86
|
+
export const SUBCOMMAND_USAGE = {
|
|
87
87
|
'search': `myapi people search [--confidence <csv>] [--country <csv>] [--country-consistent]
|
|
88
88
|
[--email-type <csv>] [--seniority <csv>] [--tld-class <csv>]
|
|
89
89
|
[--has-c-level] [--has-careers-page] [--has-decision-maker]
|
package/dist/commands/pixel.d.ts
CHANGED
|
@@ -8,5 +8,6 @@ export declare function visits(flags: Flags): Promise<void>;
|
|
|
8
8
|
export declare function events(flags: Flags): Promise<void>;
|
|
9
9
|
export declare function audience(flags: Flags): Promise<void>;
|
|
10
10
|
export declare function identity(pixelId: string, flags: Flags): Promise<void>;
|
|
11
|
+
export declare const SUBCOMMAND_USAGE: Record<string, string>;
|
|
11
12
|
export declare function identify(pixelId: string | undefined, flags: Flags): Promise<void>;
|
|
12
13
|
export declare function run(subcommand: string | undefined, args: string[], flags: Flags): Promise<void>;
|
package/dist/commands/pixel.js
CHANGED
|
@@ -152,7 +152,7 @@ export async function identity(pixelId, flags) {
|
|
|
152
152
|
printJson(res);
|
|
153
153
|
}
|
|
154
154
|
// ── Dispatcher ───────────────────────────────────────────────────────────────
|
|
155
|
-
const SUBCOMMAND_USAGE = {
|
|
155
|
+
export const SUBCOMMAND_USAGE = {
|
|
156
156
|
'interactions': 'myapi pixel interactions [--website <domain>] [--campaign-id <id>] [--domain <domain>] [--from <iso8601>] [--to <iso8601>] [--limit <num>] [--offset <num>] [--org <id>] [--json]',
|
|
157
157
|
'visits': 'myapi pixel visits --website <domain> [--from <iso8601>] [--to <iso8601>] [--limit <num>] [--offset <num>] [--org <id>] [--json]',
|
|
158
158
|
'events': 'myapi pixel events [--campaign-id <id>] [--domain <domain>] [--from <iso8601>] [--to <iso8601>] [--limit <num>] [--offset <num>] [--org <id>] [--json]',
|
package/dist/commands/queue.d.ts
CHANGED
|
@@ -12,4 +12,5 @@ export declare function enqueue(name: string, flags: Flags, extraArgs?: string[]
|
|
|
12
12
|
export declare function jobs(name: string, flags: Flags): Promise<void>;
|
|
13
13
|
export declare function job(jobId: string, flags: Flags): Promise<void>;
|
|
14
14
|
export declare function del(name: string, flags: Flags): Promise<void>;
|
|
15
|
+
export declare const SUBCOMMAND_USAGE: Record<string, string>;
|
|
15
16
|
export declare function run(subcommand: string | undefined, args: string[], flags: Flags): Promise<void>;
|
package/dist/commands/queue.js
CHANGED
|
@@ -187,7 +187,7 @@ export async function del(name, flags) {
|
|
|
187
187
|
success(`Deleted queue: ${name} (org ${orgId})`);
|
|
188
188
|
}
|
|
189
189
|
// ── Dispatcher ───────────────────────────────────────────────────────────────
|
|
190
|
-
const SUBCOMMAND_USAGE = {
|
|
190
|
+
export const SUBCOMMAND_USAGE = {
|
|
191
191
|
'create': 'myapi queue create <name> --consumer-url <url> [--max-attempts <n>] [--max-concurrency <n>] [--org <id>]',
|
|
192
192
|
'list': 'myapi queue list [--org <id>] [--json]',
|
|
193
193
|
'get': 'myapi queue get <name> [--org <id>] [--json]',
|
|
@@ -3,4 +3,5 @@ import { type Flags } from '../helpers.js';
|
|
|
3
3
|
import type { Exposes } from '../exposes.js';
|
|
4
4
|
export declare const EXPOSES: Exposes;
|
|
5
5
|
export declare const SCHEMA: FlagSchema;
|
|
6
|
+
export declare const SUBCOMMAND_USAGE: Record<string, string>;
|
|
6
7
|
export declare function run(subcommand: string | undefined, args: string[], flags: Flags): Promise<void>;
|
package/dist/commands/storage.js
CHANGED
|
@@ -238,7 +238,7 @@ async function del(id, flags) {
|
|
|
238
238
|
success(`Asset ${id} deleted`);
|
|
239
239
|
}
|
|
240
240
|
// ── Dispatcher ───────────────────────────────────────────────────────────────
|
|
241
|
-
const SUBCOMMAND_USAGE = {
|
|
241
|
+
export const SUBCOMMAND_USAGE = {
|
|
242
242
|
'list': 'myapi storage list [--org <id>] [--json]',
|
|
243
243
|
'ingest': `myapi storage ingest <url> [--name <name>] [--org <id>]
|
|
244
244
|
|
package/dist/commands/task.d.ts
CHANGED
|
@@ -15,4 +15,5 @@ export declare function extend(id: string, flags: Flags): Promise<void>;
|
|
|
15
15
|
export declare function resolve(id: string, flags: Flags): Promise<void>;
|
|
16
16
|
export declare function fail(id: string, flags: Flags): Promise<void>;
|
|
17
17
|
export declare function cancel(id: string, flags: Flags): Promise<void>;
|
|
18
|
+
export declare const SUBCOMMAND_USAGE: Record<string, string>;
|
|
18
19
|
export declare function run(subcommand: string | undefined, args: string[], flags: Flags): Promise<void>;
|
package/dist/commands/task.js
CHANGED
|
@@ -242,7 +242,7 @@ export async function cancel(id, flags) {
|
|
|
242
242
|
success(`Cancelled task ${id}`);
|
|
243
243
|
}
|
|
244
244
|
// ── Dispatcher ───────────────────────────────────────────────────────────────
|
|
245
|
-
const SUBCOMMAND_USAGE = {
|
|
245
|
+
export const SUBCOMMAND_USAGE = {
|
|
246
246
|
'create': 'myapi task create "<description>" [--body <md|@file>] [--importance <i>] [--due <rfc3339>] [--assignee <email>] [--tag <t,t>] [--depends-on <id,id>] [--dedup-key <k>] [--resolve-on <event[:field=value]>] [--origin <s>] [--org <id>]',
|
|
247
247
|
'list': 'myapi task list [--status <s>] [--tag <t>] [--importance <i>] [--assignee <email>] [--origin <s>] [--limit <n>] [--org <id>] [--json]',
|
|
248
248
|
'get': 'myapi task get <id> [--body] [--org <id>] [--json]\n\n--body additionally fetches the Markdown body tier (a separate read).',
|
package/dist/commands/url.d.ts
CHANGED
|
@@ -4,4 +4,5 @@ import type { FlagSchema } from '../flags.js';
|
|
|
4
4
|
export declare const SCHEMA: FlagSchema;
|
|
5
5
|
export declare const EXPOSES: Exposes;
|
|
6
6
|
export declare function shorten(targetUrl: string, flags: Flags): Promise<void>;
|
|
7
|
+
export declare const SUBCOMMAND_USAGE: Record<string, string>;
|
|
7
8
|
export declare function run(subcommand: string | undefined, args: string[], flags: Flags): Promise<void>;
|
package/dist/commands/url.js
CHANGED
|
@@ -19,7 +19,7 @@ export async function shorten(targetUrl, flags) {
|
|
|
19
19
|
success(`Shortened URL: ${res.short_url}\nCode: ${res.short_code}`);
|
|
20
20
|
}
|
|
21
21
|
// ── Dispatcher ───────────────────────────────────────────────────────────────
|
|
22
|
-
const SUBCOMMAND_USAGE = {
|
|
22
|
+
export const SUBCOMMAND_USAGE = {
|
|
23
23
|
'shorten': 'myapi url shorten <url> [--org <id>] [--json]',
|
|
24
24
|
};
|
|
25
25
|
export async function run(subcommand, args, flags) {
|
|
@@ -10,4 +10,5 @@ export declare function _validateForwardUrl(url: string): string | null;
|
|
|
10
10
|
export declare function del(id: string, flags: Flags): Promise<void>;
|
|
11
11
|
export declare function delivery(id: string, flags: Flags): Promise<void>;
|
|
12
12
|
export declare function deliveries(endpointArg: string | undefined, flags: Flags): Promise<void>;
|
|
13
|
+
export declare const SUBCOMMAND_USAGE: Record<string, string>;
|
|
13
14
|
export declare function run(subcommand: string | undefined, args: string[], flags: Flags): Promise<void>;
|
package/dist/commands/webhook.js
CHANGED
|
@@ -192,7 +192,7 @@ function summarizePayload(payload) {
|
|
|
192
192
|
return entries.length > 3 ? `${shown} +${entries.length - 3}` : shown;
|
|
193
193
|
}
|
|
194
194
|
// ── Dispatcher ───────────────────────────────────────────────────────────────
|
|
195
|
-
const SUBCOMMAND_USAGE = {
|
|
195
|
+
export const SUBCOMMAND_USAGE = {
|
|
196
196
|
'list': 'myapi webhook list [--org <id>] [--json]',
|
|
197
197
|
'create': `myapi webhook create <name> [--description <desc>] [--crm-email-path <path>] [--org <id>]
|
|
198
198
|
myapi webhook create --name <name> [...]
|
|
@@ -13,4 +13,5 @@ export declare function disable(id: string, flags: Flags): Promise<void>;
|
|
|
13
13
|
export declare function del(id: string, flags: Flags): Promise<void>;
|
|
14
14
|
export declare function runs(id: string, flags: Flags): Promise<void>;
|
|
15
15
|
export declare function getRun(runId: string, flags: Flags): Promise<void>;
|
|
16
|
+
export declare const SUBCOMMAND_USAGE: Record<string, string>;
|
|
16
17
|
export declare function run(subcommand: string | undefined, args: string[], flags: Flags): Promise<void>;
|
|
@@ -313,7 +313,7 @@ export async function getRun(runId, flags) {
|
|
|
313
313
|
printJson(run);
|
|
314
314
|
}
|
|
315
315
|
// ── Dispatcher ───────────────────────────────────────────────────────────────
|
|
316
|
-
const SUBCOMMAND_USAGE = {
|
|
316
|
+
export const SUBCOMMAND_USAGE = {
|
|
317
317
|
'list': 'myapi workflow list [--org <id>] [--json]',
|
|
318
318
|
'get': 'myapi workflow get <id> [--org <id>]',
|
|
319
319
|
'create': `myapi workflow create <name> --endpoint-id <id> --steps <json> [--no-enable] [--org <id>]
|
package/dist/exposes.test.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -194,6 +194,14 @@ async function main() {
|
|
|
194
194
|
await adoptSoleOrg(command, flags, key => hq.listOrgs(key));
|
|
195
195
|
try {
|
|
196
196
|
switch (command) {
|
|
197
|
+
// Machine-readable command list. Deliberately absent from --help and
|
|
198
|
+
// from completion: it is an interface for other programs (the site-copy
|
|
199
|
+
// checker in myapi-hq), not a thing to teach a person.
|
|
200
|
+
case '__commands': {
|
|
201
|
+
const manifestCmd = await import('./commands/manifest.js');
|
|
202
|
+
await manifestCmd.run(pkg.version, flags);
|
|
203
|
+
break;
|
|
204
|
+
}
|
|
197
205
|
case 'auth':
|
|
198
206
|
// `auth` is the end-user auth product (my-auth-api). Operator/account
|
|
199
207
|
// commands live under `myapi account`.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: my-domain-api
|
|
3
|
-
version: 1.0.
|
|
3
|
+
version: 1.0.1
|
|
4
4
|
description: >
|
|
5
5
|
Register new domains and manage edge settings. Required before a funnel can go live on a custom URL.
|
|
6
6
|
triggers: [domain, register domain, dns, custom domain, edge, cdn, security level, browser check, renew, namecheap]
|
|
7
|
-
checksum: sha256-
|
|
7
|
+
checksum: sha256-b08b28804b6e3ab69cc5b75c39e5b22312aa40474dcf53e3bc71fd6db8491d22
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# MyDomainAPI
|
|
@@ -56,6 +56,7 @@ Resolution at register time (highest wins): `--registrant-json` → per-field fl
|
|
|
56
56
|
| `myapi domain status <domain> [--watch]` | Registration + DNS propagation status. `--watch` polls until terminal (10s × 30 → 30s × 60) |
|
|
57
57
|
| `myapi domain settings <domain>` | View edge/CDN settings |
|
|
58
58
|
| `myapi domain update-settings <domain>` | Change security level, browser check, purge cache |
|
|
59
|
+
| `myapi domain mail-server-resync <domain>` | Re-run mail-server provisioning when inbox/create is broken on a domain |
|
|
59
60
|
| `myapi domain records list <domain> [--type T]` | List DNS records in the zone |
|
|
60
61
|
| `myapi domain records get <domain> <id>` | Fetch one record |
|
|
61
62
|
| `myapi domain records create <domain> --type T --name n --content c` | Create a record (priority required for MX) |
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: my-image-api
|
|
3
|
-
version: 1.0.
|
|
3
|
+
version: 1.0.1
|
|
4
4
|
description: >
|
|
5
5
|
Generate AI images from a text prompt. Async — submit a prompt, the CLI polls until the image is ready, then returns a public CDN URL. Image lands automatically in your org's storage.
|
|
6
6
|
triggers: [image, generate image, ai image, hero image, logo, illustration, watercolor, prompt, cyberpunk, ratio, aspect ratio]
|
|
7
|
-
checksum: sha256-
|
|
7
|
+
checksum: sha256-08b7b7e6deb6a5c6ff4ec149561470b54a4bad02a914455a41c270dfceca7a2e
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# MyImageAPI
|
|
@@ -27,6 +27,7 @@ The output URL is public — anyone with it can view. Don't generate sensitive c
|
|
|
27
27
|
| `myapi image generate <prompt>` | Async generate, polls up to 90s, returns id + URL |
|
|
28
28
|
| `myapi image list` | List all generated images for the org |
|
|
29
29
|
| `myapi image get <job_id>` | Get full job details (status, URL, prompt, ratio) |
|
|
30
|
+
| `myapi image get-url <job_id>` | Print just the asset URL — for piping into another command |
|
|
30
31
|
| `myapi image models` | List available image models with per-image pricing |
|
|
31
32
|
| `myapi image delete <job_id>` | Delete the asset (job record kept for history) |
|
|
32
33
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: my-queue-api
|
|
3
|
-
version: 1.0.
|
|
3
|
+
version: 1.0.1
|
|
4
4
|
description: >
|
|
5
5
|
Durable job queue — enqueue work and have it retried against your HTTP consumer, with concurrency caps and a dependency DAG.
|
|
6
6
|
triggers: [queue, job queue, background job, enqueue, retry, async work, dead letter, delayed job, concurrency]
|
|
7
|
-
checksum: sha256-
|
|
7
|
+
checksum: sha256-ad874e1229df9381fc92881b2a1fada40859983c24fe4386d43922398323b05c
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# MyQueueAPI
|
|
@@ -39,6 +39,7 @@ A job carries an arbitrary JSON `payload` (≤256 KB). Jobs support:
|
|
|
39
39
|
| `myapi queue create <name> --consumer-url <url> [--max-attempts <n>] [--max-concurrency <n>]` | Create a queue |
|
|
40
40
|
| `myapi queue list` | List queues in your org |
|
|
41
41
|
| `myapi queue get <name>` | Show a queue's retry/concurrency policy |
|
|
42
|
+
| `myapi queue delete <name>` | Delete a queue |
|
|
42
43
|
| `myapi queue enqueue <name> --payload <json> [--dedup-key <k>] [--delay <s>] [--depends-on <id,id>]` | Enqueue a job |
|
|
43
44
|
| `myapi queue jobs <name> [--status <s>] [--limit <n>]` | List a queue's jobs |
|
|
44
45
|
| `myapi queue job <job_id>` | Show a single job's status |
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: my-webhook-api
|
|
3
|
-
version: 1.0.
|
|
3
|
+
version: 1.0.1
|
|
4
4
|
description: >
|
|
5
5
|
Inbound webhook endpoints for non-funnel sources — Stripe, GitHub, custom services. Funnel forms use the my-funnel-api proxy.
|
|
6
6
|
triggers: [webhook, inbound, receiver, stripe events, github webhook, slack notification, delivery, payload, event ingest]
|
|
7
|
-
checksum: sha256-
|
|
7
|
+
checksum: sha256-737e0572ef7c414dab568e60af676aa8e50900ed368ba7bcdf81fc65516be9eb
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# MyWebhookAPI
|
|
@@ -31,6 +31,7 @@ Treat the webhook slug as a secret — anyone with the URL can POST.
|
|
|
31
31
|
|---|---|
|
|
32
32
|
| `myapi webhook create "<name>" [--description "..."]` | Create an endpoint, returns id + inbound URL |
|
|
33
33
|
| `myapi webhook list` | List all endpoints in your org |
|
|
34
|
+
| `myapi webhook update <id> [--name <n>] [--description <d>]` | Change an endpoint in place, without re-creating it |
|
|
34
35
|
| `myapi webhook delete <id>` | Delete an endpoint and all its deliveries |
|
|
35
36
|
| `myapi webhook deliveries [endpoint_id]` | List what came in, newest first (`--limit`, `--cursor`) |
|
|
36
37
|
| `myapi webhook delivery <delivery_id>` | Get the full payload + headers for one delivery |
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myapihq/cli",
|
|
3
3
|
"license": "Apache-2.0",
|
|
4
|
-
"version": "2.16.
|
|
4
|
+
"version": "2.16.2",
|
|
5
5
|
"description": "MyAPI command-line interface",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"lint:skills:strict": "node scripts/copy-skills.js && node scripts/lint-skills.js --strict"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@myapihq/sdk": "^2.16.
|
|
49
|
+
"@myapihq/sdk": "^2.16.2"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@types/node": "^25.6.0",
|