@wirecat/zoom-cli 0.71.0 → 0.73.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/contracts/wirecat.json +1478 -0
- package/dist/account-removal.d.ts.map +1 -1
- package/dist/account-removal.js +0 -2
- package/dist/account-removal.js.map +1 -1
- package/dist/answers.d.ts +57 -3
- package/dist/answers.d.ts.map +1 -1
- package/dist/answers.js +0 -3
- package/dist/answers.js.map +1 -1
- package/dist/bin/main.js +13 -5
- package/dist/bin/main.js.map +1 -1
- package/dist/bin/zm.js +2 -2
- package/dist/bundle/{all-profiles-O4YNVPZX.js → all-profiles-V47CUJFK.js} +12 -12
- package/dist/bundle/answer-policy-W6H72X2R.js +112 -0
- package/dist/bundle/{anthropic-7GGRX3RX.js → anthropic-SID7Z3QN.js} +19 -12
- package/dist/bundle/{app-server-CPMKM3HI.js → app-server-KCMUSY4A.js} +75 -57
- package/dist/bundle/{bun-POHZKEPV.js → bun-PWMM6L45.js} +2 -2
- package/dist/bundle/{bun-sqlite-PGYMBPEL.js → bun-sqlite-3TLKUN5A.js} +10 -6
- package/dist/bundle/{chunk-Q3XLZIY3.js → chunk-2BAZRRJP.js} +29 -23
- package/dist/bundle/{chunk-OWEBWDHV.js → chunk-2NQPB6MT.js} +103 -9
- package/dist/bundle/chunk-2PYZTRRC.js +84 -0
- package/dist/bundle/chunk-2VYEGKQ3.js +13 -0
- package/dist/bundle/{chunk-I4DFFR7F.js → chunk-35CYSRGJ.js} +14 -5
- package/dist/bundle/{chunk-GGS6D4W4.js → chunk-3ADFJ3UP.js} +3 -3
- package/dist/bundle/{chunk-EOSVN2ER.js → chunk-3HTJBGNP.js} +242 -242
- package/dist/bundle/{chunk-2KESWII5.js → chunk-44YVZIA4.js} +3 -3
- package/dist/bundle/{chunk-GXF5HFFP.js → chunk-4LFFDUUW.js} +4 -4
- package/dist/bundle/{chunk-WOIHSQAL.js → chunk-4RJL32PF.js} +49 -10
- package/dist/bundle/{chunk-7ROXXRGG.js → chunk-6AO2RSYH.js} +7031 -5279
- package/dist/bundle/{chunk-DIQLXAAZ.js → chunk-6NI4FE5G.js} +6 -8
- package/dist/bundle/{chunk-X277FBTF.js → chunk-6WUTUCKH.js} +3 -3
- package/dist/bundle/{chunk-77TCCHMP.js → chunk-AIEMFRBU.js} +1 -1
- package/dist/bundle/{chunk-MRI6QMZ3.js → chunk-CIUJEQH4.js} +27 -19
- package/dist/bundle/{chunk-CRFOGYDG.js → chunk-CMWFYZ45.js} +2 -2
- package/dist/bundle/{chunk-LE7MDAQG.js → chunk-CQBLPBZU.js} +2 -2
- package/dist/bundle/{chunk-RQG5VOGH.js → chunk-DPSTOVKC.js} +185 -34
- package/dist/bundle/{chunk-4QUFFB2U.js → chunk-DYLYH7VE.js} +4 -4
- package/dist/bundle/{chunk-FEM2JQN2.js → chunk-EA2OB75T.js} +1 -1
- package/dist/bundle/chunk-ERQRY6WZ.js +54 -0
- package/dist/bundle/{chunk-P3XC6EDU.js → chunk-ETQNHS3A.js} +10 -129
- package/dist/bundle/{chunk-IAV5BG3I.js → chunk-EXWZCI5G.js} +1 -1
- package/dist/bundle/{chunk-VW6BF6M7.js → chunk-FIVFP53N.js} +1 -1
- package/dist/bundle/{chunk-DSVZEXYJ.js → chunk-FJMRDRPN.js} +3573 -3347
- package/dist/bundle/{chunk-7QC4M4HS.js → chunk-FT7X74RT.js} +4 -4
- package/dist/bundle/{chunk-ADLS6FVG.js → chunk-FXBHOCJK.js} +1 -1
- package/dist/bundle/{chunk-ZBFL5JPT.js → chunk-FZLJ2G7A.js} +22 -120
- package/dist/bundle/{chunk-GL3MYFMX.js → chunk-G2TSDMTA.js} +5 -5
- package/dist/bundle/{chunk-2FV5JUQU.js → chunk-G3SIY4MQ.js} +47 -40
- package/dist/bundle/{chunk-2U27KIKU.js → chunk-GCZMYDKU.js} +6 -6
- package/dist/bundle/{chunk-CKPCVEXU.js → chunk-HAMDPWEZ.js} +6 -6
- package/dist/bundle/{chunk-OE7EIP5L.js → chunk-HCZYJMBP.js} +1 -1
- package/dist/bundle/{chunk-OORMSM6O.js → chunk-HNWDEDMU.js} +61 -30
- package/dist/bundle/{chunk-FSHCAWZS.js → chunk-HO3GBTIT.js} +13464 -10422
- package/dist/bundle/chunk-IE7YBRUO.js +25 -0
- package/dist/bundle/{chunk-RGJ7OWHU.js → chunk-IJCUAKR5.js} +61 -21
- package/dist/bundle/{chunk-ULDXZ6LH.js → chunk-IKNOTHG2.js} +116 -70
- package/dist/bundle/{chunk-633QXP57.js → chunk-ILDGZBZD.js} +14 -9
- package/dist/bundle/{chunk-CFQF6IGY.js → chunk-JIS34MLC.js} +69 -6
- package/dist/bundle/{chunk-DHWBSXG3.js → chunk-JQF4LM3V.js} +415 -66
- package/dist/bundle/{chunk-4LAQDZXU.js → chunk-K5JFX5TK.js} +953 -210
- package/dist/bundle/{chunk-5LJTU4LY.js → chunk-K7EMVFJ7.js} +115 -113
- package/dist/bundle/chunk-KHBZ4OEP.js +16 -0
- package/dist/bundle/chunk-KK2IVZUQ.js +185 -0
- package/dist/bundle/{chunk-SELXER2Q.js → chunk-KQD4ZVNC.js} +7 -7
- package/dist/bundle/{chunk-VJXHIUFP.js → chunk-KSNJK4QM.js} +13 -13
- package/dist/bundle/{chunk-X4GWR6GO.js → chunk-KUL7S5Y3.js} +376 -10
- package/dist/bundle/{chunk-M76MXMLY.js → chunk-L6YSKCC3.js} +1 -1
- package/dist/bundle/chunk-LQYMN36C.js +73 -0
- package/dist/bundle/{chunk-USQ23X5V.js → chunk-LSVQCI6V.js} +751 -735
- package/dist/bundle/{chunk-DRBQDCDU.js → chunk-LVDTSCIN.js} +39 -122
- package/dist/bundle/{chunk-P3ASN72F.js → chunk-M4OP5ASJ.js} +1 -1
- package/dist/bundle/chunk-MAE5UGRQ.js +301 -0
- package/dist/bundle/{chunk-CT4WVR4N.js → chunk-MG2CCAVG.js} +3 -3
- package/dist/bundle/chunk-MOKEB656.js +71 -0
- package/dist/bundle/{chunk-BGTEVIW4.js → chunk-N3SOTKXC.js} +6 -6
- package/dist/bundle/{chunk-VRH7VRTK.js → chunk-NBA2V6LB.js} +10 -15
- package/dist/bundle/{chunk-5J4AMBMM.js → chunk-OFA22L4G.js} +4 -4
- package/dist/bundle/chunk-OKOJEBHK.js +106 -0
- package/dist/bundle/{chunk-Q5PI72CR.js → chunk-OMLVWOEF.js} +7 -2
- package/dist/bundle/{chunk-DK6ICIGL.js → chunk-OU5OXA6Q.js} +2150 -1312
- package/dist/bundle/{chunk-QVSLSWAL.js → chunk-P4FU6R3Z.js} +27 -152
- package/dist/bundle/{chunk-YPO2U2YB.js → chunk-PACLT6IW.js} +363 -115
- package/dist/bundle/{chunk-BBTQIVFP.js → chunk-PGPHEC2X.js} +2 -2
- package/dist/bundle/chunk-PJ3FKBXG.js +18 -0
- package/dist/bundle/{chunk-X3ZDN3U7.js → chunk-PKON63JH.js} +2 -2
- package/dist/bundle/{chunk-Q2SUFGSH.js → chunk-Q43KX56Z.js} +2 -2
- package/dist/bundle/{chunk-XI3VIQKW.js → chunk-QS6DWXDB.js} +569 -537
- package/dist/bundle/{chunk-INVTDIF6.js → chunk-QVJMFZFW.js} +1 -1
- package/dist/bundle/{chunk-QTHIU7CO.js → chunk-QWGEOQHA.js} +3 -2
- package/dist/bundle/{chunk-N2FNMION.js → chunk-R5FTCNLJ.js} +1 -1
- package/dist/bundle/{chunk-MW4EGDDV.js → chunk-SO52EJ2W.js} +2 -2
- package/dist/bundle/{chunk-HB6XJQ3Y.js → chunk-SYIOT45G.js} +5 -5
- package/dist/bundle/{chunk-4QPQ7MDA.js → chunk-TI2OANJZ.js} +1 -1
- package/dist/bundle/{chunk-ALIT5QFT.js → chunk-UIKVP23D.js} +1 -1
- package/dist/bundle/{chunk-OHWMIUCT.js → chunk-USIMMGWS.js} +244 -245
- package/dist/bundle/{chunk-MEED7YFG.js → chunk-UYBLNGZ2.js} +8 -2
- package/dist/bundle/{chunk-IED3NS7G.js → chunk-V5Q2QKYM.js} +29 -36
- package/dist/bundle/{chunk-54YDWBYG.js → chunk-VJVYGTPM.js} +15 -2
- package/dist/bundle/{chunk-5K7OGPGA.js → chunk-VPPNYUQM.js} +8 -8
- package/dist/bundle/{chunk-ZBKWRYRS.js → chunk-X2FILY5F.js} +3 -3
- package/dist/bundle/{chunk-2RUAMDVV.js → chunk-XLY7V2LB.js} +14 -14
- package/dist/bundle/chunk-XWBPP2HX.js +2 -0
- package/dist/bundle/{chunk-ZVI6TFQR.js → chunk-Y3IH7EZC.js} +17 -17
- package/dist/bundle/{chunk-YD2RYVMK.js → chunk-Z5XCU4S7.js} +46 -40
- package/dist/bundle/{chunk-RN4EHCC5.js → chunk-ZAIE3G5I.js} +3 -3
- package/dist/bundle/{chunk-2U6SER67.js → chunk-ZMHZ6CQS.js} +2 -2
- package/dist/bundle/{chunk-64ZHF6PJ.js → chunk-ZVQDOKDY.js} +3 -1
- package/dist/bundle/{chunk-TM4JSVGQ.js → chunk-ZX4QWTMQ.js} +42 -43
- package/dist/bundle/{cli-KHMEUXNG.js → cli-4ZYJ6OZE.js} +158 -88
- package/dist/bundle/command-contract-FJDDCHYP.js +43 -0
- package/dist/bundle/command-server-entry-CASONRIJ.js +173 -0
- package/dist/bundle/config-4DZHX2WX.js +99 -0
- package/dist/bundle/{decode-7RP4HSVE.js → decode-KEFCVGEB.js} +6 -6
- package/dist/bundle/{dispatch-IZCAK47P.js → dispatch-EU67WGME.js} +11 -11
- package/dist/bundle/{dist-BFT2SUBV.js → dist-GCQ7KCKN.js} +55 -30
- package/dist/bundle/{echarts-T2BSQ2YV.js → echarts-SDZA2SWG.js} +2 -2
- package/dist/bundle/{embed-BAS6YPDT.js → embed-43VJEPM6.js} +7 -7
- package/dist/bundle/{embedder-5XD5FCAO.js → embedder-Q4ZHAGRP.js} +10 -10
- package/dist/bundle/{failure-R2OIHCE5.js → failure-CTJLEB2R.js} +3 -3
- package/dist/bundle/first-run-CPOLQVNA.js +29 -0
- package/dist/bundle/first-screen-XYESRGWW.js +41 -0
- package/dist/bundle/folders-MSBTAPAG.js +24 -0
- package/dist/bundle/{instructions-XZPROPKY.js → instructions-7T6JJIFS.js} +1 -1
- package/dist/bundle/{main-TZXKGL3L.js → main-NA3QVPXS.js} +39 -25
- package/dist/bundle/{mcp-M4QN2E7R.js → mcp-TDKGDB4V.js} +2 -2
- package/dist/bundle/{meetings-JB2ISPND.js → meetings-7CVIQJTA.js} +9 -7
- package/dist/bundle/{node-A3B3MJWX.js → node-BZDMUFTW.js} +2 -2
- package/dist/bundle/{node-P4E63KXA.js → node-KM3CUABH.js} +9 -9
- package/dist/bundle/{node-sqlite-QVWDLGDX.js → node-sqlite-QHGB23B4.js} +11 -7
- package/dist/bundle/{oauth-YA6IYV4O.js → oauth-BMEMCM2I.js} +8 -8
- package/dist/bundle/{open-SY7TXJBS.js → open-JGU2NRJP.js} +6 -6
- package/dist/bundle/openai-VTXXFNCS.js +28 -0
- package/dist/bundle/{output-file-YGQYZCBJ.js → output-file-VDOCYH2G.js} +6 -6
- package/dist/bundle/{process-6HNBTJIY.js → process-756VBE7E.js} +1 -1
- package/dist/bundle/{program-77BUCJ4H.js → program-XM6CDIJ2.js} +134 -129
- package/dist/bundle/{prompt-YDG73YDS.js → prompt-2IPFXJ4B.js} +6 -6
- package/dist/bundle/{recognize-ECXDGTB7.js → recognize-672E2RIB.js} +5 -5
- package/dist/bundle/{remote-K4JHGBVJ.js → remote-YLHRVPDS.js} +11 -8
- package/dist/bundle/{rerank-IU2YYD4T.js → rerank-NBXQG3OS.js} +8 -8
- package/dist/bundle/run-log-3WITBT2F.js +126 -0
- package/dist/bundle/{serve-3XWIF3HI.js → serve-FNLOUMYP.js} +10 -10
- package/dist/bundle/{server-56VYOHWP.js → server-7ZB5AK5H.js} +53 -47
- package/dist/bundle/server-GGRGD4SH.js +77 -0
- package/dist/bundle/{services-X7IPEGQ5.js → services-Z4UWN64R.js} +56 -37
- package/dist/bundle/{speech-E2OBQWYA.js → speech-XSYVCKR3.js} +17 -14
- package/dist/bundle/sqlite-runtime-GAPXJNWU.js +20 -0
- package/dist/bundle/{state-4GMJYK4H.js → state-QSA53EF5.js} +7 -7
- package/dist/bundle/{store-LA4TV4DM.js → store-EKI4OAJH.js} +22 -19
- package/dist/bundle/{store-KPI7GB5Y.js → store-NOF5EYUC.js} +38 -21
- package/dist/bundle/store-connection-2OZQGEIO.js +92 -0
- package/dist/bundle/store-maintenance-command-GNX3SOZ6.js +67 -0
- package/dist/bundle/{streaming-EJ3NM2C2.js → streaming-PQEXKTE5.js} +7 -7
- package/dist/bundle/tokens-WJQYQ3FK.js +24 -0
- package/dist/bundle/zm.js +34 -10
- package/dist/bundle/{zoom-app-QEJBTIJ4.js → zoom-app-Y7RMWLVU.js} +9 -8
- package/dist/folders.d.ts +12 -2
- package/dist/folders.d.ts.map +1 -1
- package/dist/folders.js +81 -3
- package/dist/folders.js.map +1 -1
- package/dist/identity.d.ts +5 -0
- package/dist/identity.d.ts.map +1 -1
- package/dist/identity.js +14 -0
- package/dist/identity.js.map +1 -1
- package/dist/recording-schedule-setup.d.ts.map +1 -1
- package/dist/recording-schedule-setup.js +4 -7
- package/dist/recording-schedule-setup.js.map +1 -1
- package/dist/remote-http.d.ts +1 -1
- package/dist/remote-http.d.ts.map +1 -1
- package/dist/remote-http.js +21 -23
- package/dist/remote-http.js.map +1 -1
- package/dist/setup-commands.d.ts.map +1 -1
- package/dist/setup-commands.js +2 -4
- package/dist/setup-commands.js.map +1 -1
- package/dist/tokens.d.ts +17 -2
- package/dist/tokens.d.ts.map +1 -1
- package/dist/tokens.js +109 -29
- package/dist/tokens.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/wcat.d.ts +3 -0
- package/dist/wcat.d.ts.map +1 -0
- package/dist/wcat.js +4 -0
- package/dist/wcat.js.map +1 -0
- package/package.json +15 -14
- package/dist/bundle/answer-policy-PPSPMCLH.js +0 -104
- package/dist/bundle/chunk-KMV7GZB6.js +0 -35
- package/dist/bundle/chunk-UG447QY2.js +0 -27
- package/dist/bundle/chunk-XRFHQGOD.js +0 -17
- package/dist/bundle/command-contract-4K6XXZYE.js +0 -41
- package/dist/bundle/config-EEDB632I.js +0 -90
- package/dist/bundle/first-run-23WWZ2PW.js +0 -28
- package/dist/bundle/first-screen-6HFUYVFR.js +0 -39
- package/dist/bundle/folders-ZXTOFY4T.js +0 -16
- package/dist/bundle/openai-2AU24NRN.js +0 -25
- package/dist/bundle/run-log-LFEXNZ74.js +0 -118
- package/dist/bundle/server-YSTMUZ22.js +0 -72
- package/dist/bundle/store-connection-AZTIF6IH.js +0 -83
- package/dist/bundle/store-maintenance-command-LR572PS4.js +0 -61
- package/dist/bundle/tokens-BE6CJMR5.js +0 -20
- /package/dist/bundle/{chunk-VOXIGICJ.js → chunk-7O7XM37N.js} +0 -0
|
@@ -3,355 +3,18 @@ const require = __bundleRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
formatMeetingReference,
|
|
5
5
|
parseMeetingReference
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-IKNOTHG2.js";
|
|
7
7
|
import {
|
|
8
8
|
CliError
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-EA2OB75T.js";
|
|
10
10
|
import {
|
|
11
11
|
singleLine
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-HCZYJMBP.js";
|
|
13
13
|
import {
|
|
14
14
|
__name
|
|
15
15
|
} from "./chunk-ZVVMGPBJ.js";
|
|
16
16
|
|
|
17
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18
|
-
var SCHEME = "msg:";
|
|
19
|
-
var formatLocator = /* @__PURE__ */ __name(({ provider, account, chat, message }) => SCHEME + [provider, account, chat, message].map(encodeURIComponent).join("/"), "formatLocator");
|
|
20
|
-
var isLocator = /* @__PURE__ */ __name((reference) => reference.trim().startsWith(SCHEME), "isLocator");
|
|
21
|
-
var parseLocator = /* @__PURE__ */ __name((reference) => {
|
|
22
|
-
const trimmed = reference.trim();
|
|
23
|
-
const parts2 = trimmed.startsWith(SCHEME) ? trimmed.slice(SCHEME.length).split("/") : [];
|
|
24
|
-
if (parts2.length !== 4 || parts2.some((part) => part === "")) {
|
|
25
|
-
throw new CliError("validation_error", `"${singleLine(reference)}" is not a message locator \u2014 expected msg:<provider>/<account>/<chat>/<message>`);
|
|
26
|
-
}
|
|
27
|
-
const [provider, account, chat, message] = parts2.map(decodeURIComponent);
|
|
28
|
-
return { provider, account, chat, message };
|
|
29
|
-
}, "parseLocator");
|
|
30
|
-
|
|
31
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_737712cd0065e7e21fd5896a79d0773d/node_modules/@wirecat/cli-core/dist/domain/references.js
|
|
32
|
-
var SIMPLE_REFERENCES = [
|
|
33
|
-
"note",
|
|
34
|
-
"document",
|
|
35
|
-
"person",
|
|
36
|
-
"organization",
|
|
37
|
-
"project",
|
|
38
|
-
"task",
|
|
39
|
-
"memory",
|
|
40
|
-
"fact",
|
|
41
|
-
"bot",
|
|
42
|
-
"event",
|
|
43
|
-
"invoice",
|
|
44
|
-
"payment",
|
|
45
|
-
"order",
|
|
46
|
-
"deal",
|
|
47
|
-
"lead",
|
|
48
|
-
"pipeline",
|
|
49
|
-
"product",
|
|
50
|
-
"contract",
|
|
51
|
-
"subscription",
|
|
52
|
-
"wallet",
|
|
53
|
-
"transaction",
|
|
54
|
-
"entity"
|
|
55
|
-
];
|
|
56
|
-
var malformed = /* @__PURE__ */ __name((text, shape) => new CliError("validation_error", `"${singleLine(text)}" is not a reference \u2014 expected ${shape}`, {
|
|
57
|
-
reason: "ref.malformed"
|
|
58
|
-
}), "malformed");
|
|
59
|
-
var parts = /* @__PURE__ */ __name((rest, count, text, shape) => {
|
|
60
|
-
const split = rest.split("/");
|
|
61
|
-
if (split.length !== count || split.some((part) => part === ""))
|
|
62
|
-
throw malformed(text, shape);
|
|
63
|
-
return split.map(decodeURIComponent);
|
|
64
|
-
}, "parts");
|
|
65
|
-
var encoded = /* @__PURE__ */ __name((...values) => values.map(encodeURIComponent).join("/"), "encoded");
|
|
66
|
-
var folderPath = /* @__PURE__ */ __name((path) => {
|
|
67
|
-
const clean = path.split("/").filter((part) => part !== "" && part !== ".").join("/");
|
|
68
|
-
return clean === "" ? path.trim() === "" ? "" : null : clean;
|
|
69
|
-
}, "folderPath");
|
|
70
|
-
var MEETING_SHAPE = "meeting:<account>/<meeting>[/<transcript>[/<cue>]] with safe integer ids";
|
|
71
|
-
var kind = /* @__PURE__ */ __name((spec) => spec, "kind");
|
|
72
|
-
var simple = /* @__PURE__ */ __name((prefix) => kind({
|
|
73
|
-
prefix,
|
|
74
|
-
type: prefix,
|
|
75
|
-
shape: `${prefix}:<id>`,
|
|
76
|
-
parse: /* @__PURE__ */ __name((rest, text) => {
|
|
77
|
-
if (!rest.trim())
|
|
78
|
-
throw new CliError("validation_error", `"${singleLine(text)}" names no ${prefix}`, {
|
|
79
|
-
reason: "ref.malformed"
|
|
80
|
-
});
|
|
81
|
-
return { type: prefix, id: rest };
|
|
82
|
-
}, "parse"),
|
|
83
|
-
format: /* @__PURE__ */ __name((reference) => `${reference.type}:${reference.id}`, "format")
|
|
84
|
-
}), "simple");
|
|
85
|
-
var REF_KINDS = [
|
|
86
|
-
kind({
|
|
87
|
-
prefix: "msg",
|
|
88
|
-
type: "message",
|
|
89
|
-
shape: "msg:<provider>/<account>/<chat>/<message>",
|
|
90
|
-
parse: /* @__PURE__ */ __name((_, text) => {
|
|
91
|
-
try {
|
|
92
|
-
return { type: "message", ...parseLocator(text) };
|
|
93
|
-
} catch {
|
|
94
|
-
throw malformed(text, "msg:<provider>/<account>/<chat>/<message>");
|
|
95
|
-
}
|
|
96
|
-
}, "parse"),
|
|
97
|
-
format: formatLocator
|
|
98
|
-
}),
|
|
99
|
-
kind({
|
|
100
|
-
prefix: "chat",
|
|
101
|
-
type: "chat",
|
|
102
|
-
shape: "chat:<provider>/<account>/<chat>",
|
|
103
|
-
parse: /* @__PURE__ */ __name((rest, text) => {
|
|
104
|
-
const [provider, account, chat] = parts(rest, 3, text, "chat:<provider>/<account>/<chat>");
|
|
105
|
-
return { type: "chat", provider, account, chat };
|
|
106
|
-
}, "parse"),
|
|
107
|
-
format: /* @__PURE__ */ __name(({ provider, account, chat }) => `chat:${encoded(provider, account, chat)}`, "format")
|
|
108
|
-
}),
|
|
109
|
-
kind({
|
|
110
|
-
prefix: "contact",
|
|
111
|
-
type: "contact",
|
|
112
|
-
shape: "contact:<provider>/<id>",
|
|
113
|
-
parse: /* @__PURE__ */ __name((rest, text) => {
|
|
114
|
-
const [provider, id] = parts(rest, 2, text, "contact:<provider>/<id>");
|
|
115
|
-
return { type: "contact", provider, id };
|
|
116
|
-
}, "parse"),
|
|
117
|
-
format: /* @__PURE__ */ __name(({ provider, id }) => `contact:${encoded(provider, id)}`, "format")
|
|
118
|
-
}),
|
|
119
|
-
kind({
|
|
120
|
-
prefix: "folder",
|
|
121
|
-
type: "folder",
|
|
122
|
-
shape: "folder:<id>[/<path>]",
|
|
123
|
-
parse: /* @__PURE__ */ __name((rest, text) => {
|
|
124
|
-
const slash = rest.indexOf("/");
|
|
125
|
-
const id = decodeURIComponent(slash < 0 ? rest : rest.slice(0, slash));
|
|
126
|
-
const path = slash < 0 ? null : folderPath(decodeURIComponent(rest.slice(slash + 1)));
|
|
127
|
-
if (!id.trim() || path === "")
|
|
128
|
-
throw malformed(text, "folder:<id>[/<path>]");
|
|
129
|
-
return { type: "folder", id, path };
|
|
130
|
-
}, "parse"),
|
|
131
|
-
format: /* @__PURE__ */ __name(({ id, path }) => path === null ? `folder:${encodeURIComponent(id)}` : `folder:${encoded(id, path)}`, "format")
|
|
132
|
-
}),
|
|
133
|
-
kind({
|
|
134
|
-
prefix: "meeting",
|
|
135
|
-
type: "meeting",
|
|
136
|
-
shape: MEETING_SHAPE,
|
|
137
|
-
parse: /* @__PURE__ */ __name((_, text) => {
|
|
138
|
-
try {
|
|
139
|
-
return parseMeetingReference(text);
|
|
140
|
-
} catch {
|
|
141
|
-
throw malformed(text, MEETING_SHAPE);
|
|
142
|
-
}
|
|
143
|
-
}, "parse"),
|
|
144
|
-
format: formatMeetingReference
|
|
145
|
-
}),
|
|
146
|
-
...SIMPLE_REFERENCES.map(simple)
|
|
147
|
-
];
|
|
148
|
-
var byPrefix = new Map(REF_KINDS.map((spec) => [spec.prefix, spec]));
|
|
149
|
-
var byType = new Map(REF_KINDS.map((spec) => [spec.type, spec]));
|
|
150
|
-
var offered = REF_KINDS.map(({ prefix }) => prefix).filter((prefix) => prefix !== "entity");
|
|
151
|
-
var distance = /* @__PURE__ */ __name((a, b) => {
|
|
152
|
-
let row = Array.from({ length: b.length + 1 }, (_, at) => at);
|
|
153
|
-
for (const [i, x] of [...a].entries()) {
|
|
154
|
-
const next = [i + 1];
|
|
155
|
-
for (const [j, y] of [...b].entries())
|
|
156
|
-
next.push(Math.min(row[j + 1] + 1, next[j] + 1, row[j] + (x === y ? 0 : 1)));
|
|
157
|
-
row = next;
|
|
158
|
-
}
|
|
159
|
-
return row[b.length];
|
|
160
|
-
}, "distance");
|
|
161
|
-
var nearest = /* @__PURE__ */ __name((typed) => offered.find((prefix) => typed.length >= 2 && prefix.startsWith(typed)) ?? offered.map((prefix) => ({ prefix, far: distance(typed, prefix) })).filter(({ far }) => far <= 2).sort((a, b) => a.far - b.far)[0]?.prefix, "nearest");
|
|
162
|
-
var unknownKind = /* @__PURE__ */ __name((text, prefix, rest) => {
|
|
163
|
-
const near = prefix === "" ? void 0 : nearest(prefix);
|
|
164
|
-
const kinds = offered.map((one) => `${one}:`).join(", ");
|
|
165
|
-
const hint = near === void 0 ? `; kinds: ${kinds}` : `; did you mean ${near}:${singleLine(rest)}? Kinds: ${kinds}`;
|
|
166
|
-
return new CliError("validation_error", `"${singleLine(text)}" is no kind of reference${hint}`, {
|
|
167
|
-
reason: "ref.unknown-kind"
|
|
168
|
-
});
|
|
169
|
-
}, "unknownKind");
|
|
170
|
-
var formatReference = /* @__PURE__ */ __name((reference) => byType.get(reference.type).format(reference), "formatReference");
|
|
171
|
-
var parseReference = /* @__PURE__ */ __name((text) => {
|
|
172
|
-
const reference = text.trim();
|
|
173
|
-
const colon = reference.indexOf(":");
|
|
174
|
-
const prefix = colon < 0 ? "" : reference.slice(0, colon);
|
|
175
|
-
const rest = reference.slice(colon + 1);
|
|
176
|
-
const spec = byPrefix.get(prefix);
|
|
177
|
-
if (!spec)
|
|
178
|
-
throw unknownKind(reference, prefix, rest);
|
|
179
|
-
return spec.parse(rest, reference);
|
|
180
|
-
}, "parseReference");
|
|
181
|
-
var canonicalReference = /* @__PURE__ */ __name((text) => formatReference(parseReference(text)), "canonicalReference");
|
|
182
|
-
var looksLikeReference = /* @__PURE__ */ __name((text) => {
|
|
183
|
-
const match = /^([a-z]+):\S+$/.exec(text.trim());
|
|
184
|
-
return match !== null && byPrefix.has(match[1]);
|
|
185
|
-
}, "looksLikeReference");
|
|
186
|
-
|
|
187
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_737712cd0065e7e21fd5896a79d0773d/node_modules/@wirecat/cli-core/dist/domain/providers.js
|
|
188
|
-
var KINDS = ["messages", "mail", "notes", "documents", "meetings", "events", "crm"];
|
|
189
|
-
var MESSENGER_OPENS = { chat: "messages list", message: "messages show", contact: "contacts show" };
|
|
190
|
-
var CRM_OPENS = { deal: "deals show", lead: "leads show", pipeline: "pipelines show" };
|
|
191
|
-
var PROVIDERS = [
|
|
192
|
-
{ name: "telegram", kind: "messages", aliases: ["tg"], command: "tg", opens: MESSENGER_OPENS },
|
|
193
|
-
{ name: "telegram-bot", kind: "messages", aliases: ["tg-bot"] },
|
|
194
|
-
{ name: "max", kind: "messages", aliases: [], command: "max", opens: MESSENGER_OPENS },
|
|
195
|
-
{ name: "max-bot", kind: "messages", aliases: [] },
|
|
196
|
-
{ name: "whatsapp", kind: "messages", aliases: ["wa"], command: "wa", opens: MESSENGER_OPENS },
|
|
197
|
-
{ name: "whatsapp-bot", kind: "messages", aliases: ["wa-bot"] },
|
|
198
|
-
{ name: "email", kind: "mail", aliases: [] },
|
|
199
|
-
{ name: "notes", kind: "notes", aliases: [] },
|
|
200
|
-
{ name: "local", kind: "notes", aliases: [] },
|
|
201
|
-
{ name: "obsidian", kind: "notes", aliases: [] },
|
|
202
|
-
{ name: "added", kind: "notes", aliases: [] },
|
|
203
|
-
{ name: "zoom", kind: "meetings", aliases: [] },
|
|
204
|
-
// A phone export's records: its SMS and its calls in the one account the import names.
|
|
205
|
-
{ name: "phone", kind: "messages", kinds: ["messages", "events"], aliases: [], imported: true }
|
|
206
|
-
];
|
|
207
|
-
var LABELS = {
|
|
208
|
-
telegram: "Telegram",
|
|
209
|
-
"telegram-bot": "Telegram bot",
|
|
210
|
-
max: "MAX",
|
|
211
|
-
"max-bot": "MAX bot",
|
|
212
|
-
whatsapp: "WhatsApp",
|
|
213
|
-
"whatsapp-bot": "WhatsApp bot",
|
|
214
|
-
"google-drive": "Google Drive",
|
|
215
|
-
added: "added by hand",
|
|
216
|
-
email: "mail"
|
|
217
|
-
};
|
|
218
|
-
var providerLabel = /* @__PURE__ */ __name((provider) => LABELS[provider] ?? provider, "providerLabel");
|
|
219
|
-
var FOLDER_PROVIDERS = ["local", "obsidian", "folder"];
|
|
220
|
-
var isFolderProvider = /* @__PURE__ */ __name((provider) => FOLDER_PROVIDERS.includes(provider), "isFolderProvider");
|
|
221
|
-
var folderProviderSql = /* @__PURE__ */ __name((column = "provider") => `${column} IN (${FOLDER_PROVIDERS.map((name) => `'${name}'`).join(", ")})`, "folderProviderSql");
|
|
222
|
-
var folderProviderOf = /* @__PURE__ */ __name((format) => format === "markdown" ? "local" : "obsidian", "folderProviderOf");
|
|
223
|
-
var DOCUMENT_ACCOUNT_PROVIDERS = ["google-drive"];
|
|
224
|
-
var isDocumentAccountProvider = /* @__PURE__ */ __name((provider) => DOCUMENT_ACCOUNT_PROVIDERS.includes(provider), "isDocumentAccountProvider");
|
|
225
|
-
var ADDED_PROVIDER = "added";
|
|
226
|
-
var ADDED_ACCOUNT = "owner";
|
|
227
|
-
var notAdded = `d.account_id NOT IN (SELECT id FROM accounts WHERE provider = '${ADDED_PROVIDER}')`;
|
|
228
|
-
var filesAccountSql = /* @__PURE__ */ __name((column = "provider") => `${column} IN (${[...FOLDER_PROVIDERS, ...DOCUMENT_ACCOUNT_PROVIDERS, ADDED_PROVIDER].map((name) => `'${name}'`).join(", ")})`, "filesAccountSql");
|
|
229
|
-
var INTERNAL_NOTES = "internal";
|
|
230
|
-
var UNKNOWN_PROVIDER = "unknown provider \u2014 run its CLI once";
|
|
231
|
-
var WORD = /^[a-z0-9][a-z0-9_-]*$/;
|
|
232
|
-
var invalid = /* @__PURE__ */ __name((message) => {
|
|
233
|
-
throw new CliError("validation_error", message);
|
|
234
|
-
}, "invalid");
|
|
235
|
-
var wordOf = /* @__PURE__ */ __name((value, what) => typeof value === "string" && WORD.test(value) ? value : invalid(`${what} is lowercase letters, digits, - and _ \u2014 not ${JSON.stringify(value)}`), "wordOf");
|
|
236
|
-
var OPEN_KINDS = new Set(REF_KINDS.map(({ type }) => type).filter((type) => type !== "entity"));
|
|
237
|
-
var COMMAND_WORDS = /^[a-z0-9][a-z0-9_-]*( [a-z0-9][a-z0-9_-]*)*$/;
|
|
238
|
-
var opensOf = /* @__PURE__ */ __name((value, named) => {
|
|
239
|
-
if (typeof value !== "object" || value === null || Array.isArray(value))
|
|
240
|
-
return invalid(`provider ${named}'s opens maps a kind of reference to a command`);
|
|
241
|
-
const known = Object.entries(value).filter(([kind2]) => OPEN_KINDS.has(kind2));
|
|
242
|
-
for (const [kind2, command] of known)
|
|
243
|
-
if (typeof command !== "string" || !COMMAND_WORDS.test(command))
|
|
244
|
-
invalid(`provider ${named} opens a ${kind2} with command words, not ${JSON.stringify(command)}`);
|
|
245
|
-
return Object.fromEntries(known);
|
|
246
|
-
}, "opensOf");
|
|
247
|
-
var providerEntryOf = /* @__PURE__ */ __name((value) => {
|
|
248
|
-
if (typeof value !== "object" || value === null || Array.isArray(value))
|
|
249
|
-
return invalid("a provider entry is an object");
|
|
250
|
-
const { name, kind: kind2, kinds, aliases = [], command, opens, imported } = value;
|
|
251
|
-
const named = wordOf(name, "a provider's name");
|
|
252
|
-
const isKindWord = /* @__PURE__ */ __name((one) => typeof one === "string" && KINDS.includes(one), "isKindWord");
|
|
253
|
-
const given = kinds === void 0 ? [kind2] : Array.isArray(kinds) && kinds.length > 0 ? kinds : [void 0];
|
|
254
|
-
for (const one of given)
|
|
255
|
-
if (!isKindWord(one))
|
|
256
|
-
invalid(`provider ${named}'s kind is one of ${KINDS.join(", ")} \u2014 not ${JSON.stringify(one)}`);
|
|
257
|
-
const list = [...new Set(given)];
|
|
258
|
-
if (kind2 !== void 0 && kind2 !== list[0])
|
|
259
|
-
invalid(`provider ${named}'s kind is the first of its kinds`);
|
|
260
|
-
if (!Array.isArray(aliases))
|
|
261
|
-
invalid(`provider ${named}'s aliases are a list`);
|
|
262
|
-
if (imported !== void 0 && typeof imported !== "boolean")
|
|
263
|
-
invalid(`provider ${named}'s imported is true or false`);
|
|
264
|
-
return {
|
|
265
|
-
name: named,
|
|
266
|
-
kind: list[0],
|
|
267
|
-
...list.length > 1 ? { kinds: list } : {},
|
|
268
|
-
...imported === true ? { imported: true } : {},
|
|
269
|
-
aliases: [...new Set(aliases.map((alias) => wordOf(alias, `an alias of ${named}`)))],
|
|
270
|
-
...command === void 0 ? {} : { command: wordOf(command, `the command of ${named}`) },
|
|
271
|
-
...opens === void 0 ? {} : { opens: opensOf(opens, named) }
|
|
272
|
-
};
|
|
273
|
-
}, "providerEntryOf");
|
|
274
|
-
var kindsOfEntry = /* @__PURE__ */ __name((entry) => entry.kinds ?? [entry.kind], "kindsOfEntry");
|
|
275
|
-
var describe = /* @__PURE__ */ __name((entry) => `${entry.name} (${kindsOfEntry(entry).join(", ")}${entry.command ? `, from ${entry.command}` : ""})`, "describe");
|
|
276
|
-
var unitedKinds = /* @__PURE__ */ __name((known, entry) => [
|
|
277
|
-
.../* @__PURE__ */ new Set([...known, ...entry])
|
|
278
|
-
], "unitedKinds");
|
|
279
|
-
var wordsOf = /* @__PURE__ */ __name(({ name, aliases }) => [name, ...aliases], "wordsOf");
|
|
280
|
-
var joined = /* @__PURE__ */ __name((known, entry) => {
|
|
281
|
-
const same = known.find(({ name }) => name === entry.name);
|
|
282
|
-
const kinds = same ? unitedKinds(kindsOfEntry(same), kindsOfEntry(entry)) : kindsOfEntry(entry);
|
|
283
|
-
if (same && same.kind !== entry.kind)
|
|
284
|
-
invalid(`two provider entries disagree on the kind: ${describe(same)} and ${describe(entry)}`);
|
|
285
|
-
if (same && entry.imported === true && same.imported !== true)
|
|
286
|
-
invalid(`provider ${entry.name} is synced, so an entry cannot make it import-only`);
|
|
287
|
-
const merged = same ? {
|
|
288
|
-
...same,
|
|
289
|
-
...kinds.length > 1 ? { kinds } : {},
|
|
290
|
-
aliases: [.../* @__PURE__ */ new Set([...same.aliases, ...entry.aliases])],
|
|
291
|
-
...entry.command ? { command: entry.command } : {},
|
|
292
|
-
...entry.opens ? { opens: { ...same.opens, ...entry.opens } } : {}
|
|
293
|
-
} : entry;
|
|
294
|
-
const others = known.filter((one) => one !== same);
|
|
295
|
-
for (const word of wordsOf(merged)) {
|
|
296
|
-
const owner = others.find((one) => wordsOf(one).includes(word));
|
|
297
|
-
if (owner)
|
|
298
|
-
invalid(`"${word}" names two providers: ${describe(owner)} and ${describe(merged)}`);
|
|
299
|
-
}
|
|
300
|
-
return same ? known.map((one) => one === same ? merged : one) : [...known, merged];
|
|
301
|
-
}, "joined");
|
|
302
|
-
var registry = PROVIDERS;
|
|
303
|
-
var providers = /* @__PURE__ */ __name(() => registry, "providers");
|
|
304
|
-
var useProviders = /* @__PURE__ */ __name((entries) => {
|
|
305
|
-
registry = entries.map(providerEntryOf).reduce(joined, PROVIDERS);
|
|
306
|
-
}, "useProviders");
|
|
307
|
-
var useStoredProviders = /* @__PURE__ */ __name((entries) => {
|
|
308
|
-
const left = [];
|
|
309
|
-
registry = entries.reduce((known, entry) => {
|
|
310
|
-
try {
|
|
311
|
-
return joined(known, providerEntryOf(entry));
|
|
312
|
-
} catch (error) {
|
|
313
|
-
if (!(error instanceof CliError))
|
|
314
|
-
throw error;
|
|
315
|
-
left.push(entry);
|
|
316
|
-
return known;
|
|
317
|
-
}
|
|
318
|
-
}, PROVIDERS);
|
|
319
|
-
return left;
|
|
320
|
-
}, "useStoredProviders");
|
|
321
|
-
var addProvider = /* @__PURE__ */ __name((entry) => {
|
|
322
|
-
registry = joined(registry, providerEntryOf(entry));
|
|
323
|
-
}, "addProvider");
|
|
324
|
-
var isKind = /* @__PURE__ */ __name((word) => KINDS.includes(word.toLowerCase()), "isKind");
|
|
325
|
-
var providerNamed = /* @__PURE__ */ __name((word) => {
|
|
326
|
-
const wanted = word.toLowerCase();
|
|
327
|
-
return registry.find((entry) => wordsOf(entry).includes(wanted));
|
|
328
|
-
}, "providerNamed");
|
|
329
|
-
var kindIn = /* @__PURE__ */ __name((provider) => isFolderProvider(provider) ? "notes" : registry.find(({ name }) => name === provider)?.kind, "kindIn");
|
|
330
|
-
var kindsIn = /* @__PURE__ */ __name((provider) => {
|
|
331
|
-
if (isFolderProvider(provider))
|
|
332
|
-
return ["notes"];
|
|
333
|
-
const entry = registry.find(({ name }) => name === provider);
|
|
334
|
-
return entry ? kindsOfEntry(entry) : [];
|
|
335
|
-
}, "kindsIn");
|
|
336
|
-
var importedOf = /* @__PURE__ */ __name((entry, held) => {
|
|
337
|
-
const builtIn = PROVIDERS.find(({ name }) => name === entry.name);
|
|
338
|
-
if (builtIn) {
|
|
339
|
-
if (entry.imported === true && builtIn.imported !== true)
|
|
340
|
-
invalid(`provider ${entry.name} is synced, so an entry cannot make it import-only`);
|
|
341
|
-
return builtIn.imported === true;
|
|
342
|
-
}
|
|
343
|
-
if (held === void 0)
|
|
344
|
-
return entry.imported === true;
|
|
345
|
-
if (entry.imported === true && held.imported !== true)
|
|
346
|
-
invalid(`provider ${entry.name} was registered without imported: an entry cannot make it import-only later`);
|
|
347
|
-
return held.imported === true;
|
|
348
|
-
}, "importedOf");
|
|
349
|
-
var isImportedProvider = /* @__PURE__ */ __name((provider) => registry.find(({ name }) => name === provider)?.imported === true, "isImportedProvider");
|
|
350
|
-
var holdsKind = /* @__PURE__ */ __name((provider, kind2) => kindsIn(provider).includes(kind2), "holdsKind");
|
|
351
|
-
var holdsKindOf = /* @__PURE__ */ __name((provider, kind2) => kindIn(provider) === void 0 ? kind2 === "messages" : holdsKind(provider, kind2), "holdsKindOf");
|
|
352
|
-
var kindOf = /* @__PURE__ */ __name((provider) => kindIn(provider) ?? "messages", "kindOf");
|
|
353
|
-
|
|
354
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_737712cd0065e7e21fd5896a79d0773d/node_modules/@wirecat/cli-core/dist/domain/money.js
|
|
17
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/domain/money.js
|
|
355
18
|
var CURRENCY_SCALES = {
|
|
356
19
|
AED: 2,
|
|
357
20
|
AMD: 2,
|
|
@@ -445,7 +108,17 @@ var quantityOf = /* @__PURE__ */ __name((text) => {
|
|
|
445
108
|
}, "quantityOf");
|
|
446
109
|
var lineUnits = /* @__PURE__ */ __name((thousandths, unitPrice) => Number((thousandths * BigInt(unitPrice) + 500n) / 1000n), "lineUnits");
|
|
447
110
|
|
|
448
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
111
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/domain/deals.js
|
|
112
|
+
var DEAL_KINDS = ["deal", "lead"];
|
|
113
|
+
var DEAL_STATUSES = ["open", "won", "lost"];
|
|
114
|
+
var STAGE_OUTCOMES = DEAL_STATUSES;
|
|
115
|
+
var DEAL_ROLES = ["owner", "contact", "decision-maker", "influencer"];
|
|
116
|
+
var dealLine = /* @__PURE__ */ __name((deal) => {
|
|
117
|
+
const money = deal.amount === null || deal.currency === null ? "" : `, ${moneyLabel(deal.amount, deal.currency)}`;
|
|
118
|
+
return `${deal.title} \xB7 ${deal.stage}${money}${deal.status === "open" ? "" : ` (${deal.status})`}`;
|
|
119
|
+
}, "dealLine");
|
|
120
|
+
|
|
121
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/domain/finance.js
|
|
449
122
|
var INVOICE_DIRECTIONS = ["receivable", "payable"];
|
|
450
123
|
var INVOICE_STATUSES = ["draft", "issued", "partly_paid", "paid", "void"];
|
|
451
124
|
var MONEY_DIRECTIONS = ["in", "out"];
|
|
@@ -474,7 +147,135 @@ var paymentLine = /* @__PURE__ */ __name((payment) => {
|
|
|
474
147
|
var invoiceTitle = /* @__PURE__ */ __name((invoice) => `Invoice ${invoiceLine(invoice)}`, "invoiceTitle");
|
|
475
148
|
var paymentEntryTitle = /* @__PURE__ */ __name((payment) => `Payment \xB7 ${paymentLine(payment)}`, "paymentEntryTitle");
|
|
476
149
|
|
|
477
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
150
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/domain/orders.js
|
|
151
|
+
var ORDER_STATUSES = ["placed", "shipped", "delivered", "cancelled", "returned"];
|
|
152
|
+
var ORDER_PURPOSES = ["personal", "business", "client", "other"];
|
|
153
|
+
var orderLine = /* @__PURE__ */ __name((order) => {
|
|
154
|
+
const party = order.direction === "sale" && order.customerName !== null ? `to ${order.customerName}` : order.supplierName;
|
|
155
|
+
const money = order.total === null || order.currency === null ? "" : `, ${moneyLabel(order.total, order.currency)}`;
|
|
156
|
+
const notes2 = [order.status, order.review === "confirmed" ? null : order.review].filter(Boolean).join(", ");
|
|
157
|
+
return `${order.number ?? `#${order.id}`} \xB7 ${party}${money} (${notes2})`;
|
|
158
|
+
}, "orderLine");
|
|
159
|
+
var orderTitle = /* @__PURE__ */ __name((order) => `Order ${orderLine(order)}`, "orderTitle");
|
|
160
|
+
|
|
161
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/domain/relations.js
|
|
162
|
+
var ORGANIZATION_ROLES = [
|
|
163
|
+
"employee",
|
|
164
|
+
"contractor",
|
|
165
|
+
"founder",
|
|
166
|
+
"owner",
|
|
167
|
+
"manager",
|
|
168
|
+
"adviser",
|
|
169
|
+
"contact"
|
|
170
|
+
];
|
|
171
|
+
var PROJECT_ROLES = ["owner", "manager", "contributor", "client-contact", "approver"];
|
|
172
|
+
var CONTRACT_ROLES = ["customer", "supplier", "signatory", "guarantor"];
|
|
173
|
+
var RELATED_ROLES = ["colleague", "adviser", "investor", "mentor", "family", "friend"];
|
|
174
|
+
var ENGAGEMENT_LEVELS = ["none", "low", "medium", "high"];
|
|
175
|
+
var isEngagement = /* @__PURE__ */ __name((value) => typeof value === "string" && ENGAGEMENT_LEVELS.includes(value), "isEngagement");
|
|
176
|
+
var checkEngagement = /* @__PURE__ */ __name((kind2, from, to, level) => {
|
|
177
|
+
if (kind2 !== "member-of" || from !== "person" || to !== "project")
|
|
178
|
+
throw new CliError("validation_error", "an engagement level is set only on a person's member-of a project", {
|
|
179
|
+
reason: "relationship.engagement-ends"
|
|
180
|
+
});
|
|
181
|
+
if (!isEngagement(level))
|
|
182
|
+
throw new CliError("validation_error", `an engagement level is one of ${ENGAGEMENT_LEVELS.join(", ")}`, {
|
|
183
|
+
reason: "relationship.engagement-unknown"
|
|
184
|
+
});
|
|
185
|
+
return level;
|
|
186
|
+
}, "checkEngagement");
|
|
187
|
+
var ENGAGEMENT_ORDER = { high: 0, medium: 1, unknown: 2, low: 3, none: 4 };
|
|
188
|
+
var engagementRank = /* @__PURE__ */ __name((level) => ENGAGEMENT_ORDER[level ?? "unknown"], "engagementRank");
|
|
189
|
+
var byEngagement = /* @__PURE__ */ __name((items) => items.map((item, index) => ({ item, index })).sort((a, b) => engagementRank(a.item.engagement) - engagementRank(b.item.engagement) || a.index - b.index).map(({ item }) => item), "byEngagement");
|
|
190
|
+
var RELATIONS = {
|
|
191
|
+
"member-of": {
|
|
192
|
+
from: ["person", "organization", "project", "chat", "email_thread"],
|
|
193
|
+
to: ["organization", "project"],
|
|
194
|
+
roles: { to: { organization: ORGANIZATION_ROLES, project: PROJECT_ROLES } }
|
|
195
|
+
},
|
|
196
|
+
"reports-to": { from: ["person"], to: ["person"], inverse: "manages" },
|
|
197
|
+
"customer-of": { from: ["person", "organization"], to: ["organization"], inverse: "supplier of" },
|
|
198
|
+
"partner-of": { from: ["organization"], to: ["organization"], symmetric: true },
|
|
199
|
+
"related-to": {
|
|
200
|
+
from: ["person", "organization", "project", "task", "deal", "lead", "contract"],
|
|
201
|
+
to: ["person", "organization", "project", "task"],
|
|
202
|
+
roles: { from: { deal: DEAL_ROLES, lead: DEAL_ROLES, contract: CONTRACT_ROLES } }
|
|
203
|
+
}
|
|
204
|
+
};
|
|
205
|
+
var RELATION_KINDS = Object.keys(RELATIONS);
|
|
206
|
+
var specOf = /* @__PURE__ */ __name((kind2) => Object.hasOwn(RELATIONS, kind2) ? RELATIONS[kind2] : void 0, "specOf");
|
|
207
|
+
var isRelationKind = /* @__PURE__ */ __name((kind2) => specOf(kind2) !== void 0, "isRelationKind");
|
|
208
|
+
var memberOnly = /* @__PURE__ */ __name((type) => type === "chat" || type === "email_thread", "memberOnly");
|
|
209
|
+
var partyOnly = /* @__PURE__ */ __name((from, to) => from === "contract" && to !== "person" && to !== "organization", "partyOnly");
|
|
210
|
+
var checkEnds = /* @__PURE__ */ __name((kind2, from, to) => {
|
|
211
|
+
const spec = specOf(kind2);
|
|
212
|
+
if (!spec)
|
|
213
|
+
throw new CliError("validation_error", `a relationship's kind is one of ${RELATION_KINDS.join(", ")}`);
|
|
214
|
+
if (memberOnly(from) && (kind2 !== "member-of" || to !== "project"))
|
|
215
|
+
throw new CliError("validation_error", `a ${from === "chat" ? "chat" : "mail thread"} is related only as member-of a project`);
|
|
216
|
+
if (partyOnly(from, to))
|
|
217
|
+
throw new CliError("validation_error", "a contract is related only to a person or an organization");
|
|
218
|
+
if (!spec.from.includes(from) || !spec.to.includes(to))
|
|
219
|
+
throw new CliError("validation_error", `${kind2} joins ${spec.from.join(", ")} to ${spec.to.join(", ")}, not ${from} to ${to}`);
|
|
220
|
+
return spec;
|
|
221
|
+
}, "checkEnds");
|
|
222
|
+
var isParty = /* @__PURE__ */ __name((type) => type === "person" || type === "organization", "isParty");
|
|
223
|
+
var rolesOf = /* @__PURE__ */ __name((kind2, from, to) => {
|
|
224
|
+
const spec = specOf(kind2);
|
|
225
|
+
if (kind2 === "member-of" && from !== "person")
|
|
226
|
+
return void 0;
|
|
227
|
+
return spec?.roles?.from?.[from] ?? spec?.roles?.to?.[to];
|
|
228
|
+
}, "rolesOf");
|
|
229
|
+
var ROLE_LISTS = {
|
|
230
|
+
organization: ORGANIZATION_ROLES,
|
|
231
|
+
project: PROJECT_ROLES,
|
|
232
|
+
deal: DEAL_ROLES,
|
|
233
|
+
contract: CONTRACT_ROLES,
|
|
234
|
+
related: RELATED_ROLES
|
|
235
|
+
};
|
|
236
|
+
var roleListOf = /* @__PURE__ */ __name((kind2, from, to) => {
|
|
237
|
+
if (kind2 === "related-to" && isParty(from) && isParty(to))
|
|
238
|
+
return "related";
|
|
239
|
+
const roles = rolesOf(kind2, from, to);
|
|
240
|
+
return Object.keys(ROLE_LISTS).find((list) => ROLE_LISTS[list] === roles);
|
|
241
|
+
}, "roleListOf");
|
|
242
|
+
var checkRole = /* @__PURE__ */ __name((kind2, from, to, role, extra = []) => {
|
|
243
|
+
const roles = rolesOf(kind2, from, to)?.concat(extra);
|
|
244
|
+
if (roles && !roles.includes(role))
|
|
245
|
+
throw new CliError("validation_error", `a ${from}'s role on ${kind2} ${to} is one of ${roles.join(", ")}`, {
|
|
246
|
+
reason: "relationship.role-unknown"
|
|
247
|
+
});
|
|
248
|
+
return role;
|
|
249
|
+
}, "checkRole");
|
|
250
|
+
var isSymmetric = /* @__PURE__ */ __name((kind2) => specOf(kind2)?.symmetric === true, "isSymmetric");
|
|
251
|
+
var inverseOf = /* @__PURE__ */ __name((kind2) => specOf(kind2)?.symmetric ? kind2 : specOf(kind2)?.inverse ?? null, "inverseOf");
|
|
252
|
+
var STANDINGS = ["confirmed", "reported", "proposed", "ended"];
|
|
253
|
+
var standingOf = /* @__PURE__ */ __name((link, now) => {
|
|
254
|
+
if (link.endsAt != null && link.endsAt <= now)
|
|
255
|
+
return "ended";
|
|
256
|
+
if (link.confirmed)
|
|
257
|
+
return "confirmed";
|
|
258
|
+
if (link.deletedAt != null)
|
|
259
|
+
return "ended";
|
|
260
|
+
return link.accountId != null ? "reported" : "proposed";
|
|
261
|
+
}, "standingOf");
|
|
262
|
+
var isUsable = /* @__PURE__ */ __name((standing) => standing === "confirmed" || standing === "reported", "isUsable");
|
|
263
|
+
var usableLink = /* @__PURE__ */ __name((link, now) => isUsable(standingOf(link, now)), "usableLink");
|
|
264
|
+
var KEYED = "kind IN ('member-of', 'related-to', 'reports-to', 'customer-of', 'partner-of') AND to_id IS NOT NULL";
|
|
265
|
+
var notOverriddenSql = /* @__PURE__ */ __name((alias) => `NOT EXISTS (SELECT 1 FROM links override WHERE ${KEYED} AND override.kind = ${alias}.kind AND override.from_type = ${alias}.from_type AND override.from_id = ${alias}.from_id AND override.to_type = ${alias}.to_type AND override.to_id = ${alias}.to_id AND json_extract(override.metadata, '$.overrides') = ${alias}.id)`, "notOverriddenSql");
|
|
266
|
+
var usableLinkSql = /* @__PURE__ */ __name((alias, now) => `(${alias}.confirmed = 1 OR (${alias}.account_id IS NOT NULL AND ${alias}.deleted_at IS NULL))` + (now === void 0 ? "" : ` AND (${alias}.ends_at IS NULL OR ${alias}.ends_at > ${Math.trunc(now)})`), "usableLinkSql");
|
|
267
|
+
|
|
268
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/domain/crm.js
|
|
269
|
+
var CRM_KINDS = ["organization", "person", "deal", "lead"];
|
|
270
|
+
var CRM_ACTIVITY_KINDS = ["call", "email", "meeting", "todo", "task", "comment", "other"];
|
|
271
|
+
var isCrmUserId = /* @__PURE__ */ __name((id) => /^\d{1,20}$/.test(id), "isCrmUserId");
|
|
272
|
+
var normalCrmUserId = /* @__PURE__ */ __name((id) => {
|
|
273
|
+
const text = id.trim();
|
|
274
|
+
return /^\d+$/.test(text) ? text.replace(/^0+(?=\d)/, "") : text;
|
|
275
|
+
}, "normalCrmUserId");
|
|
276
|
+
var isItemKind = /* @__PURE__ */ __name((kind2) => kind2 === "deal" || kind2 === "lead", "isItemKind");
|
|
277
|
+
|
|
278
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/domain/business.js
|
|
478
279
|
var CATALOG_KINDS = ["product", "service"];
|
|
479
280
|
var BUSINESS_KINDS = ["invoice", "payment", "order", "contract", "subscription", "product", "wallet"];
|
|
480
281
|
var CONTRACT_KINDS = ["sale", "purchase", "service", "lease", "employment", "nda", "license", "other"];
|
|
@@ -503,184 +304,367 @@ var subscriptionLine = /* @__PURE__ */ __name((subscription) => `${subscription.
|
|
|
503
304
|
var walletLine = /* @__PURE__ */ __name((wallet) => `${wallet.name} \xB7 ${wallet.kind}, ${wallet.currency}${wallet.numberHint === null ? "" : `, \u2026${wallet.numberHint}`}` + notes(wallet.closed ? "closed" : null), "walletLine");
|
|
504
305
|
var transactionLine = /* @__PURE__ */ __name((transaction) => `${moneyLabel(transaction.amount, transaction.currency)} ${transaction.direction}${transaction.label === null ? "" : ` \xB7 ${transaction.label}`}, ${dayMonth(transaction.date)}` + notes(transaction.status === "pending" ? "pending" : null, pending(transaction.review)), "transactionLine");
|
|
505
306
|
|
|
506
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
507
|
-
var
|
|
508
|
-
var
|
|
509
|
-
var
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
307
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/domain/tags.js
|
|
308
|
+
var TAG_TYPES = ["chat", "contact", "message", "task"];
|
|
309
|
+
var TAG = /^[a-z0-9-]{1,32}$/;
|
|
310
|
+
var tagOf = /* @__PURE__ */ __name((value) => {
|
|
311
|
+
const tag = value.trim().toLowerCase();
|
|
312
|
+
return TAG.test(tag) ? tag : void 0;
|
|
313
|
+
}, "tagOf");
|
|
314
|
+
var normalizeTag = /* @__PURE__ */ __name((value) => {
|
|
315
|
+
const tag = tagOf(value);
|
|
316
|
+
if (tag === void 0)
|
|
317
|
+
throw new CliError("validation_error", `"${singleLine(value)}" is not a tag \u2014 use 1\u201332 letters a\u2013z, digits and hyphens`, { reason: "tag.invalid" });
|
|
318
|
+
return tag;
|
|
319
|
+
}, "normalizeTag");
|
|
515
320
|
|
|
516
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
517
|
-
var
|
|
518
|
-
var
|
|
519
|
-
var
|
|
520
|
-
|
|
521
|
-
const
|
|
522
|
-
const
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
321
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/domain/locator.js
|
|
322
|
+
var SCHEME = "msg:";
|
|
323
|
+
var formatLocator = /* @__PURE__ */ __name(({ provider, account, chat, message }) => SCHEME + [provider, account, chat, message].map(encodeURIComponent).join("/"), "formatLocator");
|
|
324
|
+
var isLocator = /* @__PURE__ */ __name((reference) => reference.trim().startsWith(SCHEME), "isLocator");
|
|
325
|
+
var parseLocator = /* @__PURE__ */ __name((reference) => {
|
|
326
|
+
const trimmed = reference.trim();
|
|
327
|
+
const parts2 = trimmed.startsWith(SCHEME) ? trimmed.slice(SCHEME.length).split("/") : [];
|
|
328
|
+
if (parts2.length !== 4 || parts2.some((part) => part === "")) {
|
|
329
|
+
throw new CliError("validation_error", `"${singleLine(reference)}" is not a message locator \u2014 expected msg:<provider>/<account>/<chat>/<message>`);
|
|
330
|
+
}
|
|
331
|
+
const [provider, account, chat, message] = parts2.map(decodeURIComponent);
|
|
332
|
+
return { provider, account, chat, message };
|
|
333
|
+
}, "parseLocator");
|
|
334
|
+
|
|
335
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/domain/references.js
|
|
336
|
+
var SIMPLE_REFERENCES = [
|
|
337
|
+
"note",
|
|
338
|
+
"document",
|
|
339
|
+
"person",
|
|
340
|
+
"organization",
|
|
341
|
+
"project",
|
|
342
|
+
"task",
|
|
343
|
+
"memory",
|
|
344
|
+
"fact",
|
|
345
|
+
"bot",
|
|
346
|
+
"event",
|
|
347
|
+
"invoice",
|
|
348
|
+
"payment",
|
|
349
|
+
"order",
|
|
350
|
+
"deal",
|
|
351
|
+
"lead",
|
|
352
|
+
"pipeline",
|
|
353
|
+
"product",
|
|
354
|
+
"contract",
|
|
355
|
+
"subscription",
|
|
356
|
+
"wallet",
|
|
357
|
+
"transaction",
|
|
358
|
+
"entity"
|
|
359
|
+
];
|
|
360
|
+
var malformed = /* @__PURE__ */ __name((text, shape) => new CliError("validation_error", `"${singleLine(text)}" is not a reference \u2014 expected ${shape}`, {
|
|
361
|
+
reason: "ref.malformed"
|
|
362
|
+
}), "malformed");
|
|
363
|
+
var parts = /* @__PURE__ */ __name((rest, count, text, shape) => {
|
|
364
|
+
const split = rest.split("/");
|
|
365
|
+
if (split.length !== count || split.some((part) => part === ""))
|
|
366
|
+
throw malformed(text, shape);
|
|
367
|
+
return split.map(decodeURIComponent);
|
|
368
|
+
}, "parts");
|
|
369
|
+
var encoded = /* @__PURE__ */ __name((...values) => values.map(encodeURIComponent).join("/"), "encoded");
|
|
370
|
+
var folderPath = /* @__PURE__ */ __name((path) => {
|
|
371
|
+
const clean = path.split("/").filter((part) => part !== "" && part !== ".").join("/");
|
|
372
|
+
return clean === "" ? path.trim() === "" ? "" : null : clean;
|
|
373
|
+
}, "folderPath");
|
|
374
|
+
var MEETING_SHAPE = "meeting:<account>/<meeting>[/<transcript>[/<cue>]] with safe integer ids";
|
|
375
|
+
var kind = /* @__PURE__ */ __name((spec) => spec, "kind");
|
|
376
|
+
var simple = /* @__PURE__ */ __name((prefix) => kind({
|
|
377
|
+
prefix,
|
|
378
|
+
type: prefix,
|
|
379
|
+
shape: `${prefix}:<id>`,
|
|
380
|
+
parse: /* @__PURE__ */ __name((rest, text) => {
|
|
381
|
+
if (!rest.trim())
|
|
382
|
+
throw new CliError("validation_error", `"${singleLine(text)}" names no ${prefix}`, {
|
|
383
|
+
reason: "ref.malformed"
|
|
384
|
+
});
|
|
385
|
+
return { type: prefix, id: rest };
|
|
386
|
+
}, "parse"),
|
|
387
|
+
format: /* @__PURE__ */ __name((reference) => `${reference.type}:${reference.id}`, "format")
|
|
388
|
+
}), "simple");
|
|
389
|
+
var REF_KINDS = [
|
|
390
|
+
kind({
|
|
391
|
+
prefix: "msg",
|
|
392
|
+
type: "message",
|
|
393
|
+
shape: "msg:<provider>/<account>/<chat>/<message>",
|
|
394
|
+
parse: /* @__PURE__ */ __name((_, text) => {
|
|
395
|
+
try {
|
|
396
|
+
return { type: "message", ...parseLocator(text) };
|
|
397
|
+
} catch {
|
|
398
|
+
throw malformed(text, "msg:<provider>/<account>/<chat>/<message>");
|
|
399
|
+
}
|
|
400
|
+
}, "parse"),
|
|
401
|
+
format: formatLocator
|
|
402
|
+
}),
|
|
403
|
+
kind({
|
|
404
|
+
prefix: "chat",
|
|
405
|
+
type: "chat",
|
|
406
|
+
shape: "chat:<provider>/<account>/<chat>",
|
|
407
|
+
parse: /* @__PURE__ */ __name((rest, text) => {
|
|
408
|
+
const [provider, account, chat] = parts(rest, 3, text, "chat:<provider>/<account>/<chat>");
|
|
409
|
+
return { type: "chat", provider, account, chat };
|
|
410
|
+
}, "parse"),
|
|
411
|
+
format: /* @__PURE__ */ __name(({ provider, account, chat }) => `chat:${encoded(provider, account, chat)}`, "format")
|
|
412
|
+
}),
|
|
413
|
+
kind({
|
|
414
|
+
prefix: "contact",
|
|
415
|
+
type: "contact",
|
|
416
|
+
shape: "contact:<provider>/<id>",
|
|
417
|
+
parse: /* @__PURE__ */ __name((rest, text) => {
|
|
418
|
+
const [provider, id] = parts(rest, 2, text, "contact:<provider>/<id>");
|
|
419
|
+
return { type: "contact", provider, id };
|
|
420
|
+
}, "parse"),
|
|
421
|
+
format: /* @__PURE__ */ __name(({ provider, id }) => `contact:${encoded(provider, id)}`, "format")
|
|
422
|
+
}),
|
|
423
|
+
kind({
|
|
424
|
+
prefix: "folder",
|
|
425
|
+
type: "folder",
|
|
426
|
+
shape: "folder:<id>[/<path>]",
|
|
427
|
+
parse: /* @__PURE__ */ __name((rest, text) => {
|
|
428
|
+
const slash = rest.indexOf("/");
|
|
429
|
+
const id = decodeURIComponent(slash < 0 ? rest : rest.slice(0, slash));
|
|
430
|
+
const path = slash < 0 ? null : folderPath(decodeURIComponent(rest.slice(slash + 1)));
|
|
431
|
+
if (!id.trim() || path === "")
|
|
432
|
+
throw malformed(text, "folder:<id>[/<path>]");
|
|
433
|
+
return { type: "folder", id, path };
|
|
434
|
+
}, "parse"),
|
|
435
|
+
format: /* @__PURE__ */ __name(({ id, path }) => path === null ? `folder:${encodeURIComponent(id)}` : `folder:${encoded(id, path)}`, "format")
|
|
436
|
+
}),
|
|
437
|
+
kind({
|
|
438
|
+
prefix: "meeting",
|
|
439
|
+
type: "meeting",
|
|
440
|
+
shape: MEETING_SHAPE,
|
|
441
|
+
parse: /* @__PURE__ */ __name((_, text) => {
|
|
442
|
+
try {
|
|
443
|
+
return parseMeetingReference(text);
|
|
444
|
+
} catch {
|
|
445
|
+
throw malformed(text, MEETING_SHAPE);
|
|
446
|
+
}
|
|
447
|
+
}, "parse"),
|
|
448
|
+
format: formatMeetingReference
|
|
449
|
+
}),
|
|
450
|
+
...SIMPLE_REFERENCES.map(simple)
|
|
451
|
+
];
|
|
452
|
+
var byPrefix = new Map(REF_KINDS.map((spec) => [spec.prefix, spec]));
|
|
453
|
+
var byType = new Map(REF_KINDS.map((spec) => [spec.type, spec]));
|
|
454
|
+
var offered = REF_KINDS.map(({ prefix }) => prefix).filter((prefix) => prefix !== "entity");
|
|
455
|
+
var distance = /* @__PURE__ */ __name((a, b) => {
|
|
456
|
+
let row = Array.from({ length: b.length + 1 }, (_, at) => at);
|
|
457
|
+
for (const [i, x] of [...a].entries()) {
|
|
458
|
+
const next = [i + 1];
|
|
459
|
+
for (const [j, y] of [...b].entries())
|
|
460
|
+
next.push(Math.min(row[j + 1] + 1, next[j] + 1, row[j] + (x === y ? 0 : 1)));
|
|
461
|
+
row = next;
|
|
462
|
+
}
|
|
463
|
+
return row[b.length];
|
|
464
|
+
}, "distance");
|
|
465
|
+
var nearest = /* @__PURE__ */ __name((typed) => offered.find((prefix) => typed.length >= 2 && prefix.startsWith(typed)) ?? offered.map((prefix) => ({ prefix, far: distance(typed, prefix) })).filter(({ far }) => far <= 2).sort((a, b) => a.far - b.far)[0]?.prefix, "nearest");
|
|
466
|
+
var unknownKind = /* @__PURE__ */ __name((text, prefix, rest) => {
|
|
467
|
+
const near = prefix === "" ? void 0 : nearest(prefix);
|
|
468
|
+
const kinds = offered.map((one) => `${one}:`).join(", ");
|
|
469
|
+
const hint = near === void 0 ? `; kinds: ${kinds}` : `; did you mean ${near}:${singleLine(rest)}? Kinds: ${kinds}`;
|
|
470
|
+
return new CliError("validation_error", `"${singleLine(text)}" is no kind of reference${hint}`, {
|
|
471
|
+
reason: "ref.unknown-kind"
|
|
472
|
+
});
|
|
473
|
+
}, "unknownKind");
|
|
474
|
+
var formatReference = /* @__PURE__ */ __name((reference) => byType.get(reference.type).format(reference), "formatReference");
|
|
475
|
+
var parseReference = /* @__PURE__ */ __name((text) => {
|
|
476
|
+
const reference = text.trim();
|
|
477
|
+
const colon = reference.indexOf(":");
|
|
478
|
+
const prefix = colon < 0 ? "" : reference.slice(0, colon);
|
|
479
|
+
const rest = reference.slice(colon + 1);
|
|
480
|
+
const spec = byPrefix.get(prefix);
|
|
481
|
+
if (!spec)
|
|
482
|
+
throw unknownKind(reference, prefix, rest);
|
|
483
|
+
return spec.parse(rest, reference);
|
|
484
|
+
}, "parseReference");
|
|
485
|
+
var canonicalReference = /* @__PURE__ */ __name((text) => formatReference(parseReference(text)), "canonicalReference");
|
|
486
|
+
var looksLikeReference = /* @__PURE__ */ __name((text) => {
|
|
487
|
+
const match = /^([a-z]+):\S+$/.exec(text.trim());
|
|
488
|
+
return match !== null && byPrefix.has(match[1]);
|
|
489
|
+
}, "looksLikeReference");
|
|
526
490
|
|
|
527
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
528
|
-
var
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
"
|
|
533
|
-
"
|
|
534
|
-
"
|
|
535
|
-
"
|
|
491
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/domain/providers.js
|
|
492
|
+
var KINDS = ["messages", "mail", "notes", "documents", "meetings", "events", "crm"];
|
|
493
|
+
var MESSENGER_OPENS = { chat: "messages list", message: "messages show", contact: "contacts show" };
|
|
494
|
+
var CRM_OPENS = { deal: "deals show", lead: "leads show", pipeline: "pipelines show" };
|
|
495
|
+
var PROVIDERS = [
|
|
496
|
+
{ name: "telegram", kind: "messages", aliases: ["tg"], command: "tg", opens: MESSENGER_OPENS },
|
|
497
|
+
{ name: "telegram-bot", kind: "messages", aliases: ["tg-bot"] },
|
|
498
|
+
{ name: "max", kind: "messages", aliases: [], command: "max", opens: MESSENGER_OPENS },
|
|
499
|
+
{ name: "max-bot", kind: "messages", aliases: [] },
|
|
500
|
+
{ name: "whatsapp", kind: "messages", aliases: ["wa"], command: "wa", opens: MESSENGER_OPENS },
|
|
501
|
+
{ name: "whatsapp-bot", kind: "messages", aliases: ["wa-bot"] },
|
|
502
|
+
{ name: "email", kind: "mail", aliases: [] },
|
|
503
|
+
{ name: "notes", kind: "notes", aliases: [] },
|
|
504
|
+
{ name: "local", kind: "notes", aliases: [] },
|
|
505
|
+
{ name: "obsidian", kind: "notes", aliases: [] },
|
|
506
|
+
{ name: "added", kind: "notes", aliases: [] },
|
|
507
|
+
{ name: "zoom", kind: "meetings", aliases: [] },
|
|
508
|
+
{ name: "google-meet", kind: "meetings", aliases: [], command: "meet" },
|
|
509
|
+
// Its meetings come from the notes Telemost mails (`keeper@telemost.yandex.ru`), read by a mail rule.
|
|
510
|
+
{ name: "telemost", kind: "meetings", aliases: [] },
|
|
511
|
+
// A phone export's records: its SMS and its calls in the one account the import names.
|
|
512
|
+
{ name: "phone", kind: "messages", kinds: ["messages", "events"], aliases: [], imported: true },
|
|
513
|
+
// Any other import: a folder of notes, a CRM's export, a script's records, under `import:<what it is>`.
|
|
514
|
+
{ name: "import", kind: "documents", kinds: ["documents", "messages", "events"], aliases: [], imported: true }
|
|
536
515
|
];
|
|
537
|
-
var
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
var
|
|
553
|
-
var
|
|
554
|
-
var
|
|
555
|
-
var
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
516
|
+
var LABELS = {
|
|
517
|
+
telegram: "Telegram",
|
|
518
|
+
"telegram-bot": "Telegram bot",
|
|
519
|
+
max: "MAX",
|
|
520
|
+
"max-bot": "MAX bot",
|
|
521
|
+
whatsapp: "WhatsApp",
|
|
522
|
+
"whatsapp-bot": "WhatsApp bot",
|
|
523
|
+
"google-drive": "Google Drive",
|
|
524
|
+
"google-meet": "Google Meet",
|
|
525
|
+
added: "added by hand",
|
|
526
|
+
email: "mail",
|
|
527
|
+
telemost: "Telemost"
|
|
528
|
+
};
|
|
529
|
+
var providerLabel = /* @__PURE__ */ __name((provider) => LABELS[provider] ?? provider, "providerLabel");
|
|
530
|
+
var FOLDER_PROVIDERS = ["local", "obsidian", "folder"];
|
|
531
|
+
var isFolderProvider = /* @__PURE__ */ __name((provider) => FOLDER_PROVIDERS.includes(provider), "isFolderProvider");
|
|
532
|
+
var folderProviderSql = /* @__PURE__ */ __name((column = "provider") => `${column} IN (${FOLDER_PROVIDERS.map((name) => `'${name}'`).join(", ")})`, "folderProviderSql");
|
|
533
|
+
var folderProviderOf = /* @__PURE__ */ __name((format) => format === "markdown" ? "local" : "obsidian", "folderProviderOf");
|
|
534
|
+
var DOCUMENT_ACCOUNT_PROVIDERS = ["google-drive"];
|
|
535
|
+
var isDocumentAccountProvider = /* @__PURE__ */ __name((provider) => DOCUMENT_ACCOUNT_PROVIDERS.includes(provider), "isDocumentAccountProvider");
|
|
536
|
+
var ADDED_PROVIDER = "added";
|
|
537
|
+
var ADDED_ACCOUNT = "owner";
|
|
538
|
+
var notAdded = `d.account_id NOT IN (SELECT id FROM accounts WHERE provider = '${ADDED_PROVIDER}')`;
|
|
539
|
+
var filesAccountSql = /* @__PURE__ */ __name((column = "provider") => `${column} IN (${[...FOLDER_PROVIDERS, ...DOCUMENT_ACCOUNT_PROVIDERS, ADDED_PROVIDER].map((name) => `'${name}'`).join(", ")})`, "filesAccountSql");
|
|
540
|
+
var INTERNAL_NOTES = "internal";
|
|
541
|
+
var UNKNOWN_PROVIDER = "unknown provider \u2014 run its CLI once";
|
|
542
|
+
var WORD = /^[a-z0-9][a-z0-9_-]*$/;
|
|
543
|
+
var invalid = /* @__PURE__ */ __name((message) => {
|
|
544
|
+
throw new CliError("validation_error", message);
|
|
545
|
+
}, "invalid");
|
|
546
|
+
var wordOf = /* @__PURE__ */ __name((value, what) => typeof value === "string" && WORD.test(value) ? value : invalid(`${what} is lowercase letters, digits, - and _ \u2014 not ${JSON.stringify(value)}`), "wordOf");
|
|
547
|
+
var OPEN_KINDS = new Set(REF_KINDS.map(({ type }) => type).filter((type) => type !== "entity"));
|
|
548
|
+
var COMMAND_WORDS = /^[a-z0-9][a-z0-9_-]*( [a-z0-9][a-z0-9_-]*)*$/;
|
|
549
|
+
var opensOf = /* @__PURE__ */ __name((value, named) => {
|
|
550
|
+
if (typeof value !== "object" || value === null || Array.isArray(value))
|
|
551
|
+
return invalid(`provider ${named}'s opens maps a kind of reference to a command`);
|
|
552
|
+
const known = Object.entries(value).filter(([kind2]) => OPEN_KINDS.has(kind2));
|
|
553
|
+
for (const [kind2, command] of known)
|
|
554
|
+
if (typeof command !== "string" || !COMMAND_WORDS.test(command))
|
|
555
|
+
invalid(`provider ${named} opens a ${kind2} with command words, not ${JSON.stringify(command)}`);
|
|
556
|
+
return Object.fromEntries(known);
|
|
557
|
+
}, "opensOf");
|
|
558
|
+
var providerEntryOf = /* @__PURE__ */ __name((value) => {
|
|
559
|
+
if (typeof value !== "object" || value === null || Array.isArray(value))
|
|
560
|
+
return invalid("a provider entry is an object");
|
|
561
|
+
const { name, kind: kind2, kinds, aliases = [], command, opens, imported } = value;
|
|
562
|
+
const named = wordOf(name, "a provider's name");
|
|
563
|
+
const isKindWord = /* @__PURE__ */ __name((one) => typeof one === "string" && KINDS.includes(one), "isKindWord");
|
|
564
|
+
const given = kinds === void 0 ? [kind2] : Array.isArray(kinds) && kinds.length > 0 ? kinds : [void 0];
|
|
565
|
+
for (const one of given)
|
|
566
|
+
if (!isKindWord(one))
|
|
567
|
+
invalid(`provider ${named}'s kind is one of ${KINDS.join(", ")} \u2014 not ${JSON.stringify(one)}`);
|
|
568
|
+
const list = [...new Set(given)];
|
|
569
|
+
if (kind2 !== void 0 && kind2 !== list[0])
|
|
570
|
+
invalid(`provider ${named}'s kind is the first of its kinds`);
|
|
571
|
+
if (!Array.isArray(aliases))
|
|
572
|
+
invalid(`provider ${named}'s aliases are a list`);
|
|
573
|
+
if (imported !== void 0 && typeof imported !== "boolean")
|
|
574
|
+
invalid(`provider ${named}'s imported is true or false`);
|
|
575
|
+
return {
|
|
576
|
+
name: named,
|
|
577
|
+
kind: list[0],
|
|
578
|
+
...list.length > 1 ? { kinds: list } : {},
|
|
579
|
+
...imported === true ? { imported: true } : {},
|
|
580
|
+
aliases: [...new Set(aliases.map((alias) => wordOf(alias, `an alias of ${named}`)))],
|
|
581
|
+
...command === void 0 ? {} : { command: wordOf(command, `the command of ${named}`) },
|
|
582
|
+
...opens === void 0 ? {} : { opens: opensOf(opens, named) }
|
|
583
|
+
};
|
|
584
|
+
}, "providerEntryOf");
|
|
585
|
+
var kindsOfEntry = /* @__PURE__ */ __name((entry) => entry.kinds ?? [entry.kind], "kindsOfEntry");
|
|
586
|
+
var describe = /* @__PURE__ */ __name((entry) => `${entry.name} (${kindsOfEntry(entry).join(", ")}${entry.command ? `, from ${entry.command}` : ""})`, "describe");
|
|
587
|
+
var unitedKinds = /* @__PURE__ */ __name((known, entry) => [
|
|
588
|
+
.../* @__PURE__ */ new Set([...known, ...entry])
|
|
589
|
+
], "unitedKinds");
|
|
590
|
+
var wordsOf = /* @__PURE__ */ __name(({ name, aliases }) => [name, ...aliases], "wordsOf");
|
|
591
|
+
var joined = /* @__PURE__ */ __name((known, entry) => {
|
|
592
|
+
const same = known.find(({ name }) => name === entry.name);
|
|
593
|
+
const kinds = same ? unitedKinds(kindsOfEntry(same), kindsOfEntry(entry)) : kindsOfEntry(entry);
|
|
594
|
+
if (same && same.kind !== entry.kind)
|
|
595
|
+
invalid(`two provider entries disagree on the kind: ${describe(same)} and ${describe(entry)}`);
|
|
596
|
+
if (same && entry.imported === true && same.imported !== true)
|
|
597
|
+
invalid(`provider ${entry.name} is synced, so an entry cannot make it import-only`);
|
|
598
|
+
const merged = same ? {
|
|
599
|
+
...same,
|
|
600
|
+
...kinds.length > 1 ? { kinds } : {},
|
|
601
|
+
aliases: [.../* @__PURE__ */ new Set([...same.aliases, ...entry.aliases])],
|
|
602
|
+
...entry.command ? { command: entry.command } : {},
|
|
603
|
+
...entry.opens ? { opens: { ...same.opens, ...entry.opens } } : {}
|
|
604
|
+
} : entry;
|
|
605
|
+
const others = known.filter((one) => one !== same);
|
|
606
|
+
for (const word of wordsOf(merged)) {
|
|
607
|
+
const owner = others.find((one) => wordsOf(one).includes(word));
|
|
608
|
+
if (owner)
|
|
609
|
+
invalid(`"${word}" names two providers: ${describe(owner)} and ${describe(merged)}`);
|
|
568
610
|
}
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
var
|
|
572
|
-
var
|
|
573
|
-
var
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
}
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
}, "
|
|
593
|
-
var
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
};
|
|
599
|
-
var
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
}
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
var
|
|
624
|
-
var usableLink = /* @__PURE__ */ __name((link, now) => isUsable(standingOf(link, now)), "usableLink");
|
|
625
|
-
var notOverriddenSql = /* @__PURE__ */ __name((alias) => `NOT EXISTS (SELECT 1 FROM links override WHERE override.kind = ${alias}.kind AND override.from_type = ${alias}.from_type AND override.from_id = ${alias}.from_id AND override.to_type = ${alias}.to_type AND override.to_id = ${alias}.to_id AND json_extract(override.metadata, '$.overrides') = ${alias}.id)`, "notOverriddenSql");
|
|
626
|
-
var usableLinkSql = /* @__PURE__ */ __name((alias, now) => `(${alias}.confirmed = 1 OR (${alias}.account_id IS NOT NULL AND ${alias}.deleted_at IS NULL))` + (now === void 0 ? "" : ` AND (${alias}.ends_at IS NULL OR ${alias}.ends_at > ${Math.trunc(now)})`), "usableLinkSql");
|
|
627
|
-
|
|
628
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_737712cd0065e7e21fd5896a79d0773d/node_modules/@wirecat/cli-core/dist/domain/tags.js
|
|
629
|
-
var TAG_TYPES = ["chat", "contact", "message", "task"];
|
|
630
|
-
var TAG = /^[a-z0-9-]{1,32}$/;
|
|
631
|
-
var tagOf = /* @__PURE__ */ __name((value) => {
|
|
632
|
-
const tag = value.trim().toLowerCase();
|
|
633
|
-
return TAG.test(tag) ? tag : void 0;
|
|
634
|
-
}, "tagOf");
|
|
635
|
-
var normalizeTag = /* @__PURE__ */ __name((value) => {
|
|
636
|
-
const tag = tagOf(value);
|
|
637
|
-
if (tag === void 0)
|
|
638
|
-
throw new CliError("validation_error", `"${singleLine(value)}" is not a tag \u2014 use 1\u201332 letters a\u2013z, digits and hyphens`, { reason: "tag.invalid" });
|
|
639
|
-
return tag;
|
|
640
|
-
}, "normalizeTag");
|
|
611
|
+
return same ? known.map((one) => one === same ? merged : one) : [...known, merged];
|
|
612
|
+
}, "joined");
|
|
613
|
+
var registry = PROVIDERS;
|
|
614
|
+
var providers = /* @__PURE__ */ __name(() => registry, "providers");
|
|
615
|
+
var useProviders = /* @__PURE__ */ __name((entries) => {
|
|
616
|
+
registry = entries.map(providerEntryOf).reduce(joined, PROVIDERS);
|
|
617
|
+
}, "useProviders");
|
|
618
|
+
var useStoredProviders = /* @__PURE__ */ __name((entries) => {
|
|
619
|
+
const left = [];
|
|
620
|
+
registry = entries.reduce((known, entry) => {
|
|
621
|
+
try {
|
|
622
|
+
return joined(known, providerEntryOf(entry));
|
|
623
|
+
} catch (error) {
|
|
624
|
+
if (!(error instanceof CliError))
|
|
625
|
+
throw error;
|
|
626
|
+
left.push(entry);
|
|
627
|
+
return known;
|
|
628
|
+
}
|
|
629
|
+
}, PROVIDERS);
|
|
630
|
+
return left;
|
|
631
|
+
}, "useStoredProviders");
|
|
632
|
+
var addProvider = /* @__PURE__ */ __name((entry) => {
|
|
633
|
+
registry = joined(registry, providerEntryOf(entry));
|
|
634
|
+
}, "addProvider");
|
|
635
|
+
var isKind = /* @__PURE__ */ __name((word) => KINDS.includes(word.toLowerCase()), "isKind");
|
|
636
|
+
var providerNamed = /* @__PURE__ */ __name((word) => {
|
|
637
|
+
const wanted = word.toLowerCase();
|
|
638
|
+
return registry.find((entry) => wordsOf(entry).includes(wanted));
|
|
639
|
+
}, "providerNamed");
|
|
640
|
+
var kindIn = /* @__PURE__ */ __name((provider) => isFolderProvider(provider) ? "notes" : registry.find(({ name }) => name === provider)?.kind, "kindIn");
|
|
641
|
+
var kindsIn = /* @__PURE__ */ __name((provider) => {
|
|
642
|
+
if (isFolderProvider(provider))
|
|
643
|
+
return ["notes"];
|
|
644
|
+
const entry = registry.find(({ name }) => name === provider);
|
|
645
|
+
if (!entry)
|
|
646
|
+
return [];
|
|
647
|
+
return entry.imported ? unitedKinds(kindsOfEntry(entry), ["documents"]) : kindsOfEntry(entry);
|
|
648
|
+
}, "kindsIn");
|
|
649
|
+
var importedOf = /* @__PURE__ */ __name((entry, held) => {
|
|
650
|
+
const builtIn = PROVIDERS.find(({ name }) => name === entry.name);
|
|
651
|
+
if (builtIn) {
|
|
652
|
+
if (entry.imported === true && builtIn.imported !== true)
|
|
653
|
+
invalid(`provider ${entry.name} is synced, so an entry cannot make it import-only`);
|
|
654
|
+
return builtIn.imported === true;
|
|
655
|
+
}
|
|
656
|
+
if (held === void 0)
|
|
657
|
+
return entry.imported === true;
|
|
658
|
+
if (entry.imported === true && held.imported !== true)
|
|
659
|
+
invalid(`provider ${entry.name} was registered without imported: an entry cannot make it import-only later`);
|
|
660
|
+
return held.imported === true;
|
|
661
|
+
}, "importedOf");
|
|
662
|
+
var isImportedProvider = /* @__PURE__ */ __name((provider) => registry.find(({ name }) => name === provider)?.imported === true, "isImportedProvider");
|
|
663
|
+
var holdsKind = /* @__PURE__ */ __name((provider, kind2) => kindsIn(provider).includes(kind2), "holdsKind");
|
|
664
|
+
var holdsKindOf = /* @__PURE__ */ __name((provider, kind2) => kindIn(provider) === void 0 ? kind2 === "messages" : holdsKind(provider, kind2), "holdsKindOf");
|
|
665
|
+
var kindOf = /* @__PURE__ */ __name((provider) => kindIn(provider) ?? "messages", "kindOf");
|
|
641
666
|
|
|
642
667
|
export {
|
|
643
|
-
formatLocator,
|
|
644
|
-
isLocator,
|
|
645
|
-
parseLocator,
|
|
646
|
-
SIMPLE_REFERENCES,
|
|
647
|
-
REF_KINDS,
|
|
648
|
-
formatReference,
|
|
649
|
-
parseReference,
|
|
650
|
-
canonicalReference,
|
|
651
|
-
looksLikeReference,
|
|
652
|
-
KINDS,
|
|
653
|
-
CRM_OPENS,
|
|
654
|
-
PROVIDERS,
|
|
655
|
-
providerLabel,
|
|
656
|
-
FOLDER_PROVIDERS,
|
|
657
|
-
isFolderProvider,
|
|
658
|
-
folderProviderSql,
|
|
659
|
-
folderProviderOf,
|
|
660
|
-
DOCUMENT_ACCOUNT_PROVIDERS,
|
|
661
|
-
isDocumentAccountProvider,
|
|
662
|
-
ADDED_PROVIDER,
|
|
663
|
-
ADDED_ACCOUNT,
|
|
664
|
-
notAdded,
|
|
665
|
-
filesAccountSql,
|
|
666
|
-
INTERNAL_NOTES,
|
|
667
|
-
UNKNOWN_PROVIDER,
|
|
668
|
-
providerEntryOf,
|
|
669
|
-
kindsOfEntry,
|
|
670
|
-
unitedKinds,
|
|
671
|
-
providers,
|
|
672
|
-
useProviders,
|
|
673
|
-
useStoredProviders,
|
|
674
|
-
addProvider,
|
|
675
|
-
isKind,
|
|
676
|
-
providerNamed,
|
|
677
|
-
kindIn,
|
|
678
|
-
kindsIn,
|
|
679
|
-
importedOf,
|
|
680
|
-
isImportedProvider,
|
|
681
|
-
holdsKind,
|
|
682
|
-
holdsKindOf,
|
|
683
|
-
kindOf,
|
|
684
668
|
CURRENCY_SCALES,
|
|
685
669
|
parseDecimal,
|
|
686
670
|
formatDecimal,
|
|
@@ -692,6 +676,11 @@ export {
|
|
|
692
676
|
moneyLabel,
|
|
693
677
|
quantityOf,
|
|
694
678
|
lineUnits,
|
|
679
|
+
DEAL_KINDS,
|
|
680
|
+
DEAL_STATUSES,
|
|
681
|
+
STAGE_OUTCOMES,
|
|
682
|
+
DEAL_ROLES,
|
|
683
|
+
dealLine,
|
|
695
684
|
INVOICE_DIRECTIONS,
|
|
696
685
|
INVOICE_STATUSES,
|
|
697
686
|
MONEY_DIRECTIONS,
|
|
@@ -701,27 +690,6 @@ export {
|
|
|
701
690
|
paymentLine,
|
|
702
691
|
invoiceTitle,
|
|
703
692
|
paymentEntryTitle,
|
|
704
|
-
CATALOG_KINDS,
|
|
705
|
-
BUSINESS_KINDS,
|
|
706
|
-
CONTRACT_KINDS,
|
|
707
|
-
CONTRACT_STATUSES,
|
|
708
|
-
PERIOD_UNITS,
|
|
709
|
-
SUBSCRIPTION_STATUSES,
|
|
710
|
-
WALLET_KINDS,
|
|
711
|
-
TRANSACTION_STATUSES,
|
|
712
|
-
ORDER_DIRECTIONS,
|
|
713
|
-
intervalOf,
|
|
714
|
-
intervalText,
|
|
715
|
-
productLine,
|
|
716
|
-
contractLine,
|
|
717
|
-
subscriptionLine,
|
|
718
|
-
walletLine,
|
|
719
|
-
transactionLine,
|
|
720
|
-
DEAL_KINDS,
|
|
721
|
-
DEAL_STATUSES,
|
|
722
|
-
STAGE_OUTCOMES,
|
|
723
|
-
DEAL_ROLES,
|
|
724
|
-
dealLine,
|
|
725
693
|
ORDER_STATUSES,
|
|
726
694
|
ORDER_PURPOSES,
|
|
727
695
|
orderLine,
|
|
@@ -729,6 +697,7 @@ export {
|
|
|
729
697
|
ORGANIZATION_ROLES,
|
|
730
698
|
PROJECT_ROLES,
|
|
731
699
|
CONTRACT_ROLES,
|
|
700
|
+
RELATED_ROLES,
|
|
732
701
|
ENGAGEMENT_LEVELS,
|
|
733
702
|
isEngagement,
|
|
734
703
|
checkEngagement,
|
|
@@ -748,9 +717,72 @@ export {
|
|
|
748
717
|
standingOf,
|
|
749
718
|
isUsable,
|
|
750
719
|
usableLink,
|
|
720
|
+
KEYED,
|
|
751
721
|
notOverriddenSql,
|
|
752
722
|
usableLinkSql,
|
|
723
|
+
CRM_KINDS,
|
|
724
|
+
CRM_ACTIVITY_KINDS,
|
|
725
|
+
isCrmUserId,
|
|
726
|
+
normalCrmUserId,
|
|
727
|
+
isItemKind,
|
|
728
|
+
CATALOG_KINDS,
|
|
729
|
+
BUSINESS_KINDS,
|
|
730
|
+
CONTRACT_KINDS,
|
|
731
|
+
CONTRACT_STATUSES,
|
|
732
|
+
PERIOD_UNITS,
|
|
733
|
+
SUBSCRIPTION_STATUSES,
|
|
734
|
+
WALLET_KINDS,
|
|
735
|
+
TRANSACTION_STATUSES,
|
|
736
|
+
ORDER_DIRECTIONS,
|
|
737
|
+
intervalOf,
|
|
738
|
+
intervalText,
|
|
739
|
+
productLine,
|
|
740
|
+
contractLine,
|
|
741
|
+
subscriptionLine,
|
|
742
|
+
walletLine,
|
|
743
|
+
transactionLine,
|
|
753
744
|
TAG_TYPES,
|
|
754
745
|
tagOf,
|
|
755
|
-
normalizeTag
|
|
746
|
+
normalizeTag,
|
|
747
|
+
formatLocator,
|
|
748
|
+
isLocator,
|
|
749
|
+
parseLocator,
|
|
750
|
+
SIMPLE_REFERENCES,
|
|
751
|
+
REF_KINDS,
|
|
752
|
+
formatReference,
|
|
753
|
+
parseReference,
|
|
754
|
+
canonicalReference,
|
|
755
|
+
looksLikeReference,
|
|
756
|
+
KINDS,
|
|
757
|
+
CRM_OPENS,
|
|
758
|
+
PROVIDERS,
|
|
759
|
+
providerLabel,
|
|
760
|
+
FOLDER_PROVIDERS,
|
|
761
|
+
isFolderProvider,
|
|
762
|
+
folderProviderSql,
|
|
763
|
+
folderProviderOf,
|
|
764
|
+
DOCUMENT_ACCOUNT_PROVIDERS,
|
|
765
|
+
isDocumentAccountProvider,
|
|
766
|
+
ADDED_PROVIDER,
|
|
767
|
+
ADDED_ACCOUNT,
|
|
768
|
+
notAdded,
|
|
769
|
+
filesAccountSql,
|
|
770
|
+
INTERNAL_NOTES,
|
|
771
|
+
UNKNOWN_PROVIDER,
|
|
772
|
+
providerEntryOf,
|
|
773
|
+
kindsOfEntry,
|
|
774
|
+
unitedKinds,
|
|
775
|
+
providers,
|
|
776
|
+
useProviders,
|
|
777
|
+
useStoredProviders,
|
|
778
|
+
addProvider,
|
|
779
|
+
isKind,
|
|
780
|
+
providerNamed,
|
|
781
|
+
kindIn,
|
|
782
|
+
kindsIn,
|
|
783
|
+
importedOf,
|
|
784
|
+
isImportedProvider,
|
|
785
|
+
holdsKind,
|
|
786
|
+
holdsKindOf,
|
|
787
|
+
kindOf
|
|
756
788
|
};
|