@noy-db/hub 0.2.0-pre.10 → 0.2.0-pre.12
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/README.md +126 -0
- package/dist/aggregate/index.cjs +289 -12
- 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 +7 -7
- package/dist/aggregate/index.js.map +1 -1
- package/dist/attestation/index.cjs.map +1 -1
- package/dist/attestation/index.d.cts +3 -3
- package/dist/attestation/index.d.ts +3 -3
- package/dist/attestation/index.js +6 -6
- package/dist/blobs/index.cjs +28 -0
- package/dist/blobs/index.cjs.map +1 -1
- package/dist/blobs/index.d.cts +4 -4
- package/dist/blobs/index.d.ts +4 -4
- package/dist/blobs/index.js +5 -5
- package/dist/bundle/index.cjs +1468 -19
- package/dist/bundle/index.cjs.map +1 -1
- package/dist/bundle/index.d.cts +5 -5
- package/dist/bundle/index.d.ts +5 -5
- package/dist/bundle/index.js +9 -9
- package/dist/{chunk-7CEGU63S.js → chunk-4BHFNKTP.js} +2 -2
- package/dist/{chunk-5OEJ6GOT.js → chunk-5ARRXIVR.js} +2 -2
- package/dist/{chunk-DRXIZOFV.js → chunk-6AD5TBF2.js} +31 -3
- package/dist/chunk-6AD5TBF2.js.map +1 -0
- package/dist/{chunk-YM7LFCG7.js → chunk-6BYBVRZU.js} +3 -3
- package/dist/{chunk-5IXJGFF2.js → chunk-7JJE3OMJ.js} +5 -5
- package/dist/{chunk-HHOO7HGH.js → chunk-7LVRIW4G.js} +4 -4
- package/dist/{chunk-O6EJ6WTI.js → chunk-AGRC7NQQ.js} +62 -2
- package/dist/chunk-AGRC7NQQ.js.map +1 -0
- package/dist/{chunk-IMYKDWB4.js → chunk-B7GGYNKQ.js} +2 -2
- package/dist/{chunk-BDV7INMP.js → chunk-BXOUVUES.js} +4 -4
- package/dist/{chunk-FO3UEG4S.js → chunk-C2CIIQRG.js} +2 -2
- package/dist/{chunk-ZROPXHJY.js → chunk-CHBXWJZQ.js} +2 -2
- package/dist/{chunk-RYIL3PI2.js → chunk-CILT6V3V.js} +2 -2
- package/dist/{chunk-PXTQPZO4.js → chunk-DLTU4M2I.js} +6 -6
- package/dist/{chunk-GAUEWM7D.js → chunk-EKNUBIIQ.js} +4 -4
- package/dist/{chunk-HQSQC2XL.js → chunk-GFPR7VJS.js} +17 -4
- package/dist/chunk-GFPR7VJS.js.map +1 -0
- package/dist/{chunk-6EOXTJS2.js → chunk-HBAJDI2N.js} +5 -5
- package/dist/{chunk-PVUUIWHY.js → chunk-HLGDYFWR.js} +10 -3
- package/dist/chunk-HLGDYFWR.js.map +1 -0
- package/dist/{chunk-RRNA5GKT.js → chunk-IEPT7HVP.js} +2 -2
- package/dist/{chunk-R233SLY3.js → chunk-IUBHXEPJ.js} +2 -2
- package/dist/{chunk-CH22FZHT.js → chunk-L6BYRCYB.js} +2 -2
- package/dist/{chunk-5OX6XVNS.js → chunk-LOA2VCMS.js} +5 -5
- package/dist/{chunk-BB27JMWB.js → chunk-LSEW3ZZ2.js} +3 -3
- package/dist/{chunk-Y26YV5R3.js → chunk-LWSD4QPT.js} +3 -3
- package/dist/{chunk-WIRRPTFH.js → chunk-LYNNZEQD.js} +1 -1
- package/dist/chunk-LYNNZEQD.js.map +1 -0
- package/dist/{chunk-26NK23DZ.js → chunk-M45IRXDM.js} +3 -3
- package/dist/{chunk-CXJG63MA.js → chunk-NP6EZT44.js} +20 -6
- package/dist/chunk-NP6EZT44.js.map +1 -0
- package/dist/{chunk-GNHAC43Q.js → chunk-O53RIZCC.js} +5 -5
- package/dist/chunk-OPDTLHFA.js +783 -0
- package/dist/chunk-OPDTLHFA.js.map +1 -0
- package/dist/{chunk-LSTBFLL2.js → chunk-P3Z5Y2TS.js} +2 -2
- package/dist/{chunk-QSOYKKMD.js → chunk-P4EDT5ZP.js} +2 -2
- package/dist/{chunk-PC6ZEDRL.js → chunk-RHQYVHFH.js} +2 -2
- package/dist/{chunk-3LPV6BXR.js → chunk-RRDWXNBQ.js} +3 -3
- package/dist/{chunk-4CLICFEY.js → chunk-SJJQKNMP.js} +4 -4
- package/dist/{chunk-TY32C732.js → chunk-SZ4N3IL5.js} +5 -5
- package/dist/{chunk-4USCAEDT.js → chunk-TMHJEYW7.js} +502 -60
- package/dist/chunk-TMHJEYW7.js.map +1 -0
- package/dist/{chunk-2N62W5YP.js → chunk-UA6G45ME.js} +3 -3
- package/dist/{chunk-6YLPHBKR.js → chunk-UOC7JMZO.js} +13 -4
- package/dist/chunk-UOC7JMZO.js.map +1 -0
- package/dist/{chunk-DAP2XL7Q.js → chunk-VOXMU6LB.js} +2 -2
- package/dist/chunk-WNRGOVLG.js +64 -0
- package/dist/chunk-WNRGOVLG.js.map +1 -0
- package/dist/{chunk-DJRWA3Q5.js → chunk-WUG3E423.js} +4 -4
- package/dist/{chunk-PM3QYWUU.js → chunk-XHM2SARW.js} +3 -3
- package/dist/{chunk-RC6SU5NO.js → chunk-XSIFXX54.js} +2 -2
- package/dist/{chunk-CXFOITNS.js → chunk-ZC7MNVYN.js} +2 -2
- package/dist/{chunk-6T2UDBKG.js → chunk-ZCFS7U4J.js} +2 -2
- package/dist/consent/index.cjs.map +1 -1
- package/dist/consent/index.d.cts +4 -4
- package/dist/consent/index.d.ts +4 -4
- package/dist/consent/index.js +3 -3
- package/dist/{crypto-2CRLG4F4.js → crypto-AJB72OKN.js} +3 -3
- package/dist/{delegation-ZTRT2PRV.js → delegation-6FCWDRUS.js} +5 -5
- package/dist/derivations/index.cjs.map +1 -1
- package/dist/derivations/index.d.cts +5 -5
- package/dist/derivations/index.d.ts +5 -5
- package/dist/derivations/index.js +4 -4
- package/dist/{dev-unlock-BOEYl1xl.d.ts → dev-unlock-D3mpVFRc.d.ts} +1 -1
- package/dist/{dev-unlock-AglVnkPY.d.cts → dev-unlock-ckqa_Nso.d.cts} +1 -1
- package/dist/executor-7KSCEIFA.js +8 -0
- package/dist/executor-D2QMNGRJ.js +8 -0
- package/dist/executor-O5AZK7UW.js +11 -0
- package/dist/{fanout-sidecar-OKPMMPLG.js → fanout-sidecar-ZSKEQ6NI.js} +2 -2
- package/dist/guards/index.cjs +53 -1
- package/dist/guards/index.cjs.map +1 -1
- package/dist/guards/index.d.cts +12 -6
- package/dist/guards/index.d.ts +12 -6
- package/dist/guards/index.js +5 -3
- package/dist/{hash-B9m3_fhj.d.ts → hash-CTZVkXLx.d.ts} +1 -1
- package/dist/{hash-RVqz2zi8.d.cts → hash-rDSSd_oW.d.cts} +1 -1
- package/dist/history/index.cjs.map +1 -1
- package/dist/history/index.d.cts +5 -5
- package/dist/history/index.d.ts +5 -5
- package/dist/history/index.js +5 -5
- package/dist/i18n/index.cjs.map +1 -1
- package/dist/i18n/index.d.cts +4 -4
- package/dist/i18n/index.d.ts +4 -4
- package/dist/i18n/index.js +6 -6
- package/dist/immutable-guard-C51vAHuh.d.cts +67 -0
- package/dist/immutable-guard-DyD0qg2k.d.ts +67 -0
- package/dist/index-CkFHr4OP.d.ts +1190 -0
- package/dist/index-Cmop06zJ.d.cts +1190 -0
- package/dist/index.cjs +1636 -61
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +46 -13
- package/dist/index.d.ts +46 -13
- package/dist/index.js +76 -44
- package/dist/index.js.map +1 -1
- package/dist/indexing/index.cjs.map +1 -1
- package/dist/indexing/index.js +2 -2
- package/dist/issue-YIYG4OW5.js +12 -0
- package/dist/{ledger-O7FXOG3D.js → ledger-5JMVF7PY.js} +5 -5
- package/dist/materialized-views/index.cjs.map +1 -1
- package/dist/materialized-views/index.d.cts +5 -6
- package/dist/materialized-views/index.d.ts +5 -6
- package/dist/materialized-views/index.js +6 -6
- package/dist/noydb-D5SLAJ6V.js +34 -0
- package/dist/overlay-views/index.cjs.map +1 -1
- package/dist/overlay-views/index.d.cts +5 -5
- package/dist/overlay-views/index.d.ts +5 -5
- package/dist/overlay-views/index.js +4 -4
- package/dist/periods/index.cjs.map +1 -1
- package/dist/periods/index.d.cts +4 -4
- package/dist/periods/index.d.ts +4 -4
- package/dist/periods/index.js +5 -5
- package/dist/{public-envelope-HMYHZIRH.js → public-envelope-PFLZI5MO.js} +4 -4
- package/dist/query/index.cjs +293 -10
- package/dist/query/index.cjs.map +1 -1
- package/dist/query/index.d.cts +2 -2
- package/dist/query/index.d.ts +2 -2
- package/dist/query/index.js +4 -4
- package/dist/registry-BVQ5ITMF.js +8 -0
- package/dist/registry-JLP3QOLD.js +8 -0
- package/dist/{registry-ST2VNFZC.js → registry-NCY445U5.js} +3 -3
- package/dist/{revoke-S6JMSLUN.js → revoke-7RLGQWZ7.js} +6 -6
- package/dist/session/index.cjs.map +1 -1
- package/dist/session/index.d.cts +5 -5
- package/dist/session/index.d.ts +5 -5
- package/dist/session/index.js +3 -3
- package/dist/shadow/index.cjs.map +1 -1
- package/dist/shadow/index.d.cts +4 -4
- package/dist/shadow/index.d.ts +4 -4
- package/dist/shadow/index.js +2 -2
- package/dist/{signer-7NPTB3SQ.js → signer-6JF44I4A.js} +5 -5
- package/dist/snapshots/index.cjs.map +1 -1
- package/dist/snapshots/index.d.cts +4 -4
- package/dist/snapshots/index.d.ts +4 -4
- package/dist/snapshots/index.js +4 -4
- package/dist/{stale-VKXSXJF4.js → stale-UBLP3RJ3.js} +2 -2
- package/dist/store/index.cjs.map +1 -1
- package/dist/store/index.d.cts +4 -4
- package/dist/store/index.d.ts +4 -4
- package/dist/store/index.js +2 -2
- package/dist/strategy-rtpKDfTC.d.cts +2029 -0
- package/dist/strategy-rtpKDfTC.d.ts +2029 -0
- package/dist/sync/index.cjs.map +1 -1
- package/dist/sync/index.d.cts +3 -3
- package/dist/sync/index.d.ts +3 -3
- package/dist/sync/index.js +4 -4
- package/dist/team/index.cjs.map +1 -1
- package/dist/team/index.d.cts +4 -4
- package/dist/team/index.d.ts +4 -4
- package/dist/team/index.js +8 -8
- package/dist/tx/index.cjs +8 -1
- package/dist/tx/index.cjs.map +1 -1
- package/dist/tx/index.d.cts +4 -4
- package/dist/tx/index.d.ts +4 -4
- package/dist/tx/index.js +3 -3
- package/dist/{types-n2_IfwlQ.d.cts → types-BGwjsDef.d.cts} +520 -6
- package/dist/{types-CaNQm4i8.d.ts → types-DRdfwgTG.d.ts} +520 -6
- package/dist/{ulid-CLMjmyhG.d.cts → ulid-D4d0Xto3.d.cts} +1 -1
- package/dist/{ulid-B9SMWj5i.d.ts → ulid-DOTPZ5_h.d.ts} +1 -1
- package/dist/util/index.cjs.map +1 -1
- package/dist/util/index.js +1 -1
- package/dist/vault-group-Z4KB75ZH.js +450 -0
- package/dist/vault-group-Z4KB75ZH.js.map +1 -0
- package/dist/{with-derivation-CVIOPTUf.d.ts → with-derivation-B082Y_WQ.d.ts} +1 -1
- package/dist/{with-derivation-aKrtS7Jj.d.cts → with-derivation-CB1EdcFF.d.cts} +1 -1
- package/dist/{with-materialized-view-C1eA1_T_.d.cts → with-materialized-view-CzRg1Dpr.d.cts} +1 -1
- package/dist/{with-materialized-view-DaYaE8-Q.d.ts → with-materialized-view-Dw4SwjKl.d.ts} +1 -1
- package/dist/{with-overlayed-view-DleJfKcV.d.cts → with-overlayed-view-C9YFKXzn.d.cts} +1 -1
- package/dist/{with-overlayed-view-DQsh2p8H.d.ts → with-overlayed-view-CaCXeW26.d.ts} +1 -1
- package/package.json +3 -3
- package/dist/chunk-2LPPNWF6.js +0 -340
- package/dist/chunk-2LPPNWF6.js.map +0 -1
- package/dist/chunk-4USCAEDT.js.map +0 -1
- package/dist/chunk-6YLPHBKR.js.map +0 -1
- package/dist/chunk-C3WE6UJY.js +0 -19
- package/dist/chunk-C3WE6UJY.js.map +0 -1
- package/dist/chunk-CXJG63MA.js.map +0 -1
- package/dist/chunk-DRXIZOFV.js.map +0 -1
- package/dist/chunk-HQSQC2XL.js.map +0 -1
- package/dist/chunk-O6EJ6WTI.js.map +0 -1
- package/dist/chunk-PVUUIWHY.js.map +0 -1
- package/dist/chunk-WIRRPTFH.js.map +0 -1
- package/dist/executor-S76VN45G.js +0 -8
- package/dist/executor-UCXLIGLW.js +0 -11
- package/dist/executor-ZCNZJMGR.js +0 -8
- package/dist/index-B8bjExET.d.cts +0 -2434
- package/dist/index-DfUbNad8.d.ts +0 -2434
- package/dist/issue-3W6IVLKH.js +0 -12
- package/dist/noydb-YAZNH5TI.js +0 -34
- package/dist/registry-UFIK7CSR.js +0 -8
- package/dist/registry-ZGYYSM5I.js +0 -8
- package/dist/strategy-CT2LCKAX.d.cts +0 -613
- package/dist/strategy-CT2LCKAX.d.ts +0 -613
- package/dist/with-guard-DZQbPzoP.d.cts +0 -18
- package/dist/with-guard-DseETUrF.d.ts +0 -18
- /package/dist/{chunk-7CEGU63S.js.map → chunk-4BHFNKTP.js.map} +0 -0
- /package/dist/{chunk-5OEJ6GOT.js.map → chunk-5ARRXIVR.js.map} +0 -0
- /package/dist/{chunk-YM7LFCG7.js.map → chunk-6BYBVRZU.js.map} +0 -0
- /package/dist/{chunk-5IXJGFF2.js.map → chunk-7JJE3OMJ.js.map} +0 -0
- /package/dist/{chunk-HHOO7HGH.js.map → chunk-7LVRIW4G.js.map} +0 -0
- /package/dist/{chunk-IMYKDWB4.js.map → chunk-B7GGYNKQ.js.map} +0 -0
- /package/dist/{chunk-BDV7INMP.js.map → chunk-BXOUVUES.js.map} +0 -0
- /package/dist/{chunk-FO3UEG4S.js.map → chunk-C2CIIQRG.js.map} +0 -0
- /package/dist/{chunk-ZROPXHJY.js.map → chunk-CHBXWJZQ.js.map} +0 -0
- /package/dist/{chunk-RYIL3PI2.js.map → chunk-CILT6V3V.js.map} +0 -0
- /package/dist/{chunk-PXTQPZO4.js.map → chunk-DLTU4M2I.js.map} +0 -0
- /package/dist/{chunk-GAUEWM7D.js.map → chunk-EKNUBIIQ.js.map} +0 -0
- /package/dist/{chunk-6EOXTJS2.js.map → chunk-HBAJDI2N.js.map} +0 -0
- /package/dist/{chunk-RRNA5GKT.js.map → chunk-IEPT7HVP.js.map} +0 -0
- /package/dist/{chunk-R233SLY3.js.map → chunk-IUBHXEPJ.js.map} +0 -0
- /package/dist/{chunk-CH22FZHT.js.map → chunk-L6BYRCYB.js.map} +0 -0
- /package/dist/{chunk-5OX6XVNS.js.map → chunk-LOA2VCMS.js.map} +0 -0
- /package/dist/{chunk-BB27JMWB.js.map → chunk-LSEW3ZZ2.js.map} +0 -0
- /package/dist/{chunk-Y26YV5R3.js.map → chunk-LWSD4QPT.js.map} +0 -0
- /package/dist/{chunk-26NK23DZ.js.map → chunk-M45IRXDM.js.map} +0 -0
- /package/dist/{chunk-GNHAC43Q.js.map → chunk-O53RIZCC.js.map} +0 -0
- /package/dist/{chunk-LSTBFLL2.js.map → chunk-P3Z5Y2TS.js.map} +0 -0
- /package/dist/{chunk-QSOYKKMD.js.map → chunk-P4EDT5ZP.js.map} +0 -0
- /package/dist/{chunk-PC6ZEDRL.js.map → chunk-RHQYVHFH.js.map} +0 -0
- /package/dist/{chunk-3LPV6BXR.js.map → chunk-RRDWXNBQ.js.map} +0 -0
- /package/dist/{chunk-4CLICFEY.js.map → chunk-SJJQKNMP.js.map} +0 -0
- /package/dist/{chunk-TY32C732.js.map → chunk-SZ4N3IL5.js.map} +0 -0
- /package/dist/{chunk-2N62W5YP.js.map → chunk-UA6G45ME.js.map} +0 -0
- /package/dist/{chunk-DAP2XL7Q.js.map → chunk-VOXMU6LB.js.map} +0 -0
- /package/dist/{chunk-DJRWA3Q5.js.map → chunk-WUG3E423.js.map} +0 -0
- /package/dist/{chunk-PM3QYWUU.js.map → chunk-XHM2SARW.js.map} +0 -0
- /package/dist/{chunk-RC6SU5NO.js.map → chunk-XSIFXX54.js.map} +0 -0
- /package/dist/{chunk-CXFOITNS.js.map → chunk-ZC7MNVYN.js.map} +0 -0
- /package/dist/{chunk-6T2UDBKG.js.map → chunk-ZCFS7U4J.js.map} +0 -0
- /package/dist/{crypto-2CRLG4F4.js.map → crypto-AJB72OKN.js.map} +0 -0
- /package/dist/{delegation-ZTRT2PRV.js.map → delegation-6FCWDRUS.js.map} +0 -0
- /package/dist/{executor-S76VN45G.js.map → executor-7KSCEIFA.js.map} +0 -0
- /package/dist/{executor-UCXLIGLW.js.map → executor-D2QMNGRJ.js.map} +0 -0
- /package/dist/{executor-ZCNZJMGR.js.map → executor-O5AZK7UW.js.map} +0 -0
- /package/dist/{fanout-sidecar-OKPMMPLG.js.map → fanout-sidecar-ZSKEQ6NI.js.map} +0 -0
- /package/dist/{issue-3W6IVLKH.js.map → issue-YIYG4OW5.js.map} +0 -0
- /package/dist/{ledger-O7FXOG3D.js.map → ledger-5JMVF7PY.js.map} +0 -0
- /package/dist/{noydb-YAZNH5TI.js.map → noydb-D5SLAJ6V.js.map} +0 -0
- /package/dist/{public-envelope-HMYHZIRH.js.map → public-envelope-PFLZI5MO.js.map} +0 -0
- /package/dist/{registry-ST2VNFZC.js.map → registry-BVQ5ITMF.js.map} +0 -0
- /package/dist/{registry-UFIK7CSR.js.map → registry-JLP3QOLD.js.map} +0 -0
- /package/dist/{registry-ZGYYSM5I.js.map → registry-NCY445U5.js.map} +0 -0
- /package/dist/{revoke-S6JMSLUN.js.map → revoke-7RLGQWZ7.js.map} +0 -0
- /package/dist/{signer-7NPTB3SQ.js.map → signer-6JF44I4A.js.map} +0 -0
- /package/dist/{stale-VKXSXJF4.js.map → stale-UBLP3RJ3.js.map} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { I as IndexStrategy, d as LazyQuery } from './lazy-builder-Ci5_YG73.cjs';
|
|
2
|
-
import {
|
|
2
|
+
import { a7 as NoydbError, o as LiveAggregation, f as AggregateSpec, e as AggregateResult, A as AggregateStrategy, au as MoneyDescriptor } from './strategy-rtpKDfTC.cjs';
|
|
3
3
|
import { C as CrdtStrategy, a as CrdtMode, b as CrdtState } from './strategy-BSxFXGzb.cjs';
|
|
4
|
-
import {
|
|
5
|
-
import { F as FieldClause, I as IndexDef, C as CollectionIndexes } from './predicate-Bt5ft-9c.cjs';
|
|
4
|
+
import { L as LiveQuery, Q as Query, j as RefRegistry, R as RefDescriptor, d as JoinableSource, l as RefViolation, S as ScanBuilder } from './index-Cmop06zJ.cjs';
|
|
5
|
+
import { O as Operator, F as FieldClause, I as IndexDef, C as CollectionIndexes } from './predicate-Bt5ft-9c.cjs';
|
|
6
6
|
import { AttestationFieldSchema, RevocationList } from '@noy-db/attestation';
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -582,6 +582,71 @@ interface BlobStrategy {
|
|
|
582
582
|
openSlot(args: BlobStrategyOpenArgs): BlobSet;
|
|
583
583
|
}
|
|
584
584
|
|
|
585
|
+
/**
|
|
586
|
+
* Record cold-storage archival engine.
|
|
587
|
+
*
|
|
588
|
+
* Archival relocates a sealed record's **encrypted envelope** from the
|
|
589
|
+
* primary store to a cold archive store — no re-encryption, the envelope
|
|
590
|
+
* is opaque ciphertext. Because relocation goes through low-level store
|
|
591
|
+
* ops (and the collection's `_internalDelete`), it bypasses guards (an
|
|
592
|
+
* issued/immutable record can still be archived) and never fires
|
|
593
|
+
* materialized-view dispatch (finalized aggregates over a sealed period
|
|
594
|
+
* don't recompute). The archive store's contents are themselves the
|
|
595
|
+
* archived-set index — `listArchived` lists it; `restore` relocates an
|
|
596
|
+
* envelope back to the primary store.
|
|
597
|
+
*
|
|
598
|
+
* A `legalHold` predicate blocks archival; `archiveWhen` (typically
|
|
599
|
+
* derived from the record's fiscal period / business date) selects
|
|
600
|
+
* eligible records.
|
|
601
|
+
*/
|
|
602
|
+
|
|
603
|
+
interface ArchivePolicy<T = unknown> {
|
|
604
|
+
/** Select records eligible for archival — typically a business-date / period test. */
|
|
605
|
+
readonly archiveWhen: (record: T) => boolean;
|
|
606
|
+
/** Block archival while true (litigation / audit hold). Fail-closed on throw. */
|
|
607
|
+
readonly legalHold?: (record: T) => boolean;
|
|
608
|
+
}
|
|
609
|
+
interface ArchiveResult {
|
|
610
|
+
/** Records relocated to the archive store. */
|
|
611
|
+
readonly archived: number;
|
|
612
|
+
/** Records eligible by `archiveWhen` but retained by a `legalHold`. */
|
|
613
|
+
readonly held: number;
|
|
614
|
+
/** Records scanned across policy collections. */
|
|
615
|
+
readonly scanned: number;
|
|
616
|
+
readonly byCollection: Record<string, {
|
|
617
|
+
archived: number;
|
|
618
|
+
held: number;
|
|
619
|
+
}>;
|
|
620
|
+
}
|
|
621
|
+
interface ArchiveRunOptions {
|
|
622
|
+
/** Stop after this many archivals. `undefined` = unbounded. */
|
|
623
|
+
readonly maxArchives?: number;
|
|
624
|
+
/** Preview without relocating. */
|
|
625
|
+
readonly dryRun?: boolean;
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
/**
|
|
629
|
+
* `@noy-db/hub` record cold-storage archival subsystem.
|
|
630
|
+
*
|
|
631
|
+
* `withArchive({ store })` designates a cold {@link NoydbStore} as the
|
|
632
|
+
* archive target. Declare a per-collection `archive` policy, then call
|
|
633
|
+
* `vault.archive()` to relocate eligible sealed records there,
|
|
634
|
+
* `vault.restore(collection, id)` to pull one back, and
|
|
635
|
+
* `vault.listArchived()` to enumerate the cold set.
|
|
636
|
+
*
|
|
637
|
+
* @see ./engine for the relocation logic.
|
|
638
|
+
*/
|
|
639
|
+
|
|
640
|
+
interface WithArchiveOptions {
|
|
641
|
+
/** The cold store that holds archived record envelopes. */
|
|
642
|
+
store: NoydbStore;
|
|
643
|
+
}
|
|
644
|
+
interface ArchiveStrategy {
|
|
645
|
+
readonly store: NoydbStore;
|
|
646
|
+
}
|
|
647
|
+
/** Enable record cold-storage archival against the given cold store. */
|
|
648
|
+
declare function withArchive(opts: WithArchiveOptions): ArchiveStrategy;
|
|
649
|
+
|
|
585
650
|
/**
|
|
586
651
|
* Consent boundaries — per-access audit log.
|
|
587
652
|
*
|
|
@@ -2620,6 +2685,41 @@ declare class DictionaryHandle<Keys extends string = string> {
|
|
|
2620
2685
|
resolveLabel(key: string, locale: string, fallback?: string | readonly string[]): Promise<string | undefined>;
|
|
2621
2686
|
}
|
|
2622
2687
|
|
|
2688
|
+
/**
|
|
2689
|
+
* Computed scalar fields — schema-owned derived values evaluated on
|
|
2690
|
+
* write and materialized onto the record.
|
|
2691
|
+
*
|
|
2692
|
+
* A `computed` map declares pure, synchronous functions keyed by field
|
|
2693
|
+
* path. {@link evalComputedFields} runs them in declaration order — each
|
|
2694
|
+
* function sees the record with all prior computed fields already
|
|
2695
|
+
* injected, so a later field can read an earlier one (`total` reads
|
|
2696
|
+
* `netAmount`). The result is stored like any field: queryable,
|
|
2697
|
+
* indexable, and `aggregate(sum())`-able (exactly, when the field is also
|
|
2698
|
+
* a `money()` field).
|
|
2699
|
+
*
|
|
2700
|
+
* Computed evaluation is the FIRST stage of the write pipeline (before
|
|
2701
|
+
* schema validation), so the user need not supply computed fields and the
|
|
2702
|
+
* schema validates the computed result. Cross-record / async derivation
|
|
2703
|
+
* is out of scope here — see the validation subsystem (#299).
|
|
2704
|
+
*/
|
|
2705
|
+
|
|
2706
|
+
type ComputedFn<T = Record<string, unknown>> = (record: T) => unknown;
|
|
2707
|
+
type ComputedFields<T = Record<string, unknown>> = Record<string, ComputedFn<T>>;
|
|
2708
|
+
/** Raised when a computed function throws during a write. */
|
|
2709
|
+
declare class ComputedFieldError extends NoydbError {
|
|
2710
|
+
readonly field: string;
|
|
2711
|
+
readonly id: string;
|
|
2712
|
+
readonly cause: unknown;
|
|
2713
|
+
constructor(field: string, id: string, cause: unknown);
|
|
2714
|
+
}
|
|
2715
|
+
/**
|
|
2716
|
+
* Evaluate every computed field in declaration order, injecting each
|
|
2717
|
+
* result into a shallow clone. A computed field overwrites any
|
|
2718
|
+
* user-supplied value of the same name — the field is schema-owned.
|
|
2719
|
+
* Returns the new record; the input is not mutated.
|
|
2720
|
+
*/
|
|
2721
|
+
declare function evalComputedFields<T extends Record<string, unknown>>(record: T, computed: ComputedFields, id: string): T;
|
|
2722
|
+
|
|
2623
2723
|
/**
|
|
2624
2724
|
* Infer the allowed Unicode scripts for a BCP-47 locale, with asymmetric
|
|
2625
2725
|
* Latin tolerance. A script subtag (`th-Latn`) wins over the base
|
|
@@ -2854,6 +2954,14 @@ interface GatePutEvent {
|
|
|
2854
2954
|
readonly existingTs: string | undefined;
|
|
2855
2955
|
readonly userId: string;
|
|
2856
2956
|
readonly role: Role;
|
|
2957
|
+
/**
|
|
2958
|
+
* Names of fields whose values are schema-owned computed fields for this
|
|
2959
|
+
* collection. Gate handlers (e.g. `frozenFields`) must skip these: the
|
|
2960
|
+
* incoming record is the raw user input (computed fields not yet evaluated),
|
|
2961
|
+
* so comparing `existing[computedField]` vs `incoming[computedField]`
|
|
2962
|
+
* would always see a change even when the computed result is unchanged.
|
|
2963
|
+
*/
|
|
2964
|
+
readonly computedFieldNames?: ReadonlySet<string>;
|
|
2857
2965
|
}
|
|
2858
2966
|
/** Payload for a `beforeDelete` gate. Like {@link GatePutEvent} without `incoming`. */
|
|
2859
2967
|
interface GateDeleteEvent {
|
|
@@ -4972,6 +5080,224 @@ interface FactorProofBundle {
|
|
|
4972
5080
|
/** Active session tier — what the engine compares against `gate.minTier`. */
|
|
4973
5081
|
type ActiveTier = 1 | 2 | 3;
|
|
4974
5082
|
|
|
5083
|
+
/**
|
|
5084
|
+
* @category capability
|
|
5085
|
+
* Multi-vault partition federation (MVF) — public types for VaultGroup
|
|
5086
|
+
* transparent shard routing. See
|
|
5087
|
+
* docs/superpowers/specs/2026-06-07-mvf-vaultgroup-routing-mvp-design.md.
|
|
5088
|
+
*/
|
|
5089
|
+
|
|
5090
|
+
/**
|
|
5091
|
+
* A schema blueprint for a class of shard vaults. `configure` is
|
|
5092
|
+
* re-applied to every shard handle so all shards are configured
|
|
5093
|
+
* identically (collections, indexes, schemas). `version` is recorded
|
|
5094
|
+
* into each shard's registry row and drives the fan-out
|
|
5095
|
+
* `minVersion` guard.
|
|
5096
|
+
*/
|
|
5097
|
+
interface VaultTemplate {
|
|
5098
|
+
readonly version: number;
|
|
5099
|
+
readonly configure: (vault: Vault) => void;
|
|
5100
|
+
}
|
|
5101
|
+
/** One row in the StateManagement `vault-registry` collection. */
|
|
5102
|
+
interface VaultRegistryRow {
|
|
5103
|
+
readonly vaultId: string;
|
|
5104
|
+
readonly partitionKey: string;
|
|
5105
|
+
readonly templateName: string;
|
|
5106
|
+
readonly schemaVersion: number;
|
|
5107
|
+
readonly createdAt: number;
|
|
5108
|
+
}
|
|
5109
|
+
/** How a VaultGroup maps records to shards. */
|
|
5110
|
+
interface ShardingConfig<T> {
|
|
5111
|
+
/** Extract the partition key from a record. */
|
|
5112
|
+
readonly keyOf: (record: T) => string;
|
|
5113
|
+
/** Name of the template (registered via `withVaultTemplate`) shards are stamped from. */
|
|
5114
|
+
readonly vaultTemplate: string;
|
|
5115
|
+
/** When a write targets an unknown partition key, stamp a shard inline. Default `true`. */
|
|
5116
|
+
readonly autoCreate?: boolean;
|
|
5117
|
+
}
|
|
5118
|
+
/** Options for `Noydb.openVaultGroup`. */
|
|
5119
|
+
interface VaultGroupOptions<T> {
|
|
5120
|
+
/** The `vault-registry` collection (source of truth for shard discovery). */
|
|
5121
|
+
readonly registry: Collection<VaultRegistryRow>;
|
|
5122
|
+
readonly sharding: ShardingConfig<T>;
|
|
5123
|
+
}
|
|
5124
|
+
/** Options for a cross-shard fan-out read. */
|
|
5125
|
+
interface FanoutQueryOptions {
|
|
5126
|
+
/** Skip shards whose registry `schemaVersion` is below this. */
|
|
5127
|
+
readonly minVersion?: number;
|
|
5128
|
+
/** Max shards queried in parallel (passed to queryAcross). Default 1. */
|
|
5129
|
+
readonly concurrency?: number;
|
|
5130
|
+
}
|
|
5131
|
+
/** A shard excluded from a fan-out result, with the reason. */
|
|
5132
|
+
interface SkippedVault {
|
|
5133
|
+
readonly vaultId: string;
|
|
5134
|
+
readonly reason: 'schema-drift' | 'error' | 'no-grant';
|
|
5135
|
+
readonly error?: Error;
|
|
5136
|
+
}
|
|
5137
|
+
/** The result of a cross-shard fan-out read. */
|
|
5138
|
+
interface FanoutResult<R> {
|
|
5139
|
+
readonly results: R[];
|
|
5140
|
+
readonly skippedVaults: SkippedVault[];
|
|
5141
|
+
}
|
|
5142
|
+
/** A single captured where-clause, replayed inside each shard. */
|
|
5143
|
+
interface WhereClause {
|
|
5144
|
+
readonly field: string;
|
|
5145
|
+
readonly op: Operator;
|
|
5146
|
+
readonly value: unknown;
|
|
5147
|
+
}
|
|
5148
|
+
/** Options for the live/aggregate fan-out (extends the one-shot opts). */
|
|
5149
|
+
interface LiveQueryOptions extends FanoutQueryOptions {
|
|
5150
|
+
/** Coalesce window before recompute. Default 0 (microtask). */
|
|
5151
|
+
readonly debounceMs?: number;
|
|
5152
|
+
}
|
|
5153
|
+
/** A grouped aggregate output row: the grouped field + the reduced spec result. */
|
|
5154
|
+
type GroupedRow<F extends string, Spec extends AggregateSpec> = {
|
|
5155
|
+
readonly [K in F]: unknown;
|
|
5156
|
+
} & AggregateResult<Spec>;
|
|
5157
|
+
/** Reactive cross-shard record (or grouped-row) query — array-shaped, mirrors LiveQuery<T>. */
|
|
5158
|
+
interface CrossVaultLiveQuery<T> extends LiveQuery<T> {
|
|
5159
|
+
readonly skippedVaults: readonly SkippedVault[];
|
|
5160
|
+
readonly ready: Promise<void>;
|
|
5161
|
+
}
|
|
5162
|
+
/** Reactive cross-shard scalar aggregate — mirrors LiveAggregation<R>. */
|
|
5163
|
+
interface CrossVaultLiveAggregation<R> extends LiveAggregation<R> {
|
|
5164
|
+
readonly skippedVaults: readonly SkippedVault[];
|
|
5165
|
+
readonly ready: Promise<void>;
|
|
5166
|
+
}
|
|
5167
|
+
|
|
5168
|
+
/** A source that can fan out records across shards. Satisfied by ShardedQuery. */
|
|
5169
|
+
interface FanoutRecordSource<R> {
|
|
5170
|
+
fanoutRecords(options: FanoutQueryOptions): Promise<{
|
|
5171
|
+
records: R[];
|
|
5172
|
+
skippedVaults: SkippedVault[];
|
|
5173
|
+
}>;
|
|
5174
|
+
}
|
|
5175
|
+
/** Live-binding hooks (change subscription + relevance) threaded from ShardedQuery. */
|
|
5176
|
+
interface LiveBinding {
|
|
5177
|
+
subscribeToChanges: (handler: (e: ChangeEvent) => void) => () => void;
|
|
5178
|
+
isRelevant: (e: ChangeEvent) => boolean;
|
|
5179
|
+
}
|
|
5180
|
+
/**
|
|
5181
|
+
* One-shot cross-vault aggregate. Concatenates all shard records and runs a
|
|
5182
|
+
* single central reduce, ensuring correct avg/mean values.
|
|
5183
|
+
*/
|
|
5184
|
+
declare class CrossVaultAggregation<R, Spec extends AggregateSpec> {
|
|
5185
|
+
private readonly src;
|
|
5186
|
+
private readonly spec;
|
|
5187
|
+
private readonly bind?;
|
|
5188
|
+
constructor(src: FanoutRecordSource<R>, spec: Spec, bind?: LiveBinding | undefined);
|
|
5189
|
+
run(options?: FanoutQueryOptions): Promise<{
|
|
5190
|
+
result: AggregateResult<Spec>;
|
|
5191
|
+
skippedVaults: SkippedVault[];
|
|
5192
|
+
}>;
|
|
5193
|
+
live(options?: LiveQueryOptions): CrossVaultLiveAggregation<AggregateResult<Spec>>;
|
|
5194
|
+
}
|
|
5195
|
+
/**
|
|
5196
|
+
* One-shot cross-vault grouped aggregate. Concatenates all shard records and
|
|
5197
|
+
* runs a single central group-and-reduce, emitting one row per bucket.
|
|
5198
|
+
*/
|
|
5199
|
+
declare class CrossVaultGroupedAggregation<R, F extends string, Spec extends AggregateSpec> {
|
|
5200
|
+
private readonly src;
|
|
5201
|
+
private readonly field;
|
|
5202
|
+
private readonly spec;
|
|
5203
|
+
private readonly bind?;
|
|
5204
|
+
constructor(src: FanoutRecordSource<R>, field: F, spec: Spec, bind?: LiveBinding | undefined);
|
|
5205
|
+
run(options?: FanoutQueryOptions): Promise<{
|
|
5206
|
+
results: GroupedRow<F, Spec>[];
|
|
5207
|
+
skippedVaults: SkippedVault[];
|
|
5208
|
+
}>;
|
|
5209
|
+
live(options?: LiveQueryOptions): CrossVaultLiveQuery<GroupedRow<F, Spec>>;
|
|
5210
|
+
}
|
|
5211
|
+
|
|
5212
|
+
/**
|
|
5213
|
+
* @category capability
|
|
5214
|
+
* Multi-vault partition federation — VaultGroup transparent shard
|
|
5215
|
+
* routing. Spec:
|
|
5216
|
+
* docs/superpowers/specs/2026-06-07-mvf-vaultgroup-routing-mvp-design.md.
|
|
5217
|
+
*/
|
|
5218
|
+
|
|
5219
|
+
declare class VaultGroup<T> {
|
|
5220
|
+
/** @internal */ readonly db: Noydb;
|
|
5221
|
+
/** @internal */ readonly name: string;
|
|
5222
|
+
/** @internal */ readonly registry: Collection<VaultRegistryRow>;
|
|
5223
|
+
/** @internal */ readonly sharding: ShardingConfig<T>;
|
|
5224
|
+
/** @internal */ readonly template: VaultTemplate;
|
|
5225
|
+
constructor(
|
|
5226
|
+
/** @internal */ db: Noydb,
|
|
5227
|
+
/** @internal */ name: string,
|
|
5228
|
+
/** @internal */ registry: Collection<VaultRegistryRow>,
|
|
5229
|
+
/** @internal */ sharding: ShardingConfig<T>,
|
|
5230
|
+
/** @internal */ template: VaultTemplate);
|
|
5231
|
+
/** Deterministic vault name for a partition key, namespaced by the group. */
|
|
5232
|
+
shardVaultId(partitionKey: string): string;
|
|
5233
|
+
/** All registry rows (hydrates the registry collection first). */
|
|
5234
|
+
allRows(): Promise<VaultRegistryRow[]>;
|
|
5235
|
+
/** Open an existing shard and apply the template. */
|
|
5236
|
+
openShard(partitionKey: string): Promise<Vault>;
|
|
5237
|
+
/**
|
|
5238
|
+
* Idempotently provision a shard for `partitionKey`. Returns the
|
|
5239
|
+
* configured vault handle.
|
|
5240
|
+
*
|
|
5241
|
+
* - row + vault present → no-op, return handle
|
|
5242
|
+
* - row present, vault gone → ShardProvisioningError
|
|
5243
|
+
* - row absent (vault present or not) → open-or-create, configure, write row
|
|
5244
|
+
*/
|
|
5245
|
+
createShard(partitionKey: string): Promise<Vault>;
|
|
5246
|
+
/**
|
|
5247
|
+
* Drill down to a single shard's full Collection API. Throws if the shard is unknown.
|
|
5248
|
+
* Also throws ShardProvisioningError if the registry row exists but the vault has been deleted
|
|
5249
|
+
* (registry/store divergence).
|
|
5250
|
+
*/
|
|
5251
|
+
shard(partitionKey: string): Promise<Vault>;
|
|
5252
|
+
/** A sharded view over one logical collection across all shards. */
|
|
5253
|
+
collection<R = T>(collectionName: string): ShardedCollection<T, R>;
|
|
5254
|
+
/** @internal — eligible (openable-candidate) rows + drift/divergence skips. */
|
|
5255
|
+
resolveEligible(options?: {
|
|
5256
|
+
minVersion?: number;
|
|
5257
|
+
}): Promise<{
|
|
5258
|
+
eligible: VaultRegistryRow[];
|
|
5259
|
+
skipped: SkippedVault[];
|
|
5260
|
+
}>;
|
|
5261
|
+
}
|
|
5262
|
+
declare class ShardedCollection<T, R = T> {
|
|
5263
|
+
private readonly group;
|
|
5264
|
+
private readonly collectionName;
|
|
5265
|
+
constructor(group: VaultGroup<T>, collectionName: string);
|
|
5266
|
+
/** Route a write to the shard owning `keyOf(record)`. */
|
|
5267
|
+
put(id: string, record: T): Promise<void>;
|
|
5268
|
+
/** Begin a cross-shard fan-out query. */
|
|
5269
|
+
query(): ShardedQuery<T, R>;
|
|
5270
|
+
}
|
|
5271
|
+
declare class ShardedQuery<T, R = T> {
|
|
5272
|
+
private readonly group;
|
|
5273
|
+
private readonly collectionName;
|
|
5274
|
+
private readonly clauses;
|
|
5275
|
+
constructor(group: VaultGroup<T>, collectionName: string, clauses: readonly WhereClause[]);
|
|
5276
|
+
where(field: string, op: WhereClause['op'], value: unknown): ShardedQuery<T, R>;
|
|
5277
|
+
/** @internal — fan out the where-filtered records across eligible shards. */
|
|
5278
|
+
fanoutRecords(options?: FanoutQueryOptions): Promise<{
|
|
5279
|
+
records: R[];
|
|
5280
|
+
skippedVaults: SkippedVault[];
|
|
5281
|
+
}>;
|
|
5282
|
+
/** Fan out across eligible shards and merge results. */
|
|
5283
|
+
toArray(options?: FanoutQueryOptions): Promise<FanoutResult<R>>;
|
|
5284
|
+
/** @internal — build the change-subscription + relevance binding for this query's group+collection. */
|
|
5285
|
+
liveBinding(): LiveBinding;
|
|
5286
|
+
/** Returns a reactive cross-shard live query — a facade over CrossVaultLive. */
|
|
5287
|
+
live(options?: LiveQueryOptions): CrossVaultLiveQuery<R>;
|
|
5288
|
+
/** One-shot distributed aggregate — central reduce over all shard records. */
|
|
5289
|
+
aggregate<Spec extends AggregateSpec>(spec: Spec): CrossVaultAggregation<R, Spec>;
|
|
5290
|
+
/** Begin a grouped cross-shard aggregate. */
|
|
5291
|
+
groupBy<F extends string>(field: F): ShardedGroupedQuery<T, R, F>;
|
|
5292
|
+
}
|
|
5293
|
+
/** Grouped cross-shard query — intermediate after `.groupBy(field)`, terminates with `.aggregate(spec)`. */
|
|
5294
|
+
declare class ShardedGroupedQuery<T, R, F extends string> {
|
|
5295
|
+
private readonly query;
|
|
5296
|
+
private readonly field;
|
|
5297
|
+
constructor(query: ShardedQuery<T, R>, field: F);
|
|
5298
|
+
aggregate<Spec extends AggregateSpec>(spec: Spec): CrossVaultGroupedAggregation<R, F, Spec>;
|
|
5299
|
+
}
|
|
5300
|
+
|
|
4975
5301
|
/** The top-level NOYDB instance. */
|
|
4976
5302
|
declare class Noydb {
|
|
4977
5303
|
#private;
|
|
@@ -5019,6 +5345,7 @@ declare class Noydb {
|
|
|
5019
5345
|
private writeRelay;
|
|
5020
5346
|
/** Per-vault policy enforcers. */
|
|
5021
5347
|
private readonly policyEnforcers;
|
|
5348
|
+
private readonly vaultTemplates;
|
|
5022
5349
|
private readonly txStrategy;
|
|
5023
5350
|
private readonly sessionStrategy;
|
|
5024
5351
|
private readonly syncStrategy;
|
|
@@ -5072,6 +5399,7 @@ declare class Noydb {
|
|
|
5072
5399
|
*/
|
|
5073
5400
|
openVault(name: string, opts?: {
|
|
5074
5401
|
locale?: string;
|
|
5402
|
+
create?: boolean;
|
|
5075
5403
|
}): Promise<Vault>;
|
|
5076
5404
|
/** Synchronous vault access (must call openVault first, or auto-opens). */
|
|
5077
5405
|
vault(name: string): Vault;
|
|
@@ -5269,6 +5597,22 @@ declare class Noydb {
|
|
|
5269
5597
|
* ```
|
|
5270
5598
|
*/
|
|
5271
5599
|
queryAcross<T>(vaultIds: string[], fn: (vault: Vault) => Promise<T>, options?: QueryAcrossOptions): Promise<QueryAcrossResult<T>[]>;
|
|
5600
|
+
/**
|
|
5601
|
+
* Register a shard schema blueprint. `createShard` / `openVaultGroup`
|
|
5602
|
+
* stamp shards from the named template. See the MVF design spec.
|
|
5603
|
+
*/
|
|
5604
|
+
withVaultTemplate(name: string, template: VaultTemplate): void;
|
|
5605
|
+
/**
|
|
5606
|
+
* Open a VaultGroup — transparent routing over per-partition shard
|
|
5607
|
+
* vaults, with shard discovery backed by the supplied `vault-registry`
|
|
5608
|
+
* collection.
|
|
5609
|
+
*/
|
|
5610
|
+
openVaultGroup<T>(name: string, opts: VaultGroupOptions<T>): Promise<VaultGroup<T>>;
|
|
5611
|
+
/**
|
|
5612
|
+
* @internal — true when an encrypted shard vault is provisioned
|
|
5613
|
+
* (its keyring exists in the store).
|
|
5614
|
+
*/
|
|
5615
|
+
_shardVaultProvisioned(vaultId: string): Promise<boolean>;
|
|
5272
5616
|
/**
|
|
5273
5617
|
* Change the current user's passphrase for a vault.
|
|
5274
5618
|
*
|
|
@@ -6827,6 +7171,64 @@ declare class OverlayedViewRegistry {
|
|
|
6827
7171
|
resolveBaseRowKey(name: string, mvRegistry: MaterializedViewRegistry | null): ((row: Record<string, unknown>) => string) | undefined;
|
|
6828
7172
|
}
|
|
6829
7173
|
|
|
7174
|
+
/**
|
|
7175
|
+
* Atomic sequence primitive — online-coordinated gap-free numbering.
|
|
7176
|
+
*
|
|
7177
|
+
* `vault.sequence('invoice-2026').next()` returns 1, 2, 3, … with no
|
|
7178
|
+
* gaps and no duplicates, even under concurrent callers. Each named
|
|
7179
|
+
* sequence is an independent counter record at `_sequences/<name>`,
|
|
7180
|
+
* incremented with an optimistic compare-and-swap retry loop — the same
|
|
7181
|
+
* proven pattern as the ledger head (`history/ledger/store.ts`).
|
|
7182
|
+
*
|
|
7183
|
+
* **Explicitly online-only.** Gap-free numbering requires single-authority
|
|
7184
|
+
* serialization, which an offline / non-CAS store cannot provide. `next()`
|
|
7185
|
+
* throws {@link SequenceOfflineError} unless the backing store advertises
|
|
7186
|
+
* `capabilities.casAtomic`. This is a deliberate, honest wall — an offline
|
|
7187
|
+
* writer cannot safely allocate a global sequence number.
|
|
7188
|
+
*
|
|
7189
|
+
* Note on "gap-free": the *sequence* is gap-free (each `next()` yields a
|
|
7190
|
+
* unique, +1 value). If a caller discards a value without using it, that
|
|
7191
|
+
* is a gap in *usage*, not in the sequence — assign each `next()` result
|
|
7192
|
+
* to its record in the same operation.
|
|
7193
|
+
*/
|
|
7194
|
+
|
|
7195
|
+
interface SequenceHandle {
|
|
7196
|
+
/** Atomically allocate and return the next value (1, 2, 3, …). */
|
|
7197
|
+
next(): Promise<number>;
|
|
7198
|
+
/** Read the current value without allocating. Returns 0 if never used. */
|
|
7199
|
+
peek(): Promise<number>;
|
|
7200
|
+
}
|
|
7201
|
+
declare class SequenceStore {
|
|
7202
|
+
private readonly adapter;
|
|
7203
|
+
private readonly vault;
|
|
7204
|
+
private readonly encrypted;
|
|
7205
|
+
private readonly getDEK;
|
|
7206
|
+
private readonly actor;
|
|
7207
|
+
/**
|
|
7208
|
+
* Memoized DEK promise. The `_sequences` collection DEK is created on
|
|
7209
|
+
* first access; without sharing one promise, a burst of concurrent
|
|
7210
|
+
* `next()` calls would each trigger DEK creation and diverge (one
|
|
7211
|
+
* writer's ciphertext unreadable by another). One shared promise → one
|
|
7212
|
+
* DEK.
|
|
7213
|
+
*/
|
|
7214
|
+
private dekPromise;
|
|
7215
|
+
constructor(opts: {
|
|
7216
|
+
adapter: NoydbStore;
|
|
7217
|
+
vault: string;
|
|
7218
|
+
encrypted: boolean;
|
|
7219
|
+
getDEK: (collectionName: string) => Promise<CryptoKey>;
|
|
7220
|
+
actor: string;
|
|
7221
|
+
});
|
|
7222
|
+
/** A handle bound to one sequence name. */
|
|
7223
|
+
handle(name: string): SequenceHandle;
|
|
7224
|
+
private assertOnline;
|
|
7225
|
+
private dek;
|
|
7226
|
+
private read;
|
|
7227
|
+
private encryptState;
|
|
7228
|
+
peek(name: string): Promise<number>;
|
|
7229
|
+
next(name: string): Promise<number>;
|
|
7230
|
+
}
|
|
7231
|
+
|
|
6830
7232
|
/**
|
|
6831
7233
|
* Vault-internal singleton that holds the guard graph and dispatches
|
|
6832
7234
|
* per-collection guard execution. Owned by `Vault`; not exported.
|
|
@@ -7064,6 +7466,23 @@ interface BlobFieldPolicy<T = unknown> {
|
|
|
7064
7466
|
* disable predicate-based eviction.
|
|
7065
7467
|
*/
|
|
7066
7468
|
readonly evictWhen?: (record: T) => boolean;
|
|
7469
|
+
/**
|
|
7470
|
+
* **Legal hold.** When this predicate returns `true`, the slot is
|
|
7471
|
+
* never evicted — `retainDays`/`evictWhen` are overridden. Use for a
|
|
7472
|
+
* litigation / audit hold on a fiscal document: the blob stays until
|
|
7473
|
+
* the predicate returns `false` (the hold is released). Fail-closed:
|
|
7474
|
+
* if the predicate throws, the slot is treated as held.
|
|
7475
|
+
*/
|
|
7476
|
+
readonly legalHold?: (record: T) => boolean;
|
|
7477
|
+
/**
|
|
7478
|
+
* **Period-bound retention.** Returns the date (Date / ISO string /
|
|
7479
|
+
* epoch ms) until which the slot must be retained — typically derived
|
|
7480
|
+
* from the record's fiscal period (e.g. period end + 10 years). While
|
|
7481
|
+
* `now < retainUntil`, the slot is never evicted, regardless of
|
|
7482
|
+
* `retainDays`. Return `null`/`undefined` to impose no floor.
|
|
7483
|
+
* Fail-closed: a throwing function holds the slot.
|
|
7484
|
+
*/
|
|
7485
|
+
readonly retainUntil?: (record: T) => Date | string | number | null | undefined;
|
|
7067
7486
|
}
|
|
7068
7487
|
type BlobFieldsConfig<T = unknown> = Record<string, BlobFieldPolicy<T>>;
|
|
7069
7488
|
declare const BLOB_EVICTION_AUDIT_COLLECTION = "_blob_eviction_audit";
|
|
@@ -7086,6 +7505,11 @@ interface CompactionResult {
|
|
|
7086
7505
|
readonly collections: number;
|
|
7087
7506
|
/** Number of audit entries written. Equal to `evicted`. */
|
|
7088
7507
|
readonly auditEntries: number;
|
|
7508
|
+
/**
|
|
7509
|
+
* Number of slots that would have evicted (TTL/predicate triggered)
|
|
7510
|
+
* but were retained by a `legalHold` or `retainUntil` floor.
|
|
7511
|
+
*/
|
|
7512
|
+
readonly held: number;
|
|
7089
7513
|
/** Per-collection breakdown for diagnostics. */
|
|
7090
7514
|
readonly byCollection: Record<string, {
|
|
7091
7515
|
records: number;
|
|
@@ -7754,6 +8178,10 @@ declare class Vault {
|
|
|
7754
8178
|
* call throws with a pointer at `@noy-db/hub/blobs`.
|
|
7755
8179
|
*/
|
|
7756
8180
|
private readonly blobStrategy;
|
|
8181
|
+
/** Cold-storage archival strategy (the archive target store). */
|
|
8182
|
+
private readonly archiveStrategy;
|
|
8183
|
+
/** Per-collection record archival policies. Indexed by collection name. */
|
|
8184
|
+
private readonly archiveRegistry;
|
|
7757
8185
|
private readonly indexStrategy;
|
|
7758
8186
|
private readonly aggregateStrategy;
|
|
7759
8187
|
private readonly crdtStrategy;
|
|
@@ -7852,6 +8280,8 @@ declare class Vault {
|
|
|
7852
8280
|
* docstring.
|
|
7853
8281
|
*/
|
|
7854
8282
|
private ledgerStore;
|
|
8283
|
+
/** Lazily-built atomic-sequence store. See {@link sequence}. */
|
|
8284
|
+
private sequenceStore;
|
|
7855
8285
|
/**
|
|
7856
8286
|
* Background writes for persisted-schema envelopes (#schema-dump v0
|
|
7857
8287
|
* slice 1). One promise per `collection({ persistJsonSchema: true })`
|
|
@@ -7963,6 +8393,7 @@ declare class Vault {
|
|
|
7963
8393
|
* at `@noy-db/hub/blobs`.
|
|
7964
8394
|
*/
|
|
7965
8395
|
blobStrategy?: BlobStrategy | undefined;
|
|
8396
|
+
archiveStrategy?: ArchiveStrategy | undefined;
|
|
7966
8397
|
indexStrategy?: IndexStrategy | undefined;
|
|
7967
8398
|
aggregateStrategy?: AggregateStrategy | undefined;
|
|
7968
8399
|
crdtStrategy?: CrdtStrategy | undefined;
|
|
@@ -8005,8 +8436,9 @@ declare class Vault {
|
|
|
8005
8436
|
*. `put()` validates keys against the declared set; reads
|
|
8006
8437
|
* with `{ locale }` add `<field>Label` virtual fields.
|
|
8007
8438
|
*
|
|
8008
|
-
* Throws `ReservedCollectionNameError` for names starting with `_dict_
|
|
8009
|
-
* Use `vault.dictionary(name)`
|
|
8439
|
+
* Throws `ReservedCollectionNameError` for names starting with `_dict_` or
|
|
8440
|
+
* equal to `_sequences`. Use `vault.dictionary(name)` for dict collections
|
|
8441
|
+
* and `vault.sequence(name)` for sequence counters.
|
|
8010
8442
|
*
|
|
8011
8443
|
* Lazy mode + indexes is rejected at construction time — see the
|
|
8012
8444
|
* Collection constructor for the rationale.
|
|
@@ -8023,6 +8455,10 @@ declare class Vault {
|
|
|
8023
8455
|
i18nFields?: Record<string, I18nTextDescriptor>;
|
|
8024
8456
|
/** — declare dictKey fields for label resolution on reads. */
|
|
8025
8457
|
dictKeyFields?: Record<string, DictKeyDescriptor>;
|
|
8458
|
+
/** — declare money() fields for currency-safe decimal storage/formatting. */
|
|
8459
|
+
moneyFields?: Record<string, MoneyDescriptor>;
|
|
8460
|
+
/** — declare computed scalar fields, evaluated on write (schema-owned). */
|
|
8461
|
+
computed?: ComputedFields<T>;
|
|
8026
8462
|
/** — per-collection conflict resolution policy. */
|
|
8027
8463
|
conflictPolicy?: ConflictPolicy<T>;
|
|
8028
8464
|
/** — CRDT mode for collaborative editing without conflicts. */
|
|
@@ -8041,6 +8477,8 @@ declare class Vault {
|
|
|
8041
8477
|
* when `vault.compact()` runs.
|
|
8042
8478
|
*/
|
|
8043
8479
|
blobFields?: BlobFieldsConfig<T>;
|
|
8480
|
+
/** — declarative record archival policy: `{ archiveWhen, legalHold? }`. Evaluated when `vault.archive()` runs. */
|
|
8481
|
+
archive?: ArchivePolicy<T>;
|
|
8044
8482
|
/** — declared tiers for this collection. */
|
|
8045
8483
|
tiers?: readonly number[];
|
|
8046
8484
|
/** — how lower-tier reads see above-tier records. */
|
|
@@ -8286,7 +8724,40 @@ declare class Vault {
|
|
|
8286
8724
|
* await vault.compact({ maxEvictions: 1000 }) // cap batch
|
|
8287
8725
|
* ```
|
|
8288
8726
|
*/
|
|
8727
|
+
/**
|
|
8728
|
+
* Atomic, gap-free numbering. `vault.sequence('invoice-2026').next()`
|
|
8729
|
+
* returns 1, 2, 3, … with no gaps or duplicates under concurrency, via
|
|
8730
|
+
* an optimistic-CAS counter at `_sequences/<name>`. Each name is an
|
|
8731
|
+
* independent sequence.
|
|
8732
|
+
*
|
|
8733
|
+
* **Online-only:** `next()` throws `SequenceOfflineError` unless the
|
|
8734
|
+
* store advertises `capabilities.casAtomic` — gap-free numbering cannot
|
|
8735
|
+
* be serialized by an offline / non-CAS writer.
|
|
8736
|
+
*
|
|
8737
|
+
* ```ts
|
|
8738
|
+
* const n = await vault.sequence('invoice-2026').next() // 1, then 2, …
|
|
8739
|
+
* const cur = await vault.sequence('invoice-2026').peek() // current value, no allocation
|
|
8740
|
+
* ```
|
|
8741
|
+
*/
|
|
8742
|
+
sequence(name: string): SequenceHandle;
|
|
8289
8743
|
compact(options?: CompactRunOptions): Promise<CompactionResult>;
|
|
8744
|
+
/**
|
|
8745
|
+
* Sweep records eligible by their collection's `archive` policy into the
|
|
8746
|
+
* cold archive store. Relocation is envelope-level (no re-encryption) and
|
|
8747
|
+
* bypasses guards + materialized-view dispatch, so issued/immutable
|
|
8748
|
+
* records over a sealed period can be archived without recomputing
|
|
8749
|
+
* finalized aggregates. A `legalHold` predicate blocks archival.
|
|
8750
|
+
* Requires `archiveStrategy: withArchive({ store })` in `createNoydb`.
|
|
8751
|
+
*/
|
|
8752
|
+
archive(options?: ArchiveRunOptions): Promise<ArchiveResult>;
|
|
8753
|
+
/** Relocate one archived record back to the primary store. Returns false if it was not archived. */
|
|
8754
|
+
restore(collection: string, id: string): Promise<boolean>;
|
|
8755
|
+
/** List archived record ids for a collection (or all collections with an archive policy). */
|
|
8756
|
+
listArchived(collection?: string): Promise<Array<{
|
|
8757
|
+
collection: string;
|
|
8758
|
+
id: string;
|
|
8759
|
+
}>>;
|
|
8760
|
+
private _archiveContext;
|
|
8290
8761
|
exportBlobs(options?: ExportBlobsOptions): ExportBlobsHandle;
|
|
8291
8762
|
issueAttestation(collectionName: string, id: string): Promise<{
|
|
8292
8763
|
docId: string;
|
|
@@ -9378,6 +9849,18 @@ declare class Collection<T> {
|
|
|
9378
9849
|
* fields when a locale is requested.
|
|
9379
9850
|
*/
|
|
9380
9851
|
private readonly dictKeyFields;
|
|
9852
|
+
/**
|
|
9853
|
+
* Money field descriptors keyed by field path. Declared via the
|
|
9854
|
+
* `moneyFields` collection option: `put()` quantizes to a scaled-int
|
|
9855
|
+
* string, `get()`/`list()` decode back. Mutable so {@link _applyMoneyFields}
|
|
9856
|
+
* can attach descriptors to a collection MV-analysis pre-created.
|
|
9857
|
+
*/
|
|
9858
|
+
private moneyFields;
|
|
9859
|
+
/**
|
|
9860
|
+
* Computed scalar fields, evaluated first on every `put()`. Mutable for
|
|
9861
|
+
* the same MV-pre-creation reconcile as {@link moneyFields}.
|
|
9862
|
+
*/
|
|
9863
|
+
private computed;
|
|
9381
9864
|
/**
|
|
9382
9865
|
* Async callback provided by the Vault that resolves a dict key
|
|
9383
9866
|
* to its label for a given locale. Used by the locale-read path for
|
|
@@ -9619,6 +10102,8 @@ declare class Collection<T> {
|
|
|
9619
10102
|
i18nFields?: Record<string, I18nTextDescriptor> | undefined;
|
|
9620
10103
|
/** — dictKey field descriptors for label resolution on reads. */
|
|
9621
10104
|
dictKeyFields?: Record<string, DictKeyDescriptor> | undefined;
|
|
10105
|
+
moneyFields?: Record<string, MoneyDescriptor> | undefined;
|
|
10106
|
+
computed?: ComputedFields | undefined;
|
|
9622
10107
|
/**
|
|
9623
10108
|
* async callback that resolves a dict key to its label
|
|
9624
10109
|
* for a given locale. Provided by the Vault.
|
|
@@ -9777,6 +10262,15 @@ declare class Collection<T> {
|
|
|
9777
10262
|
* reference — callers must treat it as immutable.
|
|
9778
10263
|
*/
|
|
9779
10264
|
getSchema(): StandardSchemaV1<unknown, T> | undefined;
|
|
10265
|
+
/**
|
|
10266
|
+
* @internal — attach money descriptors post-construction. MV dependency
|
|
10267
|
+
* analysis auto-creates a source collection (without options) during
|
|
10268
|
+
* `openVault`, before the user's `collection(name, { moneyFields })`
|
|
10269
|
+
* declaration; this reconciles that ordering. First-wins. Not public.
|
|
10270
|
+
*/
|
|
10271
|
+
_applyMoneyFields(moneyFields: Record<string, MoneyDescriptor>): void;
|
|
10272
|
+
/** @internal — attach computed fields post-construction. See {@link _applyMoneyFields}. */
|
|
10273
|
+
_applyComputed(computed: ComputedFields): void;
|
|
9780
10274
|
/**
|
|
9781
10275
|
* Get a single record by ID.
|
|
9782
10276
|
*
|
|
@@ -11179,6 +11673,12 @@ interface NoydbStore {
|
|
|
11179
11673
|
* involved when something goes wrong.
|
|
11180
11674
|
*/
|
|
11181
11675
|
name?: string;
|
|
11676
|
+
/**
|
|
11677
|
+
* Optional declared store capabilities (CAS atomicity, native tx, blob
|
|
11678
|
+
* size limits, auth). Consumers that require a capability — e.g.
|
|
11679
|
+
* `vault.sequence().next()` needs `casAtomic` — read it here.
|
|
11680
|
+
*/
|
|
11681
|
+
capabilities?: StoreCapabilities;
|
|
11182
11682
|
/** Get a single record. Returns null if not found. */
|
|
11183
11683
|
get(vault: string, collection: string, id: string): Promise<EncryptedEnvelope | null>;
|
|
11184
11684
|
/** Put a record. Throws ConflictError if expectedVersion doesn't match. */
|
|
@@ -12056,6 +12556,14 @@ interface QueryAcrossOptions {
|
|
|
12056
12556
|
* adapters where the disk I/O serializes anyway.
|
|
12057
12557
|
*/
|
|
12058
12558
|
readonly concurrency?: number;
|
|
12559
|
+
/**
|
|
12560
|
+
* Open shards non-creatingly — a missing grant throws instead of
|
|
12561
|
+
* self-provisioning. Default: `true` (create iff the vault has no
|
|
12562
|
+
* `_keyring/*`). Pass `false` for strict open-existing semantics
|
|
12563
|
+
* (e.g. federation read fan-out where shards are pre-provisioned
|
|
12564
|
+
* and an absent grant should fail closed).
|
|
12565
|
+
*/
|
|
12566
|
+
readonly create?: boolean;
|
|
12059
12567
|
}
|
|
12060
12568
|
/**
|
|
12061
12569
|
* One entry in the array returned by `Noydb.queryAcross()`. Either
|
|
@@ -12428,6 +12936,12 @@ interface NoydbOptions {
|
|
|
12428
12936
|
* @internal
|
|
12429
12937
|
*/
|
|
12430
12938
|
readonly blobStrategy?: BlobStrategy;
|
|
12939
|
+
/**
|
|
12940
|
+
* Cold-storage archival target. `withArchive({ store })` designates a
|
|
12941
|
+
* second store that holds archived record envelopes. Enables
|
|
12942
|
+
* `vault.archive()` / `vault.restore()` / `vault.listArchived()`.
|
|
12943
|
+
*/
|
|
12944
|
+
readonly archiveStrategy?: ArchiveStrategy;
|
|
12431
12945
|
/**
|
|
12432
12946
|
* tree-shake seam — optional indexing strategy. Pass
|
|
12433
12947
|
* `withIndexing()` from `@noy-db/hub/indexing` to enable eager-mode
|
|
@@ -12862,4 +13376,4 @@ interface DeleteManyResult {
|
|
|
12862
13376
|
}>;
|
|
12863
13377
|
}
|
|
12864
13378
|
|
|
12865
|
-
export { type ExportBlobsAuditEntry as $, BLOB_COLLECTION as A, type BlobStrategy as B, BLOB_EVICTION_AUDIT_COLLECTION as C, DICT_COLLECTION_PREFIX as D, BLOB_INDEX_COLLECTION as E, BLOB_SLOTS_PREFIX as F, BLOB_VERSIONS_PREFIX as G, type BlobEvictionEntry as H, type I18nStrategy as I, type BlobFieldPolicy as J, type BlobFieldsConfig as K, type Layer as L, type BlobObject as M, type BlobPutOptions as N, type OnMissing as O, PolicyEnforcer as P, type BlobResponseOptions as Q, type ResolveI18nOptions as R, type ScriptWarning as S, BlobSet as T, type BlobStrategyOpenArgs as U, type CompactRunOptions as V, type CompactionContext as W, type CompactionResult as X, DEFAULT_CHUNK_SIZE as Y, EXPORT_AUDIT_COLLECTION as Z, ExportBlobsAbortedError as _, type DictEntry as a, type SyncStrategy as a$, type ExportBlobsHandle as a0, type ExportBlobsOptions as a1, type ExportedBlob as a2, type SlotInfo as a3, type SlotRecord as a4, type VersionRecord as a5, createExportBlobsHandle as a6, runCompaction as a7, type ConsentStrategy as a8, CONSENT_AUDIT_COLLECTION as a9, VaultFrame as aA, type NoydbBundleStore as aB, type RetentionPolicy as aC, type SnapshotPolicy as aD, type SnapshotStrategy as aE, type SnapshotMeta as aF, type SnapshotMode as aG, type TxStrategy as aH, type AmendmentTxOptions as aI, TxCollection as aJ, TxContext as aK, TxVault as aL, runTransaction as aM, type DerivationStrategy as aN, type DerivationContext as aO, type ArrayOutputSpec as aP, DerivationRegistry as aQ, type DerivationStrategyHandle as aR, type DerivedFromMeta as aS, type OutputSpec as aT, type RecordOutputSpec as aU, type MaterializedViewStrategy as aV, type MaterializedViewStrategyHandle as aW, type OverlayedViewStrategy as aX, Collection as aY, OverlayedViewRegistry as aZ, type OverlayedViewStrategyHandle as a_, type ConsentAuditEntry as aa, type ConsentAuditFilter as ab, type ConsentContext as ac, type ConsentOp as ad, loadConsentEntries as ae, writeConsentEntry as af, type PeriodsStrategy as ag, type CarryForwardContext as ah, type ClosePeriodOptions as ai, type OpenPeriodOptions as aj, PERIODS_COLLECTION as ak, type PeriodRecord as al, type ReadOnlyCollection as am, appendPeriodLedgerEntry as an, assertTsWritable as ao, chainAnchor as ap, loadPeriods as aq, validatePeriodName as ar, type GuardStrategy as as, type GuardChange as at, type GuardContext as au, GuardRegistry as av, type GuardStrategyHandle as aw, ReadOnlyVaultFacade as ax, type ShadowStrategy as ay, CollectionFrame as az, type DictKeyDescriptor as b, type CollectionStats as b$, type Role as b0, type UnlockedKeyring as b1, type HistoryStrategy as b2, type NoydbStore as b3, type HistoryOptions as b4, type EncryptedEnvelope as b5, type PruneOptions as b6, type AppendInput as b7, type ChangeType as b8, CollectionInstant as b9, type RegisteredMV as bA, MaterializedViewRegistry as bB, type MaterializedFromMeta as bC, type MaterializedViewOutput as bD, type UnionSource as bE, type UserEnvelope as bF, type GateName as bG, type GatePolicy as bH, type VaultPolicy as bI, type ActiveTier as bJ, type FactorProof as bK, type SchemaUpdateStrategy as bL, type TransformFn as bM, type PersistedSchemaEnvelope as bN, type UpdateDecision as bO, type DirectoryConfig as bP, type UserVisibility as bQ, type AccessibleVault as bR, type AffectedDocument as bS, BUNDLE_STORE_POLICY as bT, type BuiltInGateName as bU, type CacheOptions as bV, type CacheStats as bW, type ChangeEvent as bX, type CollectionChangeEvent as bY, type CollectionConflictResolver as bZ, type CollectionDescriptor as b_, type DiffEntry as ba, type JsonPatch as bb, type JsonPatchOp as bc, type LedgerEntry as bd, LedgerStore as be, type VaultEngine as bf, VaultInstant as bg, type VerifyResult as bh, applyPatch as bi, canonicalJson as bj, computePatch as bk, diff as bl, formatDiff as bm, hashEntry as bn, paddedIndex as bo, parseIndex as bp, sha256Hex as bq, type PublicEnvelope as br, type SealingKeyProvider as bs, type BundleRecipient as bt, type RecipientSealer as bu, type RecipientHint as bv, Vault as bw, type RecoveryEnrollmentInput as bx, type ShamirRecoveryProvider as by, type MVQueryContext as bz, DictionaryHandle as c, NOYDB_BACKUP_VERSION as c$, type Conflict as c0, type ConflictPolicy as c1, type ConflictStrategy as c2, type CrossTierAccessEvent as c3, DEFAULT_PUBLIC_ENVELOPE_SCHEMA as c4, DELEGATIONS_COLLECTION as c5, type DeepPartial as c6, type DeepPartialOrNull as c7, type DelegationToken as c8, type DeleteManyResult as c9, type HistoryEntry as cA, INDEXED_STORE_POLICY as cB, type ImportCapability as cC, type InferOutput as cD, type InternalCollectionStats as cE, type IssueDelegationOptions as cF, type IssueMagicLinkGrantOptions as cG, type KeyringAuthenticator as cH, type KeyringAuthenticatorWrappingDEKs as cI, type KeyringAuthenticatorWrappingKEK as cJ, type KeyringFile as cK, type ListAccessibleVaultsOptions as cL, type ListPageResult as cM, type ListUsersOptions as cN, type LiveUserEnvelope as cO, type LocaleReadOptions as cP, Lru as cQ, type LruOptions as cR, type LruStats as cS, MAGIC_LINK_CONTENT_INFO_PREFIX as cT, MAGIC_LINK_GRANTS_COLLECTION as cU, MAGIC_LINK_KEK_INFO_PREFIX as cV, type MagicLinkGrantPayload as cW, type MagicLinkGrantRecord as cX, type MaterializedViewDescriptor as cY, MemoryRecipientSealer as cZ, MemorySealingKeyProvider as c_, type DerivationDescriptor as ca, type DirtyEntry as cb, type DryRunResult as cc, type DumpSchemaOptions as cd, ELEVATION_AUDIT_COLLECTION as ce, ElevatedHandle as cf, type EnrollAuthenticatorOptions as cg, type EnrollAuthenticatorWrappingDEKsOptions as ch, type EnrollAuthenticatorWrappingKEKOptions as ci, type EnrollRecoveryResult as cj, type ExportCapability as ck, type ExportChunk as cl, type ExportFormat as cm, type ExportStreamOptions as cn, type FactorKind as co, type FactorProofBundle as cp, type FactorRequirement as cq, type FenceDoc as cr, type FenceState as cs, type FieldChange as ct, type FieldDescriptor as cu, type FieldSource as cv, type GhostRecord as cw, type GrantOptions as cx, type GuardViolation as cy, type HistoryConfig as cz, type DictionaryOptions as d, type StoreAuthKind as d$, NOYDB_FORMAT_VERSION as d0, NOYDB_KEYRING_VERSION as d1, NOYDB_SYNC_VERSION as d2, Noydb as d3, type NoydbEventMap as d4, type NoydbOptions as d5, type OverlayViewDescriptor as d6, PUBLIC_ENVELOPE_FIELDS as d7, type PaperRecoveryDoc as d8, type PaperRecoveryEntry as d9, type QuickUnlockState as dA, QuickUnlockStore as dB, type ReAuthOperation as dC, type RecoverPassphraseInput as dD, type RecoverPassphraseResult as dE, type RecoverUserOptions as dF, type RecoveryProof as dG, type ResolvedPublicEnvelopeSchema as dH, type RevokeOptions as dI, type RotatePassphraseInput as dJ, type RotateRecoveryOptions as dK, type RotateRecoveryResult as dL, SEALED_PASSPHRASE_RECORD_ID as dM, type SchemaDelta as dN, type SchemaIntrospection as dO, type SealedEnvelope as dP, type SealedPassphrase as dQ, type SessionPolicy as dR, type SetPublicEnvelopeInput as dS, type ShamirRecoveryDoc as dT, type ShamirRecoveryEntry as dU, type SlotRewrapCeremony as dV, type SlotRewrapContext as dW, type StandardSchemaV1 as dX, type StandardSchemaV1Issue as dY, type StandardSchemaV1SyncResult as dZ, type StoreAuth as d_, type PassphrasePolicy as da, type PassphraseValidationResult as db, type Permission as dc, type Permissions as dd, type PersistedSchemaKind as de, type PlaintextTranslatorContext as df, type PlaintextTranslatorFn as dg, PresenceHandle as dh, type PresencePeer as di, type PublicEnvelopeField as dj, type PublicEnvelopeSchema as dk, type PublicEnvelopeText as dl, type PullMode as dm, type PullOptions as dn, type PullPolicy as dp, type PullResult as dq, type PushMode as dr, type PushOptions as ds, type PushPolicy as dt, type PushResult as du, type PutManyItemOptions as dv, type PutManyOptions as dw, type PutManyResult as dx, type QueryAcrossOptions as dy, type QueryAcrossResult as dz, type I18nMap as e, listUsersWithEnvelopes as e$, type StoreCapabilities as e0, SyncEngine as e1, type SyncMetadata as e2, type SyncPolicy as e3, SyncScheduler as e4, type SyncSchedulerStatus as e5, type SyncStatus as e6, type SyncTarget as e7, type SyncTargetRole as e8, SyncTransaction as e9, type WeakPassphraseReason as eA, type WrappedDeksBlob as eB, type WriteConflict as eC, type WriteEvent as eD, type WriteHook as eE, type WriteQueue as eF, assertStrongPassphrase as eG, buildRecipientKeyringFile as eH, burnPaperRecoveryEntry as eI, createNoydb as eJ, createStore as eK, deriveMagicLinkContentKey as eL, enrollAuthenticator as eM, estimateEntropy as eN, evaluateExportCapability as eO, evaluateImportCapability as eP, findAuthenticator as eQ, hasExportCapability as eR, hasImportCapability as eS, hasRecoveryEnrolled as eT, isMagicLinkGrantExpired as eU, isPublicEnvelope as eV, issueDelegation as eW, recoverPassphrase as eX, rotatePassphrase as eY, listMagicLinkGrants as eZ, listUsers as e_, type SyncTransactionResult as ea, type TabChannel as eb, type TabCoordinationOptions as ec, type TabLockManager as ed, type TabPresence as ee, type TabRole as ef, type TierMode as eg, type TranslatorAuditEntry as eh, type TxOp as ei, USER_ENVELOPE_COLLECTION as ej, USER_ENVELOPE_MAX_BYTES as ek, type Unsubscribe as el, type UpdateAuthenticatorOptions as em, type UpdateContext as en, type UpdateUserOptions as eo, UserApi as ep, type UserEnvelopeCheckGate as eq, UserEnvelopeOversizedError as er, type UserEnvelopePresented as es, type UserInfo as et, type VaultBackup as eu, type VaultPolicyOnDisk as ev, type VaultSchemaSnapshot as ew, type VaultSnapshot as ex, type WarningRules as ey, WeakPassphraseError as ez, type I18nTextDescriptor as f, loadActiveDelegations as f0, loadPaperRecoveryEntries as f1, loadSealedPassphrase as f2, loadShamirRecoveryEntries as f3, magicLinkGrantRecordId as f4, mintPaperRecoveryEntry as f5, mintShamirRecoveryEntry as f6, mintWrappedDeksBlob as f7, parseSealedEnvelope as f8, readMagicLinkGrantRecord as f9, recoverUser as fa, removeAuthenticator as fb, resolveSchema as fc, revokeDelegation as fd, revokeMagicLinkGrant as fe, savePaperRecoveryEntries as ff, saveSealedPassphrase as fg, saveShamirRecoveryEntries as fh, unwrapDeksFromBlob as fi, unwrapDeksFromPaperEntry as fj, unwrapDeksFromShamirEntry as fk, unwrapMagicLinkGrant as fl, validatePassphrase as fm, validatePublicEnvelopeInput as fn, validateSchemaInput as fo, validateSchemaOutput as fp, writeMagicLinkGrant as fq, changeSecret as fr, createOwnerKeyring as fs, ensureCollectionDEK as ft, grant as fu, loadKeyring as fv, persistKeyring as fw, revoke as fx, updateAuthenticator as fy, updateKeyringIdentity as fz, type I18nTextOptions as g, type OnMissingPolicy as h, applyI18nLocale as i, dictCollectionName as j, dictKey as k, enforceScript as l, getAtPath as m, i18nText as n, inferScripts as o, isDictCollectionName as p, isDictKeyDescriptor as q, isI18nTextDescriptor as r, resolveI18nText as s, resolvePolicy as t, setAtPathInPlace as u, validateI18nTextValue as v, type SessionStrategy as w, createEnforcer as x, validateSessionPolicy as y, BLOB_CHUNKS_COLLECTION as z };
|
|
13379
|
+
export { type ExportBlobsAuditEntry as $, BLOB_COLLECTION as A, type BlobStrategy as B, BLOB_EVICTION_AUDIT_COLLECTION as C, DICT_COLLECTION_PREFIX as D, BLOB_INDEX_COLLECTION as E, BLOB_SLOTS_PREFIX as F, BLOB_VERSIONS_PREFIX as G, type BlobEvictionEntry as H, type I18nStrategy as I, type BlobFieldPolicy as J, type BlobFieldsConfig as K, type Layer as L, type BlobObject as M, type BlobPutOptions as N, type OnMissing as O, PolicyEnforcer as P, type BlobResponseOptions as Q, type ResolveI18nOptions as R, type ScriptWarning as S, BlobSet as T, type BlobStrategyOpenArgs as U, type CompactRunOptions as V, type CompactionContext as W, type CompactionResult as X, DEFAULT_CHUNK_SIZE as Y, EXPORT_AUDIT_COLLECTION as Z, ExportBlobsAbortedError as _, type DictEntry as a, type SyncStrategy as a$, type ExportBlobsHandle as a0, type ExportBlobsOptions as a1, type ExportedBlob as a2, type SlotInfo as a3, type SlotRecord as a4, type VersionRecord as a5, createExportBlobsHandle as a6, runCompaction as a7, type ConsentStrategy as a8, CONSENT_AUDIT_COLLECTION as a9, VaultFrame as aA, type NoydbBundleStore as aB, type RetentionPolicy as aC, type SnapshotPolicy as aD, type SnapshotStrategy as aE, type SnapshotMeta as aF, type SnapshotMode as aG, type TxStrategy as aH, type AmendmentTxOptions as aI, TxCollection as aJ, TxContext as aK, TxVault as aL, runTransaction as aM, type DerivationStrategy as aN, type DerivationContext as aO, type ArrayOutputSpec as aP, DerivationRegistry as aQ, type DerivationStrategyHandle as aR, type DerivedFromMeta as aS, type OutputSpec as aT, type RecordOutputSpec as aU, type MaterializedViewStrategy as aV, type MaterializedViewStrategyHandle as aW, type OverlayedViewStrategy as aX, Collection as aY, OverlayedViewRegistry as aZ, type OverlayedViewStrategyHandle as a_, type ConsentAuditEntry as aa, type ConsentAuditFilter as ab, type ConsentContext as ac, type ConsentOp as ad, loadConsentEntries as ae, writeConsentEntry as af, type PeriodsStrategy as ag, type CarryForwardContext as ah, type ClosePeriodOptions as ai, type OpenPeriodOptions as aj, PERIODS_COLLECTION as ak, type PeriodRecord as al, type ReadOnlyCollection as am, appendPeriodLedgerEntry as an, assertTsWritable as ao, chainAnchor as ap, loadPeriods as aq, validatePeriodName as ar, type GuardStrategy as as, type GuardChange as at, type GuardContext as au, GuardRegistry as av, type GuardStrategyHandle as aw, ReadOnlyVaultFacade as ax, type ShadowStrategy as ay, CollectionFrame as az, type DictKeyDescriptor as b, type ChangeEvent as b$, type Role as b0, type UnlockedKeyring as b1, type HistoryStrategy as b2, type NoydbStore as b3, type HistoryOptions as b4, type EncryptedEnvelope as b5, type PruneOptions as b6, type AppendInput as b7, type ChangeType as b8, CollectionInstant as b9, type RegisteredMV as bA, MaterializedViewRegistry as bB, type MaterializedFromMeta as bC, type MaterializedViewOutput as bD, type UnionSource as bE, type UserEnvelope as bF, type GateName as bG, type GatePolicy as bH, type VaultPolicy as bI, type ActiveTier as bJ, type FactorProof as bK, type SchemaUpdateStrategy as bL, type TransformFn as bM, type PersistedSchemaEnvelope as bN, type UpdateDecision as bO, type DirectoryConfig as bP, type UserVisibility as bQ, type AccessibleVault as bR, type AffectedDocument as bS, type ArchivePolicy as bT, type ArchiveResult as bU, type ArchiveRunOptions as bV, type ArchiveStrategy as bW, BUNDLE_STORE_POLICY as bX, type BuiltInGateName as bY, type CacheOptions as bZ, type CacheStats as b_, type DiffEntry as ba, type JsonPatch as bb, type JsonPatchOp as bc, type LedgerEntry as bd, LedgerStore as be, type VaultEngine as bf, VaultInstant as bg, type VerifyResult as bh, applyPatch as bi, canonicalJson as bj, computePatch as bk, diff as bl, formatDiff as bm, hashEntry as bn, paddedIndex as bo, parseIndex as bp, sha256Hex as bq, type PublicEnvelope as br, type SealingKeyProvider as bs, type BundleRecipient as bt, type RecipientSealer as bu, type RecipientHint as bv, Vault as bw, type RecoveryEnrollmentInput as bx, type ShamirRecoveryProvider as by, type MVQueryContext as bz, DictionaryHandle as c, type ListUsersOptions as c$, type CollectionChangeEvent as c0, type CollectionConflictResolver as c1, type CollectionDescriptor as c2, type CollectionStats as c3, ComputedFieldError as c4, type ComputedFields as c5, type ComputedFn as c6, type Conflict as c7, type ConflictPolicy as c8, type ConflictStrategy as c9, type FactorKind as cA, type FactorProofBundle as cB, type FactorRequirement as cC, type FanoutQueryOptions as cD, type FanoutResult as cE, type FenceDoc as cF, type FenceState as cG, type FieldChange as cH, type FieldDescriptor as cI, type FieldSource as cJ, type GhostRecord as cK, type GrantOptions as cL, type GuardViolation as cM, type HistoryConfig as cN, type HistoryEntry as cO, INDEXED_STORE_POLICY as cP, type ImportCapability as cQ, type InferOutput as cR, type InternalCollectionStats as cS, type IssueDelegationOptions as cT, type IssueMagicLinkGrantOptions as cU, type KeyringAuthenticator as cV, type KeyringAuthenticatorWrappingDEKs as cW, type KeyringAuthenticatorWrappingKEK as cX, type KeyringFile as cY, type ListAccessibleVaultsOptions as cZ, type ListPageResult as c_, type CrossTierAccessEvent as ca, CrossVaultAggregation as cb, CrossVaultGroupedAggregation as cc, type GroupedRow as cd, type CrossVaultLiveAggregation as ce, type CrossVaultLiveQuery as cf, DEFAULT_PUBLIC_ENVELOPE_SCHEMA as cg, DELEGATIONS_COLLECTION as ch, type DeepPartial as ci, type DeepPartialOrNull as cj, type DelegationToken as ck, type DeleteManyResult as cl, type DerivationDescriptor as cm, type DirtyEntry as cn, type DryRunResult as co, type DumpSchemaOptions as cp, ELEVATION_AUDIT_COLLECTION as cq, ElevatedHandle as cr, type EnrollAuthenticatorOptions as cs, type EnrollAuthenticatorWrappingDEKsOptions as ct, type EnrollAuthenticatorWrappingKEKOptions as cu, type EnrollRecoveryResult as cv, type ExportCapability as cw, type ExportChunk as cx, type ExportFormat as cy, type ExportStreamOptions as cz, type DictionaryOptions as d, SEALED_PASSPHRASE_RECORD_ID as d$, type LiveQueryOptions as d0, type LiveUserEnvelope as d1, type LocaleReadOptions as d2, Lru as d3, type LruOptions as d4, type LruStats as d5, MAGIC_LINK_CONTENT_INFO_PREFIX as d6, MAGIC_LINK_GRANTS_COLLECTION as d7, MAGIC_LINK_KEK_INFO_PREFIX as d8, type MagicLinkGrantPayload as d9, type PublicEnvelopeSchema as dA, type PublicEnvelopeText as dB, type PullMode as dC, type PullOptions as dD, type PullPolicy as dE, type PullResult as dF, type PushMode as dG, type PushOptions as dH, type PushPolicy as dI, type PushResult as dJ, type PutManyItemOptions as dK, type PutManyOptions as dL, type PutManyResult as dM, type QueryAcrossOptions as dN, type QueryAcrossResult as dO, type QuickUnlockState as dP, QuickUnlockStore as dQ, type ReAuthOperation as dR, type RecoverPassphraseInput as dS, type RecoverPassphraseResult as dT, type RecoverUserOptions as dU, type RecoveryProof as dV, type ResolvedPublicEnvelopeSchema as dW, type RevokeOptions as dX, type RotatePassphraseInput as dY, type RotateRecoveryOptions as dZ, type RotateRecoveryResult as d_, type MagicLinkGrantRecord as da, type MaterializedViewDescriptor as db, MemoryRecipientSealer as dc, MemorySealingKeyProvider as dd, NOYDB_BACKUP_VERSION as de, NOYDB_FORMAT_VERSION as df, NOYDB_KEYRING_VERSION as dg, NOYDB_SYNC_VERSION as dh, Noydb as di, type NoydbEventMap as dj, type NoydbOptions as dk, type OverlayViewDescriptor as dl, PUBLIC_ENVELOPE_FIELDS as dm, type PaperRecoveryDoc as dn, type PaperRecoveryEntry as dp, type PassphrasePolicy as dq, type PassphraseValidationResult as dr, type Permission as ds, type Permissions as dt, type PersistedSchemaKind as du, type PlaintextTranslatorContext as dv, type PlaintextTranslatorFn as dw, PresenceHandle as dx, type PresencePeer as dy, type PublicEnvelopeField as dz, type I18nMap as e, type WithArchiveOptions as e$, type SchemaDelta as e0, type SchemaIntrospection as e1, type SealedEnvelope as e2, type SealedPassphrase as e3, type SequenceHandle as e4, SequenceStore as e5, type SessionPolicy as e6, type SetPublicEnvelopeInput as e7, type ShamirRecoveryDoc as e8, type ShamirRecoveryEntry as e9, type TabPresence as eA, type TabRole as eB, type TierMode as eC, type TranslatorAuditEntry as eD, type TxOp as eE, USER_ENVELOPE_COLLECTION as eF, USER_ENVELOPE_MAX_BYTES as eG, type Unsubscribe as eH, type UpdateAuthenticatorOptions as eI, type UpdateContext as eJ, type UpdateUserOptions as eK, UserApi as eL, type UserEnvelopeCheckGate as eM, UserEnvelopeOversizedError as eN, type UserEnvelopePresented as eO, type UserInfo as eP, type VaultBackup as eQ, VaultGroup as eR, type VaultGroupOptions as eS, type VaultPolicyOnDisk as eT, type VaultRegistryRow as eU, type VaultSchemaSnapshot as eV, type VaultSnapshot as eW, type VaultTemplate as eX, type WarningRules as eY, WeakPassphraseError as eZ, type WeakPassphraseReason as e_, ShardedCollection as ea, ShardedGroupedQuery as eb, ShardedQuery as ec, type ShardingConfig as ed, type SkippedVault as ee, type SlotRewrapCeremony as ef, type SlotRewrapContext as eg, type StandardSchemaV1 as eh, type StandardSchemaV1Issue as ei, type StandardSchemaV1SyncResult as ej, type StoreAuth as ek, type StoreAuthKind as el, type StoreCapabilities as em, SyncEngine as en, type SyncMetadata as eo, type SyncPolicy as ep, SyncScheduler as eq, type SyncSchedulerStatus as er, type SyncStatus as es, type SyncTarget as et, type SyncTargetRole as eu, SyncTransaction as ev, type SyncTransactionResult as ew, type TabChannel as ex, type TabCoordinationOptions as ey, type TabLockManager as ez, type I18nTextDescriptor as f, updateAuthenticator as f$, type WrappedDeksBlob as f0, type WriteConflict as f1, type WriteEvent as f2, type WriteHook as f3, type WriteQueue as f4, assertStrongPassphrase as f5, buildRecipientKeyringFile as f6, burnPaperRecoveryEntry as f7, createNoydb as f8, createStore as f9, parseSealedEnvelope as fA, readMagicLinkGrantRecord as fB, recoverUser as fC, removeAuthenticator as fD, resolveSchema as fE, revokeDelegation as fF, revokeMagicLinkGrant as fG, savePaperRecoveryEntries as fH, saveSealedPassphrase as fI, saveShamirRecoveryEntries as fJ, unwrapDeksFromBlob as fK, unwrapDeksFromPaperEntry as fL, unwrapDeksFromShamirEntry as fM, unwrapMagicLinkGrant as fN, validatePassphrase as fO, validatePublicEnvelopeInput as fP, validateSchemaInput as fQ, validateSchemaOutput as fR, withArchive as fS, writeMagicLinkGrant as fT, changeSecret as fU, createOwnerKeyring as fV, ensureCollectionDEK as fW, grant as fX, loadKeyring as fY, persistKeyring as fZ, revoke as f_, deriveMagicLinkContentKey as fa, enrollAuthenticator as fb, estimateEntropy as fc, evalComputedFields as fd, evaluateExportCapability as fe, evaluateImportCapability as ff, findAuthenticator as fg, hasExportCapability as fh, hasImportCapability as fi, hasRecoveryEnrolled as fj, isMagicLinkGrantExpired as fk, isPublicEnvelope as fl, issueDelegation as fm, recoverPassphrase as fn, rotatePassphrase as fo, listMagicLinkGrants as fp, listUsers as fq, listUsersWithEnvelopes as fr, loadActiveDelegations as fs, loadPaperRecoveryEntries as ft, loadSealedPassphrase as fu, loadShamirRecoveryEntries as fv, magicLinkGrantRecordId as fw, mintPaperRecoveryEntry as fx, mintShamirRecoveryEntry as fy, mintWrappedDeksBlob as fz, type I18nTextOptions as g, updateKeyringIdentity as g0, type OnMissingPolicy as h, applyI18nLocale as i, dictCollectionName as j, dictKey as k, enforceScript as l, getAtPath as m, i18nText as n, inferScripts as o, isDictCollectionName as p, isDictKeyDescriptor as q, isI18nTextDescriptor as r, resolveI18nText as s, resolvePolicy as t, setAtPathInPlace as u, validateI18nTextValue as v, type SessionStrategy as w, createEnforcer as x, validateSessionPolicy as y, BLOB_CHUNKS_COLLECTION as z };
|