@noy-db/hub 0.1.0-pre.9 → 0.2.0-pre.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/aggregate/index.cjs +91 -36
- package/dist/aggregate/index.cjs.map +1 -1
- package/dist/aggregate/index.d.cts +2 -2
- package/dist/aggregate/index.d.ts +2 -2
- package/dist/aggregate/index.js +16 -9
- package/dist/aggregate/index.js.map +1 -1
- package/dist/attestation/index.cjs +305 -0
- package/dist/attestation/index.cjs.map +1 -0
- package/dist/attestation/index.d.cts +52 -0
- package/dist/attestation/index.d.ts +52 -0
- package/dist/attestation/index.js +36 -0
- package/dist/attestation/index.js.map +1 -0
- package/dist/blobs/index.cjs.map +1 -1
- package/dist/blobs/index.d.cts +7 -6
- package/dist/blobs/index.d.ts +7 -6
- package/dist/blobs/index.js +10 -8
- package/dist/blobs/index.js.map +1 -1
- package/dist/bundle/index.cjs +16923 -60
- package/dist/bundle/index.cjs.map +1 -1
- package/dist/bundle/index.d.cts +175 -6
- package/dist/bundle/index.d.ts +175 -6
- package/dist/bundle/index.js +543 -4
- package/dist/bundle/index.js.map +1 -1
- package/dist/{chunk-PTVMYYON.js → chunk-243PNUA6.js} +3 -3
- package/dist/{chunk-MR4424N3.js → chunk-2PAQNPE3.js} +2 -2
- package/dist/chunk-3QAKZ37R.js +83 -0
- package/dist/chunk-3QAKZ37R.js.map +1 -0
- package/dist/chunk-3S4BJX25.js +36 -0
- package/dist/chunk-3S4BJX25.js.map +1 -0
- package/dist/chunk-3XHOCQK4.js +118 -0
- package/dist/chunk-3XHOCQK4.js.map +1 -0
- package/dist/{chunk-AVVPZ4BC.js → chunk-3Y53S2SA.js} +4 -4
- package/dist/chunk-3Z2TPHC4.js +291 -0
- package/dist/chunk-3Z2TPHC4.js.map +1 -0
- package/dist/chunk-4HIL6AHQ.js +57 -0
- package/dist/chunk-4HIL6AHQ.js.map +1 -0
- package/dist/chunk-5ZGZ6HIZ.js +100 -0
- package/dist/chunk-5ZGZ6HIZ.js.map +1 -0
- package/dist/{chunk-ZFKD4QMV.js → chunk-7BRE6EUA.js} +3 -3
- package/dist/chunk-7BUTTVMR.js +34 -0
- package/dist/chunk-7BUTTVMR.js.map +1 -0
- package/dist/{chunk-VQBTTTUN.js → chunk-7Q5PLD5C.js} +4 -4
- package/dist/{chunk-VQBTTTUN.js.map → chunk-7Q5PLD5C.js.map} +1 -1
- package/dist/{chunk-QAVUREFT.js → chunk-7Z23ZFLV.js} +12 -6
- package/dist/chunk-7Z23ZFLV.js.map +1 -0
- package/dist/chunk-AHPFONIL.js +59 -0
- package/dist/chunk-AHPFONIL.js.map +1 -0
- package/dist/chunk-CXSCDO5T.js +51 -0
- package/dist/chunk-CXSCDO5T.js.map +1 -0
- package/dist/chunk-E535SAN4.js +8834 -0
- package/dist/chunk-E535SAN4.js.map +1 -0
- package/dist/chunk-EUYOGYGV.js +830 -0
- package/dist/chunk-EUYOGYGV.js.map +1 -0
- package/dist/chunk-FAQVNJD4.js +61 -0
- package/dist/chunk-FAQVNJD4.js.map +1 -0
- package/dist/{chunk-SCZXXXU4.js → chunk-G6FRSBKK.js} +7 -32
- package/dist/chunk-G6FRSBKK.js.map +1 -0
- package/dist/chunk-GIV6DWBG.js +79 -0
- package/dist/chunk-GIV6DWBG.js.map +1 -0
- package/dist/chunk-HXJXPZRE.js +73 -0
- package/dist/chunk-HXJXPZRE.js.map +1 -0
- package/dist/{chunk-GOUT6DND.js → chunk-J4KLMEUL.js} +173 -91
- package/dist/chunk-J4KLMEUL.js.map +1 -0
- package/dist/{chunk-2CSJGFCB.js → chunk-JYQTXEIO.js} +6 -229
- package/dist/chunk-JYQTXEIO.js.map +1 -0
- package/dist/{chunk-MDDTIZUO.js → chunk-LRAZDV5X.js} +7 -119
- package/dist/chunk-LRAZDV5X.js.map +1 -0
- package/dist/{chunk-M5INGEFC.js → chunk-MRIBLZL3.js} +3 -1
- package/dist/chunk-MRIBLZL3.js.map +1 -0
- package/dist/{chunk-USKYUS74.js → chunk-MUWOSVEP.js} +2 -2
- package/dist/{chunk-4PWAI7Q4.js → chunk-NWZ3I6R6.js} +5 -5
- package/dist/chunk-OVZDFEOR.js +124 -0
- package/dist/chunk-OVZDFEOR.js.map +1 -0
- package/dist/chunk-PEULZC6M.js +118 -0
- package/dist/chunk-PEULZC6M.js.map +1 -0
- package/dist/chunk-PFSNOPBQ.js +233 -0
- package/dist/chunk-PFSNOPBQ.js.map +1 -0
- package/dist/chunk-PLI5TV7N.js +53 -0
- package/dist/chunk-PLI5TV7N.js.map +1 -0
- package/dist/{chunk-WDM5XGGS.js → chunk-Q6W2CMEJ.js} +181 -11
- package/dist/chunk-Q6W2CMEJ.js.map +1 -0
- package/dist/{chunk-QGZRWRSL.js → chunk-QPEXPHJR.js} +4 -4
- package/dist/{chunk-R36SIKES.js → chunk-QXQRKXCU.js} +2 -2
- package/dist/chunk-RTZVQAJ7.js +82 -0
- package/dist/chunk-RTZVQAJ7.js.map +1 -0
- package/dist/chunk-TBKOGSYR.js +296 -0
- package/dist/chunk-TBKOGSYR.js.map +1 -0
- package/dist/chunk-UMLVJTYV.js +20 -0
- package/dist/chunk-UMLVJTYV.js.map +1 -0
- package/dist/chunk-UND4XIB6.js +251 -0
- package/dist/chunk-UND4XIB6.js.map +1 -0
- package/dist/chunk-VCGTOS2A.js +795 -0
- package/dist/chunk-VCGTOS2A.js.map +1 -0
- package/dist/chunk-VE6YVP32.js +19 -0
- package/dist/chunk-VE6YVP32.js.map +1 -0
- package/dist/{chunk-M62XNWRA.js → chunk-VK5EER6C.js} +2 -2
- package/dist/{chunk-NXFEYLVG.js → chunk-VPSUZLOJ.js} +4 -3
- package/dist/{chunk-NXFEYLVG.js.map → chunk-VPSUZLOJ.js.map} +1 -1
- package/dist/{chunk-TDR6T5CJ.js → chunk-VRBCTEKQ.js} +91 -132
- package/dist/chunk-VRBCTEKQ.js.map +1 -0
- package/dist/{chunk-ACLDOTNQ.js → chunk-W3XXT26A.js} +303 -3
- package/dist/chunk-W3XXT26A.js.map +1 -0
- package/dist/{chunk-CIMZBAZB.js → chunk-XG3PTSCD.js} +1 -1
- package/dist/chunk-XG3PTSCD.js.map +1 -0
- package/dist/chunk-Y2RKOPNC.js +145 -0
- package/dist/chunk-Y2RKOPNC.js.map +1 -0
- package/dist/{chunk-NPC4LFV5.js → chunk-YMYK7US4.js} +2 -2
- package/dist/{chunk-RKJ6OL7K.js → chunk-YS3POABP.js} +1 -1
- package/dist/chunk-YS3POABP.js.map +1 -0
- package/dist/chunk-YTXSFG3C.js +179 -0
- package/dist/chunk-YTXSFG3C.js.map +1 -0
- package/dist/consent/index.cjs.map +1 -1
- package/dist/consent/index.d.cts +7 -6
- package/dist/consent/index.d.ts +7 -6
- package/dist/consent/index.js +3 -3
- package/dist/{crypto-IVKU7YTT.js → crypto-5ZDIY3NG.js} +3 -3
- package/dist/{delegation-2DBS2EOH.js → delegation-QYXZW25W.js} +5 -4
- package/dist/derivations/index.cjs +351 -0
- package/dist/derivations/index.cjs.map +1 -0
- package/dist/derivations/index.d.cts +72 -0
- package/dist/derivations/index.d.ts +72 -0
- package/dist/derivations/index.js +27 -0
- package/dist/{dev-unlock-Da1B0TIK.d.cts → dev-unlock-DQCNDfFp.d.cts} +1 -1
- package/dist/{dev-unlock-BdPp68qn.d.ts → dev-unlock-utkybTKb.d.ts} +1 -1
- package/dist/executor-AS2IDHKZ.js +11 -0
- package/dist/executor-HLXFXNFM.js +8 -0
- package/dist/executor-HLXFXNFM.js.map +1 -0
- package/dist/executor-HN6YBHZ5.js +8 -0
- package/dist/executor-HN6YBHZ5.js.map +1 -0
- package/dist/fanout-sidecar-VJ52RIEY.js +51 -0
- package/dist/fanout-sidecar-VJ52RIEY.js.map +1 -0
- package/dist/guards/index.cjs +315 -0
- package/dist/guards/index.cjs.map +1 -0
- package/dist/guards/index.d.cts +31 -0
- package/dist/guards/index.d.ts +31 -0
- package/dist/guards/index.js +29 -0
- package/dist/guards/index.js.map +1 -0
- package/dist/{hash-lsoL3eEW.d.ts → hash-DcoYWfJ_.d.ts} +1 -1
- package/dist/{hash-BEfzPKwo.d.cts → hash-jDowCrK2.d.cts} +1 -1
- package/dist/history/index.cjs +8 -1
- package/dist/history/index.cjs.map +1 -1
- package/dist/history/index.d.cts +8 -7
- package/dist/history/index.d.ts +8 -7
- package/dist/history/index.js +6 -6
- package/dist/i18n/index.cjs +81 -0
- package/dist/i18n/index.cjs.map +1 -1
- package/dist/i18n/index.d.cts +7 -6
- package/dist/i18n/index.d.ts +7 -6
- package/dist/i18n/index.js +27 -12
- package/dist/i18n/index.js.map +1 -1
- package/dist/{index-6xNpPsxR.d.cts → index-BCKdioeh.d.ts} +331 -5
- package/dist/{index-DJTf9yxn.d.ts → index-BMjrzNZr.d.cts} +331 -5
- package/dist/index.cjs +6065 -959
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +208 -16
- package/dist/index.d.ts +208 -16
- package/dist/index.js +242 -7392
- package/dist/index.js.map +1 -1
- package/dist/indexing/index.cjs +2 -0
- package/dist/indexing/index.cjs.map +1 -1
- package/dist/indexing/index.d.cts +3 -3
- package/dist/indexing/index.d.ts +3 -3
- package/dist/indexing/index.js +4 -4
- package/dist/issue-ORP37MVW.js +12 -0
- package/dist/issue-ORP37MVW.js.map +1 -0
- package/dist/{lazy-builder-CZVLKh0Z.d.cts → lazy-builder-C-rPfWG0.d.cts} +1 -1
- package/dist/{lazy-builder-BwEoBQZ9.d.ts → lazy-builder-Rpd-V3jP.d.ts} +1 -1
- package/dist/{ledger-QZTTHQAQ.js → ledger-3IU5GMXA.js} +6 -6
- package/dist/ledger-3IU5GMXA.js.map +1 -0
- package/dist/materialized-views/index.cjs +837 -0
- package/dist/materialized-views/index.cjs.map +1 -0
- package/dist/materialized-views/index.d.cts +184 -0
- package/dist/materialized-views/index.d.ts +184 -0
- package/dist/materialized-views/index.js +45 -0
- package/dist/materialized-views/index.js.map +1 -0
- package/dist/noydb-5H3C24GG.js +34 -0
- package/dist/noydb-5H3C24GG.js.map +1 -0
- package/dist/overlay-views/index.cjs +359 -0
- package/dist/overlay-views/index.cjs.map +1 -0
- package/dist/overlay-views/index.d.cts +82 -0
- package/dist/overlay-views/index.d.ts +82 -0
- package/dist/overlay-views/index.js +25 -0
- package/dist/overlay-views/index.js.map +1 -0
- package/dist/periods/index.cjs +7 -1
- package/dist/periods/index.cjs.map +1 -1
- package/dist/periods/index.d.cts +7 -6
- package/dist/periods/index.d.ts +7 -6
- package/dist/periods/index.js +6 -6
- package/dist/{predicate-SBHmi6D0.d.cts → predicate-Dnu81tsS.d.cts} +25 -1
- package/dist/{predicate-SBHmi6D0.d.ts → predicate-Dnu81tsS.d.ts} +25 -1
- package/dist/{public-envelope-6JTACYJV.js → public-envelope-U3CMEOMV.js} +4 -4
- package/dist/public-envelope-U3CMEOMV.js.map +1 -0
- package/dist/query/index.cjs +302 -124
- package/dist/query/index.cjs.map +1 -1
- package/dist/query/index.d.cts +3 -3
- package/dist/query/index.d.ts +3 -3
- package/dist/query/index.js +26 -11
- package/dist/read-only-facade-ITU6L7BL.js +7 -0
- package/dist/read-only-facade-ITU6L7BL.js.map +1 -0
- package/dist/registry-3ALP62P6.js +10 -0
- package/dist/registry-3ALP62P6.js.map +1 -0
- package/dist/registry-7HE6VJGC.js +8 -0
- package/dist/registry-7HE6VJGC.js.map +1 -0
- package/dist/registry-PSIPG2QR.js +8 -0
- package/dist/registry-PSIPG2QR.js.map +1 -0
- package/dist/registry-RFGGMVNJ.js +7 -0
- package/dist/registry-RFGGMVNJ.js.map +1 -0
- package/dist/revoke-KY2GB4KP.js +17 -0
- package/dist/revoke-KY2GB4KP.js.map +1 -0
- package/dist/session/index.cjs +7 -1
- package/dist/session/index.cjs.map +1 -1
- package/dist/session/index.d.cts +8 -7
- package/dist/session/index.d.ts +8 -7
- package/dist/session/index.js +10 -3
- package/dist/session/index.js.map +1 -1
- package/dist/shadow/index.cjs.map +1 -1
- package/dist/shadow/index.d.cts +7 -6
- package/dist/shadow/index.d.ts +7 -6
- package/dist/shadow/index.js +2 -2
- package/dist/signer-GRI5TZKH.js +18 -0
- package/dist/signer-GRI5TZKH.js.map +1 -0
- package/dist/stale-OTOF3FH7.js +13 -0
- package/dist/stale-OTOF3FH7.js.map +1 -0
- package/dist/store/index.cjs +14 -0
- package/dist/store/index.cjs.map +1 -1
- package/dist/store/index.d.cts +7 -6
- package/dist/store/index.d.ts +7 -6
- package/dist/store/index.js +5 -2
- package/dist/{strategy-D-SrOLCl.d.cts → strategy-DSTrsZ8t.d.cts} +72 -19
- package/dist/{strategy-D-SrOLCl.d.ts → strategy-DSTrsZ8t.d.ts} +72 -19
- package/dist/sync/index.cjs.map +1 -1
- package/dist/sync/index.d.cts +6 -5
- package/dist/sync/index.d.ts +6 -5
- package/dist/sync/index.js +4 -4
- package/dist/team/index.cjs +1554 -2
- package/dist/team/index.cjs.map +1 -1
- package/dist/team/index.d.cts +7 -6
- package/dist/team/index.d.ts +7 -6
- package/dist/team/index.js +77 -8
- package/dist/tx/index.cjs +296 -44
- package/dist/tx/index.cjs.map +1 -1
- package/dist/tx/index.d.cts +7 -6
- package/dist/tx/index.d.ts +7 -6
- package/dist/tx/index.js +2 -2
- package/dist/{types-Bo7NSXJr.d.ts → types-BoFFiskX.d.ts} +2714 -321
- package/dist/{types-Bnb82f5R.d.cts → types-DJG8HG6F.d.cts} +2714 -321
- package/dist/{index-CywCC1qZ.d.cts → ulid-BmBgooGm.d.ts} +215 -26
- package/dist/{index-8QDuznDr.d.ts → ulid-C7ms9oli.d.cts} +215 -26
- package/dist/util/index.cjs.map +1 -1
- package/dist/util/index.js +1 -1
- package/dist/with-derivation-BKXXa8Vt.d.ts +13 -0
- package/dist/with-derivation-BjQ7q4NE.d.cts +13 -0
- package/dist/with-guard-C25yNjzd.d.ts +18 -0
- package/dist/with-guard-DQme5DKE.d.cts +18 -0
- package/dist/with-materialized-view-BbEPFIIJ.d.cts +27 -0
- package/dist/with-materialized-view-CqnRwI2S.d.ts +27 -0
- package/dist/with-overlayed-view-Ct1fSJt-.d.ts +13 -0
- package/dist/with-overlayed-view-bwlmmFjx.d.cts +13 -0
- package/package.json +65 -2
- package/dist/chunk-2CSJGFCB.js.map +0 -1
- package/dist/chunk-ACLDOTNQ.js.map +0 -1
- package/dist/chunk-BTDCBVJW.js +0 -160
- package/dist/chunk-BTDCBVJW.js.map +0 -1
- package/dist/chunk-CIMZBAZB.js.map +0 -1
- package/dist/chunk-EXHNQEV4.js +0 -392
- package/dist/chunk-EXHNQEV4.js.map +0 -1
- package/dist/chunk-GOUT6DND.js.map +0 -1
- package/dist/chunk-M5INGEFC.js.map +0 -1
- package/dist/chunk-MDDTIZUO.js.map +0 -1
- package/dist/chunk-QAVUREFT.js.map +0 -1
- package/dist/chunk-RKJ6OL7K.js.map +0 -1
- package/dist/chunk-SCZXXXU4.js.map +0 -1
- package/dist/chunk-TDR6T5CJ.js.map +0 -1
- package/dist/chunk-WDM5XGGS.js.map +0 -1
- /package/dist/{chunk-PTVMYYON.js.map → chunk-243PNUA6.js.map} +0 -0
- /package/dist/{chunk-MR4424N3.js.map → chunk-2PAQNPE3.js.map} +0 -0
- /package/dist/{chunk-AVVPZ4BC.js.map → chunk-3Y53S2SA.js.map} +0 -0
- /package/dist/{chunk-ZFKD4QMV.js.map → chunk-7BRE6EUA.js.map} +0 -0
- /package/dist/{chunk-USKYUS74.js.map → chunk-MUWOSVEP.js.map} +0 -0
- /package/dist/{chunk-4PWAI7Q4.js.map → chunk-NWZ3I6R6.js.map} +0 -0
- /package/dist/{chunk-QGZRWRSL.js.map → chunk-QPEXPHJR.js.map} +0 -0
- /package/dist/{chunk-R36SIKES.js.map → chunk-QXQRKXCU.js.map} +0 -0
- /package/dist/{chunk-M62XNWRA.js.map → chunk-VK5EER6C.js.map} +0 -0
- /package/dist/{chunk-NPC4LFV5.js.map → chunk-YMYK7US4.js.map} +0 -0
- /package/dist/{crypto-IVKU7YTT.js.map → crypto-5ZDIY3NG.js.map} +0 -0
- /package/dist/{delegation-2DBS2EOH.js.map → delegation-QYXZW25W.js.map} +0 -0
- /package/dist/{ledger-QZTTHQAQ.js.map → derivations/index.js.map} +0 -0
- /package/dist/{public-envelope-6JTACYJV.js.map → executor-AS2IDHKZ.js.map} +0 -0
package/dist/i18n/index.d.cts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { I as I18nStrategy } from '../types-
|
|
2
|
-
export { D as DICT_COLLECTION_PREFIX, a as DictEntry, b as DictKeyDescriptor, c as DictionaryHandle, d as DictionaryOptions, e as I18nTextDescriptor, f as I18nTextOptions, g as applyI18nLocale, h as dictCollectionName, i as dictKey, j as i18nText, k as isDictCollectionName, l as isDictKeyDescriptor, m as isI18nTextDescriptor, r as resolveI18nText, v as validateI18nTextValue } from '../types-
|
|
3
|
-
|
|
4
|
-
import '../
|
|
5
|
-
import '../
|
|
1
|
+
import { I as I18nStrategy } from '../types-DJG8HG6F.cjs';
|
|
2
|
+
export { D as DICT_COLLECTION_PREFIX, a as DictEntry, b as DictKeyDescriptor, c as DictionaryHandle, d as DictionaryOptions, e as I18nTextDescriptor, f as I18nTextOptions, g as applyI18nLocale, h as dictCollectionName, i as dictKey, j as i18nText, k as isDictCollectionName, l as isDictKeyDescriptor, m as isI18nTextDescriptor, r as resolveI18nText, v as validateI18nTextValue } from '../types-DJG8HG6F.cjs';
|
|
3
|
+
export { D as DictKeyInUseError, a as DictKeyMissingError, L as LocaleNotSpecifiedError, M as MissingTranslationError, R as ReservedCollectionNameError, T as TranslatorNotConfiguredError } from '../index-BMjrzNZr.cjs';
|
|
4
|
+
import '../lazy-builder-C-rPfWG0.cjs';
|
|
5
|
+
import '../predicate-Dnu81tsS.cjs';
|
|
6
|
+
import '../strategy-DSTrsZ8t.cjs';
|
|
6
7
|
import '../strategy-BSxFXGzb.cjs';
|
|
7
|
-
import '
|
|
8
|
+
import '@noy-db/attestation';
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* Active i18n strategy — `withI18n()` returns the real implementation
|
package/dist/i18n/index.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { I as I18nStrategy } from '../types-
|
|
2
|
-
export { D as DICT_COLLECTION_PREFIX, a as DictEntry, b as DictKeyDescriptor, c as DictionaryHandle, d as DictionaryOptions, e as I18nTextDescriptor, f as I18nTextOptions, g as applyI18nLocale, h as dictCollectionName, i as dictKey, j as i18nText, k as isDictCollectionName, l as isDictKeyDescriptor, m as isI18nTextDescriptor, r as resolveI18nText, v as validateI18nTextValue } from '../types-
|
|
3
|
-
|
|
4
|
-
import '../
|
|
5
|
-
import '../
|
|
1
|
+
import { I as I18nStrategy } from '../types-BoFFiskX.js';
|
|
2
|
+
export { D as DICT_COLLECTION_PREFIX, a as DictEntry, b as DictKeyDescriptor, c as DictionaryHandle, d as DictionaryOptions, e as I18nTextDescriptor, f as I18nTextOptions, g as applyI18nLocale, h as dictCollectionName, i as dictKey, j as i18nText, k as isDictCollectionName, l as isDictKeyDescriptor, m as isI18nTextDescriptor, r as resolveI18nText, v as validateI18nTextValue } from '../types-BoFFiskX.js';
|
|
3
|
+
export { D as DictKeyInUseError, a as DictKeyMissingError, L as LocaleNotSpecifiedError, M as MissingTranslationError, R as ReservedCollectionNameError, T as TranslatorNotConfiguredError } from '../index-BCKdioeh.js';
|
|
4
|
+
import '../lazy-builder-Rpd-V3jP.js';
|
|
5
|
+
import '../predicate-Dnu81tsS.js';
|
|
6
|
+
import '../strategy-DSTrsZ8t.js';
|
|
6
7
|
import '../strategy-BSxFXGzb.js';
|
|
7
|
-
import '
|
|
8
|
+
import '@noy-db/attestation';
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* Active i18n strategy — `withI18n()` returns the real implementation
|
package/dist/i18n/index.js
CHANGED
|
@@ -1,21 +1,30 @@
|
|
|
1
1
|
import {
|
|
2
|
-
DICT_COLLECTION_PREFIX,
|
|
3
|
-
DictionaryHandle,
|
|
4
2
|
applyI18nLocale,
|
|
5
|
-
dictCollectionName,
|
|
6
|
-
dictKey,
|
|
7
3
|
i18nText,
|
|
8
|
-
isDictCollectionName,
|
|
9
|
-
isDictKeyDescriptor,
|
|
10
4
|
isI18nTextDescriptor,
|
|
11
5
|
resolveI18nText,
|
|
12
6
|
validateI18nTextValue
|
|
13
|
-
} from "../chunk-
|
|
14
|
-
import
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
7
|
+
} from "../chunk-3XHOCQK4.js";
|
|
8
|
+
import {
|
|
9
|
+
DICT_COLLECTION_PREFIX,
|
|
10
|
+
DictionaryHandle,
|
|
11
|
+
dictCollectionName,
|
|
12
|
+
dictKey,
|
|
13
|
+
isDictCollectionName,
|
|
14
|
+
isDictKeyDescriptor
|
|
15
|
+
} from "../chunk-LRAZDV5X.js";
|
|
16
|
+
import "../chunk-Q6W2CMEJ.js";
|
|
17
|
+
import "../chunk-XG3PTSCD.js";
|
|
18
|
+
import "../chunk-YS3POABP.js";
|
|
19
|
+
import "../chunk-2PAQNPE3.js";
|
|
20
|
+
import {
|
|
21
|
+
DictKeyInUseError,
|
|
22
|
+
DictKeyMissingError,
|
|
23
|
+
LocaleNotSpecifiedError,
|
|
24
|
+
MissingTranslationError,
|
|
25
|
+
ReservedCollectionNameError,
|
|
26
|
+
TranslatorNotConfiguredError
|
|
27
|
+
} from "../chunk-W3XXT26A.js";
|
|
19
28
|
|
|
20
29
|
// src/i18n/active.ts
|
|
21
30
|
function withI18n() {
|
|
@@ -40,7 +49,13 @@ function withI18n() {
|
|
|
40
49
|
}
|
|
41
50
|
export {
|
|
42
51
|
DICT_COLLECTION_PREFIX,
|
|
52
|
+
DictKeyInUseError,
|
|
53
|
+
DictKeyMissingError,
|
|
43
54
|
DictionaryHandle,
|
|
55
|
+
LocaleNotSpecifiedError,
|
|
56
|
+
MissingTranslationError,
|
|
57
|
+
ReservedCollectionNameError,
|
|
58
|
+
TranslatorNotConfiguredError,
|
|
44
59
|
applyI18nLocale,
|
|
45
60
|
dictCollectionName,
|
|
46
61
|
dictKey,
|
package/dist/i18n/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/i18n/active.ts"],"sourcesContent":["/**\n * Active i18n strategy — `withI18n()` returns the real implementation\n * that wires multi-locale resolution, i18nText validation, and the\n * `DictionaryHandle` for `dictKey` fields into the core read/write\n * paths.\n *\n * Consumers opt in by:\n *\n * ```ts\n * import { createNoydb } from '@noy-db/hub'\n * import { withI18n } from '@noy-db/hub/i18n'\n *\n * const db = await createNoydb({\n * store: ...,\n * user: ...,\n * i18nStrategy: withI18n(),\n * })\n * ```\n *\n * The factory delegates to the existing `core.ts` and `dictionary.ts`\n * modules. Splitting the import chain through this file is what lets\n * tsup tree-shake the `~854 LOC` of dictionary + locale resolution\n * out of the default bundle when no `withI18n()` import is present.\n *\n * @public\n */\n\nimport type { I18nStrategy, BuildDictionaryHandleOptions } from './strategy.js'\nimport { applyI18nLocale, validateI18nTextValue } from './core.js'\nimport { DictionaryHandle } from './dictionary.js'\n\nexport function withI18n(): I18nStrategy {\n return {\n applyI18nLocale,\n validateI18nTextValue,\n buildDictionaryHandle<Keys extends string = string>(\n opts: BuildDictionaryHandleOptions<Keys>,\n ): DictionaryHandle<Keys> {\n return new DictionaryHandle<Keys>(\n opts.adapter,\n opts.compartmentName,\n opts.dictionaryName,\n opts.keyring,\n opts.getDEK,\n opts.encrypted,\n opts.ledger,\n opts.options,\n opts.findAndUpdateReferences,\n opts.emitter,\n )\n },\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/i18n/active.ts"],"sourcesContent":["/**\n * Active i18n strategy — `withI18n()` returns the real implementation\n * that wires multi-locale resolution, i18nText validation, and the\n * `DictionaryHandle` for `dictKey` fields into the core read/write\n * paths.\n *\n * Consumers opt in by:\n *\n * ```ts\n * import { createNoydb } from '@noy-db/hub'\n * import { withI18n } from '@noy-db/hub/i18n'\n *\n * const db = await createNoydb({\n * store: ...,\n * user: ...,\n * i18nStrategy: withI18n(),\n * })\n * ```\n *\n * The factory delegates to the existing `core.ts` and `dictionary.ts`\n * modules. Splitting the import chain through this file is what lets\n * tsup tree-shake the `~854 LOC` of dictionary + locale resolution\n * out of the default bundle when no `withI18n()` import is present.\n *\n * @public\n */\n\nimport type { I18nStrategy, BuildDictionaryHandleOptions } from './strategy.js'\nimport { applyI18nLocale, validateI18nTextValue } from './core.js'\nimport { DictionaryHandle } from './dictionary.js'\n\nexport function withI18n(): I18nStrategy {\n return {\n applyI18nLocale,\n validateI18nTextValue,\n buildDictionaryHandle<Keys extends string = string>(\n opts: BuildDictionaryHandleOptions<Keys>,\n ): DictionaryHandle<Keys> {\n return new DictionaryHandle<Keys>(\n opts.adapter,\n opts.compartmentName,\n opts.dictionaryName,\n opts.keyring,\n opts.getDEK,\n opts.encrypted,\n opts.ledger,\n opts.options,\n opts.findAndUpdateReferences,\n opts.emitter,\n )\n },\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BO,SAAS,WAAyB;AACvC,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA,sBACE,MACwB;AACxB,aAAO,IAAI;AAAA,QACT,KAAK;AAAA,QACL,KAAK;AAAA,QACL,KAAK;AAAA,QACL,KAAK;AAAA,QACL,KAAK;AAAA,QACL,KAAK;AAAA,QACL,KAAK;AAAA,QACL,KAAK;AAAA,QACL,KAAK;AAAA,QACL,KAAK;AAAA,MACP;AAAA,IACF;AAAA,EACF;AACF;","names":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as CollectionIndexes, a as Clause, O as Operator } from './predicate-
|
|
2
|
-
import { A as AggregateStrategy, b as AggregateSpec, c as Aggregation, a as AggregateResult, g as GroupedQuery } from './strategy-
|
|
1
|
+
import { C as CollectionIndexes, a as Clause, O as Operator } from './predicate-Dnu81tsS.js';
|
|
2
|
+
import { A as AggregateStrategy, b as AggregateSpec, c as Aggregation, a as AggregateResult, g as GroupedQuery, h as GroupedQueryN } from './strategy-DSTrsZ8t.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* All NOYDB error classes — a single import surface for `catch` blocks and
|
|
@@ -116,6 +116,26 @@ declare class TamperedError extends NoydbError {
|
|
|
116
116
|
declare class InvalidKeyError extends NoydbError {
|
|
117
117
|
constructor(message?: string);
|
|
118
118
|
}
|
|
119
|
+
/**
|
|
120
|
+
* Thrown when a keyring's wrapped-DEK set unwraps partially — at least
|
|
121
|
+
* one DEK succeeds (proving the KEK is correct) but at least one fails.
|
|
122
|
+
* The passphrase is right; the failed entries are corrupted.
|
|
123
|
+
*
|
|
124
|
+
* This is distinct from {@link InvalidKeyError} so that
|
|
125
|
+
* `NoydbOptions.onInvalidKey: 'reset'` does NOT fire — resetting on
|
|
126
|
+
* partial corruption would destroy the still-valid DEKs and the data
|
|
127
|
+
* they protect, which is silent data loss in response to a feature
|
|
128
|
+
* designed for stale-credential recovery.
|
|
129
|
+
*/
|
|
130
|
+
declare class KeyringCorruptError extends NoydbError {
|
|
131
|
+
readonly failedCollections: readonly string[];
|
|
132
|
+
readonly intactCount: number;
|
|
133
|
+
constructor(opts: {
|
|
134
|
+
failedCollections: readonly string[];
|
|
135
|
+
intactCount: number;
|
|
136
|
+
message?: string;
|
|
137
|
+
});
|
|
138
|
+
}
|
|
119
139
|
/**
|
|
120
140
|
* Thrown when the authenticated user does not have a DEK for the requested
|
|
121
141
|
* collection — i.e. the collection is not in their keyring at all.
|
|
@@ -229,7 +249,7 @@ declare class KeyringExpiredError extends NoydbError {
|
|
|
229
249
|
}
|
|
230
250
|
/**
|
|
231
251
|
* Thrown when an `@noy-db/as-*` import is attempted but the invoking
|
|
232
|
-
* keyring lacks the required import-capability bit
|
|
252
|
+
* keyring lacks the required import-capability bit.
|
|
233
253
|
*
|
|
234
254
|
* - `tier: 'plaintext'` — a plaintext-tier import (`as-csv`, `as-json`,
|
|
235
255
|
* `as-ndjson`, `as-zip`, …) was attempted but the keyring's
|
|
@@ -327,6 +347,64 @@ declare class PeriodClosedError extends NoydbError {
|
|
|
327
347
|
readonly recordTs: string;
|
|
328
348
|
constructor(periodName: string, endDate: string, recordTs: string);
|
|
329
349
|
}
|
|
350
|
+
/**
|
|
351
|
+
* Thrown when a `put()` or `delete()` is rejected by a guard's `check`
|
|
352
|
+
* function. The `reason` is the message the guard supplied — typically a
|
|
353
|
+
* short business description (e.g. "invoice is issued"). The full
|
|
354
|
+
* collection + id are surfaced so audit UIs can link back to the record.
|
|
355
|
+
*/
|
|
356
|
+
declare class RecordLockedError extends NoydbError {
|
|
357
|
+
readonly collection: string;
|
|
358
|
+
readonly id: string;
|
|
359
|
+
readonly reason: string;
|
|
360
|
+
constructor(collection: string, id: string, reason: string);
|
|
361
|
+
}
|
|
362
|
+
/**
|
|
363
|
+
* Thrown when a `put()` changes one or more fields that are frozen by a
|
|
364
|
+
* `frozenFields` guard. The `fields` list contains the specific paths
|
|
365
|
+
* that were detected as changed.
|
|
366
|
+
*/
|
|
367
|
+
declare class FieldFrozenError extends NoydbError {
|
|
368
|
+
readonly collection: string;
|
|
369
|
+
readonly id: string;
|
|
370
|
+
readonly fields: readonly string[];
|
|
371
|
+
constructor(collection: string, id: string, fields: readonly string[]);
|
|
372
|
+
}
|
|
373
|
+
/**
|
|
374
|
+
* Thrown by an amendment invariant when the proposed change-set violates
|
|
375
|
+
* the declared business rule (e.g. disbursement total not preserved).
|
|
376
|
+
* Triggers a full transaction rollback via the existing revert pass.
|
|
377
|
+
*/
|
|
378
|
+
declare class InvariantError extends NoydbError {
|
|
379
|
+
constructor(message: string);
|
|
380
|
+
}
|
|
381
|
+
/**
|
|
382
|
+
* Thrown at `withTransactions({ amendment: true })` open if the caller's
|
|
383
|
+
* role is not in the guard's allowed amendment roles. Fail-fast: thrown
|
|
384
|
+
* before any writes are attempted.
|
|
385
|
+
*/
|
|
386
|
+
declare class AmendmentForbiddenError extends NoydbError {
|
|
387
|
+
readonly userId: string;
|
|
388
|
+
readonly role: string;
|
|
389
|
+
constructor(userId: string, role: string);
|
|
390
|
+
}
|
|
391
|
+
/**
|
|
392
|
+
* Thrown by `listUsersWithEnvelopes` when the vault's user directory
|
|
393
|
+
* has been disabled (via `db.setDirectoryEnabled(vault, false)`) and
|
|
394
|
+
* the caller's role is neither `owner` nor `admin`. Owner/admin can
|
|
395
|
+
* still enumerate users — the toggle is a UX privacy switch, not a
|
|
396
|
+
* security boundary.
|
|
397
|
+
*
|
|
398
|
+
* Honest caveat: this is a UX flag, not a privacy guarantee. The
|
|
399
|
+
* envelope ciphertext is still in the store, the keyring file is
|
|
400
|
+
* still listed at `_keyring/*`, and anyone with direct store read
|
|
401
|
+
* access can count keyrings without going through the hub. See
|
|
402
|
+
* `docs/subsystems/user-envelope.md` → "Directory visibility".
|
|
403
|
+
*/
|
|
404
|
+
declare class DirectoryDisabledError extends NoydbError {
|
|
405
|
+
readonly vault: string;
|
|
406
|
+
constructor(vault: string);
|
|
407
|
+
}
|
|
330
408
|
/**
|
|
331
409
|
* Thrown when a user tries to act at a tier they are not cleared for.
|
|
332
410
|
*
|
|
@@ -584,6 +662,33 @@ declare class IndexWriteFailureError extends NoydbError {
|
|
|
584
662
|
declare class BundleIntegrityError extends NoydbError {
|
|
585
663
|
constructor(message: string);
|
|
586
664
|
}
|
|
665
|
+
/**
|
|
666
|
+
* Thrown by `readNoydbBundle` (#197) when the bundle carries
|
|
667
|
+
* sealed per-user passphrases but no supplied `SealingKeyProvider`
|
|
668
|
+
* has a `.id` (= `pid`) matching the sealed entry's `pid`.
|
|
669
|
+
*
|
|
670
|
+
* Carries the failing pid + the user id so the recipient can
|
|
671
|
+
* surface an actionable prompt:
|
|
672
|
+
*
|
|
673
|
+
* ```
|
|
674
|
+
* BundleSealMismatchError: bundle carries sealed passphrase for user "alice"
|
|
675
|
+
* under provider "macos-keychain:com.acme.app/alice@acme.example",
|
|
676
|
+
* but no registered provider matches that pid.
|
|
677
|
+
* ```
|
|
678
|
+
*
|
|
679
|
+
* Three resolution paths the message names (per foundation §11.9.4):
|
|
680
|
+
*
|
|
681
|
+
* 1. Configure a provider matching the pid and retry import.
|
|
682
|
+
* 2. Pass `attemptUnsealAcrossProviders: true` to try each
|
|
683
|
+
* registered provider regardless of pid.
|
|
684
|
+
* 3. Inspect without unsealing — pass no `sealingProviders` to
|
|
685
|
+
* receive the sealed entries unmodified for offline analysis.
|
|
686
|
+
*/
|
|
687
|
+
declare class BundleSealMismatchError extends NoydbError {
|
|
688
|
+
readonly userId: string;
|
|
689
|
+
readonly pid: string;
|
|
690
|
+
constructor(userId: string, pid: string);
|
|
691
|
+
}
|
|
587
692
|
/**
|
|
588
693
|
* Thrown when `vault.collection()` is called with a name that is
|
|
589
694
|
* reserved for NOYDB internal use (any name starting with `_dict_`).
|
|
@@ -707,6 +812,34 @@ declare class BackupCorruptedError extends NoydbError {
|
|
|
707
812
|
readonly id: string;
|
|
708
813
|
constructor(collection: string, id: string, message: string);
|
|
709
814
|
}
|
|
815
|
+
/**
|
|
816
|
+
* Thrown by partition-extraction primitives (#198 epic) when the
|
|
817
|
+
* transitive-closure walk fails — e.g. the FK graph is deeper than
|
|
818
|
+
* `maxDepth`, signalling a runaway or unexpectedly cyclic graph.
|
|
819
|
+
*/
|
|
820
|
+
declare class PartitionExtractionError extends NoydbError {
|
|
821
|
+
constructor(message: string);
|
|
822
|
+
}
|
|
823
|
+
/**
|
|
824
|
+
* Thrown by `adoptPartition` (#207) when the transfer seal can't be
|
|
825
|
+
* opened — a wrong/short transfer key (AES-GCM auth-tag failure) or a
|
|
826
|
+
* malformed sealed payload.
|
|
827
|
+
*/
|
|
828
|
+
declare class TransferSealError extends NoydbError {
|
|
829
|
+
constructor(message: string);
|
|
830
|
+
}
|
|
831
|
+
/**
|
|
832
|
+
* Thrown when an adoption-lifecycle precondition fails — re-adopting a
|
|
833
|
+
* partition already consumed in this store (#207), or owner-creation on a
|
|
834
|
+
* vault that isn't in the adopted-unowned state (#208).
|
|
835
|
+
*/
|
|
836
|
+
declare class AdoptionStateError extends NoydbError {
|
|
837
|
+
constructor(message: string);
|
|
838
|
+
}
|
|
839
|
+
/** Document-attestation failures: undeclared field-schema, non-owner issue, missing field, signer failure. */
|
|
840
|
+
declare class AttestationError extends NoydbError {
|
|
841
|
+
constructor(message: string);
|
|
842
|
+
}
|
|
710
843
|
/**
|
|
711
844
|
* Thrown by `resolveSession()` when the session token's `expiresAt`
|
|
712
845
|
* timestamp is in the past. The session key is also removed from the
|
|
@@ -830,6 +963,156 @@ declare class PathEscapeError extends NoydbError {
|
|
|
830
963
|
targetDir: string;
|
|
831
964
|
});
|
|
832
965
|
}
|
|
966
|
+
/**
|
|
967
|
+
* Thrown at vault open if the derivation graph contains a cycle.
|
|
968
|
+
* `path` is the offending chain (e.g. `['a', 'b', 'c', 'a']`).
|
|
969
|
+
*/
|
|
970
|
+
declare class DerivationCycleError extends NoydbError {
|
|
971
|
+
readonly path: readonly string[];
|
|
972
|
+
constructor(path: readonly string[]);
|
|
973
|
+
}
|
|
974
|
+
/**
|
|
975
|
+
* Thrown when a cascade of source → output → source → … exceeds the
|
|
976
|
+
* configured `maxDepth` (default 5).
|
|
977
|
+
*/
|
|
978
|
+
declare class DerivationDepthError extends NoydbError {
|
|
979
|
+
readonly limit: number;
|
|
980
|
+
readonly attempted: number;
|
|
981
|
+
constructor(limit: number, attempted: number);
|
|
982
|
+
}
|
|
983
|
+
/**
|
|
984
|
+
* Thrown at registration if a `withDerivation` strategy references an
|
|
985
|
+
* output `collection` that isn't otherwise declared (no schema, no use
|
|
986
|
+
* elsewhere). Surfacing this early catches typos in collection names.
|
|
987
|
+
*/
|
|
988
|
+
declare class DerivationOutputUnknownError extends NoydbError {
|
|
989
|
+
readonly collection: string;
|
|
990
|
+
constructor(collection: string);
|
|
991
|
+
}
|
|
992
|
+
/**
|
|
993
|
+
* Thrown when the user's `derive` function returns a value that doesn't
|
|
994
|
+
* match the declared output spec (e.g. wrong shape, wrong key set).
|
|
995
|
+
*/
|
|
996
|
+
declare class DerivationOutputShapeError extends NoydbError {
|
|
997
|
+
readonly outputKey: string;
|
|
998
|
+
constructor(outputKey: string, detail: string);
|
|
999
|
+
}
|
|
1000
|
+
/**
|
|
1001
|
+
* Thrown by array-shape derivations (#200) when the `derive` function
|
|
1002
|
+
* returns more rows than the output's `maxFanout` cap. The cap exists
|
|
1003
|
+
* to keep dispatch cost bounded — without it a single source-row
|
|
1004
|
+
* update could fan out to thousands of derived rows, dominating the
|
|
1005
|
+
* write path.
|
|
1006
|
+
*
|
|
1007
|
+
* Defaults to `maxFanout: 64`. Raise on the output spec for
|
|
1008
|
+
* carry-forward expansion cases (e.g. monthly rows across multi-year
|
|
1009
|
+
* contracts).
|
|
1010
|
+
*/
|
|
1011
|
+
declare class DerivationCapExceededError extends NoydbError {
|
|
1012
|
+
readonly outputKey: string;
|
|
1013
|
+
readonly returned: number;
|
|
1014
|
+
readonly maxFanout: number;
|
|
1015
|
+
constructor(outputKey: string, returned: number, maxFanout: number);
|
|
1016
|
+
}
|
|
1017
|
+
/**
|
|
1018
|
+
* Thrown at vault open if the materialized-view graph contains a
|
|
1019
|
+
* cycle. `path` is the offending chain (e.g. `['a-mv', 'b-mv', 'a-mv']`).
|
|
1020
|
+
* Detected by the same shared DFS that catches `DerivationCycleError`;
|
|
1021
|
+
* surfaces with a distinct error type so consumers can disambiguate.
|
|
1022
|
+
*/
|
|
1023
|
+
declare class MaterializedViewCycleError extends NoydbError {
|
|
1024
|
+
readonly path: readonly string[];
|
|
1025
|
+
constructor(path: readonly string[]);
|
|
1026
|
+
}
|
|
1027
|
+
/**
|
|
1028
|
+
* Thrown at MV registration if the query references a source
|
|
1029
|
+
* collection that isn't declared on the vault. Surfacing this early
|
|
1030
|
+
* catches typos in collection names.
|
|
1031
|
+
*/
|
|
1032
|
+
declare class MaterializedViewSourceUnknownError extends NoydbError {
|
|
1033
|
+
readonly mvName: string;
|
|
1034
|
+
readonly collection: string;
|
|
1035
|
+
constructor(mvName: string, collection: string);
|
|
1036
|
+
}
|
|
1037
|
+
/**
|
|
1038
|
+
* Thrown by the MV executor when a refresh produces more rows than
|
|
1039
|
+
* the configured ceiling. Default ceiling is 100k rows; override
|
|
1040
|
+
* per-MV via `maxRows`. Mirrors `JoinTooLargeError` /
|
|
1041
|
+
* `GroupCardinalityError` from the query DSL — the explosion is
|
|
1042
|
+
* detected BEFORE writes hit the store, so the source-write
|
|
1043
|
+
* transaction can roll back cleanly via strict-mode.
|
|
1044
|
+
*/
|
|
1045
|
+
declare class MaterializedViewTooLargeError extends NoydbError {
|
|
1046
|
+
readonly mvName: string;
|
|
1047
|
+
readonly expected: number;
|
|
1048
|
+
readonly limit: number;
|
|
1049
|
+
constructor(mvName: string, expected: number, limit: number);
|
|
1050
|
+
}
|
|
1051
|
+
/**
|
|
1052
|
+
* Thrown by `withMaterializedView()` at registration time when the
|
|
1053
|
+
* strategy is structurally malformed. Distinct from
|
|
1054
|
+
* `MaterializedViewSourceUnknownError` (the source list is well-formed
|
|
1055
|
+
* but names a collection the vault doesn't know) and
|
|
1056
|
+
* `MaterializedViewCycleError` (the source graph has a cycle): this
|
|
1057
|
+
* error fires before either check, at the moment the spec is being
|
|
1058
|
+
* normalized.
|
|
1059
|
+
*
|
|
1060
|
+
* Today the trigger cases are all about the `query` / `unionSources`
|
|
1061
|
+
* dichotomy introduced by #165:
|
|
1062
|
+
* - both `query` and `unionSources` were set (mutually exclusive),
|
|
1063
|
+
* - neither `query` nor `unionSources` was set,
|
|
1064
|
+
* - `unionSources` has fewer than 2 arms,
|
|
1065
|
+
* - two arms in `unionSources` reference the same `collection`.
|
|
1066
|
+
*
|
|
1067
|
+
* The error message is prefixed with `[noy-db] withMaterializedView:`
|
|
1068
|
+
* so it's grep-friendly in logs and looks consistent with the existing
|
|
1069
|
+
* `ValidationError` messages from the same factory.
|
|
1070
|
+
*/
|
|
1071
|
+
declare class MaterializedViewConfigError extends NoydbError {
|
|
1072
|
+
constructor(message: string);
|
|
1073
|
+
}
|
|
1074
|
+
/**
|
|
1075
|
+
* Thrown at vault open when a `withOverlayedView` declaration uses
|
|
1076
|
+
* another virtual-overlay name as its `base`. Multi-overlay stacking
|
|
1077
|
+
* is a v2 non-goal — the shallow expansion in
|
|
1078
|
+
* `QueryDependencyAnalyzer` would truncate at the inner overlay
|
|
1079
|
+
* name, leaving downstream MVs silently stale.
|
|
1080
|
+
*/
|
|
1081
|
+
declare class OverlayBaseIsVirtualError extends NoydbError {
|
|
1082
|
+
readonly overlayName: string;
|
|
1083
|
+
readonly base: string;
|
|
1084
|
+
constructor(overlayName: string, base: string);
|
|
1085
|
+
}
|
|
1086
|
+
/**
|
|
1087
|
+
* Thrown at vault open when a `withOverlayedView`'s `overlay`
|
|
1088
|
+
* references an unknown collection or an MV-owned collection. The
|
|
1089
|
+
* overlay collection is user-writable; MV-owned collections aren't.
|
|
1090
|
+
*/
|
|
1091
|
+
declare class OverlayCollectionUnavailableError extends NoydbError {
|
|
1092
|
+
readonly overlayName: string;
|
|
1093
|
+
readonly overlay: string;
|
|
1094
|
+
constructor(overlayName: string, overlay: string);
|
|
1095
|
+
}
|
|
1096
|
+
/**
|
|
1097
|
+
* Thrown at vault open when a `withOverlayedView`'s virtual `name`
|
|
1098
|
+
* collides with an MV output or a concrete source collection.
|
|
1099
|
+
*/
|
|
1100
|
+
declare class OverlayNameCollisionError extends NoydbError {
|
|
1101
|
+
readonly overlayName: string;
|
|
1102
|
+
constructor(overlayName: string);
|
|
1103
|
+
}
|
|
1104
|
+
/**
|
|
1105
|
+
* Thrown by the virtual overlay's `put(id, record)` when the
|
|
1106
|
+
* consumer-supplied `id` doesn't match `rowKey(record)`. Catches
|
|
1107
|
+
* fat-finger separator typos that would otherwise silently produce
|
|
1108
|
+
* orphaned overlay rows. Direct writes to the underlying overlay
|
|
1109
|
+
* collection (bypass the virtual layer) skip this validation.
|
|
1110
|
+
*/
|
|
1111
|
+
declare class OverlayIdMismatchError extends NoydbError {
|
|
1112
|
+
readonly actual: string;
|
|
1113
|
+
readonly expected: string;
|
|
1114
|
+
constructor(actual: string, expected: string);
|
|
1115
|
+
}
|
|
833
1116
|
|
|
834
1117
|
/**
|
|
835
1118
|
* Foreign-key references — the soft-FK mechanism.
|
|
@@ -1361,12 +1644,54 @@ interface QuerySource<T> {
|
|
|
1361
1644
|
* joinContext, and calling `.join()` on it throws with an actionable
|
|
1362
1645
|
* error. See `query/join.ts` for the full design.
|
|
1363
1646
|
*/
|
|
1647
|
+
/**
|
|
1648
|
+
* Declared deterministic predicate (#153). Carries the consumer's
|
|
1649
|
+
* stable `hash` (for function-body identity), the function itself,
|
|
1650
|
+
* and is keyed by name when registered on a `Query<T>` via
|
|
1651
|
+
* `_withPredicates()`.
|
|
1652
|
+
*/
|
|
1653
|
+
interface DeclaredPredicate {
|
|
1654
|
+
hash: string;
|
|
1655
|
+
fn: (record: unknown, ctx?: unknown) => boolean;
|
|
1656
|
+
}
|
|
1364
1657
|
declare class Query<T> {
|
|
1365
1658
|
private readonly source;
|
|
1366
1659
|
private readonly plan;
|
|
1367
1660
|
private readonly joinContext;
|
|
1368
1661
|
private readonly aggregateStrategy;
|
|
1369
|
-
|
|
1662
|
+
private readonly predicates;
|
|
1663
|
+
constructor(source: QuerySource<T>, plan?: QueryPlan, joinContext?: JoinContext, aggregateStrategy?: AggregateStrategy, predicates?: ReadonlyMap<string, DeclaredPredicate>);
|
|
1664
|
+
/**
|
|
1665
|
+
* @internal — accessor for the materialized-view dependency
|
|
1666
|
+
* analyzer. Not part of the public API; consumers should use the
|
|
1667
|
+
* builder methods, not inspect the plan directly.
|
|
1668
|
+
*/
|
|
1669
|
+
_plan(): QueryPlan;
|
|
1670
|
+
/**
|
|
1671
|
+
* @internal — accessor for the materialized-view dependency
|
|
1672
|
+
* analyzer. Returns the join resolution context (or `undefined` for
|
|
1673
|
+
* queries constructed without a Collection backing).
|
|
1674
|
+
*/
|
|
1675
|
+
_joinContext(): JoinContext | undefined;
|
|
1676
|
+
/**
|
|
1677
|
+
* @internal — clone this Query with a declared-predicate map
|
|
1678
|
+
* attached. Used by the materialized-view registry to enable
|
|
1679
|
+
* `.wherePredicate(name, ctx?)` for the MV's query callback (#153).
|
|
1680
|
+
* Consumers don't call this directly.
|
|
1681
|
+
*/
|
|
1682
|
+
_withPredicates(predicates: ReadonlyMap<string, DeclaredPredicate>): Query<T>;
|
|
1683
|
+
/**
|
|
1684
|
+
* Filter by a registered deterministic predicate (#153). Requires
|
|
1685
|
+
* the Query to have been augmented with a predicates map (typically
|
|
1686
|
+
* via the materialized-view registry — bare Queries constructed
|
|
1687
|
+
* outside an MV throw on `.wherePredicate()`).
|
|
1688
|
+
*
|
|
1689
|
+
* `ctx` is an optional opaque value passed verbatim to the predicate
|
|
1690
|
+
* function. Both `predicateHash` (from the registration) and a
|
|
1691
|
+
* canonical-JSON hash of `ctx` fold into the MV's `queryHash`, so
|
|
1692
|
+
* either changing forces refresh on next visit.
|
|
1693
|
+
*/
|
|
1694
|
+
wherePredicate(name: string, ctx?: unknown): Query<T>;
|
|
1370
1695
|
/** Add a field comparison. Multiple where() calls are AND-combined. */
|
|
1371
1696
|
where(field: string, op: Operator, value: unknown): Query<T>;
|
|
1372
1697
|
/**
|
|
@@ -1558,6 +1883,7 @@ declare class Query<T> {
|
|
|
1558
1883
|
* per record and can't be index-accelerated.
|
|
1559
1884
|
*/
|
|
1560
1885
|
groupBy<F extends string>(field: F): GroupedQuery<T, F>;
|
|
1886
|
+
groupBy<F extends readonly [string, string, ...string[]]>(...fields: F): GroupedQueryN<T, F>;
|
|
1561
1887
|
/**
|
|
1562
1888
|
* Re-run the query whenever the source notifies of changes.
|
|
1563
1889
|
* Returns an unsubscribe function. The callback receives the latest result.
|
|
@@ -1937,4 +2263,4 @@ declare class ScanBuilder<T> implements AsyncIterable<T> {
|
|
|
1937
2263
|
private recordMatches;
|
|
1938
2264
|
}
|
|
1939
2265
|
|
|
1940
|
-
export {
|
|
2266
|
+
export { type JoinLeg as $, AmendmentForbiddenError as A, BackupCorruptedError as B, ConflictError as C, DictKeyInUseError as D, DecryptionError as E, FieldFrozenError as F, DelegationTargetMissingError as G, DirectoryDisabledError as H, InvariantError as I, ElevationExpiredError as J, ExportCapabilityError as K, LocaleNotSpecifiedError as L, MissingTranslationError as M, NoydbError as N, OverlayBaseIsVirtualError as O, PartitionExtractionError as P, Query as Q, ReservedCollectionNameError as R, SessionExpiredError as S, TranslatorNotConfiguredError as T, FilenameSanitizationError as U, GroupCardinalityError as V, ImportCapabilityError as W, IndexRequiredError as X, IndexWriteFailureError as Y, InvalidKeyError as Z, type JoinContext as _, DictKeyMissingError as a, type JoinStrategy as a0, JoinTooLargeError as a1, type JoinableSource as a2, KeyringCorruptError as a3, KeyringExpiredError as a4, LedgerContentionError as a5, type LiveQuery as a6, type LiveUpstream as a7, NetworkError as a8, NoAccessError as a9, buildLiveQuery as aA, executePlan as aB, ref as aC, resetJoinWarnings as aD, NotFoundError as aa, type OrderBy as ab, PathEscapeError as ac, PeriodClosedError as ad, PermissionDeniedError as ae, PrivilegeEscalationError as af, type QueryPlan as ag, type QuerySource as ah, ReadOnlyAtInstantError as ai, ReadOnlyError as aj, ReadOnlyFrameError as ak, type RefDescriptor as al, RefIntegrityError as am, type RefMode as an, RefRegistry as ao, RefScopeError as ap, type RefViolation as aq, ScanBuilder as ar, type ScanPageProvider as as, SchemaValidationError as at, StoreCapabilityError as au, TamperedError as av, TierDemoteDeniedError as aw, TierNotGrantedError as ax, ValidationError as ay, applyJoins as az, SessionNotFoundError as b, SessionPolicyError as c, RecordLockedError as d, DerivationCapExceededError as e, DerivationCycleError as f, DerivationDepthError as g, DerivationOutputShapeError as h, DerivationOutputUnknownError as i, OverlayCollectionUnavailableError as j, OverlayIdMismatchError as k, OverlayNameCollisionError as l, AttestationError as m, AdoptionStateError as n, BackupLedgerError as o, BundleIntegrityError as p, BundleSealMismatchError as q, BundleVersionConflictError as r, TransferSealError as s, MaterializedViewConfigError as t, MaterializedViewCycleError as u, MaterializedViewSourceUnknownError as v, MaterializedViewTooLargeError as w, AlreadyElevatedError as x, DEFAULT_JOIN_MAX_ROWS as y, DanglingReferenceError as z };
|