@wirecat/hubspot-cli 0.1.0 → 0.3.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 +41 -0
- package/README.md +40 -16
- package/contracts/wirecat.json +1516 -173
- package/dist/bin/hubspot.js +2 -2
- package/dist/bundle/agent-A7ARC3QB.js +40 -0
- package/dist/bundle/{all-profiles-64JAUYW4.js → all-profiles-6452VSJB.js} +64 -22
- package/dist/bundle/{anthropic-VJOS4OUM.js → anthropic-VQUOVYOW.js} +6 -6
- package/dist/bundle/{app-server-422MCA7S.js → app-server-FFYKM37G.js} +79 -68
- package/dist/bundle/{bun-M3J2QTR3.js → bun-AJPJ4ZUN.js} +2 -2
- package/dist/bundle/{bun-sqlite-IX3XYA5F.js → bun-sqlite-AGXGSF6D.js} +7 -7
- package/dist/bundle/{chunk-N2XADGL4.js → chunk-2A64XS22.js} +4 -4
- package/dist/bundle/{chunk-HTAN663T.js → chunk-2HYGCLKN.js} +93 -565
- package/dist/bundle/{chunk-FOZYMDRL.js → chunk-2NCO4E4T.js} +6 -6
- package/dist/bundle/{chunk-FBCCBCFH.js → chunk-2PRVWEJC.js} +3 -3
- package/dist/bundle/{chunk-LOBVOGOE.js → chunk-3DIXAEGH.js} +4 -4
- package/dist/bundle/{chunk-O3DYRCIT.js → chunk-3I2FGNWO.js} +1 -1
- package/dist/bundle/{chunk-65TWQ7BV.js → chunk-3PEKYGZ3.js} +2 -2
- package/dist/bundle/{chunk-DRWWJLI6.js → chunk-3R4KRNUZ.js} +8 -8
- package/dist/bundle/{chunk-2VGD63G6.js → chunk-3TEFE6YU.js} +7 -7
- package/dist/bundle/{chunk-BKXDHU3G.js → chunk-3WIVJJNB.js} +19 -17
- package/dist/bundle/{chunk-TI46WQXQ.js → chunk-4DNHXRCJ.js} +7 -7
- package/dist/bundle/{chunk-QU25DA5N.js → chunk-5AYKCKSE.js} +11 -11
- package/dist/bundle/chunk-5HD64ETI.js +561 -0
- package/dist/bundle/{chunk-CWXOXIWS.js → chunk-5K3FGXZH.js} +1 -1
- package/dist/bundle/{chunk-24ERVFJP.js → chunk-5YNAVVCW.js} +3 -3
- package/dist/bundle/chunk-77CUE3VX.js +46 -0
- package/dist/bundle/{chunk-36ITRDYY.js → chunk-7LQRXVQ3.js} +783 -482
- package/dist/bundle/{chunk-E5WLE7BM.js → chunk-7NZT7Y55.js} +1 -1
- package/dist/bundle/{chunk-C32AKHTY.js → chunk-7UEL65GQ.js} +35 -12
- package/dist/bundle/chunk-7VHBS5BJ.js +108 -0
- package/dist/bundle/{chunk-O55RWNSH.js → chunk-A6UFH3QU.js} +4 -4
- package/dist/bundle/{chunk-WE4UFASG.js → chunk-ABXVU5O4.js} +8 -1
- package/dist/bundle/{chunk-4W6BMH45.js → chunk-AF7DANIR.js} +2 -100
- package/dist/bundle/{chunk-LNV33FDC.js → chunk-AFL2C4JR.js} +60 -50
- package/dist/bundle/{chunk-2VGZRYEH.js → chunk-ARTJLL7W.js} +6 -6
- package/dist/bundle/chunk-AVUMH42T.js +194 -0
- package/dist/bundle/chunk-B2W3C4N6.js +338 -0
- package/dist/bundle/{chunk-FKA7DOCK.js → chunk-B3EH22CO.js} +1 -1
- package/dist/bundle/{chunk-E52JAS35.js → chunk-BAUK2MD5.js} +6 -6
- package/dist/bundle/{chunk-JLDBMEKZ.js → chunk-BN22EKQQ.js} +2 -2
- package/dist/bundle/{chunk-DB2XKHI4.js → chunk-BUGROVF3.js} +2 -2
- package/dist/bundle/{chunk-DSP36YHQ.js → chunk-CBCEMFCF.js} +2 -2
- package/dist/bundle/{chunk-WQBX7XYP.js → chunk-CYADK744.js} +1559 -1888
- package/dist/bundle/{chunk-HZRQLAHO.js → chunk-DQB5JMTY.js} +1 -1
- package/dist/bundle/{chunk-JRCPCVPI.js → chunk-DQP2GAAO.js} +75 -66
- package/dist/bundle/{chunk-FPUGMDJV.js → chunk-DSRXCLPO.js} +1 -1
- package/dist/bundle/{chunk-UUMUL4L3.js → chunk-DW23LM47.js} +2 -2
- package/dist/bundle/{chunk-TKVL2C3B.js → chunk-E4X7JAFC.js} +3 -3
- package/dist/bundle/{chunk-NUU4WZVL.js → chunk-EE4JSYGZ.js} +3 -3
- package/dist/bundle/{chunk-NWHEHV3K.js → chunk-EMOVVERN.js} +5 -5
- package/dist/bundle/{chunk-PVKF24ZW.js → chunk-FIVD4HM4.js} +8 -8
- package/dist/bundle/{chunk-QJW35N5V.js → chunk-GC6FLHZF.js} +12 -12
- package/dist/bundle/{chunk-TP7GDWVF.js → chunk-GRFICQTZ.js} +1 -1
- package/dist/bundle/{chunk-X2M6NIQG.js → chunk-HPZRUY6S.js} +1 -1
- package/dist/bundle/{chunk-CLAN3FES.js → chunk-IBTMK5KD.js} +54 -34
- package/dist/bundle/{chunk-5A6ZYNAQ.js → chunk-IQ2XZ62J.js} +18 -18
- package/dist/bundle/{chunk-DBEQI5YM.js → chunk-ITGNDZRR.js} +3 -3
- package/dist/bundle/{chunk-W53EJOFQ.js → chunk-IXZLMFPO.js} +1 -1
- package/dist/bundle/{chunk-TOSCB4SO.js → chunk-J5P5VSRG.js} +16 -10
- package/dist/bundle/{chunk-VIEYMDBR.js → chunk-J6C2QWL5.js} +3 -3
- package/dist/bundle/{chunk-ZBDSHFG4.js → chunk-JG7YMHNB.js} +3427 -3284
- package/dist/bundle/{chunk-RMIYKDUL.js → chunk-JK2SNLU5.js} +17 -17
- package/dist/bundle/{chunk-43EKCUBJ.js → chunk-JP2HJXFO.js} +3 -3
- package/dist/bundle/{chunk-DFCHHR5M.js → chunk-JUKAIXKY.js} +1 -1
- package/dist/bundle/{chunk-5GBUCHRU.js → chunk-KO4VR5NK.js} +4 -4
- package/dist/bundle/{chunk-PPHBRESD.js → chunk-KVXEEKBB.js} +2 -2
- package/dist/bundle/{chunk-SDQGB4KB.js → chunk-L433IDOX.js} +9 -9
- package/dist/bundle/chunk-LA3YU4K7.js +40 -0
- package/dist/bundle/{chunk-ECEZOLOD.js → chunk-LKSNISYV.js} +4 -4
- package/dist/bundle/{chunk-5K7QLJMM.js → chunk-LT5KE44Q.js} +226 -226
- package/dist/bundle/chunk-M763RNWP.js +733 -0
- package/dist/bundle/chunk-M7XLG6AN.js +353 -0
- package/dist/bundle/{chunk-IMJQRPLN.js → chunk-NNMU2TDU.js} +1 -1
- package/dist/bundle/chunk-NTQBS2JL.js +52 -0
- package/dist/bundle/{chunk-HCAZV5NP.js → chunk-NZGI74GS.js} +6 -6
- package/dist/bundle/{chunk-W7HM2VGO.js → chunk-O3VM5PTJ.js} +1 -1
- package/dist/bundle/chunk-OPVNUI4M.js +195 -0
- package/dist/bundle/{chunk-7ELMWE3P.js → chunk-PHXOL5HZ.js} +176 -160
- package/dist/bundle/{chunk-5D4AEUVA.js → chunk-PL5P7UKW.js} +434 -1
- package/dist/bundle/{chunk-B3MANLNK.js → chunk-PLRUUXK7.js} +19 -233
- package/dist/bundle/{chunk-RR5MX5TM.js → chunk-PMP37KLR.js} +4 -4
- package/dist/bundle/{chunk-FTFV3HFW.js → chunk-Q27QAB4X.js} +9 -9
- package/dist/bundle/{chunk-2TWQIWWG.js → chunk-QFZD6MTF.js} +35 -29
- package/dist/bundle/{chunk-2QZK5BEP.js → chunk-RVWGFD32.js} +30 -15
- package/dist/bundle/{chunk-MVA5HVKL.js → chunk-S4UUN6LD.js} +18 -0
- package/dist/bundle/{chunk-QGFX5MXL.js → chunk-SEELWPRD.js} +9 -9
- package/dist/bundle/{chunk-SAKK2YRU.js → chunk-SMTTIKZ5.js} +12 -12
- package/dist/bundle/{chunk-X7XUX7A4.js → chunk-TDQJS3JG.js} +10 -10
- package/dist/bundle/{chunk-HC5ZWE5X.js → chunk-TIHDBKA7.js} +2 -2
- package/dist/bundle/{chunk-NHHJHXMQ.js → chunk-U6XA3OOM.js} +2 -2
- package/dist/bundle/{chunk-NXERIDPJ.js → chunk-VQEAZXTV.js} +7 -7
- package/dist/bundle/{chunk-P5BHKKBI.js → chunk-VW5F6FK3.js} +4 -4
- package/dist/bundle/{chunk-XRREFEIW.js → chunk-WCQW4GYO.js} +7 -7
- package/dist/bundle/{chunk-H3TNVEQX.js → chunk-WGBVRDY3.js} +29 -4
- package/dist/bundle/chunk-WRCKE5ND.js +80 -0
- package/dist/bundle/{chunk-TBJYLC5K.js → chunk-X5S5KUSU.js} +75 -75
- package/dist/bundle/command-contract-R2FGN7CQ.js +40 -0
- package/dist/bundle/{command-server-entry-DJKVVZCQ.js → command-server-entry-GJSMDSNE.js} +29 -29
- package/dist/bundle/{decode-FC65Y4IV.js → decode-6PLXHVHW.js} +6 -6
- package/dist/bundle/{dispatch-KOISQ5QJ.js → dispatch-TAQ7635E.js} +8 -8
- package/dist/bundle/{dist-MYZZKZJ7.js → dist-7TGU56B2.js} +1 -1
- package/dist/bundle/dist-PAKDDIBT.js +191 -0
- package/dist/bundle/{echarts-FVTUDXDU.js → echarts-UZ7QLRE2.js} +2 -2
- package/dist/bundle/{embed-VNBZFPYH.js → embed-AWLL4EBF.js} +7 -7
- package/dist/bundle/{embedder-6U4NOFRO.js → embedder-MM225YJ6.js} +10 -10
- package/dist/bundle/{failure-FZ6VYKEQ.js → failure-MR2XVHFP.js} +3 -3
- package/dist/bundle/first-run-MAUI6QJ7.js +29 -0
- package/dist/bundle/first-screen-SCDV7TXT.js +40 -0
- package/dist/bundle/hubspot.js +26 -26
- package/dist/bundle/{instructions-HET7BCYK.js → instructions-ZJ7U3QUE.js} +1 -1
- package/dist/bundle/{mcp-RGNRW77S.js → mcp-CNV7F2XZ.js} +2 -2
- package/dist/bundle/meeting-combined-EL5XZIJ5.js +25 -0
- package/dist/bundle/meeting-model-OYXB2NOE.js +25 -0
- package/dist/bundle/{meeting-semantic-JY3OGCBS.js → meeting-semantic-S3DBB7XD.js} +7 -7
- package/dist/bundle/{node-CXZIFHZC.js → node-HGCZGZ4R.js} +2 -2
- package/dist/bundle/{node-sqlite-P3O7XN7Q.js → node-sqlite-RKYSRKEB.js} +8 -8
- package/dist/bundle/oauth-PYDCAQ7Y.js +20 -0
- package/dist/bundle/{open-F4P6YV54.js → open-UCDSQUN2.js} +6 -6
- package/dist/bundle/{openai-4AICLIK3.js → openai-Y4F5ZC7O.js} +16 -16
- package/dist/bundle/{process-5RUXWGYS.js → process-P7FB7YO7.js} +1 -1
- package/dist/bundle/{program-POG5GHUQ.js → program-2D5D32HK.js} +835 -261
- package/dist/bundle/{prompt-NFMDVBZ4.js → prompt-E5TKZ37Q.js} +6 -6
- package/dist/bundle/{recognize-DKN3RY4V.js → recognize-5NYPTSLT.js} +5 -5
- package/dist/bundle/{remote-6QHAGQWY.js → remote-U4LUAHF2.js} +10 -10
- package/dist/bundle/{rerank-M4KHEHUZ.js → rerank-AJAVKK5L.js} +8 -8
- package/dist/bundle/{schemas-JRL3DLMP.js → schemas-QLQ2K6DL.js} +7 -33
- package/dist/bundle/{serve-DNU43ND6.js → serve-4UJ3R5IP.js} +11 -11
- package/dist/bundle/server-CN6VQNNF.js +86 -0
- package/dist/bundle/{server-XJSNF3K5.js → server-OJPCTV77.js} +73 -61
- package/dist/bundle/{source-A3SBLHC4.js → source-VHDK74YS.js} +133 -399
- package/dist/bundle/{sqlite-runtime-EMQAC63N.js → sqlite-runtime-KLEA4XAU.js} +7 -7
- package/dist/bundle/{state-T45CX7VY.js → state-COGSYMVH.js} +7 -7
- package/dist/bundle/{store-6TZ2FCVA.js → store-BJXCSP26.js} +25 -24
- package/dist/bundle/store-HXA2MRWI.js +32 -0
- package/dist/bundle/{store-6LCEVBAZ.js → store-V5UMSWK4.js} +27 -22
- package/dist/bundle/store-maintenance-command-AC7GGLYC.js +73 -0
- package/dist/bundle/surface-ZZNG3OW2.js +72 -0
- package/dist/bundle/writer-CZYA657G.js +86 -0
- package/dist/commands/api.d.ts +4 -4
- package/dist/commands/api.d.ts.map +1 -1
- package/dist/commands/api.js +12 -7
- package/dist/commands/api.js.map +1 -1
- package/dist/commands/crm-shared.d.ts +2 -2
- package/dist/commands/crm-shared.d.ts.map +1 -1
- package/dist/commands/crm-shared.js +20 -4
- package/dist/commands/crm-shared.js.map +1 -1
- package/dist/config.d.ts +46 -8
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +133 -12
- package/dist/config.js.map +1 -1
- package/dist/context.d.ts +2 -2
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +1 -1
- package/dist/context.js.map +1 -1
- package/dist/crm/source.d.ts +7 -2
- package/dist/crm/source.d.ts.map +1 -1
- package/dist/crm/source.js +26 -29
- package/dist/crm/source.js.map +1 -1
- 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/manifest.d.ts.map +1 -1
- package/dist/generated/manifest.js +6 -116
- package/dist/generated/manifest.js.map +1 -1
- package/dist/generated/types.d.ts +160 -0
- package/dist/generated/types.d.ts.map +1 -1
- package/dist/hubspot/transport.d.ts +6 -1
- package/dist/hubspot/transport.d.ts.map +1 -1
- package/dist/hubspot/transport.js +13 -5
- package/dist/hubspot/transport.js.map +1 -1
- package/dist/identity.js +3 -3
- package/dist/identity.js.map +1 -1
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +2 -1
- package/dist/program.js.map +1 -1
- package/dist/setup/texts.en.json +3 -3
- package/dist/setup/texts.es.json +3 -3
- package/dist/setup/texts.ru.json +3 -3
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +4 -4
- package/skills/hubspot-cli/SKILL.md +13 -8
- package/skills/hubspot-cli/references/api/api-advanced.md +51 -0
- package/skills/hubspot-cli/references/api/api-basic.md +602 -0
- package/skills/hubspot-cli/references/api/api-batch.md +575 -0
- package/skills/hubspot-cli/references/api.md +3 -2
- package/dist/bundle/command-contract-C6CBFXZF.js +0 -40
- package/dist/bundle/first-run-RPIJZEDT.js +0 -29
- package/dist/bundle/first-screen-RTVMGHAE.js +0 -40
- package/dist/bundle/meeting-combined-L5AGBPYX.js +0 -25
- package/dist/bundle/meeting-model-NTB4RK3F.js +0 -25
- package/dist/bundle/oauth-HNCY4B2S.js +0 -20
- package/dist/bundle/server-C3ZHA7AZ.js +0 -77
- package/dist/bundle/store-CCDNUB6A.js +0 -32
- package/dist/bundle/store-maintenance-command-BRCG6MNA.js +0 -68
- package/dist/commands/comments.d.ts +0 -3
- package/dist/commands/comments.d.ts.map +0 -1
- package/dist/commands/comments.js +0 -114
- package/dist/commands/comments.js.map +0 -1
- package/dist/sample/comments.d.ts +0 -61
- package/dist/sample/comments.d.ts.map +0 -1
- package/dist/sample/comments.js +0 -39
- package/dist/sample/comments.js.map +0 -1
- package/dist/sample/records.d.ts +0 -16
- package/dist/sample/records.d.ts.map +0 -1
- package/dist/sample/records.js +0 -22
- package/dist/sample/records.js.map +0 -1
- package/dist/sample/transport.d.ts +0 -42
- package/dist/sample/transport.d.ts.map +0 -1
- package/dist/sample/transport.js +0 -153
- package/dist/sample/transport.js.map +0 -1
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import { CliError, isCliError } from "@wirecat/cli-base";
|
|
2
|
+
import { crmValues, foldFieldName, } from "@wirecat/cli-core/crm";
|
|
3
|
+
import { SERVICE, segment } from "../hubspot/transport.js";
|
|
4
|
+
import { OBJECTS } from "./records.js";
|
|
5
|
+
/**
|
|
6
|
+
* Deals, contacts and companies; leads need Sales Hub Professional, which no account this was checked on has. HubSpot
|
|
7
|
+
* takes no idempotency key on a create (objects guide), so a repeated write makes a second record.
|
|
8
|
+
*/
|
|
9
|
+
export const HUBSPOT_WRITES = {
|
|
10
|
+
kinds: ["deal", "person", "organization"],
|
|
11
|
+
verbs: ["create", "update", "move", "close", "remove"],
|
|
12
|
+
idempotent: false,
|
|
13
|
+
};
|
|
14
|
+
/** HubSpot's own properties each named option sets: never through `--field`, which would skip the option's keys. */
|
|
15
|
+
const OWN = {
|
|
16
|
+
deal: new Set(["dealname", "pipeline", "dealstage", "amount", "deal_currency_code", "closedate", "hubspot_owner_id"].map(foldFieldName)),
|
|
17
|
+
person: new Set(["firstname", "lastname", "email", "phone", "mobilephone", "jobtitle", "hubspot_owner_id"].map(foldFieldName)),
|
|
18
|
+
organization: new Set(["name", "phone", "hubspot_owner_id"].map(foldFieldName)),
|
|
19
|
+
};
|
|
20
|
+
const refused = (message, param) => new CliError("validation_error", message, { reason: "crm.record-field", sent: false, ...(param ? { param } : {}) });
|
|
21
|
+
const ID = /^\d{1,20}$/;
|
|
22
|
+
const idOf = (value, param) => {
|
|
23
|
+
if (!ID.test(value))
|
|
24
|
+
throw refused(`${param} takes ${SERVICE}'s numeric id`, param);
|
|
25
|
+
return value;
|
|
26
|
+
};
|
|
27
|
+
/** HubSpot clears a property set to the empty string (objects guide, "Update records"). */
|
|
28
|
+
const cleared = (value) => value ?? "";
|
|
29
|
+
/** A multiple checkbox's values are one string, `;` between them (properties guide). */
|
|
30
|
+
const customOf = (kind, custom) => {
|
|
31
|
+
const properties = {};
|
|
32
|
+
for (const [code, value] of Object.entries(custom ?? {})) {
|
|
33
|
+
if (OWN[kind].has(foldFieldName(code)))
|
|
34
|
+
throw refused(`${code} is one of ${SERVICE}'s own properties; set it with its own option, not --field`, "--field");
|
|
35
|
+
properties[code] = Array.isArray(value) ? value.join(";") : cleared(value);
|
|
36
|
+
}
|
|
37
|
+
return properties;
|
|
38
|
+
};
|
|
39
|
+
/** One empty value clears the list. */
|
|
40
|
+
const listOf = (values) => values?.map((one) => one.trim()).filter(Boolean);
|
|
41
|
+
const dealOf = (given) => {
|
|
42
|
+
if (given.people !== undefined || given.organization !== undefined)
|
|
43
|
+
throw refused(`set a deal's contacts and company with ${SERVICE}'s associations, through api`);
|
|
44
|
+
const properties = customOf("deal", given.custom);
|
|
45
|
+
if (given.title !== undefined)
|
|
46
|
+
properties.dealname = given.title;
|
|
47
|
+
if (given.pipeline !== undefined)
|
|
48
|
+
properties.pipeline = given.pipeline;
|
|
49
|
+
if (given.stage !== undefined)
|
|
50
|
+
properties.dealstage = given.stage;
|
|
51
|
+
if (given.amount !== undefined)
|
|
52
|
+
properties.amount = cleared(given.amount);
|
|
53
|
+
if (given.currency !== undefined)
|
|
54
|
+
properties.deal_currency_code = cleared(given.currency);
|
|
55
|
+
// A date-time property, shown in each user's time zone: noon UTC stays the same day from UTC-11 to UTC+11, and the
|
|
56
|
+
// copy reads the UTC day back.
|
|
57
|
+
if (given.closeDate !== undefined)
|
|
58
|
+
properties.closedate = given.closeDate ? `${given.closeDate}T12:00:00.000Z` : "";
|
|
59
|
+
if (given.owner !== undefined)
|
|
60
|
+
properties.hubspot_owner_id = given.owner === null ? "" : idOf(given.owner, "--owner");
|
|
61
|
+
return properties;
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* A contact keeps one e-mail in `email` (more go to secondary addresses, which another API sets) and two numbers,
|
|
65
|
+
* `phone` and `mobilephone`; a longer list is refused, never cut.
|
|
66
|
+
*/
|
|
67
|
+
const personOf = (given) => {
|
|
68
|
+
const properties = customOf("person", given.custom);
|
|
69
|
+
if (given.name !== undefined && given.firstName === undefined && given.lastName === undefined) {
|
|
70
|
+
const [first, ...rest] = given.name.trim().split(/\s+/);
|
|
71
|
+
properties.firstname = first ?? "";
|
|
72
|
+
properties.lastname = rest.join(" ");
|
|
73
|
+
}
|
|
74
|
+
if (given.firstName !== undefined)
|
|
75
|
+
properties.firstname = cleared(given.firstName);
|
|
76
|
+
if (given.lastName !== undefined)
|
|
77
|
+
properties.lastname = cleared(given.lastName);
|
|
78
|
+
if (given.position !== undefined)
|
|
79
|
+
properties.jobtitle = cleared(given.position);
|
|
80
|
+
const emails = listOf(given.emails);
|
|
81
|
+
if (emails) {
|
|
82
|
+
if (emails.length > 1)
|
|
83
|
+
throw refused(`${SERVICE} keeps one e-mail per contact here; give one --email`, "--email");
|
|
84
|
+
properties.email = emails[0] ?? "";
|
|
85
|
+
}
|
|
86
|
+
const phones = listOf(given.phones);
|
|
87
|
+
if (phones) {
|
|
88
|
+
if (phones.length > 2)
|
|
89
|
+
throw refused(`${SERVICE} keeps two numbers per contact, phone and mobile; give at most two --phone`, "--phone");
|
|
90
|
+
properties.phone = phones[0] ?? "";
|
|
91
|
+
properties.mobilephone = phones[1] ?? "";
|
|
92
|
+
}
|
|
93
|
+
if (given.owner !== undefined)
|
|
94
|
+
properties.hubspot_owner_id = given.owner === null ? "" : idOf(given.owner, "--owner");
|
|
95
|
+
return properties;
|
|
96
|
+
};
|
|
97
|
+
const organizationOf = (given) => {
|
|
98
|
+
const properties = customOf("organization", given.custom);
|
|
99
|
+
if (given.name !== undefined)
|
|
100
|
+
properties.name = given.name;
|
|
101
|
+
if (listOf(given.emails)?.length)
|
|
102
|
+
throw refused(`a ${SERVICE} company has no e-mail property; set the contacts' e-mails instead`, "--email");
|
|
103
|
+
const phones = listOf(given.phones);
|
|
104
|
+
if (phones) {
|
|
105
|
+
if (phones.length > 1)
|
|
106
|
+
throw refused(`a ${SERVICE} company keeps one number; give one --phone`, "--phone");
|
|
107
|
+
properties.phone = phones[0] ?? "";
|
|
108
|
+
}
|
|
109
|
+
if (given.owner !== undefined)
|
|
110
|
+
properties.hubspot_owner_id = given.owner === null ? "" : idOf(given.owner, "--owner");
|
|
111
|
+
return properties;
|
|
112
|
+
};
|
|
113
|
+
const propertiesFor = (kind, given) => {
|
|
114
|
+
if (kind === "deal")
|
|
115
|
+
return dealOf(given);
|
|
116
|
+
if (kind === "person")
|
|
117
|
+
return personOf(given);
|
|
118
|
+
if (kind === "organization")
|
|
119
|
+
return organizationOf(given);
|
|
120
|
+
throw new CliError("validation_error", `${SERVICE} leads are written through api leads-create and leads-update`, {
|
|
121
|
+
reason: "crm.write-unsupported",
|
|
122
|
+
sent: false,
|
|
123
|
+
});
|
|
124
|
+
};
|
|
125
|
+
const pathOf = (kind, externalId) => `/crm/objects/2026-03/${OBJECTS[kind].path}${externalId === undefined ? "" : `/${segment(idOf(externalId, `<${kind}>`))}`}`;
|
|
126
|
+
/**
|
|
127
|
+
* Core's write port over HubSpot's object APIs (https://developers.hubspot.com/docs/api-reference/latest/crm/using-object-apis):
|
|
128
|
+
* a POST to create, a PATCH of the properties given, a DELETE that archives. Each is sent once, then the record is read
|
|
129
|
+
* back whole with its associations, as core's store wants it.
|
|
130
|
+
*/
|
|
131
|
+
export const hubspotCrmWriter = (hub, source) => {
|
|
132
|
+
/** The write went through: a failed read-back must never read as a failed write, or the owner repeats it. */
|
|
133
|
+
const readBack = async (kind, externalId, options) => {
|
|
134
|
+
try {
|
|
135
|
+
const found = await source().record(kind, externalId);
|
|
136
|
+
if (!found)
|
|
137
|
+
throw new CliError("not_found", `${SERVICE} has no ${kind} ${externalId}`);
|
|
138
|
+
return found;
|
|
139
|
+
}
|
|
140
|
+
catch (error) {
|
|
141
|
+
throw new CliError("invalid_response", `${SERVICE} made the change to ${kind} ${externalId}, but reading it back failed` +
|
|
142
|
+
`${isCliError(error) ? ` (${error.code})` : ""}; run sync to store it — do not write it again`, { operation_id: options.operationId, external_id: externalId, sent: true });
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
const update = async (kind, externalId, properties, options) => {
|
|
146
|
+
if (Object.keys(properties).length === 0)
|
|
147
|
+
throw refused("nothing to change: name a field");
|
|
148
|
+
await hub().patch(pathOf(kind, externalId), { properties });
|
|
149
|
+
return readBack(kind, externalId, options);
|
|
150
|
+
};
|
|
151
|
+
/** The deal's own pipeline's first stage with that outcome: HubSpot closes a deal by its stage (pipelines guide). */
|
|
152
|
+
const closingStage = async (externalId, outcome) => {
|
|
153
|
+
const deal = await source().record("deal", externalId);
|
|
154
|
+
if (!deal)
|
|
155
|
+
throw new CliError("not_found", `${SERVICE} has no deal ${externalId}`, { sent: false });
|
|
156
|
+
const pipeline = (await source().pipelines("deal")).find((one) => one.externalId === deal.pipeline);
|
|
157
|
+
const stage = pipeline?.stages.find((one) => one.outcome === outcome);
|
|
158
|
+
if (!stage)
|
|
159
|
+
throw refused(`the deal's pipeline ${deal.pipeline} has no closed ${outcome} stage in ${SERVICE}`, "<outcome>");
|
|
160
|
+
return stage.externalId;
|
|
161
|
+
};
|
|
162
|
+
return {
|
|
163
|
+
provider: "hubspot",
|
|
164
|
+
capabilities: HUBSPOT_WRITES,
|
|
165
|
+
async create(kind, draft, options) {
|
|
166
|
+
const properties = propertiesFor(kind, draft);
|
|
167
|
+
// The 2026-03 spec makes `associations` required on a create, an empty list included.
|
|
168
|
+
const answer = await hub().post(pathOf(kind), { properties, associations: [] });
|
|
169
|
+
const externalId = crmValues.id(crmValues.fieldOf(answer, "id"));
|
|
170
|
+
if (externalId === null)
|
|
171
|
+
throw new CliError("invalid_response", `${SERVICE} answered the new ${kind} without its id; run sync first`, {
|
|
172
|
+
operation_id: options.operationId,
|
|
173
|
+
sent: true,
|
|
174
|
+
});
|
|
175
|
+
return readBack(kind, externalId, options);
|
|
176
|
+
},
|
|
177
|
+
async update(kind, externalId, patch, options) {
|
|
178
|
+
return update(kind, externalId, propertiesFor(kind, patch), options);
|
|
179
|
+
},
|
|
180
|
+
async move(kind, externalId, stage, options) {
|
|
181
|
+
return update(kind, externalId, propertiesFor(kind, { stage }), options);
|
|
182
|
+
},
|
|
183
|
+
async close(kind, externalId, outcome, options) {
|
|
184
|
+
const properties = propertiesFor(kind, { stage: await closingStage(externalId, outcome) });
|
|
185
|
+
if (options.reason !== undefined)
|
|
186
|
+
properties[`closed_${outcome}_reason`] = options.reason;
|
|
187
|
+
return update(kind, externalId, properties, options);
|
|
188
|
+
},
|
|
189
|
+
async remove(kind, externalId) {
|
|
190
|
+
if (kind !== "deal")
|
|
191
|
+
throw new CliError("validation_error", `${SERVICE} ${kind}s are deleted through api`, {
|
|
192
|
+
reason: "crm.write-unsupported",
|
|
193
|
+
sent: false,
|
|
194
|
+
});
|
|
195
|
+
await hub().delete(pathOf(kind, externalId));
|
|
196
|
+
},
|
|
197
|
+
};
|
|
198
|
+
};
|
|
199
|
+
//# sourceMappingURL=writer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"writer.js","sourceRoot":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
1
|
-
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/generated/manifest.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAElH,eAAO,MAAM,UAAU,EAAE,SAAS,iBAAiB,
|
|
1
|
+
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/generated/manifest.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAElH,eAAO,MAAM,UAAU,EAAE,SAAS,iBAAiB,EAq5MlD,CAAA;AAED,eAAO,MAAM,OAAO,EAAE,SAAS,SAAS,EAIvC,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAKpE,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,SAAS,mBAAmB,EAIlD,CAAA"}
|