@wirecat/zoom-cli 0.71.0 → 0.72.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/dist/answers.d.ts +56 -0
- package/dist/answers.d.ts.map +1 -1
- package/dist/bin/zm.js +2 -2
- package/dist/bundle/{all-profiles-O4YNVPZX.js → all-profiles-XFIPF4GF.js} +12 -12
- package/dist/bundle/answer-policy-AT6CDEE5.js +110 -0
- package/dist/bundle/{anthropic-7GGRX3RX.js → anthropic-SSUBR3BC.js} +18 -11
- package/dist/bundle/{app-server-CPMKM3HI.js → app-server-7DJHHF2F.js} +68 -56
- package/dist/bundle/{bun-POHZKEPV.js → bun-6HBYWQIX.js} +2 -2
- package/dist/bundle/{bun-sqlite-PGYMBPEL.js → bun-sqlite-4L3Q55NB.js} +10 -6
- package/dist/bundle/{chunk-Q2SUFGSH.js → chunk-23J2ANZ7.js} +2 -2
- package/dist/bundle/{chunk-FSHCAWZS.js → chunk-24OFZNRC.js} +13119 -10386
- package/dist/bundle/{chunk-LE7MDAQG.js → chunk-2MIBRVSV.js} +2 -2
- package/dist/bundle/{chunk-DIQLXAAZ.js → chunk-37NF5CBJ.js} +4 -4
- package/dist/bundle/chunk-3KRTEX5M.js +53 -0
- package/dist/bundle/{chunk-IED3NS7G.js → chunk-4SY67IUA.js} +30 -30
- package/dist/bundle/{chunk-CKPCVEXU.js → chunk-4XQWF3U2.js} +6 -6
- package/dist/bundle/{chunk-CT4WVR4N.js → chunk-4YIGXTBP.js} +3 -3
- package/dist/bundle/{chunk-YPO2U2YB.js → chunk-5AELTC52.js} +388 -143
- package/dist/bundle/{chunk-USQ23X5V.js → chunk-5MGICK47.js} +750 -734
- package/dist/bundle/{chunk-DK6ICIGL.js → chunk-5X4IY5JH.js} +2025 -1302
- package/dist/bundle/{chunk-EOSVN2ER.js → chunk-63QXCE5Z.js} +242 -242
- package/dist/bundle/{chunk-OE7EIP5L.js → chunk-6DCLZLGX.js} +1 -1
- package/dist/bundle/chunk-7GLJSJ7M.js +16 -0
- package/dist/bundle/{chunk-X3ZDN3U7.js → chunk-7IFO43Q5.js} +2 -2
- package/dist/bundle/{chunk-YD2RYVMK.js → chunk-7JYMGXLI.js} +41 -39
- package/dist/bundle/{chunk-DSVZEXYJ.js → chunk-7OD3522V.js} +3541 -3346
- package/dist/bundle/{chunk-2FV5JUQU.js → chunk-7S4D5SM2.js} +41 -35
- package/dist/bundle/{chunk-VRH7VRTK.js → chunk-7SUWPMZG.js} +10 -15
- package/dist/bundle/{chunk-4QPQ7MDA.js → chunk-ADKMBXY4.js} +1 -1
- package/dist/bundle/{chunk-MRI6QMZ3.js → chunk-B3SILJBU.js} +18 -18
- package/dist/bundle/{chunk-7ROXXRGG.js → chunk-CANRIRNZ.js} +6678 -5185
- package/dist/bundle/{chunk-DRBQDCDU.js → chunk-CW46FWKW.js} +38 -123
- package/dist/bundle/{chunk-GXF5HFFP.js → chunk-D24OQAHM.js} +4 -4
- package/dist/bundle/{chunk-ZBKWRYRS.js → chunk-D5EUMWD5.js} +3 -3
- package/dist/bundle/{chunk-QVSLSWAL.js → chunk-DEPXZJ2V.js} +21 -150
- package/dist/bundle/{chunk-TM4JSVGQ.js → chunk-DOCVEKP2.js} +39 -44
- package/dist/bundle/{chunk-BBTQIVFP.js → chunk-EFF2XBHP.js} +2 -2
- package/dist/bundle/{chunk-XRFHQGOD.js → chunk-EG25AY4L.js} +1 -1
- package/dist/bundle/{chunk-FEM2JQN2.js → chunk-ELJUBPY4.js} +1 -1
- package/dist/bundle/{chunk-2U6SER67.js → chunk-ERJYJ36F.js} +2 -2
- package/dist/bundle/chunk-FSCPQQS5.js +244 -0
- package/dist/bundle/{chunk-P3XC6EDU.js → chunk-H53WFZBN.js} +11 -130
- package/dist/bundle/{chunk-RN4EHCC5.js → chunk-I7CUMZD6.js} +3 -3
- package/dist/bundle/{chunk-ALIT5QFT.js → chunk-IACWKZWS.js} +1 -1
- package/dist/bundle/{chunk-MW4EGDDV.js → chunk-IFBIXU6C.js} +2 -2
- package/dist/bundle/{chunk-5K7OGPGA.js → chunk-IU4DUUB3.js} +7 -7
- package/dist/bundle/{chunk-INVTDIF6.js → chunk-IXO4SCKE.js} +1 -1
- package/dist/bundle/{chunk-OHWMIUCT.js → chunk-JAEPK457.js} +244 -245
- package/dist/bundle/{chunk-HB6XJQ3Y.js → chunk-JFPUYQSP.js} +5 -5
- package/dist/bundle/{chunk-IAV5BG3I.js → chunk-JG4MNYG2.js} +1 -1
- package/dist/bundle/{chunk-ZBFL5JPT.js → chunk-JRCH4YZP.js} +16 -10
- package/dist/bundle/{chunk-M76MXMLY.js → chunk-JZ4XNNL7.js} +1 -1
- package/dist/bundle/chunk-K6HR6HCO.js +32 -0
- package/dist/bundle/{chunk-DHWBSXG3.js → chunk-KFZL67JP.js} +323 -55
- package/dist/bundle/{chunk-X4GWR6GO.js → chunk-KPIQXFNB.js} +375 -10
- package/dist/bundle/{chunk-OWEBWDHV.js → chunk-KWURWGGB.js} +80 -5
- package/dist/bundle/{chunk-Q5PI72CR.js → chunk-LA6QUVGQ.js} +3 -2
- package/dist/bundle/{chunk-5J4AMBMM.js → chunk-LLUNHAZ7.js} +4 -4
- package/dist/bundle/{chunk-2RUAMDVV.js → chunk-LTWJM3ED.js} +17 -17
- package/dist/bundle/{chunk-2U27KIKU.js → chunk-M3DMXDX6.js} +6 -6
- package/dist/bundle/{chunk-VW6BF6M7.js → chunk-MCPOZNWG.js} +1 -1
- package/dist/bundle/{chunk-CRFOGYDG.js → chunk-MSQHSW4C.js} +2 -2
- package/dist/bundle/chunk-N4QNYWWG.js +71 -0
- package/dist/bundle/chunk-NMZQTYKJ.js +18 -0
- package/dist/bundle/{chunk-2KESWII5.js → chunk-OHCLQJOV.js} +3 -3
- package/dist/bundle/{chunk-4QUFFB2U.js → chunk-OP5PGE2N.js} +4 -4
- package/dist/bundle/{chunk-Q3XLZIY3.js → chunk-OY6N2ABP.js} +29 -23
- package/dist/bundle/chunk-PJWSGXOB.js +185 -0
- package/dist/bundle/{chunk-633QXP57.js → chunk-QA6KIL7Q.js} +10 -8
- package/dist/bundle/{chunk-N2FNMION.js → chunk-QQUY4MZY.js} +1 -1
- package/dist/bundle/{chunk-X277FBTF.js → chunk-QW7YTRV2.js} +3 -3
- package/dist/bundle/chunk-RJTGENHZ.js +109 -0
- package/dist/bundle/{chunk-ULDXZ6LH.js → chunk-RLCVPECY.js} +63 -63
- package/dist/bundle/{chunk-BGTEVIW4.js → chunk-RN5SU2RN.js} +6 -6
- package/dist/bundle/{chunk-P3ASN72F.js → chunk-RX5CJ55S.js} +1 -1
- package/dist/bundle/{chunk-7QC4M4HS.js → chunk-RZUJMAMK.js} +4 -4
- package/dist/bundle/{chunk-OORMSM6O.js → chunk-S7SXSHRC.js} +21 -21
- package/dist/bundle/{chunk-GGS6D4W4.js → chunk-SXZGCD6E.js} +3 -3
- package/dist/bundle/{chunk-64ZHF6PJ.js → chunk-T27IMG6X.js} +3 -1
- package/dist/bundle/{chunk-VJXHIUFP.js → chunk-TF2WKPNW.js} +15 -15
- package/dist/bundle/{chunk-QTHIU7CO.js → chunk-U32VL3MA.js} +1 -1
- package/dist/bundle/{chunk-RQG5VOGH.js → chunk-U3NJBGLA.js} +3 -3
- package/dist/bundle/{chunk-WOIHSQAL.js → chunk-UVZLK3M4.js} +33 -9
- package/dist/bundle/{chunk-XI3VIQKW.js → chunk-VIV64MQM.js} +560 -537
- package/dist/bundle/{chunk-CFQF6IGY.js → chunk-W3YTVEWV.js} +69 -6
- package/dist/bundle/{chunk-54YDWBYG.js → chunk-WLVG4RBZ.js} +1 -1
- package/dist/bundle/{chunk-77TCCHMP.js → chunk-WOAYHCM2.js} +1 -1
- package/dist/bundle/{chunk-5LJTU4LY.js → chunk-WXTYYWZI.js} +13 -13
- package/dist/bundle/{chunk-MEED7YFG.js → chunk-WZGKHTA4.js} +2 -2
- package/dist/bundle/{chunk-I4DFFR7F.js → chunk-X2MP634F.js} +14 -5
- package/dist/bundle/{chunk-RGJ7OWHU.js → chunk-XPWZSW6Y.js} +61 -21
- package/dist/bundle/{chunk-SELXER2Q.js → chunk-YVVJ6Y5C.js} +7 -7
- package/dist/bundle/{chunk-4LAQDZXU.js → chunk-ZHA56THL.js} +790 -70
- package/dist/bundle/{chunk-ZVI6TFQR.js → chunk-ZVFYGTGJ.js} +17 -17
- package/dist/bundle/{chunk-GL3MYFMX.js → chunk-ZW5KHKMA.js} +5 -5
- package/dist/bundle/{cli-KHMEUXNG.js → cli-IYYI7GAM.js} +158 -96
- package/dist/bundle/command-contract-TX7NSUBM.js +42 -0
- package/dist/bundle/command-server-entry-FXX4LJWF.js +171 -0
- package/dist/bundle/config-YKNM33J7.js +96 -0
- package/dist/bundle/{decode-7RP4HSVE.js → decode-SRGOOGBW.js} +6 -6
- package/dist/bundle/{dispatch-IZCAK47P.js → dispatch-OUHRPFUL.js} +11 -11
- package/dist/bundle/{dist-BFT2SUBV.js → dist-UZLNLAIO.js} +52 -31
- package/dist/bundle/{echarts-T2BSQ2YV.js → echarts-7CM2MCMW.js} +2 -2
- package/dist/bundle/{embed-BAS6YPDT.js → embed-VEE56BOB.js} +7 -7
- package/dist/bundle/{embedder-5XD5FCAO.js → embedder-SZFYR543.js} +10 -10
- package/dist/bundle/{failure-R2OIHCE5.js → failure-MZBNM7M5.js} +3 -3
- package/dist/bundle/first-run-KWC7RKF2.js +29 -0
- package/dist/bundle/first-screen-DWKMNSEI.js +40 -0
- package/dist/bundle/{folders-ZXTOFY4T.js → folders-UQXRSDJJ.js} +5 -5
- package/dist/bundle/{instructions-XZPROPKY.js → instructions-R7OHVAWH.js} +1 -1
- package/dist/bundle/{main-TZXKGL3L.js → main-EFUN2O3K.js} +21 -20
- package/dist/bundle/{mcp-M4QN2E7R.js → mcp-7KQUJNFN.js} +2 -2
- package/dist/bundle/{meetings-JB2ISPND.js → meetings-5I2BDNTA.js} +7 -7
- package/dist/bundle/{node-A3B3MJWX.js → node-3N2JGZ7V.js} +2 -2
- package/dist/bundle/{node-sqlite-QVWDLGDX.js → node-sqlite-2UVEE2WM.js} +11 -7
- package/dist/bundle/{oauth-YA6IYV4O.js → oauth-AYGD7UU3.js} +8 -8
- package/dist/bundle/{open-SY7TXJBS.js → open-3GUVDLGD.js} +6 -6
- package/dist/bundle/openai-NHCDLWWY.js +28 -0
- package/dist/bundle/{output-file-YGQYZCBJ.js → output-file-72JFXVHQ.js} +6 -6
- package/dist/bundle/{process-6HNBTJIY.js → process-YAHHUFR5.js} +1 -1
- package/dist/bundle/{program-77BUCJ4H.js → program-OSZROCTK.js} +97 -91
- package/dist/bundle/{prompt-YDG73YDS.js → prompt-HMCW4XQJ.js} +6 -6
- package/dist/bundle/{recognize-ECXDGTB7.js → recognize-VF5CA7EM.js} +5 -5
- package/dist/bundle/{remote-K4JHGBVJ.js → remote-5C6VTPR2.js} +10 -8
- package/dist/bundle/{rerank-IU2YYD4T.js → rerank-ER7NEDOI.js} +8 -8
- package/dist/bundle/run-log-JKTLKXSK.js +124 -0
- package/dist/bundle/{serve-3XWIF3HI.js → serve-QJWXJOM7.js} +10 -10
- package/dist/bundle/{server-56VYOHWP.js → server-KCIK3Y2P.js} +50 -48
- package/dist/bundle/server-LLGFDLLJ.js +75 -0
- package/dist/bundle/{services-X7IPEGQ5.js → services-LQMYJQG3.js} +62 -45
- package/dist/bundle/{speech-E2OBQWYA.js → speech-74GJQNQH.js} +20 -17
- package/dist/bundle/{state-4GMJYK4H.js → state-4XDGCHDF.js} +7 -7
- package/dist/bundle/{store-LA4TV4DM.js → store-5Y5HK2L2.js} +22 -19
- package/dist/bundle/{store-KPI7GB5Y.js → store-Y56AHJ2Y.js} +42 -27
- package/dist/bundle/store-connection-4WI32AYU.js +89 -0
- package/dist/bundle/store-maintenance-command-PCXO5AH4.js +65 -0
- package/dist/bundle/{streaming-EJ3NM2C2.js → streaming-E5CR6HSR.js} +7 -7
- package/dist/bundle/{tokens-BE6CJMR5.js → tokens-E2QNVC4F.js} +7 -7
- package/dist/bundle/zm.js +34 -10
- package/dist/bundle/{zoom-app-QEJBTIJ4.js → zoom-app-NVL7HEAX.js} +8 -8
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
- 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/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/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/{chunk-VOXIGICJ.js → chunk-YVNHQFLC.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-RLCVPECY.js";
|
|
7
7
|
import {
|
|
8
8
|
CliError
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ELJUBPY4.js";
|
|
10
10
|
import {
|
|
11
11
|
singleLine
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-6DCLZLGX.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.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/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.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/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.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/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.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/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.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/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.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/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.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/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,358 @@ 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.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/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.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/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.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/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.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/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
|
+
// A phone export's records: its SMS and its calls in the one account the import names.
|
|
509
|
+
{ name: "phone", kind: "messages", kinds: ["messages", "events"], aliases: [], imported: true }
|
|
536
510
|
];
|
|
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
|
-
|
|
511
|
+
var LABELS = {
|
|
512
|
+
telegram: "Telegram",
|
|
513
|
+
"telegram-bot": "Telegram bot",
|
|
514
|
+
max: "MAX",
|
|
515
|
+
"max-bot": "MAX bot",
|
|
516
|
+
whatsapp: "WhatsApp",
|
|
517
|
+
"whatsapp-bot": "WhatsApp bot",
|
|
518
|
+
"google-drive": "Google Drive",
|
|
519
|
+
added: "added by hand",
|
|
520
|
+
email: "mail"
|
|
521
|
+
};
|
|
522
|
+
var providerLabel = /* @__PURE__ */ __name((provider) => LABELS[provider] ?? provider, "providerLabel");
|
|
523
|
+
var FOLDER_PROVIDERS = ["local", "obsidian", "folder"];
|
|
524
|
+
var isFolderProvider = /* @__PURE__ */ __name((provider) => FOLDER_PROVIDERS.includes(provider), "isFolderProvider");
|
|
525
|
+
var folderProviderSql = /* @__PURE__ */ __name((column = "provider") => `${column} IN (${FOLDER_PROVIDERS.map((name) => `'${name}'`).join(", ")})`, "folderProviderSql");
|
|
526
|
+
var folderProviderOf = /* @__PURE__ */ __name((format) => format === "markdown" ? "local" : "obsidian", "folderProviderOf");
|
|
527
|
+
var DOCUMENT_ACCOUNT_PROVIDERS = ["google-drive"];
|
|
528
|
+
var isDocumentAccountProvider = /* @__PURE__ */ __name((provider) => DOCUMENT_ACCOUNT_PROVIDERS.includes(provider), "isDocumentAccountProvider");
|
|
529
|
+
var ADDED_PROVIDER = "added";
|
|
530
|
+
var ADDED_ACCOUNT = "owner";
|
|
531
|
+
var notAdded = `d.account_id NOT IN (SELECT id FROM accounts WHERE provider = '${ADDED_PROVIDER}')`;
|
|
532
|
+
var filesAccountSql = /* @__PURE__ */ __name((column = "provider") => `${column} IN (${[...FOLDER_PROVIDERS, ...DOCUMENT_ACCOUNT_PROVIDERS, ADDED_PROVIDER].map((name) => `'${name}'`).join(", ")})`, "filesAccountSql");
|
|
533
|
+
var INTERNAL_NOTES = "internal";
|
|
534
|
+
var UNKNOWN_PROVIDER = "unknown provider \u2014 run its CLI once";
|
|
535
|
+
var WORD = /^[a-z0-9][a-z0-9_-]*$/;
|
|
536
|
+
var invalid = /* @__PURE__ */ __name((message) => {
|
|
537
|
+
throw new CliError("validation_error", message);
|
|
538
|
+
}, "invalid");
|
|
539
|
+
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");
|
|
540
|
+
var OPEN_KINDS = new Set(REF_KINDS.map(({ type }) => type).filter((type) => type !== "entity"));
|
|
541
|
+
var COMMAND_WORDS = /^[a-z0-9][a-z0-9_-]*( [a-z0-9][a-z0-9_-]*)*$/;
|
|
542
|
+
var opensOf = /* @__PURE__ */ __name((value, named) => {
|
|
543
|
+
if (typeof value !== "object" || value === null || Array.isArray(value))
|
|
544
|
+
return invalid(`provider ${named}'s opens maps a kind of reference to a command`);
|
|
545
|
+
const known = Object.entries(value).filter(([kind2]) => OPEN_KINDS.has(kind2));
|
|
546
|
+
for (const [kind2, command] of known)
|
|
547
|
+
if (typeof command !== "string" || !COMMAND_WORDS.test(command))
|
|
548
|
+
invalid(`provider ${named} opens a ${kind2} with command words, not ${JSON.stringify(command)}`);
|
|
549
|
+
return Object.fromEntries(known);
|
|
550
|
+
}, "opensOf");
|
|
551
|
+
var providerEntryOf = /* @__PURE__ */ __name((value) => {
|
|
552
|
+
if (typeof value !== "object" || value === null || Array.isArray(value))
|
|
553
|
+
return invalid("a provider entry is an object");
|
|
554
|
+
const { name, kind: kind2, kinds, aliases = [], command, opens, imported } = value;
|
|
555
|
+
const named = wordOf(name, "a provider's name");
|
|
556
|
+
const isKindWord = /* @__PURE__ */ __name((one) => typeof one === "string" && KINDS.includes(one), "isKindWord");
|
|
557
|
+
const given = kinds === void 0 ? [kind2] : Array.isArray(kinds) && kinds.length > 0 ? kinds : [void 0];
|
|
558
|
+
for (const one of given)
|
|
559
|
+
if (!isKindWord(one))
|
|
560
|
+
invalid(`provider ${named}'s kind is one of ${KINDS.join(", ")} \u2014 not ${JSON.stringify(one)}`);
|
|
561
|
+
const list = [...new Set(given)];
|
|
562
|
+
if (kind2 !== void 0 && kind2 !== list[0])
|
|
563
|
+
invalid(`provider ${named}'s kind is the first of its kinds`);
|
|
564
|
+
if (!Array.isArray(aliases))
|
|
565
|
+
invalid(`provider ${named}'s aliases are a list`);
|
|
566
|
+
if (imported !== void 0 && typeof imported !== "boolean")
|
|
567
|
+
invalid(`provider ${named}'s imported is true or false`);
|
|
568
|
+
return {
|
|
569
|
+
name: named,
|
|
570
|
+
kind: list[0],
|
|
571
|
+
...list.length > 1 ? { kinds: list } : {},
|
|
572
|
+
...imported === true ? { imported: true } : {},
|
|
573
|
+
aliases: [...new Set(aliases.map((alias) => wordOf(alias, `an alias of ${named}`)))],
|
|
574
|
+
...command === void 0 ? {} : { command: wordOf(command, `the command of ${named}`) },
|
|
575
|
+
...opens === void 0 ? {} : { opens: opensOf(opens, named) }
|
|
576
|
+
};
|
|
577
|
+
}, "providerEntryOf");
|
|
578
|
+
var kindsOfEntry = /* @__PURE__ */ __name((entry) => entry.kinds ?? [entry.kind], "kindsOfEntry");
|
|
579
|
+
var describe = /* @__PURE__ */ __name((entry) => `${entry.name} (${kindsOfEntry(entry).join(", ")}${entry.command ? `, from ${entry.command}` : ""})`, "describe");
|
|
580
|
+
var unitedKinds = /* @__PURE__ */ __name((known, entry) => [
|
|
581
|
+
.../* @__PURE__ */ new Set([...known, ...entry])
|
|
582
|
+
], "unitedKinds");
|
|
583
|
+
var wordsOf = /* @__PURE__ */ __name(({ name, aliases }) => [name, ...aliases], "wordsOf");
|
|
584
|
+
var joined = /* @__PURE__ */ __name((known, entry) => {
|
|
585
|
+
const same = known.find(({ name }) => name === entry.name);
|
|
586
|
+
const kinds = same ? unitedKinds(kindsOfEntry(same), kindsOfEntry(entry)) : kindsOfEntry(entry);
|
|
587
|
+
if (same && same.kind !== entry.kind)
|
|
588
|
+
invalid(`two provider entries disagree on the kind: ${describe(same)} and ${describe(entry)}`);
|
|
589
|
+
if (same && entry.imported === true && same.imported !== true)
|
|
590
|
+
invalid(`provider ${entry.name} is synced, so an entry cannot make it import-only`);
|
|
591
|
+
const merged = same ? {
|
|
592
|
+
...same,
|
|
593
|
+
...kinds.length > 1 ? { kinds } : {},
|
|
594
|
+
aliases: [.../* @__PURE__ */ new Set([...same.aliases, ...entry.aliases])],
|
|
595
|
+
...entry.command ? { command: entry.command } : {},
|
|
596
|
+
...entry.opens ? { opens: { ...same.opens, ...entry.opens } } : {}
|
|
597
|
+
} : entry;
|
|
598
|
+
const others = known.filter((one) => one !== same);
|
|
599
|
+
for (const word of wordsOf(merged)) {
|
|
600
|
+
const owner = others.find((one) => wordsOf(one).includes(word));
|
|
601
|
+
if (owner)
|
|
602
|
+
invalid(`"${word}" names two providers: ${describe(owner)} and ${describe(merged)}`);
|
|
568
603
|
}
|
|
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
|
-
}, "standingOf");
|
|
623
|
-
var isUsable = /* @__PURE__ */ __name((standing) => standing === "confirmed" || standing === "reported", "isUsable");
|
|
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");
|
|
604
|
+
return same ? known.map((one) => one === same ? merged : one) : [...known, merged];
|
|
605
|
+
}, "joined");
|
|
606
|
+
var registry = PROVIDERS;
|
|
607
|
+
var providers = /* @__PURE__ */ __name(() => registry, "providers");
|
|
608
|
+
var useProviders = /* @__PURE__ */ __name((entries) => {
|
|
609
|
+
registry = entries.map(providerEntryOf).reduce(joined, PROVIDERS);
|
|
610
|
+
}, "useProviders");
|
|
611
|
+
var useStoredProviders = /* @__PURE__ */ __name((entries) => {
|
|
612
|
+
const left = [];
|
|
613
|
+
registry = entries.reduce((known, entry) => {
|
|
614
|
+
try {
|
|
615
|
+
return joined(known, providerEntryOf(entry));
|
|
616
|
+
} catch (error) {
|
|
617
|
+
if (!(error instanceof CliError))
|
|
618
|
+
throw error;
|
|
619
|
+
left.push(entry);
|
|
620
|
+
return known;
|
|
621
|
+
}
|
|
622
|
+
}, PROVIDERS);
|
|
623
|
+
return left;
|
|
624
|
+
}, "useStoredProviders");
|
|
625
|
+
var addProvider = /* @__PURE__ */ __name((entry) => {
|
|
626
|
+
registry = joined(registry, providerEntryOf(entry));
|
|
627
|
+
}, "addProvider");
|
|
628
|
+
var isKind = /* @__PURE__ */ __name((word) => KINDS.includes(word.toLowerCase()), "isKind");
|
|
629
|
+
var providerNamed = /* @__PURE__ */ __name((word) => {
|
|
630
|
+
const wanted = word.toLowerCase();
|
|
631
|
+
return registry.find((entry) => wordsOf(entry).includes(wanted));
|
|
632
|
+
}, "providerNamed");
|
|
633
|
+
var kindIn = /* @__PURE__ */ __name((provider) => isFolderProvider(provider) ? "notes" : registry.find(({ name }) => name === provider)?.kind, "kindIn");
|
|
634
|
+
var kindsIn = /* @__PURE__ */ __name((provider) => {
|
|
635
|
+
if (isFolderProvider(provider))
|
|
636
|
+
return ["notes"];
|
|
637
|
+
const entry = registry.find(({ name }) => name === provider);
|
|
638
|
+
return entry ? kindsOfEntry(entry) : [];
|
|
639
|
+
}, "kindsIn");
|
|
640
|
+
var importedOf = /* @__PURE__ */ __name((entry, held) => {
|
|
641
|
+
const builtIn = PROVIDERS.find(({ name }) => name === entry.name);
|
|
642
|
+
if (builtIn) {
|
|
643
|
+
if (entry.imported === true && builtIn.imported !== true)
|
|
644
|
+
invalid(`provider ${entry.name} is synced, so an entry cannot make it import-only`);
|
|
645
|
+
return builtIn.imported === true;
|
|
646
|
+
}
|
|
647
|
+
if (held === void 0)
|
|
648
|
+
return entry.imported === true;
|
|
649
|
+
if (entry.imported === true && held.imported !== true)
|
|
650
|
+
invalid(`provider ${entry.name} was registered without imported: an entry cannot make it import-only later`);
|
|
651
|
+
return held.imported === true;
|
|
652
|
+
}, "importedOf");
|
|
653
|
+
var isImportedProvider = /* @__PURE__ */ __name((provider) => registry.find(({ name }) => name === provider)?.imported === true, "isImportedProvider");
|
|
654
|
+
var holdsKind = /* @__PURE__ */ __name((provider, kind2) => kindsIn(provider).includes(kind2), "holdsKind");
|
|
655
|
+
var holdsKindOf = /* @__PURE__ */ __name((provider, kind2) => kindIn(provider) === void 0 ? kind2 === "messages" : holdsKind(provider, kind2), "holdsKindOf");
|
|
656
|
+
var kindOf = /* @__PURE__ */ __name((provider) => kindIn(provider) ?? "messages", "kindOf");
|
|
641
657
|
|
|
642
658
|
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
659
|
CURRENCY_SCALES,
|
|
685
660
|
parseDecimal,
|
|
686
661
|
formatDecimal,
|
|
@@ -692,6 +667,11 @@ export {
|
|
|
692
667
|
moneyLabel,
|
|
693
668
|
quantityOf,
|
|
694
669
|
lineUnits,
|
|
670
|
+
DEAL_KINDS,
|
|
671
|
+
DEAL_STATUSES,
|
|
672
|
+
STAGE_OUTCOMES,
|
|
673
|
+
DEAL_ROLES,
|
|
674
|
+
dealLine,
|
|
695
675
|
INVOICE_DIRECTIONS,
|
|
696
676
|
INVOICE_STATUSES,
|
|
697
677
|
MONEY_DIRECTIONS,
|
|
@@ -701,27 +681,6 @@ export {
|
|
|
701
681
|
paymentLine,
|
|
702
682
|
invoiceTitle,
|
|
703
683
|
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
684
|
ORDER_STATUSES,
|
|
726
685
|
ORDER_PURPOSES,
|
|
727
686
|
orderLine,
|
|
@@ -729,6 +688,7 @@ export {
|
|
|
729
688
|
ORGANIZATION_ROLES,
|
|
730
689
|
PROJECT_ROLES,
|
|
731
690
|
CONTRACT_ROLES,
|
|
691
|
+
RELATED_ROLES,
|
|
732
692
|
ENGAGEMENT_LEVELS,
|
|
733
693
|
isEngagement,
|
|
734
694
|
checkEngagement,
|
|
@@ -748,9 +708,72 @@ export {
|
|
|
748
708
|
standingOf,
|
|
749
709
|
isUsable,
|
|
750
710
|
usableLink,
|
|
711
|
+
KEYED,
|
|
751
712
|
notOverriddenSql,
|
|
752
713
|
usableLinkSql,
|
|
714
|
+
CRM_KINDS,
|
|
715
|
+
CRM_ACTIVITY_KINDS,
|
|
716
|
+
isCrmUserId,
|
|
717
|
+
normalCrmUserId,
|
|
718
|
+
isItemKind,
|
|
719
|
+
CATALOG_KINDS,
|
|
720
|
+
BUSINESS_KINDS,
|
|
721
|
+
CONTRACT_KINDS,
|
|
722
|
+
CONTRACT_STATUSES,
|
|
723
|
+
PERIOD_UNITS,
|
|
724
|
+
SUBSCRIPTION_STATUSES,
|
|
725
|
+
WALLET_KINDS,
|
|
726
|
+
TRANSACTION_STATUSES,
|
|
727
|
+
ORDER_DIRECTIONS,
|
|
728
|
+
intervalOf,
|
|
729
|
+
intervalText,
|
|
730
|
+
productLine,
|
|
731
|
+
contractLine,
|
|
732
|
+
subscriptionLine,
|
|
733
|
+
walletLine,
|
|
734
|
+
transactionLine,
|
|
753
735
|
TAG_TYPES,
|
|
754
736
|
tagOf,
|
|
755
|
-
normalizeTag
|
|
737
|
+
normalizeTag,
|
|
738
|
+
formatLocator,
|
|
739
|
+
isLocator,
|
|
740
|
+
parseLocator,
|
|
741
|
+
SIMPLE_REFERENCES,
|
|
742
|
+
REF_KINDS,
|
|
743
|
+
formatReference,
|
|
744
|
+
parseReference,
|
|
745
|
+
canonicalReference,
|
|
746
|
+
looksLikeReference,
|
|
747
|
+
KINDS,
|
|
748
|
+
CRM_OPENS,
|
|
749
|
+
PROVIDERS,
|
|
750
|
+
providerLabel,
|
|
751
|
+
FOLDER_PROVIDERS,
|
|
752
|
+
isFolderProvider,
|
|
753
|
+
folderProviderSql,
|
|
754
|
+
folderProviderOf,
|
|
755
|
+
DOCUMENT_ACCOUNT_PROVIDERS,
|
|
756
|
+
isDocumentAccountProvider,
|
|
757
|
+
ADDED_PROVIDER,
|
|
758
|
+
ADDED_ACCOUNT,
|
|
759
|
+
notAdded,
|
|
760
|
+
filesAccountSql,
|
|
761
|
+
INTERNAL_NOTES,
|
|
762
|
+
UNKNOWN_PROVIDER,
|
|
763
|
+
providerEntryOf,
|
|
764
|
+
kindsOfEntry,
|
|
765
|
+
unitedKinds,
|
|
766
|
+
providers,
|
|
767
|
+
useProviders,
|
|
768
|
+
useStoredProviders,
|
|
769
|
+
addProvider,
|
|
770
|
+
isKind,
|
|
771
|
+
providerNamed,
|
|
772
|
+
kindIn,
|
|
773
|
+
kindsIn,
|
|
774
|
+
importedOf,
|
|
775
|
+
isImportedProvider,
|
|
776
|
+
holdsKind,
|
|
777
|
+
holdsKindOf,
|
|
778
|
+
kindOf
|
|
756
779
|
};
|