@wirecat/hubspot-cli 0.0.0-stage → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +53 -0
- package/LICENSE +204 -0
- package/README.md +280 -2
- package/contracts/wirecat.json +3270 -0
- package/dist/bin/hubspot.d.ts +3 -0
- package/dist/bin/hubspot.d.ts.map +1 -0
- package/dist/bin/hubspot.js +40 -0
- package/dist/bin/hubspot.js.map +1 -0
- package/dist/bundle/all-profiles-64JAUYW4.js +279 -0
- package/dist/bundle/anthropic-VJOS4OUM.js +91 -0
- package/dist/bundle/app-server-GXV2OFML.js +245 -0
- package/dist/bundle/bun-M3J2QTR3.js +169 -0
- package/dist/bundle/bun-sqlite-IX3XYA5F.js +76 -0
- package/dist/bundle/chunk-24ERVFJP.js +73 -0
- package/dist/bundle/chunk-2QZK5BEP.js +392 -0
- package/dist/bundle/chunk-2UOJ7DLZ.js +46 -0
- package/dist/bundle/chunk-2VGD63G6.js +604 -0
- package/dist/bundle/chunk-2VGZRYEH.js +334 -0
- package/dist/bundle/chunk-36ITRDYY.js +63116 -0
- package/dist/bundle/chunk-3WLYWRGG.js +1395 -0
- package/dist/bundle/chunk-43EKCUBJ.js +72 -0
- package/dist/bundle/chunk-4W6BMH45.js +731 -0
- package/dist/bundle/chunk-5A6ZYNAQ.js +2003 -0
- package/dist/bundle/chunk-5D4AEUVA.js +24783 -0
- package/dist/bundle/chunk-5GBUCHRU.js +274 -0
- package/dist/bundle/chunk-5K7QLJMM.js +4072 -0
- package/dist/bundle/chunk-65TWQ7BV.js +54 -0
- package/dist/bundle/chunk-7ELMWE3P.js +12066 -0
- package/dist/bundle/chunk-ADLS6FVG.js +24600 -0
- package/dist/bundle/chunk-B3MANLNK.js +602 -0
- package/dist/bundle/chunk-C32AKHTY.js +2310 -0
- package/dist/bundle/chunk-CLAN3FES.js +1246 -0
- package/dist/bundle/chunk-CWXOXIWS.js +46 -0
- package/dist/bundle/chunk-D72URWJE.js +532 -0
- package/dist/bundle/chunk-DB2XKHI4.js +72 -0
- package/dist/bundle/chunk-DBEQI5YM.js +100 -0
- package/dist/bundle/chunk-DFCHHR5M.js +38 -0
- package/dist/bundle/chunk-DFDN6AUB.js +21 -0
- package/dist/bundle/chunk-DRWWJLI6.js +188 -0
- package/dist/bundle/chunk-DSP36YHQ.js +29 -0
- package/dist/bundle/chunk-E52JAS35.js +1028 -0
- package/dist/bundle/chunk-E5WLE7BM.js +78 -0
- package/dist/bundle/chunk-ECEZOLOD.js +230 -0
- package/dist/bundle/chunk-EH6ZEJGT.js +932 -0
- package/dist/bundle/chunk-FBCCBCFH.js +288 -0
- package/dist/bundle/chunk-FKA7DOCK.js +53 -0
- package/dist/bundle/chunk-FOZYMDRL.js +259 -0
- package/dist/bundle/chunk-FPUGMDJV.js +7 -0
- package/dist/bundle/chunk-FTFV3HFW.js +721 -0
- package/dist/bundle/chunk-GPYCBYX5.js +218 -0
- package/dist/bundle/chunk-H3TNVEQX.js +782 -0
- package/dist/bundle/chunk-HC5ZWE5X.js +193 -0
- package/dist/bundle/chunk-HCAZV5NP.js +95 -0
- package/dist/bundle/chunk-HZRQLAHO.js +16 -0
- package/dist/bundle/chunk-IJADZW42.js +195 -0
- package/dist/bundle/chunk-IMJQRPLN.js +92 -0
- package/dist/bundle/chunk-JLDBMEKZ.js +106 -0
- package/dist/bundle/chunk-LOBVOGOE.js +66 -0
- package/dist/bundle/chunk-LXZ66MCH.js +1328 -0
- package/dist/bundle/chunk-MFNMKHML.js +26462 -0
- package/dist/bundle/chunk-MVA5HVKL.js +1392 -0
- package/dist/bundle/chunk-N2XADGL4.js +76 -0
- package/dist/bundle/chunk-NHHJHXMQ.js +58 -0
- package/dist/bundle/chunk-NUU4WZVL.js +52 -0
- package/dist/bundle/chunk-NWHEHV3K.js +133 -0
- package/dist/bundle/chunk-NXERIDPJ.js +319 -0
- package/dist/bundle/chunk-O3DYRCIT.js +23 -0
- package/dist/bundle/chunk-O55RWNSH.js +161 -0
- package/dist/bundle/chunk-P5BHKKBI.js +206 -0
- package/dist/bundle/chunk-PPHBRESD.js +82 -0
- package/dist/bundle/chunk-PVKF24ZW.js +364 -0
- package/dist/bundle/chunk-Q2OLOMHL.js +4045 -0
- package/dist/bundle/chunk-QGFX5MXL.js +460 -0
- package/dist/bundle/chunk-QJW35N5V.js +761 -0
- package/dist/bundle/chunk-QU25DA5N.js +360 -0
- package/dist/bundle/chunk-RMIYKDUL.js +1068 -0
- package/dist/bundle/chunk-RR5MX5TM.js +142 -0
- package/dist/bundle/chunk-SDQGB4KB.js +185 -0
- package/dist/bundle/chunk-TBJYLC5K.js +2788 -0
- package/dist/bundle/chunk-TI46WQXQ.js +1197 -0
- package/dist/bundle/chunk-TKVL2C3B.js +170 -0
- package/dist/bundle/chunk-TLKEPUAV.js +786 -0
- package/dist/bundle/chunk-TOSCB4SO.js +1227 -0
- package/dist/bundle/chunk-TP7GDWVF.js +6848 -0
- package/dist/bundle/chunk-URX6YDUL.js +9393 -0
- package/dist/bundle/chunk-UUMUL4L3.js +72 -0
- package/dist/bundle/chunk-VOH7S5M4.js +40963 -0
- package/dist/bundle/chunk-W53EJOFQ.js +63 -0
- package/dist/bundle/chunk-W7HM2VGO.js +24 -0
- package/dist/bundle/chunk-WE4UFASG.js +88 -0
- package/dist/bundle/chunk-X2M6NIQG.js +18 -0
- package/dist/bundle/chunk-XRREFEIW.js +372 -0
- package/dist/bundle/chunk-Y5E2WNWB.js +35 -0
- package/dist/bundle/chunk-YMCY7VRE.js +1846 -0
- package/dist/bundle/chunk-Z73OL5HV.js +41 -0
- package/dist/bundle/chunk-ZVVMGPBJ.js +50 -0
- package/dist/bundle/command-contract-C6CBFXZF.js +40 -0
- package/dist/bundle/command-server-entry-DJKVVZCQ.js +169 -0
- package/dist/bundle/decode-FC65Y4IV.js +297 -0
- package/dist/bundle/definitions-MVPICAWV.js +2991 -0
- package/dist/bundle/dispatch-KOISQ5QJ.js +411 -0
- package/dist/bundle/dist-7TGU56B2.js +7577 -0
- package/dist/bundle/echarts-FVTUDXDU.js +42501 -0
- package/dist/bundle/embed-VNBZFPYH.js +38 -0
- package/dist/bundle/embedder-6U4NOFRO.js +111 -0
- package/dist/bundle/failure-FZ6VYKEQ.js +25 -0
- package/dist/bundle/first-run-UWAFSINQ.js +29 -0
- package/dist/bundle/first-screen-RTVMGHAE.js +40 -0
- package/dist/bundle/hubspot.js +198 -0
- package/dist/bundle/instructions-HET7BCYK.js +11 -0
- package/dist/bundle/mcp-RGNRW77S.js +167 -0
- package/dist/bundle/meeting-combined-L5AGBPYX.js +25 -0
- package/dist/bundle/meeting-model-NTB4RK3F.js +25 -0
- package/dist/bundle/meeting-semantic-JY3OGCBS.js +22 -0
- package/dist/bundle/node-CXZIFHZC.js +176 -0
- package/dist/bundle/node-P4E63KXA.js +2340 -0
- package/dist/bundle/node-TLZSIHIJ.js +21 -0
- package/dist/bundle/node-sqlite-P3O7XN7Q.js +74 -0
- package/dist/bundle/oauth-HNCY4B2S.js +20 -0
- package/dist/bundle/open-F4P6YV54.js +23 -0
- package/dist/bundle/openai-4AICLIK3.js +238 -0
- package/dist/bundle/process-5RUXWGYS.js +91 -0
- package/dist/bundle/program-XA4C44Z4.js +9374 -0
- package/dist/bundle/prompt-NFMDVBZ4.js +17 -0
- package/dist/bundle/recognize-DKN3RY4V.js +26 -0
- package/dist/bundle/remote-6QHAGQWY.js +31 -0
- package/dist/bundle/rerank-M4KHEHUZ.js +52 -0
- package/dist/bundle/schemas-JRL3DLMP.js +952 -0
- package/dist/bundle/serve-DNU43ND6.js +199 -0
- package/dist/bundle/server-ATG5KY7K.js +207 -0
- package/dist/bundle/server-VNWVVH7A.js +77 -0
- package/dist/bundle/source-54HR4IWG.js +661 -0
- package/dist/bundle/sqlite-runtime-EMQAC63N.js +20 -0
- package/dist/bundle/state-T45CX7VY.js +36 -0
- package/dist/bundle/store-6LCEVBAZ.js +176 -0
- package/dist/bundle/store-6TZ2FCVA.js +295 -0
- package/dist/bundle/store-DXWYNVVB.js +32 -0
- package/dist/bundle/store-maintenance-command-J57HCJYY.js +68 -0
- package/dist/bundle/writer-NLLI5YRM.js +79 -0
- package/dist/commands/account.d.ts +3 -0
- package/dist/commands/account.d.ts.map +1 -0
- package/dist/commands/account.js +87 -0
- package/dist/commands/account.js.map +1 -0
- package/dist/commands/api.d.ts +9 -0
- package/dist/commands/api.d.ts.map +1 -0
- package/dist/commands/api.js +70 -0
- package/dist/commands/api.js.map +1 -0
- package/dist/commands/crm-shared.d.ts +8 -0
- package/dist/commands/crm-shared.d.ts.map +1 -0
- package/dist/commands/crm-shared.js +109 -0
- package/dist/commands/crm-shared.js.map +1 -0
- package/dist/commands/schedule.d.ts +3 -0
- package/dist/commands/schedule.d.ts.map +1 -0
- package/dist/commands/schedule.js +9 -0
- package/dist/commands/schedule.js.map +1 -0
- package/dist/commands/session.d.ts +14 -0
- package/dist/commands/session.d.ts.map +1 -0
- package/dist/commands/session.js +164 -0
- package/dist/commands/session.js.map +1 -0
- package/dist/config.d.ts +60 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +153 -0
- package/dist/config.js.map +1 -0
- package/dist/context.d.ts +88 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +137 -0
- package/dist/context.js.map +1 -0
- package/dist/crm/activities.d.ts +24 -0
- package/dist/crm/activities.d.ts.map +1 -0
- package/dist/crm/activities.js +214 -0
- package/dist/crm/activities.js.map +1 -0
- package/dist/crm/associations.d.ts +20 -0
- package/dist/crm/associations.d.ts.map +1 -0
- package/dist/crm/associations.js +47 -0
- package/dist/crm/associations.js.map +1 -0
- package/dist/crm/records.d.ts +63 -0
- package/dist/crm/records.d.ts.map +1 -0
- package/dist/crm/records.js +333 -0
- package/dist/crm/records.js.map +1 -0
- package/dist/crm/search.d.ts +57 -0
- package/dist/crm/search.d.ts.map +1 -0
- package/dist/crm/search.js +47 -0
- package/dist/crm/search.js.map +1 -0
- package/dist/crm/source.d.ts +37 -0
- package/dist/crm/source.d.ts.map +1 -0
- package/dist/crm/source.js +366 -0
- package/dist/crm/source.js.map +1 -0
- package/dist/crm/writer.d.ts +15 -0
- package/dist/crm/writer.d.ts.map +1 -0
- package/dist/crm/writer.js +199 -0
- package/dist/crm/writer.js.map +1 -0
- package/dist/generated/definitions.d.ts +3 -0
- package/dist/generated/definitions.d.ts.map +1 -0
- package/dist/generated/definitions.js +2987 -0
- package/dist/generated/definitions.js.map +1 -0
- package/dist/generated/manifest.d.ts +6 -0
- package/dist/generated/manifest.d.ts.map +1 -0
- package/dist/generated/manifest.js +6504 -0
- package/dist/generated/manifest.js.map +1 -0
- package/dist/generated/schemas.d.ts +205 -0
- package/dist/generated/schemas.d.ts.map +1 -0
- package/dist/generated/schemas.js +810 -0
- package/dist/generated/schemas.js.map +1 -0
- package/dist/generated/types.d.ts +1114 -0
- package/dist/generated/types.d.ts.map +1 -0
- package/dist/generated/types.js +5 -0
- package/dist/generated/types.js.map +1 -0
- package/dist/hubspot/account.d.ts +12 -0
- package/dist/hubspot/account.d.ts.map +1 -0
- package/dist/hubspot/account.js +23 -0
- package/dist/hubspot/account.js.map +1 -0
- package/dist/hubspot/transport.d.ts +81 -0
- package/dist/hubspot/transport.d.ts.map +1 -0
- package/dist/hubspot/transport.js +354 -0
- package/dist/hubspot/transport.js.map +1 -0
- package/dist/identity.d.ts +7 -0
- package/dist/identity.d.ts.map +1 -0
- package/dist/identity.js +32 -0
- package/dist/identity.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/program.d.ts +6 -0
- package/dist/program.d.ts.map +1 -0
- package/dist/program.js +78 -0
- package/dist/program.js.map +1 -0
- package/dist/reasons.d.ts +10 -0
- package/dist/reasons.d.ts.map +1 -0
- package/dist/reasons.js +33 -0
- package/dist/reasons.js.map +1 -0
- package/dist/setup/flow.d.ts +2 -0
- package/dist/setup/flow.d.ts.map +1 -0
- package/dist/setup/flow.js +97 -0
- package/dist/setup/flow.js.map +1 -0
- package/dist/setup/texts.en.json +19 -0
- package/dist/setup/texts.es.json +19 -0
- package/dist/setup/texts.ru.json +19 -0
- package/dist/store.d.ts +16 -0
- package/dist/store.d.ts.map +1 -0
- package/dist/store.js +34 -0
- package/dist/store.js.map +1 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +2 -0
- package/dist/version.js.map +1 -0
- package/dist/wcat.d.ts +3 -0
- package/dist/wcat.d.ts.map +1 -0
- package/dist/wcat.js +4 -0
- package/dist/wcat.js.map +1 -0
- package/dist/whoami.d.ts +19 -0
- package/dist/whoami.d.ts.map +1 -0
- package/dist/whoami.js +15 -0
- package/dist/whoami.js.map +1 -0
- package/package.json +98 -4
- package/skills/hubspot-cli/SKILL.md +102 -0
- package/skills/hubspot-cli/references/api/api-advanced.md +51 -0
- package/skills/hubspot-cli/references/api/api-basic.md +1064 -0
- package/skills/hubspot-cli/references/api/api-batch.md +724 -0
- package/skills/hubspot-cli/references/api/api-search.md +147 -0
- package/skills/hubspot-cli/references/api.md +16 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"identity.js","sourceRoot":"","sources":["../src/identity.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC,MAAM,CAAC,MAAM,OAAO,GAAG,sBAAsB,CAAA;AAE7C,MAAM,CAAC,MAAM,QAAQ,GAAgB;IACnC,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,aAAa;IACtB,SAAS,EAAE,WAAW;IACtB,WAAW,EAAE,yCAAyC;IACtD,OAAO,EAAE,OAAO;IAChB,MAAM,EAAE,uDAAuD;IAC/D,SAAS,EAAE,KAAK;IAChB,gBAAgB,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;IACpC,sHAAsH;IACtH,SAAS,EAAE,GAAG;IACd,MAAM,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE;CAC/C,CAAA;AAED,qHAAqH;AACrH,wCAAwC;AACxC,MAAM,CAAC,MAAM,OAAO,GAAqB;IACvC,GAAG,QAAQ;IACX,IAAI,EAAE,mDAAmD;IACzD,+FAA+F;IAC/F,KAAK,EAAE,CAAC,gBAAgB,CAAC;IACzB,OAAO,EAAE,4CAA4C;IACrD,KAAK,EAAE,oCAAoC;IAC3C,MAAM,EAAE;QACN,KAAK,EAAE,6FAA6F;QACpG,IAAI,EAAE,yIAAyI;KAChJ;CACF,CAAA;AAED,MAAM,CAAC,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,gCAAgC,EAAE,OAAO,IAAI,CAAC,GAAG,CAAC,CAAA"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,cAAc,CAAA"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,cAAc,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ProgramDefinition, type ProgramOptions, type RunOptions } from "@wirecat/cli-core/cli";
|
|
2
|
+
import type { Command } from "commander";
|
|
3
|
+
export declare const definition: () => ProgramDefinition;
|
|
4
|
+
export declare const createProgram: (options?: ProgramOptions) => Command;
|
|
5
|
+
export declare const run: (argv: string[], options?: RunOptions) => Promise<number>;
|
|
6
|
+
//# sourceMappingURL=program.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"program.d.ts","sourceRoot":"","sources":["../src/program.ts"],"names":[],"mappings":"AAEA,OAAO,EAQL,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,UAAU,EAMhB,MAAM,uBAAuB,CAAA;AAE9B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAwCxC,eAAO,MAAM,UAAU,QAAO,iBAqC5B,CAAA;AAEF,eAAO,MAAM,aAAa,aAAc,cAAc,KAAG,OAAqD,CAAA;AAE9G,eAAO,MAAM,GAAG,SAAU,MAAM,EAAE,YAAY,UAAU,KAAG,OAAO,CAAC,MAAM,CAA2C,CAAA"}
|
package/dist/program.js
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { join } from "node:path";
|
|
2
|
+
import { resolvePaths } from "@wirecat/cli-base";
|
|
3
|
+
import { appDoctorCommand, appMcpCommand, commandsCommand, configCommand, createProgram as createSharedProgram, outputFor, ProfileTokenStore, run as runShared, runsCommand, setupCommand, skillCommand, upgradeCommand, } from "@wirecat/cli-core/cli";
|
|
4
|
+
import { appUpdate } from "@wirecat/cli-core/update";
|
|
5
|
+
import { accountCommand } from "./commands/account.js";
|
|
6
|
+
import { apiCommand } from "./commands/api.js";
|
|
7
|
+
import { crmSharedCommands } from "./commands/crm-shared.js";
|
|
8
|
+
import { scheduleCommand } from "./commands/schedule.js";
|
|
9
|
+
import { sessionCommand } from "./commands/session.js";
|
|
10
|
+
import { configuration } from "./config.js";
|
|
11
|
+
import { SERVICE } from "./hubspot/transport.js";
|
|
12
|
+
import { IDENTITY, PACKAGE, SKILL } from "./identity.js";
|
|
13
|
+
import { hubspotSetup } from "./setup/flow.js";
|
|
14
|
+
const update = appUpdate({
|
|
15
|
+
packageName: PACKAGE,
|
|
16
|
+
command: IDENTITY.command,
|
|
17
|
+
version: IDENTITY.version,
|
|
18
|
+
entry: import.meta.url,
|
|
19
|
+
statePath: (env) => join(resolvePaths({ appName: IDENTITY.appName, prefix: IDENTITY.envPrefix, env }).state, "update-check.json"),
|
|
20
|
+
// biome-ignore lint/plugin/no-own-settings: the update check runs before any command exists to give baseContext
|
|
21
|
+
enabled: (env) => configuration.resolveSettings({}, { env, needsProfile: false }).updateCheck,
|
|
22
|
+
offVariables: [`${IDENTITY.envPrefix}_NO_UPDATE_CHECK`],
|
|
23
|
+
});
|
|
24
|
+
const mcpCommand = () => appMcpCommand(IDENTITY, configuration, {
|
|
25
|
+
name: SERVICE,
|
|
26
|
+
untrusted: [
|
|
27
|
+
"contact, company and deal names",
|
|
28
|
+
"pipeline and stage names",
|
|
29
|
+
"owner names",
|
|
30
|
+
"property values, notes and activity text",
|
|
31
|
+
"e-mail addresses, phone numbers and links",
|
|
32
|
+
"whatever api returns",
|
|
33
|
+
],
|
|
34
|
+
permissionExample: "people.list=deny",
|
|
35
|
+
skill: SKILL,
|
|
36
|
+
signedIn: (profile, env, keyring) => new ProfileTokenStore({ app: IDENTITY, env, ...(keyring ? { keyring } : {}) }).signedIn(profile),
|
|
37
|
+
});
|
|
38
|
+
export const definition = () => ({
|
|
39
|
+
app: IDENTITY,
|
|
40
|
+
// The whole object: cli-core refuses a command by its key only when it gets the permission table too.
|
|
41
|
+
configuration,
|
|
42
|
+
firstScreen: {
|
|
43
|
+
pitch: "a HubSpot account's CRM for scripts and agents, read into one local store.",
|
|
44
|
+
can: [
|
|
45
|
+
{ command: "sync", does: "copy your deals, contacts and companies; the next sync takes the changes" },
|
|
46
|
+
{ command: "deals list status:open", does: "open deals with stage, amount and owner, from the store, offline" },
|
|
47
|
+
{ command: 'search all "kitchen"', does: "stored deals beside your other WireCat tools' data" },
|
|
48
|
+
{ command: 'people list "Anna"', does: "any contact, read live from the account" },
|
|
49
|
+
{ command: "activities list", does: "notes, calls, e-mails, meetings and tasks on your deals" },
|
|
50
|
+
{ command: "deals close deal:12 won", does: "close a deal won or lost in HubSpot, with the key's write scopes" },
|
|
51
|
+
{ command: "api deals-list --limit 5", does: "any operation of HubSpot's CRM API, one command per operation" },
|
|
52
|
+
],
|
|
53
|
+
start: `${IDENTITY.command} work session start`,
|
|
54
|
+
},
|
|
55
|
+
commands: () => [
|
|
56
|
+
commandsCommand(IDENTITY),
|
|
57
|
+
sessionCommand(),
|
|
58
|
+
accountCommand(),
|
|
59
|
+
...crmSharedCommands(),
|
|
60
|
+
apiCommand(),
|
|
61
|
+
scheduleCommand(),
|
|
62
|
+
appDoctorCommand(IDENTITY, configuration, { packageName: PACKAGE }),
|
|
63
|
+
skillCommand(IDENTITY, SKILL),
|
|
64
|
+
mcpCommand(),
|
|
65
|
+
upgradeCommand(IDENTITY, PACKAGE, (command) => ({
|
|
66
|
+
...outputFor(command),
|
|
67
|
+
installer: () => update.installer({}),
|
|
68
|
+
latest: () => update.latest({}),
|
|
69
|
+
install: (argv) => update.runUpdate(argv, {}),
|
|
70
|
+
})),
|
|
71
|
+
configCommand(IDENTITY, configuration),
|
|
72
|
+
setupCommand(hubspotSetup),
|
|
73
|
+
runsCommand(IDENTITY),
|
|
74
|
+
],
|
|
75
|
+
});
|
|
76
|
+
export const createProgram = (options) => createSharedProgram(definition(), options);
|
|
77
|
+
export const run = (argv, options) => runShared(argv, definition(), options);
|
|
78
|
+
//# sourceMappingURL=program.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"program.js","sourceRoot":"","sources":["../src/program.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EACL,gBAAgB,EAChB,aAAa,EACb,eAAe,EACf,aAAa,EACb,aAAa,IAAI,mBAAmB,EACpC,SAAS,EACT,iBAAiB,EAIjB,GAAG,IAAI,SAAS,EAChB,WAAW,EACX,YAAY,EACZ,YAAY,EAC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AC;QACd,eAAe,CAAC,QAAQ,CAAC;QACzB,cAAc,EAAE;QAChB,cAAc,EAAE;QAChB,GAAG,iBAAiB,EAAE;QACtB,UAAU,EAAE;QACZ,eAAe,EAAE;QACjB,gBAAgB,CAAC,QAAQ,EAAE,aAAa,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC;QACnE,YAAY,CAAC,QAAQ,EAAE,KAAK,CAAC;QAC7B,UAAU,EAAE;QACZ,cAAc,CAAC,QAAQ,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;YAC9C,GAAG,SAAS,CAAC,OAAO,CAAC;YACrB,SAAS,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,CAAC;YACrC,MAAM,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;YAC/B,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,EAAE,EAAE,CAAC;SAC9C,CAAC,CAAC;QACH,aAAa,CAAC,QAAQ,EAAE,aAAa,CAAC;QACtC,YAAY,CAAC,YAAY,CAAC;QAC1B,WAAW,CAAC,QAAQ,CAAC;KACtB;CACF,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,OAAwB,EAAW,EAAE,CAAC,mBAAmB,CAAC,UAAU,EAAE,EAAE,OAAO,CAAC,CAAA;AAE9G,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,IAAc,EAAE,OAAoB,EAAmB,EAAE,CAAC,SAAS,CAAC,IAAI,EAAE,UAAU,EAAE,EAAE,OAAO,CAAC,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const REASONS: {
|
|
2
|
+
reason: string;
|
|
3
|
+
code: "authentication_error" | "cancelled" | "configuration_error" | "confirmation_required" | "conflict" | "internal_error" | "invalid_response" | "network_error" | "not_found" | "outcome_unknown" | "permission_error" | "provider_error" | "provider_unavailable" | "rate_limited" | "timeout" | "validation_error";
|
|
4
|
+
message: string;
|
|
5
|
+
details: string[];
|
|
6
|
+
step?: string | undefined;
|
|
7
|
+
}[];
|
|
8
|
+
/** Detail keys hubspot's errors carry beyond cli-core's own. */
|
|
9
|
+
export declare const DETAILS: string[];
|
|
10
|
+
//# sourceMappingURL=reasons.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reasons.d.ts","sourceRoot":"","sources":["../src/reasons.ts"],"names":[],"mappings":"AA2BA,eAAO,MAAM,OAAO;;;;;;GAOnB,CAAA;AAED,gEAAgE;AAChE,eAAO,MAAM,OAAO,UAAwD,CAAA"}
|
package/dist/reasons.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { defineReasons } from "@wirecat/cli-base/standards";
|
|
2
|
+
import { CORE_REASONS } from "@wirecat/cli-core";
|
|
3
|
+
/** cli-core's registry refuses a reason listed twice, and core adds reasons of its own over time; its entry wins. */
|
|
4
|
+
const CORE = new Set(CORE_REASONS.map((one) => one.reason));
|
|
5
|
+
/** hubspot's own reasons; the shared ones (`offline.refused`, `session.missing`) are cli-core's. */
|
|
6
|
+
const OWN = [
|
|
7
|
+
["session.duplicate", "conflict", "another profile here already signs in to this HubSpot account"],
|
|
8
|
+
["account.id-missing", "configuration_error", "WCHUBSPOT_TOKEN needs WCHUBSPOT_ACCOUNT, the HubSpot account's id"],
|
|
9
|
+
["account.id-malformed", "configuration_error", "WCHUBSPOT_ACCOUNT must be the HubSpot account's id, digits only"],
|
|
10
|
+
[
|
|
11
|
+
"account.unchecked",
|
|
12
|
+
"configuration_error",
|
|
13
|
+
"a WCHUBSPOT_TOKEN profile uses the local copy only after an online run checked it",
|
|
14
|
+
],
|
|
15
|
+
["account.mismatch", "configuration_error", "WCHUBSPOT_ACCOUNT names another account than the token's own"],
|
|
16
|
+
["account-remove.account-shared", "conflict", "another profile reads the same account, whose copy the store shares"],
|
|
17
|
+
["session.expired", "authentication_error", "HubSpot refused the key: it was revoked, expired or mistyped"],
|
|
18
|
+
["hubspot.scope-missing", "permission_error", "the HubSpot key lacks a scope this command needs"],
|
|
19
|
+
["hubspot.access-denied", "permission_error", "the HubSpot key may not read this"],
|
|
20
|
+
["hubspot.daily-limit", "rate_limited", "the HubSpot account spent its daily API allowance, shared by all its apps"],
|
|
21
|
+
["hubspot.rate-limit", "rate_limited", "HubSpot asked to slow down for a few seconds"],
|
|
22
|
+
["hubspot.too-many-filters", "validation_error", "a HubSpot search takes at most 6 conditions together"],
|
|
23
|
+
["hubspot.search-cap", "validation_error", "a HubSpot search reaches only its first 10,000 results"],
|
|
24
|
+
];
|
|
25
|
+
export const REASONS = defineReasons(OWN.filter(([reason]) => !CORE.has(reason)).map(([reason, code, message]) => ({
|
|
26
|
+
reason,
|
|
27
|
+
code,
|
|
28
|
+
message,
|
|
29
|
+
details: [],
|
|
30
|
+
})));
|
|
31
|
+
/** Detail keys hubspot's errors carry beyond cli-core's own. */
|
|
32
|
+
export const DETAILS = ["account", "profile", "profiles", "status", "scope"];
|
|
33
|
+
//# sourceMappingURL=reasons.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reasons.js","sourceRoot":"","sources":["../src/reasons.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAEhD,qHAAqH;AACrH,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAA;AAE3D,oGAAoG;AACpG,MAAM,GAAG,GAAsD;IAC7D,CAAC,mBAAmB,EAAE,UAAU,EAAE,+DAA+D,CAAC;IAClG,CAAC,oBAAoB,EAAE,qBAAqB,EAAE,mEAAmE,CAAC;IAClH,CAAC,sBAAsB,EAAE,qBA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+
import { CliError } from "@wirecat/cli-base";
|
|
2
|
+
import { defineSetup } from "@wirecat/cli-core/cli";
|
|
3
|
+
import { checkedToken } from "../commands/session.js";
|
|
4
|
+
import { configuration } from "../config.js";
|
|
5
|
+
import { storedSignIn, withHub } from "../context.js";
|
|
6
|
+
import { IDENTITY } from "../identity.js";
|
|
7
|
+
import { accountAnswer } from "../whoami.js";
|
|
8
|
+
import en from "./texts.en.json" with { type: "json" };
|
|
9
|
+
import es from "./texts.es.json" with { type: "json" };
|
|
10
|
+
import ru from "./texts.ru.json" with { type: "json" };
|
|
11
|
+
/** The same proof `session start` runs, and the same sign-in it keeps: the token with the account beside it. */
|
|
12
|
+
const check = async ({ command, secrets }) => {
|
|
13
|
+
const typed = secrets.token?.trim();
|
|
14
|
+
if (typed) {
|
|
15
|
+
const { who, signIn } = await checkedToken(command, typed);
|
|
16
|
+
return { ...who, keep: { secrets: { token: signIn }, account: who.account } };
|
|
17
|
+
}
|
|
18
|
+
if (!storedSignIn(command))
|
|
19
|
+
throw new CliError("validation_error", "this profile has no key yet: paste one", { param: "token" });
|
|
20
|
+
const who = await withHub(command, accountAnswer);
|
|
21
|
+
return { ...who, keep: { account: who.account } };
|
|
22
|
+
};
|
|
23
|
+
/** Read scopes only (HubSpot's "Scopes" page); a scope left out fails the commands that need it, nothing else. */
|
|
24
|
+
const SCOPES = [
|
|
25
|
+
"crm.objects.contacts.read",
|
|
26
|
+
"crm.objects.companies.read",
|
|
27
|
+
"crm.objects.deals.read",
|
|
28
|
+
"crm.objects.owners.read",
|
|
29
|
+
"crm.schemas.contacts.read",
|
|
30
|
+
"crm.schemas.companies.read",
|
|
31
|
+
"crm.schemas.deals.read",
|
|
32
|
+
"sales-email-read",
|
|
33
|
+
].join("\n");
|
|
34
|
+
export const hubspotSetup = defineSetup({
|
|
35
|
+
app: IDENTITY,
|
|
36
|
+
configuration,
|
|
37
|
+
check,
|
|
38
|
+
start: "key",
|
|
39
|
+
steps: {
|
|
40
|
+
key: {
|
|
41
|
+
title: "key.title",
|
|
42
|
+
blocks: [
|
|
43
|
+
{ type: "text", text: "key.intro" },
|
|
44
|
+
{ type: "text", text: "key.service" },
|
|
45
|
+
{ type: "code", code: SCOPES, copy: true },
|
|
46
|
+
{ type: "note", role: "tip", text: "key.leads" },
|
|
47
|
+
{
|
|
48
|
+
type: "group",
|
|
49
|
+
role: "details",
|
|
50
|
+
title: "key.private.title",
|
|
51
|
+
blocks: [{ type: "text", text: "key.private" }],
|
|
52
|
+
},
|
|
53
|
+
],
|
|
54
|
+
next: "token",
|
|
55
|
+
},
|
|
56
|
+
token: {
|
|
57
|
+
title: "token.title",
|
|
58
|
+
blocks: [
|
|
59
|
+
{ type: "text", text: "token.where" },
|
|
60
|
+
{ type: "input", id: "token", secret: "token", input: "password", label: "token.label", hint: "token.hint" },
|
|
61
|
+
{ type: "note", role: "tip", text: "token.rights" },
|
|
62
|
+
],
|
|
63
|
+
next: "check",
|
|
64
|
+
},
|
|
65
|
+
check: {
|
|
66
|
+
kind: "run",
|
|
67
|
+
title: "check.title",
|
|
68
|
+
action: "apply",
|
|
69
|
+
blocks: [{ type: "text", text: "check.body" }],
|
|
70
|
+
next: [
|
|
71
|
+
{ when: { result: "check", is: "ok" }, to: "done" },
|
|
72
|
+
{ when: { result: "check", error: "authentication_error" }, to: "token" },
|
|
73
|
+
{ when: { result: "check", error: "permission_error" }, to: "key" },
|
|
74
|
+
{ when: { result: "check", error: "validation_error" }, to: "token" },
|
|
75
|
+
{ when: { result: "check", error: "conflict" }, to: "token" },
|
|
76
|
+
{ to: "failed" },
|
|
77
|
+
],
|
|
78
|
+
back: false,
|
|
79
|
+
},
|
|
80
|
+
failed: {
|
|
81
|
+
kind: "done",
|
|
82
|
+
title: "failed.title",
|
|
83
|
+
blocks: [{ type: "note", role: "danger", text: "failed.body" }],
|
|
84
|
+
back: true,
|
|
85
|
+
},
|
|
86
|
+
done: {
|
|
87
|
+
kind: "done",
|
|
88
|
+
title: "done.title",
|
|
89
|
+
blocks: [
|
|
90
|
+
{ type: "text", text: "done.body" },
|
|
91
|
+
{ type: "code", code: "hubspot <profile> sync\nhubspot <profile> deals list status:open", copy: true },
|
|
92
|
+
],
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
texts: { en, ru, es },
|
|
96
|
+
});
|
|
97
|
+
//# sourceMappingURL=flow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flow.js","sourceRoot":"","sources":["../../src/setup/flow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,EAAE,WAAW,EAAmB,MAAM,uBAAuB,CAAA;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAC5C,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAC5C,OAAO,EAAE,MAAM,iBAAiB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAA;AACtD,OAAO,EAAE,MAAM,iBAAiB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAA;AACtD,OAAO,EAAE,MAAM,iBAAiB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAA;AAEtD,gHAAgH;AAChH,MAAM,KAAK,GAAe,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE;IACvD,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,EAAE,IAAI,EAAE,CAAA;IACnC,IAAI,KAAK,EAAE,CAAC;QACV,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,MAAM,YAAY,CAAC,OAAO,EAAE,KAAK,CAAC,CAAA;QAC1D,OAAO,EAAE,GAAG,GAAG,EAAE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AAE,EAAE,EAAE,EAAE,OAAO,EAAE;gBAC7D,EAAE,EAAE,EAAE,QAAQ,EAAE;aACjB;YACD,IAAI,EAAE,KAAK;SACZ;QACD,MAAM,EAAE;YACN,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,cAAc;YACrB,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;YAC/D,IAAI,EAAE,IAAI;SACX;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,YAAY;YACnB,MAAM,EAAE;gBACN,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE;gBACnC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,kEAAkE,EAAE,IAAI,EAAE,IAAI,EAAE;aACvG;SACF;KACF;IACD,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE;CACtB,CAAC,CAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"key.title": "Make a key",
|
|
3
|
+
"key.intro": "hubspot reads your deals, contacts and companies from one HubSpot account. It changes them only if you give the key the write scopes too.",
|
|
4
|
+
"key.service": "A super admin, or a user with HubSpot's **Developer tools access** permission, does this once in HubSpot:\n\n1. Open **Development**, then **Keys → Service keys** in the left menu. Some accounts show it under **Settings → Integrations → Service keys** instead.\n2. Click **Create service key** and name it *WireCat*.\n3. Click **Add new scope**, tick each read scope below, and click **Update**. A key gets only the scopes its maker has.\n4. Click **Create** and confirm.\n\nHubSpot's guide: https://developers.hubspot.com/docs/apps/developer-platform/build-apps/authentication/account-service-keys\n\nThe read scopes:",
|
|
5
|
+
"key.leads": "On Sales Hub Professional or Enterprise, add `crm.objects.leads.read` to read leads too. Add `tickets` if you want `api` to read tickets. To let hubspot change records, add `crm.objects.contacts.write`, `crm.objects.companies.write` and `crm.objects.deals.write`; without them the key only reads.",
|
|
6
|
+
"key.private.title": "Already have a legacy private app?",
|
|
7
|
+
"key.private": "HubSpot stopped new private apps on 26 October 2026, but an existing one's token still works. Give it the same read scopes, then copy its access token from the app's **Auth** tab.",
|
|
8
|
+
"token.title": "Paste the key",
|
|
9
|
+
"token.where": "In **Keys → Service keys**, click the key's name, then **Show** and **Copy**. A private app's token is on its **Auth** tab. Both start with `pat-`.",
|
|
10
|
+
"token.label": "Service key or access token",
|
|
11
|
+
"token.hint": "Kept in your system keyring or, without one, in a file only you can read.",
|
|
12
|
+
"token.rights": "The key reads and changes only what its scopes allow. Each profile signs in to its own HubSpot account: a second profile on the same account is refused.",
|
|
13
|
+
"check.title": "Checking the key",
|
|
14
|
+
"check.body": "hubspot asks HubSpot which account the key belongs to. It saves the key only if HubSpot answers.",
|
|
15
|
+
"failed.title": "The check did not pass",
|
|
16
|
+
"failed.body": "The key did not pass hubspot's check, so nothing was saved. Check the key and your connection, then try again.",
|
|
17
|
+
"done.title": "Connected",
|
|
18
|
+
"done.body": "The profile is ready. Copy your deals and their contacts and companies into WireCat, then list the open ones:"
|
|
19
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"key.title": "Crea una clave",
|
|
3
|
+
"key.intro": "hubspot lee tus negocios, contactos y empresas de una cuenta de HubSpot. Solo los cambia si le das a la clave también los permisos de escritura.",
|
|
4
|
+
"key.service": "Un superadministrador, o un usuario con el permiso **Developer tools access** de HubSpot, lo hace una vez en HubSpot:\n\n1. Abre **Development** y luego **Keys → Service keys** en el menú de la izquierda. En algunas cuentas está en **Settings → Integrations → Service keys**.\n2. Haz clic en **Create service key** y llámala *WireCat*.\n3. Haz clic en **Add new scope**, marca cada permiso de lectura de abajo y haz clic en **Update**. Una clave solo recibe los permisos que tiene quien la crea.\n4. Haz clic en **Create** y confirma.\n\nGuía de HubSpot: https://developers.hubspot.com/docs/apps/developer-platform/build-apps/authentication/account-service-keys\n\nLos permisos de lectura:",
|
|
5
|
+
"key.leads": "Con Sales Hub Professional o Enterprise, añade `crm.objects.leads.read` para leer también los leads. Añade `tickets` si quieres que `api` lea los tickets. Para que hubspot pueda cambiar registros, añade `crm.objects.contacts.write`, `crm.objects.companies.write` y `crm.objects.deals.write`; sin ellos la clave solo lee.",
|
|
6
|
+
"key.private.title": "¿Ya tienes una aplicación privada antigua?",
|
|
7
|
+
"key.private": "HubSpot dejó de crear aplicaciones privadas el 26 de octubre de 2026, pero el token de una que ya existe sigue funcionando. Dale los mismos permisos de lectura y copia su token de acceso de la pestaña **Auth** de la aplicación.",
|
|
8
|
+
"token.title": "Pega la clave",
|
|
9
|
+
"token.where": "En **Keys → Service keys**, haz clic en el nombre de la clave y luego en **Show** y **Copy**. El token de una aplicación privada está en su pestaña **Auth**. Los dos empiezan por `pat-`.",
|
|
10
|
+
"token.label": "Clave de servicio o token de acceso",
|
|
11
|
+
"token.hint": "Se guarda en el llavero del sistema o, si no hay, en un archivo que solo tú puedes leer.",
|
|
12
|
+
"token.rights": "La clave solo lee y cambia lo que permiten sus permisos. Cada perfil entra en su propia cuenta de HubSpot: se rechaza un segundo perfil en la misma cuenta.",
|
|
13
|
+
"check.title": "Comprobando la clave",
|
|
14
|
+
"check.body": "hubspot pregunta a HubSpot a qué cuenta pertenece la clave. Solo la guarda si HubSpot responde.",
|
|
15
|
+
"failed.title": "La comprobación no ha pasado",
|
|
16
|
+
"failed.body": "La clave no ha pasado la comprobación de hubspot, así que no se ha guardado nada. Revisa la clave y tu conexión e inténtalo de nuevo.",
|
|
17
|
+
"done.title": "Conectado",
|
|
18
|
+
"done.body": "El perfil está listo. Copia tus negocios con sus contactos y empresas a WireCat y lista los abiertos:"
|
|
19
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"key.title": "Создайте ключ",
|
|
3
|
+
"key.intro": "hubspot читает ваши сделки, контакты и компании из одного аккаунта HubSpot. Меняет их, только если вы дадите ключу и права на запись.",
|
|
4
|
+
"key.service": "Это один раз делает суперадминистратор или пользователь с правом HubSpot **Developer tools access** (названия из английского интерфейса):\n\n1. Откройте **Development**, затем в меню слева **Keys → Service keys**. В некоторых аккаунтах это **Settings → Integrations → Service keys**.\n2. Нажмите **Create service key** и назовите ключ *WireCat*.\n3. Нажмите **Add new scope**, отметьте каждое право на чтение ниже и нажмите **Update**. Ключ получает только те права, что есть у его автора.\n4. Нажмите **Create** и подтвердите.\n\nИнструкция HubSpot: https://developers.hubspot.com/docs/apps/developer-platform/build-apps/authentication/account-service-keys\n\nПрава на чтение:",
|
|
5
|
+
"key.leads": "На Sales Hub Professional или Enterprise добавьте `crm.objects.leads.read`, чтобы читать и лиды. Добавьте `tickets`, если `api` должен читать тикеты. Чтобы hubspot мог менять записи, добавьте `crm.objects.contacts.write`, `crm.objects.companies.write` и `crm.objects.deals.write`; без них ключ только читает.",
|
|
6
|
+
"key.private.title": "Уже есть старое приватное приложение?",
|
|
7
|
+
"key.private": "HubSpot перестал создавать приватные приложения 26 октября 2026 года, но токен существующего работает. Дайте ему те же права на чтение и скопируйте токен доступа на вкладке **Auth** приложения.",
|
|
8
|
+
"token.title": "Вставьте ключ",
|
|
9
|
+
"token.where": "В **Keys → Service keys** нажмите на имя ключа, затем **Show** и **Copy**. Токен приватного приложения лежит на его вкладке **Auth**. Оба начинаются с `pat-`.",
|
|
10
|
+
"token.label": "Сервисный ключ или токен доступа",
|
|
11
|
+
"token.hint": "Хранится в системной связке ключей, а без неё в файле, который можете прочитать только вы.",
|
|
12
|
+
"token.rights": "Ключ читает и меняет только то, что разрешают его права. Каждый профиль входит в свой аккаунт HubSpot: второй профиль на том же аккаунте отклоняется.",
|
|
13
|
+
"check.title": "Проверяем ключ",
|
|
14
|
+
"check.body": "hubspot спрашивает у HubSpot, чей аккаунт у этого ключа. Ключ сохранится, только если HubSpot ответит.",
|
|
15
|
+
"failed.title": "Проверка не прошла",
|
|
16
|
+
"failed.body": "Ключ не прошёл проверку hubspot, поэтому ничего не сохранено. Проверьте ключ и подключение и попробуйте ещё раз.",
|
|
17
|
+
"done.title": "Подключено",
|
|
18
|
+
"done.body": "Профиль готов. Скопируйте свои сделки с их контактами и компаниями в WireCat, затем выведите открытые:"
|
|
19
|
+
}
|
package/dist/store.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { MessageStore } from "@wirecat/cli-core/store";
|
|
2
|
+
/** No `hs` alias: it is HubSpot's own CLI. */
|
|
3
|
+
export declare const PROVIDER: {
|
|
4
|
+
readonly name: "hubspot";
|
|
5
|
+
readonly kind: "crm";
|
|
6
|
+
readonly aliases: readonly [];
|
|
7
|
+
readonly command: string;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* The shared store, with hubspot's provider entry written, so every other CLI's search knows it (WC-ARCH-21). A
|
|
11
|
+
* read-only open writes nothing, the entry included, and fails when the file is missing or needs a migration.
|
|
12
|
+
*/
|
|
13
|
+
export declare const openHubspotStore: (env: NodeJS.ProcessEnv, { readOnly }?: {
|
|
14
|
+
readOnly?: boolean | undefined;
|
|
15
|
+
}) => Promise<MessageStore>;
|
|
16
|
+
//# sourceMappingURL=store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../src/store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAG3D,8CAA8C;AAC9C,eAAO,MAAM,QAAQ;aACnB,IAAI,EAAE,SAAS;aACf,IAAI,EAAE,KAAK;aACX,OAAO;aACP,OAAO;CACC,CAAA;AAEV;;;GAGG;AACH,eAAO,MAAM,gBAAgB,QAAe,MAAM,CAAC,UAAU;;MAA8B,OAAO,CAAC,YAAY,CAkB9G,CAAA"}
|
package/dist/store.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { IDENTITY } from "./identity.js";
|
|
2
|
+
/** No `hs` alias: it is HubSpot's own CLI. */
|
|
3
|
+
export const PROVIDER = {
|
|
4
|
+
name: "hubspot",
|
|
5
|
+
kind: "crm",
|
|
6
|
+
aliases: [],
|
|
7
|
+
command: IDENTITY.command,
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* The shared store, with hubspot's provider entry written, so every other CLI's search knows it (WC-ARCH-21). A
|
|
11
|
+
* read-only open writes nothing, the entry included, and fails when the file is missing or needs a migration.
|
|
12
|
+
*/
|
|
13
|
+
export const openHubspotStore = async (env, { readOnly = false } = {}) => {
|
|
14
|
+
const { ensureSqlite } = await import("@wirecat/cli-core/sqlite-runtime");
|
|
15
|
+
await ensureSqlite();
|
|
16
|
+
const { openStore, storePath } = await import("@wirecat/cli-core/store");
|
|
17
|
+
const store = await openStore({
|
|
18
|
+
path: storePath(env),
|
|
19
|
+
env,
|
|
20
|
+
command: IDENTITY.command,
|
|
21
|
+
version: IDENTITY.version,
|
|
22
|
+
...(readOnly ? { readOnly } : {}),
|
|
23
|
+
});
|
|
24
|
+
try {
|
|
25
|
+
if (!readOnly)
|
|
26
|
+
await store.accounts.registerProvider(PROVIDER);
|
|
27
|
+
return store;
|
|
28
|
+
}
|
|
29
|
+
catch (error) {
|
|
30
|
+
await store.close();
|
|
31
|
+
throw error;
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.js","sourceRoot":"","sources":["../src/store.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAExC,8CAA8C;AAC9C,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,KAAK;IACX,OAAO,EAAE,EAAE;IACX,OAAO,EAAE,QAAQ,CAAC,OAAO;CACjB,CAAA;AAEV;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,EAAE,GAAsB,EAAE,EAAE,QAAQ,GAAG,KAAK,EAAE,GAAG,EAAE,EAAyB,EAAE;IACjH,MAAM,EAAE,YAAY,EAAE,GAAG,MAAM,MAAM,CAAC,kCAAkC,CAAC,CAAA;IACzE,MAAM,YAAY,EAAE,CAAA;IACpB,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,MAAM,MAAM,CAAC,yBAAyB,CAAC,CAAA;IACxE,MAAM,KAAK,GAAG,MAAM,SAAS,CAAC;QAC5B,IAAI,EAAE,SAAS,CAAC,GAAG,CAAC;QACpB,GAAG;QACH,OAAO,EAAE,QAAQ,CAAC,OAAO;QACzB,OAAO,EAAE,QAAQ,CAAC,OAAO;QACzB,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAClC,CAAC,CAAA;IACF,IAAI,CAAC;QACH,IAAI,CAAC,QAAQ;YAAE,MAAM,KAAK,CAAC,QAAQ,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAA;QAC9D,OAAO,KAAK,CAAA;IACd,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,KAAK,CAAC,KAAK,EAAE,CAAA;QACnB,MAAM,KAAK,CAAA;IACb,CAAC;AACH,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,UAAU,CAAA"}
|
package/dist/version.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAA"}
|
package/dist/wcat.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wcat.d.ts","sourceRoot":"","sources":["../src/wcat.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;AAIvE,eAAO,MAAM,IAAI,EAAE,gBAAkE,CAAA"}
|
package/dist/wcat.js
ADDED
package/dist/wcat.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wcat.js","sourceRoot":"","sources":["../src/wcat.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAEvC,MAAM,CAAC,MAAM,IAAI,GAAqB,EAAE,GAAG,OAAO,EAAE,YAAY,EAAE,WAAW,CAAC,KAAK,EAAE,CAAA"}
|
package/dist/whoami.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { HubSpotTransport } from "./hubspot/transport.js";
|
|
2
|
+
export interface AccountAnswer {
|
|
3
|
+
/** The portal id, as every session answer names it: cli-core's word for the place a sign-in belongs to. */
|
|
4
|
+
account: string;
|
|
5
|
+
account_info: {
|
|
6
|
+
id: string;
|
|
7
|
+
ui_domain: string;
|
|
8
|
+
time_zone: string;
|
|
9
|
+
type: string;
|
|
10
|
+
};
|
|
11
|
+
/** amo's and b24's field: a service key or a private app token belongs to the account, never a user. */
|
|
12
|
+
user: null;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Whose key it is. A service key or a private app token belongs to an account, not a user, so the answer names the
|
|
16
|
+
* account only (HubSpot's "Get account details").
|
|
17
|
+
*/
|
|
18
|
+
export declare const accountAnswer: (hub: HubSpotTransport) => Promise<AccountAnswer>;
|
|
19
|
+
//# sourceMappingURL=whoami.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"whoami.d.ts","sourceRoot":"","sources":["../src/whoami.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAE9D,MAAM,WAAW,aAAa;IAC5B,2GAA2G;IAC3G,OAAO,EAAE,MAAM,CAAA;IACf,YAAY,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;IAChF,wGAAwG;IACxG,IAAI,EAAE,IAAI,CAAA;CACX;AAED;;;GAGG;AACH,eAAO,MAAM,aAAa,QAAe,gBAAgB,KAAG,OAAO,CAAC,aAAa,CAQhF,CAAA"}
|
package/dist/whoami.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { accountDetails } from "./hubspot/account.js";
|
|
2
|
+
/**
|
|
3
|
+
* Whose key it is. A service key or a private app token belongs to an account, not a user, so the answer names the
|
|
4
|
+
* account only (HubSpot's "Get account details").
|
|
5
|
+
*/
|
|
6
|
+
export const accountAnswer = async (hub) => {
|
|
7
|
+
const details = await accountDetails(hub);
|
|
8
|
+
const id = String(details.portalId);
|
|
9
|
+
return {
|
|
10
|
+
account: id,
|
|
11
|
+
account_info: { id, ui_domain: details.uiDomain, time_zone: details.timeZone, type: details.accountType },
|
|
12
|
+
user: null,
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=whoami.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"whoami.js","sourceRoot":"","sources":["../src/whoami.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAWrD;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,KAAK,EAAE,GAAqB,EAA0B,EAAE;IACnF,MAAM,OAAO,GAAG,MAAM,cAAc,CAAC,GAAG,CAAC,CAAA;IACzC,MAAM,EAAE,GAAG,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;IACnC,OAAO;QACL,OAAO,EAAE,EAAE;QACX,YAAY,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,OAAO,CAAC,QAAQ,EAAE,SAAS,EAAE,OAAO,CAAC,QAAQ,EAAE,IAAI,EAAE,OAAO,CAAC,WAAW,EAAE;QACzG,IAAI,EAAE,IAAI;KACX,CAAA;AACH,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,100 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wirecat/hubspot-cli",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "HubSpot CRM CLI for AI agents: a local copy of deals, contacts and companies, an MCP server, deal and contact writes, and every operation of HubSpot's CRM API",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"hubspot",
|
|
7
|
+
"hubspot-api",
|
|
8
|
+
"crm",
|
|
9
|
+
"cli",
|
|
10
|
+
"ai-agents",
|
|
11
|
+
"mcp",
|
|
12
|
+
"mcp-server",
|
|
13
|
+
"claude-code",
|
|
14
|
+
"codex",
|
|
15
|
+
"local-first",
|
|
16
|
+
"wirecat"
|
|
17
|
+
],
|
|
18
|
+
"license": "Apache-2.0",
|
|
19
|
+
"author": "Viacheslav Ptsarev",
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "git+https://github.com/WireCatLabs/hubspot-cli.git"
|
|
23
|
+
},
|
|
24
|
+
"type": "module",
|
|
25
|
+
"engines": {
|
|
26
|
+
"node": "^22.16.0 || >=24"
|
|
27
|
+
},
|
|
28
|
+
"packageManager": "pnpm@11.28.8",
|
|
29
|
+
"bin": {
|
|
30
|
+
"hubspot": "dist/bin/hubspot.js",
|
|
31
|
+
"wcat-hubspot": "dist/bin/hubspot.js"
|
|
32
|
+
},
|
|
33
|
+
"files": [
|
|
34
|
+
"dist",
|
|
35
|
+
"skills",
|
|
36
|
+
"contracts/wirecat.json",
|
|
37
|
+
"/README.md",
|
|
38
|
+
"CHANGELOG.md",
|
|
39
|
+
"LICENSE"
|
|
40
|
+
],
|
|
41
|
+
"scripts": {
|
|
42
|
+
"build": "tsc --build --force && cli-dev bundle --bin dist/bin/hubspot.js",
|
|
43
|
+
"typecheck": "tsc --build --force --emitDeclarationOnly && tsc -p tsconfig.test.json && tsc -p tsconfig.scripts.json",
|
|
44
|
+
"lint": "biome check .",
|
|
45
|
+
"lint:fix": "biome check --write .",
|
|
46
|
+
"test": "vitest run",
|
|
47
|
+
"test:coverage": "vitest run --coverage",
|
|
48
|
+
"test:slow": "vitest run --reporter=json --outputFile=coverage/tests.json >/dev/null; cli-dev slow-tests",
|
|
49
|
+
"test:matrix": "vitest run >/dev/null && pnpm build >/dev/null && pnpm test:matrix:check",
|
|
50
|
+
"test:matrix:check": "cli-dev test-matrix --program scripts/command-program.ts --untested scripts/test-matrix-untested.ts --name hubspot --check && git diff --exit-code -- docs/dev/test-matrix.md",
|
|
51
|
+
"generate": "node --experimental-strip-types scripts/generate.ts && pnpm build && node --experimental-strip-types scripts/commands.ts && cli-dev manifest --program dist/program.js --identity dist/wcat.js",
|
|
52
|
+
"generate:check": "node --experimental-strip-types scripts/generate.ts --check && pnpm build && node --experimental-strip-types scripts/commands.ts --check && cli-dev manifest --program dist/program.js --identity dist/wcat.js --check",
|
|
53
|
+
"smoke": "node --experimental-strip-types scripts/smoke.ts",
|
|
54
|
+
"smoke:bun": "bun scripts/smoke.ts && bun scripts/sandboxed.ts bun scripts/smoke-bundle.ts",
|
|
55
|
+
"smoke:node": "node --experimental-strip-types scripts/sandboxed.ts node --experimental-strip-types scripts/smoke-bundle.ts",
|
|
56
|
+
"package:check": "pnpm smoke",
|
|
57
|
+
"docs:check": "cli-dev docs-check --rules scripts/docs-rules.ts --pages && cli-dev changelog fragments && pnpm docs:spell && rumdl check --config config/wirecat/rumdl.toml README.md SECURITY.md CHANGELOG.md CLAUDE.md AGENTS.md docs/*.md docs/dev/*.md && pnpm docs:lint",
|
|
58
|
+
"docs:lint": "markdownlint-cli2",
|
|
59
|
+
"contracts:check": "cli-contract contracts/plan.json && cli-dev manifest --program dist/program.js --identity dist/wcat.js --check",
|
|
60
|
+
"security:no-leak": "cli-testing security no-leak . contracts/no-leak.json",
|
|
61
|
+
"version:check": "cli-dev version && cli-dev changelog level",
|
|
62
|
+
"version:sync": "cli-dev version --sync",
|
|
63
|
+
"standards:check": "node config/wirecat/check.mjs",
|
|
64
|
+
"lint:commands": "pnpm build && node --experimental-strip-types scripts/sandboxed.ts cli-dev lint --cli dist/bin/hubspot.js",
|
|
65
|
+
"audit:commands": "pnpm build && node --experimental-strip-types scripts/sandboxed.ts cli-dev audit --family --cli dist/bin/hubspot.js --differences lint/audit-differences.json",
|
|
66
|
+
"deps:check": "pnpm peers check && node --experimental-strip-types scripts/one-cli-base.ts",
|
|
67
|
+
"ci:quick": "pnpm typecheck && pnpm deps:check && pnpm lint:commands",
|
|
68
|
+
"release:check": "pnpm standards:check && pnpm deps:check && pnpm lint && pnpm typecheck && pnpm test:coverage && pnpm lint:commands && pnpm audit:commands && pnpm contracts:check && pnpm test:matrix:check && pnpm docs:check && pnpm generate:check && pnpm version:check && pnpm security:no-leak && pnpm package:check",
|
|
69
|
+
"prepare": "lefthook install || true",
|
|
70
|
+
"prepack": "pnpm build",
|
|
71
|
+
"docs:spell": "cspell lint --config cspell.json --no-progress --no-summary README.md SECURITY.md CHANGELOG.md AGENTS.md CLAUDE.md 'docs/*.md' 'skills/**/*.md'",
|
|
72
|
+
"spec:sync": "node --experimental-strip-types scripts/sync-spec.ts"
|
|
73
|
+
},
|
|
74
|
+
"dependencies": {
|
|
75
|
+
"@wirecat/cli-base": "0.109.0",
|
|
76
|
+
"@wirecat/cli-core": "0.687.0",
|
|
77
|
+
"commander": "15.0.0",
|
|
78
|
+
"valibot": "1.5.0"
|
|
79
|
+
},
|
|
80
|
+
"devDependencies": {
|
|
81
|
+
"@biomejs/biome": "2.6.3",
|
|
82
|
+
"@cspell/dict-en-gb": "5.0.38",
|
|
83
|
+
"@cspell/dict-es-es": "3.0.9",
|
|
84
|
+
"@cspell/dict-ru_ru": "2.3.4",
|
|
85
|
+
"@types/node": "22.20.5",
|
|
86
|
+
"@vitest/coverage-v8": "5.0.5",
|
|
87
|
+
"@wirecat/cli-testing": "0.7.3",
|
|
88
|
+
"cspell": "10.4.0",
|
|
89
|
+
"esbuild": "0.28.2",
|
|
90
|
+
"lefthook": "2.2.2",
|
|
91
|
+
"markdownlint-cli2": "0.24.0",
|
|
92
|
+
"rumdl": "0.3.0",
|
|
93
|
+
"typescript": "7.0.2",
|
|
94
|
+
"vitest": "5.0.5"
|
|
95
|
+
},
|
|
96
|
+
"publishConfig": {
|
|
97
|
+
"access": "public"
|
|
98
|
+
},
|
|
99
|
+
"mcpName": "dev.wirecat/hubspot-cli"
|
|
100
|
+
}
|