@noy-db/hub 0.2.0-pre.9 → 0.3.0-pre.1
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 +129 -3
- package/dist/adapter/index.d.ts +5 -0
- package/dist/adapter/index.js +15 -0
- package/dist/aggregate/index.d.ts +6 -2
- package/dist/aggregate/index.js +24 -16
- package/dist/aggregate/index.js.map +1 -1
- package/dist/api-RW3KP7WU.js +14 -0
- package/dist/as/index.d.ts +7 -0
- package/dist/as/index.js +24 -0
- package/dist/at/index.d.ts +5 -0
- package/dist/at/index.js +1 -0
- package/dist/attestation/index.d.ts +15 -47
- package/dist/attestation/index.js +54 -10
- package/dist/attestation/index.js.map +1 -1
- package/dist/backup-XV3IOEGB.js +217 -0
- package/dist/backup-XV3IOEGB.js.map +1 -0
- package/dist/blobs/index.d.ts +6 -8
- package/dist/blobs/index.js +19 -12
- package/dist/blobs/index.js.map +1 -1
- package/dist/bundle/index.d.ts +16 -70
- package/dist/bundle/index.js +39 -476
- package/dist/bundle/index.js.map +1 -1
- package/dist/{ulid-CJ8RzRrm.d.ts → bundle-CH-H06dp.d.ts} +31 -86
- package/dist/by/index.d.ts +1 -0
- package/dist/by/index.js +11 -0
- package/dist/cargo/index.d.ts +9 -0
- package/dist/cargo/index.js +89 -0
- package/dist/chunk-26LGBE4T.js +42 -0
- package/dist/chunk-26LGBE4T.js.map +1 -0
- package/dist/chunk-2P2HZEXU.js +233 -0
- package/dist/chunk-2P2HZEXU.js.map +1 -0
- package/dist/{chunk-K3DK3NU5.js → chunk-3YFXJ3ZP.js} +20 -5
- package/dist/chunk-3YFXJ3ZP.js.map +1 -0
- package/dist/chunk-4Q6HSHHL.js +90 -0
- package/dist/chunk-4Q6HSHHL.js.map +1 -0
- package/dist/chunk-5LUY7UTV.js +380 -0
- package/dist/chunk-5LUY7UTV.js.map +1 -0
- package/dist/chunk-5N6CZTCY.js +367 -0
- package/dist/chunk-5N6CZTCY.js.map +1 -0
- package/dist/chunk-5O3AOPDT.js +992 -0
- package/dist/chunk-5O3AOPDT.js.map +1 -0
- package/dist/chunk-5R3ERCDH.js +239 -0
- package/dist/chunk-5R3ERCDH.js.map +1 -0
- package/dist/{chunk-6CME4UEK.js → chunk-5R5JW2JT.js} +7000 -4827
- package/dist/chunk-5R5JW2JT.js.map +1 -0
- package/dist/chunk-5TDJ56JE.js +32 -0
- package/dist/chunk-5TDJ56JE.js.map +1 -0
- package/dist/{chunk-T7JEBOGN.js → chunk-62QYRORB.js} +18 -11
- package/dist/chunk-62QYRORB.js.map +1 -0
- package/dist/{chunk-J66GRPNH.js → chunk-6S7T6WC4.js} +2 -2
- package/dist/chunk-6S7T6WC4.js.map +1 -0
- package/dist/chunk-76722EBH.js +451 -0
- package/dist/chunk-76722EBH.js.map +1 -0
- package/dist/{chunk-Z6FNBOTC.js → chunk-AIWULCUO.js} +13 -17
- package/dist/chunk-AIWULCUO.js.map +1 -0
- package/dist/{chunk-O3VZPBZG.js → chunk-AQTBSL7R.js} +47 -11
- package/dist/chunk-AQTBSL7R.js.map +1 -0
- package/dist/chunk-AURFOK3D.js +35 -0
- package/dist/chunk-AURFOK3D.js.map +1 -0
- package/dist/{chunk-53XBRIRT.js → chunk-AXRXJTE2.js} +9 -9
- package/dist/chunk-AXRXJTE2.js.map +1 -0
- package/dist/chunk-AZAOEIKW.js +155 -0
- package/dist/chunk-AZAOEIKW.js.map +1 -0
- package/dist/{chunk-HNRHLRDC.js → chunk-BG3SPSR4.js} +3 -3
- package/dist/chunk-BG3SPSR4.js.map +1 -0
- package/dist/chunk-BGIZAFY7.js +1 -0
- package/dist/chunk-CHFZDSE4.js +1 -0
- package/dist/{chunk-DJHHA6XH.js → chunk-CMGR4ZEW.js} +50 -20
- package/dist/chunk-CMGR4ZEW.js.map +1 -0
- package/dist/chunk-CWPPNPOH.js +23 -0
- package/dist/chunk-CWPPNPOH.js.map +1 -0
- package/dist/{chunk-QODLLGQ7.js → chunk-DFEMTNPJ.js} +371 -38
- package/dist/chunk-DFEMTNPJ.js.map +1 -0
- package/dist/{chunk-ZYWZWG6G.js → chunk-DGDI2D4M.js} +10 -10
- package/dist/chunk-DGDI2D4M.js.map +1 -0
- package/dist/{chunk-SYMWGEET.js → chunk-EIZUR2XW.js} +3 -3
- package/dist/chunk-EIZUR2XW.js.map +1 -0
- package/dist/{chunk-BVRYKATC.js → chunk-FISN7WE4.js} +36 -33
- package/dist/chunk-FISN7WE4.js.map +1 -0
- package/dist/chunk-GHVIKOHT.js +1 -0
- package/dist/chunk-GYGWYIOZ.js +200 -0
- package/dist/chunk-GYGWYIOZ.js.map +1 -0
- package/dist/chunk-HCIPRAGS.js +45 -0
- package/dist/chunk-HCIPRAGS.js.map +1 -0
- package/dist/{chunk-PX35GA7L.js → chunk-I2NOIW44.js} +10 -10
- package/dist/chunk-I2NOIW44.js.map +1 -0
- package/dist/{chunk-OIF6LZUR.js → chunk-I3TIKTJO.js} +3 -3
- package/dist/chunk-I3TIKTJO.js.map +1 -0
- package/dist/chunk-I7FD46FF.js +9 -0
- package/dist/chunk-I7FD46FF.js.map +1 -0
- package/dist/chunk-IAGBDSCS.js +40 -0
- package/dist/chunk-IAGBDSCS.js.map +1 -0
- package/dist/{chunk-JWRVQKRZ.js → chunk-IELYAOGG.js} +6 -18
- package/dist/chunk-IELYAOGG.js.map +1 -0
- package/dist/chunk-IGUYVGGI.js +205 -0
- package/dist/chunk-IGUYVGGI.js.map +1 -0
- package/dist/{chunk-U26HQ6KJ.js → chunk-IO6GRPT6.js} +4 -4
- package/dist/chunk-IO6GRPT6.js.map +1 -0
- package/dist/chunk-IPB7FTQX.js +273 -0
- package/dist/chunk-IPB7FTQX.js.map +1 -0
- package/dist/chunk-ITNUCOXM.js +148 -0
- package/dist/chunk-ITNUCOXM.js.map +1 -0
- package/dist/{chunk-WPLVTJ5D.js → chunk-IUEN57TV.js} +10 -10
- package/dist/chunk-IUEN57TV.js.map +1 -0
- package/dist/{chunk-DL3HWOQ5.js → chunk-JNUWZ6D3.js} +9 -9
- package/dist/chunk-JNUWZ6D3.js.map +1 -0
- package/dist/chunk-K2WCO3NX.js +1 -0
- package/dist/chunk-KVOXU4T5.js +30 -0
- package/dist/chunk-KVOXU4T5.js.map +1 -0
- package/dist/chunk-KXGNJJXB.js +135 -0
- package/dist/chunk-KXGNJJXB.js.map +1 -0
- package/dist/chunk-LB7FD65R.js +163 -0
- package/dist/chunk-LB7FD65R.js.map +1 -0
- package/dist/{chunk-22DWZL57.js → chunk-LFLXAY2W.js} +43 -218
- package/dist/chunk-LFLXAY2W.js.map +1 -0
- package/dist/chunk-LMTH2RM6.js +129 -0
- package/dist/chunk-LMTH2RM6.js.map +1 -0
- package/dist/{aggregate/index.cjs → chunk-LV7M27WM.js} +390 -219
- package/dist/chunk-LV7M27WM.js.map +1 -0
- package/dist/{chunk-PE2FR4J3.js → chunk-LXQT4WMP.js} +16 -18
- package/dist/chunk-LXQT4WMP.js.map +1 -0
- package/dist/chunk-M2YKN37S.js +524 -0
- package/dist/chunk-M2YKN37S.js.map +1 -0
- package/dist/chunk-M6OST55S.js +14 -0
- package/dist/chunk-M6OST55S.js.map +1 -0
- package/dist/{chunk-F3GDRNUT.js → chunk-MD3Y6J3L.js} +35 -69
- package/dist/chunk-MD3Y6J3L.js.map +1 -0
- package/dist/{chunk-XJFLDA7A.js → chunk-MTMJVJ5W.js} +8 -7
- package/dist/chunk-MTMJVJ5W.js.map +1 -0
- package/dist/{chunk-DFMLEQZB.js → chunk-NF5JWERG.js} +5 -10
- package/dist/chunk-NF5JWERG.js.map +1 -0
- package/dist/{chunk-DO7C2TOG.js → chunk-PKHL44ER.js} +3 -3
- package/dist/{chunk-DO7C2TOG.js.map → chunk-PKHL44ER.js.map} +1 -1
- package/dist/chunk-PSMV73A5.js +117 -0
- package/dist/chunk-PSMV73A5.js.map +1 -0
- package/dist/chunk-PY4KJPYU.js +9 -0
- package/dist/chunk-PY4KJPYU.js.map +1 -0
- package/dist/chunk-PZ5AY32C.js +10 -0
- package/dist/{chunk-DE6GKS6G.js → chunk-Q7SS3IME.js} +50 -9
- package/dist/chunk-Q7SS3IME.js.map +1 -0
- package/dist/chunk-QHJW5EXU.js +54 -0
- package/dist/chunk-QHJW5EXU.js.map +1 -0
- package/dist/{chunk-NONAAENK.js → chunk-RUEKROOS.js} +11 -4
- package/dist/chunk-RUEKROOS.js.map +1 -0
- package/dist/chunk-RUIMKQTA.js +23 -0
- package/dist/chunk-RUIMKQTA.js.map +1 -0
- package/dist/{chunk-TFBP23BX.js → chunk-SKF73JOP.js} +66 -7
- package/dist/chunk-SKF73JOP.js.map +1 -0
- package/dist/chunk-SM3AVUHC.js +42 -0
- package/dist/chunk-SM3AVUHC.js.map +1 -0
- package/dist/{chunk-ML236QKC.js → chunk-SMXWYP24.js} +5 -5
- package/dist/chunk-SMXWYP24.js.map +1 -0
- package/dist/chunk-SRB2XEWB.js +148 -0
- package/dist/chunk-SRB2XEWB.js.map +1 -0
- package/dist/chunk-SVLR4POP.js +64 -0
- package/dist/chunk-SVLR4POP.js.map +1 -0
- package/dist/chunk-TA66UMI4.js +123 -0
- package/dist/chunk-TA66UMI4.js.map +1 -0
- package/dist/chunk-TEILUWOI.js +664 -0
- package/dist/chunk-TEILUWOI.js.map +1 -0
- package/dist/chunk-TJYQIGAP.js +82 -0
- package/dist/chunk-TJYQIGAP.js.map +1 -0
- package/dist/{chunk-H2X3ISXG.js → chunk-UAG5KWVA.js} +7 -7
- package/dist/chunk-UAG5KWVA.js.map +1 -0
- package/dist/chunk-UDRIWL7A.js +382 -0
- package/dist/chunk-UDRIWL7A.js.map +1 -0
- package/dist/{chunk-2GLDA55J.js → chunk-UIU2THRG.js} +498 -133
- package/dist/chunk-UIU2THRG.js.map +1 -0
- package/dist/{chunk-3YPCK6JX.js → chunk-UPJNJGGA.js} +165 -423
- package/dist/chunk-UPJNJGGA.js.map +1 -0
- package/dist/chunk-UV5MFVO3.js +21 -0
- package/dist/chunk-UV5MFVO3.js.map +1 -0
- package/dist/{chunk-2WUSG3IT.js → chunk-V7RWQRG7.js} +5 -5
- package/dist/chunk-V7RWQRG7.js.map +1 -0
- package/dist/{chunk-VTKGMEPP.js → chunk-VCTFO5CO.js} +13 -3
- package/dist/chunk-VCTFO5CO.js.map +1 -0
- package/dist/{chunk-5T22KDPN.js → chunk-VFQGRQIH.js} +8 -8
- package/dist/chunk-VFQGRQIH.js.map +1 -0
- package/dist/{chunk-2QR2PQTT.js → chunk-VQNJ7UZL.js} +5 -3
- package/dist/chunk-VQNJ7UZL.js.map +1 -0
- package/dist/{chunk-DONMZAD2.js → chunk-WWGT2MDV.js} +43 -165
- package/dist/chunk-WWGT2MDV.js.map +1 -0
- package/dist/{chunk-EMIGCR7X.js → chunk-WXSYDNBT.js} +2 -2
- package/dist/chunk-WXSYDNBT.js.map +1 -0
- package/dist/chunk-WYSO2NIH.js +30 -0
- package/dist/chunk-WYSO2NIH.js.map +1 -0
- package/dist/chunk-XXYIOFUB.js +164 -0
- package/dist/chunk-XXYIOFUB.js.map +1 -0
- package/dist/{chunk-3BFJOWSU.js → chunk-Y22T3KQE.js} +35 -7
- package/dist/chunk-Y22T3KQE.js.map +1 -0
- package/dist/{chunk-A3JMGXPG.js → chunk-YMUGBZN2.js} +2 -2
- package/dist/chunk-YMUGBZN2.js.map +1 -0
- package/dist/{chunk-I5FOWO4J.js → chunk-ZCGAHGUS.js} +52 -73
- package/dist/chunk-ZCGAHGUS.js.map +1 -0
- package/dist/{chunk-FZU343FL.js → chunk-ZJADGNYF.js} +2 -2
- package/dist/chunk-ZJADGNYF.js.map +1 -0
- package/dist/{chunk-B6PB7JLN.js → chunk-ZYUC53LT.js} +427 -6
- package/dist/chunk-ZYUC53LT.js.map +1 -0
- package/dist/collection-facade-GQAOGJP2.js +33 -0
- package/dist/consent/index.d.ts +5 -7
- package/dist/consent/index.js +7 -5
- package/dist/consent/index.js.map +1 -1
- package/dist/crdt/index.d.ts +6 -2
- package/dist/crdt/index.js +3 -2
- package/dist/crdt/index.js.map +1 -1
- package/dist/decrypt-partition-IHtxEnTi.d.ts +21 -0
- package/dist/delegation-UL5HKLER.js +19 -0
- package/dist/derivations/index.d.ts +7 -9
- package/dist/derivations/index.js +11 -6
- package/dist/describe/index.d.ts +1 -0
- package/dist/describe/index.js +1 -0
- package/dist/describe-aBkJR2sd.d.ts +131 -0
- package/dist/{dev-unlock-B4kDxep_.d.ts → dev-unlock-C9Ro3v_O.d.ts} +1 -1
- package/dist/discriminant-BN9REW3o.d.ts +60 -0
- package/dist/enclave-UL5LW66V.js +88 -0
- package/dist/executor-2FWQRLMG.js +15 -0
- package/dist/executor-QZ7BXICW.js +9 -0
- package/dist/executor-Z5ZLJVTV.js +9 -0
- package/dist/export-accessible-KRV5W4GH.js +17 -0
- package/dist/extract-partition-GLKBOXFQ.js +30 -0
- package/dist/{fanout-sidecar-OKPMMPLG.js → fanout-sidecar-GF3DJ6KR.js} +34 -14
- package/dist/fanout-sidecar-GF3DJ6KR.js.map +1 -0
- package/dist/forget/index.d.ts +36 -0
- package/dist/forget/index.js +19 -0
- package/dist/forget/index.js.map +1 -0
- package/dist/guards/index.d.ts +13 -9
- package/dist/guards/index.js +12 -5
- package/dist/{hash-DdpVypUp.d.cts → hash-Cp5uwiox.d.ts} +5 -1
- package/dist/history/index.d.ts +6 -8
- package/dist/history/index.js +19 -12
- package/dist/history/index.js.map +1 -1
- package/dist/i18n/index.d.ts +5 -7
- package/dist/i18n/index.js +104 -15
- package/dist/i18n/index.js.map +1 -1
- package/dist/in/index.d.ts +5 -0
- package/dist/in/index.js +1 -0
- package/dist/in/index.js.map +1 -0
- package/dist/index-B9QdHytu.d.ts +123 -0
- package/dist/index-BF9_96A5.d.ts +123 -0
- package/dist/{types-Df28QFKb.d.ts → index-BzUo1B6n.d.ts} +16270 -8358
- package/dist/index.d.ts +1088 -450
- package/dist/index.js +1165 -293
- package/dist/index.js.map +1 -1
- package/dist/indexing/index.d.ts +6 -3
- package/dist/indexing/index.js +6 -5
- package/dist/indexing/index.js.map +1 -1
- package/dist/issue-Y6UVIR43.js +13 -0
- package/dist/issue-Y6UVIR43.js.map +1 -0
- package/dist/kernel/index.d.ts +32 -0
- package/dist/kernel/index.js +53 -0
- package/dist/kernel/index.js.map +1 -0
- package/dist/{ledger-TMRZYNVJ.js → ledger-RYI35CDS.js} +12 -9
- package/dist/ledger-RYI35CDS.js.map +1 -0
- package/dist/liberate-CRPZEV7O.js +18 -0
- package/dist/liberate-CRPZEV7O.js.map +1 -0
- package/dist/materialized-views/index.d.ts +6 -19
- package/dist/materialized-views/index.js +16 -12
- package/dist/mime-magic-CGhw37_E.d.ts +103 -0
- package/dist/noydb-367AM4HT.js +50 -0
- package/dist/noydb-367AM4HT.js.map +1 -0
- package/dist/on/index.d.ts +5 -0
- package/dist/on/index.js +11 -0
- package/dist/on/index.js.map +1 -0
- package/dist/overlay-views/index.d.ts +27 -11
- package/dist/overlay-views/index.js +7 -6
- package/dist/periods/index.d.ts +5 -7
- package/dist/periods/index.js +13 -9
- package/dist/pod/index.d.ts +63 -0
- package/dist/pod/index.js +61 -0
- package/dist/pod/index.js.map +1 -0
- package/dist/policy-IXK4FVXP.js +41 -0
- package/dist/policy-IXK4FVXP.js.map +1 -0
- package/dist/portability/index.d.ts +20 -0
- package/dist/portability/index.js +43 -0
- package/dist/portability/index.js.map +1 -0
- package/dist/{public-envelope-BW6OXORV.js → public-envelope-JHDQCPSX.js} +6 -5
- package/dist/public-envelope-JHDQCPSX.js.map +1 -0
- package/dist/query/index.d.ts +5 -3
- package/dist/query/index.js +21 -13
- package/dist/read-only-facade-5ADRJVTM.js +8 -0
- package/dist/read-only-facade-5ADRJVTM.js.map +1 -0
- package/dist/registry-45RJNWGU.js +9 -0
- package/dist/registry-45RJNWGU.js.map +1 -0
- package/dist/registry-5GRV5VXI.js +13 -0
- package/dist/registry-5GRV5VXI.js.map +1 -0
- package/dist/registry-VW6P6A3J.js +8 -0
- package/dist/registry-VW6P6A3J.js.map +1 -0
- package/dist/registry-WEUCHBO4.js +11 -0
- package/dist/registry-WEUCHBO4.js.map +1 -0
- package/dist/request-withdrawal-GBPH2FDY.js +25 -0
- package/dist/request-withdrawal-GBPH2FDY.js.map +1 -0
- package/dist/revoke-TUFRGI6S.js +18 -0
- package/dist/revoke-TUFRGI6S.js.map +1 -0
- package/dist/sealed-record/index.d.ts +69 -0
- package/dist/sealed-record/index.js +65 -0
- package/dist/sealed-record/index.js.map +1 -0
- package/dist/session/index.d.ts +6 -8
- package/dist/session/index.js +7 -5
- package/dist/session/index.js.map +1 -1
- package/dist/shadow/index.d.ts +5 -7
- package/dist/shadow/index.js +4 -3
- package/dist/shadow/index.js.map +1 -1
- package/dist/{signer-72QAUSVW.js → signer-PNKTBVF7.js} +6 -5
- package/dist/signer-PNKTBVF7.js.map +1 -0
- package/dist/snapshots/index.d.ts +6 -8
- package/dist/snapshots/index.js +13 -11
- package/dist/snapshots/index.js.map +1 -1
- package/dist/{stale-6ZDBTQT7.js → stale-3JWHNDIY.js} +3 -2
- package/dist/stale-3JWHNDIY.js.map +1 -0
- package/dist/store-coordination-provider-3I7XWZZK.js +142 -0
- package/dist/store-coordination-provider-3I7XWZZK.js.map +1 -0
- package/dist/subject-index-O75wKshW.d.ts +362 -0
- package/dist/sync/index.d.ts +4 -6
- package/dist/sync/index.js +7 -6
- package/dist/sync/index.js.map +1 -1
- package/dist/team/index.d.ts +5 -7
- package/dist/team/index.js +20 -16
- package/dist/tiers/index.d.ts +5 -0
- package/dist/tiers/index.js +33 -0
- package/dist/tiers/index.js.map +1 -0
- package/dist/to/index.d.ts +5 -0
- package/dist/to/index.js +17 -0
- package/dist/to/index.js.map +1 -0
- package/dist/transition-guard-C7ol6oPw.d.ts +165 -0
- package/dist/tx/index.d.ts +23 -9
- package/dist/tx/index.js +13 -8
- package/dist/tx/index.js.map +1 -1
- package/dist/ui/index.d.ts +1 -0
- package/dist/ui/index.js +1 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/ulid-DRH25k3y.d.ts +66 -0
- package/dist/ulid-PTAIMDG4.js +10 -0
- package/dist/ulid-PTAIMDG4.js.map +1 -0
- package/dist/util/index.d.ts +2 -0
- package/dist/util/index.js +7 -2
- package/dist/util/index.js.map +1 -1
- package/dist/vault-diff-B5fYNBL7.d.ts +147 -0
- package/dist/with/index.d.ts +38 -0
- package/dist/with/index.js +25 -0
- package/dist/with/index.js.map +1 -0
- package/dist/{with-materialized-view-BLkQxoQN.d.ts → with-materialized-view-6p0Fk8bL.d.ts} +1 -1
- package/dist/{with-overlayed-view-CRsSEwHR.d.ts → with-overlayed-view-BJ6mXGMd.d.ts} +2 -3
- package/dist/with-rollup-BvQo3ROo.d.ts +47 -0
- package/dist/withdraw-accessible-FFS46EOD.js +22 -0
- package/dist/withdraw-accessible-FFS46EOD.js.map +1 -0
- package/dist/zod-HAJM7LMS.js +14763 -0
- package/dist/zod-HAJM7LMS.js.map +1 -0
- package/package.json +121 -201
- package/dist/aggregate/index.cjs.map +0 -1
- package/dist/aggregate/index.d.cts +0 -38
- package/dist/attestation/index.cjs +0 -305
- package/dist/attestation/index.cjs.map +0 -1
- package/dist/attestation/index.d.cts +0 -52
- package/dist/blobs/index.cjs +0 -1480
- package/dist/blobs/index.cjs.map +0 -1
- package/dist/blobs/index.d.cts +0 -46
- package/dist/bundle/index.cjs +0 -19264
- package/dist/bundle/index.cjs.map +0 -1
- package/dist/bundle/index.d.cts +0 -176
- package/dist/chunk-22DWZL57.js.map +0 -1
- package/dist/chunk-2GLDA55J.js.map +0 -1
- package/dist/chunk-2QR2PQTT.js.map +0 -1
- package/dist/chunk-2WUSG3IT.js.map +0 -1
- package/dist/chunk-3BFJOWSU.js.map +0 -1
- package/dist/chunk-3YPCK6JX.js.map +0 -1
- package/dist/chunk-53XBRIRT.js.map +0 -1
- package/dist/chunk-5T22KDPN.js.map +0 -1
- package/dist/chunk-5XHKQ56N.js +0 -340
- package/dist/chunk-5XHKQ56N.js.map +0 -1
- package/dist/chunk-6CME4UEK.js.map +0 -1
- package/dist/chunk-6STK5TQP.js +0 -139
- package/dist/chunk-6STK5TQP.js.map +0 -1
- package/dist/chunk-A3JMGXPG.js.map +0 -1
- package/dist/chunk-B6PB7JLN.js.map +0 -1
- package/dist/chunk-BVRYKATC.js.map +0 -1
- package/dist/chunk-DE6GKS6G.js.map +0 -1
- package/dist/chunk-DFMLEQZB.js.map +0 -1
- package/dist/chunk-DJHHA6XH.js.map +0 -1
- package/dist/chunk-DL3HWOQ5.js.map +0 -1
- package/dist/chunk-DONMZAD2.js.map +0 -1
- package/dist/chunk-EMIGCR7X.js.map +0 -1
- package/dist/chunk-F3GDRNUT.js.map +0 -1
- package/dist/chunk-FZU343FL.js.map +0 -1
- package/dist/chunk-H2X3ISXG.js.map +0 -1
- package/dist/chunk-HNRHLRDC.js.map +0 -1
- package/dist/chunk-I5FOWO4J.js.map +0 -1
- package/dist/chunk-J66GRPNH.js.map +0 -1
- package/dist/chunk-JWRVQKRZ.js.map +0 -1
- package/dist/chunk-K3DK3NU5.js.map +0 -1
- package/dist/chunk-ML236QKC.js.map +0 -1
- package/dist/chunk-NONAAENK.js.map +0 -1
- package/dist/chunk-O3VZPBZG.js.map +0 -1
- package/dist/chunk-OIF6LZUR.js.map +0 -1
- package/dist/chunk-OQ6PIGHA.js +0 -19
- package/dist/chunk-OQ6PIGHA.js.map +0 -1
- package/dist/chunk-PE2FR4J3.js.map +0 -1
- package/dist/chunk-PP6W64Y3.js +0 -275
- package/dist/chunk-PP6W64Y3.js.map +0 -1
- package/dist/chunk-PX35GA7L.js.map +0 -1
- package/dist/chunk-QEILDE6R.js +0 -793
- package/dist/chunk-QEILDE6R.js.map +0 -1
- package/dist/chunk-QODLLGQ7.js.map +0 -1
- package/dist/chunk-RAZ4OVLL.js +0 -51
- package/dist/chunk-RAZ4OVLL.js.map +0 -1
- package/dist/chunk-SYMWGEET.js.map +0 -1
- package/dist/chunk-T7JEBOGN.js.map +0 -1
- package/dist/chunk-TFBP23BX.js.map +0 -1
- package/dist/chunk-TV3YZ35S.js +0 -90
- package/dist/chunk-TV3YZ35S.js.map +0 -1
- package/dist/chunk-U26HQ6KJ.js.map +0 -1
- package/dist/chunk-UF3BUNQZ.js +0 -1
- package/dist/chunk-UMLVJTYV.js +0 -20
- package/dist/chunk-UMLVJTYV.js.map +0 -1
- package/dist/chunk-VTKGMEPP.js.map +0 -1
- package/dist/chunk-W6EQLGMB.js +0 -100
- package/dist/chunk-W6EQLGMB.js.map +0 -1
- package/dist/chunk-WIRRPTFH.js +0 -17
- package/dist/chunk-WIRRPTFH.js.map +0 -1
- package/dist/chunk-WPLVTJ5D.js.map +0 -1
- package/dist/chunk-XJFLDA7A.js.map +0 -1
- package/dist/chunk-Z6FNBOTC.js.map +0 -1
- package/dist/chunk-ZYWZWG6G.js.map +0 -1
- package/dist/consent/index.cjs +0 -204
- package/dist/consent/index.cjs.map +0 -1
- package/dist/consent/index.d.cts +0 -25
- package/dist/crdt/index.cjs +0 -152
- package/dist/crdt/index.cjs.map +0 -1
- package/dist/crdt/index.d.cts +0 -30
- package/dist/crypto-HTZ4FJOP.js +0 -44
- package/dist/delegation-RI54P6I5.js +0 -17
- package/dist/derivations/index.cjs +0 -351
- package/dist/derivations/index.cjs.map +0 -1
- package/dist/derivations/index.d.cts +0 -72
- package/dist/dev-unlock-BIoEFbwm.d.cts +0 -263
- package/dist/executor-5PNY7LGW.js +0 -8
- package/dist/executor-B4QIYGZX.js +0 -8
- package/dist/executor-BWXXDQ7K.js +0 -11
- package/dist/fanout-sidecar-OKPMMPLG.js.map +0 -1
- package/dist/guards/index.cjs +0 -322
- package/dist/guards/index.cjs.map +0 -1
- package/dist/guards/index.d.cts +0 -31
- package/dist/hash-HJqD14vS.d.ts +0 -63
- package/dist/history/index.cjs +0 -1222
- package/dist/history/index.cjs.map +0 -1
- package/dist/history/index.d.cts +0 -63
- package/dist/i18n/index.cjs +0 -1100
- package/dist/i18n/index.cjs.map +0 -1
- package/dist/i18n/index.d.cts +0 -39
- package/dist/index-4fBVt8j9.d.cts +0 -2387
- package/dist/index-D8I_pyJD.d.ts +0 -2387
- package/dist/index.cjs +0 -24487
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -776
- package/dist/indexing/index.cjs +0 -742
- package/dist/indexing/index.cjs.map +0 -1
- package/dist/indexing/index.d.cts +0 -36
- package/dist/issue-VGDPP4B5.js +0 -12
- package/dist/lazy-builder-7tIpFyWN.d.ts +0 -304
- package/dist/lazy-builder-wY4pMCEe.d.cts +0 -304
- package/dist/materialized-views/index.cjs +0 -854
- package/dist/materialized-views/index.cjs.map +0 -1
- package/dist/materialized-views/index.d.cts +0 -186
- package/dist/mime-magic-CBBSOkjm.d.cts +0 -50
- package/dist/mime-magic-CBBSOkjm.d.ts +0 -50
- package/dist/noydb-G725ZSZG.js +0 -34
- package/dist/overlay-views/index.cjs +0 -359
- package/dist/overlay-views/index.cjs.map +0 -1
- package/dist/overlay-views/index.d.cts +0 -82
- package/dist/periods/index.cjs +0 -1041
- package/dist/periods/index.cjs.map +0 -1
- package/dist/periods/index.d.cts +0 -22
- package/dist/predicate-BSAGEyu5.d.cts +0 -209
- package/dist/predicate-BSAGEyu5.d.ts +0 -209
- package/dist/query/index.cjs +0 -2375
- package/dist/query/index.cjs.map +0 -1
- package/dist/query/index.d.cts +0 -3
- package/dist/read-only-facade-ITU6L7BL.js +0 -7
- package/dist/registry-3QP3YKQS.js +0 -8
- package/dist/registry-DKEXOJVO.js +0 -7
- package/dist/registry-OJIOSBV6.js +0 -10
- package/dist/registry-USRVT6YF.js +0 -8
- package/dist/revoke-JCC7N56X.js +0 -17
- package/dist/session/index.cjs +0 -495
- package/dist/session/index.cjs.map +0 -1
- package/dist/session/index.d.cts +0 -46
- package/dist/shadow/index.cjs +0 -133
- package/dist/shadow/index.cjs.map +0 -1
- package/dist/shadow/index.d.cts +0 -17
- package/dist/snapshots/index.cjs +0 -937
- package/dist/snapshots/index.cjs.map +0 -1
- package/dist/snapshots/index.d.cts +0 -28
- package/dist/store/index.cjs +0 -1083
- package/dist/store/index.cjs.map +0 -1
- package/dist/store/index.d.cts +0 -492
- package/dist/store/index.d.ts +0 -492
- package/dist/store/index.js +0 -37
- package/dist/strategy-BSxFXGzb.d.cts +0 -110
- package/dist/strategy-BSxFXGzb.d.ts +0 -110
- package/dist/strategy-DSTrsZ8t.d.cts +0 -601
- package/dist/strategy-DSTrsZ8t.d.ts +0 -601
- package/dist/sync/index.cjs +0 -1062
- package/dist/sync/index.cjs.map +0 -1
- package/dist/sync/index.d.cts +0 -43
- package/dist/team/index.cjs +0 -2798
- package/dist/team/index.cjs.map +0 -1
- package/dist/team/index.d.cts +0 -118
- package/dist/tx/index.cjs +0 -544
- package/dist/tx/index.cjs.map +0 -1
- package/dist/tx/index.d.cts +0 -21
- package/dist/types-DyXYr8rE.d.cts +0 -12818
- package/dist/ulid-COREQ2RQ.js +0 -9
- package/dist/ulid-Drr7ykr6.d.cts +0 -603
- package/dist/util/index.cjs +0 -230
- package/dist/util/index.cjs.map +0 -1
- package/dist/util/index.d.cts +0 -77
- package/dist/with-derivation-DFnFByiQ.d.ts +0 -13
- package/dist/with-derivation-DU3Sjazm.d.cts +0 -13
- package/dist/with-guard-ByyxmEe7.d.cts +0 -18
- package/dist/with-guard-qube6BMI.d.ts +0 -18
- package/dist/with-materialized-view-BmEToIR1.d.cts +0 -27
- package/dist/with-overlayed-view-BMsQQbWm.d.cts +0 -13
- /package/dist/{store → adapter}/index.js.map +0 -0
- /package/dist/{chunk-UF3BUNQZ.js.map → api-RW3KP7WU.js.map} +0 -0
- /package/dist/{crypto-HTZ4FJOP.js.map → as/index.js.map} +0 -0
- /package/dist/{delegation-RI54P6I5.js.map → at/index.js.map} +0 -0
- /package/dist/{executor-5PNY7LGW.js.map → by/index.js.map} +0 -0
- /package/dist/{executor-B4QIYGZX.js.map → cargo/index.js.map} +0 -0
- /package/dist/{executor-BWXXDQ7K.js.map → chunk-BGIZAFY7.js.map} +0 -0
- /package/dist/{issue-VGDPP4B5.js.map → chunk-CHFZDSE4.js.map} +0 -0
- /package/dist/{ledger-TMRZYNVJ.js.map → chunk-GHVIKOHT.js.map} +0 -0
- /package/dist/{noydb-G725ZSZG.js.map → chunk-K2WCO3NX.js.map} +0 -0
- /package/dist/{public-envelope-BW6OXORV.js.map → chunk-PZ5AY32C.js.map} +0 -0
- /package/dist/{read-only-facade-ITU6L7BL.js.map → collection-facade-GQAOGJP2.js.map} +0 -0
- /package/dist/{registry-3QP3YKQS.js.map → delegation-UL5HKLER.js.map} +0 -0
- /package/dist/{registry-DKEXOJVO.js.map → describe/index.js.map} +0 -0
- /package/dist/{registry-OJIOSBV6.js.map → enclave-UL5LW66V.js.map} +0 -0
- /package/dist/{registry-USRVT6YF.js.map → executor-2FWQRLMG.js.map} +0 -0
- /package/dist/{revoke-JCC7N56X.js.map → executor-QZ7BXICW.js.map} +0 -0
- /package/dist/{signer-72QAUSVW.js.map → executor-Z5ZLJVTV.js.map} +0 -0
- /package/dist/{stale-6ZDBTQT7.js.map → export-accessible-KRV5W4GH.js.map} +0 -0
- /package/dist/{ulid-COREQ2RQ.js.map → extract-partition-GLKBOXFQ.js.map} +0 -0
package/dist/periods/index.d.cts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { ag as PeriodsStrategy } from '../types-DyXYr8rE.cjs';
|
|
2
|
-
export { ah as CarryForwardContext, ai as ClosePeriodOptions, aj as OpenPeriodOptions, ak as PERIODS_COLLECTION, al as PeriodRecord, am as ReadOnlyCollection, an as appendPeriodLedgerEntry, ao as assertTsWritable, ap as chainAnchor, aq as loadPeriods, ar as validatePeriodName } from '../types-DyXYr8rE.cjs';
|
|
3
|
-
import '../lazy-builder-wY4pMCEe.cjs';
|
|
4
|
-
import '../predicate-BSAGEyu5.cjs';
|
|
5
|
-
import '../strategy-DSTrsZ8t.cjs';
|
|
6
|
-
import '../strategy-BSxFXGzb.cjs';
|
|
7
|
-
import '../index-4fBVt8j9.cjs';
|
|
8
|
-
import '@noy-db/attestation';
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Active periods strategy factory. Only reachable through the
|
|
12
|
-
* `@noy-db/hub/periods` subpath.
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Build the default periods strategy. Pass into
|
|
17
|
-
* `createNoydb({ periodsStrategy: withPeriods() })` to enable
|
|
18
|
-
* `vault.closePeriod()` / `vault.openPeriod()` / write-guards.
|
|
19
|
-
*/
|
|
20
|
-
declare function withPeriods(): PeriodsStrategy;
|
|
21
|
-
|
|
22
|
-
export { PeriodsStrategy, withPeriods };
|
|
@@ -1,209 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Secondary indexes for the query DSL.
|
|
3
|
-
*
|
|
4
|
-
* ships **in-memory hash indexes**:
|
|
5
|
-
* - Built during `Collection.ensureHydrated()` from the decrypted cache
|
|
6
|
-
* - Maintained incrementally on `put` and `delete`
|
|
7
|
-
* - Consulted by the query executor for `==` and `in` operators on
|
|
8
|
-
* indexed fields, falling back to a linear scan otherwise
|
|
9
|
-
* - Live entirely in memory — no adapter writes for the index itself
|
|
10
|
-
*
|
|
11
|
-
* Persistent encrypted index blobs (the spec's "store as a separate
|
|
12
|
-
* AES-256-GCM blob" note) are deferred to a follow-up issue. The reasons
|
|
13
|
-
* are documented in the PR body — short version: at the target
|
|
14
|
-
* scale of 1K–50K records, building the index during hydrate is free,
|
|
15
|
-
* so persistence buys nothing measurable.
|
|
16
|
-
*/
|
|
17
|
-
/**
|
|
18
|
-
* Index declaration accepted by `Collection`'s constructor.
|
|
19
|
-
*
|
|
20
|
-
* Accepts:
|
|
21
|
-
* - `string` — a single-field hash index (`'clientId'`)
|
|
22
|
-
* - `{ fields: [...] }` or `readonly string[]` — a composite index
|
|
23
|
-
* over an ordered field tuple. Only lazy-mode
|
|
24
|
-
* collections consume composite declarations today; eager mode
|
|
25
|
-
* silently treats a composite as equivalent to declaring each
|
|
26
|
-
* component field as its own single-field index.
|
|
27
|
-
*
|
|
28
|
-
* Additive variants (unique constraints, partial indexes) will land as
|
|
29
|
-
* further union members without breaking existing declarations.
|
|
30
|
-
*/
|
|
31
|
-
type IndexDef = string | {
|
|
32
|
-
readonly fields: readonly string[];
|
|
33
|
-
} | readonly string[];
|
|
34
|
-
/**
|
|
35
|
-
* Internal representation of a built hash index.
|
|
36
|
-
*
|
|
37
|
-
* Maps stringified field values to the set of record ids whose value
|
|
38
|
-
* for that field matches. Stringification keeps the index simple and
|
|
39
|
-
* works uniformly for primitives (`'open'`, `'42'`, `'true'`).
|
|
40
|
-
*
|
|
41
|
-
* Records whose indexed field is `undefined` or `null` are NOT inserted
|
|
42
|
-
* — `query().where('field', '==', undefined)` falls back to a linear
|
|
43
|
-
* scan, which is the conservative behavior.
|
|
44
|
-
*/
|
|
45
|
-
interface HashIndex {
|
|
46
|
-
readonly field: string;
|
|
47
|
-
readonly buckets: Map<string, Set<string>>;
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Container for all indexes on a single collection.
|
|
51
|
-
*
|
|
52
|
-
* Methods are pure with respect to the in-memory `buckets` Map — they
|
|
53
|
-
* never touch the adapter or the keyring. The Collection class owns
|
|
54
|
-
* lifecycle (build on hydrate, maintain on put/delete).
|
|
55
|
-
*/
|
|
56
|
-
declare class CollectionIndexes {
|
|
57
|
-
private readonly indexes;
|
|
58
|
-
/**
|
|
59
|
-
* Declare an index. Subsequent record additions are tracked under it.
|
|
60
|
-
* Calling this twice for the same field is a no-op (idempotent).
|
|
61
|
-
*/
|
|
62
|
-
declare(field: string): void;
|
|
63
|
-
/** True if the given field has a declared index. */
|
|
64
|
-
has(field: string): boolean;
|
|
65
|
-
/** All declared field names, in declaration order. */
|
|
66
|
-
fields(): string[];
|
|
67
|
-
/**
|
|
68
|
-
* Build all declared indexes from a snapshot of records.
|
|
69
|
-
* Called once per hydration. O(N × indexes.size).
|
|
70
|
-
*/
|
|
71
|
-
build<T>(records: ReadonlyArray<{
|
|
72
|
-
id: string;
|
|
73
|
-
record: T;
|
|
74
|
-
}>): void;
|
|
75
|
-
/**
|
|
76
|
-
* Insert or update a single record across all indexes.
|
|
77
|
-
* Called by `Collection.put()` after the encrypted write succeeds.
|
|
78
|
-
*
|
|
79
|
-
* If `previousRecord` is provided, the record is removed from any old
|
|
80
|
-
* buckets first — this is the update path. Pass `null` for fresh adds.
|
|
81
|
-
*/
|
|
82
|
-
upsert<T>(id: string, newRecord: T, previousRecord: T | null): void;
|
|
83
|
-
/**
|
|
84
|
-
* Remove a record from all indexes. Called by `Collection.delete()`
|
|
85
|
-
* (and as the first half of `upsert` for the update path).
|
|
86
|
-
*/
|
|
87
|
-
remove<T>(id: string, record: T): void;
|
|
88
|
-
/** Drop all index data. Called when the collection is invalidated. */
|
|
89
|
-
clear(): void;
|
|
90
|
-
/**
|
|
91
|
-
* Equality lookup: return the set of record ids whose `field` matches
|
|
92
|
-
* the given value. Returns `null` if no index covers the field — the
|
|
93
|
-
* caller should fall back to a linear scan.
|
|
94
|
-
*
|
|
95
|
-
* The returned Set is a reference to the index's internal storage —
|
|
96
|
-
* callers must NOT mutate it.
|
|
97
|
-
*/
|
|
98
|
-
lookupEqual(field: string, value: unknown): ReadonlySet<string> | null;
|
|
99
|
-
/**
|
|
100
|
-
* Set lookup: return the union of record ids whose `field` matches any
|
|
101
|
-
* of the given values. Returns `null` if no index covers the field.
|
|
102
|
-
*/
|
|
103
|
-
lookupIn(field: string, values: readonly unknown[]): ReadonlySet<string> | null;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* Operator implementations for the query DSL.
|
|
108
|
-
*
|
|
109
|
-
* All predicates run client-side, AFTER decryption — they never see ciphertext.
|
|
110
|
-
* This file is dependency-free and tree-shakeable.
|
|
111
|
-
*/
|
|
112
|
-
/** Comparison operators supported by the where() builder. */
|
|
113
|
-
type Operator = '==' | '!=' | '<' | '<=' | '>' | '>=' | 'in' | 'contains' | 'startsWith' | 'between';
|
|
114
|
-
/**
|
|
115
|
-
* A single field comparison clause inside a query plan.
|
|
116
|
-
* Plans are JSON-serializable, so this type uses primitives only.
|
|
117
|
-
*/
|
|
118
|
-
interface FieldClause {
|
|
119
|
-
readonly type: 'field';
|
|
120
|
-
readonly field: string;
|
|
121
|
-
readonly op: Operator;
|
|
122
|
-
readonly value: unknown;
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* A user-supplied predicate function escape hatch. Not serializable.
|
|
126
|
-
*
|
|
127
|
-
* The predicate accepts `unknown` at the type level so the surrounding
|
|
128
|
-
* Clause type can stay non-parametric — this keeps Collection<T> covariant
|
|
129
|
-
* in T at the public API surface. Builder methods cast user predicates
|
|
130
|
-
* (typed `(record: T) => boolean`) into this shape on the way in.
|
|
131
|
-
*/
|
|
132
|
-
interface FilterClause {
|
|
133
|
-
readonly type: 'filter';
|
|
134
|
-
readonly fn: (record: unknown) => boolean;
|
|
135
|
-
}
|
|
136
|
-
/**
|
|
137
|
-
* A declared deterministic predicate reference. The query
|
|
138
|
-
* builder produces this via `.wherePredicate(name, ctx?)` when a
|
|
139
|
-
* Query has been augmented with a predicates map (typically by the
|
|
140
|
-
* materialized-view registry — see MV v2 spec § Function-based
|
|
141
|
-
* source-row predicates).
|
|
142
|
-
*
|
|
143
|
-
* `predicateHash` is the consumer-supplied stable hash for the
|
|
144
|
-
* function body; `ctxHash` is the canonical-JSON SHA-256 of `ctx`.
|
|
145
|
-
* Both fold into the MV's `queryHash` so a function or ctx change
|
|
146
|
-
* forces refresh on next visit.
|
|
147
|
-
*
|
|
148
|
-
* `fn` is resolved at builder time from the predicates map and
|
|
149
|
-
* embedded directly — so `evaluateClause` can fire it without a
|
|
150
|
-
* runtime lookup.
|
|
151
|
-
*/
|
|
152
|
-
interface WherePredicateClause {
|
|
153
|
-
readonly type: 'wherePredicate';
|
|
154
|
-
readonly name: string;
|
|
155
|
-
readonly ctx: unknown;
|
|
156
|
-
readonly predicateHash: string;
|
|
157
|
-
readonly ctxHash: string;
|
|
158
|
-
readonly fn: (record: unknown, ctx?: unknown) => boolean;
|
|
159
|
-
}
|
|
160
|
-
/** A logical group of clauses combined by AND or OR. */
|
|
161
|
-
interface GroupClause {
|
|
162
|
-
readonly type: 'group';
|
|
163
|
-
readonly op: 'and' | 'or';
|
|
164
|
-
readonly clauses: readonly Clause[];
|
|
165
|
-
}
|
|
166
|
-
/**
|
|
167
|
-
* Cartesian-product expansion clause. Appended to `QueryPlan.clauses`
|
|
168
|
-
* by `Query.crossJoin()`. Processed in declaration order by
|
|
169
|
-
* `executeClausePipeline` — NOT by `evaluateClause` (which is a
|
|
170
|
-
* per-record predicate and throws on this type).
|
|
171
|
-
*/
|
|
172
|
-
interface CrossJoinClause {
|
|
173
|
-
readonly type: 'crossJoin';
|
|
174
|
-
/** Target collection name to cross-join against. */
|
|
175
|
-
readonly target: string;
|
|
176
|
-
/** Alias under which the right-side record is exposed on each result row. */
|
|
177
|
-
readonly as: string;
|
|
178
|
-
/**
|
|
179
|
-
* Lateral filter callback. `undefined` → full cartesian product.
|
|
180
|
-
* Two call shapes:
|
|
181
|
-
* - Subset: `(left) => TTarget[]` — returns the right rows for this left row
|
|
182
|
-
* - Predicate: `(left) => (right) => boolean` — executor materializes then filters
|
|
183
|
-
*/
|
|
184
|
-
readonly on?: (left: unknown) => unknown[] | ((right: unknown) => boolean);
|
|
185
|
-
/** When `on:` was supplied as `{ predicate: name }`, the name is stored here for queryHash. */
|
|
186
|
-
readonly onPredicateName?: string;
|
|
187
|
-
/** Per-clause row ceiling override. `undefined` → `DEFAULT_CROSS_JOIN_MAX_ROWS`. */
|
|
188
|
-
readonly maxRows?: number;
|
|
189
|
-
}
|
|
190
|
-
type Clause = FieldClause | FilterClause | WherePredicateClause | GroupClause | CrossJoinClause;
|
|
191
|
-
/**
|
|
192
|
-
* Read a possibly nested field path like "address.city" from a record.
|
|
193
|
-
* Returns undefined if any segment is missing.
|
|
194
|
-
*/
|
|
195
|
-
declare function readPath(record: unknown, path: string): unknown;
|
|
196
|
-
/**
|
|
197
|
-
* Evaluate a single field clause against a record.
|
|
198
|
-
* Returns false on type mismatches rather than throwing — query results
|
|
199
|
-
* exclude non-matching records by definition.
|
|
200
|
-
*/
|
|
201
|
-
declare function evaluateFieldClause(record: unknown, clause: FieldClause): boolean;
|
|
202
|
-
/**
|
|
203
|
-
* Evaluate any clause (field / filter / group) against a record.
|
|
204
|
-
* The recursion depth is bounded by the user's query expression — no risk of
|
|
205
|
-
* blowing the stack on a 50K-record collection.
|
|
206
|
-
*/
|
|
207
|
-
declare function evaluateClause(record: unknown, clause: Clause): boolean;
|
|
208
|
-
|
|
209
|
-
export { CollectionIndexes as C, type FieldClause as F, type GroupClause as G, type HashIndex as H, type IndexDef as I, type Operator as O, type Clause as a, type FilterClause as b, evaluateFieldClause as c, type CrossJoinClause as d, evaluateClause as e, readPath as r };
|
|
@@ -1,209 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Secondary indexes for the query DSL.
|
|
3
|
-
*
|
|
4
|
-
* ships **in-memory hash indexes**:
|
|
5
|
-
* - Built during `Collection.ensureHydrated()` from the decrypted cache
|
|
6
|
-
* - Maintained incrementally on `put` and `delete`
|
|
7
|
-
* - Consulted by the query executor for `==` and `in` operators on
|
|
8
|
-
* indexed fields, falling back to a linear scan otherwise
|
|
9
|
-
* - Live entirely in memory — no adapter writes for the index itself
|
|
10
|
-
*
|
|
11
|
-
* Persistent encrypted index blobs (the spec's "store as a separate
|
|
12
|
-
* AES-256-GCM blob" note) are deferred to a follow-up issue. The reasons
|
|
13
|
-
* are documented in the PR body — short version: at the target
|
|
14
|
-
* scale of 1K–50K records, building the index during hydrate is free,
|
|
15
|
-
* so persistence buys nothing measurable.
|
|
16
|
-
*/
|
|
17
|
-
/**
|
|
18
|
-
* Index declaration accepted by `Collection`'s constructor.
|
|
19
|
-
*
|
|
20
|
-
* Accepts:
|
|
21
|
-
* - `string` — a single-field hash index (`'clientId'`)
|
|
22
|
-
* - `{ fields: [...] }` or `readonly string[]` — a composite index
|
|
23
|
-
* over an ordered field tuple. Only lazy-mode
|
|
24
|
-
* collections consume composite declarations today; eager mode
|
|
25
|
-
* silently treats a composite as equivalent to declaring each
|
|
26
|
-
* component field as its own single-field index.
|
|
27
|
-
*
|
|
28
|
-
* Additive variants (unique constraints, partial indexes) will land as
|
|
29
|
-
* further union members without breaking existing declarations.
|
|
30
|
-
*/
|
|
31
|
-
type IndexDef = string | {
|
|
32
|
-
readonly fields: readonly string[];
|
|
33
|
-
} | readonly string[];
|
|
34
|
-
/**
|
|
35
|
-
* Internal representation of a built hash index.
|
|
36
|
-
*
|
|
37
|
-
* Maps stringified field values to the set of record ids whose value
|
|
38
|
-
* for that field matches. Stringification keeps the index simple and
|
|
39
|
-
* works uniformly for primitives (`'open'`, `'42'`, `'true'`).
|
|
40
|
-
*
|
|
41
|
-
* Records whose indexed field is `undefined` or `null` are NOT inserted
|
|
42
|
-
* — `query().where('field', '==', undefined)` falls back to a linear
|
|
43
|
-
* scan, which is the conservative behavior.
|
|
44
|
-
*/
|
|
45
|
-
interface HashIndex {
|
|
46
|
-
readonly field: string;
|
|
47
|
-
readonly buckets: Map<string, Set<string>>;
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Container for all indexes on a single collection.
|
|
51
|
-
*
|
|
52
|
-
* Methods are pure with respect to the in-memory `buckets` Map — they
|
|
53
|
-
* never touch the adapter or the keyring. The Collection class owns
|
|
54
|
-
* lifecycle (build on hydrate, maintain on put/delete).
|
|
55
|
-
*/
|
|
56
|
-
declare class CollectionIndexes {
|
|
57
|
-
private readonly indexes;
|
|
58
|
-
/**
|
|
59
|
-
* Declare an index. Subsequent record additions are tracked under it.
|
|
60
|
-
* Calling this twice for the same field is a no-op (idempotent).
|
|
61
|
-
*/
|
|
62
|
-
declare(field: string): void;
|
|
63
|
-
/** True if the given field has a declared index. */
|
|
64
|
-
has(field: string): boolean;
|
|
65
|
-
/** All declared field names, in declaration order. */
|
|
66
|
-
fields(): string[];
|
|
67
|
-
/**
|
|
68
|
-
* Build all declared indexes from a snapshot of records.
|
|
69
|
-
* Called once per hydration. O(N × indexes.size).
|
|
70
|
-
*/
|
|
71
|
-
build<T>(records: ReadonlyArray<{
|
|
72
|
-
id: string;
|
|
73
|
-
record: T;
|
|
74
|
-
}>): void;
|
|
75
|
-
/**
|
|
76
|
-
* Insert or update a single record across all indexes.
|
|
77
|
-
* Called by `Collection.put()` after the encrypted write succeeds.
|
|
78
|
-
*
|
|
79
|
-
* If `previousRecord` is provided, the record is removed from any old
|
|
80
|
-
* buckets first — this is the update path. Pass `null` for fresh adds.
|
|
81
|
-
*/
|
|
82
|
-
upsert<T>(id: string, newRecord: T, previousRecord: T | null): void;
|
|
83
|
-
/**
|
|
84
|
-
* Remove a record from all indexes. Called by `Collection.delete()`
|
|
85
|
-
* (and as the first half of `upsert` for the update path).
|
|
86
|
-
*/
|
|
87
|
-
remove<T>(id: string, record: T): void;
|
|
88
|
-
/** Drop all index data. Called when the collection is invalidated. */
|
|
89
|
-
clear(): void;
|
|
90
|
-
/**
|
|
91
|
-
* Equality lookup: return the set of record ids whose `field` matches
|
|
92
|
-
* the given value. Returns `null` if no index covers the field — the
|
|
93
|
-
* caller should fall back to a linear scan.
|
|
94
|
-
*
|
|
95
|
-
* The returned Set is a reference to the index's internal storage —
|
|
96
|
-
* callers must NOT mutate it.
|
|
97
|
-
*/
|
|
98
|
-
lookupEqual(field: string, value: unknown): ReadonlySet<string> | null;
|
|
99
|
-
/**
|
|
100
|
-
* Set lookup: return the union of record ids whose `field` matches any
|
|
101
|
-
* of the given values. Returns `null` if no index covers the field.
|
|
102
|
-
*/
|
|
103
|
-
lookupIn(field: string, values: readonly unknown[]): ReadonlySet<string> | null;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* Operator implementations for the query DSL.
|
|
108
|
-
*
|
|
109
|
-
* All predicates run client-side, AFTER decryption — they never see ciphertext.
|
|
110
|
-
* This file is dependency-free and tree-shakeable.
|
|
111
|
-
*/
|
|
112
|
-
/** Comparison operators supported by the where() builder. */
|
|
113
|
-
type Operator = '==' | '!=' | '<' | '<=' | '>' | '>=' | 'in' | 'contains' | 'startsWith' | 'between';
|
|
114
|
-
/**
|
|
115
|
-
* A single field comparison clause inside a query plan.
|
|
116
|
-
* Plans are JSON-serializable, so this type uses primitives only.
|
|
117
|
-
*/
|
|
118
|
-
interface FieldClause {
|
|
119
|
-
readonly type: 'field';
|
|
120
|
-
readonly field: string;
|
|
121
|
-
readonly op: Operator;
|
|
122
|
-
readonly value: unknown;
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* A user-supplied predicate function escape hatch. Not serializable.
|
|
126
|
-
*
|
|
127
|
-
* The predicate accepts `unknown` at the type level so the surrounding
|
|
128
|
-
* Clause type can stay non-parametric — this keeps Collection<T> covariant
|
|
129
|
-
* in T at the public API surface. Builder methods cast user predicates
|
|
130
|
-
* (typed `(record: T) => boolean`) into this shape on the way in.
|
|
131
|
-
*/
|
|
132
|
-
interface FilterClause {
|
|
133
|
-
readonly type: 'filter';
|
|
134
|
-
readonly fn: (record: unknown) => boolean;
|
|
135
|
-
}
|
|
136
|
-
/**
|
|
137
|
-
* A declared deterministic predicate reference. The query
|
|
138
|
-
* builder produces this via `.wherePredicate(name, ctx?)` when a
|
|
139
|
-
* Query has been augmented with a predicates map (typically by the
|
|
140
|
-
* materialized-view registry — see MV v2 spec § Function-based
|
|
141
|
-
* source-row predicates).
|
|
142
|
-
*
|
|
143
|
-
* `predicateHash` is the consumer-supplied stable hash for the
|
|
144
|
-
* function body; `ctxHash` is the canonical-JSON SHA-256 of `ctx`.
|
|
145
|
-
* Both fold into the MV's `queryHash` so a function or ctx change
|
|
146
|
-
* forces refresh on next visit.
|
|
147
|
-
*
|
|
148
|
-
* `fn` is resolved at builder time from the predicates map and
|
|
149
|
-
* embedded directly — so `evaluateClause` can fire it without a
|
|
150
|
-
* runtime lookup.
|
|
151
|
-
*/
|
|
152
|
-
interface WherePredicateClause {
|
|
153
|
-
readonly type: 'wherePredicate';
|
|
154
|
-
readonly name: string;
|
|
155
|
-
readonly ctx: unknown;
|
|
156
|
-
readonly predicateHash: string;
|
|
157
|
-
readonly ctxHash: string;
|
|
158
|
-
readonly fn: (record: unknown, ctx?: unknown) => boolean;
|
|
159
|
-
}
|
|
160
|
-
/** A logical group of clauses combined by AND or OR. */
|
|
161
|
-
interface GroupClause {
|
|
162
|
-
readonly type: 'group';
|
|
163
|
-
readonly op: 'and' | 'or';
|
|
164
|
-
readonly clauses: readonly Clause[];
|
|
165
|
-
}
|
|
166
|
-
/**
|
|
167
|
-
* Cartesian-product expansion clause. Appended to `QueryPlan.clauses`
|
|
168
|
-
* by `Query.crossJoin()`. Processed in declaration order by
|
|
169
|
-
* `executeClausePipeline` — NOT by `evaluateClause` (which is a
|
|
170
|
-
* per-record predicate and throws on this type).
|
|
171
|
-
*/
|
|
172
|
-
interface CrossJoinClause {
|
|
173
|
-
readonly type: 'crossJoin';
|
|
174
|
-
/** Target collection name to cross-join against. */
|
|
175
|
-
readonly target: string;
|
|
176
|
-
/** Alias under which the right-side record is exposed on each result row. */
|
|
177
|
-
readonly as: string;
|
|
178
|
-
/**
|
|
179
|
-
* Lateral filter callback. `undefined` → full cartesian product.
|
|
180
|
-
* Two call shapes:
|
|
181
|
-
* - Subset: `(left) => TTarget[]` — returns the right rows for this left row
|
|
182
|
-
* - Predicate: `(left) => (right) => boolean` — executor materializes then filters
|
|
183
|
-
*/
|
|
184
|
-
readonly on?: (left: unknown) => unknown[] | ((right: unknown) => boolean);
|
|
185
|
-
/** When `on:` was supplied as `{ predicate: name }`, the name is stored here for queryHash. */
|
|
186
|
-
readonly onPredicateName?: string;
|
|
187
|
-
/** Per-clause row ceiling override. `undefined` → `DEFAULT_CROSS_JOIN_MAX_ROWS`. */
|
|
188
|
-
readonly maxRows?: number;
|
|
189
|
-
}
|
|
190
|
-
type Clause = FieldClause | FilterClause | WherePredicateClause | GroupClause | CrossJoinClause;
|
|
191
|
-
/**
|
|
192
|
-
* Read a possibly nested field path like "address.city" from a record.
|
|
193
|
-
* Returns undefined if any segment is missing.
|
|
194
|
-
*/
|
|
195
|
-
declare function readPath(record: unknown, path: string): unknown;
|
|
196
|
-
/**
|
|
197
|
-
* Evaluate a single field clause against a record.
|
|
198
|
-
* Returns false on type mismatches rather than throwing — query results
|
|
199
|
-
* exclude non-matching records by definition.
|
|
200
|
-
*/
|
|
201
|
-
declare function evaluateFieldClause(record: unknown, clause: FieldClause): boolean;
|
|
202
|
-
/**
|
|
203
|
-
* Evaluate any clause (field / filter / group) against a record.
|
|
204
|
-
* The recursion depth is bounded by the user's query expression — no risk of
|
|
205
|
-
* blowing the stack on a 50K-record collection.
|
|
206
|
-
*/
|
|
207
|
-
declare function evaluateClause(record: unknown, clause: Clause): boolean;
|
|
208
|
-
|
|
209
|
-
export { CollectionIndexes as C, type FieldClause as F, type GroupClause as G, type HashIndex as H, type IndexDef as I, type Operator as O, type Clause as a, type FilterClause as b, evaluateFieldClause as c, type CrossJoinClause as d, evaluateClause as e, readPath as r };
|