@revfleet/hscli 0.5.3
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/CHANGELOG.md +466 -0
- package/LICENSE +21 -0
- package/README.md +287 -0
- package/SECURITY.md +68 -0
- package/dist/cli.d.ts +8 -0
- package/dist/cli.js +192 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/account/index.d.ts +3 -0
- package/dist/commands/account/index.js +65 -0
- package/dist/commands/account/index.js.map +1 -0
- package/dist/commands/api/index.d.ts +3 -0
- package/dist/commands/api/index.js +35 -0
- package/dist/commands/api/index.js.map +1 -0
- package/dist/commands/auth/index.d.ts +3 -0
- package/dist/commands/auth/index.js +229 -0
- package/dist/commands/auth/index.js.map +1 -0
- package/dist/commands/automation/index.d.ts +3 -0
- package/dist/commands/automation/index.js +119 -0
- package/dist/commands/automation/index.js.map +1 -0
- package/dist/commands/cms/blog-settings.d.ts +3 -0
- package/dist/commands/cms/blog-settings.js +70 -0
- package/dist/commands/cms/blog-settings.js.map +1 -0
- package/dist/commands/cms/content-ops.d.ts +13 -0
- package/dist/commands/cms/content-ops.js +262 -0
- package/dist/commands/cms/content-ops.js.map +1 -0
- package/dist/commands/cms/hubdb.d.ts +3 -0
- package/dist/commands/cms/hubdb.js +55 -0
- package/dist/commands/cms/hubdb.js.map +1 -0
- package/dist/commands/cms/index.d.ts +3 -0
- package/dist/commands/cms/index.js +119 -0
- package/dist/commands/cms/index.js.map +1 -0
- package/dist/commands/cms/source-code.d.ts +3 -0
- package/dist/commands/cms/source-code.js +101 -0
- package/dist/commands/cms/source-code.js.map +1 -0
- package/dist/commands/communication-preferences/index.d.ts +3 -0
- package/dist/commands/communication-preferences/index.js +107 -0
- package/dist/commands/communication-preferences/index.js.map +1 -0
- package/dist/commands/conversations/index.d.ts +3 -0
- package/dist/commands/conversations/index.js +233 -0
- package/dist/commands/conversations/index.js.map +1 -0
- package/dist/commands/crm/associations.d.ts +3 -0
- package/dist/commands/crm/associations.js +180 -0
- package/dist/commands/crm/associations.js.map +1 -0
- package/dist/commands/crm/cards.d.ts +3 -0
- package/dist/commands/crm/cards.js +72 -0
- package/dist/commands/crm/cards.js.map +1 -0
- package/dist/commands/crm/carts.d.ts +3 -0
- package/dist/commands/crm/carts.js +5 -0
- package/dist/commands/crm/carts.js.map +1 -0
- package/dist/commands/crm/communications.d.ts +3 -0
- package/dist/commands/crm/communications.js +5 -0
- package/dist/commands/crm/communications.js.map +1 -0
- package/dist/commands/crm/companies.d.ts +3 -0
- package/dist/commands/crm/companies.js +5 -0
- package/dist/commands/crm/companies.js.map +1 -0
- package/dist/commands/crm/contacts.d.ts +3 -0
- package/dist/commands/crm/contacts.js +5 -0
- package/dist/commands/crm/contacts.js.map +1 -0
- package/dist/commands/crm/custom-objects.d.ts +3 -0
- package/dist/commands/crm/custom-objects.js +83 -0
- package/dist/commands/crm/custom-objects.js.map +1 -0
- package/dist/commands/crm/dated.d.ts +9 -0
- package/dist/commands/crm/dated.js +247 -0
- package/dist/commands/crm/dated.js.map +1 -0
- package/dist/commands/crm/deals.d.ts +3 -0
- package/dist/commands/crm/deals.js +5 -0
- package/dist/commands/crm/deals.js.map +1 -0
- package/dist/commands/crm/describe.d.ts +3 -0
- package/dist/commands/crm/describe.js +89 -0
- package/dist/commands/crm/describe.js.map +1 -0
- package/dist/commands/crm/discounts.d.ts +3 -0
- package/dist/commands/crm/discounts.js +5 -0
- package/dist/commands/crm/discounts.js.map +1 -0
- package/dist/commands/crm/engagements.d.ts +3 -0
- package/dist/commands/crm/engagements.js +8 -0
- package/dist/commands/crm/engagements.js.map +1 -0
- package/dist/commands/crm/fees.d.ts +3 -0
- package/dist/commands/crm/fees.js +5 -0
- package/dist/commands/crm/fees.js.map +1 -0
- package/dist/commands/crm/goals.d.ts +3 -0
- package/dist/commands/crm/goals.js +30 -0
- package/dist/commands/crm/goals.js.map +1 -0
- package/dist/commands/crm/imports.d.ts +3 -0
- package/dist/commands/crm/imports.js +45 -0
- package/dist/commands/crm/imports.js.map +1 -0
- package/dist/commands/crm/index.d.ts +3 -0
- package/dist/commands/crm/index.js +64 -0
- package/dist/commands/crm/index.js.map +1 -0
- package/dist/commands/crm/invoices.d.ts +3 -0
- package/dist/commands/crm/invoices.js +5 -0
- package/dist/commands/crm/invoices.js.map +1 -0
- package/dist/commands/crm/leads.d.ts +3 -0
- package/dist/commands/crm/leads.js +5 -0
- package/dist/commands/crm/leads.js.map +1 -0
- package/dist/commands/crm/line-items.d.ts +3 -0
- package/dist/commands/crm/line-items.js +5 -0
- package/dist/commands/crm/line-items.js.map +1 -0
- package/dist/commands/crm/orders.d.ts +3 -0
- package/dist/commands/crm/orders.js +5 -0
- package/dist/commands/crm/orders.js.map +1 -0
- package/dist/commands/crm/owners.d.ts +3 -0
- package/dist/commands/crm/owners.js +22 -0
- package/dist/commands/crm/owners.js.map +1 -0
- package/dist/commands/crm/payments.d.ts +3 -0
- package/dist/commands/crm/payments.js +5 -0
- package/dist/commands/crm/payments.js.map +1 -0
- package/dist/commands/crm/pipelines.d.ts +3 -0
- package/dist/commands/crm/pipelines.js +70 -0
- package/dist/commands/crm/pipelines.js.map +1 -0
- package/dist/commands/crm/products.d.ts +3 -0
- package/dist/commands/crm/products.js +5 -0
- package/dist/commands/crm/products.js.map +1 -0
- package/dist/commands/crm/properties.d.ts +3 -0
- package/dist/commands/crm/properties.js +103 -0
- package/dist/commands/crm/properties.js.map +1 -0
- package/dist/commands/crm/quotes.d.ts +3 -0
- package/dist/commands/crm/quotes.js +5 -0
- package/dist/commands/crm/quotes.js.map +1 -0
- package/dist/commands/crm/shared.d.ts +17 -0
- package/dist/commands/crm/shared.js +256 -0
- package/dist/commands/crm/shared.js.map +1 -0
- package/dist/commands/crm/subscriptions.d.ts +3 -0
- package/dist/commands/crm/subscriptions.js +5 -0
- package/dist/commands/crm/subscriptions.js.map +1 -0
- package/dist/commands/crm/sync.d.ts +3 -0
- package/dist/commands/crm/sync.js +116 -0
- package/dist/commands/crm/sync.js.map +1 -0
- package/dist/commands/crm/taxes.d.ts +3 -0
- package/dist/commands/crm/taxes.js +5 -0
- package/dist/commands/crm/taxes.js.map +1 -0
- package/dist/commands/crm/tickets.d.ts +3 -0
- package/dist/commands/crm/tickets.js +5 -0
- package/dist/commands/crm/tickets.js.map +1 -0
- package/dist/commands/crm/users.d.ts +3 -0
- package/dist/commands/crm/users.js +5 -0
- package/dist/commands/crm/users.js.map +1 -0
- package/dist/commands/doctor/index.d.ts +3 -0
- package/dist/commands/doctor/index.js +232 -0
- package/dist/commands/doctor/index.js.map +1 -0
- package/dist/commands/domains/shared.d.ts +13 -0
- package/dist/commands/domains/shared.js +56 -0
- package/dist/commands/domains/shared.js.map +1 -0
- package/dist/commands/email-events/index.d.ts +3 -0
- package/dist/commands/email-events/index.js +77 -0
- package/dist/commands/email-events/index.js.map +1 -0
- package/dist/commands/events/index.d.ts +3 -0
- package/dist/commands/events/index.js +80 -0
- package/dist/commands/events/index.js.map +1 -0
- package/dist/commands/exports/index.d.ts +3 -0
- package/dist/commands/exports/index.js +45 -0
- package/dist/commands/exports/index.js.map +1 -0
- package/dist/commands/extensions/index.d.ts +3 -0
- package/dist/commands/extensions/index.js +118 -0
- package/dist/commands/extensions/index.js.map +1 -0
- package/dist/commands/feature-flags/index.d.ts +3 -0
- package/dist/commands/feature-flags/index.js +65 -0
- package/dist/commands/feature-flags/index.js.map +1 -0
- package/dist/commands/files/folders.d.ts +3 -0
- package/dist/commands/files/folders.js +74 -0
- package/dist/commands/files/folders.js.map +1 -0
- package/dist/commands/files/index.d.ts +3 -0
- package/dist/commands/files/index.js +30 -0
- package/dist/commands/files/index.js.map +1 -0
- package/dist/commands/forms/index.d.ts +3 -0
- package/dist/commands/forms/index.js +37 -0
- package/dist/commands/forms/index.js.map +1 -0
- package/dist/commands/integrations/index.d.ts +3 -0
- package/dist/commands/integrations/index.js +64 -0
- package/dist/commands/integrations/index.js.map +1 -0
- package/dist/commands/integrators/index.d.ts +3 -0
- package/dist/commands/integrators/index.js +79 -0
- package/dist/commands/integrators/index.js.map +1 -0
- package/dist/commands/legacy/index.d.ts +13 -0
- package/dist/commands/legacy/index.js +254 -0
- package/dist/commands/legacy/index.js.map +1 -0
- package/dist/commands/legacy-v1/index.d.ts +29 -0
- package/dist/commands/legacy-v1/index.js +568 -0
- package/dist/commands/legacy-v1/index.js.map +1 -0
- package/dist/commands/lists/index.d.ts +3 -0
- package/dist/commands/lists/index.js +148 -0
- package/dist/commands/lists/index.js.map +1 -0
- package/dist/commands/marketing/ads.d.ts +3 -0
- package/dist/commands/marketing/ads.js +45 -0
- package/dist/commands/marketing/ads.js.map +1 -0
- package/dist/commands/marketing/behavioral-events.d.ts +3 -0
- package/dist/commands/marketing/behavioral-events.js +38 -0
- package/dist/commands/marketing/behavioral-events.js.map +1 -0
- package/dist/commands/marketing/events.d.ts +3 -0
- package/dist/commands/marketing/events.js +69 -0
- package/dist/commands/marketing/events.js.map +1 -0
- package/dist/commands/marketing/index.d.ts +3 -0
- package/dist/commands/marketing/index.js +55 -0
- package/dist/commands/marketing/index.js.map +1 -0
- package/dist/commands/marketing/landing-pages.d.ts +3 -0
- package/dist/commands/marketing/landing-pages.js +48 -0
- package/dist/commands/marketing/landing-pages.js.map +1 -0
- package/dist/commands/marketing/seo.d.ts +3 -0
- package/dist/commands/marketing/seo.js +35 -0
- package/dist/commands/marketing/seo.js.map +1 -0
- package/dist/commands/marketing/social.d.ts +3 -0
- package/dist/commands/marketing/social.js +45 -0
- package/dist/commands/marketing/social.js.map +1 -0
- package/dist/commands/marketing/subscriptions.d.ts +3 -0
- package/dist/commands/marketing/subscriptions.js +27 -0
- package/dist/commands/marketing/subscriptions.js.map +1 -0
- package/dist/commands/marketing/transactional.d.ts +3 -0
- package/dist/commands/marketing/transactional.js +30 -0
- package/dist/commands/marketing/transactional.js.map +1 -0
- package/dist/commands/marketing-emails-v1/index.d.ts +3 -0
- package/dist/commands/marketing-emails-v1/index.js +72 -0
- package/dist/commands/marketing-emails-v1/index.js.map +1 -0
- package/dist/commands/mcp.d.ts +2 -0
- package/dist/commands/mcp.js +10 -0
- package/dist/commands/mcp.js.map +1 -0
- package/dist/commands/media-bridge/index.d.ts +3 -0
- package/dist/commands/media-bridge/index.js +209 -0
- package/dist/commands/media-bridge/index.js.map +1 -0
- package/dist/commands/reporting/index.d.ts +3 -0
- package/dist/commands/reporting/index.js +73 -0
- package/dist/commands/reporting/index.js.map +1 -0
- package/dist/commands/sales/calling.d.ts +3 -0
- package/dist/commands/sales/calling.js +32 -0
- package/dist/commands/sales/calling.js.map +1 -0
- package/dist/commands/sales/index.d.ts +3 -0
- package/dist/commands/sales/index.js +10 -0
- package/dist/commands/sales/index.js.map +1 -0
- package/dist/commands/sales/meetings.d.ts +3 -0
- package/dist/commands/sales/meetings.js +37 -0
- package/dist/commands/sales/meetings.js.map +1 -0
- package/dist/commands/sales/sequences.d.ts +3 -0
- package/dist/commands/sales/sequences.js +78 -0
- package/dist/commands/sales/sequences.js.map +1 -0
- package/dist/commands/seed/cms.d.ts +6 -0
- package/dist/commands/seed/cms.js +204 -0
- package/dist/commands/seed/cms.js.map +1 -0
- package/dist/commands/seed/commerce.d.ts +3 -0
- package/dist/commands/seed/commerce.js +117 -0
- package/dist/commands/seed/commerce.js.map +1 -0
- package/dist/commands/seed/context.d.ts +8 -0
- package/dist/commands/seed/context.js +76 -0
- package/dist/commands/seed/context.js.map +1 -0
- package/dist/commands/seed/crm-core.d.ts +3 -0
- package/dist/commands/seed/crm-core.js +137 -0
- package/dist/commands/seed/crm-core.js.map +1 -0
- package/dist/commands/seed/data.d.ts +73 -0
- package/dist/commands/seed/data.js +49 -0
- package/dist/commands/seed/data.js.map +1 -0
- package/dist/commands/seed/engagements.d.ts +3 -0
- package/dist/commands/seed/engagements.js +89 -0
- package/dist/commands/seed/engagements.js.map +1 -0
- package/dist/commands/seed/index.d.ts +3 -0
- package/dist/commands/seed/index.js +95 -0
- package/dist/commands/seed/index.js.map +1 -0
- package/dist/commands/seed/infra.d.ts +6 -0
- package/dist/commands/seed/infra.js +163 -0
- package/dist/commands/seed/infra.js.map +1 -0
- package/dist/commands/seed/marketing.d.ts +3 -0
- package/dist/commands/seed/marketing.js +172 -0
- package/dist/commands/seed/marketing.js.map +1 -0
- package/dist/commands/seed/shared.d.ts +8 -0
- package/dist/commands/seed/shared.js +37 -0
- package/dist/commands/seed/shared.js.map +1 -0
- package/dist/commands/seed/types.d.ts +44 -0
- package/dist/commands/seed/types.js +2 -0
- package/dist/commands/seed/types.js.map +1 -0
- package/dist/commands/service/chatflows.d.ts +3 -0
- package/dist/commands/service/chatflows.js +30 -0
- package/dist/commands/service/chatflows.js.map +1 -0
- package/dist/commands/service/index.d.ts +3 -0
- package/dist/commands/service/index.js +25 -0
- package/dist/commands/service/index.js.map +1 -0
- package/dist/commands/service/knowledge-base.d.ts +3 -0
- package/dist/commands/service/knowledge-base.js +19 -0
- package/dist/commands/service/knowledge-base.js.map +1 -0
- package/dist/commands/service/pipelines.d.ts +3 -0
- package/dist/commands/service/pipelines.js +36 -0
- package/dist/commands/service/pipelines.js.map +1 -0
- package/dist/commands/settings/index.d.ts +3 -0
- package/dist/commands/settings/index.js +149 -0
- package/dist/commands/settings/index.js.map +1 -0
- package/dist/commands/site-search/index.d.ts +3 -0
- package/dist/commands/site-search/index.js +36 -0
- package/dist/commands/site-search/index.js.map +1 -0
- package/dist/commands/timeline/index.d.ts +3 -0
- package/dist/commands/timeline/index.js +32 -0
- package/dist/commands/timeline/index.js.map +1 -0
- package/dist/commands/webhooks/index.d.ts +3 -0
- package/dist/commands/webhooks/index.js +41 -0
- package/dist/commands/webhooks/index.js.map +1 -0
- package/dist/commands/workflows/index.d.ts +3 -0
- package/dist/commands/workflows/index.js +13 -0
- package/dist/commands/workflows/index.js.map +1 -0
- package/dist/core/auth.d.ts +33 -0
- package/dist/core/auth.js +137 -0
- package/dist/core/auth.js.map +1 -0
- package/dist/core/capabilities.d.ts +60 -0
- package/dist/core/capabilities.js +559 -0
- package/dist/core/capabilities.js.map +1 -0
- package/dist/core/http.d.ts +47 -0
- package/dist/core/http.js +433 -0
- package/dist/core/http.js.map +1 -0
- package/dist/core/output.d.ts +23 -0
- package/dist/core/output.js +197 -0
- package/dist/core/output.js.map +1 -0
- package/dist/core/permissions.d.ts +9 -0
- package/dist/core/permissions.js +27 -0
- package/dist/core/permissions.js.map +1 -0
- package/dist/core/plugins.d.ts +42 -0
- package/dist/core/plugins.js +94 -0
- package/dist/core/plugins.js.map +1 -0
- package/dist/core/policy.d.ts +2 -0
- package/dist/core/policy.js +38 -0
- package/dist/core/policy.js.map +1 -0
- package/dist/core/schema-cache.d.ts +56 -0
- package/dist/core/schema-cache.js +338 -0
- package/dist/core/schema-cache.js.map +1 -0
- package/dist/core/schemas.d.ts +96 -0
- package/dist/core/schemas.js +104 -0
- package/dist/core/schemas.js.map +1 -0
- package/dist/core/urls.d.ts +50 -0
- package/dist/core/urls.js +122 -0
- package/dist/core/urls.js.map +1 -0
- package/dist/core/vault.d.ts +37 -0
- package/dist/core/vault.js +143 -0
- package/dist/core/vault.js.map +1 -0
- package/dist/mcp/server.d.ts +5 -0
- package/dist/mcp/server.js +680 -0
- package/dist/mcp/server.js.map +1 -0
- package/package.json +84 -0
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
import { createClient } from "../../core/http.js";
|
|
2
|
+
import { printResult } from "../../core/output.js";
|
|
3
|
+
import { appendOptional, encodePathSegment, maybeWrite, parseJsonPayload, parseNumberFlag } from "../crm/shared.js";
|
|
4
|
+
// ──────────────────────────────────────────────────────────────────────────
|
|
5
|
+
// Legacy + niche HubSpot modules
|
|
6
|
+
//
|
|
7
|
+
// HubSpot exposes many path segments that are either legacy (v1/v2) or niche
|
|
8
|
+
// app-developer surfaces (broadcast, visitor-identification, scheduler, tax,
|
|
9
|
+
// appinstalls, submissions). Each gets a dedicated top-level command so users
|
|
10
|
+
// with portal configurations that depend on them have first-class coverage,
|
|
11
|
+
// not just the `api request` escape hatch.
|
|
12
|
+
// ──────────────────────────────────────────────────────────────────────────
|
|
13
|
+
function rawGet(getCtx) {
|
|
14
|
+
return async (path) => {
|
|
15
|
+
const ctx = getCtx();
|
|
16
|
+
const client = createClient(ctx.profile);
|
|
17
|
+
return client.request(path);
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
// ── Broadcast / scheduled social posts (legacy social API) ────────────────
|
|
21
|
+
export function registerBroadcast(program, getCtx) {
|
|
22
|
+
const bc = program.command("broadcast").description("Legacy social broadcast / scheduled post API");
|
|
23
|
+
bc.command("list-channels").action(async () => printResult(getCtx(), await rawGet(getCtx)(`/broadcast/v1/channels/setting/publish/current`)));
|
|
24
|
+
bc.command("list-broadcasts").option("--limit <n>", "Max records", "50").option("--offset <n>", "Paging offset").action(async (o) => {
|
|
25
|
+
const ctx = getCtx();
|
|
26
|
+
const client = createClient(ctx.profile);
|
|
27
|
+
const params = new URLSearchParams();
|
|
28
|
+
params.set("limit", String(parseNumberFlag(o.limit, "--limit")));
|
|
29
|
+
appendOptional(params, "offset", o.offset);
|
|
30
|
+
const res = await client.request(`/broadcast/v1/broadcasts?${params.toString()}`);
|
|
31
|
+
printResult(ctx, res);
|
|
32
|
+
});
|
|
33
|
+
bc.command("get-broadcast").argument("<broadcastId>").action(async (broadcastId) => {
|
|
34
|
+
const ctx = getCtx();
|
|
35
|
+
const client = createClient(ctx.profile);
|
|
36
|
+
const seg = encodePathSegment(broadcastId, "broadcastId");
|
|
37
|
+
const res = await client.request(`/broadcast/v1/broadcasts/${seg}`);
|
|
38
|
+
printResult(ctx, res);
|
|
39
|
+
});
|
|
40
|
+
bc.command("create-broadcast").requiredOption("--data <payload>", "Broadcast payload JSON").action(async (o) => {
|
|
41
|
+
const ctx = getCtx();
|
|
42
|
+
const client = createClient(ctx.profile);
|
|
43
|
+
const res = await maybeWrite(ctx, client, "POST", `/broadcast/v1/broadcasts`, parseJsonPayload(o.data));
|
|
44
|
+
printResult(ctx, res);
|
|
45
|
+
});
|
|
46
|
+
bc.command("cancel-broadcast").argument("<broadcastId>").action(async (broadcastId) => {
|
|
47
|
+
const ctx = getCtx();
|
|
48
|
+
const client = createClient(ctx.profile);
|
|
49
|
+
const seg = encodePathSegment(broadcastId, "broadcastId");
|
|
50
|
+
const res = await maybeWrite(ctx, client, "POST", `/broadcast/v1/broadcasts/${seg}/cancel`);
|
|
51
|
+
printResult(ctx, res);
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
// ── Visitor Identification ────────────────────────────────────────────────
|
|
55
|
+
export function registerVisitorIdentification(program, getCtx) {
|
|
56
|
+
const vi = program.command("visitor-identification").description("HubSpot Visitor Identification API (chat widget identity)");
|
|
57
|
+
vi.command("token").description("Generate an identification token for a visitor")
|
|
58
|
+
.requiredOption("--data <payload>", "Payload JSON: { email, firstName?, lastName? }")
|
|
59
|
+
.action(async (o) => {
|
|
60
|
+
const ctx = getCtx();
|
|
61
|
+
const client = createClient(ctx.profile);
|
|
62
|
+
const res = await client.request(`/visitor-identification/v3/tokens/create`, { method: "POST", body: parseJsonPayload(o.data) });
|
|
63
|
+
printResult(ctx, res);
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
// ── Business Units root path (/business-units/v3) — alternate of /settings/v3/business-units ──
|
|
67
|
+
export function registerBusinessUnits(program, getCtx) {
|
|
68
|
+
const bu = program.command("business-units").description("Business Units API (/business-units/v3) — root path, complements /settings/v3/business-units");
|
|
69
|
+
bu.command("list-for-user").argument("<userId>").action(async (userId) => {
|
|
70
|
+
const ctx = getCtx();
|
|
71
|
+
const client = createClient(ctx.profile);
|
|
72
|
+
const seg = encodePathSegment(userId, "userId");
|
|
73
|
+
const res = await client.request(`/business-units/v3/business-units/user/${seg}`);
|
|
74
|
+
printResult(ctx, res);
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
// ── Broadcasts root alias ─────────────────────────────────────────────────
|
|
78
|
+
export function registerBroadcastsRoot(program, getCtx) {
|
|
79
|
+
const b = program.command("broadcasts-root").description("Root /broadcasts path (shortcut alias)");
|
|
80
|
+
b.command("list").action(async () => {
|
|
81
|
+
const ctx = getCtx();
|
|
82
|
+
const client = createClient(ctx.profile);
|
|
83
|
+
const res = await client.request(`/broadcasts`);
|
|
84
|
+
printResult(ctx, res);
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
// ── Form integrations (file upload signed URL redirect) ───────────────────
|
|
88
|
+
export function registerFormIntegrations(program, getCtx) {
|
|
89
|
+
const f = program.command("form-integrations").description("Form integrations API (file upload signed URLs)");
|
|
90
|
+
f.command("file-signed-url").argument("<fileId>").action(async (fileId) => {
|
|
91
|
+
const ctx = getCtx();
|
|
92
|
+
const client = createClient(ctx.profile);
|
|
93
|
+
const seg = encodePathSegment(fileId, "fileId");
|
|
94
|
+
const res = await client.request(`/form/integrations/v1/uploaded/files/signed/url/redirect/${seg}`);
|
|
95
|
+
printResult(ctx, res);
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
// ── Submissions (Forms submissions) ───────────────────────────────────────
|
|
99
|
+
export function registerSubmissions(program, getCtx) {
|
|
100
|
+
const subs = program.command("submissions").description("Form submissions (cross-cutting access)");
|
|
101
|
+
subs.command("list")
|
|
102
|
+
.description("List submissions for a form")
|
|
103
|
+
.argument("<formGuid>")
|
|
104
|
+
.option("--limit <n>", "Max records", "50")
|
|
105
|
+
.option("--after <cursor>", "Paging cursor")
|
|
106
|
+
.action(async (formGuid, o) => {
|
|
107
|
+
const ctx = getCtx();
|
|
108
|
+
const client = createClient(ctx.profile);
|
|
109
|
+
const seg = encodePathSegment(formGuid, "formGuid");
|
|
110
|
+
const params = new URLSearchParams();
|
|
111
|
+
params.set("limit", String(parseNumberFlag(o.limit, "--limit")));
|
|
112
|
+
appendOptional(params, "after", o.after);
|
|
113
|
+
const res = await client.request(`/form-integrations/v1/submissions/forms/${seg}?${params.toString()}`);
|
|
114
|
+
printResult(ctx, res);
|
|
115
|
+
});
|
|
116
|
+
subs.command("search").argument("<portalId>").argument("<formGuid>").action(async (portalId, formGuid) => {
|
|
117
|
+
const ctx = getCtx();
|
|
118
|
+
const client = createClient(ctx.profile);
|
|
119
|
+
const portalSeg = encodePathSegment(portalId, "portalId");
|
|
120
|
+
const formSeg = encodePathSegment(formGuid, "formGuid");
|
|
121
|
+
const res = await client.request(`/submissions/v3/integration/${portalSeg}/forms/${formSeg}/submissions`);
|
|
122
|
+
printResult(ctx, res);
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
// ── Meetings Scheduler (booking links, availability) ──────────────────────
|
|
126
|
+
export function registerScheduler(program, getCtx) {
|
|
127
|
+
const sch = program.command("scheduler").description("HubSpot Meetings Scheduler API (booking pages)");
|
|
128
|
+
sch.command("links-list").option("--limit <n>", "Max records", "50").option("--after <cursor>", "Paging cursor").action(async (o) => {
|
|
129
|
+
const ctx = getCtx();
|
|
130
|
+
const client = createClient(ctx.profile);
|
|
131
|
+
const params = new URLSearchParams();
|
|
132
|
+
params.set("limit", String(parseNumberFlag(o.limit, "--limit")));
|
|
133
|
+
appendOptional(params, "after", o.after);
|
|
134
|
+
const res = await client.request(`/scheduler/v3/meetings/meeting-links?${params.toString()}`);
|
|
135
|
+
printResult(ctx, res);
|
|
136
|
+
});
|
|
137
|
+
sch.command("link-get").argument("<slug>").action(async (slug) => {
|
|
138
|
+
const ctx = getCtx();
|
|
139
|
+
const client = createClient(ctx.profile);
|
|
140
|
+
const seg = encodePathSegment(slug, "slug");
|
|
141
|
+
const res = await client.request(`/scheduler/v3/meetings/meeting-links/book/${seg}`);
|
|
142
|
+
printResult(ctx, res);
|
|
143
|
+
});
|
|
144
|
+
sch.command("book").argument("<slug>").requiredOption("--data <payload>", "Booking payload JSON").action(async (slug, o) => {
|
|
145
|
+
const ctx = getCtx();
|
|
146
|
+
const client = createClient(ctx.profile);
|
|
147
|
+
const seg = encodePathSegment(slug, "slug");
|
|
148
|
+
const res = await maybeWrite(ctx, client, "POST", `/scheduler/v3/meetings/meeting-links/book/${seg}`, parseJsonPayload(o.data));
|
|
149
|
+
printResult(ctx, res);
|
|
150
|
+
});
|
|
151
|
+
sch.command("reschedule").argument("<slug>").requiredOption("--data <payload>", "Reschedule payload JSON").action(async (slug, o) => {
|
|
152
|
+
const ctx = getCtx();
|
|
153
|
+
const client = createClient(ctx.profile);
|
|
154
|
+
const seg = encodePathSegment(slug, "slug");
|
|
155
|
+
const res = await maybeWrite(ctx, client, "POST", `/scheduler/v3/meetings/meeting-links/book/${seg}/reschedule`, parseJsonPayload(o.data));
|
|
156
|
+
printResult(ctx, res);
|
|
157
|
+
});
|
|
158
|
+
sch.command("cancel").argument("<slug>").argument("<bookingId>").action(async (slug, bookingId) => {
|
|
159
|
+
const ctx = getCtx();
|
|
160
|
+
const client = createClient(ctx.profile);
|
|
161
|
+
const seg = encodePathSegment(slug, "slug");
|
|
162
|
+
const bookingSeg = encodePathSegment(bookingId, "bookingId");
|
|
163
|
+
const res = await maybeWrite(ctx, client, "DELETE", `/scheduler/v3/meetings/meeting-links/book/${seg}/${bookingSeg}`);
|
|
164
|
+
printResult(ctx, res);
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
// ── Tax Rates ─────────────────────────────────────────────────────────────
|
|
168
|
+
export function registerTax(program, getCtx) {
|
|
169
|
+
const tax = program.command("tax").description("HubSpot tax rates API (commerce)");
|
|
170
|
+
tax.command("list").action(async () => {
|
|
171
|
+
const ctx = getCtx();
|
|
172
|
+
const client = createClient(ctx.profile);
|
|
173
|
+
const res = await client.request(`/tax/v3/taxes`);
|
|
174
|
+
printResult(ctx, res);
|
|
175
|
+
});
|
|
176
|
+
tax.command("get").argument("<taxId>").action(async (taxId) => {
|
|
177
|
+
const ctx = getCtx();
|
|
178
|
+
const client = createClient(ctx.profile);
|
|
179
|
+
const seg = encodePathSegment(taxId, "taxId");
|
|
180
|
+
const res = await client.request(`/tax/v3/taxes/${seg}`);
|
|
181
|
+
printResult(ctx, res);
|
|
182
|
+
});
|
|
183
|
+
tax.command("create").requiredOption("--data <payload>", "Tax rate payload JSON").action(async (o) => {
|
|
184
|
+
const ctx = getCtx();
|
|
185
|
+
const client = createClient(ctx.profile);
|
|
186
|
+
const res = await maybeWrite(ctx, client, "POST", `/tax/v3/taxes`, parseJsonPayload(o.data));
|
|
187
|
+
printResult(ctx, res);
|
|
188
|
+
});
|
|
189
|
+
tax.command("update").argument("<taxId>").requiredOption("--data <payload>", "Tax rate patch JSON").action(async (taxId, o) => {
|
|
190
|
+
const ctx = getCtx();
|
|
191
|
+
const client = createClient(ctx.profile);
|
|
192
|
+
const seg = encodePathSegment(taxId, "taxId");
|
|
193
|
+
const res = await maybeWrite(ctx, client, "PATCH", `/tax/v3/taxes/${seg}`, parseJsonPayload(o.data));
|
|
194
|
+
printResult(ctx, res);
|
|
195
|
+
});
|
|
196
|
+
tax.command("delete").argument("<taxId>").action(async (taxId) => {
|
|
197
|
+
const ctx = getCtx();
|
|
198
|
+
const client = createClient(ctx.profile);
|
|
199
|
+
const seg = encodePathSegment(taxId, "taxId");
|
|
200
|
+
const res = await maybeWrite(ctx, client, "DELETE", `/tax/v3/taxes/${seg}`);
|
|
201
|
+
printResult(ctx, res);
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
// ── App installs (external install lifecycle for partner apps) ────────────
|
|
205
|
+
export function registerAppinstalls(program, getCtx) {
|
|
206
|
+
const ai = program.command("appinstalls").description("Partner app external install lifecycle");
|
|
207
|
+
ai.command("uninstall").argument("<appId>").action(async (appId) => {
|
|
208
|
+
const ctx = getCtx();
|
|
209
|
+
const client = createClient(ctx.profile);
|
|
210
|
+
const seg = encodePathSegment(appId, "appId");
|
|
211
|
+
const res = await maybeWrite(ctx, client, "DELETE", `/appinstalls/v3/external/install/${seg}`);
|
|
212
|
+
printResult(ctx, res);
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
// ── Marketing: Ads Events, Marketing Analytics ────────────────────────────
|
|
216
|
+
export function registerMarketingExtras(program, getCtx) {
|
|
217
|
+
const me = program.command("marketing-extras").description("Marketing extras: analytics, email events delivery, publishing channel integrations");
|
|
218
|
+
// Ads events — event submission for ad-click attribution
|
|
219
|
+
me.command("ads-events").description("Submit ads events for attribution")
|
|
220
|
+
.requiredOption("--data <payload>", "Ads event payload JSON")
|
|
221
|
+
.action(async (o) => {
|
|
222
|
+
const ctx = getCtx();
|
|
223
|
+
const client = createClient(ctx.profile);
|
|
224
|
+
const res = await maybeWrite(ctx, client, "POST", `/marketing/v3/ads/events`, parseJsonPayload(o.data));
|
|
225
|
+
printResult(ctx, res);
|
|
226
|
+
});
|
|
227
|
+
// Email publish state (legacy /marketing-emails v1 wrapper already covered)
|
|
228
|
+
// AB Test ops at marketing-emails v1 level
|
|
229
|
+
me.command("legacy-email-ab-test").argument("<emailId>")
|
|
230
|
+
.description("Start or manage A/B test on a legacy marketing email")
|
|
231
|
+
.requiredOption("--data <payload>", "AB-test payload JSON")
|
|
232
|
+
.action(async (emailId, o) => {
|
|
233
|
+
const ctx = getCtx();
|
|
234
|
+
const client = createClient(ctx.profile);
|
|
235
|
+
const seg = encodePathSegment(emailId, "emailId");
|
|
236
|
+
const res = await maybeWrite(ctx, client, "POST", `/marketing-emails/v1/emails/${seg}/ab-test`, parseJsonPayload(o.data));
|
|
237
|
+
printResult(ctx, res);
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
// ── CRM Owners extras (owner-centric endpoints we haven't wrapped) ────────
|
|
241
|
+
export function registerOwnersExtras(program, getCtx) {
|
|
242
|
+
const oe = program.command("owners-extras").description("Extra owner endpoints (partner/legacy)");
|
|
243
|
+
oe.command("archived-list").option("--limit <n>", "Max records", "100").option("--after <cursor>", "Paging cursor").action(async (o) => {
|
|
244
|
+
const ctx = getCtx();
|
|
245
|
+
const client = createClient(ctx.profile);
|
|
246
|
+
const params = new URLSearchParams();
|
|
247
|
+
params.set("limit", String(parseNumberFlag(o.limit, "--limit")));
|
|
248
|
+
appendOptional(params, "after", o.after);
|
|
249
|
+
params.set("archived", "true");
|
|
250
|
+
const res = await client.request(`/crm/v3/owners?${params.toString()}`);
|
|
251
|
+
printResult(ctx, res);
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/legacy/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,UAAU,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEpH,6EAA6E;AAC7E,iCAAiC;AACjC,EAAE;AACF,6EAA6E;AAC7E,6EAA6E;AAC7E,8EAA8E;AAC9E,4EAA4E;AAC5E,2CAA2C;AAC3C,6EAA6E;AAE7E,SAAS,MAAM,CAAC,MAAwB;IACtC,OAAO,KAAK,EAAE,IAAY,EAAE,EAAE;QAC5B,MAAM,GAAG,GAAG,MAAM,EAAE,CAAC;QACrB,MAAM,MAAM,GAAG,YAAY,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACzC,OAAO,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC,CAAC;AACJ,CAAC;AAED,6EAA6E;AAC7E,MAAM,UAAU,iBAAiB,CAAC,OAAgB,EAAE,MAAwB;IAC1E,MAAM,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,WAAW,CAAC,8CAA8C,CAAC,CAAC;IACpG,EAAE,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE,CAAC,WAAW,CAAC,MAAM,EAAE,EAAE,MAAM,MAAM,CAAC,MAAM,CAAC,CAAC,gDAAgD,CAAC,CAAC,CAAC,CAAC;IAC9I,EAAE,CAAC,OAAO,CAAC,iBAAiB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AAC,CAAC;IACxB,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
import type { CliContext } from "../../core/output.js";
|
|
3
|
+
/**
|
|
4
|
+
* Legacy HubSpot v1/v2 API surface.
|
|
5
|
+
*
|
|
6
|
+
* HubSpot keeps many older endpoints alive alongside the v3/v4 APIs because portals
|
|
7
|
+
* with long-running integrations (Zapier recipes, custom middleware, old apps) still
|
|
8
|
+
* hit them. Each legacy module is registered as its own top-level command so users
|
|
9
|
+
* who need these paths don't have to fall back to `hubcli api request`.
|
|
10
|
+
*
|
|
11
|
+
* All covered paths come from the HubSpot dev-doc scrape at
|
|
12
|
+
* ~/Desktop/vault/HubSpot Audit/api-mapping/endpoints.json
|
|
13
|
+
* and are kept intentionally lean (list/get/create/update/delete + the most common
|
|
14
|
+
* extras); app-developer surfaces that target <10 endpoints are flattened onto a
|
|
15
|
+
* single command group for simplicity.
|
|
16
|
+
*/
|
|
17
|
+
export declare function registerContactsV1(program: Command, getCtx: () => CliContext): void;
|
|
18
|
+
export declare function registerCompaniesV2(program: Command, getCtx: () => CliContext): void;
|
|
19
|
+
export declare function registerDealsV1(program: Command, getCtx: () => CliContext): void;
|
|
20
|
+
export declare function registerOwnersV2(program: Command, getCtx: () => CliContext): void;
|
|
21
|
+
export declare function registerEngagementsV1(program: Command, getCtx: () => CliContext): void;
|
|
22
|
+
export declare function registerPropertiesLegacy(program: Command, getCtx: () => CliContext): void;
|
|
23
|
+
export declare function registerReportsV2(program: Command, getCtx: () => CliContext): void;
|
|
24
|
+
export declare function registerPaymentsSubscriptions(program: Command, getCtx: () => CliContext): void;
|
|
25
|
+
export declare function registerContentV2(program: Command, getCtx: () => CliContext): void;
|
|
26
|
+
export declare function registerSalesExtensions(program: Command, getCtx: () => CliContext): void;
|
|
27
|
+
export declare function registerComments(program: Command, getCtx: () => CliContext): void;
|
|
28
|
+
export declare function registerCallingV1(program: Command, getCtx: () => CliContext): void;
|
|
29
|
+
export declare function registerChannels(program: Command, getCtx: () => CliContext): void;
|