@wirecat/bitrix24-cli 0.3.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +130 -0
- package/README.md +84 -9
- package/dist/api-keys.d.ts +36 -9
- package/dist/api-keys.d.ts.map +1 -1
- package/dist/api-keys.js +139 -19
- package/dist/api-keys.js.map +1 -1
- package/dist/bin/b24.js +2 -2
- package/dist/bitrix/errors.js +1 -1
- package/dist/bitrix/errors.js.map +1 -1
- package/dist/bitrix/methods.d.ts.map +1 -1
- package/dist/bitrix/methods.js +7 -3
- package/dist/bitrix/methods.js.map +1 -1
- package/dist/bitrix/transport.d.ts +4 -7
- package/dist/bitrix/transport.d.ts.map +1 -1
- package/dist/bitrix/transport.js +29 -19
- package/dist/bitrix/transport.js.map +1 -1
- package/dist/body.d.ts +14 -0
- package/dist/body.d.ts.map +1 -0
- package/dist/body.js +44 -0
- package/dist/body.js.map +1 -0
- package/dist/bundle/{chunk-QIPTIUMJ.js → all-profiles-CANIDIDS.js} +12 -7
- package/dist/bundle/{anthropic-RHRAVHC2.js → anthropic-JUJB4DCF.js} +5 -5
- package/dist/bundle/{app-server-QIT6S7AZ.js → app-server-3V5Z4PTK.js} +68 -54
- package/dist/bundle/b24.js +18 -12
- package/dist/bundle/{bun-H6RSODZ3.js → bun-LKMV5TY7.js} +2 -2
- package/dist/bundle/{bun-sqlite-BO4LTQHX.js → bun-sqlite-S56EF74S.js} +3 -3
- package/dist/bundle/{chunk-D5S6QV6R.js → chunk-2I4KWS3H.js} +6 -6
- package/dist/bundle/chunk-36PO5NWY.js +147 -0
- package/dist/bundle/{chunk-ZIAQPTUS.js → chunk-42F7Q7V6.js} +3 -3
- package/dist/bundle/{chunk-6WY72XVQ.js → chunk-4D3K6GZW.js} +18 -4
- package/dist/bundle/chunk-5D4MJQ6X.js +22 -0
- package/dist/bundle/chunk-5JOPERVF.js +84 -0
- package/dist/bundle/chunk-6A4UPWDC.js +15 -0
- package/dist/bundle/{chunk-P33NDCDI.js → chunk-6MGWIZG4.js} +1 -1
- package/dist/bundle/{chunk-ZDQQCXFG.js → chunk-6YJTNZ7U.js} +13 -13
- package/dist/bundle/{chunk-MBDK4YXG.js → chunk-7FBFJ6B4.js} +4 -2
- package/dist/bundle/chunk-7VCMOTQP.js +55 -0
- package/dist/bundle/{chunk-P364PLIK.js → chunk-A5IMMGYU.js} +36 -34
- package/dist/bundle/{chunk-45AKJVKV.js → chunk-ASEHTBNK.js} +1 -1
- package/dist/bundle/{chunk-HGL63O5V.js → chunk-B6LPJYPQ.js} +2 -2
- package/dist/bundle/{chunk-LSPIOT6Z.js → chunk-BHEE2K6C.js} +7 -7
- package/dist/bundle/chunk-BYZQBE63.js +971 -0
- package/dist/bundle/{program-H3TGGRQ6.js → chunk-COKGNTDQ.js} +15761 -16685
- package/dist/bundle/{chunk-XJXONOB5.js → chunk-DVFYRQGE.js} +1 -1
- package/dist/bundle/{chunk-FLUEXJ4X.js → chunk-DVSIBZ3G.js} +1 -1
- package/dist/bundle/chunk-EJEIXC6Y.js +273 -0
- package/dist/bundle/chunk-EYTGCM44.js +130 -0
- package/dist/bundle/{chunk-IRV2PCQ2.js → chunk-EYYOKT23.js} +26 -26
- package/dist/bundle/{chunk-PH5FZX6E.js → chunk-FCWPIWSR.js} +2 -2
- package/dist/bundle/{chunk-YZ5LHE5Q.js → chunk-FSWRMQWX.js} +2 -2
- package/dist/bundle/{chunk-ADLS6FVG.js → chunk-FXBHOCJK.js} +1 -1
- package/dist/bundle/chunk-G5MW6RCM.js +723 -0
- package/dist/bundle/{chunk-VEWWAGTD.js → chunk-GLTKRLFT.js} +8 -8
- package/dist/bundle/chunk-GUUZQ7NE.js +581 -0
- package/dist/bundle/{chunk-QSNROIJL.js → chunk-H6RIPOOI.js} +42 -9
- package/dist/bundle/{chunk-H2ADPPSH.js → chunk-HGFNC4CR.js} +1819 -597
- package/dist/bundle/{chunk-7GRZAKBB.js → chunk-IERYD2N2.js} +6 -6
- package/dist/bundle/{chunk-N6FLBXZS.js → chunk-IGCLMEMB.js} +3 -3
- package/dist/bundle/{chunk-U5ACMCAQ.js → chunk-J7WCSZ2Q.js} +411 -919
- package/dist/bundle/{chunk-W5YAO5G5.js → chunk-JZYHQ4HB.js} +9 -4
- package/dist/bundle/{chunk-EVYSBZ3I.js → chunk-K4QM3X5F.js} +4 -4
- package/dist/bundle/{chunk-DTXERR44.js → chunk-KFSMY7SZ.js} +2 -2
- package/dist/bundle/{chunk-LRGYKOCP.js → chunk-KPEDH5T4.js} +1 -1
- package/dist/bundle/{chunk-XRFJWHY5.js → chunk-KUY7LII2.js} +4 -4
- package/dist/bundle/{chunk-QC53QBNC.js → chunk-LFXDHLFR.js} +3 -3
- package/dist/bundle/{chunk-CNNEA2M4.js → chunk-LGLT4JB6.js} +3 -3
- package/dist/bundle/{chunk-QGMDQ2PM.js → chunk-LM4OOBAW.js} +3 -3
- package/dist/bundle/chunk-M74BSKMA.js +234 -0
- package/dist/bundle/{chunk-2KCZ7BKW.js → chunk-MMMT6ORT.js} +11 -11
- package/dist/bundle/{chunk-WII44RXN.js → chunk-NGYD6QTE.js} +2 -2
- package/dist/bundle/{chunk-FOTREPNS.js → chunk-NO6QOPVT.js} +10 -19
- package/dist/bundle/chunk-O6XC7DZI.js +804 -0
- package/dist/bundle/chunk-OE3NFB53.js +64 -0
- package/dist/bundle/{chunk-XD4FRDSL.js → chunk-OUMFNB34.js} +13 -149
- package/dist/bundle/{chunk-ZGZT5S6B.js → chunk-P2RQTNVJ.js} +806 -850
- package/dist/bundle/{chunk-RRJNNPR4.js → chunk-PBIBGIZ7.js} +1 -1
- package/dist/bundle/{chunk-EXOOKUEA.js → chunk-Q6VQHTRW.js} +2 -2
- package/dist/bundle/{chunk-TE3FR6MI.js → chunk-QHBCNVUG.js} +5 -5
- package/dist/bundle/{chunk-SGRYYE4X.js → chunk-QNOXAQ6Y.js} +4 -4
- package/dist/bundle/{chunk-QQXH2OPB.js → chunk-R5F2O5GX.js} +15 -272
- package/dist/bundle/{chunk-SFRNX2TI.js → chunk-R5PBSKJL.js} +1 -1
- package/dist/bundle/{chunk-OTD2ZRXD.js → chunk-RS2BARUU.js} +4 -4
- package/dist/bundle/chunk-TG3DSPT5.js +14 -0
- package/dist/bundle/{chunk-BCF7P4FZ.js → chunk-U22JMKUO.js} +6 -125
- package/dist/bundle/chunk-U66Q5TVK.js +106 -0
- package/dist/bundle/{chunk-QMPN6WKD.js → chunk-UCHMQWON.js} +211 -89
- package/dist/bundle/{chunk-POC3V3AO.js → chunk-VMJS7FJZ.js} +526 -467
- package/dist/bundle/{chunk-FZL7F5NR.js → chunk-VMVAQHDC.js} +77 -615
- package/dist/bundle/{chunk-K3UIB6ZF.js → chunk-WWMCJFMT.js} +2 -2
- package/dist/bundle/{chunk-CXL33BFL.js → chunk-XTA5TN3H.js} +1 -1
- package/dist/bundle/{chunk-WTPMJYMD.js → chunk-XUHHBEA7.js} +652 -131
- package/dist/bundle/{chunk-WKRQ44EH.js → chunk-YDZHO4LT.js} +13 -13
- package/dist/bundle/{chunk-2SNUMZ7S.js → chunk-ZKINZFIT.js} +6 -6
- package/dist/bundle/{chunk-HAXNUIGQ.js → chunk-ZSQXSIFQ.js} +89 -39
- package/dist/bundle/{chunk-YYO7D2MO.js → chunk-ZZEHDIEG.js} +58 -54
- package/dist/bundle/command-contract-OQV6H7SR.js +36 -0
- package/dist/bundle/{decode-5ZPLTYV6.js → decode-QSTBX4MG.js} +3 -3
- package/dist/bundle/{echarts-J6LAPIX7.js → echarts-JZELFH2N.js} +2 -2
- package/dist/bundle/{embed-YG5LDHME.js → embed-4RIW2LVH.js} +4 -4
- package/dist/bundle/{embedder-7FNUA5OZ.js → embedder-SW7DTWSL.js} +7 -7
- package/dist/bundle/{first-run-JPZNWIJN.js → first-run-7AISOSOM.js} +8 -8
- package/dist/bundle/first-screen-NMHNFZ2B.js +34 -0
- package/dist/bundle/{instructions-AXWTQHMR.js → instructions-BZE5YUGG.js} +1 -1
- package/dist/bundle/{mcp-7F46P6AM.js → mcp-SDWHDJTY.js} +2 -2
- package/dist/bundle/{node-P4E63KXA.js → node-KM3CUABH.js} +9 -9
- package/dist/bundle/{node-CWKAIOEM.js → node-LTKZIO4U.js} +2 -2
- package/dist/bundle/{node-sqlite-LSEKVRDA.js → node-sqlite-HQ5PN2RH.js} +4 -4
- package/dist/bundle/{oauth-THYNLRLD.js → oauth-UH6FOZQL.js} +5 -5
- package/dist/bundle/{open-E47QYKFC.js → open-TSUP3XGL.js} +3 -3
- package/dist/bundle/{openai-EWSGC3BC.js → openai-GVEE52E3.js} +14 -14
- package/dist/bundle/{process-WKTEA3WE.js → process-AGXY76ZE.js} +1 -1
- package/dist/bundle/program-BI4A4HFJ.js +2247 -0
- package/dist/bundle/{prompt-CAQ7QR3U.js → prompt-NRSUY7FA.js} +3 -3
- package/dist/bundle/{recognize-6KGHNZC3.js → recognize-NPDPQ6PJ.js} +2 -2
- package/dist/bundle/{remote-3UO2WDC3.js → remote-HFASMVLB.js} +5 -5
- package/dist/bundle/{rerank-2JVDPZBX.js → rerank-TL6Z6F7K.js} +5 -5
- package/dist/bundle/{chunk-VL6SPMZV.js → serve-VB4DHDZQ.js} +8 -6
- package/dist/bundle/server-T5EDRPJI.js +68 -0
- package/dist/bundle/{chunk-ZEW4P6AH.js → server-Z6MW6C37.js} +50 -14
- package/dist/bundle/source-4IGO5J7E.js +237 -0
- package/dist/bundle/sqlite-runtime-YS4POY3W.js +17 -0
- package/dist/bundle/{state-7NH5G4XJ.js → state-ISZVVZGR.js} +4 -4
- package/dist/bundle/store-IZJBAKJV.js +58 -0
- package/dist/bundle/{store-7O4JQD2Z.js → store-L76MSQC3.js} +17 -12
- package/dist/bundle/store-PBTIB7BD.js +207 -0
- package/dist/bundle/store-maintenance-command-YFKII7TF.js +58 -0
- package/dist/bundle/writer-3O5EYMFE.js +214 -0
- package/dist/commands/api.d.ts.map +1 -1
- package/dist/commands/api.js +81 -30
- package/dist/commands/api.js.map +1 -1
- package/dist/commands/crm-shared.d.ts +4 -0
- package/dist/commands/crm-shared.d.ts.map +1 -0
- package/dist/commands/crm-shared.js +94 -0
- package/dist/commands/crm-shared.js.map +1 -0
- package/dist/commands/crm-writes.d.ts +0 -1
- package/dist/commands/crm-writes.d.ts.map +1 -1
- package/dist/commands/crm-writes.js +43 -88
- package/dist/commands/crm-writes.js.map +1 -1
- package/dist/commands/crm.d.ts.map +1 -1
- package/dist/commands/crm.js +30 -48
- package/dist/commands/crm.js.map +1 -1
- package/dist/commands/session.d.ts.map +1 -1
- package/dist/commands/session.js +1 -0
- package/dist/commands/session.js.map +1 -1
- package/dist/commands/write.d.ts +6 -6
- package/dist/commands/write.d.ts.map +1 -1
- package/dist/commands/write.js +11 -18
- package/dist/commands/write.js.map +1 -1
- package/dist/config.d.ts +0 -5
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +6 -8
- package/dist/config.js.map +1 -1
- package/dist/crm/capabilities.d.ts +7 -0
- package/dist/crm/capabilities.d.ts.map +1 -0
- package/dist/crm/capabilities.js +7 -0
- package/dist/crm/capabilities.js.map +1 -0
- package/dist/crm/conditions.d.ts +1 -1
- package/dist/crm/conditions.d.ts.map +1 -1
- package/dist/crm/conditions.js +4 -6
- package/dist/crm/conditions.js.map +1 -1
- package/dist/crm/custom-query.d.ts +19 -0
- package/dist/crm/custom-query.d.ts.map +1 -0
- package/dist/crm/custom-query.js +79 -0
- package/dist/crm/custom-query.js.map +1 -0
- package/dist/crm/deal.d.ts +4 -27
- package/dist/crm/deal.d.ts.map +1 -1
- package/dist/crm/deal.js +15 -48
- package/dist/crm/deal.js.map +1 -1
- package/dist/crm/fields.d.ts +20 -0
- package/dist/crm/fields.d.ts.map +1 -0
- package/dist/crm/fields.js +78 -0
- package/dist/crm/fields.js.map +1 -0
- package/dist/crm/items.d.ts +7 -1
- package/dist/crm/items.d.ts.map +1 -1
- package/dist/crm/items.js +21 -18
- package/dist/crm/items.js.map +1 -1
- package/dist/crm/lead.d.ts +5 -36
- package/dist/crm/lead.d.ts.map +1 -1
- package/dist/crm/lead.js +15 -61
- package/dist/crm/lead.js.map +1 -1
- package/dist/crm/organization.d.ts +1 -0
- package/dist/crm/organization.d.ts.map +1 -1
- package/dist/crm/person.d.ts +1 -0
- package/dist/crm/person.d.ts.map +1 -1
- package/dist/crm/pipelines.d.ts +5 -0
- package/dist/crm/pipelines.d.ts.map +1 -0
- package/dist/crm/pipelines.js +54 -0
- package/dist/crm/pipelines.js.map +1 -0
- package/dist/crm/product.d.ts.map +1 -1
- package/dist/crm/product.js +2 -2
- package/dist/crm/product.js.map +1 -1
- package/dist/crm/rest3-fields.d.ts +3 -0
- package/dist/crm/rest3-fields.d.ts.map +1 -0
- package/dist/crm/rest3-fields.js +38 -0
- package/dist/crm/rest3-fields.js.map +1 -0
- package/dist/crm/source.d.ts +15 -0
- package/dist/crm/source.d.ts.map +1 -0
- package/dist/crm/source.js +122 -0
- package/dist/crm/source.js.map +1 -0
- package/dist/crm/user.d.ts.map +1 -1
- package/dist/crm/user.js +2 -2
- package/dist/crm/user.js.map +1 -1
- package/dist/crm/values.d.ts +26 -5
- package/dist/crm/values.d.ts.map +1 -1
- package/dist/crm/values.js +40 -5
- package/dist/crm/values.js.map +1 -1
- package/dist/crm/writer.d.ts +9 -0
- package/dist/crm/writer.d.ts.map +1 -0
- package/dist/crm/writer.js +119 -0
- package/dist/crm/writer.js.map +1 -0
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +53 -5
- package/dist/program.js.map +1 -1
- package/dist/reasons.d.ts.map +1 -1
- package/dist/reasons.js +6 -1
- package/dist/reasons.js.map +1 -1
- package/dist/store.d.ts +15 -0
- package/dist/store.d.ts.map +1 -0
- package/dist/store.js +33 -0
- package/dist/store.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +4 -6
- package/skills/bitrix24-cli/SKILL.md +16 -10
- package/dist/bundle/all-profiles-QJ444GSX.js +0 -24
- package/dist/bundle/chunk-XNHSPHUN.js +0 -48
- package/dist/bundle/command-contract-OKQOE6G4.js +0 -30
- package/dist/bundle/first-screen-VQM4MTS7.js +0 -28
- package/dist/bundle/mcp-5RSWNTHS.js +0 -160
- package/dist/bundle/mcp-J5R5A65I.js +0 -87
- package/dist/bundle/serve-ES7AG5IK.js +0 -19
- package/dist/bundle/server-5LE5LNUQ.js +0 -45
- package/dist/bundle/server-BU4VBM6S.js +0 -58
- package/dist/bundle/store-maintenance-command-UDVGEY2D.js +0 -47
- package/dist/commands/doctor.d.ts +0 -77
- package/dist/commands/doctor.d.ts.map +0 -1
- package/dist/commands/doctor.js +0 -74
- package/dist/commands/doctor.js.map +0 -1
- package/dist/commands/mcp.d.ts +0 -3
- package/dist/commands/mcp.d.ts.map +0 -1
- package/dist/commands/mcp.js +0 -97
- package/dist/commands/mcp.js.map +0 -1
- package/dist/crm/pipeline.d.ts +0 -17
- package/dist/crm/pipeline.d.ts.map +0 -1
- package/dist/crm/pipeline.js +0 -42
- package/dist/crm/pipeline.js.map +0 -1
- package/dist/crm/stage.d.ts +0 -20
- package/dist/crm/stage.d.ts.map +0 -1
- package/dist/crm/stage.js +0 -65
- package/dist/crm/stage.js.map +0 -1
- package/dist/mcp.d.ts +0 -29
- package/dist/mcp.d.ts.map +0 -1
- package/dist/mcp.js +0 -99
- package/dist/mcp.js.map +0 -1
- /package/dist/bundle/{chunk-4PDYYS5K.js → chunk-ZQ3GWKDQ.js} +0 -0
|
@@ -34,136 +34,106 @@ import {
|
|
|
34
34
|
union,
|
|
35
35
|
variant,
|
|
36
36
|
visibleControls
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-EYYOKT23.js";
|
|
38
38
|
import {
|
|
39
39
|
__name
|
|
40
40
|
} from "./chunk-ZVVMGPBJ.js";
|
|
41
41
|
|
|
42
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43
|
-
var
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
};
|
|
79
|
-
var
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
const
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
if (paid <= 0)
|
|
136
|
-
return "issued";
|
|
137
|
-
return paid < total ? "partly_paid" : "paid";
|
|
138
|
-
}, "settledStatus");
|
|
139
|
-
var dayMonth = /* @__PURE__ */ __name((date) => date === null ? null : `${date.slice(8, 10)}.${date.slice(5, 7)}`, "dayMonth");
|
|
140
|
-
var notes = /* @__PURE__ */ __name((...words2) => {
|
|
141
|
-
const kept = words2.filter((word) => word !== null);
|
|
142
|
-
return kept.length === 0 ? "" : ` (${kept.join(", ")})`;
|
|
143
|
-
}, "notes");
|
|
144
|
-
var invoiceLine = /* @__PURE__ */ __name((invoice) => {
|
|
145
|
-
const party = invoice.counterpartyName === null ? "" : `${invoice.direction === "receivable" ? " to" : " from"} ${invoice.counterpartyName}`;
|
|
146
|
-
const due = invoice.dueDate === null ? "" : `, due ${dayMonth(invoice.dueDate)}`;
|
|
147
|
-
return `${invoice.number ?? `#${invoice.id}`} \xB7 ${moneyLabel(invoice.total, invoice.currency)}${party}${due}` + notes(invoice.status.replace("_", " "), invoice.review === "confirmed" ? null : invoice.review);
|
|
148
|
-
}, "invoiceLine");
|
|
149
|
-
var paymentLine = /* @__PURE__ */ __name((payment) => {
|
|
150
|
-
const party = payment.partyName === null ? "" : `${payment.direction === "in" ? " from" : " to"} ${payment.partyName}`;
|
|
151
|
-
return `${moneyLabel(payment.amount, payment.currency)}${party}, ${dayMonth(payment.date)}` + notes(payment.review === "confirmed" ? null : payment.review);
|
|
152
|
-
}, "paymentLine");
|
|
153
|
-
var invoiceTitle = /* @__PURE__ */ __name((invoice) => `Invoice ${invoiceLine(invoice)}`, "invoiceTitle");
|
|
154
|
-
var paymentEntryTitle = /* @__PURE__ */ __name((payment) => `Payment \xB7 ${paymentLine(payment)}`, "paymentEntryTitle");
|
|
155
|
-
|
|
156
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.586.0_@wirecat+cli-base@0.79.0_commander@15.0.0_esbuild@0.28.2_type_bdecddef0ae5a50ae90cab8b9e35c13b/node_modules/@wirecat/cli-core/dist/domain/orders.js
|
|
157
|
-
var ORDER_STATUSES = ["placed", "shipped", "delivered", "cancelled", "returned"];
|
|
158
|
-
var ORDER_PURPOSES = ["personal", "business", "client", "other"];
|
|
159
|
-
var orderLine = /* @__PURE__ */ __name((order) => {
|
|
160
|
-
const money = order.total === null || order.currency === null ? "" : `, ${moneyLabel(order.total, order.currency)}`;
|
|
161
|
-
const notes2 = [order.status, order.review === "confirmed" ? null : order.review].filter(Boolean).join(", ");
|
|
162
|
-
return `${order.number ?? `#${order.id}`} \xB7 ${order.supplierName}${money} (${notes2})`;
|
|
163
|
-
}, "orderLine");
|
|
164
|
-
var orderTitle = /* @__PURE__ */ __name((order) => `Order ${orderLine(order)}`, "orderTitle");
|
|
42
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/meetings/payment.js
|
|
43
|
+
var FACT_TYPES = ["fact", "statement", "question", "decision", "promise"];
|
|
44
|
+
var PAYMENT_DIRECTIONS = ["to_us", "from_us"];
|
|
45
|
+
var PAYMENT_STATES = ["expected", "paid", "cancelled"];
|
|
46
|
+
var invalid = /* @__PURE__ */ __name((message) => {
|
|
47
|
+
throw new CliError("validation_error", message);
|
|
48
|
+
}, "invalid");
|
|
49
|
+
var CURRENCIES = new Set(Intl.supportedValuesOf("currency"));
|
|
50
|
+
var AMOUNT = /^(\d{1,15})(?:\.(\d{1,2}))?$/;
|
|
51
|
+
var COUNTERPARTY = /^(person|organization|project):[1-9]\d*$/;
|
|
52
|
+
var amountOf = /* @__PURE__ */ __name((value) => {
|
|
53
|
+
const match = AMOUNT.exec(typeof value === "number" ? String(value) : typeof value === "string" ? value.trim() : "");
|
|
54
|
+
if (!match)
|
|
55
|
+
return invalid("a payment's amount is a positive number with at most 2 decimals, such as 1200.50");
|
|
56
|
+
const amount = `${BigInt(match[1] ?? "0")}.${(match[2] ?? "").padEnd(2, "0")}`;
|
|
57
|
+
if (amount === "0.00")
|
|
58
|
+
return invalid("a payment's amount is more than 0");
|
|
59
|
+
return amount;
|
|
60
|
+
}, "amountOf");
|
|
61
|
+
var dateOf = /* @__PURE__ */ __name((value) => {
|
|
62
|
+
const date = typeof value === "string" ? value.trim() : "";
|
|
63
|
+
if (!/^\d{4}-\d{2}-\d{2}$/.test(date) || (/* @__PURE__ */ new Date(`${date}T00:00:00Z`)).toISOString().slice(0, 10) !== date)
|
|
64
|
+
return invalid("a payment's dates are ISO dates, such as 2026-10-31");
|
|
65
|
+
return date;
|
|
66
|
+
}, "dateOf");
|
|
67
|
+
var optionalText = /* @__PURE__ */ __name((value, what, limit) => {
|
|
68
|
+
if (value === void 0 || value === null)
|
|
69
|
+
return null;
|
|
70
|
+
if (typeof value !== "string" || !value.trim() || value.length > limit || value.includes("\0"))
|
|
71
|
+
return invalid(`a payment's ${what} takes 1\u2013${limit} characters`);
|
|
72
|
+
return value.trim();
|
|
73
|
+
}, "optionalText");
|
|
74
|
+
var oneOf = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
75
|
+
if (typeof value !== "string" || !allowed.includes(value))
|
|
76
|
+
return invalid(`a payment's ${what} is one of ${allowed.join(", ")}`);
|
|
77
|
+
return value;
|
|
78
|
+
}, "oneOf");
|
|
79
|
+
var FIELDS = [
|
|
80
|
+
"amount",
|
|
81
|
+
"currency",
|
|
82
|
+
"direction",
|
|
83
|
+
"counterparty",
|
|
84
|
+
"counterparty_name",
|
|
85
|
+
"due_at",
|
|
86
|
+
"state",
|
|
87
|
+
"item",
|
|
88
|
+
"paid_at"
|
|
89
|
+
];
|
|
90
|
+
var validatePayment = /* @__PURE__ */ __name((input) => {
|
|
91
|
+
if (!input || typeof input !== "object" || Array.isArray(input))
|
|
92
|
+
return invalid("a payment is an object");
|
|
93
|
+
const raw = input;
|
|
94
|
+
const unknown = Object.keys(raw).filter((key) => !FIELDS.includes(key));
|
|
95
|
+
if (unknown.length)
|
|
96
|
+
return invalid(`a payment has no field ${unknown.join(", ")}; its fields are ${FIELDS.join(", ")}`);
|
|
97
|
+
const currency = typeof raw.currency === "string" ? raw.currency.trim().toUpperCase() : "";
|
|
98
|
+
if (!/^[A-Z]{3}$/.test(currency) || !CURRENCIES.has(currency))
|
|
99
|
+
return invalid("a payment's currency is an ISO 4217 code, such as EUR or RUB");
|
|
100
|
+
const counterparty = optionalText(raw.counterparty, "counterparty", 80);
|
|
101
|
+
if (counterparty !== null && !COUNTERPARTY.test(counterparty))
|
|
102
|
+
return invalid("a payment's counterparty is a person:, organization: or project: reference");
|
|
103
|
+
const state = oneOf(raw.state, PAYMENT_STATES, "state");
|
|
104
|
+
if (raw.paid_at != null && state !== "paid")
|
|
105
|
+
return invalid("only a paid payment has paid_at");
|
|
106
|
+
return {
|
|
107
|
+
amount: amountOf(raw.amount),
|
|
108
|
+
currency,
|
|
109
|
+
direction: oneOf(raw.direction, PAYMENT_DIRECTIONS, "direction"),
|
|
110
|
+
counterparty,
|
|
111
|
+
counterparty_name: optionalText(raw.counterparty_name, "counterparty name", 200),
|
|
112
|
+
due_at: raw.due_at === void 0 || raw.due_at === null ? null : dateOf(raw.due_at),
|
|
113
|
+
state,
|
|
114
|
+
item: optionalText(raw.item, "item", 200),
|
|
115
|
+
// Left out when absent, so a finding staged before the field keeps its fingerprint.
|
|
116
|
+
...raw.paid_at == null ? {} : { paid_at: dateOf(raw.paid_at) }
|
|
117
|
+
};
|
|
118
|
+
}, "validatePayment");
|
|
119
|
+
var grouped = /* @__PURE__ */ __name((amount) => {
|
|
120
|
+
const [whole = "0", cents = "00"] = amount.split(".");
|
|
121
|
+
const digits = whole.replace(/\B(?=(\d{3})+(?!\d))/g, " ");
|
|
122
|
+
return cents === "00" ? digits : `${digits}.${cents}`;
|
|
123
|
+
}, "grouped");
|
|
124
|
+
var paymentTitle = /* @__PURE__ */ __name((fact) => {
|
|
125
|
+
const payment = fact.payment;
|
|
126
|
+
if (!payment)
|
|
127
|
+
return "";
|
|
128
|
+
const who = payment.counterparty_name ?? payment.counterparty;
|
|
129
|
+
const way = payment.direction === "to_us" ? "to us" : "from us";
|
|
130
|
+
const party = who === null ? "" : payment.direction === "to_us" ? ` from ${who}` : ` to ${who}`;
|
|
131
|
+
const due = payment.due_at === null ? "" : `, due ${payment.due_at.slice(8, 10)}.${payment.due_at.slice(5, 7)}`;
|
|
132
|
+
const item = payment.item === null ? "" : ` for ${payment.item}`;
|
|
133
|
+
return `${grouped(payment.amount)} ${payment.currency} ${way}${party}${item}${due} (${payment.state})`;
|
|
134
|
+
}, "paymentTitle");
|
|
165
135
|
|
|
166
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
136
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/types.js
|
|
167
137
|
var QUERY_LIMITS = {
|
|
168
138
|
bytes: 8192,
|
|
169
139
|
depth: 32,
|
|
@@ -207,7 +177,7 @@ function queryError(reason, span, alternative, context3 = {}, details = {}) {
|
|
|
207
177
|
__name(queryError, "queryError");
|
|
208
178
|
var walkQuery = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? [node] : node.clauses.flatMap(({ node: node2 }) => walkQuery(node2)), "walkQuery");
|
|
209
179
|
|
|
210
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
180
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/dates.js
|
|
211
181
|
var timezoneOf = /* @__PURE__ */ __name((given) => {
|
|
212
182
|
const zone = given ?? Intl.DateTimeFormat().resolvedOptions().timeZone ?? "UTC";
|
|
213
183
|
try {
|
|
@@ -352,7 +322,62 @@ var dateRange = /* @__PURE__ */ __name((lower, upper, lowerInclusive, upperInclu
|
|
|
352
322
|
};
|
|
353
323
|
}, "dateRange");
|
|
354
324
|
|
|
355
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
325
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/evaluate.js
|
|
326
|
+
var wordsOf = /* @__PURE__ */ __name((text5) => text5.toLowerCase().match(/[\p{L}\p{N}]+/gu) ?? [], "wordsOf");
|
|
327
|
+
var pattern = /* @__PURE__ */ __name((value) => new RegExp(`^${[...value].map((char) => char === "*" ? ".*" : char === "?" ? "." : char.replace(/[.+^${}()|[\]\\]/, "\\$&")).join("")}$`, "iu"), "pattern");
|
|
328
|
+
var present = /* @__PURE__ */ __name((value) => value !== void 0 && value !== null && value !== "", "present");
|
|
329
|
+
var matchOne = /* @__PURE__ */ __name((field, node, value, options) => {
|
|
330
|
+
if (!present(value))
|
|
331
|
+
return false;
|
|
332
|
+
if (node.operator === "wildcard" && node.value === "*")
|
|
333
|
+
return true;
|
|
334
|
+
const text5 = String(value);
|
|
335
|
+
switch (field.type) {
|
|
336
|
+
case "txt": {
|
|
337
|
+
const words2 = wordsOf(text5);
|
|
338
|
+
if (node.operator === "wildcard")
|
|
339
|
+
return words2.some((word) => pattern(node.value).test(word));
|
|
340
|
+
const wanted = wordsOf(node.value);
|
|
341
|
+
return words2.some((_, at) => wanted.every((word, offset) => words2[at + offset] === word));
|
|
342
|
+
}
|
|
343
|
+
case "num": {
|
|
344
|
+
const number2 = Number(value);
|
|
345
|
+
if (node.operator !== "range")
|
|
346
|
+
return number2 === Number(node.value);
|
|
347
|
+
const { value: lower, upper = "*", lower_inclusive: lowerInclusive, upper_inclusive: upperInclusive } = node;
|
|
348
|
+
return (lower === "*" || (lowerInclusive ? number2 >= Number(lower) : number2 > Number(lower))) && (upper === "*" || (upperInclusive ? number2 <= Number(upper) : number2 < Number(upper)));
|
|
349
|
+
}
|
|
350
|
+
case "time": {
|
|
351
|
+
const time = Date.parse(text5);
|
|
352
|
+
const [lower, upper, lowerInclusive, upperInclusive] = node.operator === "range" ? [node.value, node.upper ?? "*", node.lower_inclusive ?? true, node.upper_inclusive ?? true] : [node.value, node.value, true, true];
|
|
353
|
+
const range = dateRange(lower, upper, lowerInclusive, upperInclusive, options.zone ?? "UTC", node.span, options.now);
|
|
354
|
+
return (range.lower === void 0 || (range.lower_inclusive ? time >= range.lower : time > range.lower)) && (range.upper === void 0 || (range.upper_inclusive ? time <= range.upper : time < range.upper));
|
|
355
|
+
}
|
|
356
|
+
default:
|
|
357
|
+
return node.operator === "wildcard" ? pattern(node.value).test(text5) : text5.toLowerCase() === node.value.toLowerCase();
|
|
358
|
+
}
|
|
359
|
+
}, "matchOne");
|
|
360
|
+
var matches = /* @__PURE__ */ __name((node, item, byName, options) => {
|
|
361
|
+
if (node.kind === "boolean") {
|
|
362
|
+
const by = /* @__PURE__ */ __name((occur) => node.clauses.filter((clause) => clause.occur === occur), "by");
|
|
363
|
+
const [must, should, mustNot] = [by("must"), by("should"), by("must_not")];
|
|
364
|
+
const holds = /* @__PURE__ */ __name((clause) => matches(clause.node, item, byName, options), "holds");
|
|
365
|
+
return must.every(holds) && !mustNot.some(holds) && (should.length === 0 || must.length > 0 || should.some(holds));
|
|
366
|
+
}
|
|
367
|
+
const field = byName.get(node.field);
|
|
368
|
+
if (!field)
|
|
369
|
+
throw new Error(`evaluate: no field "${node.field}"; validate the query first`);
|
|
370
|
+
if (field.relation !== void 0) {
|
|
371
|
+
if (!options.relation)
|
|
372
|
+
throw new Error(`evaluate: "${node.field}" is a relation; pass options.relation`);
|
|
373
|
+
return options.relation(node, item);
|
|
374
|
+
}
|
|
375
|
+
const value = item[node.field];
|
|
376
|
+
return Array.isArray(value) ? value.some((one) => matchOne(field, node, one, options)) : matchOne(field, node, value, options);
|
|
377
|
+
}, "matches");
|
|
378
|
+
var evaluate = /* @__PURE__ */ __name((ast, fields, item, options = {}) => matches(ast.root, item, new Map(fields.map((field) => [field.name, field])), options), "evaluate");
|
|
379
|
+
|
|
380
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/fields.js
|
|
356
381
|
var FIELD_TYPES = ["kw", "txt", "enum", "num", "time", "bool", "ref"];
|
|
357
382
|
var OPERATORS_BY_TYPE = {
|
|
358
383
|
kw: ["term", "phrase", "wildcard"],
|
|
@@ -431,7 +456,7 @@ var queryFieldsOf = /* @__PURE__ */ __name((schema, annotations = {}) => {
|
|
|
431
456
|
return [...own, ...relations, ...states];
|
|
432
457
|
}, "queryFieldsOf");
|
|
433
458
|
|
|
434
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
459
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/help.js
|
|
435
460
|
var shownOf = /* @__PURE__ */ __name((registry) => registry.backend === "native" ? registry.fields.filter((field) => field.native) : registry.fields, "shownOf");
|
|
436
461
|
var leftOut = /* @__PURE__ */ __name((fields) => fields.filter((field) => field.negatable).map((field) => field.name), "leftOut");
|
|
437
462
|
var has = /* @__PURE__ */ __name((fields, operator) => fields.some((field) => field.operators.includes(operator)), "has");
|
|
@@ -468,82 +493,7 @@ var queryDescription = /* @__PURE__ */ __name((registry) => {
|
|
|
468
493
|
return `${terms}; fields: ${fields.join(", ")}; e.g. ${shown[0]?.example ?? ""}${defaults}`;
|
|
469
494
|
}, "queryDescription");
|
|
470
495
|
|
|
471
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
472
|
-
var inContext = /* @__PURE__ */ __name((context3, run2) => {
|
|
473
|
-
try {
|
|
474
|
-
run2();
|
|
475
|
-
} catch (failure) {
|
|
476
|
-
if (!isCliError(failure) || typeof failure.details.reason !== "string" || failure.details.span === void 0)
|
|
477
|
-
throw failure;
|
|
478
|
-
const { reason, span, alternative } = failure.details;
|
|
479
|
-
queryError(reason, span, alternative, context3);
|
|
480
|
-
}
|
|
481
|
-
}, "inContext");
|
|
482
|
-
var bounds = /* @__PURE__ */ __name((node) => node.operator === "range" ? [node.value, node.upper ?? "*"].filter((bound) => bound !== "*") : [node.value], "bounds");
|
|
483
|
-
var checkValue = /* @__PURE__ */ __name((field, node, options) => {
|
|
484
|
-
const fail = /* @__PURE__ */ __name((reason, alternative) => queryError(reason, node.span, alternative, options), "fail");
|
|
485
|
-
if (node.value === "" && field.type !== "txt")
|
|
486
|
-
fail("query.missing-value");
|
|
487
|
-
if (node.operator === "wildcard")
|
|
488
|
-
return;
|
|
489
|
-
switch (field.type) {
|
|
490
|
-
case "enum":
|
|
491
|
-
if (!field.values?.includes(node.value.toLowerCase()))
|
|
492
|
-
fail("query.unknown-value", `${field.name} takes ${field.values?.join(", ")}`);
|
|
493
|
-
return;
|
|
494
|
-
case "bool":
|
|
495
|
-
if (!["true", "false"].includes(node.value.toLowerCase()))
|
|
496
|
-
fail("query.unknown-value", `${field.name} takes true, false`);
|
|
497
|
-
return;
|
|
498
|
-
case "num":
|
|
499
|
-
for (const bound of bounds(node))
|
|
500
|
-
if (!Number.isFinite(Number(bound)) || bound.trim() === "")
|
|
501
|
-
fail("query.invalid-number", `${field.name} takes a number`);
|
|
502
|
-
return;
|
|
503
|
-
case "time":
|
|
504
|
-
inContext(options, () => {
|
|
505
|
-
for (const bound of bounds(node))
|
|
506
|
-
dateEndpoint(bound, options.zone ?? "UTC", "lower", true, node.span);
|
|
507
|
-
});
|
|
508
|
-
return;
|
|
509
|
-
default:
|
|
510
|
-
return;
|
|
511
|
-
}
|
|
512
|
-
}, "checkValue");
|
|
513
|
-
var validateQuery = /* @__PURE__ */ __name((ast, registry, options = {}) => {
|
|
514
|
-
const byName = new Map(registry.fields.map((field) => [field.name, field]));
|
|
515
|
-
const visit = /* @__PURE__ */ __name((node, required) => {
|
|
516
|
-
if (node.kind === "boolean") {
|
|
517
|
-
for (const clause of node.clauses)
|
|
518
|
-
visit(clause.node, required && clause.occur === "must");
|
|
519
|
-
return;
|
|
520
|
-
}
|
|
521
|
-
const field = byName.get(node.field);
|
|
522
|
-
if (!field)
|
|
523
|
-
queryError("query.unknown-field", node.span, `no field "${node.field}"`, options, {
|
|
524
|
-
fields: registry.fields.map((one) => one.name)
|
|
525
|
-
});
|
|
526
|
-
if (registry.backend === "native" && !field.native)
|
|
527
|
-
queryError("query.unsupported-field", node.span, `the source cannot filter by ${field.name}`, options, {
|
|
528
|
-
supported: registry.fields.filter((one) => one.native).map((one) => one.name)
|
|
529
|
-
});
|
|
530
|
-
const presence = node.operator === "wildcard" && node.value === "*";
|
|
531
|
-
if (!presence && !field.operators.includes(node.operator))
|
|
532
|
-
queryError("query.unsupported-operator", node.span, `${field.name} takes ${field.operators.join(", ")}`, options);
|
|
533
|
-
if (field.placement === "and" && !required)
|
|
534
|
-
queryError("query.unsupported-placement", node.span, `${field.name} only as a required term, not under OR or NOT`, options);
|
|
535
|
-
if (presence)
|
|
536
|
-
return;
|
|
537
|
-
checkValue(field, node, options);
|
|
538
|
-
if (field.validate)
|
|
539
|
-
inContext(options, () => field.validate?.(node));
|
|
540
|
-
}, "visit");
|
|
541
|
-
visit(ast.root, true);
|
|
542
|
-
return ast;
|
|
543
|
-
}, "validateQuery");
|
|
544
|
-
var fieldsNamed = /* @__PURE__ */ __name((ast) => new Set(walkQuery(ast.root).map((node) => node.field)), "fieldsNamed");
|
|
545
|
-
|
|
546
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.79.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/parser.js
|
|
496
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/parser.js
|
|
547
497
|
var whitespace = /* @__PURE__ */ __name((c) => /[ \t\n\r\u3000]/u.test(c), "whitespace");
|
|
548
498
|
var reserved = /* @__PURE__ */ new Set([
|
|
549
499
|
"+",
|
|
@@ -852,7 +802,82 @@ var implicitTextTerms = /* @__PURE__ */ __name((text5) => {
|
|
|
852
802
|
return new Set(tokens.flatMap((token, index) => (token.kind === "term" || token.kind === "number") && ![":", "=", "<", ">", "<=", ">="].includes(tokens[index - 1]?.kind ?? "") && ![":", "=", "<", ">", "<=", ">="].includes(tokens[index + 1]?.kind ?? "") ? [token.span.start] : []));
|
|
853
803
|
}, "implicitTextTerms");
|
|
854
804
|
|
|
855
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
805
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/validate.js
|
|
806
|
+
var inContext = /* @__PURE__ */ __name((context3, run2) => {
|
|
807
|
+
try {
|
|
808
|
+
run2();
|
|
809
|
+
} catch (failure) {
|
|
810
|
+
if (!isCliError(failure) || typeof failure.details.reason !== "string" || failure.details.span === void 0)
|
|
811
|
+
throw failure;
|
|
812
|
+
const { reason, span, alternative } = failure.details;
|
|
813
|
+
queryError(reason, span, alternative, context3);
|
|
814
|
+
}
|
|
815
|
+
}, "inContext");
|
|
816
|
+
var bounds = /* @__PURE__ */ __name((node) => node.operator === "range" ? [node.value, node.upper ?? "*"].filter((bound) => bound !== "*") : [node.value], "bounds");
|
|
817
|
+
var checkValue = /* @__PURE__ */ __name((field, node, options) => {
|
|
818
|
+
const fail = /* @__PURE__ */ __name((reason, alternative) => queryError(reason, node.span, alternative, options), "fail");
|
|
819
|
+
if (node.value === "" && field.type !== "txt")
|
|
820
|
+
fail("query.missing-value");
|
|
821
|
+
if (node.operator === "wildcard")
|
|
822
|
+
return;
|
|
823
|
+
switch (field.type) {
|
|
824
|
+
case "enum":
|
|
825
|
+
if (!field.values?.includes(node.value.toLowerCase()))
|
|
826
|
+
fail("query.unknown-value", `${field.name} takes ${field.values?.join(", ")}`);
|
|
827
|
+
return;
|
|
828
|
+
case "bool":
|
|
829
|
+
if (!["true", "false"].includes(node.value.toLowerCase()))
|
|
830
|
+
fail("query.unknown-value", `${field.name} takes true, false`);
|
|
831
|
+
return;
|
|
832
|
+
case "num":
|
|
833
|
+
for (const bound of bounds(node))
|
|
834
|
+
if (!Number.isFinite(Number(bound)) || bound.trim() === "")
|
|
835
|
+
fail("query.invalid-number", `${field.name} takes a number`);
|
|
836
|
+
return;
|
|
837
|
+
case "time":
|
|
838
|
+
inContext(options, () => {
|
|
839
|
+
for (const bound of bounds(node))
|
|
840
|
+
dateEndpoint(bound, options.zone ?? "UTC", "lower", true, node.span);
|
|
841
|
+
});
|
|
842
|
+
return;
|
|
843
|
+
default:
|
|
844
|
+
return;
|
|
845
|
+
}
|
|
846
|
+
}, "checkValue");
|
|
847
|
+
var validateQuery = /* @__PURE__ */ __name((ast, registry, options = {}) => {
|
|
848
|
+
const byName = new Map(registry.fields.map((field) => [field.name, field]));
|
|
849
|
+
const visit = /* @__PURE__ */ __name((node, required) => {
|
|
850
|
+
if (node.kind === "boolean") {
|
|
851
|
+
for (const clause of node.clauses)
|
|
852
|
+
visit(clause.node, required && clause.occur === "must");
|
|
853
|
+
return;
|
|
854
|
+
}
|
|
855
|
+
const field = byName.get(node.field);
|
|
856
|
+
if (!field)
|
|
857
|
+
queryError("query.unknown-field", node.span, `no field "${node.field}"`, options, {
|
|
858
|
+
fields: registry.fields.map((one) => one.name)
|
|
859
|
+
});
|
|
860
|
+
if (registry.backend === "native" && !field.native)
|
|
861
|
+
queryError("query.unsupported-field", node.span, `the source cannot filter by ${field.name}`, options, {
|
|
862
|
+
supported: registry.fields.filter((one) => one.native).map((one) => one.name)
|
|
863
|
+
});
|
|
864
|
+
const presence = node.operator === "wildcard" && node.value === "*";
|
|
865
|
+
if (!presence && !field.operators.includes(node.operator))
|
|
866
|
+
queryError("query.unsupported-operator", node.span, `${field.name} takes ${field.operators.join(", ")}`, options);
|
|
867
|
+
if (field.placement === "and" && !required)
|
|
868
|
+
queryError("query.unsupported-placement", node.span, `${field.name} only as a required term, not under OR or NOT`, options);
|
|
869
|
+
if (presence)
|
|
870
|
+
return;
|
|
871
|
+
checkValue(field, node, options);
|
|
872
|
+
if (field.validate)
|
|
873
|
+
inContext(options, () => field.validate?.(node));
|
|
874
|
+
}, "visit");
|
|
875
|
+
visit(ast.root, true);
|
|
876
|
+
return ast;
|
|
877
|
+
}, "validateQuery");
|
|
878
|
+
var fieldsNamed = /* @__PURE__ */ __name((ast) => new Set(walkQuery(ast.root).map((node) => node.field)), "fieldsNamed");
|
|
879
|
+
|
|
880
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/registry.js
|
|
856
881
|
var describeQuery = /* @__PURE__ */ __name((registry) => ({
|
|
857
882
|
entity: registry.entity,
|
|
858
883
|
backend: registry.backend,
|
|
@@ -923,66 +948,11 @@ var QUERY_REASONS = defineReasons([
|
|
|
923
948
|
details: [...SPAN, ...details]
|
|
924
949
|
})));
|
|
925
950
|
|
|
926
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
927
|
-
var
|
|
928
|
-
var pattern = /* @__PURE__ */ __name((value) => new RegExp(`^${[...value].map((char) => char === "*" ? ".*" : char === "?" ? "." : char.replace(/[.+^${}()|[\]\\]/, "\\$&")).join("")}$`, "iu"), "pattern");
|
|
929
|
-
var present = /* @__PURE__ */ __name((value) => value !== void 0 && value !== null && value !== "", "present");
|
|
930
|
-
var matchOne = /* @__PURE__ */ __name((field, node, value, options) => {
|
|
931
|
-
if (!present(value))
|
|
932
|
-
return false;
|
|
933
|
-
if (node.operator === "wildcard" && node.value === "*")
|
|
934
|
-
return true;
|
|
935
|
-
const text5 = String(value);
|
|
936
|
-
switch (field.type) {
|
|
937
|
-
case "txt": {
|
|
938
|
-
const words2 = wordsOf(text5);
|
|
939
|
-
if (node.operator === "wildcard")
|
|
940
|
-
return words2.some((word) => pattern(node.value).test(word));
|
|
941
|
-
const wanted = wordsOf(node.value);
|
|
942
|
-
return words2.some((_, at) => wanted.every((word, offset) => words2[at + offset] === word));
|
|
943
|
-
}
|
|
944
|
-
case "num": {
|
|
945
|
-
const number2 = Number(value);
|
|
946
|
-
if (node.operator !== "range")
|
|
947
|
-
return number2 === Number(node.value);
|
|
948
|
-
const { value: lower, upper = "*", lower_inclusive: lowerInclusive, upper_inclusive: upperInclusive } = node;
|
|
949
|
-
return (lower === "*" || (lowerInclusive ? number2 >= Number(lower) : number2 > Number(lower))) && (upper === "*" || (upperInclusive ? number2 <= Number(upper) : number2 < Number(upper)));
|
|
950
|
-
}
|
|
951
|
-
case "time": {
|
|
952
|
-
const time = Date.parse(text5);
|
|
953
|
-
const [lower, upper, lowerInclusive, upperInclusive] = node.operator === "range" ? [node.value, node.upper ?? "*", node.lower_inclusive ?? true, node.upper_inclusive ?? true] : [node.value, node.value, true, true];
|
|
954
|
-
const range = dateRange(lower, upper, lowerInclusive, upperInclusive, options.zone ?? "UTC", node.span, options.now);
|
|
955
|
-
return (range.lower === void 0 || (range.lower_inclusive ? time >= range.lower : time > range.lower)) && (range.upper === void 0 || (range.upper_inclusive ? time <= range.upper : time < range.upper));
|
|
956
|
-
}
|
|
957
|
-
default:
|
|
958
|
-
return node.operator === "wildcard" ? pattern(node.value).test(text5) : text5.toLowerCase() === node.value.toLowerCase();
|
|
959
|
-
}
|
|
960
|
-
}, "matchOne");
|
|
961
|
-
var matches = /* @__PURE__ */ __name((node, item, byName, options) => {
|
|
962
|
-
if (node.kind === "boolean") {
|
|
963
|
-
const by = /* @__PURE__ */ __name((occur) => node.clauses.filter((clause) => clause.occur === occur), "by");
|
|
964
|
-
const [must, should, mustNot] = [by("must"), by("should"), by("must_not")];
|
|
965
|
-
const holds = /* @__PURE__ */ __name((clause) => matches(clause.node, item, byName, options), "holds");
|
|
966
|
-
return must.every(holds) && !mustNot.some(holds) && (should.length === 0 || must.length > 0 || should.some(holds));
|
|
967
|
-
}
|
|
968
|
-
const field = byName.get(node.field);
|
|
969
|
-
if (!field)
|
|
970
|
-
throw new Error(`evaluate: no field "${node.field}"; validate the query first`);
|
|
971
|
-
if (field.relation !== void 0) {
|
|
972
|
-
if (!options.relation)
|
|
973
|
-
throw new Error(`evaluate: "${node.field}" is a relation; pass options.relation`);
|
|
974
|
-
return options.relation(node, item);
|
|
975
|
-
}
|
|
976
|
-
const value = item[node.field];
|
|
977
|
-
return Array.isArray(value) ? value.some((one) => matchOne(field, node, one, options)) : matchOne(field, node, value, options);
|
|
978
|
-
}, "matches");
|
|
979
|
-
var evaluate = /* @__PURE__ */ __name((ast, fields, item, options = {}) => matches(ast.root, item, new Map(fields.map((field) => [field.name, field])), options), "evaluate");
|
|
980
|
-
|
|
981
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.586.0_@wirecat+cli-base@0.79.0_commander@15.0.0_esbuild@0.28.2_type_bdecddef0ae5a50ae90cab8b9e35c13b/node_modules/@wirecat/cli-core/dist/meetings/reference.js
|
|
982
|
-
var invalid = /* @__PURE__ */ __name(() => new CliError("validation_error", "expected meeting:<accountId>/<meetingId>[/<transcriptId>[/<cuePosition>]] with safe integer IDs"), "invalid");
|
|
951
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/meetings/reference.js
|
|
952
|
+
var invalid2 = /* @__PURE__ */ __name(() => new CliError("validation_error", "expected meeting:<accountId>/<meetingId>[/<transcriptId>[/<cuePosition>]] with safe integer IDs"), "invalid");
|
|
983
953
|
var integer2 = /* @__PURE__ */ __name((value, minimum = 1) => {
|
|
984
954
|
if (!Number.isSafeInteger(value) || value < minimum)
|
|
985
|
-
throw
|
|
955
|
+
throw invalid2();
|
|
986
956
|
return value;
|
|
987
957
|
}, "integer");
|
|
988
958
|
var formatMeetingReference = /* @__PURE__ */ __name((reference2) => {
|
|
@@ -991,7 +961,7 @@ var formatMeetingReference = /* @__PURE__ */ __name((reference2) => {
|
|
|
991
961
|
parts.push(integer2(reference2.transcriptId));
|
|
992
962
|
if (reference2.cuePosition !== void 0) {
|
|
993
963
|
if (reference2.transcriptId === void 0)
|
|
994
|
-
throw
|
|
964
|
+
throw invalid2();
|
|
995
965
|
parts.push(integer2(reference2.cuePosition, 0));
|
|
996
966
|
}
|
|
997
967
|
return `meeting:${parts.join("/")}`;
|
|
@@ -999,10 +969,10 @@ var formatMeetingReference = /* @__PURE__ */ __name((reference2) => {
|
|
|
999
969
|
var parseMeetingReference = /* @__PURE__ */ __name((text5) => {
|
|
1000
970
|
const value = text5.trim();
|
|
1001
971
|
if (!value.startsWith("meeting:"))
|
|
1002
|
-
throw
|
|
972
|
+
throw invalid2();
|
|
1003
973
|
const parts = value.slice(8).split("/");
|
|
1004
974
|
if (parts.length < 2 || parts.length > 4 || parts.some((part) => !/^\d+$/.test(part)))
|
|
1005
|
-
throw
|
|
975
|
+
throw invalid2();
|
|
1006
976
|
const ids2 = parts.map(Number);
|
|
1007
977
|
const reference2 = {
|
|
1008
978
|
type: "meeting",
|
|
@@ -1015,7 +985,7 @@ var parseMeetingReference = /* @__PURE__ */ __name((text5) => {
|
|
|
1015
985
|
}, "parseMeetingReference");
|
|
1016
986
|
var canonicalMeetingReference = /* @__PURE__ */ __name((text5) => formatMeetingReference(parseMeetingReference(text5)), "canonicalMeetingReference");
|
|
1017
987
|
|
|
1018
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
988
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/meetings/item.js
|
|
1019
989
|
var text = string();
|
|
1020
990
|
var count = pipe(number(), integer(), minValue(0));
|
|
1021
991
|
var MEETING_ISSUES = ["time_without_zone"];
|
|
@@ -1080,111 +1050,7 @@ var MEETING_QUERY = {
|
|
|
1080
1050
|
})
|
|
1081
1051
|
};
|
|
1082
1052
|
|
|
1083
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1084
|
-
var joinKeyOf = /* @__PURE__ */ __name((url) => {
|
|
1085
|
-
const parsed = urlOf(url);
|
|
1086
|
-
if (!parsed)
|
|
1087
|
-
return null;
|
|
1088
|
-
const host = parsed.hostname.toLowerCase().replace(/^www\./u, "");
|
|
1089
|
-
const path = parsed.pathname.replace(/\/+$/u, "");
|
|
1090
|
-
if (host === "zoom.us" || host.endsWith(".zoom.us") || host === "zoomgov.com" || host.endsWith(".zoomgov.com")) {
|
|
1091
|
-
const number2 = /^\/(?:j|w|s|wc\/join|wc)\/(\d{9,12})(?:\/|$)/u.exec(path)?.[1];
|
|
1092
|
-
if (number2)
|
|
1093
|
-
return `zoom:${number2}`;
|
|
1094
|
-
}
|
|
1095
|
-
if (host === "meet.google.com") {
|
|
1096
|
-
const code = /^\/([a-z]{3}-[a-z]{4}-[a-z]{3})$/iu.exec(path)?.[1];
|
|
1097
|
-
if (code)
|
|
1098
|
-
return `meet:${code.toLowerCase()}`;
|
|
1099
|
-
}
|
|
1100
|
-
return `${host}${path}`;
|
|
1101
|
-
}, "joinKeyOf");
|
|
1102
|
-
var joinUrlWithoutQuery = /* @__PURE__ */ __name((url) => {
|
|
1103
|
-
const parsed = urlOf(url);
|
|
1104
|
-
return parsed ? `${parsed.origin}${parsed.pathname}` : null;
|
|
1105
|
-
}, "joinUrlWithoutQuery");
|
|
1106
|
-
var urlOf = /* @__PURE__ */ __name((url) => {
|
|
1107
|
-
if (!url?.trim())
|
|
1108
|
-
return null;
|
|
1109
|
-
try {
|
|
1110
|
-
const parsed = new URL(url.trim());
|
|
1111
|
-
return parsed.protocol === "https:" || parsed.protocol === "http:" ? parsed : null;
|
|
1112
|
-
} catch {
|
|
1113
|
-
return null;
|
|
1114
|
-
}
|
|
1115
|
-
}, "urlOf");
|
|
1116
|
-
|
|
1117
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.586.0_@wirecat+cli-base@0.79.0_commander@15.0.0_esbuild@0.28.2_type_bdecddef0ae5a50ae90cab8b9e35c13b/node_modules/@wirecat/cli-core/dist/meetings/calendar-text.js
|
|
1118
|
-
var ENTITIES = { amp: "&", lt: "<", gt: ">", quot: '"', "#39": "'", apos: "'", nbsp: " " };
|
|
1119
|
-
var SECRET_LINE = /(?<![\p{L}\p{N}])(pass ?codes?|passwords?|pwd|pins?|access ?codes?|meeting ?codes?|kennwort|пароль|пин-?код|код доступа)(?![\p{L}\p{N}])|pwd=/iu;
|
|
1120
|
-
var htmlToText = /* @__PURE__ */ __name((html) => html.replace(/<\s*br\s*\/?>/giu, "\n").replace(/<\/\s*(p|div|li|tr|h[1-6])\s*>/giu, "\n").replace(/<a\s[^>]*href\s*=\s*"([^"]*)"[^>]*>/giu, " $1 ").replace(/<[^>]+>/gu, "").replace(/&(amp|lt|gt|quot|#39|apos|nbsp);/gu, (_, name) => ENTITIES[name] ?? ""), "htmlToText");
|
|
1121
|
-
var withoutLinkQueries = /* @__PURE__ */ __name((text5) => text5.replace(/https?:\/\/[^\s<>"')\]]+/giu, (url) => joinUrlWithoutQuery(url) ?? ""), "withoutLinkQueries");
|
|
1122
|
-
var calendarText = /* @__PURE__ */ __name((text5, { dropSecretLines = true } = {}) => {
|
|
1123
|
-
if (!text5)
|
|
1124
|
-
return null;
|
|
1125
|
-
const kept = htmlToText(text5).split(/\r?\n/u).map((line2) => withoutLinkQueries(line2).replace(/[ \t]+/gu, " ").trim()).filter((line2) => !dropSecretLines || !SECRET_LINE.test(line2));
|
|
1126
|
-
const joined = kept.join("\n").replace(/\n{3,}/gu, "\n\n").trim();
|
|
1127
|
-
return joined || null;
|
|
1128
|
-
}, "calendarText");
|
|
1129
|
-
var ENTRY_METADATA_KEYS = [
|
|
1130
|
-
"colorId",
|
|
1131
|
-
"guestsCanInviteOthers",
|
|
1132
|
-
"guestsCanModify",
|
|
1133
|
-
"guestsCanSeeOtherGuests",
|
|
1134
|
-
"hangoutLink",
|
|
1135
|
-
"locked",
|
|
1136
|
-
"privateCopy"
|
|
1137
|
-
];
|
|
1138
|
-
var entryMetadata = /* @__PURE__ */ __name((metadata) => {
|
|
1139
|
-
const kept = {};
|
|
1140
|
-
for (const key of ENTRY_METADATA_KEYS) {
|
|
1141
|
-
const value = metadata?.[key];
|
|
1142
|
-
if (typeof value === "string")
|
|
1143
|
-
kept[key] = withoutLinkQueries(value);
|
|
1144
|
-
else if (typeof value === "number" || typeof value === "boolean")
|
|
1145
|
-
kept[key] = value;
|
|
1146
|
-
}
|
|
1147
|
-
return kept;
|
|
1148
|
-
}, "entryMetadata");
|
|
1149
|
-
|
|
1150
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.586.0_@wirecat+cli-base@0.79.0_commander@15.0.0_esbuild@0.28.2_type_bdecddef0ae5a50ae90cab8b9e35c13b/node_modules/@wirecat/cli-core/dist/meetings/cue-fingerprint.js
|
|
1151
|
-
import { createHash } from "node:crypto";
|
|
1152
|
-
var meetingCueFingerprint = /* @__PURE__ */ __name((cue2) => createHash("sha256").update(JSON.stringify({
|
|
1153
|
-
reference: cue2.reference,
|
|
1154
|
-
transcriptId: cue2.transcriptId,
|
|
1155
|
-
contentHash: cue2.contentHash,
|
|
1156
|
-
position: cue2.position,
|
|
1157
|
-
startMs: cue2.startMs,
|
|
1158
|
-
endMs: cue2.endMs,
|
|
1159
|
-
speakerParticipantId: cue2.speakerParticipantId,
|
|
1160
|
-
speakerName: cue2.speakerName,
|
|
1161
|
-
text: cue2.text
|
|
1162
|
-
})).digest("hex"), "meetingCueFingerprint");
|
|
1163
|
-
|
|
1164
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.586.0_@wirecat+cli-base@0.79.0_commander@15.0.0_esbuild@0.28.2_type_bdecddef0ae5a50ae90cab8b9e35c13b/node_modules/@wirecat/cli-core/dist/meetings/event-store.js
|
|
1165
|
-
var UNTIL = /(?:^|;)UNTIL=(\d{4})(\d{2})(\d{2})(?:T(\d{2})(\d{2})(\d{2})Z?)?(?:;|$)/iu;
|
|
1166
|
-
var seriesEnd = /* @__PURE__ */ __name((entry) => {
|
|
1167
|
-
if (entry.recurrenceEndsAt !== null)
|
|
1168
|
-
return entry.recurrenceEndsAt;
|
|
1169
|
-
const rule = entry.recurrence?.find((line2) => /^RRULE:/iu.test(line2));
|
|
1170
|
-
const until = rule === void 0 ? null : UNTIL.exec(rule.slice("RRULE:".length));
|
|
1171
|
-
if (!until)
|
|
1172
|
-
return Number.POSITIVE_INFINITY;
|
|
1173
|
-
const [, year, month, day, hour = "23", minute = "59", second = "59"] = until;
|
|
1174
|
-
return Date.UTC(Number(year), Number(month) - 1, Number(day), Number(hour), Number(minute), Number(second)) + 864e5;
|
|
1175
|
-
}, "seriesEnd");
|
|
1176
|
-
var entryInWindow = /* @__PURE__ */ __name((entry, window) => {
|
|
1177
|
-
if (entry.kind === "occurrence" && !entry.exception)
|
|
1178
|
-
return entry.originalStartsAt !== null && entry.originalStartsAt >= window.from && entry.originalStartsAt < window.to;
|
|
1179
|
-
const start = entry.startsAt ?? (entry.kind === "occurrence" ? entry.originalStartsAt : null);
|
|
1180
|
-
if (start === null || start >= window.to)
|
|
1181
|
-
return false;
|
|
1182
|
-
if (entry.kind === "series")
|
|
1183
|
-
return seriesEnd(entry) >= window.from;
|
|
1184
|
-
return Math.max(entry.endsAt ?? start, start + 1) > window.from;
|
|
1185
|
-
}, "entryInWindow");
|
|
1186
|
-
|
|
1187
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.586.0_@wirecat+cli-base@0.79.0_commander@15.0.0_esbuild@0.28.2_type_bdecddef0ae5a50ae90cab8b9e35c13b/node_modules/@wirecat/cli-core/dist/meetings/answers.js
|
|
1053
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/meetings/answers.js
|
|
1188
1054
|
var text2 = string();
|
|
1189
1055
|
var count2 = pipe(number(), integer(), minValue(0));
|
|
1190
1056
|
var iso2 = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
|
|
@@ -1419,7 +1285,170 @@ var meetingHitsList = /* @__PURE__ */ __name((found, limit, command = "search me
|
|
|
1419
1285
|
};
|
|
1420
1286
|
}, "meetingHitsList");
|
|
1421
1287
|
|
|
1422
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1288
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/meetings/join-key.js
|
|
1289
|
+
var joinKeyOf = /* @__PURE__ */ __name((url) => {
|
|
1290
|
+
const parsed = urlOf(url);
|
|
1291
|
+
if (!parsed)
|
|
1292
|
+
return null;
|
|
1293
|
+
const host = parsed.hostname.toLowerCase().replace(/^www\./u, "");
|
|
1294
|
+
const path = parsed.pathname.replace(/\/+$/u, "");
|
|
1295
|
+
if (host === "zoom.us" || host.endsWith(".zoom.us") || host === "zoomgov.com" || host.endsWith(".zoomgov.com")) {
|
|
1296
|
+
const number2 = /^\/(?:j|w|s|wc\/join|wc)\/(\d{9,12})(?:\/|$)/u.exec(path)?.[1];
|
|
1297
|
+
if (number2)
|
|
1298
|
+
return `zoom:${number2}`;
|
|
1299
|
+
}
|
|
1300
|
+
if (host === "meet.google.com") {
|
|
1301
|
+
const code = /^\/([a-z]{3}-[a-z]{4}-[a-z]{3})$/iu.exec(path)?.[1];
|
|
1302
|
+
if (code)
|
|
1303
|
+
return `meet:${code.toLowerCase()}`;
|
|
1304
|
+
}
|
|
1305
|
+
return `${host}${path}`;
|
|
1306
|
+
}, "joinKeyOf");
|
|
1307
|
+
var joinUrlWithoutQuery = /* @__PURE__ */ __name((url) => {
|
|
1308
|
+
const parsed = urlOf(url);
|
|
1309
|
+
return parsed ? `${parsed.origin}${parsed.pathname}` : null;
|
|
1310
|
+
}, "joinUrlWithoutQuery");
|
|
1311
|
+
var urlOf = /* @__PURE__ */ __name((url) => {
|
|
1312
|
+
if (!url?.trim())
|
|
1313
|
+
return null;
|
|
1314
|
+
try {
|
|
1315
|
+
const parsed = new URL(url.trim());
|
|
1316
|
+
return parsed.protocol === "https:" || parsed.protocol === "http:" ? parsed : null;
|
|
1317
|
+
} catch {
|
|
1318
|
+
return null;
|
|
1319
|
+
}
|
|
1320
|
+
}, "urlOf");
|
|
1321
|
+
|
|
1322
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/meetings/calendar-text.js
|
|
1323
|
+
var ENTITIES = { amp: "&", lt: "<", gt: ">", quot: '"', "#39": "'", apos: "'", nbsp: " " };
|
|
1324
|
+
var SECRET_LINE = /(?<![\p{L}\p{N}])(pass ?codes?|passwords?|pwd|pins?|access ?codes?|meeting ?codes?|kennwort|пароль|пин-?код|код доступа)(?![\p{L}\p{N}])|pwd=/iu;
|
|
1325
|
+
var htmlToText = /* @__PURE__ */ __name((html) => html.replace(/<\s*br\s*\/?>/giu, "\n").replace(/<\/\s*(p|div|li|tr|h[1-6])\s*>/giu, "\n").replace(/<a\s[^>]*href\s*=\s*"([^"]*)"[^>]*>/giu, " $1 ").replace(/<[^>]+>/gu, "").replace(/&(amp|lt|gt|quot|#39|apos|nbsp);/gu, (_, name) => ENTITIES[name] ?? ""), "htmlToText");
|
|
1326
|
+
var withoutLinkQueries = /* @__PURE__ */ __name((text5) => text5.replace(/https?:\/\/[^\s<>"')\]]+/giu, (url) => joinUrlWithoutQuery(url) ?? ""), "withoutLinkQueries");
|
|
1327
|
+
var calendarText = /* @__PURE__ */ __name((text5, { dropSecretLines = true } = {}) => {
|
|
1328
|
+
if (!text5)
|
|
1329
|
+
return null;
|
|
1330
|
+
const kept = htmlToText(text5).split(/\r?\n/u).map((line2) => withoutLinkQueries(line2).replace(/[ \t]+/gu, " ").trim()).filter((line2) => !dropSecretLines || !SECRET_LINE.test(line2));
|
|
1331
|
+
const joined = kept.join("\n").replace(/\n{3,}/gu, "\n\n").trim();
|
|
1332
|
+
return joined || null;
|
|
1333
|
+
}, "calendarText");
|
|
1334
|
+
var ENTRY_METADATA_KEYS = [
|
|
1335
|
+
"colorId",
|
|
1336
|
+
"guestsCanInviteOthers",
|
|
1337
|
+
"guestsCanModify",
|
|
1338
|
+
"guestsCanSeeOtherGuests",
|
|
1339
|
+
"hangoutLink",
|
|
1340
|
+
"locked",
|
|
1341
|
+
"privateCopy"
|
|
1342
|
+
];
|
|
1343
|
+
var entryMetadata = /* @__PURE__ */ __name((metadata) => {
|
|
1344
|
+
const kept = {};
|
|
1345
|
+
for (const key of ENTRY_METADATA_KEYS) {
|
|
1346
|
+
const value = metadata?.[key];
|
|
1347
|
+
if (typeof value === "string")
|
|
1348
|
+
kept[key] = withoutLinkQueries(value);
|
|
1349
|
+
else if (typeof value === "number" || typeof value === "boolean")
|
|
1350
|
+
kept[key] = value;
|
|
1351
|
+
}
|
|
1352
|
+
return kept;
|
|
1353
|
+
}, "entryMetadata");
|
|
1354
|
+
|
|
1355
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/meetings/cue-fingerprint.js
|
|
1356
|
+
import { createHash } from "node:crypto";
|
|
1357
|
+
var meetingCueFingerprint = /* @__PURE__ */ __name((cue2) => createHash("sha256").update(JSON.stringify({
|
|
1358
|
+
reference: cue2.reference,
|
|
1359
|
+
transcriptId: cue2.transcriptId,
|
|
1360
|
+
contentHash: cue2.contentHash,
|
|
1361
|
+
position: cue2.position,
|
|
1362
|
+
startMs: cue2.startMs,
|
|
1363
|
+
endMs: cue2.endMs,
|
|
1364
|
+
speakerParticipantId: cue2.speakerParticipantId,
|
|
1365
|
+
speakerName: cue2.speakerName,
|
|
1366
|
+
text: cue2.text
|
|
1367
|
+
})).digest("hex"), "meetingCueFingerprint");
|
|
1368
|
+
|
|
1369
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/meetings/event-query.js
|
|
1370
|
+
var EVENT_QUERY = defineQuery({
|
|
1371
|
+
entity: "event",
|
|
1372
|
+
backend: "sql",
|
|
1373
|
+
fields: [
|
|
1374
|
+
{ name: "id", type: "num", operators: ["term", "range"], example: "id:1" },
|
|
1375
|
+
{ name: "origin", type: "enum", operators: ["term"], values: ["auto", "owner"], example: "origin:owner" },
|
|
1376
|
+
...["starts_at", "ends_at", "created_at", "updated_at"].map((name) => ({
|
|
1377
|
+
name,
|
|
1378
|
+
type: "time",
|
|
1379
|
+
operators: ["term", "range"],
|
|
1380
|
+
example: `${name}>=2026-01-01`
|
|
1381
|
+
}))
|
|
1382
|
+
]
|
|
1383
|
+
});
|
|
1384
|
+
|
|
1385
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/meetings/event-store.js
|
|
1386
|
+
var UNTIL = /(?:^|;)UNTIL=(\d{4})(\d{2})(\d{2})(?:T(\d{2})(\d{2})(\d{2})Z?)?(?:;|$)/iu;
|
|
1387
|
+
var seriesEnd = /* @__PURE__ */ __name((entry) => {
|
|
1388
|
+
if (entry.recurrenceEndsAt !== null)
|
|
1389
|
+
return entry.recurrenceEndsAt;
|
|
1390
|
+
const rule = entry.recurrence?.find((line2) => /^RRULE:/iu.test(line2));
|
|
1391
|
+
const until = rule === void 0 ? null : UNTIL.exec(rule.slice("RRULE:".length));
|
|
1392
|
+
if (!until)
|
|
1393
|
+
return Number.POSITIVE_INFINITY;
|
|
1394
|
+
const [, year, month, day, hour = "23", minute = "59", second = "59"] = until;
|
|
1395
|
+
return Date.UTC(Number(year), Number(month) - 1, Number(day), Number(hour), Number(minute), Number(second)) + 864e5;
|
|
1396
|
+
}, "seriesEnd");
|
|
1397
|
+
var entryInWindow = /* @__PURE__ */ __name((entry, window) => {
|
|
1398
|
+
if (entry.kind === "occurrence" && !entry.exception)
|
|
1399
|
+
return entry.originalStartsAt !== null && entry.originalStartsAt >= window.from && entry.originalStartsAt < window.to;
|
|
1400
|
+
const start = entry.startsAt ?? (entry.kind === "occurrence" ? entry.originalStartsAt : null);
|
|
1401
|
+
if (start === null || start >= window.to)
|
|
1402
|
+
return false;
|
|
1403
|
+
if (entry.kind === "series")
|
|
1404
|
+
return seriesEnd(entry) >= window.from;
|
|
1405
|
+
return Math.max(entry.endsAt ?? start, start + 1) > window.from;
|
|
1406
|
+
}, "entryInWindow");
|
|
1407
|
+
|
|
1408
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/meetings/events.js
|
|
1409
|
+
var linkEvent = /* @__PURE__ */ __name(async (store, details, now = Date.now()) => {
|
|
1410
|
+
const current = await store.meeting(details.meeting.id);
|
|
1411
|
+
if (!current)
|
|
1412
|
+
return null;
|
|
1413
|
+
const { meeting: meeting2, series } = current;
|
|
1414
|
+
if (meeting2.eventId !== null)
|
|
1415
|
+
return (await store.events()).find((e) => e.id === meeting2.eventId) ?? null;
|
|
1416
|
+
const candidates = meeting2.startedAt === null ? [] : await store.eventCandidates({
|
|
1417
|
+
meetingSeriesId: meeting2.meetingSeriesId,
|
|
1418
|
+
joinUrl: meeting2.joinUrl,
|
|
1419
|
+
startsAt: meeting2.startedAt,
|
|
1420
|
+
endsAt: meeting2.endedAt ?? meeting2.startedAt
|
|
1421
|
+
});
|
|
1422
|
+
if (candidates.length > 1) {
|
|
1423
|
+
await store.reviewMeetingLink?.(meeting2.id, candidates.map(({ id: id3 }) => id3), now);
|
|
1424
|
+
return null;
|
|
1425
|
+
}
|
|
1426
|
+
let event2 = candidates[0];
|
|
1427
|
+
if (!event2) {
|
|
1428
|
+
let eventSeriesId = series?.eventSeriesId ?? null;
|
|
1429
|
+
if (series?.kind === "recurring" && eventSeriesId === null) {
|
|
1430
|
+
const created = await store.createEventSeries({ title: series.title, recurrence: null, origin: "auto" }, now);
|
|
1431
|
+
eventSeriesId = created.id;
|
|
1432
|
+
await store.setEventSeries(series.id, eventSeriesId, now);
|
|
1433
|
+
}
|
|
1434
|
+
event2 = await store.createEvent({
|
|
1435
|
+
eventSeriesId,
|
|
1436
|
+
title: meeting2.title,
|
|
1437
|
+
description: meeting2.description,
|
|
1438
|
+
location: meeting2.location,
|
|
1439
|
+
startsAt: meeting2.startedAt,
|
|
1440
|
+
endsAt: meeting2.endedAt,
|
|
1441
|
+
timezone: meeting2.timezone,
|
|
1442
|
+
origin: "auto",
|
|
1443
|
+
deletedAt: null
|
|
1444
|
+
}, now);
|
|
1445
|
+
}
|
|
1446
|
+
await store.linkMeeting(meeting2.id, event2.id, now);
|
|
1447
|
+
const linked = await store.meeting(meeting2.id);
|
|
1448
|
+
return (await store.events()).find((e) => e.id === linked?.meeting.eventId) ?? null;
|
|
1449
|
+
}, "linkEvent");
|
|
1450
|
+
|
|
1451
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/meetings/participant-search.js
|
|
1423
1452
|
var normalizeMeetingParticipantQuery = /* @__PURE__ */ __name((text5) => text5.normalize("NFKC").toLowerCase(), "normalizeMeetingParticipantQuery");
|
|
1424
1453
|
var validateMeetingParticipantQuery = /* @__PURE__ */ __name((query) => {
|
|
1425
1454
|
if (typeof query !== "string" || !query.trim() || query.length > 500 || query.includes("\0"))
|
|
@@ -1443,7 +1472,7 @@ var validateMeetingParticipantSearch = /* @__PURE__ */ __name((query, input) =>
|
|
|
1443
1472
|
};
|
|
1444
1473
|
}, "validateMeetingParticipantSearch");
|
|
1445
1474
|
|
|
1446
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1475
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/meetings/reads.js
|
|
1447
1476
|
var MeetingError = class extends CliError {
|
|
1448
1477
|
static {
|
|
1449
1478
|
__name(this, "MeetingError");
|
|
@@ -1575,7 +1604,7 @@ var meetingSummaryAnswer = /* @__PURE__ */ __name(async (store, id3, accountId)
|
|
|
1575
1604
|
return wholeList(details.summaries.map((one) => meetingSummaryItem(details.meeting.accountId, one)));
|
|
1576
1605
|
}, "meetingSummaryAnswer");
|
|
1577
1606
|
|
|
1578
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1607
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/meetings/export.js
|
|
1579
1608
|
var timestamp = /* @__PURE__ */ __name((milliseconds) => {
|
|
1580
1609
|
if (!Number.isSafeInteger(milliseconds) || milliseconds < 0)
|
|
1581
1610
|
throw new MeetingError("validation_error", "transcript times must be nonnegative integer milliseconds");
|
|
@@ -1671,104 +1700,10 @@ var exportMeeting = /* @__PURE__ */ __name(async (store, id3, options) => {
|
|
|
1671
1700
|
};
|
|
1672
1701
|
}, "exportMeeting");
|
|
1673
1702
|
|
|
1674
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1675
|
-
var FACT_TYPES = ["fact", "statement", "question", "decision", "promise"];
|
|
1676
|
-
var PAYMENT_DIRECTIONS = ["to_us", "from_us"];
|
|
1677
|
-
var PAYMENT_STATES = ["expected", "paid", "cancelled"];
|
|
1678
|
-
var invalid2 = /* @__PURE__ */ __name((message) => {
|
|
1679
|
-
throw new CliError("validation_error", message);
|
|
1680
|
-
}, "invalid");
|
|
1681
|
-
var CURRENCIES = new Set(Intl.supportedValuesOf("currency"));
|
|
1682
|
-
var AMOUNT = /^(\d{1,15})(?:\.(\d{1,2}))?$/;
|
|
1683
|
-
var COUNTERPARTY = /^(person|organization|project):[1-9]\d*$/;
|
|
1684
|
-
var amountOf = /* @__PURE__ */ __name((value) => {
|
|
1685
|
-
const match = AMOUNT.exec(typeof value === "number" ? String(value) : typeof value === "string" ? value.trim() : "");
|
|
1686
|
-
if (!match)
|
|
1687
|
-
return invalid2("a payment's amount is a positive number with at most 2 decimals, such as 1200.50");
|
|
1688
|
-
const amount = `${BigInt(match[1] ?? "0")}.${(match[2] ?? "").padEnd(2, "0")}`;
|
|
1689
|
-
if (amount === "0.00")
|
|
1690
|
-
return invalid2("a payment's amount is more than 0");
|
|
1691
|
-
return amount;
|
|
1692
|
-
}, "amountOf");
|
|
1693
|
-
var dateOf = /* @__PURE__ */ __name((value) => {
|
|
1694
|
-
const date = typeof value === "string" ? value.trim() : "";
|
|
1695
|
-
if (!/^\d{4}-\d{2}-\d{2}$/.test(date) || (/* @__PURE__ */ new Date(`${date}T00:00:00Z`)).toISOString().slice(0, 10) !== date)
|
|
1696
|
-
return invalid2("a payment's dates are ISO dates, such as 2026-10-31");
|
|
1697
|
-
return date;
|
|
1698
|
-
}, "dateOf");
|
|
1699
|
-
var optionalText = /* @__PURE__ */ __name((value, what, limit) => {
|
|
1700
|
-
if (value === void 0 || value === null)
|
|
1701
|
-
return null;
|
|
1702
|
-
if (typeof value !== "string" || !value.trim() || value.length > limit || value.includes("\0"))
|
|
1703
|
-
return invalid2(`a payment's ${what} takes 1\u2013${limit} characters`);
|
|
1704
|
-
return value.trim();
|
|
1705
|
-
}, "optionalText");
|
|
1706
|
-
var oneOf = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
1707
|
-
if (typeof value !== "string" || !allowed.includes(value))
|
|
1708
|
-
return invalid2(`a payment's ${what} is one of ${allowed.join(", ")}`);
|
|
1709
|
-
return value;
|
|
1710
|
-
}, "oneOf");
|
|
1711
|
-
var FIELDS = [
|
|
1712
|
-
"amount",
|
|
1713
|
-
"currency",
|
|
1714
|
-
"direction",
|
|
1715
|
-
"counterparty",
|
|
1716
|
-
"counterparty_name",
|
|
1717
|
-
"due_at",
|
|
1718
|
-
"state",
|
|
1719
|
-
"item",
|
|
1720
|
-
"paid_at"
|
|
1721
|
-
];
|
|
1722
|
-
var validatePayment = /* @__PURE__ */ __name((input) => {
|
|
1723
|
-
if (!input || typeof input !== "object" || Array.isArray(input))
|
|
1724
|
-
return invalid2("a payment is an object");
|
|
1725
|
-
const raw = input;
|
|
1726
|
-
const unknown = Object.keys(raw).filter((key) => !FIELDS.includes(key));
|
|
1727
|
-
if (unknown.length)
|
|
1728
|
-
return invalid2(`a payment has no field ${unknown.join(", ")}; its fields are ${FIELDS.join(", ")}`);
|
|
1729
|
-
const currency = typeof raw.currency === "string" ? raw.currency.trim().toUpperCase() : "";
|
|
1730
|
-
if (!/^[A-Z]{3}$/.test(currency) || !CURRENCIES.has(currency))
|
|
1731
|
-
return invalid2("a payment's currency is an ISO 4217 code, such as EUR or RUB");
|
|
1732
|
-
const counterparty = optionalText(raw.counterparty, "counterparty", 80);
|
|
1733
|
-
if (counterparty !== null && !COUNTERPARTY.test(counterparty))
|
|
1734
|
-
return invalid2("a payment's counterparty is a person:, organization: or project: reference");
|
|
1735
|
-
const state = oneOf(raw.state, PAYMENT_STATES, "state");
|
|
1736
|
-
if (raw.paid_at != null && state !== "paid")
|
|
1737
|
-
return invalid2("only a paid payment has paid_at");
|
|
1738
|
-
return {
|
|
1739
|
-
amount: amountOf(raw.amount),
|
|
1740
|
-
currency,
|
|
1741
|
-
direction: oneOf(raw.direction, PAYMENT_DIRECTIONS, "direction"),
|
|
1742
|
-
counterparty,
|
|
1743
|
-
counterparty_name: optionalText(raw.counterparty_name, "counterparty name", 200),
|
|
1744
|
-
due_at: raw.due_at === void 0 || raw.due_at === null ? null : dateOf(raw.due_at),
|
|
1745
|
-
state,
|
|
1746
|
-
item: optionalText(raw.item, "item", 200),
|
|
1747
|
-
// Left out when absent, so a finding staged before the field keeps its fingerprint.
|
|
1748
|
-
...raw.paid_at == null ? {} : { paid_at: dateOf(raw.paid_at) }
|
|
1749
|
-
};
|
|
1750
|
-
}, "validatePayment");
|
|
1751
|
-
var grouped = /* @__PURE__ */ __name((amount) => {
|
|
1752
|
-
const [whole = "0", cents = "00"] = amount.split(".");
|
|
1753
|
-
const digits = whole.replace(/\B(?=(\d{3})+(?!\d))/g, " ");
|
|
1754
|
-
return cents === "00" ? digits : `${digits}.${cents}`;
|
|
1755
|
-
}, "grouped");
|
|
1756
|
-
var paymentTitle = /* @__PURE__ */ __name((fact) => {
|
|
1757
|
-
const payment = fact.payment;
|
|
1758
|
-
if (!payment)
|
|
1759
|
-
return "";
|
|
1760
|
-
const who = payment.counterparty_name ?? payment.counterparty;
|
|
1761
|
-
const way = payment.direction === "to_us" ? "to us" : "from us";
|
|
1762
|
-
const party = who === null ? "" : payment.direction === "to_us" ? ` from ${who}` : ` to ${who}`;
|
|
1763
|
-
const due = payment.due_at === null ? "" : `, due ${payment.due_at.slice(8, 10)}.${payment.due_at.slice(5, 7)}`;
|
|
1764
|
-
const item = payment.item === null ? "" : ` for ${payment.item}`;
|
|
1765
|
-
return `${grouped(payment.amount)} ${payment.currency} ${way}${party}${item}${due} (${payment.state})`;
|
|
1766
|
-
}, "paymentTitle");
|
|
1767
|
-
|
|
1768
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.586.0_@wirecat+cli-base@0.79.0_commander@15.0.0_esbuild@0.28.2_type_bdecddef0ae5a50ae90cab8b9e35c13b/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
|
|
1703
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
|
|
1769
1704
|
import { createHash as createHash2 } from "node:crypto";
|
|
1770
1705
|
|
|
1771
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1706
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/meetings/timestamp.js
|
|
1772
1707
|
var meetingTimestamp = /* @__PURE__ */ __name((value, name) => {
|
|
1773
1708
|
if (typeof value !== "string" || !/^\d{4}-\d{2}-\d{2}T.+(?:Z|[+-]\d{2}:\d{2})$/i.test(value) || !Number.isFinite(Date.parse(value)))
|
|
1774
1709
|
throw new CliError("validation_error", `${name} must be an ISO timestamp with a timezone, such as 2026-11-09T09:00:00Z`);
|
|
@@ -1779,7 +1714,7 @@ var meetingTimestamp = /* @__PURE__ */ __name((value, name) => {
|
|
|
1779
1714
|
return new Date(value).toISOString();
|
|
1780
1715
|
}, "meetingTimestamp");
|
|
1781
1716
|
|
|
1782
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1717
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
|
|
1783
1718
|
var TASK_TYPES = ["bug", "feature", "chore"];
|
|
1784
1719
|
var invalid3 = /* @__PURE__ */ __name((message) => {
|
|
1785
1720
|
throw new CliError("validation_error", message);
|
|
@@ -1910,252 +1845,60 @@ var validateFinding = /* @__PURE__ */ __name((finding, rules, ids2) => {
|
|
|
1910
1845
|
return invalid3("task commitment must be explicit or inferred");
|
|
1911
1846
|
if (finding.dueAt === void 0 !== (finding.dueEvidence === void 0))
|
|
1912
1847
|
return invalid3(`due_at comes with due_evidence: the ${rules.cited} references of this finding's evidence that give the date, as a list of strings such as ["<reference>"]`);
|
|
1913
|
-
if (finding.assignee === void 0 !== (finding.assigneeEvidence === void 0))
|
|
1914
|
-
return invalid3(`assignee comes with assignee_evidence: the ${rules.cited} references of this finding's evidence that name them, as a list of strings such as ["<reference>"]`);
|
|
1915
|
-
if (finding.assignee !== void 0 && (typeof finding.assignee !== "string" || !/^person:[1-9]\d*$/.test(finding.assignee)))
|
|
1916
|
-
return invalid3("an assignee must be a person reference");
|
|
1917
|
-
return {
|
|
1918
|
-
...base,
|
|
1919
|
-
kind: "task",
|
|
1920
|
-
type: finding.type,
|
|
1921
|
-
title: findingText(finding.title, 300),
|
|
1922
|
-
reason: findingText(finding.reason, 2e3),
|
|
1923
|
-
commitment: finding.commitment,
|
|
1924
|
-
...finding.dueAt === void 0 ? {} : {
|
|
1925
|
-
dueAt: meetingTimestamp(finding.dueAt, "a task's due_at"),
|
|
1926
|
-
dueEvidence: support(finding.dueEvidence, evidence, "due_evidence")
|
|
1927
|
-
},
|
|
1928
|
-
...finding.assignee === void 0 ? {} : {
|
|
1929
|
-
assignee: finding.assignee,
|
|
1930
|
-
assigneeEvidence: support(finding.assigneeEvidence, evidence, "assignee_evidence")
|
|
1931
|
-
}
|
|
1932
|
-
};
|
|
1933
|
-
}, "validateFinding");
|
|
1934
|
-
var support = /* @__PURE__ */ __name((value, evidence, field) => {
|
|
1935
|
-
if (!Array.isArray(value) || value.length < 1 || value.length > 8 || value.some((ref) => typeof ref !== "string" || !evidence.some((item) => item.reference === ref)))
|
|
1936
|
-
return invalid3(`${field} lists 1\u20138 references this finding's evidence cites, as plain strings such as ["<reference>"], not evidence objects`);
|
|
1937
|
-
return [...new Set(value)].sort();
|
|
1938
|
-
}, "support");
|
|
1939
|
-
var validateBatch = /* @__PURE__ */ __name((input, rules, most, one) => {
|
|
1940
|
-
if (!input || typeof input !== "object" || Buffer.byteLength(JSON.stringify(input), "utf8") > 65536)
|
|
1941
|
-
return invalid3(`${rules.plural} take at most 65536 UTF-8 bytes`);
|
|
1942
|
-
findingFields(input, ["schemaVersion", "key", "extractor", "findings"], rules.singular);
|
|
1943
|
-
if (input.schemaVersion !== 1 || !Array.isArray(input.findings) || input.findings.length < 1 || input.findings.length > most)
|
|
1944
|
-
return invalid3(`schemaVersion 1 takes 1\u2013${most} ${rules.plural}`);
|
|
1945
|
-
const key = findingText(input.key, 64);
|
|
1946
|
-
if (!/^[a-zA-Z0-9][a-zA-Z0-9_.:-]*$/.test(key))
|
|
1947
|
-
return invalid3("a findings key uses letters, digits, dot, colon, underscore or hyphen");
|
|
1948
|
-
const ids2 = /* @__PURE__ */ new Set();
|
|
1949
|
-
const findings = input.findings.map((finding) => one(finding, ids2));
|
|
1950
|
-
return { schemaVersion: 1, key, extractor: findingText(input.extractor, 200), findings };
|
|
1951
|
-
}, "validateBatch");
|
|
1952
|
-
var validateFindings = /* @__PURE__ */ __name((input, rules) => validateBatch(input, rules, 16, (finding, ids2) => validateFinding(finding, rules, ids2)), "validateFindings");
|
|
1953
|
-
var findingFingerprint = /* @__PURE__ */ __name(({ id: _id, ...finding }) => findingHash(finding), "findingFingerprint");
|
|
1954
|
-
|
|
1955
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.586.0_@wirecat+cli-base@0.79.0_commander@15.0.0_esbuild@0.28.2_type_bdecddef0ae5a50ae90cab8b9e35c13b/node_modules/@wirecat/cli-core/dist/meetings/findings.js
|
|
1956
|
-
var MEETING_FINDINGS_KIND = "meeting_findings";
|
|
1957
|
-
var cue = /* @__PURE__ */ __name((raw) => {
|
|
1958
|
-
const reference2 = canonicalMeetingReference(raw);
|
|
1959
|
-
if (parseMeetingReference(reference2).cuePosition === void 0)
|
|
1960
|
-
throw new CliError("validation_error", "finding evidence requires exact cue references and fingerprints");
|
|
1961
|
-
return reference2;
|
|
1962
|
-
}, "cue");
|
|
1963
|
-
var validateMeetingFindings = /* @__PURE__ */ __name((input) => validateFindings(input, { plural: "meeting findings", singular: "meeting finding", cited: "cue", reference: cue }), "validateMeetingFindings");
|
|
1964
|
-
var meetingFindingFingerprint = findingFingerprint;
|
|
1965
|
-
|
|
1966
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.586.0_@wirecat+cli-base@0.79.0_commander@15.0.0_esbuild@0.28.2_type_bdecddef0ae5a50ae90cab8b9e35c13b/node_modules/@wirecat/cli-core/dist/meetings/result-items.js
|
|
1967
|
-
var text3 = string();
|
|
1968
|
-
var identifier = pipe(text3, minLength(1));
|
|
1969
|
-
var nullableText = nullable(text3);
|
|
1970
|
-
var count3 = pipe(number(), integer(), minValue(0));
|
|
1971
|
-
var flag = boolean();
|
|
1972
|
-
var scope = strictObject({ provider: text3, account: text3 });
|
|
1973
|
-
var run = strictObject({
|
|
1974
|
-
meetings: count3,
|
|
1975
|
-
participants: count3,
|
|
1976
|
-
transcript_rows: count3,
|
|
1977
|
-
summaries: count3,
|
|
1978
|
-
warnings: array(strictObject({ external_id: text3, message: text3 })),
|
|
1979
|
-
timezone: optional(text3)
|
|
1980
|
-
});
|
|
1981
|
-
var exported = union([
|
|
1982
|
-
strictObject({ meeting_id: identifier, format: picklist(["markdown", "vtt"]), filename: text3, content: text3 }),
|
|
1983
|
-
strictObject({ meeting_id: identifier, format: picklist(["markdown", "vtt"]), output: text3 })
|
|
1984
|
-
]);
|
|
1985
|
-
var eventChange = strictObject({
|
|
1986
|
-
action: literal("event.link"),
|
|
1987
|
-
event_id: nullable(identifier),
|
|
1988
|
-
expected_event_id: optional(nullable(identifier))
|
|
1989
|
-
});
|
|
1990
|
-
var personChange = strictObject({
|
|
1991
|
-
action: literal("person.link"),
|
|
1992
|
-
participant_id: identifier,
|
|
1993
|
-
person_uid: text3,
|
|
1994
|
-
expected_person_uid: optional(nullableText),
|
|
1995
|
-
target_account_ids: optional(array(identifier))
|
|
1996
|
-
});
|
|
1997
|
-
var eventResult = strictObject({
|
|
1998
|
-
meeting_id: identifier,
|
|
1999
|
-
event_id: nullable(identifier),
|
|
2000
|
-
previous_event_id: nullable(identifier),
|
|
2001
|
-
changed: flag
|
|
2002
|
-
});
|
|
2003
|
-
var personResult = strictObject({
|
|
2004
|
-
meeting_id: identifier,
|
|
2005
|
-
participant_id: identifier,
|
|
2006
|
-
person_uid: text3,
|
|
2007
|
-
previous_person_uid: nullableText,
|
|
2008
|
-
changed: flag
|
|
2009
|
-
});
|
|
2010
|
-
var meetingChange = strictObject({
|
|
2011
|
-
scope,
|
|
2012
|
-
account_id: identifier,
|
|
2013
|
-
meeting_id: identifier,
|
|
2014
|
-
change: union([eventChange, personChange]),
|
|
2015
|
-
applied: flag,
|
|
2016
|
-
result: optional(union([eventResult, personResult]))
|
|
2017
|
-
});
|
|
2018
|
-
var recognition = strictObject({
|
|
2019
|
-
engine: text3,
|
|
2020
|
-
model: text3,
|
|
2021
|
-
version: optional(text3),
|
|
2022
|
-
timing: optional(picklist(["fixed-windows", "recognition-segments"]))
|
|
2023
|
-
});
|
|
2024
|
-
var transcription = union([
|
|
2025
|
-
strictObject({
|
|
2026
|
-
applied: literal(false),
|
|
2027
|
-
account_id: identifier,
|
|
2028
|
-
external_id: text3,
|
|
2029
|
-
segments: count3,
|
|
2030
|
-
media: strictObject({
|
|
2031
|
-
id: text3,
|
|
2032
|
-
content_hash: text3,
|
|
2033
|
-
size: count3,
|
|
2034
|
-
duration_ms: count3,
|
|
2035
|
-
format: text3,
|
|
2036
|
-
sample_rate: count3,
|
|
2037
|
-
channels: count3,
|
|
2038
|
-
recognition
|
|
2039
|
-
})
|
|
2040
|
-
}),
|
|
2041
|
-
strictObject({
|
|
2042
|
-
applied: literal(true),
|
|
2043
|
-
account_id: identifier,
|
|
2044
|
-
external_id: text3,
|
|
2045
|
-
meeting_id: identifier,
|
|
2046
|
-
created: flag,
|
|
2047
|
-
inserted_transcripts: count3,
|
|
2048
|
-
replayed_transcripts: count3,
|
|
2049
|
-
superseded_transcripts: count3,
|
|
2050
|
-
segments: count3,
|
|
2051
|
-
media_sha256: text3,
|
|
2052
|
-
engine: text3,
|
|
2053
|
-
model: text3,
|
|
2054
|
-
model_version: nullableText,
|
|
2055
|
-
timing: picklist(["fixed-windows", "recognition-segments"])
|
|
2056
|
-
})
|
|
2057
|
-
]);
|
|
2058
|
-
var embeddingModel = strictObject({ key: text3, dims: count3, kind: picklist(["local", "remote"]), model: text3 });
|
|
2059
|
-
var embedding = union([
|
|
2060
|
-
strictObject({
|
|
2061
|
-
account_id: identifier,
|
|
2062
|
-
model: embeddingModel,
|
|
2063
|
-
status: strictObject({ chunks: count3, embedded: count3 }),
|
|
2064
|
-
applied: literal(false),
|
|
2065
|
-
scope: literal("existing-current-chunks"),
|
|
2066
|
-
rebuild_required: literal("explicit")
|
|
2067
|
-
}),
|
|
2068
|
-
strictObject({
|
|
2069
|
-
account_id: identifier,
|
|
2070
|
-
model: embeddingModel,
|
|
2071
|
-
saved: count3,
|
|
2072
|
-
skipped: count3,
|
|
2073
|
-
has_more: flag,
|
|
2074
|
-
next_hash: optional(text3),
|
|
2075
|
-
applied: literal(true),
|
|
2076
|
-
rebuild: strictObject({
|
|
2077
|
-
transcripts: count3,
|
|
2078
|
-
chunks: count3,
|
|
2079
|
-
has_more: flag,
|
|
2080
|
-
next_transcript_id: optional(identifier)
|
|
2081
|
-
})
|
|
2082
|
-
})
|
|
2083
|
-
]);
|
|
2084
|
-
var repair = strictObject({
|
|
2085
|
-
account_id: identifier,
|
|
2086
|
-
applied: flag,
|
|
2087
|
-
transcripts: count3,
|
|
2088
|
-
languages: array(strictObject({ language: nullableText, transcripts: count3 }))
|
|
2089
|
-
});
|
|
2090
|
-
var MEETING_RESULT_ENTITIES = {
|
|
2091
|
-
meeting_ingestion: run,
|
|
2092
|
-
meeting_export: exported,
|
|
2093
|
-
meeting_association: meetingChange,
|
|
2094
|
-
meeting_transcription: transcription,
|
|
2095
|
-
meeting_embedding: embedding,
|
|
2096
|
-
meeting_repair: repair
|
|
2097
|
-
};
|
|
2098
|
-
|
|
2099
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.586.0_@wirecat+cli-base@0.79.0_commander@15.0.0_esbuild@0.28.2_type_bdecddef0ae5a50ae90cab8b9e35c13b/node_modules/@wirecat/cli-core/dist/meetings/event-query.js
|
|
2100
|
-
var EVENT_QUERY = defineQuery({
|
|
2101
|
-
entity: "event",
|
|
2102
|
-
backend: "sql",
|
|
2103
|
-
fields: [
|
|
2104
|
-
{ name: "id", type: "num", operators: ["term", "range"], example: "id:1" },
|
|
2105
|
-
{ name: "origin", type: "enum", operators: ["term"], values: ["auto", "owner"], example: "origin:owner" },
|
|
2106
|
-
...["starts_at", "ends_at", "created_at", "updated_at"].map((name) => ({
|
|
2107
|
-
name,
|
|
2108
|
-
type: "time",
|
|
2109
|
-
operators: ["term", "range"],
|
|
2110
|
-
example: `${name}>=2026-01-01`
|
|
2111
|
-
}))
|
|
2112
|
-
]
|
|
2113
|
-
});
|
|
2114
|
-
|
|
2115
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.586.0_@wirecat+cli-base@0.79.0_commander@15.0.0_esbuild@0.28.2_type_bdecddef0ae5a50ae90cab8b9e35c13b/node_modules/@wirecat/cli-core/dist/meetings/events.js
|
|
2116
|
-
var linkEvent = /* @__PURE__ */ __name(async (store, details, now = Date.now()) => {
|
|
2117
|
-
const current = await store.meeting(details.meeting.id);
|
|
2118
|
-
if (!current)
|
|
2119
|
-
return null;
|
|
2120
|
-
const { meeting: meeting2, series } = current;
|
|
2121
|
-
if (meeting2.eventId !== null)
|
|
2122
|
-
return (await store.events()).find((e) => e.id === meeting2.eventId) ?? null;
|
|
2123
|
-
const candidates = meeting2.startedAt === null ? [] : await store.eventCandidates({
|
|
2124
|
-
meetingSeriesId: meeting2.meetingSeriesId,
|
|
2125
|
-
joinUrl: meeting2.joinUrl,
|
|
2126
|
-
startsAt: meeting2.startedAt,
|
|
2127
|
-
endsAt: meeting2.endedAt ?? meeting2.startedAt
|
|
2128
|
-
});
|
|
2129
|
-
if (candidates.length > 1) {
|
|
2130
|
-
await store.reviewMeetingLink?.(meeting2.id, candidates.map(({ id: id3 }) => id3), now);
|
|
2131
|
-
return null;
|
|
2132
|
-
}
|
|
2133
|
-
let event2 = candidates[0];
|
|
2134
|
-
if (!event2) {
|
|
2135
|
-
let eventSeriesId = series?.eventSeriesId ?? null;
|
|
2136
|
-
if (series?.kind === "recurring" && eventSeriesId === null) {
|
|
2137
|
-
const created = await store.createEventSeries({ title: series.title, recurrence: null, origin: "auto" }, now);
|
|
2138
|
-
eventSeriesId = created.id;
|
|
2139
|
-
await store.setEventSeries(series.id, eventSeriesId, now);
|
|
1848
|
+
if (finding.assignee === void 0 !== (finding.assigneeEvidence === void 0))
|
|
1849
|
+
return invalid3(`assignee comes with assignee_evidence: the ${rules.cited} references of this finding's evidence that name them, as a list of strings such as ["<reference>"]`);
|
|
1850
|
+
if (finding.assignee !== void 0 && (typeof finding.assignee !== "string" || !/^person:[1-9]\d*$/.test(finding.assignee)))
|
|
1851
|
+
return invalid3("an assignee must be a person reference");
|
|
1852
|
+
return {
|
|
1853
|
+
...base,
|
|
1854
|
+
kind: "task",
|
|
1855
|
+
type: finding.type,
|
|
1856
|
+
title: findingText(finding.title, 300),
|
|
1857
|
+
reason: findingText(finding.reason, 2e3),
|
|
1858
|
+
commitment: finding.commitment,
|
|
1859
|
+
...finding.dueAt === void 0 ? {} : {
|
|
1860
|
+
dueAt: meetingTimestamp(finding.dueAt, "a task's due_at"),
|
|
1861
|
+
dueEvidence: support(finding.dueEvidence, evidence, "due_evidence")
|
|
1862
|
+
},
|
|
1863
|
+
...finding.assignee === void 0 ? {} : {
|
|
1864
|
+
assignee: finding.assignee,
|
|
1865
|
+
assigneeEvidence: support(finding.assigneeEvidence, evidence, "assignee_evidence")
|
|
2140
1866
|
}
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
const
|
|
2155
|
-
|
|
2156
|
-
|
|
1867
|
+
};
|
|
1868
|
+
}, "validateFinding");
|
|
1869
|
+
var support = /* @__PURE__ */ __name((value, evidence, field) => {
|
|
1870
|
+
if (!Array.isArray(value) || value.length < 1 || value.length > 8 || value.some((ref) => typeof ref !== "string" || !evidence.some((item) => item.reference === ref)))
|
|
1871
|
+
return invalid3(`${field} lists 1\u20138 references this finding's evidence cites, as plain strings such as ["<reference>"], not evidence objects`);
|
|
1872
|
+
return [...new Set(value)].sort();
|
|
1873
|
+
}, "support");
|
|
1874
|
+
var validateBatch = /* @__PURE__ */ __name((input, rules, most, one) => {
|
|
1875
|
+
if (!input || typeof input !== "object" || Buffer.byteLength(JSON.stringify(input), "utf8") > 65536)
|
|
1876
|
+
return invalid3(`${rules.plural} take at most 65536 UTF-8 bytes`);
|
|
1877
|
+
findingFields(input, ["schemaVersion", "key", "extractor", "findings"], rules.singular);
|
|
1878
|
+
if (input.schemaVersion !== 1 || !Array.isArray(input.findings) || input.findings.length < 1 || input.findings.length > most)
|
|
1879
|
+
return invalid3(`schemaVersion 1 takes 1\u2013${most} ${rules.plural}`);
|
|
1880
|
+
const key = findingText(input.key, 64);
|
|
1881
|
+
if (!/^[a-zA-Z0-9][a-zA-Z0-9_.:-]*$/.test(key))
|
|
1882
|
+
return invalid3("a findings key uses letters, digits, dot, colon, underscore or hyphen");
|
|
1883
|
+
const ids2 = /* @__PURE__ */ new Set();
|
|
1884
|
+
const findings = input.findings.map((finding) => one(finding, ids2));
|
|
1885
|
+
return { schemaVersion: 1, key, extractor: findingText(input.extractor, 200), findings };
|
|
1886
|
+
}, "validateBatch");
|
|
1887
|
+
var validateFindings = /* @__PURE__ */ __name((input, rules) => validateBatch(input, rules, 16, (finding, ids2) => validateFinding(finding, rules, ids2)), "validateFindings");
|
|
1888
|
+
var findingFingerprint = /* @__PURE__ */ __name(({ id: _id, ...finding }) => findingHash(finding), "findingFingerprint");
|
|
1889
|
+
|
|
1890
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/meetings/findings.js
|
|
1891
|
+
var MEETING_FINDINGS_KIND = "meeting_findings";
|
|
1892
|
+
var cue = /* @__PURE__ */ __name((raw) => {
|
|
1893
|
+
const reference2 = canonicalMeetingReference(raw);
|
|
1894
|
+
if (parseMeetingReference(reference2).cuePosition === void 0)
|
|
1895
|
+
throw new CliError("validation_error", "finding evidence requires exact cue references and fingerprints");
|
|
1896
|
+
return reference2;
|
|
1897
|
+
}, "cue");
|
|
1898
|
+
var validateMeetingFindings = /* @__PURE__ */ __name((input) => validateFindings(input, { plural: "meeting findings", singular: "meeting finding", cited: "cue", reference: cue }), "validateMeetingFindings");
|
|
1899
|
+
var meetingFindingFingerprint = findingFingerprint;
|
|
2157
1900
|
|
|
2158
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1901
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/meetings/hit-query.js
|
|
2159
1902
|
var context = {
|
|
2160
1903
|
command: "search meetings",
|
|
2161
1904
|
guide: "https://github.com/WireCatLabs/cli-core/blob/main/docs/search/query-language.md#\u0432\u0441\u0442\u0440\u0435\u0447\u0438"
|
|
@@ -2218,7 +1961,7 @@ var MEETING_FIELDS = defineQuery({
|
|
|
2218
1961
|
});
|
|
2219
1962
|
var parseMeetingQuery = /* @__PURE__ */ __name((query) => validateQuery(parseLucene(query, { defaultField: "text", proximity: true, ...context }), MEETING_HIT_QUERY, context), "parseMeetingQuery");
|
|
2220
1963
|
|
|
2221
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1964
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/meetings/language.js
|
|
2222
1965
|
var LATIN_WORDS = {
|
|
2223
1966
|
en: ["the", "and", "is", "that", "you", "this", "what", "have", "with", "are"],
|
|
2224
1967
|
es: ["el", "los", "las", "por", "pero", "para", "est\xE1", "muy", "tambi\xE9n", "hay"],
|
|
@@ -2267,7 +2010,7 @@ var transcriptLanguage = /* @__PURE__ */ __name((texts) => {
|
|
|
2267
2010
|
return null;
|
|
2268
2011
|
}, "transcriptLanguage");
|
|
2269
2012
|
|
|
2270
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2013
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/meetings/ingest.js
|
|
2271
2014
|
var contentHash = /* @__PURE__ */ __name(async (text5) => {
|
|
2272
2015
|
const bytes = await crypto.subtle.digest("SHA-256", new TextEncoder().encode(text5));
|
|
2273
2016
|
return Array.from(new Uint8Array(bytes), (byte) => byte.toString(16).padStart(2, "0")).join("");
|
|
@@ -2304,7 +2047,7 @@ var timestamp2 = /* @__PURE__ */ __name((value) => {
|
|
|
2304
2047
|
return time;
|
|
2305
2048
|
}, "timestamp");
|
|
2306
2049
|
|
|
2307
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2050
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/meetings/transcript-text.js
|
|
2308
2051
|
var TranscriptTextError = class extends Error {
|
|
2309
2052
|
static {
|
|
2310
2053
|
__name(this, "TranscriptTextError");
|
|
@@ -2359,7 +2102,7 @@ var parseTranscriptText = /* @__PURE__ */ __name((input) => {
|
|
|
2359
2102
|
return { header, lines };
|
|
2360
2103
|
}, "parseTranscriptText");
|
|
2361
2104
|
|
|
2362
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2105
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/meetings/vtt.js
|
|
2363
2106
|
var VttError = class extends Error {
|
|
2364
2107
|
static {
|
|
2365
2108
|
__name(this, "VttError");
|
|
@@ -2411,7 +2154,7 @@ var parseVtt = /* @__PURE__ */ __name((input) => {
|
|
|
2411
2154
|
return cues;
|
|
2412
2155
|
}, "parseVtt");
|
|
2413
2156
|
|
|
2414
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2157
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/meetings/import.js
|
|
2415
2158
|
var importFiles = /* @__PURE__ */ __name(async (files, store, now = Date.now()) => {
|
|
2416
2159
|
const report = { meetings: 0, participants: 0, transcriptRows: 0, summaries: 0, warnings: [] };
|
|
2417
2160
|
for (const file of files) {
|
|
@@ -2444,10 +2187,10 @@ var importFiles = /* @__PURE__ */ __name(async (files, store, now = Date.now())
|
|
|
2444
2187
|
return report;
|
|
2445
2188
|
}, "importFiles");
|
|
2446
2189
|
|
|
2447
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2190
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/meetings/links.js
|
|
2448
2191
|
var CHAT_MESSAGES_READ = 1e5;
|
|
2449
2192
|
|
|
2450
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2193
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/meetings/meeting-management.js
|
|
2451
2194
|
var nonempty = /* @__PURE__ */ __name((value, name) => {
|
|
2452
2195
|
if (typeof value !== "string" || !value.trim())
|
|
2453
2196
|
throw new CliError("validation_error", `${name} must be nonempty`);
|
|
@@ -2498,7 +2241,7 @@ var validateMeetingChange = /* @__PURE__ */ __name((change, create) => {
|
|
|
2498
2241
|
return Object.freeze(result);
|
|
2499
2242
|
}, "validateMeetingChange");
|
|
2500
2243
|
|
|
2501
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2244
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/meetings/passage.js
|
|
2502
2245
|
var meetingHitContextLimits = /* @__PURE__ */ __name((options = {}) => {
|
|
2503
2246
|
const { before = 3, after = 3, bytes = 65536, max_read_bytes = 4194304, expected_fingerprint } = options;
|
|
2504
2247
|
if (![before, after].every((value) => Number.isSafeInteger(value) && value >= 0) || before + after > 999 || !Number.isSafeInteger(bytes) || bytes < 2 || bytes > 4194304 || !Number.isSafeInteger(max_read_bytes) || max_read_bytes < 1 || max_read_bytes > 67108864 || expected_fingerprint !== void 0 && (typeof expected_fingerprint !== "string" || !/^[a-f0-9]{64}$/.test(expected_fingerprint)))
|
|
@@ -2511,7 +2254,7 @@ var validateMeetingPassage = /* @__PURE__ */ __name((reference2, options) => {
|
|
|
2511
2254
|
throw new CliError("validation_error", "choose a cue reference and json, text or markdown output");
|
|
2512
2255
|
}, "validateMeetingPassage");
|
|
2513
2256
|
|
|
2514
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2257
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/meetings/preparation-context.js
|
|
2515
2258
|
var validateMeetingPreparationContext = /* @__PURE__ */ __name((original) => {
|
|
2516
2259
|
if (!original || typeof original !== "object" || Array.isArray(original))
|
|
2517
2260
|
throw new CliError("validation_error", "meeting preparation context is required");
|
|
@@ -2536,8 +2279,8 @@ var validateMeetingPreparationContext = /* @__PURE__ */ __name((original) => {
|
|
|
2536
2279
|
return { ...input, limit, maxReadBytes };
|
|
2537
2280
|
}, "validateMeetingPreparationContext");
|
|
2538
2281
|
|
|
2539
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2540
|
-
var
|
|
2282
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-answer.js
|
|
2283
|
+
var count3 = pipe(number(), integer(), minValue(0));
|
|
2541
2284
|
var id = pipe(string(), minLength(1));
|
|
2542
2285
|
var meetingProjectEvidence = strictObject({
|
|
2543
2286
|
schema_version: literal(1),
|
|
@@ -2563,16 +2306,16 @@ var meetingProjectEvidence = strictObject({
|
|
|
2563
2306
|
since: optional(isoTime),
|
|
2564
2307
|
until: optional(isoTime)
|
|
2565
2308
|
}),
|
|
2566
|
-
limits: strictObject({ limit:
|
|
2309
|
+
limits: strictObject({ limit: count3, max_read_bytes: count3, max_vocabulary_read_bytes: count3, max_terms: count3 }),
|
|
2567
2310
|
page: pageSchema,
|
|
2568
2311
|
coverage: strictObject({
|
|
2569
2312
|
archive_completeness: literal("unknown"),
|
|
2570
2313
|
current_revisions: literal(true),
|
|
2571
2314
|
indexing: picklist(["ready", "pending"]),
|
|
2572
2315
|
index_completeness: literal("unknown"),
|
|
2573
|
-
term_index:
|
|
2574
|
-
terms_total:
|
|
2575
|
-
remaining_terms:
|
|
2316
|
+
term_index: count3,
|
|
2317
|
+
terms_total: count3,
|
|
2318
|
+
remaining_terms: count3,
|
|
2576
2319
|
duplicates: literal("may-repeat-between-terms")
|
|
2577
2320
|
})
|
|
2578
2321
|
});
|
|
@@ -2657,7 +2400,7 @@ var meetingProjectEvidenceAnswer = /* @__PURE__ */ __name((page, prepared, comma
|
|
|
2657
2400
|
};
|
|
2658
2401
|
}, "meetingProjectEvidenceAnswer");
|
|
2659
2402
|
|
|
2660
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2403
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/meetings/search-validation.js
|
|
2661
2404
|
var validateMeetingHitSearch = /* @__PURE__ */ __name((query, options = {}) => {
|
|
2662
2405
|
const integer3 = /* @__PURE__ */ __name((value, low, high) => Number.isSafeInteger(value) && value >= low && value <= high, "integer");
|
|
2663
2406
|
if (typeof query !== "string" || !query.trim() || query.includes("\0") || new TextEncoder().encode(query).byteLength > 65536 || !integer3(options.limit ?? 100, 1, 1e3) || !integer3(options.maxReadBytes ?? 4194304, 1, 67108864) || [
|
|
@@ -2677,7 +2420,7 @@ var validateMeetingHitSearch = /* @__PURE__ */ __name((query, options = {}) => {
|
|
|
2677
2420
|
throw new CliError("validation_error", "choose one project selector and one tag or topic selector");
|
|
2678
2421
|
}, "validateMeetingHitSearch");
|
|
2679
2422
|
|
|
2680
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2423
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-query.js
|
|
2681
2424
|
var ids = {
|
|
2682
2425
|
meeting_id: "meetingId",
|
|
2683
2426
|
identity_id: "participantIdentityId",
|
|
@@ -2768,7 +2511,7 @@ var prepareMeetingProjectEvidence = /* @__PURE__ */ __name((project, request = {
|
|
|
2768
2511
|
return { project: project.trim(), options, query: frozen.join(" AND ") };
|
|
2769
2512
|
}, "prepareMeetingProjectEvidence");
|
|
2770
2513
|
|
|
2771
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2514
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/meetings/project-evidence.js
|
|
2772
2515
|
var readMeetingProjectEvidence = /* @__PURE__ */ __name(async (read, project, request = {}, now = Date.now()) => {
|
|
2773
2516
|
const prepared = prepareMeetingProjectEvidence(project, request, now);
|
|
2774
2517
|
const page = await read(prepared.project, prepared.options);
|
|
@@ -2776,7 +2519,7 @@ var readMeetingProjectEvidence = /* @__PURE__ */ __name(async (read, project, re
|
|
|
2776
2519
|
return meetingProjectEvidenceAnswer(page, prepared);
|
|
2777
2520
|
}, "readMeetingProjectEvidence");
|
|
2778
2521
|
|
|
2779
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2522
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/meetings/pull.js
|
|
2780
2523
|
var participantInput = /* @__PURE__ */ __name((p, provider, occurrenceId2, position, accountId) => {
|
|
2781
2524
|
const { identityExternalId, ...fields } = p;
|
|
2782
2525
|
const externalId = identityExternalId ?? (p.email ? `email:${p.email.toLowerCase()}` : p.externalId) ?? `name:${p.displayName ?? "unknown"}@${accountId}/${occurrenceId2}:${position}`;
|
|
@@ -2791,24 +2534,47 @@ var participantInput = /* @__PURE__ */ __name((p, provider, occurrenceId2, posit
|
|
|
2791
2534
|
}
|
|
2792
2535
|
};
|
|
2793
2536
|
}, "participantInput");
|
|
2537
|
+
var startOf = /* @__PURE__ */ __name((m) => {
|
|
2538
|
+
const at = Date.parse(m.occurrence.startedAt);
|
|
2539
|
+
return Number.isFinite(at) ? at : Number.POSITIVE_INFINITY;
|
|
2540
|
+
}, "startOf");
|
|
2794
2541
|
var pull = /* @__PURE__ */ __name(async (source, store, options) => {
|
|
2795
2542
|
const now = options.now ?? Date.now();
|
|
2796
|
-
const
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2543
|
+
for (const [name, ms] of [
|
|
2544
|
+
["lookbackMs", options.lookbackMs ?? 0],
|
|
2545
|
+
["overlapMs", source.overlapMs ?? 0]
|
|
2546
|
+
])
|
|
2547
|
+
if (!Number.isSafeInteger(ms) || ms < 0 || ms > 31 * 864e5)
|
|
2548
|
+
throw new Error(`${name} must be an integer from 0 through 31 days`);
|
|
2549
|
+
const lookbackMs = Math.max(options.lookbackMs ?? 0, source.overlapMs ?? 0);
|
|
2550
|
+
const cursor = options.rescan ? void 0 : await store.cursor(options.accountId);
|
|
2551
|
+
const since = options.since ?? cursor ?? new Date(now - 30 * 864e5).toISOString();
|
|
2800
2552
|
timestamp2(since);
|
|
2801
2553
|
const report = { meetings: 0, participants: 0, transcriptRows: 0, summaries: 0, warnings: [] };
|
|
2802
2554
|
let failed = false;
|
|
2555
|
+
let firstFailed;
|
|
2803
2556
|
const from = timestamp2(since) - lookbackMs;
|
|
2804
|
-
const meetings = await source.meetings(lookbackMs === 0 ? since : new Date(from).toISOString());
|
|
2805
|
-
for (const m of meetings) {
|
|
2557
|
+
const meetings = (await source.meetings(lookbackMs === 0 ? since : new Date(from).toISOString())).toSorted((a, b) => startOf(a) - startOf(b));
|
|
2558
|
+
for (const [index, m] of meetings.entries()) {
|
|
2559
|
+
const stop = options.budget?.take() ?? null;
|
|
2560
|
+
if (stop) {
|
|
2561
|
+
report.stopped = stop;
|
|
2562
|
+
report.remaining = meetings.length - index;
|
|
2563
|
+
const reached = Math.min(startOf(m), firstFailed ?? Number.POSITIVE_INFINITY);
|
|
2564
|
+
if (Number.isFinite(reached) && reached > timestamp2(since))
|
|
2565
|
+
await store.setCursor(options.accountId, new Date(reached).toISOString(), now);
|
|
2566
|
+
return report;
|
|
2567
|
+
}
|
|
2806
2568
|
const id3 = m.occurrence.id;
|
|
2569
|
+
const failedHere = /* @__PURE__ */ __name(() => {
|
|
2570
|
+
failed = true;
|
|
2571
|
+
firstFailed ??= startOf(m);
|
|
2572
|
+
}, "failedHere");
|
|
2807
2573
|
const read = /* @__PURE__ */ __name(async (part, call) => {
|
|
2808
2574
|
try {
|
|
2809
2575
|
return await call();
|
|
2810
2576
|
} catch (error) {
|
|
2811
|
-
|
|
2577
|
+
failedHere();
|
|
2812
2578
|
const message = error instanceof Error ? error.message : "could not be read";
|
|
2813
2579
|
report.warnings.push({ externalId: id3, message: `${part}: ${message}` });
|
|
2814
2580
|
return void 0;
|
|
@@ -2906,7 +2672,7 @@ unlinked`, format)],
|
|
|
2906
2672
|
report.transcriptRows += lines?.length ?? 0;
|
|
2907
2673
|
report.summaries += summary ? 1 : 0;
|
|
2908
2674
|
} catch (error) {
|
|
2909
|
-
|
|
2675
|
+
failedHere();
|
|
2910
2676
|
report.warnings.push({ externalId: id3, message: error instanceof Error ? error.message : "Meeting pull failed" });
|
|
2911
2677
|
}
|
|
2912
2678
|
}
|
|
@@ -2915,80 +2681,80 @@ unlinked`, format)],
|
|
|
2915
2681
|
return report;
|
|
2916
2682
|
}, "pull");
|
|
2917
2683
|
|
|
2918
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2919
|
-
var
|
|
2920
|
-
var
|
|
2684
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/meetings/read-answers.js
|
|
2685
|
+
var text3 = string();
|
|
2686
|
+
var count4 = pipe(number(), integer(), minValue(0));
|
|
2921
2687
|
var id2 = pipe(number(), integer(), minValue(1));
|
|
2922
2688
|
var iso3 = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
|
|
2923
2689
|
var meetingReview = strictObject({
|
|
2924
2690
|
ref: reference,
|
|
2925
2691
|
id: pipe(string(), minLength(1)),
|
|
2926
|
-
title: nullable(
|
|
2692
|
+
title: nullable(text3),
|
|
2927
2693
|
started_at: nullable(isoTime),
|
|
2928
|
-
duration_ms: nullable(
|
|
2929
|
-
participants_count: nullable(
|
|
2930
|
-
projects: array(
|
|
2694
|
+
duration_ms: nullable(count4),
|
|
2695
|
+
participants_count: nullable(count4),
|
|
2696
|
+
projects: array(text3),
|
|
2931
2697
|
/** Null when the meeting has no current transcript. */
|
|
2932
|
-
transcript: nullable(strictObject({ lines:
|
|
2698
|
+
transcript: nullable(strictObject({ lines: count4, words: count4 })),
|
|
2933
2699
|
/** The three who talked longest. */
|
|
2934
|
-
speakers: array(strictObject({ name: nullable(
|
|
2700
|
+
speakers: array(strictObject({ name: nullable(text3), talk_ms: count4 })),
|
|
2935
2701
|
/** The newest stored summary; null when there is none. */
|
|
2936
2702
|
summary: nullable(strictObject({
|
|
2937
|
-
source:
|
|
2938
|
-
title: nullable(
|
|
2939
|
-
overview: nullable(
|
|
2940
|
-
next_steps: array(
|
|
2941
|
-
url: nullable(
|
|
2703
|
+
source: text3,
|
|
2704
|
+
title: nullable(text3),
|
|
2705
|
+
overview: nullable(text3),
|
|
2706
|
+
next_steps: array(text3),
|
|
2707
|
+
url: nullable(text3)
|
|
2942
2708
|
}))
|
|
2943
2709
|
});
|
|
2944
2710
|
var meetingLink = strictObject({
|
|
2945
|
-
url:
|
|
2946
|
-
domain: nullable(
|
|
2711
|
+
url: text3,
|
|
2712
|
+
domain: nullable(text3),
|
|
2947
2713
|
/** The Google Docs, Sheets, Slides, Forms or Drive file it names. */
|
|
2948
|
-
document_id: nullable(
|
|
2949
|
-
count:
|
|
2714
|
+
document_id: nullable(text3),
|
|
2715
|
+
count: count4,
|
|
2950
2716
|
first_at: isoTime,
|
|
2951
2717
|
last_at: isoTime,
|
|
2952
|
-
senders: array(
|
|
2953
|
-
meetings: array(strictObject({ ref: reference, title: nullable(
|
|
2718
|
+
senders: array(text3),
|
|
2719
|
+
meetings: array(strictObject({ ref: reference, title: nullable(text3) }))
|
|
2954
2720
|
});
|
|
2955
2721
|
var meetingSpeaker = strictObject({
|
|
2956
2722
|
/** `person:<id>`, `identity:<id>`, `name:<lowercased name>` or `unknown`. */
|
|
2957
|
-
key:
|
|
2958
|
-
name: nullable(
|
|
2723
|
+
key: text3,
|
|
2724
|
+
name: nullable(text3),
|
|
2959
2725
|
person_id: nullable(id2),
|
|
2960
2726
|
identity_id: nullable(id2),
|
|
2961
|
-
meetings:
|
|
2962
|
-
lines:
|
|
2963
|
-
words:
|
|
2964
|
-
talk_ms:
|
|
2727
|
+
meetings: count4,
|
|
2728
|
+
lines: count4,
|
|
2729
|
+
words: count4,
|
|
2730
|
+
talk_ms: count4,
|
|
2965
2731
|
/** This speaker's part of all talk time, 0–1. */
|
|
2966
2732
|
share: pipe(number(), minValue(0), maxValue(1))
|
|
2967
2733
|
});
|
|
2968
2734
|
var meetingStats = strictObject({
|
|
2969
|
-
time_zone:
|
|
2970
|
-
meetings:
|
|
2971
|
-
lines:
|
|
2972
|
-
words:
|
|
2973
|
-
talk_ms:
|
|
2735
|
+
time_zone: text3,
|
|
2736
|
+
meetings: count4,
|
|
2737
|
+
lines: count4,
|
|
2738
|
+
words: count4,
|
|
2739
|
+
talk_ms: count4,
|
|
2974
2740
|
/** `week_start` is the Monday, as a date in `time_zone`. */
|
|
2975
|
-
weeks: array(strictObject({ week_start:
|
|
2741
|
+
weeks: array(strictObject({ week_start: text3, meetings: count4, talk_ms: count4 })),
|
|
2976
2742
|
top_speakers: array(meetingSpeaker)
|
|
2977
2743
|
});
|
|
2978
2744
|
var meetingCountsRow = strictObject({
|
|
2979
|
-
key:
|
|
2980
|
-
name: nullable(
|
|
2981
|
-
meetings:
|
|
2982
|
-
minutes:
|
|
2745
|
+
key: text3,
|
|
2746
|
+
name: nullable(text3),
|
|
2747
|
+
meetings: count4,
|
|
2748
|
+
minutes: count4,
|
|
2983
2749
|
mean_minutes: nullable(number()),
|
|
2984
|
-
transcripts:
|
|
2750
|
+
transcripts: count4
|
|
2985
2751
|
});
|
|
2986
2752
|
var meetingCounts = strictObject({
|
|
2987
2753
|
by: picklist(["day", "week", "series"]),
|
|
2988
|
-
meetings:
|
|
2989
|
-
minutes:
|
|
2754
|
+
meetings: count4,
|
|
2755
|
+
minutes: count4,
|
|
2990
2756
|
mean_minutes: nullable(number()),
|
|
2991
|
-
transcripts:
|
|
2757
|
+
transcripts: count4,
|
|
2992
2758
|
rows: array(meetingCountsRow),
|
|
2993
2759
|
has_more: boolean()
|
|
2994
2760
|
});
|
|
@@ -2997,27 +2763,27 @@ var meetingParticipants = strictObject({
|
|
|
2997
2763
|
schema_version: literal(1),
|
|
2998
2764
|
kind: literal("meeting_participants"),
|
|
2999
2765
|
account_id: id2,
|
|
3000
|
-
query:
|
|
2766
|
+
query: text3,
|
|
3001
2767
|
items: array(strictObject({
|
|
3002
2768
|
participant_id: id2,
|
|
3003
2769
|
meeting_id: id2,
|
|
3004
2770
|
identity_id: id2,
|
|
3005
|
-
display_name: nullable(
|
|
3006
|
-
email: nullable(
|
|
2771
|
+
display_name: nullable(text3),
|
|
2772
|
+
email: nullable(text3)
|
|
3007
2773
|
})),
|
|
3008
2774
|
/** Several identities on one page are observations, never speaker attribution or person links. */
|
|
3009
2775
|
ambiguity: strictObject({ scope: literal("page"), multiple_identities: boolean(), identity_ids: array(id2) }),
|
|
3010
2776
|
coverage: strictObject({
|
|
3011
|
-
scanned:
|
|
3012
|
-
read_bytes:
|
|
2777
|
+
scanned: count4,
|
|
2778
|
+
read_bytes: count4,
|
|
3013
2779
|
archive_completeness: literal("unknown"),
|
|
3014
2780
|
truncated_by: truncated("limit", "scan_limit", "read_bytes")
|
|
3015
2781
|
}),
|
|
3016
2782
|
page: strictObject({
|
|
3017
2783
|
mode: literal("cursor"),
|
|
3018
|
-
limit:
|
|
2784
|
+
limit: count4,
|
|
3019
2785
|
has_more: boolean(),
|
|
3020
|
-
next_cursor: optional(
|
|
2786
|
+
next_cursor: optional(text3)
|
|
3021
2787
|
})
|
|
3022
2788
|
});
|
|
3023
2789
|
var revision = picklist(["current", "superseded"]);
|
|
@@ -3026,15 +2792,15 @@ var meetingPassage = strictObject({
|
|
|
3026
2792
|
kind: literal("meeting_context"),
|
|
3027
2793
|
source: reference,
|
|
3028
2794
|
target_ref: reference,
|
|
3029
|
-
target_fingerprint:
|
|
3030
|
-
fingerprint:
|
|
2795
|
+
target_fingerprint: text3,
|
|
2796
|
+
fingerprint: text3,
|
|
3031
2797
|
revision,
|
|
3032
|
-
limits: strictObject({ before:
|
|
3033
|
-
content_bytes:
|
|
2798
|
+
limits: strictObject({ before: count4, after: count4, bytes: count4, max_read_bytes: count4 }),
|
|
2799
|
+
content_bytes: count4,
|
|
3034
2800
|
coverage: strictObject({
|
|
3035
|
-
included:
|
|
3036
|
-
before:
|
|
3037
|
-
after:
|
|
2801
|
+
included: count4,
|
|
2802
|
+
before: count4,
|
|
2803
|
+
after: count4,
|
|
3038
2804
|
has_before: boolean(),
|
|
3039
2805
|
has_after: boolean(),
|
|
3040
2806
|
truncated_by: truncated("bytes"),
|
|
@@ -3046,30 +2812,30 @@ var meetingPassage = strictObject({
|
|
|
3046
2812
|
}),
|
|
3047
2813
|
items: array(strictObject({
|
|
3048
2814
|
ref: reference,
|
|
3049
|
-
fingerprint:
|
|
2815
|
+
fingerprint: text3,
|
|
3050
2816
|
transcript_id: id2,
|
|
3051
|
-
content_hash: nullable(
|
|
3052
|
-
position:
|
|
3053
|
-
start_ms:
|
|
3054
|
-
end_ms:
|
|
2817
|
+
content_hash: nullable(text3),
|
|
2818
|
+
position: count4,
|
|
2819
|
+
start_ms: count4,
|
|
2820
|
+
end_ms: count4,
|
|
3055
2821
|
speaker_participant_id: nullable(id2),
|
|
3056
|
-
speaker_name: nullable(
|
|
3057
|
-
text:
|
|
2822
|
+
speaker_name: nullable(text3),
|
|
2823
|
+
text: text3,
|
|
3058
2824
|
revision
|
|
3059
2825
|
}))
|
|
3060
2826
|
});
|
|
3061
2827
|
var event = strictObject({
|
|
3062
2828
|
id: pipe(string(), minLength(1)),
|
|
3063
|
-
event_series_id: nullable(
|
|
3064
|
-
title: nullable(
|
|
3065
|
-
description: nullable(
|
|
3066
|
-
location: nullable(
|
|
2829
|
+
event_series_id: nullable(text3),
|
|
2830
|
+
title: nullable(text3),
|
|
2831
|
+
description: nullable(text3),
|
|
2832
|
+
location: nullable(text3),
|
|
3067
2833
|
starts_at: nullable(isoTime),
|
|
3068
2834
|
ends_at: nullable(isoTime),
|
|
3069
|
-
timezone: nullable(
|
|
2835
|
+
timezone: nullable(text3),
|
|
3070
2836
|
/** `auto`: made from a meeting; `owner`: made by hand; `calendar`: from a calendar's entries. */
|
|
3071
2837
|
origin: picklist(["auto", "owner", "calendar"]),
|
|
3072
|
-
status: nullable(
|
|
2838
|
+
status: nullable(text3),
|
|
3073
2839
|
all_day: boolean(),
|
|
3074
2840
|
/** When its calendar deleted it: shown as "deleted in Google", kept as history. */
|
|
3075
2841
|
source_deleted_at: nullable(isoTime),
|
|
@@ -3077,7 +2843,7 @@ var event = strictObject({
|
|
|
3077
2843
|
created_at: isoTime,
|
|
3078
2844
|
updated_at: isoTime,
|
|
3079
2845
|
/** The fields whoever sent the invitation wrote, on a calendar CLI's `events list`: an agent reads them as data. */
|
|
3080
|
-
untrusted: optional(array(
|
|
2846
|
+
untrusted: optional(array(text3)),
|
|
3081
2847
|
/** On a calendar CLI's `events list changed:<date>`: what changed since then, and when the store saw it. */
|
|
3082
2848
|
change: optional(picklist(["new", "moved", "cancelled"])),
|
|
3083
2849
|
changed_at: optional(nullable(isoTime)),
|
|
@@ -3089,7 +2855,7 @@ var event = strictObject({
|
|
|
3089
2855
|
*/
|
|
3090
2856
|
overlapping: optional(boolean()),
|
|
3091
2857
|
/** With `overlapping:true`: the events it overlaps, as `event:<id>`. */
|
|
3092
|
-
overlaps: optional(array(
|
|
2858
|
+
overlaps: optional(array(text3))
|
|
3093
2859
|
});
|
|
3094
2860
|
var eventItem = /* @__PURE__ */ __name((one) => ({
|
|
3095
2861
|
id: String(one.id),
|
|
@@ -3109,10 +2875,10 @@ var eventItem = /* @__PURE__ */ __name((one) => ({
|
|
|
3109
2875
|
updated_at: new Date(one.updatedAt).toISOString()
|
|
3110
2876
|
}), "eventItem");
|
|
3111
2877
|
|
|
3112
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2878
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/meetings/recording-transfer.js
|
|
3113
2879
|
var strongRecordingValidator = /* @__PURE__ */ __name((value) => typeof value === "string" && value.length <= 1024 && /^"[\x21\x23-\x7e\x80-\xff]*"$/.test(value), "strongRecordingValidator");
|
|
3114
2880
|
|
|
3115
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2881
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/meetings/related-history.js
|
|
3116
2882
|
var validateMeetingRelatedHistory = /* @__PURE__ */ __name((original) => {
|
|
3117
2883
|
if (!original || typeof original !== "object" || Array.isArray(original))
|
|
3118
2884
|
throw new CliError("validation_error", "related history request is required");
|
|
@@ -3142,14 +2908,147 @@ var validateMeetingRelatedHistory = /* @__PURE__ */ __name((original) => {
|
|
|
3142
2908
|
return { ...input, anchorIds: [...new Set(input.anchorIds)], limit, maxReadBytes };
|
|
3143
2909
|
}, "validateMeetingRelatedHistory");
|
|
3144
2910
|
|
|
3145
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2911
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/meetings/result-items.js
|
|
2912
|
+
var text4 = string();
|
|
2913
|
+
var identifier = pipe(text4, minLength(1));
|
|
2914
|
+
var nullableText = nullable(text4);
|
|
2915
|
+
var count5 = pipe(number(), integer(), minValue(0));
|
|
2916
|
+
var flag = boolean();
|
|
2917
|
+
var scope = strictObject({ provider: text4, account: text4 });
|
|
2918
|
+
var run = strictObject({
|
|
2919
|
+
meetings: count5,
|
|
2920
|
+
participants: count5,
|
|
2921
|
+
transcript_rows: count5,
|
|
2922
|
+
summaries: count5,
|
|
2923
|
+
warnings: array(strictObject({ external_id: text4, message: text4 })),
|
|
2924
|
+
timezone: optional(text4)
|
|
2925
|
+
});
|
|
2926
|
+
var exported = union([
|
|
2927
|
+
strictObject({ meeting_id: identifier, format: picklist(["markdown", "vtt"]), filename: text4, content: text4 }),
|
|
2928
|
+
strictObject({ meeting_id: identifier, format: picklist(["markdown", "vtt"]), output: text4 })
|
|
2929
|
+
]);
|
|
2930
|
+
var eventChange = strictObject({
|
|
2931
|
+
action: literal("event.link"),
|
|
2932
|
+
event_id: nullable(identifier),
|
|
2933
|
+
expected_event_id: optional(nullable(identifier))
|
|
2934
|
+
});
|
|
2935
|
+
var personChange = strictObject({
|
|
2936
|
+
action: literal("person.link"),
|
|
2937
|
+
participant_id: identifier,
|
|
2938
|
+
person_uid: text4,
|
|
2939
|
+
expected_person_uid: optional(nullableText),
|
|
2940
|
+
target_account_ids: optional(array(identifier))
|
|
2941
|
+
});
|
|
2942
|
+
var eventResult = strictObject({
|
|
2943
|
+
meeting_id: identifier,
|
|
2944
|
+
event_id: nullable(identifier),
|
|
2945
|
+
previous_event_id: nullable(identifier),
|
|
2946
|
+
changed: flag
|
|
2947
|
+
});
|
|
2948
|
+
var personResult = strictObject({
|
|
2949
|
+
meeting_id: identifier,
|
|
2950
|
+
participant_id: identifier,
|
|
2951
|
+
person_uid: text4,
|
|
2952
|
+
previous_person_uid: nullableText,
|
|
2953
|
+
changed: flag
|
|
2954
|
+
});
|
|
2955
|
+
var meetingChange = strictObject({
|
|
2956
|
+
scope,
|
|
2957
|
+
account_id: identifier,
|
|
2958
|
+
meeting_id: identifier,
|
|
2959
|
+
change: union([eventChange, personChange]),
|
|
2960
|
+
applied: flag,
|
|
2961
|
+
result: optional(union([eventResult, personResult]))
|
|
2962
|
+
});
|
|
2963
|
+
var recognition = strictObject({
|
|
2964
|
+
engine: text4,
|
|
2965
|
+
model: text4,
|
|
2966
|
+
version: optional(text4),
|
|
2967
|
+
timing: optional(picklist(["fixed-windows", "recognition-segments"]))
|
|
2968
|
+
});
|
|
2969
|
+
var transcription = union([
|
|
2970
|
+
strictObject({
|
|
2971
|
+
applied: literal(false),
|
|
2972
|
+
account_id: identifier,
|
|
2973
|
+
external_id: text4,
|
|
2974
|
+
segments: count5,
|
|
2975
|
+
media: strictObject({
|
|
2976
|
+
id: text4,
|
|
2977
|
+
content_hash: text4,
|
|
2978
|
+
size: count5,
|
|
2979
|
+
duration_ms: count5,
|
|
2980
|
+
format: text4,
|
|
2981
|
+
sample_rate: count5,
|
|
2982
|
+
channels: count5,
|
|
2983
|
+
recognition
|
|
2984
|
+
})
|
|
2985
|
+
}),
|
|
2986
|
+
strictObject({
|
|
2987
|
+
applied: literal(true),
|
|
2988
|
+
account_id: identifier,
|
|
2989
|
+
external_id: text4,
|
|
2990
|
+
meeting_id: identifier,
|
|
2991
|
+
created: flag,
|
|
2992
|
+
inserted_transcripts: count5,
|
|
2993
|
+
replayed_transcripts: count5,
|
|
2994
|
+
superseded_transcripts: count5,
|
|
2995
|
+
segments: count5,
|
|
2996
|
+
media_sha256: text4,
|
|
2997
|
+
engine: text4,
|
|
2998
|
+
model: text4,
|
|
2999
|
+
model_version: nullableText,
|
|
3000
|
+
timing: picklist(["fixed-windows", "recognition-segments"])
|
|
3001
|
+
})
|
|
3002
|
+
]);
|
|
3003
|
+
var embeddingModel = strictObject({ key: text4, dims: count5, kind: picklist(["local", "remote"]), model: text4 });
|
|
3004
|
+
var embedding = union([
|
|
3005
|
+
strictObject({
|
|
3006
|
+
account_id: identifier,
|
|
3007
|
+
model: embeddingModel,
|
|
3008
|
+
status: strictObject({ chunks: count5, embedded: count5 }),
|
|
3009
|
+
applied: literal(false),
|
|
3010
|
+
scope: literal("existing-current-chunks"),
|
|
3011
|
+
rebuild_required: literal("explicit")
|
|
3012
|
+
}),
|
|
3013
|
+
strictObject({
|
|
3014
|
+
account_id: identifier,
|
|
3015
|
+
model: embeddingModel,
|
|
3016
|
+
saved: count5,
|
|
3017
|
+
skipped: count5,
|
|
3018
|
+
has_more: flag,
|
|
3019
|
+
next_hash: optional(text4),
|
|
3020
|
+
applied: literal(true),
|
|
3021
|
+
rebuild: strictObject({
|
|
3022
|
+
transcripts: count5,
|
|
3023
|
+
chunks: count5,
|
|
3024
|
+
has_more: flag,
|
|
3025
|
+
next_transcript_id: optional(identifier)
|
|
3026
|
+
})
|
|
3027
|
+
})
|
|
3028
|
+
]);
|
|
3029
|
+
var repair = strictObject({
|
|
3030
|
+
account_id: identifier,
|
|
3031
|
+
applied: flag,
|
|
3032
|
+
transcripts: count5,
|
|
3033
|
+
languages: array(strictObject({ language: nullableText, transcripts: count5 }))
|
|
3034
|
+
});
|
|
3035
|
+
var MEETING_RESULT_ENTITIES = {
|
|
3036
|
+
meeting_ingestion: run,
|
|
3037
|
+
meeting_export: exported,
|
|
3038
|
+
meeting_association: meetingChange,
|
|
3039
|
+
meeting_transcription: transcription,
|
|
3040
|
+
meeting_embedding: embedding,
|
|
3041
|
+
meeting_repair: repair
|
|
3042
|
+
};
|
|
3043
|
+
|
|
3044
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/meetings/review.js
|
|
3146
3045
|
var REVIEW_LIMIT = { default: 50, most: 200 };
|
|
3147
3046
|
|
|
3148
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3047
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/meetings/save-hints.js
|
|
3149
3048
|
var SAVE_HELP = `Worth keeping \u2014 a decision, a promise, a preference? Record it with \`memo facts add\` or
|
|
3150
3049
|
\`memo memories add\`, citing the msg: locator or meeting: reference as --evidence.`;
|
|
3151
3050
|
|
|
3152
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3051
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/meetings/series-history.js
|
|
3153
3052
|
var validateMeetingSeriesHistory = /* @__PURE__ */ __name((input) => {
|
|
3154
3053
|
input.signal?.throwIfAborted();
|
|
3155
3054
|
if (!Number.isSafeInteger(input.accountId) || input.accountId <= 0)
|
|
@@ -3170,10 +3069,10 @@ var validateMeetingSeriesHistory = /* @__PURE__ */ __name((input) => {
|
|
|
3170
3069
|
return { ...input, limit, maxReadBytes };
|
|
3171
3070
|
}, "validateMeetingSeriesHistory");
|
|
3172
3071
|
|
|
3173
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3072
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/meetings/upcoming-validation.js
|
|
3174
3073
|
var occurrenceId = /* @__PURE__ */ __name((value) => typeof value === "string" && value.trim().length > 0 && value.length <= 1e3 && !/[\0\r\n]/.test(value), "occurrenceId");
|
|
3175
3074
|
|
|
3176
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3075
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/meetings/series-inventory-validation.js
|
|
3177
3076
|
function invalid4(field, response = false) {
|
|
3178
3077
|
throw new CliError(response ? "invalid_response" : "validation_error", `invalid meeting inventory ${field}`);
|
|
3179
3078
|
}
|
|
@@ -3202,7 +3101,7 @@ var validateMeetingSeriesInventoryCursor = /* @__PURE__ */ __name((value) => {
|
|
|
3202
3101
|
cursorDetails(value);
|
|
3203
3102
|
}, "validateMeetingSeriesInventoryCursor");
|
|
3204
3103
|
|
|
3205
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3104
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/meetings/stats.js
|
|
3206
3105
|
var MEETING_COUNTS_GROUPINGS = ["day", "week", "series"];
|
|
3207
3106
|
var zoneOf = /* @__PURE__ */ __name((timeZone) => {
|
|
3208
3107
|
const zone = timeZone ?? "UTC";
|
|
@@ -3337,19 +3236,90 @@ var aggregateMeetingStats = /* @__PURE__ */ __name((rows, timeZone) => {
|
|
|
3337
3236
|
};
|
|
3338
3237
|
}, "aggregateMeetingStats");
|
|
3339
3238
|
|
|
3340
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3341
|
-
var
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3239
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/domain/money.js
|
|
3240
|
+
var CURRENCY_SCALES = {
|
|
3241
|
+
AED: 2,
|
|
3242
|
+
AMD: 2,
|
|
3243
|
+
AUD: 2,
|
|
3244
|
+
BHD: 3,
|
|
3245
|
+
BYN: 2,
|
|
3246
|
+
CAD: 2,
|
|
3247
|
+
CHF: 2,
|
|
3248
|
+
CLP: 0,
|
|
3249
|
+
CNY: 2,
|
|
3250
|
+
CZK: 2,
|
|
3251
|
+
DKK: 2,
|
|
3252
|
+
EUR: 2,
|
|
3253
|
+
GBP: 2,
|
|
3254
|
+
GEL: 2,
|
|
3255
|
+
HUF: 2,
|
|
3256
|
+
ILS: 2,
|
|
3257
|
+
INR: 2,
|
|
3258
|
+
ISK: 0,
|
|
3259
|
+
JPY: 0,
|
|
3260
|
+
KGS: 2,
|
|
3261
|
+
KRW: 0,
|
|
3262
|
+
KWD: 3,
|
|
3263
|
+
KZT: 2,
|
|
3264
|
+
NOK: 2,
|
|
3265
|
+
PLN: 2,
|
|
3266
|
+
RSD: 2,
|
|
3267
|
+
RUB: 2,
|
|
3268
|
+
SEK: 2,
|
|
3269
|
+
THB: 2,
|
|
3270
|
+
TRY: 2,
|
|
3271
|
+
UAH: 2,
|
|
3272
|
+
USD: 2,
|
|
3273
|
+
UZS: 2,
|
|
3274
|
+
VND: 0
|
|
3275
|
+
};
|
|
3276
|
+
var refuse = /* @__PURE__ */ __name((message, reason) => {
|
|
3277
|
+
throw new CliError("validation_error", message, { reason });
|
|
3278
|
+
}, "refuse");
|
|
3279
|
+
var DECIMAL = /^(\d{1,15})(?:\.(\d+))?$/;
|
|
3280
|
+
var parseDecimal = /* @__PURE__ */ __name((text5, scale) => {
|
|
3281
|
+
const match = DECIMAL.exec(text5.trim());
|
|
3282
|
+
if (!match || (match[2] ?? "").length > scale)
|
|
3283
|
+
return void 0;
|
|
3284
|
+
return BigInt(`${match[1]}${(match[2] ?? "").padEnd(scale, "0")}`);
|
|
3285
|
+
}, "parseDecimal");
|
|
3286
|
+
var formatDecimal = /* @__PURE__ */ __name((units, scale) => {
|
|
3287
|
+
const digits = BigInt(units).toString().padStart(scale + 1, "0");
|
|
3288
|
+
return scale === 0 ? digits : `${digits.slice(0, -scale)}.${digits.slice(-scale)}`;
|
|
3289
|
+
}, "formatDecimal");
|
|
3290
|
+
var groupDigits = /* @__PURE__ */ __name((decimal) => {
|
|
3291
|
+
const [whole = "0", fraction] = decimal.split(".");
|
|
3292
|
+
const grouped2 = whole.replace(/\B(?=(\d{3})+(?!\d))/g, " ");
|
|
3293
|
+
return fraction === void 0 ? grouped2 : `${grouped2}.${fraction}`;
|
|
3294
|
+
}, "groupDigits");
|
|
3295
|
+
var currencyOf = /* @__PURE__ */ __name((text5) => {
|
|
3296
|
+
const code = typeof text5 === "string" ? text5.trim().toUpperCase() : "";
|
|
3297
|
+
if (CURRENCY_SCALES[code] === void 0)
|
|
3298
|
+
return refuse(`${typeof text5 === "string" && text5.trim() ? text5.trim() : "an empty currency"} is not a currency the store keeps; use one of ${Object.keys(CURRENCY_SCALES).join(", ")}`, "money.currency");
|
|
3299
|
+
return code;
|
|
3300
|
+
}, "currencyOf");
|
|
3301
|
+
var scaleOf = /* @__PURE__ */ __name((currency) => CURRENCY_SCALES[currencyOf(currency)], "scaleOf");
|
|
3302
|
+
var minorUnits = /* @__PURE__ */ __name((amount, currency, what = "an amount") => {
|
|
3303
|
+
const scale = scaleOf(currency);
|
|
3304
|
+
const units = typeof amount === "string" ? parseDecimal(amount, scale) : void 0;
|
|
3305
|
+
if (units === void 0 || units > BigInt(Number.MAX_SAFE_INTEGER))
|
|
3306
|
+
return refuse(`${what} is a decimal string with at most ${scale} decimal${scale === 1 ? "" : "s"} for ${currency}, such as "${formatDecimal(5e3 * 10 ** scale, scale)}"`, "money.amount");
|
|
3307
|
+
return Number(units);
|
|
3308
|
+
}, "minorUnits");
|
|
3309
|
+
var moneyOf = /* @__PURE__ */ __name((units, currency) => ({
|
|
3310
|
+
amount: formatDecimal(units, scaleOf(currency)),
|
|
3311
|
+
currency
|
|
3312
|
+
}), "moneyOf");
|
|
3313
|
+
var moneyLabel = /* @__PURE__ */ __name((units, currency) => `${groupDigits(formatDecimal(units, scaleOf(currency)))} ${currency}`, "moneyLabel");
|
|
3314
|
+
var QUANTITY_SCALE = 3;
|
|
3315
|
+
var quantityOf = /* @__PURE__ */ __name((text5) => {
|
|
3316
|
+
const thousandths = typeof text5 === "string" ? parseDecimal(text5, QUANTITY_SCALE) : void 0;
|
|
3317
|
+
if (thousandths === void 0 || thousandths === 0n)
|
|
3318
|
+
return refuse('a quantity is a decimal string above 0 with at most 3 decimals, such as "1.5"', "money.quantity");
|
|
3319
|
+
const plain = formatDecimal(thousandths, QUANTITY_SCALE).replace(/\.?0+$/, "");
|
|
3320
|
+
return { text: plain, thousandths };
|
|
3321
|
+
}, "quantityOf");
|
|
3322
|
+
var lineUnits = /* @__PURE__ */ __name((thousandths, unitPrice) => Number((thousandths * BigInt(unitPrice) + 500n) / 1000n), "lineUnits");
|
|
3353
3323
|
|
|
3354
3324
|
export {
|
|
3355
3325
|
parseDecimal,
|
|
@@ -3361,19 +3331,6 @@ export {
|
|
|
3361
3331
|
moneyLabel,
|
|
3362
3332
|
quantityOf,
|
|
3363
3333
|
lineUnits,
|
|
3364
|
-
INVOICE_DIRECTIONS,
|
|
3365
|
-
INVOICE_STATUSES,
|
|
3366
|
-
MONEY_DIRECTIONS,
|
|
3367
|
-
FINANCE_REVIEWS,
|
|
3368
|
-
settledStatus,
|
|
3369
|
-
invoiceLine,
|
|
3370
|
-
paymentLine,
|
|
3371
|
-
invoiceTitle,
|
|
3372
|
-
paymentEntryTitle,
|
|
3373
|
-
ORDER_STATUSES,
|
|
3374
|
-
ORDER_PURPOSES,
|
|
3375
|
-
orderLine,
|
|
3376
|
-
orderTitle,
|
|
3377
3334
|
QUERY_LIMITS,
|
|
3378
3335
|
queryAstSchema,
|
|
3379
3336
|
queryError,
|
|
@@ -3426,6 +3383,8 @@ export {
|
|
|
3426
3383
|
meetingSummaryAnswer,
|
|
3427
3384
|
exportMeeting,
|
|
3428
3385
|
FACT_TYPES,
|
|
3386
|
+
PAYMENT_DIRECTIONS,
|
|
3387
|
+
PAYMENT_STATES,
|
|
3429
3388
|
validatePayment,
|
|
3430
3389
|
paymentTitle,
|
|
3431
3390
|
meetingTimestamp,
|
|
@@ -3473,8 +3432,5 @@ export {
|
|
|
3473
3432
|
validateMeetingSeriesHistory,
|
|
3474
3433
|
validateMeetingSeriesInventoryCursor,
|
|
3475
3434
|
aggregateMeetingCounts,
|
|
3476
|
-
aggregateMeetingStats
|
|
3477
|
-
TAG_TYPES,
|
|
3478
|
-
tagOf,
|
|
3479
|
-
normalizeTag
|
|
3435
|
+
aggregateMeetingStats
|
|
3480
3436
|
};
|