@wirecat/hubspot-cli 0.3.2 → 0.5.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 +34 -0
- package/README.md +6 -5
- package/dist/bin/hubspot.js +2 -2
- package/dist/bundle/agent-RBQMA24N.js +40 -0
- package/dist/bundle/{all-profiles-6452VSJB.js → all-profiles-PGFXLOKN.js} +11 -11
- package/dist/bundle/{anthropic-VQUOVYOW.js → anthropic-LPOJ3TYF.js} +5 -5
- package/dist/bundle/{app-server-EQZUP4H4.js → app-server-EYWGCSRY.js} +68 -68
- package/dist/bundle/{bun-AJPJ4ZUN.js → bun-ZJOOKIIW.js} +2 -2
- package/dist/bundle/{bun-sqlite-AGXGSF6D.js → bun-sqlite-Y6KKH2OW.js} +6 -6
- package/dist/bundle/{chunk-2A64XS22.js → chunk-23CLSKY7.js} +3 -3
- package/dist/bundle/{chunk-GZZR5U3K.js → chunk-34HDRZIL.js} +14 -14
- package/dist/bundle/{chunk-NZGI74GS.js → chunk-3CHJYWA2.js} +6 -6
- package/dist/bundle/{chunk-PMP37KLR.js → chunk-4RZ4DUQT.js} +3 -3
- package/dist/bundle/{chunk-LT5KE44Q.js → chunk-5ENY4POG.js} +61 -61
- package/dist/bundle/{chunk-QBEDVMLZ.js → chunk-5HGS65I3.js} +2 -2
- package/dist/bundle/{chunk-KVXEEKBB.js → chunk-5UPNDUAA.js} +2 -2
- package/dist/bundle/{chunk-YIF5M5R6.js → chunk-5WADRBQG.js} +3 -3
- package/dist/bundle/{chunk-KO4VR5NK.js → chunk-6PWRJGX4.js} +4 -4
- package/dist/bundle/{chunk-TKK3ECDS.js → chunk-6S422S22.js} +7 -7
- package/dist/bundle/{chunk-5AYKCKSE.js → chunk-7Q64D56R.js} +11 -11
- package/dist/bundle/{chunk-PHXOL5HZ.js → chunk-7RIE3DAW.js} +174 -161
- package/dist/bundle/{chunk-RVWGFD32.js → chunk-A5UTNGI4.js} +13 -13
- package/dist/bundle/{chunk-NTQBS2JL.js → chunk-ABPZOI3C.js} +4 -4
- package/dist/bundle/{chunk-L433IDOX.js → chunk-AHZQMSXW.js} +10 -10
- package/dist/bundle/{chunk-X5S5KUSU.js → chunk-AIQT2GGK.js} +19 -19
- package/dist/bundle/{chunk-3R4KRNUZ.js → chunk-AVBKXCEY.js} +8 -8
- package/dist/bundle/{chunk-TIHDBKA7.js → chunk-BCW7DAVV.js} +2 -2
- package/dist/bundle/{chunk-7UEL65GQ.js → chunk-BGUGTMTS.js} +8 -8
- package/dist/bundle/{chunk-BN22EKQQ.js → chunk-BH5FEFZB.js} +2 -2
- package/dist/bundle/{chunk-DJ2GJ77D.js → chunk-BVK4GUUI.js} +1352 -838
- package/dist/bundle/{chunk-3TEFE6YU.js → chunk-BW7NPFVC.js} +18 -8
- package/dist/bundle/{chunk-WRCKE5ND.js → chunk-CWCJEAHZ.js} +3 -3
- package/dist/bundle/{chunk-DW23LM47.js → chunk-DDMBPYHP.js} +2 -2
- package/dist/bundle/{chunk-WGBVRDY3.js → chunk-DEUCWBBH.js} +103 -5
- package/dist/bundle/{chunk-SEELWPRD.js → chunk-DJUUQG6Y.js} +8 -8
- package/dist/bundle/{chunk-VW5F6FK3.js → chunk-EGR3YUWD.js} +4 -4
- package/dist/bundle/{chunk-M763RNWP.js → chunk-EPBHJMF6.js} +20 -14
- package/dist/bundle/{chunk-7NZT7Y55.js → chunk-GZJP3KQQ.js} +3 -4
- package/dist/bundle/{chunk-BHZUPOQY.js → chunk-HBFSGL5E.js} +26 -26
- package/dist/bundle/{chunk-O3VM5PTJ.js → chunk-HPRGUUHY.js} +1 -1
- package/dist/bundle/{chunk-DSRXCLPO.js → chunk-HPSESLOZ.js} +1 -1
- package/dist/bundle/{chunk-Q27QAB4X.js → chunk-I334AT2H.js} +7 -7
- package/dist/bundle/{chunk-BAUK2MD5.js → chunk-K3WCBNH4.js} +43 -64
- package/dist/bundle/{chunk-JK2SNLU5.js → chunk-K5S7MKBB.js} +17 -17
- package/dist/bundle/{chunk-J5P5VSRG.js → chunk-KAW5VEER.js} +21 -8
- package/dist/bundle/{chunk-NNMU2TDU.js → chunk-KC4ILAKO.js} +1 -1
- package/dist/bundle/{chunk-K4X5ZHI2.js → chunk-KRTXJMCD.js} +16 -16
- package/dist/bundle/{chunk-DQB5JMTY.js → chunk-KXWRVLSU.js} +1 -1
- package/dist/bundle/{chunk-VQEAZXTV.js → chunk-L4SVHQ7H.js} +7 -7
- package/dist/bundle/{chunk-ARTJLL7W.js → chunk-L6WSFVTD.js} +8 -8
- package/dist/bundle/{chunk-OJIJVOOA.js → chunk-LWS5AO3H.js} +17 -17
- package/dist/bundle/{chunk-E4X7JAFC.js → chunk-LXLXF2OE.js} +3 -3
- package/dist/bundle/{chunk-ODPU3II6.js → chunk-MENMD5Y5.js} +8 -8
- package/dist/bundle/{chunk-5ZV7REBE.js → chunk-MFWECOO3.js} +82 -64
- package/dist/bundle/{chunk-HPZRUY6S.js → chunk-MGMLSPIY.js} +1 -1
- package/dist/bundle/{chunk-B3EH22CO.js → chunk-MKBQFD37.js} +1 -1
- package/dist/bundle/{chunk-E4FAMU2S.js → chunk-MPNMEWHA.js} +417 -320
- package/dist/bundle/{chunk-2HYGCLKN.js → chunk-MPQ4SPZG.js} +93 -40
- package/dist/bundle/{chunk-ITGNDZRR.js → chunk-MW4ROXQ6.js} +3 -3
- package/dist/bundle/{chunk-JP2HJXFO.js → chunk-NEDV6RCQ.js} +10 -3
- package/dist/bundle/{chunk-PLRUUXK7.js → chunk-NEP67GLY.js} +6 -6
- package/dist/bundle/{chunk-6MFP47XC.js → chunk-NKIKMG33.js} +35 -35
- package/dist/bundle/{chunk-GC6FLHZF.js → chunk-NLPGUYCG.js} +12 -12
- package/dist/bundle/{chunk-AF7DANIR.js → chunk-OCISQFMW.js} +1 -1
- package/dist/bundle/{chunk-AVUMH42T.js → chunk-ODRF47VS.js} +8 -8
- package/dist/bundle/{chunk-EE4JSYGZ.js → chunk-OFOA6VJ2.js} +3 -3
- package/dist/bundle/{chunk-BUGROVF3.js → chunk-PMGAU6AP.js} +2 -2
- package/dist/bundle/{chunk-IQ2XZ62J.js → chunk-POTS24SH.js} +18 -18
- package/dist/bundle/{chunk-B2W3C4N6.js → chunk-PPQRWFJZ.js} +5 -5
- package/dist/bundle/{chunk-GRFICQTZ.js → chunk-QCHW7R7L.js} +1 -1
- package/dist/bundle/{chunk-5K3FGXZH.js → chunk-QDNYJOWJ.js} +1 -1
- package/dist/bundle/{chunk-WCQW4GYO.js → chunk-QIHJKE4K.js} +24 -8
- package/dist/bundle/{chunk-7LQRXVQ3.js → chunk-QLFD3MOL.js} +1002 -560
- package/dist/bundle/{chunk-7VHBS5BJ.js → chunk-QPTHEZZ5.js} +2 -2
- package/dist/bundle/{chunk-IXZLMFPO.js → chunk-R7ZOCDNG.js} +1 -1
- package/dist/bundle/{chunk-FIVD4HM4.js → chunk-RJBKDZGV.js} +8 -8
- package/dist/bundle/{chunk-4DNHXRCJ.js → chunk-RZS7N3OZ.js} +7 -7
- package/dist/bundle/{chunk-A6UFH3QU.js → chunk-SBNZYRVZ.js} +4 -4
- package/dist/bundle/{chunk-EMOVVERN.js → chunk-STTHRJBX.js} +5 -5
- package/dist/bundle/{chunk-2NCO4E4T.js → chunk-V5VMAHDQ.js} +6 -6
- package/dist/bundle/{chunk-LA3YU4K7.js → chunk-VCYUYFIV.js} +1 -1
- package/dist/bundle/{chunk-3I2FGNWO.js → chunk-VIJV474N.js} +1 -1
- package/dist/bundle/{chunk-ABXVU5O4.js → chunk-WDR77HPO.js} +22 -1
- package/dist/bundle/{chunk-3PEKYGZ3.js → chunk-WEM4FZPM.js} +2 -2
- package/dist/bundle/{chunk-5PPG73G6.js → chunk-WQZENAPE.js} +3 -3
- package/dist/bundle/{chunk-5YNAVVCW.js → chunk-WXEN6AXQ.js} +16 -3
- package/dist/bundle/{chunk-IBTMK5KD.js → chunk-YJLJZMEA.js} +25 -25
- package/dist/bundle/{chunk-2PRVWEJC.js → chunk-YQBGPBYN.js} +2 -2
- package/dist/bundle/{chunk-3DIXAEGH.js → chunk-YZ5MULJM.js} +3 -3
- package/dist/bundle/{chunk-JUKAIXKY.js → chunk-Z7FC6VVM.js} +1 -1
- package/dist/bundle/{chunk-LKSNISYV.js → chunk-ZKPM53YG.js} +4 -4
- package/dist/bundle/{chunk-U6XA3OOM.js → chunk-ZLWQPUPB.js} +2 -2
- package/dist/bundle/{chunk-CBCEMFCF.js → chunk-ZMHD76RE.js} +2 -2
- package/dist/bundle/command-contract-O2UKYHLD.js +40 -0
- package/dist/bundle/{command-server-entry-GJSMDSNE.js → command-server-entry-B7S5AUE6.js} +28 -28
- package/dist/bundle/{decode-6PLXHVHW.js → decode-7L33C5UJ.js} +5 -5
- package/dist/bundle/{dispatch-TAQ7635E.js → dispatch-BIGHHSXV.js} +8 -8
- package/dist/bundle/{echarts-UZ7QLRE2.js → echarts-CWR3QH55.js} +2 -2
- package/dist/bundle/{embed-AWLL4EBF.js → embed-GXQ3HOQ6.js} +6 -6
- package/dist/bundle/{embedder-MM225YJ6.js → embedder-47OYXGLS.js} +9 -9
- package/dist/bundle/{failure-MR2XVHFP.js → failure-VMZOU5GZ.js} +2 -2
- package/dist/bundle/{first-run-KCZVNFJ7.js → first-run-YVQQOUQG.js} +12 -12
- package/dist/bundle/first-screen-TU3KE2B5.js +40 -0
- package/dist/bundle/hubspot.js +27 -25
- package/dist/bundle/{instructions-ZJ7U3QUE.js → instructions-QFS2MPK3.js} +1 -1
- package/dist/bundle/{mcp-CNV7F2XZ.js → mcp-Z2KZNCXB.js} +2 -2
- package/dist/bundle/meeting-combined-WBEOLQMP.js +25 -0
- package/dist/bundle/{meeting-model-OYXB2NOE.js → meeting-model-GLF2HVJG.js} +11 -11
- package/dist/bundle/{meeting-semantic-S3DBB7XD.js → meeting-semantic-RG56F4YX.js} +6 -6
- package/dist/bundle/{node-HGCZGZ4R.js → node-3TSWTXGI.js} +2 -2
- package/dist/bundle/{node-sqlite-RKYSRKEB.js → node-sqlite-UPQCG7DJ.js} +7 -7
- package/dist/bundle/{oauth-PYDCAQ7Y.js → oauth-MCVEENW3.js} +7 -7
- package/dist/bundle/{open-UCDSQUN2.js → open-JMUTKUYJ.js} +5 -5
- package/dist/bundle/{openai-Y4F5ZC7O.js → openai-HT7YDOK7.js} +15 -15
- package/dist/bundle/{process-P7FB7YO7.js → process-7RC6DAGM.js} +1 -1
- package/dist/bundle/{program-VKYZXANH.js → program-3DLBMOEJ.js} +174 -120
- package/dist/bundle/{prompt-E5TKZ37Q.js → prompt-7EROPXPF.js} +5 -5
- package/dist/bundle/{recognize-5NYPTSLT.js → recognize-B232GXD2.js} +4 -4
- package/dist/bundle/{remote-U4LUAHF2.js → remote-HGV64VRC.js} +9 -9
- package/dist/bundle/{rerank-AJAVKK5L.js → rerank-5S6TDXHD.js} +7 -7
- package/dist/bundle/{schemas-QLQ2K6DL.js → schemas-SB42IXEX.js} +1 -1
- package/dist/bundle/{serve-4UJ3R5IP.js → serve-D2WFCV6Z.js} +9 -9
- package/dist/bundle/{server-DUKWJUKD.js → server-4AXPTJPV.js} +60 -60
- package/dist/bundle/server-FFHVNABP.js +86 -0
- package/dist/bundle/{source-LJG4BWRU.js → source-DF63EC2B.js} +114 -86
- package/dist/bundle/{sqlite-runtime-KLEA4XAU.js → sqlite-runtime-DAFMZNLI.js} +6 -6
- package/dist/bundle/{state-COGSYMVH.js → state-7OEBDXVV.js} +6 -6
- package/dist/bundle/{store-BJXCSP26.js → store-2ZWSWF76.js} +24 -24
- package/dist/bundle/{store-V5UMSWK4.js → store-KC6US326.js} +26 -22
- package/dist/bundle/store-Q3ZKD4FJ.js +34 -0
- package/dist/bundle/store-maintenance-command-24A4GBRP.js +73 -0
- package/dist/bundle/surface-SPTM57EP.js +72 -0
- package/dist/bundle/writer-EQQ55HOS.js +86 -0
- package/dist/config.d.ts +1 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +59 -10
- package/dist/config.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +4 -4
- package/skills/hubspot-cli/references/api/api-basic.md +34 -6
- package/skills/hubspot-cli/references/api/api-batch.md +19 -9
- package/skills/hubspot-cli/references/api/api-search.md +9 -0
- package/dist/bundle/agent-A7ARC3QB.js +0 -40
- package/dist/bundle/command-contract-R2FGN7CQ.js +0 -40
- package/dist/bundle/first-screen-SCDV7TXT.js +0 -40
- package/dist/bundle/meeting-combined-EL5XZIJ5.js +0 -25
- package/dist/bundle/server-UQVV2PPX.js +0 -86
- package/dist/bundle/store-7DQGZH64.js +0 -32
- package/dist/bundle/store-maintenance-command-DQUBBWMD.js +0 -73
- package/dist/bundle/surface-IGBQUYE5.js +0 -72
- package/dist/bundle/writer-QOEJONAD.js +0 -86
|
@@ -2,16 +2,15 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
HUBSPOT_WRITES
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-WQZENAPE.js";
|
|
6
6
|
import {
|
|
7
7
|
accountDetails
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-5HGS65I3.js";
|
|
9
9
|
import {
|
|
10
10
|
LONGEST_PACE_WAIT_MS,
|
|
11
11
|
PACE,
|
|
12
12
|
ProfileTokenStore,
|
|
13
13
|
REPORT_FORMAT,
|
|
14
|
-
SECTION_CAPS,
|
|
15
14
|
SERVICE,
|
|
16
15
|
accountRemoveCommand,
|
|
17
16
|
appDoctorCommand,
|
|
@@ -37,37 +36,37 @@ import {
|
|
|
37
36
|
skillCommand,
|
|
38
37
|
upgradeCommand,
|
|
39
38
|
writeCsv
|
|
40
|
-
} from "./chunk-
|
|
41
|
-
import "./chunk-
|
|
39
|
+
} from "./chunk-BVK4GUUI.js";
|
|
40
|
+
import "./chunk-HPRGUUHY.js";
|
|
42
41
|
import {
|
|
43
42
|
PROVIDER
|
|
44
|
-
} from "./chunk-
|
|
45
|
-
import "./chunk-
|
|
43
|
+
} from "./chunk-5WADRBQG.js";
|
|
44
|
+
import "./chunk-GZJP3KQQ.js";
|
|
46
45
|
import {
|
|
47
46
|
SOURCE_SEARCHED,
|
|
48
47
|
allAnswer,
|
|
49
48
|
historySkipsOf,
|
|
50
49
|
offsetOf,
|
|
51
50
|
refuseOffline
|
|
52
|
-
} from "./chunk-
|
|
53
|
-
import "./chunk-
|
|
54
|
-
import "./chunk-
|
|
55
|
-
import "./chunk-
|
|
51
|
+
} from "./chunk-HBFSGL5E.js";
|
|
52
|
+
import "./chunk-NEP67GLY.js";
|
|
53
|
+
import "./chunk-AVBKXCEY.js";
|
|
54
|
+
import "./chunk-MGMLSPIY.js";
|
|
56
55
|
import {
|
|
57
56
|
addStoreMaintenanceCommands
|
|
58
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-MFWECOO3.js";
|
|
59
58
|
import {
|
|
60
59
|
commandPathKey,
|
|
61
60
|
commandPermissions,
|
|
62
61
|
terminalAsker
|
|
63
|
-
} from "./chunk-
|
|
64
|
-
import "./chunk-
|
|
65
|
-
import "./chunk-
|
|
66
|
-
import "./chunk-
|
|
67
|
-
import "./chunk-
|
|
68
|
-
import "./chunk-
|
|
69
|
-
import "./chunk-
|
|
70
|
-
import "./chunk-
|
|
62
|
+
} from "./chunk-KRTXJMCD.js";
|
|
63
|
+
import "./chunk-MENMD5Y5.js";
|
|
64
|
+
import "./chunk-L4SVHQ7H.js";
|
|
65
|
+
import "./chunk-34HDRZIL.js";
|
|
66
|
+
import "./chunk-BH5FEFZB.js";
|
|
67
|
+
import "./chunk-ABPZOI3C.js";
|
|
68
|
+
import "./chunk-PPQRWFJZ.js";
|
|
69
|
+
import "./chunk-ODRF47VS.js";
|
|
71
70
|
import {
|
|
72
71
|
CRM_ASSIGN_OTHERS_KEY,
|
|
73
72
|
CRM_WRITE_DEFAULTS,
|
|
@@ -112,18 +111,18 @@ import {
|
|
|
112
111
|
wantedCodes,
|
|
113
112
|
withCustomFields,
|
|
114
113
|
withReadableDeal
|
|
115
|
-
} from "./chunk-
|
|
114
|
+
} from "./chunk-MPNMEWHA.js";
|
|
116
115
|
import {
|
|
117
116
|
safeName
|
|
118
|
-
} from "./chunk-
|
|
119
|
-
import "./chunk-
|
|
120
|
-
import "./chunk-
|
|
117
|
+
} from "./chunk-A5UTNGI4.js";
|
|
118
|
+
import "./chunk-VCYUYFIV.js";
|
|
119
|
+
import "./chunk-WDR77HPO.js";
|
|
121
120
|
import {
|
|
122
121
|
latestVersion,
|
|
123
122
|
runUpdate,
|
|
124
123
|
updateNotice
|
|
125
|
-
} from "./chunk-
|
|
126
|
-
import "./chunk-
|
|
124
|
+
} from "./chunk-4RZ4DUQT.js";
|
|
125
|
+
import "./chunk-QDNYJOWJ.js";
|
|
127
126
|
import {
|
|
128
127
|
commandPath,
|
|
129
128
|
dateWindow,
|
|
@@ -136,15 +135,16 @@ import {
|
|
|
136
135
|
timeBounds,
|
|
137
136
|
typedQuery,
|
|
138
137
|
unfilteredQuery,
|
|
139
|
-
withQuery
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
import "./chunk-
|
|
143
|
-
import "./chunk-
|
|
144
|
-
import "./chunk-
|
|
145
|
-
import "./chunk-
|
|
146
|
-
import "./chunk-
|
|
147
|
-
import "./chunk-
|
|
138
|
+
withQuery,
|
|
139
|
+
withWords
|
|
140
|
+
} from "./chunk-EPBHJMF6.js";
|
|
141
|
+
import "./chunk-23CLSKY7.js";
|
|
142
|
+
import "./chunk-V5VMAHDQ.js";
|
|
143
|
+
import "./chunk-7Q64D56R.js";
|
|
144
|
+
import "./chunk-LXLXF2OE.js";
|
|
145
|
+
import "./chunk-SBNZYRVZ.js";
|
|
146
|
+
import "./chunk-WXEN6AXQ.js";
|
|
147
|
+
import "./chunk-STTHRJBX.js";
|
|
148
148
|
import {
|
|
149
149
|
Argument,
|
|
150
150
|
Command,
|
|
@@ -188,13 +188,13 @@ import {
|
|
|
188
188
|
sharedCommand,
|
|
189
189
|
snakeKeys,
|
|
190
190
|
snakeKeysKeeping
|
|
191
|
-
} from "./chunk-
|
|
192
|
-
import "./chunk-
|
|
193
|
-
import "./chunk-
|
|
194
|
-
import "./chunk-
|
|
195
|
-
import "./chunk-
|
|
196
|
-
import "./chunk-
|
|
197
|
-
import "./chunk-
|
|
191
|
+
} from "./chunk-7RIE3DAW.js";
|
|
192
|
+
import "./chunk-RJBKDZGV.js";
|
|
193
|
+
import "./chunk-OFOA6VJ2.js";
|
|
194
|
+
import "./chunk-L6WSFVTD.js";
|
|
195
|
+
import "./chunk-R7ZOCDNG.js";
|
|
196
|
+
import "./chunk-K5S7MKBB.js";
|
|
197
|
+
import "./chunk-YZ5MULJM.js";
|
|
198
198
|
import {
|
|
199
199
|
CRM_CHANGES,
|
|
200
200
|
CRM_SCOPES,
|
|
@@ -204,48 +204,47 @@ import {
|
|
|
204
204
|
crmSettingKey,
|
|
205
205
|
seenBy,
|
|
206
206
|
viewerSql
|
|
207
|
-
} from "./chunk-
|
|
208
|
-
import "./chunk-
|
|
207
|
+
} from "./chunk-QLFD3MOL.js";
|
|
208
|
+
import "./chunk-BGUGTMTS.js";
|
|
209
209
|
import {
|
|
210
210
|
dayIn
|
|
211
|
-
} from "./chunk-
|
|
212
|
-
import "./chunk-
|
|
211
|
+
} from "./chunk-CWCJEAHZ.js";
|
|
212
|
+
import "./chunk-I334AT2H.js";
|
|
213
213
|
import {
|
|
214
214
|
count,
|
|
215
215
|
createTaskService,
|
|
216
216
|
text,
|
|
217
217
|
time
|
|
218
|
-
} from "./chunk-
|
|
219
|
-
import "./chunk-
|
|
220
|
-
import "./chunk-
|
|
218
|
+
} from "./chunk-YJLJZMEA.js";
|
|
219
|
+
import "./chunk-DDMBPYHP.js";
|
|
220
|
+
import "./chunk-AHZQMSXW.js";
|
|
221
221
|
import {
|
|
222
222
|
hostFetch,
|
|
223
223
|
retrying
|
|
224
|
-
} from "./chunk-
|
|
225
|
-
import "./chunk-
|
|
226
|
-
import "./chunk-
|
|
227
|
-
import "./chunk-KO4VR5NK.js";
|
|
224
|
+
} from "./chunk-QIHJKE4K.js";
|
|
225
|
+
import "./chunk-K3WCBNH4.js";
|
|
226
|
+
import "./chunk-6PWRJGX4.js";
|
|
228
227
|
import {
|
|
229
228
|
DESKTOP,
|
|
230
229
|
IDENTITY,
|
|
231
230
|
PACKAGE,
|
|
232
231
|
SKILL
|
|
233
|
-
} from "./chunk-
|
|
234
|
-
import "./chunk-
|
|
232
|
+
} from "./chunk-6S422S22.js";
|
|
233
|
+
import "./chunk-BCW7DAVV.js";
|
|
235
234
|
import "./chunk-EH6ZEJGT.js";
|
|
236
|
-
import "./chunk-
|
|
237
|
-
import "./chunk-
|
|
235
|
+
import "./chunk-DEUCWBBH.js";
|
|
236
|
+
import "./chunk-DJUUQG6Y.js";
|
|
238
237
|
import {
|
|
239
238
|
installerOf
|
|
240
|
-
} from "./chunk-
|
|
239
|
+
} from "./chunk-VIJV474N.js";
|
|
241
240
|
import {
|
|
242
241
|
fieldsOf
|
|
243
|
-
} from "./chunk-
|
|
242
|
+
} from "./chunk-BW7NPFVC.js";
|
|
244
243
|
import {
|
|
245
244
|
foldName
|
|
246
|
-
} from "./chunk-
|
|
247
|
-
import "./chunk-
|
|
248
|
-
import "./chunk-
|
|
245
|
+
} from "./chunk-POTS24SH.js";
|
|
246
|
+
import "./chunk-NEDV6RCQ.js";
|
|
247
|
+
import "./chunk-KXWRVLSU.js";
|
|
249
248
|
import {
|
|
250
249
|
CRM_ACTIVITY_KINDS,
|
|
251
250
|
CRM_KINDS,
|
|
@@ -256,32 +255,33 @@ import {
|
|
|
256
255
|
normalCrmUserId,
|
|
257
256
|
parseDecimal,
|
|
258
257
|
scaleOf
|
|
259
|
-
} from "./chunk-
|
|
260
|
-
import "./chunk-
|
|
261
|
-
import "./chunk-
|
|
258
|
+
} from "./chunk-NLPGUYCG.js";
|
|
259
|
+
import "./chunk-KC4ILAKO.js";
|
|
260
|
+
import "./chunk-ZMHD76RE.js";
|
|
262
261
|
import {
|
|
263
262
|
SAVE_HELP,
|
|
264
263
|
defineQuery,
|
|
265
264
|
queryFieldsOf,
|
|
266
265
|
timezoneOf,
|
|
267
266
|
zonedMoment
|
|
268
|
-
} from "./chunk-
|
|
269
|
-
import "./chunk-
|
|
267
|
+
} from "./chunk-5ENY4POG.js";
|
|
268
|
+
import "./chunk-HPSESLOZ.js";
|
|
269
|
+
import "./chunk-RZS7N3OZ.js";
|
|
270
270
|
import "./chunk-D72URWJE.js";
|
|
271
271
|
import {
|
|
272
272
|
readSecret
|
|
273
|
-
} from "./chunk-
|
|
274
|
-
import "./chunk-
|
|
275
|
-
import "./chunk-
|
|
276
|
-
import "./chunk-
|
|
277
|
-
import "./chunk-
|
|
273
|
+
} from "./chunk-MW4ROXQ6.js";
|
|
274
|
+
import "./chunk-5UPNDUAA.js";
|
|
275
|
+
import "./chunk-WEM4FZPM.js";
|
|
276
|
+
import "./chunk-3CHJYWA2.js";
|
|
277
|
+
import "./chunk-Z7FC6VVM.js";
|
|
278
278
|
import {
|
|
279
279
|
renderPretty,
|
|
280
280
|
resolvePaths
|
|
281
|
-
} from "./chunk-
|
|
281
|
+
} from "./chunk-AIQT2GGK.js";
|
|
282
282
|
import {
|
|
283
283
|
isoTime
|
|
284
|
-
} from "./chunk-
|
|
284
|
+
} from "./chunk-KAW5VEER.js";
|
|
285
285
|
import {
|
|
286
286
|
array,
|
|
287
287
|
boolean,
|
|
@@ -301,8 +301,8 @@ import "./chunk-Y5E2WNWB.js";
|
|
|
301
301
|
import {
|
|
302
302
|
CliError,
|
|
303
303
|
isCliError
|
|
304
|
-
} from "./chunk-
|
|
305
|
-
import "./chunk-
|
|
304
|
+
} from "./chunk-PMGAU6AP.js";
|
|
305
|
+
import "./chunk-QCHW7R7L.js";
|
|
306
306
|
import {
|
|
307
307
|
__export,
|
|
308
308
|
__name
|
|
@@ -311,7 +311,7 @@ import {
|
|
|
311
311
|
// dist/program.js
|
|
312
312
|
import { join as join4 } from "node:path";
|
|
313
313
|
|
|
314
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
314
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/update/index.js
|
|
315
315
|
import { realpathSync } from "node:fs";
|
|
316
316
|
import { fileURLToPath } from "node:url";
|
|
317
317
|
var npmRegistry = /* @__PURE__ */ __name(() => hostFetch({ hosts: ["registry.npmjs.org"] }), "npmRegistry");
|
|
@@ -6788,14 +6788,49 @@ var COMMAND_KEYS = Object.fromEntries([
|
|
|
6788
6788
|
[`${type}-batch-update`, [`${noun}.update`]],
|
|
6789
6789
|
[`${type}-batch-upsert`, [`${noun}.create`, `${noun}.update`]]
|
|
6790
6790
|
]));
|
|
6791
|
+
var READ_KEYS = Object.fromEntries([
|
|
6792
|
+
...[
|
|
6793
|
+
["deals", "deals"],
|
|
6794
|
+
["contacts", "people"],
|
|
6795
|
+
["companies", "organizations"],
|
|
6796
|
+
["leads", "leads"]
|
|
6797
|
+
].flatMap(([type, noun]) => [
|
|
6798
|
+
[`${type}-list`, `${noun}.list`],
|
|
6799
|
+
[`${type}-search`, `${noun}.list`],
|
|
6800
|
+
[`${type}-batch-read`, `${noun}.list`],
|
|
6801
|
+
[`${type}-get`, `${noun}.show`]
|
|
6802
|
+
]),
|
|
6803
|
+
...["notes", "calls", "emails", "meetings", "tasks"].flatMap((type) => ["list", "get", "search", "batch-read"].map((verb) => [`${type}-${verb}`, "activities.list"])),
|
|
6804
|
+
["owners-list", "users.list"],
|
|
6805
|
+
["owners-get", "users.show"],
|
|
6806
|
+
["pipelines-list", "pipelines.list"],
|
|
6807
|
+
["pipelines-get", "pipelines.show"],
|
|
6808
|
+
["pipelines-stages-list", "stages.list"],
|
|
6809
|
+
["pipelines-stages-get", "stages.list"],
|
|
6810
|
+
...[
|
|
6811
|
+
"properties-list",
|
|
6812
|
+
"properties-get",
|
|
6813
|
+
"properties-batch-read",
|
|
6814
|
+
"properties-groups-list",
|
|
6815
|
+
"properties-groups-get"
|
|
6816
|
+
].map((command) => [command, "fields.list"])
|
|
6817
|
+
]);
|
|
6791
6818
|
var offered = /* @__PURE__ */ __name((operation) => !operation.response?.sensitive, "offered");
|
|
6792
6819
|
var ERASE_KEY = "people.erase";
|
|
6793
6820
|
var ERASES = "contacts-gdpr-delete";
|
|
6821
|
+
var COMMAND_GROUPS = /* @__PURE__ */ new Set(["deals", "people", "organizations"]);
|
|
6794
6822
|
var keysOf = /* @__PURE__ */ __name((operation) => {
|
|
6795
6823
|
const group = GROUPS.get(firstWord(operation.command));
|
|
6796
|
-
const
|
|
6824
|
+
const writes = operation.effect === "write" && group !== void 0;
|
|
6825
|
+
const own = !writes ? [] : !COMMAND_GROUPS.has(group) ? [{ key: `${group}.write` }] : COMMAND_KEYS[operation.command] ? [] : [{ key: `${group}.update` }];
|
|
6797
6826
|
const erases = operation.command === ERASES ? [{ key: ERASE_KEY }] : [];
|
|
6798
|
-
|
|
6827
|
+
const read = READ_KEYS[operation.command];
|
|
6828
|
+
return [
|
|
6829
|
+
...own,
|
|
6830
|
+
...erases,
|
|
6831
|
+
...(COMMAND_KEYS[operation.command] ?? []).map((key) => ({ key })),
|
|
6832
|
+
...read ? [{ key: read }] : []
|
|
6833
|
+
];
|
|
6799
6834
|
}, "keysOf");
|
|
6800
6835
|
var isRecord2 = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null && !Array.isArray(value), "isRecord");
|
|
6801
6836
|
var propertiesOf = /* @__PURE__ */ __name((body) => {
|
|
@@ -6871,10 +6906,9 @@ var crmApiKeys = /* @__PURE__ */ __name((kind, verb) => {
|
|
|
6871
6906
|
}, "crmApiKeys");
|
|
6872
6907
|
var api = serviceApiPermissions({ manifest: API.manifest });
|
|
6873
6908
|
var keyOf = /* @__PURE__ */ __name((path) => path[0] === "api" && ["list", "show"].includes(path[1] ?? "") ? null : commandPathKey(path), "keyOf");
|
|
6874
|
-
var COMMAND_DEFAULTS = Object.fromEntries([
|
|
6875
|
-
key,
|
|
6876
|
-
|
|
6877
|
-
]));
|
|
6909
|
+
var COMMAND_DEFAULTS = Object.fromEntries([
|
|
6910
|
+
.../* @__PURE__ */ new Set([...Object.values(COMMAND_KEYS).flat(), ...Object.values(READ_KEYS), MOVES.named.key, CLOSES.named.key])
|
|
6911
|
+
].map((key) => [key, "allow"]));
|
|
6878
6912
|
var permissions = commandPermissions({
|
|
6879
6913
|
keyOf,
|
|
6880
6914
|
extra: [.../* @__PURE__ */ new Set([...api.extra, ...CRM_WRITE_KEYS])],
|
|
@@ -6882,6 +6916,7 @@ var permissions = commandPermissions({
|
|
|
6882
6916
|
defaults: {
|
|
6883
6917
|
...api.defaults,
|
|
6884
6918
|
...COMMAND_DEFAULTS,
|
|
6919
|
+
[ERASE_KEY]: "deny",
|
|
6885
6920
|
...CRM_WRITE_DEFAULTS
|
|
6886
6921
|
}
|
|
6887
6922
|
});
|
|
@@ -7223,12 +7258,12 @@ var apiCommand = /* @__PURE__ */ __name(() => {
|
|
|
7223
7258
|
timeZone: sent.timeZone
|
|
7224
7259
|
}), "failure"),
|
|
7225
7260
|
token: tokenOf,
|
|
7226
|
-
schemas: /* @__PURE__ */ __name(() => import("./schemas-
|
|
7261
|
+
schemas: /* @__PURE__ */ __name(() => import("./schemas-SB42IXEX.js").then((module) => module.schemas), "schemas"),
|
|
7227
7262
|
definitions: /* @__PURE__ */ __name(() => import("./definitions-MVPICAWV.js").then((module) => module.definitions), "definitions")
|
|
7228
7263
|
});
|
|
7229
7264
|
}, "apiCommand");
|
|
7230
7265
|
|
|
7231
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7266
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/crm/stage-tasks.js
|
|
7232
7267
|
var DAY = 864e5;
|
|
7233
7268
|
var openStageTasks = /* @__PURE__ */ __name(async (store, account, now, { history = false } = {}) => {
|
|
7234
7269
|
const rules = await store.crm.stageTasks(account);
|
|
@@ -7265,8 +7300,9 @@ var openStageTasks = /* @__PURE__ */ __name(async (store, account, now, { histor
|
|
|
7265
7300
|
return opened;
|
|
7266
7301
|
}, "openStageTasks");
|
|
7267
7302
|
|
|
7268
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7303
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/crm/digest.js
|
|
7269
7304
|
var HOUR = 36e5;
|
|
7305
|
+
var SHOWN = 7;
|
|
7270
7306
|
var STALE_HOURS = 24;
|
|
7271
7307
|
var WORDS = {
|
|
7272
7308
|
en: {
|
|
@@ -7302,7 +7338,7 @@ var endOfDay = /* @__PURE__ */ __name((now, zone) => {
|
|
|
7302
7338
|
var crmDigest = /* @__PURE__ */ __name(async (store, account, options) => {
|
|
7303
7339
|
const { since, until, now, zone, viewer } = options;
|
|
7304
7340
|
const words = WORDS[options.language] ?? WORDS.en;
|
|
7305
|
-
const cap =
|
|
7341
|
+
const cap = SHOWN;
|
|
7306
7342
|
const window = { since, until, ...viewer ? { viewer } : {} };
|
|
7307
7343
|
const counts = await store.crm.changeCounts(account, window);
|
|
7308
7344
|
const changesOf = /* @__PURE__ */ __name(async (kind) => counts[kind] ? (await store.crm.changes(account, { ...window, changes: [kind], limit: cap, offset: 0 })).items : [], "changesOf");
|
|
@@ -7408,7 +7444,7 @@ var healthOf = /* @__PURE__ */ __name(async (store, account, { now, profile }) =
|
|
|
7408
7444
|
return stale > STALE_HOURS ? [{ ...named, stale_hours: Math.floor(stale) }] : [];
|
|
7409
7445
|
}, "healthOf");
|
|
7410
7446
|
|
|
7411
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7447
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/crm/cli/csv.js
|
|
7412
7448
|
var csvFormatOption = /* @__PURE__ */ __name(() => annotateOption(new Option("--format <format>", "csv: this page as a table for a spreadsheet; --json=a,b picks its columns").choices(["csv"]), { mcp: false }), "csvFormatOption");
|
|
7413
7449
|
var DEAL_CSV_COLUMNS = [
|
|
7414
7450
|
"ref",
|
|
@@ -7530,7 +7566,7 @@ var renderCsv = /* @__PURE__ */ __name((command, open2, read, defaults = DEAL_CS
|
|
|
7530
7566
|
});
|
|
7531
7567
|
}, "renderCsv");
|
|
7532
7568
|
|
|
7533
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7569
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/crm/cli/records.js
|
|
7534
7570
|
var time2 = nullable(isoTime);
|
|
7535
7571
|
var metadata = optional(record(string(), strictObject({
|
|
7536
7572
|
label: nullable(string()),
|
|
@@ -7705,13 +7741,16 @@ var addCrmRecordCommands = /* @__PURE__ */ __name((program, options) => {
|
|
|
7705
7741
|
const stored = await run3.store.crm.fields(run3.account, kind);
|
|
7706
7742
|
return stored.length ? stored : await run3.source().fields?.(kind) ?? [];
|
|
7707
7743
|
}, "liveFields");
|
|
7744
|
+
const words = options.liveQuery === "words";
|
|
7708
7745
|
const records = /* @__PURE__ */ __name((noun) => {
|
|
7709
7746
|
const group = annotate(program.command(noun.noun), { effects: REMOTE_READ }).description(`the CRM's ${noun.what}, read live: the copy holds only your own`);
|
|
7710
|
-
|
|
7747
|
+
const query = words ? { ...noun.query, fields: noun.query.fields.filter(({ name }) => name === "name") } : noun.query;
|
|
7748
|
+
const list = answerEntity(annotate(group.command("list"), { effects: REMOTE_READ, offline: false }), noun.entity, noun.schema);
|
|
7749
|
+
example((words ? withWords(list, query, `words the CRM's own search looks for in ${noun.what}`) : withQuery(list, query).addHelpText("after", CUSTOM_HELP)).description(`${noun.what} in the CRM, newest first; another client is found here, never in the copy`).option("--limit <n>", `${noun.what} per page, 1\u2013${MOST}`, integer(MOST), 50).option("--page <n>", "which page, starting at 1", integer(1e6), 1).addOption(csvFormatOption()), `${noun.noun} list`, words ? `${noun.noun} list anna --json` : `${noun.noun} list name:anna* --json`, `${noun.noun} list --format csv > ${noun.noun}.csv`).action(async (words2, opts, command) => {
|
|
7711
7750
|
const csv = opts.format === "csv";
|
|
7712
7751
|
const path = commandPath(command);
|
|
7713
|
-
const text2 = typedQuery(
|
|
7714
|
-
const names = customNames(text2,
|
|
7752
|
+
const text2 = typedQuery(words2);
|
|
7753
|
+
const names = customNames(text2, query, path, "name");
|
|
7715
7754
|
const columns = command.optsWithGlobals().fields;
|
|
7716
7755
|
const wanted = csv && columns === void 0 ? "all" : wantedCodes(columns);
|
|
7717
7756
|
const read = /* @__PURE__ */ __name(async (run3) => {
|
|
@@ -7719,7 +7758,7 @@ var addCrmRecordCommands = /* @__PURE__ */ __name((program, options) => {
|
|
|
7719
7758
|
const fields = names.length || wanted !== void 0 || csv ? await liveFields(run3, noun.kind) : [];
|
|
7720
7759
|
const chosen = filterableFields(fields, names);
|
|
7721
7760
|
selectedCodes(fields, wanted);
|
|
7722
|
-
const terms = nativeTerms(listQuery(text2, withCustomFields(
|
|
7761
|
+
const terms = nativeTerms(listQuery(text2, withCustomFields(query, chosen), path, { defaultField: "name" }), path);
|
|
7723
7762
|
const custom = customConditions(terms, chosen);
|
|
7724
7763
|
const name = searchText(terms.get("name"));
|
|
7725
7764
|
terms.delete("name");
|
|
@@ -7744,7 +7783,7 @@ var addCrmRecordCommands = /* @__PURE__ */ __name((program, options) => {
|
|
|
7744
7783
|
limit: opts.limit,
|
|
7745
7784
|
page: opts.page,
|
|
7746
7785
|
has_more: found.hasMore,
|
|
7747
|
-
...
|
|
7786
|
+
...words2.length ? { args: { query: words2 } } : {}
|
|
7748
7787
|
});
|
|
7749
7788
|
});
|
|
7750
7789
|
});
|
|
@@ -7763,9 +7802,18 @@ var addCrmRecordCommands = /* @__PURE__ */ __name((program, options) => {
|
|
|
7763
7802
|
if (options.live.includes("user"))
|
|
7764
7803
|
users(program, options);
|
|
7765
7804
|
}, "addCrmRecordCommands");
|
|
7805
|
+
var byIdOrNone = /* @__PURE__ */ __name(async (run3, noun, id) => {
|
|
7806
|
+
try {
|
|
7807
|
+
return await sourceWith(run3, "get", noun.what).get(noun.kind, id);
|
|
7808
|
+
} catch (error) {
|
|
7809
|
+
if (isCliError(error) && error.code === "validation_error")
|
|
7810
|
+
return null;
|
|
7811
|
+
throw error;
|
|
7812
|
+
}
|
|
7813
|
+
}, "byIdOrNone");
|
|
7766
7814
|
var recordNamed = /* @__PURE__ */ __name(async (run3, noun, given) => {
|
|
7767
7815
|
const id = given.trim();
|
|
7768
|
-
const byId = RECORD_ID.test(id) ? await
|
|
7816
|
+
const byId = RECORD_ID.test(id) ? await byIdOrNone(run3, noun, id) : null;
|
|
7769
7817
|
if (byId)
|
|
7770
7818
|
return byId;
|
|
7771
7819
|
const want = foldName(id);
|
|
@@ -7899,7 +7947,7 @@ var addRecordWrites = /* @__PURE__ */ __name((group, noun, { within, example, wr
|
|
|
7899
7947
|
}, "addRecordWrites");
|
|
7900
7948
|
var idOf = /* @__PURE__ */ __name((opts) => opts.operationId === void 0 ? {} : { operationId: opts.operationId }, "idOf");
|
|
7901
7949
|
|
|
7902
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7950
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/crm/cli/activities.js
|
|
7903
7951
|
var MOST2 = 500;
|
|
7904
7952
|
var nullableText = nullable(text);
|
|
7905
7953
|
var REFS = ["deal", "lead", "person", "organization"];
|
|
@@ -8012,7 +8060,7 @@ var addCrmActivityCommands = /* @__PURE__ */ __name((program, options) => {
|
|
|
8012
8060
|
}, "addCrmActivityCommands");
|
|
8013
8061
|
var refOf = /* @__PURE__ */ __name((kind, value) => value.includes(":") ? value : `${kind}:${value}`, "refOf");
|
|
8014
8062
|
|
|
8015
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8063
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/crm/cli/changes.js
|
|
8016
8064
|
var MOST3 = 500;
|
|
8017
8065
|
var DAY2 = 864e5;
|
|
8018
8066
|
var nullableText2 = nullable(text);
|
|
@@ -8116,10 +8164,11 @@ var positionOf = /* @__PURE__ */ __name((cursor) => {
|
|
|
8116
8164
|
var digestState = /* @__PURE__ */ __name((schedule) => `crm:digest:${schedule}`, "digestState");
|
|
8117
8165
|
var addCrmChangeCommands = /* @__PURE__ */ __name((program, options) => {
|
|
8118
8166
|
const { within, example, now, ownerOf: ownerOf2, pathOf: pathOf2 } = options;
|
|
8167
|
+
const deals = options.leads === false ? "deals" : "deals and leads";
|
|
8119
8168
|
if (options.activities)
|
|
8120
8169
|
addCrmActivityCommands(program, { within, example, now, ownerOf: ownerOf2, pathOf: pathOf2 });
|
|
8121
|
-
const group = annotate(program.command("changes"), { effects: NO_EFFECTS }).description(
|
|
8122
|
-
example(withQuery(answerEntity(annotate(group.command("list"), { effects: LOCAL_READ }), "crm_change", crmChange).description(
|
|
8170
|
+
const group = annotate(program.command("changes"), { effects: NO_EFFECTS }).description(`what changed in the CRM's ${options.leads === false ? "deals" : "deals, leads"}, activities and contacts, as the syncs copied it`);
|
|
8171
|
+
example(withQuery(answerEntity(annotate(group.command("list"), { effects: LOCAL_READ }), "crm_change", crmChange).description(`${deals} made, moved, won, lost and given another owner, activities added and done, and contacts added, newest first; the last day unless at: says otherwise`).option("--limit <n>", `changes per page, 1\u2013${MOST3}`, integer(MOST3), 50).option("--cursor <cursor>", "the next page, as the last answer's page.next gave it").addOption(annotateOption(new Option("--format <format>", "csv: this page as a table; report: the window as a morning digest document, for schedule command. Run by a schedule, the report starts where that schedule's last one ended").choices(["csv", "report"]), { mcp: false })), CHANGES_QUERY), 'changes list "at>=1d"', "changes list change:won at>=7d --json", 'changes list "at>=1d" --format report').action(async (words, opts, command) => {
|
|
8123
8172
|
const name = "changes list";
|
|
8124
8173
|
const terms = queryTerms(words, CHANGES_QUERY, name, ["at"]);
|
|
8125
8174
|
const zone = timezoneOf();
|
|
@@ -8231,7 +8280,7 @@ var pipelineOf2 = /* @__PURE__ */ __name(async (run3, value) => {
|
|
|
8231
8280
|
}) : new CliError("not_found", `no pipeline ${value} in this account`, { reason: "pipeline.not-found" });
|
|
8232
8281
|
}, "pipelineOf");
|
|
8233
8282
|
|
|
8234
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8283
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/crm/cli/files.js
|
|
8235
8284
|
import { createHash } from "node:crypto";
|
|
8236
8285
|
import { chmodSync, constants, copyFileSync, existsSync, linkSync, mkdirSync, readFileSync as readFileSync2, renameSync, rmSync } from "node:fs";
|
|
8237
8286
|
import { open } from "node:fs/promises";
|
|
@@ -8768,7 +8817,7 @@ var syncFiles = /* @__PURE__ */ __name(async (context, outOfTime, deadline = (ms
|
|
|
8768
8817
|
return report;
|
|
8769
8818
|
}, "syncFiles");
|
|
8770
8819
|
|
|
8771
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8820
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/crm/cli/pipeline-view.js
|
|
8772
8821
|
var sumOf = /* @__PURE__ */ __name((amounts) => amounts.map(({ amount, currency }) => `${groupDigits(amount)} ${currency}`).join(", ") || "\u2014", "sumOf");
|
|
8773
8822
|
var percent = /* @__PURE__ */ __name((share) => share === null ? "\u2014" : `${Math.round(share * 100)}%`, "percent");
|
|
8774
8823
|
var openStages = /* @__PURE__ */ __name((stages) => {
|
|
@@ -8814,11 +8863,12 @@ ${outcomes.join("\n")}`
|
|
|
8814
8863
|
].join("\n\n");
|
|
8815
8864
|
}, "pipelineView");
|
|
8816
8865
|
|
|
8817
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8866
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/crm/cli/search-all.js
|
|
8818
8867
|
var SEARCHED = ["crm", ...SOURCE_SEARCHED];
|
|
8819
8868
|
var DEFAULT_LIMIT = 20;
|
|
8820
|
-
var addCrmSearchAll = /* @__PURE__ */ __name((searches, { within, app, example, viewerOf: viewerOf2 }) => {
|
|
8821
|
-
const
|
|
8869
|
+
var addCrmSearchAll = /* @__PURE__ */ __name((searches, { within, app, example, viewerOf: viewerOf2, leads = true }) => {
|
|
8870
|
+
const deals = leads ? "deals and leads" : "deals";
|
|
8871
|
+
const all = annotate(new Command("all"), { effects: LOCAL_READ, partial: true, output: { entity: "hit" } }).summary(`search stored ${deals}, messages, notes, calendar events and meetings`).description(`search the CRM's ${deals} by the words of their title, company, contacts and activities, and the messages, notes, calendar events and meetings other WireCat tools stored \u2014 best match first. Use it when you do not know where something was written`).argument("<query...>", `words and "phrases"; ${deals} match the words of their title, company, contacts and activities`).addHelpText("after", SAVE_HELP);
|
|
8822
8872
|
searches.addCommand(searchAllOptions(all, SEARCHED));
|
|
8823
8873
|
example(all, "search all Example LLC", "search all website --only crm --json");
|
|
8824
8874
|
all.action(async (words, _opts, leaf) => {
|
|
@@ -8880,7 +8930,7 @@ var addCrmSearchAll = /* @__PURE__ */ __name((searches, { within, app, example,
|
|
|
8880
8930
|
});
|
|
8881
8931
|
}, "addCrmSearchAll");
|
|
8882
8932
|
|
|
8883
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8933
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/crm/cli/store.js
|
|
8884
8934
|
import { mkdtempSync, rmSync as rmSync2 } from "node:fs";
|
|
8885
8935
|
import { tmpdir } from "node:os";
|
|
8886
8936
|
import { join as join3 } from "node:path";
|
|
@@ -8929,7 +8979,7 @@ var withProfile = /* @__PURE__ */ __name(async ({ app, profile, open: open2 }, e
|
|
|
8929
8979
|
}
|
|
8930
8980
|
}, "withProfile");
|
|
8931
8981
|
|
|
8932
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8982
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/crm/cli/index.js
|
|
8933
8983
|
var MOST4 = 500;
|
|
8934
8984
|
var STAGE_REF = /^stage:\d+$/;
|
|
8935
8985
|
var timeField = /* @__PURE__ */ __name((name, example, relation) => nativeField({ name, type: "time", operators: ["term", "range"], example, relation }), "timeField");
|
|
@@ -8951,7 +9001,7 @@ var LEADS_QUERY = { entity: "lead", backend: "native", fields: DEAL_FIELDS };
|
|
|
8951
9001
|
var PIPELINES_QUERY = {
|
|
8952
9002
|
entity: "pipeline",
|
|
8953
9003
|
backend: "native",
|
|
8954
|
-
fields: [termField("kind", "enum", "kind:
|
|
9004
|
+
fields: [termField("kind", "enum", "kind:deal", { values: DEAL_KINDS })]
|
|
8955
9005
|
};
|
|
8956
9006
|
var STAGES_QUERY = {
|
|
8957
9007
|
entity: "stage",
|
|
@@ -9097,7 +9147,10 @@ var addCrmCommandsDefinition = /* @__PURE__ */ __name((program, options) => {
|
|
|
9097
9147
|
renderAnswer(command, outputFor(command), body, view);
|
|
9098
9148
|
}), "within");
|
|
9099
9149
|
const example = /* @__PURE__ */ __name((command, ...lines) => annotate(command, { examples: lines.map((line) => `${options.app.command} work ${line}`) }), "example");
|
|
9100
|
-
|
|
9150
|
+
const hasLeads = options.leads !== false;
|
|
9151
|
+
const dealsAndLeads = hasLeads ? "deals and leads" : "deals";
|
|
9152
|
+
example(answerEntity(annotate(program.command("sync"), { effects: FETCH, offline: false, cooperative: true, partial: true }), "crm_sync", crmSync).description(`bring the CRM's copy in the local store up to date: pipelines, companies, contacts, ${dealsAndLeads} that changed since the last sync, or everything with --rescan; a run stops before its deadline or --max-pages and the next one goes on from there`).addHelpText("after", `
|
|
9153
|
+
With the activities setting on, it also copies the activities and tasks on the ${dealsAndLeads} it keeps. Then each ${hasLeads ? "deal or lead" : "deal"} that moved into a stage the stage-tasks setting names opens a local task, once per move.`), "sync", "sync --rescan", "sync --max-pages 20").option("--rescan", "list everything again, every id too, dropping a round in progress").option("--max-pages <pages>", "at most this many requests to the CRM in this run", integer(1e5)).action(async (opts, command) => {
|
|
9101
9154
|
const { signal } = environmentOf(command);
|
|
9102
9155
|
await within(command, async (run3) => {
|
|
9103
9156
|
const source = run3.source();
|
|
@@ -9154,7 +9207,7 @@ var addCrmCommandsDefinition = /* @__PURE__ */ __name((program, options) => {
|
|
|
9154
9207
|
await within(command, async (run3) => {
|
|
9155
9208
|
const status = await crmStatus(run3.store, run3.account, { profile: run3.profile, now: now() });
|
|
9156
9209
|
if (await viewerOf(run3))
|
|
9157
|
-
outputFor(command).renderer.note(
|
|
9210
|
+
outputFor(command).renderer.note(`stored counts the whole copy, more than the ${dealsAndLeads} you may read`);
|
|
9158
9211
|
return listOf(pathOf(command).join(" "), {
|
|
9159
9212
|
items: status.items,
|
|
9160
9213
|
limit: status.limit,
|
|
@@ -9163,7 +9216,7 @@ var addCrmCommandsDefinition = /* @__PURE__ */ __name((program, options) => {
|
|
|
9163
9216
|
});
|
|
9164
9217
|
});
|
|
9165
9218
|
});
|
|
9166
|
-
example(answerEntity(annotate(store.command("apply"), { effects: LOCAL_WRITE }), "crm_contacts_removed", crmContactsApplied).description(
|
|
9219
|
+
example(answerEntity(annotate(store.command("apply"), { effects: LOCAL_WRITE }), "crm_contacts_removed", crmContactsApplied).description(`apply scope mine to the contacts already stored: remove those no ${hasLeads ? "deal or lead" : "deal"} of the chosen users and no kept company names, and the people they leave empty; counts only unless --yes, under scope all too. A sync that narrows the scope, or sync --rescan under mine, does this itself`), "store apply", "store apply --yes").option("--yes", "remove the contacts it counts; otherwise only count them").action(async (opts, command) => {
|
|
9167
9220
|
const yes = opts.yes === true;
|
|
9168
9221
|
await within(command, async (run3) => {
|
|
9169
9222
|
const scope = crmSettingKey(run3.account, "scope");
|
|
@@ -9338,7 +9391,7 @@ var addCrmCommandsDefinition = /* @__PURE__ */ __name((program, options) => {
|
|
|
9338
9391
|
const run3 = /* @__PURE__ */ __name((command, work) => within(command, (opened) => work(contextOf3(opened, command))), "run");
|
|
9339
9392
|
const create = write("create", "create", `make a ${kind} in the CRM, then store the CRM's copy of it`);
|
|
9340
9393
|
if (create)
|
|
9341
|
-
example(fields2(create), `${plural} create --title "Example kitchen" --amount 15000 --currency EUR`, `${plural} create --title "Example office" --pipeline Sales --stage "Quote sent" --field
|
|
9394
|
+
example(fields2(create), `${plural} create --title "Example kitchen" --amount 15000 --currency EUR`, `${plural} create --title "Example office" --pipeline Sales --stage "Quote sent" --field Source=web`).action(async (opts, command) => {
|
|
9342
9395
|
await run3(command, async (context) => {
|
|
9343
9396
|
const done = await createCrmItem(context, kind, inputOf(opts), idOf2(opts));
|
|
9344
9397
|
return answered(done.operationId, done.item);
|
|
@@ -9346,7 +9399,7 @@ var addCrmCommandsDefinition = /* @__PURE__ */ __name((program, options) => {
|
|
|
9346
9399
|
});
|
|
9347
9400
|
const update2 = write("update", "update", `change a ${kind} in the CRM; what is left out keeps its value; the CRM's copy is stored again`);
|
|
9348
9401
|
if (update2)
|
|
9349
|
-
example(fields2(reference(update2)), `${plural} update ${kind}:12 --amount 18000`, `${plural} update ${kind}:12 --field
|
|
9402
|
+
example(fields2(reference(update2)), `${plural} update ${kind}:12 --amount 18000`, `${plural} update ${kind}:12 --field Source=`).action(async (ref, opts, command) => {
|
|
9350
9403
|
await run3(command, async (context) => {
|
|
9351
9404
|
const done = await updateCrmItem(context, kind, ref, inputOf(opts), idOf2(opts));
|
|
9352
9405
|
return answered(done.operationId, done.item);
|
|
@@ -9389,7 +9442,7 @@ var addCrmCommandsDefinition = /* @__PURE__ */ __name((program, options) => {
|
|
|
9389
9442
|
if (options.leads !== false)
|
|
9390
9443
|
items("lead");
|
|
9391
9444
|
const pipelines = annotate(program.command("pipelines"), { effects: NO_EFFECTS }).description("the CRM's pipelines and their stages, as last synced");
|
|
9392
|
-
example(withQuery(annotate(pipelines.command("list"), { effects: LOCAL_READ, output: { entity: "pipeline" } }).description("pipelines copied from the CRM, with their stages in order and how many are open in each"), PIPELINES_QUERY), "pipelines list --json", "pipelines list kind:lead").action(async (words, _opts, command) => {
|
|
9445
|
+
example(withQuery(annotate(pipelines.command("list"), { effects: LOCAL_READ, output: { entity: "pipeline" } }).description("pipelines copied from the CRM, with their stages in order and how many are open in each"), PIPELINES_QUERY), "pipelines list --json", ...hasLeads ? ["pipelines list kind:lead"] : []).action(async (words, _opts, command) => {
|
|
9393
9446
|
const terms = queryTerms(words, PIPELINES_QUERY, "pipelines list");
|
|
9394
9447
|
await within(command, async (run3) => {
|
|
9395
9448
|
const found = await run3.store.deals.pipelines({
|
|
@@ -9424,7 +9477,7 @@ var addCrmCommandsDefinition = /* @__PURE__ */ __name((program, options) => {
|
|
|
9424
9477
|
}, (body) => pipelineView(body, outputFor(command).color));
|
|
9425
9478
|
});
|
|
9426
9479
|
const stages = annotate(program.command("stages"), { effects: NO_EFFECTS }).description("the stages of the CRM's pipelines, as last synced");
|
|
9427
|
-
example(withQuery(annotate(stages.command("list"), { effects: LOCAL_READ, output: { entity: "stage" } }).description("every stage of the CRM's pipelines in order, with its outcome and how many are open in it"), STAGES_QUERY), "stages list --json", "stages list kind:lead").action(async (words, _opts, command) => {
|
|
9480
|
+
example(withQuery(annotate(stages.command("list"), { effects: LOCAL_READ, output: { entity: "stage" } }).description("every stage of the CRM's pipelines in order, with its outcome and how many are open in it"), STAGES_QUERY), "stages list --json", ...hasLeads ? ["stages list kind:lead"] : []).action(async (words, _opts, command) => {
|
|
9428
9481
|
const terms = queryTerms(words, STAGES_QUERY, "stages list");
|
|
9429
9482
|
await within(command, async (run3) => {
|
|
9430
9483
|
const kind = terms.has("kind") ? terms.get("kind") : void 0;
|
|
@@ -9467,6 +9520,7 @@ var addCrmCommandsDefinition = /* @__PURE__ */ __name((program, options) => {
|
|
|
9467
9520
|
open: options.open,
|
|
9468
9521
|
app: options.app,
|
|
9469
9522
|
live: options.live ?? [],
|
|
9523
|
+
...options.liveQuery ? { liveQuery: options.liveQuery } : {},
|
|
9470
9524
|
...writes ? { writes } : {},
|
|
9471
9525
|
now
|
|
9472
9526
|
});
|
|
@@ -9474,7 +9528,7 @@ var addCrmCommandsDefinition = /* @__PURE__ */ __name((program, options) => {
|
|
|
9474
9528
|
if (options.files)
|
|
9475
9529
|
addCrmFileCommands(program, { ...options, within, example, now });
|
|
9476
9530
|
const fieldKinds = Object.keys(FIELD_KINDS).filter((word) => word !== "leads" || options.leads !== false);
|
|
9477
|
-
const fields = annotate(program.command("fields"), { effects: NO_EFFECTS }).description(
|
|
9531
|
+
const fields = annotate(program.command("fields"), { effects: NO_EFFECTS }).description(`the CRM's own fields on ${hasLeads ? "deals, leads" : "deals"}, people and organizations, as last synced`);
|
|
9478
9532
|
example(withQuery(answerEntity(annotate(fields.command("list"), { effects: LOCAL_READ }), "crm_field", crmField).description("the CRM's custom fields of one kind, in its order, with a list field's options").argument("<kind>", fieldKinds.join(", ")).option("--limit <n>", `fields per page, 1\u2013${MOST4}`, integer(MOST4), 50).option("--page <n>", "which page, starting at 1", integer(1e6)).option("--all", "every field, no paging"), FIELDS_QUERY), "fields list deals", "fields list people --json").action(async (kind, words, opts, command) => {
|
|
9479
9533
|
if (!fieldKinds.includes(kind))
|
|
9480
9534
|
throw new CliError("validation_error", `fields are listed for ${fieldKinds.join(", ")}; got ${kind}`, {
|
|
@@ -9497,13 +9551,13 @@ var addCrmCommandsDefinition = /* @__PURE__ */ __name((program, options) => {
|
|
|
9497
9551
|
});
|
|
9498
9552
|
});
|
|
9499
9553
|
const search = program.commands.find((one) => one.name() === "search") ?? annotate(program.command("search"), { effects: NO_EFFECTS }).description("search what the local store holds");
|
|
9500
|
-
addCrmSearchAll(search, { within, app: options.app, example, viewerOf });
|
|
9554
|
+
addCrmSearchAll(search, { within, app: options.app, example, viewerOf, leads: hasLeads });
|
|
9501
9555
|
}, "addCrmCommandsDefinition");
|
|
9502
9556
|
var addCrmCommands = honoursDryRun(sharedCommand(addCrmCommandsDefinition));
|
|
9503
9557
|
|
|
9504
9558
|
// dist/commands/crm-shared.js
|
|
9505
9559
|
var savedAccount = /* @__PURE__ */ __name(async (env, profile) => {
|
|
9506
|
-
const { openHubspotStore } = await import("./store-
|
|
9560
|
+
const { openHubspotStore } = await import("./store-Q3ZKD4FJ.js");
|
|
9507
9561
|
const store = await openHubspotStore(env, { readOnly: true }).catch(() => void 0);
|
|
9508
9562
|
if (!store)
|
|
9509
9563
|
return void 0;
|
|
@@ -9518,9 +9572,9 @@ var savedAccount = /* @__PURE__ */ __name(async (env, profile) => {
|
|
|
9518
9572
|
var openProfile = /* @__PURE__ */ __name(async (command, { readOnly }) => {
|
|
9519
9573
|
const { env, profile, environment } = contextOf(command);
|
|
9520
9574
|
const [{ openHubspotStore, PROVIDER: PROVIDER2 }, { hubspotCrmSource }, { hubspotCrmWriter }] = await Promise.all([
|
|
9521
|
-
import("./store-
|
|
9522
|
-
import("./source-
|
|
9523
|
-
import("./writer-
|
|
9575
|
+
import("./store-Q3ZKD4FJ.js"),
|
|
9576
|
+
import("./source-DF63EC2B.js"),
|
|
9577
|
+
import("./writer-EQQ55HOS.js")
|
|
9524
9578
|
]);
|
|
9525
9579
|
const fromToken = fromEnvironment(command);
|
|
9526
9580
|
const online = metaOf(command).effects?.remote !== "none";
|