@wirecat/hubspot-cli 0.0.0-stage → 0.1.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.
Files changed (269) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/LICENSE +204 -0
  3. package/README.md +256 -2
  4. package/contracts/wirecat.json +1965 -0
  5. package/dist/bin/hubspot.d.ts +3 -0
  6. package/dist/bin/hubspot.d.ts.map +1 -0
  7. package/dist/bin/hubspot.js +40 -0
  8. package/dist/bin/hubspot.js.map +1 -0
  9. package/dist/bundle/all-profiles-64JAUYW4.js +279 -0
  10. package/dist/bundle/anthropic-VJOS4OUM.js +91 -0
  11. package/dist/bundle/app-server-422MCA7S.js +245 -0
  12. package/dist/bundle/bun-M3J2QTR3.js +169 -0
  13. package/dist/bundle/bun-sqlite-IX3XYA5F.js +76 -0
  14. package/dist/bundle/chunk-24ERVFJP.js +73 -0
  15. package/dist/bundle/chunk-2QZK5BEP.js +392 -0
  16. package/dist/bundle/chunk-2TWQIWWG.js +1328 -0
  17. package/dist/bundle/chunk-2VGD63G6.js +604 -0
  18. package/dist/bundle/chunk-2VGZRYEH.js +334 -0
  19. package/dist/bundle/chunk-36ITRDYY.js +63116 -0
  20. package/dist/bundle/chunk-43EKCUBJ.js +72 -0
  21. package/dist/bundle/chunk-4W6BMH45.js +731 -0
  22. package/dist/bundle/chunk-5A6ZYNAQ.js +2003 -0
  23. package/dist/bundle/chunk-5D4AEUVA.js +24783 -0
  24. package/dist/bundle/chunk-5GBUCHRU.js +274 -0
  25. package/dist/bundle/chunk-5K7QLJMM.js +4072 -0
  26. package/dist/bundle/chunk-65TWQ7BV.js +54 -0
  27. package/dist/bundle/chunk-7ELMWE3P.js +12066 -0
  28. package/dist/bundle/chunk-ADLS6FVG.js +24600 -0
  29. package/dist/bundle/chunk-B3MANLNK.js +602 -0
  30. package/dist/bundle/chunk-BKXDHU3G.js +1395 -0
  31. package/dist/bundle/chunk-C32AKHTY.js +2310 -0
  32. package/dist/bundle/chunk-CLAN3FES.js +1246 -0
  33. package/dist/bundle/chunk-CWXOXIWS.js +46 -0
  34. package/dist/bundle/chunk-D72URWJE.js +532 -0
  35. package/dist/bundle/chunk-DB2XKHI4.js +72 -0
  36. package/dist/bundle/chunk-DBEQI5YM.js +100 -0
  37. package/dist/bundle/chunk-DFCHHR5M.js +38 -0
  38. package/dist/bundle/chunk-DFDN6AUB.js +21 -0
  39. package/dist/bundle/chunk-DRWWJLI6.js +188 -0
  40. package/dist/bundle/chunk-DSP36YHQ.js +29 -0
  41. package/dist/bundle/chunk-E52JAS35.js +1028 -0
  42. package/dist/bundle/chunk-E5WLE7BM.js +78 -0
  43. package/dist/bundle/chunk-ECEZOLOD.js +230 -0
  44. package/dist/bundle/chunk-EH6ZEJGT.js +932 -0
  45. package/dist/bundle/chunk-FBCCBCFH.js +288 -0
  46. package/dist/bundle/chunk-FKA7DOCK.js +53 -0
  47. package/dist/bundle/chunk-FOZYMDRL.js +259 -0
  48. package/dist/bundle/chunk-FPUGMDJV.js +7 -0
  49. package/dist/bundle/chunk-FTFV3HFW.js +721 -0
  50. package/dist/bundle/chunk-H3TNVEQX.js +782 -0
  51. package/dist/bundle/chunk-HC5ZWE5X.js +193 -0
  52. package/dist/bundle/chunk-HCAZV5NP.js +95 -0
  53. package/dist/bundle/chunk-HTAN663T.js +4045 -0
  54. package/dist/bundle/chunk-HZRQLAHO.js +16 -0
  55. package/dist/bundle/chunk-IMJQRPLN.js +92 -0
  56. package/dist/bundle/chunk-JLDBMEKZ.js +106 -0
  57. package/dist/bundle/chunk-JRCPCVPI.js +9393 -0
  58. package/dist/bundle/chunk-LNV33FDC.js +786 -0
  59. package/dist/bundle/chunk-LOBVOGOE.js +66 -0
  60. package/dist/bundle/chunk-MVA5HVKL.js +1392 -0
  61. package/dist/bundle/chunk-N2XADGL4.js +76 -0
  62. package/dist/bundle/chunk-NHHJHXMQ.js +58 -0
  63. package/dist/bundle/chunk-NUU4WZVL.js +52 -0
  64. package/dist/bundle/chunk-NWHEHV3K.js +133 -0
  65. package/dist/bundle/chunk-NXERIDPJ.js +319 -0
  66. package/dist/bundle/chunk-O3DYRCIT.js +23 -0
  67. package/dist/bundle/chunk-O55RWNSH.js +161 -0
  68. package/dist/bundle/chunk-P5BHKKBI.js +206 -0
  69. package/dist/bundle/chunk-PPHBRESD.js +82 -0
  70. package/dist/bundle/chunk-PVKF24ZW.js +364 -0
  71. package/dist/bundle/chunk-QGFX5MXL.js +460 -0
  72. package/dist/bundle/chunk-QJW35N5V.js +761 -0
  73. package/dist/bundle/chunk-QU25DA5N.js +360 -0
  74. package/dist/bundle/chunk-RMIYKDUL.js +1068 -0
  75. package/dist/bundle/chunk-RR5MX5TM.js +142 -0
  76. package/dist/bundle/chunk-SAKK2YRU.js +218 -0
  77. package/dist/bundle/chunk-SDQGB4KB.js +185 -0
  78. package/dist/bundle/chunk-TBJYLC5K.js +2788 -0
  79. package/dist/bundle/chunk-TI46WQXQ.js +1197 -0
  80. package/dist/bundle/chunk-TKVL2C3B.js +170 -0
  81. package/dist/bundle/chunk-TOSCB4SO.js +1227 -0
  82. package/dist/bundle/chunk-TP7GDWVF.js +6848 -0
  83. package/dist/bundle/chunk-UUMUL4L3.js +72 -0
  84. package/dist/bundle/chunk-VIEYMDBR.js +41 -0
  85. package/dist/bundle/chunk-W53EJOFQ.js +63 -0
  86. package/dist/bundle/chunk-W7HM2VGO.js +24 -0
  87. package/dist/bundle/chunk-WE4UFASG.js +88 -0
  88. package/dist/bundle/chunk-WQBX7XYP.js +26174 -0
  89. package/dist/bundle/chunk-X2M6NIQG.js +18 -0
  90. package/dist/bundle/chunk-X7XUX7A4.js +1846 -0
  91. package/dist/bundle/chunk-XRREFEIW.js +372 -0
  92. package/dist/bundle/chunk-Y5E2WNWB.js +35 -0
  93. package/dist/bundle/chunk-ZBDSHFG4.js +40933 -0
  94. package/dist/bundle/chunk-ZVVMGPBJ.js +50 -0
  95. package/dist/bundle/command-contract-C6CBFXZF.js +40 -0
  96. package/dist/bundle/command-server-entry-DJKVVZCQ.js +169 -0
  97. package/dist/bundle/decode-FC65Y4IV.js +297 -0
  98. package/dist/bundle/definitions-MVPICAWV.js +2991 -0
  99. package/dist/bundle/dispatch-KOISQ5QJ.js +411 -0
  100. package/dist/bundle/dist-MYZZKZJ7.js +7577 -0
  101. package/dist/bundle/echarts-FVTUDXDU.js +42501 -0
  102. package/dist/bundle/embed-VNBZFPYH.js +38 -0
  103. package/dist/bundle/embedder-6U4NOFRO.js +111 -0
  104. package/dist/bundle/failure-FZ6VYKEQ.js +25 -0
  105. package/dist/bundle/first-run-RPIJZEDT.js +29 -0
  106. package/dist/bundle/first-screen-RTVMGHAE.js +40 -0
  107. package/dist/bundle/hubspot.js +198 -0
  108. package/dist/bundle/instructions-HET7BCYK.js +11 -0
  109. package/dist/bundle/mcp-RGNRW77S.js +167 -0
  110. package/dist/bundle/meeting-combined-L5AGBPYX.js +25 -0
  111. package/dist/bundle/meeting-model-NTB4RK3F.js +25 -0
  112. package/dist/bundle/meeting-semantic-JY3OGCBS.js +22 -0
  113. package/dist/bundle/node-CXZIFHZC.js +176 -0
  114. package/dist/bundle/node-P4E63KXA.js +2340 -0
  115. package/dist/bundle/node-TLZSIHIJ.js +21 -0
  116. package/dist/bundle/node-sqlite-P3O7XN7Q.js +74 -0
  117. package/dist/bundle/oauth-HNCY4B2S.js +20 -0
  118. package/dist/bundle/open-F4P6YV54.js +23 -0
  119. package/dist/bundle/openai-4AICLIK3.js +238 -0
  120. package/dist/bundle/process-5RUXWGYS.js +91 -0
  121. package/dist/bundle/program-POG5GHUQ.js +9241 -0
  122. package/dist/bundle/prompt-NFMDVBZ4.js +17 -0
  123. package/dist/bundle/recognize-DKN3RY4V.js +26 -0
  124. package/dist/bundle/remote-6QHAGQWY.js +31 -0
  125. package/dist/bundle/rerank-M4KHEHUZ.js +52 -0
  126. package/dist/bundle/schemas-JRL3DLMP.js +952 -0
  127. package/dist/bundle/serve-DNU43ND6.js +199 -0
  128. package/dist/bundle/server-C3ZHA7AZ.js +77 -0
  129. package/dist/bundle/server-XJSNF3K5.js +207 -0
  130. package/dist/bundle/source-A3SBLHC4.js +934 -0
  131. package/dist/bundle/sqlite-runtime-EMQAC63N.js +20 -0
  132. package/dist/bundle/state-T45CX7VY.js +36 -0
  133. package/dist/bundle/store-6LCEVBAZ.js +176 -0
  134. package/dist/bundle/store-6TZ2FCVA.js +295 -0
  135. package/dist/bundle/store-CCDNUB6A.js +32 -0
  136. package/dist/bundle/store-maintenance-command-BRCG6MNA.js +68 -0
  137. package/dist/commands/account.d.ts +3 -0
  138. package/dist/commands/account.d.ts.map +1 -0
  139. package/dist/commands/account.js +87 -0
  140. package/dist/commands/account.js.map +1 -0
  141. package/dist/commands/api.d.ts +9 -0
  142. package/dist/commands/api.d.ts.map +1 -0
  143. package/dist/commands/api.js +65 -0
  144. package/dist/commands/api.js.map +1 -0
  145. package/dist/commands/comments.d.ts +3 -0
  146. package/dist/commands/comments.d.ts.map +1 -0
  147. package/dist/commands/comments.js +114 -0
  148. package/dist/commands/comments.js.map +1 -0
  149. package/dist/commands/crm-shared.d.ts +8 -0
  150. package/dist/commands/crm-shared.d.ts.map +1 -0
  151. package/dist/commands/crm-shared.js +93 -0
  152. package/dist/commands/crm-shared.js.map +1 -0
  153. package/dist/commands/schedule.d.ts +3 -0
  154. package/dist/commands/schedule.d.ts.map +1 -0
  155. package/dist/commands/schedule.js +9 -0
  156. package/dist/commands/schedule.js.map +1 -0
  157. package/dist/commands/session.d.ts +14 -0
  158. package/dist/commands/session.d.ts.map +1 -0
  159. package/dist/commands/session.js +164 -0
  160. package/dist/commands/session.js.map +1 -0
  161. package/dist/config.d.ts +22 -0
  162. package/dist/config.d.ts.map +1 -0
  163. package/dist/config.js +28 -0
  164. package/dist/config.js.map +1 -0
  165. package/dist/context.d.ts +88 -0
  166. package/dist/context.d.ts.map +1 -0
  167. package/dist/context.js +137 -0
  168. package/dist/context.js.map +1 -0
  169. package/dist/crm/activities.d.ts +24 -0
  170. package/dist/crm/activities.d.ts.map +1 -0
  171. package/dist/crm/activities.js +214 -0
  172. package/dist/crm/activities.js.map +1 -0
  173. package/dist/crm/associations.d.ts +20 -0
  174. package/dist/crm/associations.d.ts.map +1 -0
  175. package/dist/crm/associations.js +47 -0
  176. package/dist/crm/associations.js.map +1 -0
  177. package/dist/crm/records.d.ts +63 -0
  178. package/dist/crm/records.d.ts.map +1 -0
  179. package/dist/crm/records.js +333 -0
  180. package/dist/crm/records.js.map +1 -0
  181. package/dist/crm/search.d.ts +57 -0
  182. package/dist/crm/search.d.ts.map +1 -0
  183. package/dist/crm/search.js +47 -0
  184. package/dist/crm/search.js.map +1 -0
  185. package/dist/crm/source.d.ts +32 -0
  186. package/dist/crm/source.d.ts.map +1 -0
  187. package/dist/crm/source.js +369 -0
  188. package/dist/crm/source.js.map +1 -0
  189. package/dist/generated/definitions.d.ts +3 -0
  190. package/dist/generated/definitions.d.ts.map +1 -0
  191. package/dist/generated/definitions.js +2987 -0
  192. package/dist/generated/definitions.js.map +1 -0
  193. package/dist/generated/manifest.d.ts +6 -0
  194. package/dist/generated/manifest.d.ts.map +1 -0
  195. package/dist/generated/manifest.js +6499 -0
  196. package/dist/generated/manifest.js.map +1 -0
  197. package/dist/generated/schemas.d.ts +205 -0
  198. package/dist/generated/schemas.d.ts.map +1 -0
  199. package/dist/generated/schemas.js +810 -0
  200. package/dist/generated/schemas.js.map +1 -0
  201. package/dist/generated/types.d.ts +1114 -0
  202. package/dist/generated/types.d.ts.map +1 -0
  203. package/dist/generated/types.js +5 -0
  204. package/dist/generated/types.js.map +1 -0
  205. package/dist/hubspot/account.d.ts +12 -0
  206. package/dist/hubspot/account.d.ts.map +1 -0
  207. package/dist/hubspot/account.js +23 -0
  208. package/dist/hubspot/account.js.map +1 -0
  209. package/dist/hubspot/transport.d.ts +76 -0
  210. package/dist/hubspot/transport.d.ts.map +1 -0
  211. package/dist/hubspot/transport.js +346 -0
  212. package/dist/hubspot/transport.js.map +1 -0
  213. package/dist/identity.d.ts +7 -0
  214. package/dist/identity.d.ts.map +1 -0
  215. package/dist/identity.js +32 -0
  216. package/dist/identity.js.map +1 -0
  217. package/dist/index.d.ts +3 -0
  218. package/dist/index.d.ts.map +1 -0
  219. package/dist/index.js +3 -0
  220. package/dist/index.js.map +1 -0
  221. package/dist/program.d.ts +6 -0
  222. package/dist/program.d.ts.map +1 -0
  223. package/dist/program.js +77 -0
  224. package/dist/program.js.map +1 -0
  225. package/dist/reasons.d.ts +10 -0
  226. package/dist/reasons.d.ts.map +1 -0
  227. package/dist/reasons.js +33 -0
  228. package/dist/reasons.js.map +1 -0
  229. package/dist/sample/comments.d.ts +61 -0
  230. package/dist/sample/comments.d.ts.map +1 -0
  231. package/dist/sample/comments.js +39 -0
  232. package/dist/sample/comments.js.map +1 -0
  233. package/dist/sample/records.d.ts +16 -0
  234. package/dist/sample/records.d.ts.map +1 -0
  235. package/dist/sample/records.js +22 -0
  236. package/dist/sample/records.js.map +1 -0
  237. package/dist/sample/transport.d.ts +42 -0
  238. package/dist/sample/transport.d.ts.map +1 -0
  239. package/dist/sample/transport.js +153 -0
  240. package/dist/sample/transport.js.map +1 -0
  241. package/dist/setup/flow.d.ts +2 -0
  242. package/dist/setup/flow.d.ts.map +1 -0
  243. package/dist/setup/flow.js +97 -0
  244. package/dist/setup/flow.js.map +1 -0
  245. package/dist/setup/texts.en.json +19 -0
  246. package/dist/setup/texts.es.json +19 -0
  247. package/dist/setup/texts.ru.json +19 -0
  248. package/dist/store.d.ts +16 -0
  249. package/dist/store.d.ts.map +1 -0
  250. package/dist/store.js +34 -0
  251. package/dist/store.js.map +1 -0
  252. package/dist/version.d.ts +2 -0
  253. package/dist/version.d.ts.map +1 -0
  254. package/dist/version.js +2 -0
  255. package/dist/version.js.map +1 -0
  256. package/dist/wcat.d.ts +3 -0
  257. package/dist/wcat.d.ts.map +1 -0
  258. package/dist/wcat.js +4 -0
  259. package/dist/wcat.js.map +1 -0
  260. package/dist/whoami.d.ts +19 -0
  261. package/dist/whoami.d.ts.map +1 -0
  262. package/dist/whoami.js +15 -0
  263. package/dist/whoami.js.map +1 -0
  264. package/package.json +98 -4
  265. package/skills/hubspot-cli/SKILL.md +97 -0
  266. package/skills/hubspot-cli/references/api/api-basic.md +462 -0
  267. package/skills/hubspot-cli/references/api/api-batch.md +149 -0
  268. package/skills/hubspot-cli/references/api/api-search.md +147 -0
  269. package/skills/hubspot-cli/references/api.md +15 -0
@@ -0,0 +1,369 @@
1
+ import { CliError, isCliError } from "@wirecat/cli-base";
2
+ import { crmValues, crmWindowOf, walk, } from "@wirecat/cli-core/crm";
3
+ import { accountDetails } from "../hubspot/account.js";
4
+ import { SERVICE, segment } from "../hubspot/transport.js";
5
+ import { readActivities } from "./activities.js";
6
+ import { associationsOf, withAssociations } from "./associations.js";
7
+ import { nextOf, OBJECTS, propertiesOf, resultsOf, toDeal, toField, toLead, toOrganization, toPerson, toPipeline, toUser, } from "./records.js";
8
+ import { modifiedSince, nextSpot, SEARCH_PAGE, search } from "./search.js";
9
+ const { id, text } = crmValues;
10
+ /**
11
+ * Re-read before the last cursor: rows HubSpot saved while the round ran, rows its search index had not shown yet
12
+ * ("a few moments", search guide), and this computer's clock running ahead of HubSpot's. A row read twice is only
13
+ * saved twice.
14
+ */
15
+ export const OVERLAP_MS = 10 * 60_000;
16
+ /** The largest page of a list (contacts guide) and of owners (owners guide). */
17
+ const LIST_PAGE = 100;
18
+ /** The pipelines API's object type for each kind with pipelines (pipelines guide). */
19
+ const PIPELINES = { deal: "deals", lead: "leads" };
20
+ /** A refusal for a missing scope names the scope core's gap shows, the one HubSpot named or the one the API needs. */
21
+ const scoped = (error, scope) => isCliError(error) && error.code === "permission_error" && typeof error.details.scope !== "string"
22
+ ? new CliError(error.code, error.message, { ...error.details, scope })
23
+ : error;
24
+ const refused = (error) => isCliError(error) && error.code === "permission_error";
25
+ /** A record this token may not open, or one HubSpot does not have: `get` answers null. */
26
+ const unseen = (error) => isCliError(error) && (error.code === "not_found" || refused(error));
27
+ /**
28
+ * `l<after>@<started>` lists in full; `s<from>.<offset>@<started>` reads changes from `from`. HubSpot's `after` is an
29
+ * opaque token, so the round's start is read after the last `@`, whatever the token holds.
30
+ */
31
+ const pageOf = (page, now) => {
32
+ const cut = (page ?? "").lastIndexOf("@");
33
+ const head = page?.slice(0, cut) ?? "";
34
+ const started = Number(page?.slice(cut + 1));
35
+ if (cut < 0 || !Number.isSafeInteger(started))
36
+ return { after: undefined, spot: undefined, started: now };
37
+ if (head.startsWith("l"))
38
+ return { after: head.slice(1) || undefined, spot: undefined, started };
39
+ const found = /^s(-?\d+)\.(\d+)$/.exec(head);
40
+ if (!found)
41
+ return { after: undefined, spot: undefined, started: now };
42
+ return { after: undefined, spot: { from: Number(found[1]), offset: Number(found[2]) }, started };
43
+ };
44
+ /**
45
+ * A list or a read by id leaves out an association type the record has none of; asked for, none is an empty list, so a
46
+ * link removed in HubSpot leaves the copy too.
47
+ */
48
+ const asked = (raw, types) => {
49
+ const held = typeof raw.associations === "object" && raw.associations !== null ? raw.associations : {};
50
+ return {
51
+ ...raw,
52
+ associations: { ...Object.fromEntries(types.map((type) => [type, { results: [] }])), ...held },
53
+ };
54
+ };
55
+ /** The shared names a live list filters by, as HubSpot's properties. */
56
+ const liveField = (kind, field) => ({
57
+ assigned_to: "hubspot_owner_id",
58
+ created_at: OBJECTS[kind].created,
59
+ updated_at: OBJECTS[kind].modified,
60
+ // A company's own `type` property (Prospect, Partner…), as b24 maps `type` to its company type.
61
+ ...(kind === "organization" ? { type: "type" } : {}),
62
+ })[field];
63
+ /**
64
+ * The longest `properties=` a GET sends. Servers commonly refuse request lines past 8 KB; HubSpot names no limit, so
65
+ * an account with hundreds of custom properties reads the ones that fit, and the call says which it left out.
66
+ */
67
+ export const MAX_PROPERTIES_CHARS = 6_000;
68
+ /** HubSpot's own properties first, always; then the account's own while they fit. */
69
+ export const fitted = (own, custom) => {
70
+ const kept = [...own];
71
+ let length = kept.join(",").length;
72
+ const dropped = [];
73
+ for (const name of custom) {
74
+ if (kept.includes(name))
75
+ continue;
76
+ if (length + name.length + 1 > MAX_PROPERTIES_CHARS)
77
+ dropped.push(name);
78
+ else {
79
+ kept.push(name);
80
+ length += name.length + 1;
81
+ }
82
+ }
83
+ return { properties: kept.join(","), dropped };
84
+ };
85
+ const OPERATORS = {
86
+ "=": "EQ",
87
+ "!=": "NEQ",
88
+ ">": "GT",
89
+ ">=": "GTE",
90
+ "<": "LT",
91
+ "<=": "LTE",
92
+ in: "IN",
93
+ };
94
+ /** core's conditions as one filter group: they are AND-ed, which a group is (search guide, filtering). */
95
+ const filtersOf = (kind, conditions, defined) => conditions.map(({ field, op, value }) => {
96
+ const propertyName = liveField(kind, field) ?? defined.find((one) => one.code === field)?.code;
97
+ if (!propertyName)
98
+ throw new CliError("validation_error", `${SERVICE} cannot filter ${OBJECTS[kind].name} by ${field}`, {
99
+ reason: "query.unsupported-field",
100
+ });
101
+ if (Array.isArray(value))
102
+ return { propertyName, operator: op === "!=" ? "NOT_IN" : "IN", values: value.map(String) };
103
+ return { propertyName, operator: OPERATORS[op], value: String(value) };
104
+ });
105
+ /**
106
+ * The account's CRM for core's sync: lists in full by `after`, changes by search on the modified time, deletions by a
107
+ * pass over every id, since HubSpot gives a private app no change feed (webhooks need a public app). A service key has
108
+ * no user, so there is no `self()` and the copy is the whole account.
109
+ */
110
+ export const hubspotCrmSource = (hub, options = {}) => {
111
+ const now = options.now ?? Date.now;
112
+ const listPage = options.page ?? LIST_PAGE;
113
+ const searchPage = options.searchPage ?? SEARCH_PAGE;
114
+ /** core paid for a call's first request; each further one is spent from the run's budget. */
115
+ const metered = (context) => {
116
+ let paid = false;
117
+ const pay = () => {
118
+ if (paid)
119
+ context?.spend();
120
+ paid = true;
121
+ };
122
+ return {
123
+ get: (path, query) => {
124
+ pay();
125
+ return hub().get(path, query);
126
+ },
127
+ post: (path, body) => {
128
+ pay();
129
+ return hub().post(path, body);
130
+ },
131
+ };
132
+ };
133
+ const loaded = new Map();
134
+ /** Reading properties needs `crm.schemas.<type>.read`; without it records sync with no custom values. */
135
+ const fields = (kind, caller) => {
136
+ let found = loaded.get(kind);
137
+ if (!found) {
138
+ found = caller
139
+ .get(`/crm/properties/2026-03/${OBJECTS[kind].name}`)
140
+ .then((body) => resultsOf(body).flatMap((raw) => toField(raw) ?? []))
141
+ .catch((error) => {
142
+ if (refused(error))
143
+ return [];
144
+ loaded.delete(kind);
145
+ throw error;
146
+ });
147
+ loaded.set(kind, found);
148
+ }
149
+ return found;
150
+ };
151
+ let currency;
152
+ /** Asked only when a deal has an amount and no currency of its own. */
153
+ const currencyOf = (caller) => {
154
+ currency ??= accountDetails(caller).then((details) => details.companyCurrency ?? null, (error) => {
155
+ currency = undefined;
156
+ throw error;
157
+ });
158
+ return currency;
159
+ };
160
+ const mapped = async (kind, rows, defined, caller) => {
161
+ if (kind === "deal") {
162
+ const bare = rows.some((raw) => {
163
+ const properties = propertiesOf(raw);
164
+ return text(properties.amount) !== null && text(properties.deal_currency_code) === null;
165
+ });
166
+ const fallback = bare ? await currencyOf(caller) : null;
167
+ return rows.map((raw) => toDeal(raw, defined, fallback));
168
+ }
169
+ const map = { lead: toLead, person: toPerson, organization: toOrganization }[kind];
170
+ return rows.map((raw) => map(raw, defined));
171
+ };
172
+ /** The copy keeps no contact's custom values, as b24's does; a live read gives them. */
173
+ const synced = (kind, caller) => kind === "person" ? Promise.resolve([]) : fields(kind, caller);
174
+ const propertiesFor = (type, defined) => [
175
+ ...new Set([...type.properties, ...defined.map(({ code }) => code)]),
176
+ ];
177
+ /**
178
+ * One batch read per associated type (associations v4): a search answers no associations, and a list none of the
179
+ * type ids that mark the primary company.
180
+ */
181
+ const associate = async (type, rows, caller, types) => {
182
+ let linked = rows;
183
+ const ids = rows.flatMap((raw) => id(raw.id) ?? []);
184
+ for (const to of types)
185
+ linked = withAssociations(linked, to, await associationsOf(caller.post, type.name, to, ids));
186
+ return linked;
187
+ };
188
+ const everyLink = (type) => [...type.associations, ...type.linked];
189
+ /**
190
+ * The GET query's properties, the ones that do not fit named as a gap. Only a GET is capped: a change round's search
191
+ * sends them in a POST body and asks every one, so a property a full round left out still arrives with a change.
192
+ */
193
+ const getProperties = (kind, defined, context) => {
194
+ const { properties, dropped } = fitted(OBJECTS[kind].properties, defined.map(({ code }) => code));
195
+ if (dropped.length)
196
+ context?.gap({
197
+ kind,
198
+ message: `${dropped.length} of the account's own ${OBJECTS[kind].name} properties do not fit one request and were not read`,
199
+ });
200
+ return properties;
201
+ };
202
+ const readChanges = async (kind, cursor, page, caller, context) => {
203
+ const type = OBJECTS[kind];
204
+ const since = cursor === null ? null : Date.parse(cursor);
205
+ if (since !== null && Number.isNaN(since))
206
+ return { reset: true };
207
+ const { after, spot: saved, started } = pageOf(page, now());
208
+ const defined = await synced(kind, caller);
209
+ const properties = propertiesFor(type, defined);
210
+ const ended = { hasMore: false, cursor: new Date(started).toISOString() };
211
+ if (since === null) {
212
+ const query = {
213
+ limit: listPage,
214
+ properties: getProperties(kind, defined, context),
215
+ archived: false,
216
+ ...(type.associations.length ? { associations: type.associations.join(",") } : {}),
217
+ ...(after ? { after } : {}),
218
+ };
219
+ const body = await caller.get(`/crm/objects/2026-03/${type.path}`, query);
220
+ const rows = await associate(type, resultsOf(body).map((raw) => asked(raw, type.associations)), caller, type.linked);
221
+ const items = await mapped(kind, rows, defined, caller);
222
+ const next = nextOf(body);
223
+ return next ? { items, hasMore: true, nextCursor: `l${next}@${started}` } : { items, ...ended };
224
+ }
225
+ const spot = saved ?? { from: since - OVERLAP_MS, offset: 0 };
226
+ const { rows, more } = await search(caller.post, type.path, modifiedSince(type.modified, spot, searchPage, properties));
227
+ const items = await mapped(kind, await associate(type, rows, caller, everyLink(type)), defined, caller);
228
+ if (!more)
229
+ return { items, ...ended };
230
+ const next = nextSpot(spot, rows, type.modified, searchPage);
231
+ // More than the search cap changed at one moment (a mass import): only a full list reads them all.
232
+ if (next === null)
233
+ return { reset: true };
234
+ return { items, hasMore: true, nextCursor: `s${next.from}.${next.offset}@${started}` };
235
+ };
236
+ const known = async (kind, caller) => fields(kind, caller);
237
+ return {
238
+ provider: "hubspot",
239
+ traits: { kinds: ["organization", "person", "deal", "lead"], removedInChanges: false },
240
+ async pipelines(kind, context) {
241
+ try {
242
+ const body = await metered(context).get(`/crm/pipelines/2026-03/${PIPELINES[kind]}`);
243
+ return resultsOf(body).flatMap((raw) => {
244
+ const pipeline = toPipeline(raw, kind, (stage) => context?.gap({
245
+ kind,
246
+ message: `closed lead stage ${stage}: HubSpot gives no outcome; counted as lost`,
247
+ }));
248
+ return pipeline ? [pipeline] : [];
249
+ });
250
+ }
251
+ catch (error) {
252
+ if (kind === "lead" && refused(error)) {
253
+ context?.gap({ kind: "lead", scope: OBJECTS.lead.scope, message: leadsRefused });
254
+ return [];
255
+ }
256
+ throw scoped(error, OBJECTS[kind].scope);
257
+ }
258
+ },
259
+ async changes(kind, cursor, page, context) {
260
+ try {
261
+ return await readChanges(kind, cursor, page, metered(context), context);
262
+ }
263
+ catch (error) {
264
+ // Leads need Sales Hub Professional or Enterprise: an account without them still syncs everything else.
265
+ if (kind === "lead" && refused(error)) {
266
+ context?.gap({ kind: "lead", scope: OBJECTS.lead.scope, message: leadsRefused });
267
+ return { items: [], hasMore: false, cursor: null };
268
+ }
269
+ throw scoped(error, OBJECTS[kind].scope);
270
+ }
271
+ },
272
+ // Any other refusal fails the pass rather than answer no ids, which would mark every stored row deleted
273
+ // (WC-DATA-7). Leads are the exception: an account without Sales Hub Pro never has any, and core holds back a pass
274
+ // that would delete most of a kind until --rescan.
275
+ async ids(kind, page, context) {
276
+ const type = OBJECTS[kind];
277
+ try {
278
+ const body = await metered(context).get(`/crm/objects/2026-03/${type.path}`, {
279
+ limit: listPage,
280
+ properties: "hs_object_id",
281
+ archived: false,
282
+ ...(page ? { after: page } : {}),
283
+ });
284
+ const items = resultsOf(body).flatMap((raw) => id(raw.id) ?? []);
285
+ const next = nextOf(body);
286
+ return next ? { items, hasMore: true, nextCursor: next } : { items, hasMore: false };
287
+ }
288
+ catch (error) {
289
+ if (kind === "lead" && refused(error)) {
290
+ context?.gap({ kind: "lead", scope: type.scope, message: leadsRefused });
291
+ return { items: [], hasMore: false };
292
+ }
293
+ throw scoped(error, type.scope);
294
+ }
295
+ },
296
+ async fields(kind, context) {
297
+ return fields(kind, metered(context));
298
+ },
299
+ // Active owners, then the deactivated ones, which `archived=true` lists alone (owners guide).
300
+ async users(context) {
301
+ const caller = metered(context);
302
+ const users = [];
303
+ for (const archived of [false, true]) {
304
+ let after = null;
305
+ do {
306
+ const body = await caller
307
+ .get("/crm/owners/2026-03", { limit: LIST_PAGE, archived, ...(after ? { after } : {}) })
308
+ .catch((error) => {
309
+ throw scoped(error, "crm.objects.owners.read");
310
+ });
311
+ for (const raw of resultsOf(body)) {
312
+ const user = toUser(raw);
313
+ if (user)
314
+ users.push(user);
315
+ }
316
+ after = nextOf(body);
317
+ } while (after);
318
+ }
319
+ return [...new Map(users.map((user) => [user.externalId, user])).values()];
320
+ },
321
+ async list(kind, query, context) {
322
+ const caller = metered(context);
323
+ const type = OBJECTS[kind];
324
+ const defined = await known(kind, caller);
325
+ const filters = filtersOf(kind, query.conditions, defined);
326
+ const properties = propertiesFor(type, defined);
327
+ const page = await walk(crmWindowOf(query), SEARCH_PAGE, async (offset, limit) => {
328
+ const { rows, more } = await search(caller.post, type.path, {
329
+ filters,
330
+ sort: { propertyName: type.created, direction: "DESCENDING" },
331
+ properties,
332
+ limit,
333
+ offset,
334
+ ...(query.text ? { query: query.text } : {}),
335
+ });
336
+ return { rows: await associate(type, rows, caller, everyLink(type)), more };
337
+ });
338
+ return { items: await mapped(kind, page.items, defined, caller), hasMore: page.hasMore };
339
+ },
340
+ async get(kind, externalId, context) {
341
+ if (!/^\d{1,20}$/.test(externalId))
342
+ return null;
343
+ const caller = metered(context);
344
+ const type = OBJECTS[kind];
345
+ const defined = await known(kind, caller);
346
+ let body;
347
+ try {
348
+ body = await caller.get(`/crm/objects/2026-03/${type.path}/${segment(externalId)}`, {
349
+ properties: getProperties(kind, defined, context),
350
+ ...(type.associations.length ? { associations: type.associations.join(",") } : {}),
351
+ });
352
+ }
353
+ catch (error) {
354
+ if (unseen(error))
355
+ return null;
356
+ throw error;
357
+ }
358
+ if (typeof body !== "object" || body === null)
359
+ return null;
360
+ const rows = await associate(type, [asked(body, type.associations)], caller, type.linked);
361
+ const [record] = await mapped(kind, rows, defined, caller);
362
+ return record ?? null;
363
+ },
364
+ activities: (since, page, context) => readActivities(metered(context), since, page, context, now, { search: searchPage, list: listPage }),
365
+ };
366
+ };
367
+ const leadsRefused = "HubSpot refused the leads: they need Sales Hub Professional or Enterprise and the crm.objects.leads.read scope; " +
368
+ "deals, contacts and companies are copied without them";
369
+ //# sourceMappingURL=source.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"source.js","sourceRoot":"","sources":["../../src/crm/source.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAExD,OAAO,EAOL,SAAS,EACT,WAAW,EACX,IAAI,GACL,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,EAAqC,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAC7F,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAChD,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AACpE,OAAO,EACL,MAAM,EACN,OAAO,EAEP,YAAY,EAEZ,SAAS,EACT,MAAM,EACN,OAAO,EACP,MAAM,EACN,cAAc,EACd,QAAQ,EACR,UAAU,EACV,MAAM,GACP,MAAM,cAAc,CAAA;AACrB,OAAO,EAAe,aAAa,EAAE,QAAQ,EAAE,WAAW,EAAa,MAAM,EAAE,MAAM,aAAa,CAAA;AAElG,MAAM,EAAE,EAAE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codegen";
2
+ export declare const definitions: Readonly<Record<string, SchemaNode>>;
3
+ //# sourceMappingURL=definitions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"definitions.d.ts","sourceRoot":"","sources":["../../src/generated/definitions.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AAE3D,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAuiG5D,CAAA"}