@noy-db/hub 0.4.0-pre.5 → 0.4.0-pre.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api-3NKVNZPM.js +20 -0
- package/dist/attestation/index.js +20 -20
- package/dist/{backup-YCHAC575.js → backup-PTSVXDDW.js} +13 -13
- package/dist/blobs/index.js +15 -12
- package/dist/blobs/index.js.map +1 -1
- package/dist/broker/index.js +12 -12
- package/dist/cargo/index.js +36 -36
- package/dist/{chunk-5WLDZZ6S.js → chunk-35NMVJ7I.js} +3 -3
- package/dist/{chunk-TNATF3HB.js → chunk-3HUYRN24.js} +4 -4
- package/dist/chunk-3HUYRN24.js.map +1 -0
- package/dist/{chunk-TNJVDG2B.js → chunk-3XKESW5E.js} +3 -3
- package/dist/{chunk-MUPZ6IZX.js → chunk-4JQK3L4V.js} +2 -2
- package/dist/{chunk-Z4D3YGAB.js → chunk-4ZKNC6A6.js} +2 -2
- package/dist/{chunk-ONB627HU.js → chunk-55LX6FSX.js} +2 -2
- package/dist/{chunk-QMZ5A6FQ.js → chunk-56IIVAEO.js} +2 -2
- package/dist/chunk-5D2ALSM5.js +19 -0
- package/dist/chunk-5D2ALSM5.js.map +1 -0
- package/dist/{chunk-FHHYCBBP.js → chunk-5DRROK5W.js} +2 -2
- package/dist/{chunk-GTNRMJYH.js → chunk-5GQEU4DN.js} +2 -2
- package/dist/{chunk-YQQPNXNO.js → chunk-6L3DKWRY.js} +6 -6
- package/dist/chunk-6LJY7X5A.js +18 -0
- package/dist/chunk-6LJY7X5A.js.map +1 -0
- package/dist/{chunk-M6QA2KK2.js → chunk-6M2I3DKF.js} +2 -2
- package/dist/{chunk-FTCGEUOY.js → chunk-6R6Q3MRN.js} +7 -7
- package/dist/{chunk-ZUDAK436.js → chunk-6UBZ6I5Z.js} +2 -2
- package/dist/{chunk-SEU6QHH4.js → chunk-6ZNSB3H6.js} +5 -17
- package/dist/chunk-6ZNSB3H6.js.map +1 -0
- package/dist/chunk-AFHQATY4.js +47 -0
- package/dist/chunk-AFHQATY4.js.map +1 -0
- package/dist/{chunk-7U6AB7DZ.js → chunk-AKKRXT23.js} +2 -2
- package/dist/{chunk-2PDBYF2O.js → chunk-AT2JJEKJ.js} +4 -4
- package/dist/chunk-AT2JJEKJ.js.map +1 -0
- package/dist/{chunk-OWLZONGX.js → chunk-BLBAQRBM.js} +2 -2
- package/dist/{chunk-QBOQI6PG.js → chunk-BN4HRYAZ.js} +2 -2
- package/dist/{chunk-QVGEVZ5F.js → chunk-BQ6DHN4I.js} +3 -3
- package/dist/{chunk-GP54LU5N.js → chunk-BYFXLDVV.js} +9 -9
- package/dist/{chunk-FIP7KI2P.js → chunk-C25JXSOR.js} +337 -21
- package/dist/chunk-C25JXSOR.js.map +1 -0
- package/dist/chunk-CADUYBQD.js +151 -0
- package/dist/chunk-CADUYBQD.js.map +1 -0
- package/dist/{chunk-HAPY7WFP.js → chunk-CCDP6EPB.js} +13 -355
- package/dist/chunk-CCDP6EPB.js.map +1 -0
- package/dist/{chunk-QRHEAZ2Q.js → chunk-CUZLNGD5.js} +1 -1
- package/dist/{chunk-YXIVUWDU.js → chunk-DGBIHDVK.js} +5 -5
- package/dist/chunk-DSDXAKIP.js +50 -0
- package/dist/chunk-DSDXAKIP.js.map +1 -0
- package/dist/{chunk-QZJEYZ4I.js → chunk-DZAF24PG.js} +5 -5
- package/dist/chunk-DZFQVICS.js +23 -0
- package/dist/chunk-DZFQVICS.js.map +1 -0
- package/dist/chunk-E23UGFVC.js +63 -0
- package/dist/chunk-E23UGFVC.js.map +1 -0
- package/dist/{chunk-X3MWEFPT.js → chunk-EBKCYQ2D.js} +14 -14
- package/dist/chunk-EBKCYQ2D.js.map +1 -0
- package/dist/chunk-EP5L47XV.js +22 -0
- package/dist/chunk-EP5L47XV.js.map +1 -0
- package/dist/{chunk-TMR64XPL.js → chunk-EZNTORXE.js} +2 -2
- package/dist/{chunk-JAMDDLIM.js → chunk-FMNU7IUG.js} +3 -3
- package/dist/{chunk-YXZNGHID.js → chunk-FO6RNKKW.js} +8 -46
- package/dist/chunk-FO6RNKKW.js.map +1 -0
- package/dist/{chunk-YMUGBZN2.js → chunk-FQ5CHJR7.js} +1 -1
- package/dist/chunk-FQ5CHJR7.js.map +1 -0
- package/dist/{chunk-YZN6NRTR.js → chunk-FRMW23UK.js} +13 -11
- package/dist/chunk-FRMW23UK.js.map +1 -0
- package/dist/chunk-GJW4HX2O.js +1 -0
- package/dist/{chunk-7BIJS6II.js → chunk-GP3UWP22.js} +4 -4
- package/dist/{chunk-YTW6ZIPD.js → chunk-GZACYEOB.js} +1 -1
- package/dist/chunk-GZACYEOB.js.map +1 -0
- package/dist/{chunk-JIHH26WQ.js → chunk-HFUAFR6B.js} +6 -6
- package/dist/{chunk-J5TEU77Q.js → chunk-IF6WNGAK.js} +59 -4
- package/dist/chunk-IF6WNGAK.js.map +1 -0
- package/dist/{chunk-ZX5FNWH7.js → chunk-IG6KUWBX.js} +2 -2
- package/dist/chunk-IG6KUWBX.js.map +1 -0
- package/dist/{chunk-CKUYQO2P.js → chunk-IMRB2C4O.js} +7 -5
- package/dist/chunk-IMRB2C4O.js.map +1 -0
- package/dist/{chunk-RWW3I3PO.js → chunk-ISRKW4YN.js} +3 -3
- package/dist/{chunk-P4NUJVWL.js → chunk-IXNCZTWA.js} +2 -2
- package/dist/{chunk-YFFEF6HR.js → chunk-JIDLU57U.js} +3 -3
- package/dist/{chunk-PTT2NB46.js → chunk-JYJFGD2H.js} +2 -2
- package/dist/{chunk-3OWYOECI.js → chunk-JYV4JJV2.js} +5 -5
- package/dist/{chunk-OGVE4IJW.js → chunk-KBPU5M2E.js} +7 -7
- package/dist/{chunk-I2XEBEEF.js → chunk-KFRPNHWR.js} +4 -4
- package/dist/chunk-KFRPNHWR.js.map +1 -0
- package/dist/{chunk-3LJYHE7S.js → chunk-KPXM4WO6.js} +64 -57
- package/dist/chunk-KPXM4WO6.js.map +1 -0
- package/dist/{chunk-QMMOMBH6.js → chunk-KRCBZYTZ.js} +26 -177
- package/dist/chunk-KRCBZYTZ.js.map +1 -0
- package/dist/{chunk-UTEATWHO.js → chunk-KW42W6SV.js} +6 -6
- package/dist/{chunk-BY5YBSXA.js → chunk-L3YYLT4E.js} +15 -2
- package/dist/chunk-L3YYLT4E.js.map +1 -0
- package/dist/{chunk-UVBHM7AK.js → chunk-MANUDU7I.js} +6 -6
- package/dist/{chunk-YJ3TREAC.js → chunk-MHMLXJ3I.js} +2 -2
- package/dist/chunk-MHMLXJ3I.js.map +1 -0
- package/dist/{chunk-D4LAJ737.js → chunk-MSMJJB4J.js} +2 -2
- package/dist/chunk-MSMJJB4J.js.map +1 -0
- package/dist/{chunk-DYZ5CCVM.js → chunk-MXUT7FTE.js} +2 -2
- package/dist/chunk-MXUT7FTE.js.map +1 -0
- package/dist/{chunk-7ICV4ASA.js → chunk-N5PLUFH2.js} +27 -5
- package/dist/chunk-N5PLUFH2.js.map +1 -0
- package/dist/{chunk-K7BADAOS.js → chunk-NEX7JCMO.js} +4 -4
- package/dist/{chunk-5HSSTOOG.js → chunk-NFZGZ4AK.js} +2 -2
- package/dist/{chunk-XUFAFHQM.js → chunk-NJ4DYYO5.js} +7 -4
- package/dist/chunk-NJ4DYYO5.js.map +1 -0
- package/dist/{chunk-VEGQYPCP.js → chunk-NQSO4UAH.js} +8 -8
- package/dist/chunk-NQSO4UAH.js.map +1 -0
- package/dist/{chunk-GHEMAVTN.js → chunk-NYEFP7DY.js} +4 -4
- package/dist/chunk-NYEFP7DY.js.map +1 -0
- package/dist/{chunk-S4YERMGJ.js → chunk-OBPVWOSQ.js} +4 -4
- package/dist/{chunk-OHV6T5JB.js → chunk-OLIWCCFM.js} +2 -5
- package/dist/{chunk-2CRZOVDI.js → chunk-OLSARBZU.js} +2 -2
- package/dist/chunk-PEOZ34EM.js +13 -0
- package/dist/chunk-PEOZ34EM.js.map +1 -0
- package/dist/{chunk-KJTIAECI.js → chunk-PT4XLP6I.js} +171 -12
- package/dist/chunk-PT4XLP6I.js.map +1 -0
- package/dist/{chunk-LC7DSMHR.js → chunk-PTHKZWEH.js} +2 -14
- package/dist/{chunk-LC7DSMHR.js.map → chunk-PTHKZWEH.js.map} +1 -1
- package/dist/chunk-PVEWA2DU.js +23 -0
- package/dist/chunk-PVEWA2DU.js.map +1 -0
- package/dist/chunk-QADFHRQM.js +367 -0
- package/dist/chunk-QADFHRQM.js.map +1 -0
- package/dist/{chunk-7LP7FFJ2.js → chunk-QD46HPZG.js} +2 -2
- package/dist/{chunk-G4MFQXYX.js → chunk-QJNCB5SK.js} +2 -2
- package/dist/{chunk-6SYOHUHM.js → chunk-QZWTRENR.js} +2 -2
- package/dist/chunk-QZWTRENR.js.map +1 -0
- package/dist/{chunk-TSNRZSRC.js → chunk-RO5NM6UI.js} +2 -2
- package/dist/chunk-RO5NM6UI.js.map +1 -0
- package/dist/{chunk-GEEJPID6.js → chunk-RZPOZPZU.js} +8 -8
- package/dist/chunk-SGDPRCC4.js +1075 -0
- package/dist/chunk-SGDPRCC4.js.map +1 -0
- package/dist/{chunk-YCAJDK4O.js → chunk-SGQ4N5FS.js} +5 -5
- package/dist/{chunk-522MBPE5.js → chunk-SHEEBRZ4.js} +2 -2
- package/dist/{chunk-YWZEDG7F.js → chunk-SHYIA73K.js} +6 -6
- package/dist/{chunk-L2CAWCQL.js → chunk-SKM35Y4Q.js} +17 -26
- package/dist/chunk-SKM35Y4Q.js.map +1 -0
- package/dist/chunk-SMY5X46Z.js +14 -0
- package/dist/chunk-SMY5X46Z.js.map +1 -0
- package/dist/{chunk-K4BWPNJO.js → chunk-TE6LH6J2.js} +5 -5
- package/dist/{chunk-AFAPBZAA.js → chunk-TG634KCO.js} +11 -2
- package/dist/chunk-TG634KCO.js.map +1 -0
- package/dist/{chunk-V5JUAW4M.js → chunk-TIVK6PRK.js} +9 -10
- package/dist/chunk-TIVK6PRK.js.map +1 -0
- package/dist/{chunk-JN3SGXJE.js → chunk-UADPR6F4.js} +3 -3
- package/dist/{chunk-JN3SGXJE.js.map → chunk-UADPR6F4.js.map} +1 -1
- package/dist/{chunk-SBOHNJUD.js → chunk-V6UQZA2H.js} +2 -2
- package/dist/chunk-VG2ZSFYD.js +32 -0
- package/dist/chunk-VG2ZSFYD.js.map +1 -0
- package/dist/{chunk-SC4JLMZI.js → chunk-VH6SOCXH.js} +2 -2
- package/dist/chunk-VKQCVU2Z.js +21 -0
- package/dist/chunk-VKQCVU2Z.js.map +1 -0
- package/dist/chunk-VSRSQ2CR.js +654 -0
- package/dist/chunk-VSRSQ2CR.js.map +1 -0
- package/dist/{chunk-WQN5SM7P.js → chunk-W3G5REIU.js} +2 -2
- package/dist/{chunk-EGU4PWQW.js → chunk-W66AM5IB.js} +2 -2
- package/dist/chunk-W66AM5IB.js.map +1 -0
- package/dist/{chunk-HQKRZIX6.js → chunk-WBKZUO5V.js} +26 -43
- package/dist/chunk-WBKZUO5V.js.map +1 -0
- package/dist/{chunk-OMSKGLYA.js → chunk-WO4T4OD5.js} +2 -2
- package/dist/{chunk-6RPWILRH.js → chunk-WZ3NCMK6.js} +6 -5
- package/dist/{chunk-BAAUFCJK.js → chunk-X4MVWPHV.js} +3 -3
- package/dist/{chunk-R2N37AA6.js → chunk-XIDQKFZF.js} +3 -3
- package/dist/{chunk-EEZCB74X.js → chunk-XOBHRD2M.js} +575 -651
- package/dist/chunk-XOBHRD2M.js.map +1 -0
- package/dist/chunk-XZHEOSQ2.js +16 -0
- package/dist/chunk-XZHEOSQ2.js.map +1 -0
- package/dist/chunk-Y2NBBT6K.js +18 -0
- package/dist/chunk-Y2NBBT6K.js.map +1 -0
- package/dist/{chunk-OWOT7CFC.js → chunk-Y6B6HVKC.js} +2 -2
- package/dist/{chunk-5ATANZSW.js → chunk-Y6VZQGGH.js} +6 -6
- package/dist/chunk-YMUFFJCO.js +23 -0
- package/dist/chunk-YMUFFJCO.js.map +1 -0
- package/dist/{chunk-YZNKFYDC.js → chunk-ZFUFAHZ3.js} +4 -4
- package/dist/{chunk-PWWWMRT7.js → chunk-ZTLOXFPB.js} +2 -2
- package/dist/chunk-ZTLOXFPB.js.map +1 -0
- package/dist/{walk-E3OVLBFR.js → chunk-ZWBKDKXC.js} +4 -13
- package/dist/{walk-E3OVLBFR.js.map → chunk-ZWBKDKXC.js.map} +1 -1
- package/dist/classified/index.js +5 -5
- package/dist/{classified-marker-52P3D72W.js → classified-marker-EOOSMWFC.js} +3 -3
- package/dist/collection-facade-TTRF5NFJ.js +45 -0
- package/dist/{computed-33DRJDOC.js → computed-AB45PS4V.js} +3 -3
- package/dist/consent/index.js +13 -9
- package/dist/consent/index.js.map +1 -1
- package/dist/{cover-5BSNJREH.js → cover/index.js} +7 -6
- package/dist/crdt/index.js +4 -0
- package/dist/crdt/index.js.map +1 -1
- package/dist/custody/index.js +26 -0
- package/dist/{dead-filter-JXVCKS6W.js → dead-filter-6DYY7S64.js} +2 -2
- package/dist/{chunk-ILM6X6CP.js → delegation-ONOZVPIP.js} +12 -6
- package/dist/{chunk-ILM6X6CP.js.map → delegation-ONOZVPIP.js.map} +1 -1
- package/dist/derivations/index.js +12 -12
- package/dist/derive-IGGVSUPH.js +22 -0
- package/dist/directory/index.js +46 -0
- package/dist/{dispatch-PKQQFDBT.js → dispatch-7T45NN7C.js} +19 -18
- package/dist/{dispatch-PKQQFDBT.js.map → dispatch-7T45NN7C.js.map} +1 -1
- package/dist/{dispatch-SMXUO7W5.js → dispatch-RPTLK7LJ.js} +5 -5
- package/dist/{enclave-I5H3GINP.js → enclave-CLJVSDFG.js} +9 -9
- package/dist/executor-IEBLTBCW.js +9 -0
- package/dist/executor-RM7XWQDU.js +9 -0
- package/dist/executor-XZYM4KHT.js +28 -0
- package/dist/export-accessible-24XCCD3A.js +23 -0
- package/dist/extract-partition-H2TPEEOF.js +38 -0
- package/dist/{fanout-sidecar-WWXVHHUH.js → fanout-sidecar-TV7CXAJ6.js} +9 -9
- package/dist/find-OZMTRIK3.js +11 -0
- package/dist/forget/index.js +11 -11
- package/dist/forget/index.js.map +1 -1
- package/dist/guards/index.js +4 -4
- package/dist/history/index.js +16 -12
- package/dist/history/index.js.map +1 -1
- package/dist/i18n/index.js +16 -14
- package/dist/i18n/index.js.map +1 -1
- package/dist/index.d.ts +18 -24
- package/dist/index.js +212 -2045
- package/dist/index.js.map +1 -1
- package/dist/indexing/index.js +4 -2
- package/dist/indexing/index.js.map +1 -1
- package/dist/introspection/index.js +28 -0
- package/dist/issue-55HJE7JF.js +19 -0
- package/dist/kernel/collection-config.d.ts +1 -1
- package/dist/kernel/collection.d.ts +2 -2
- package/dist/kernel/errors.d.ts +2 -2
- package/dist/kernel/lazy.d.ts +30 -0
- package/dist/kernel/noydb.d.ts +22 -11
- package/dist/kernel/query/builder.d.ts +10 -10
- package/dist/kernel/query/index.d.ts +0 -6
- package/dist/kernel/query/scan-builder.d.ts +4 -4
- package/dist/kernel/types.d.ts +25 -25
- package/dist/kernel/vault.d.ts +10 -10
- package/dist/{ledger-M2BKCNVS.js → ledger-XY6NP3J2.js} +11 -11
- package/dist/liberate-LXOJ2EMB.js +24 -0
- package/dist/{link-set-ZU4E5J5S.js → link-set-POQB7BU5.js} +11 -11
- package/dist/materialized-views/index.js +22 -19
- package/dist/money/index.js +31 -0
- package/dist/noydb-KXS35UJS.js +82 -0
- package/dist/overlay-views/index.js +4 -4
- package/dist/periods/index.js +15 -13
- package/dist/pod/index.js +11 -12
- package/dist/{policy-IY2YEA3A.js → policy/index.js} +6 -6
- package/dist/port/with/blob-strategy.d.ts +15 -5
- package/dist/port/with/collection-registries.d.ts +62 -0
- package/dist/port/with/strategies.d.ts +11 -11
- package/dist/port/with/team-strategy.d.ts +2 -1
- package/dist/portability/index.js +8 -8
- package/dist/{post-register-XIAHB6KF.js → post-register-URQANI3B.js} +6 -6
- package/dist/query/index.js +6 -46
- package/dist/{aggregate → reduce}/index.js +24 -17
- package/dist/reduce/index.js.map +1 -0
- package/dist/register-5W6CG4RM.js +25 -0
- package/dist/registry-7Y5WF7GS.js +9 -0
- package/dist/{registry-VW6P6A3J.js → registry-BWD2ED52.js} +2 -2
- package/dist/registry-MCSGBZXI.js +18 -0
- package/dist/registry-UJFP3NWF.js +19 -0
- package/dist/request-withdrawal-IWYDM4SO.js +31 -0
- package/dist/{reveal-VWXRV2XU.js → reveal-BXZGWIOP.js} +6 -6
- package/dist/revoke-TINYPHYY.js +24 -0
- package/dist/satellites/index.js +1 -1
- package/dist/schema-update/index.js +26 -0
- package/dist/sealed-record/index.js +12 -12
- package/dist/search/index.js +36 -0
- package/dist/{seed-CDBFOTIK.js → seed-F7YYQTRC.js} +11 -11
- package/dist/sequence/index.js +30 -0
- package/dist/session/index.js +13 -9
- package/dist/session/index.js.map +1 -1
- package/dist/shadow/index.js +6 -2
- package/dist/shadow/index.js.map +1 -1
- package/dist/signer-WMZKCNKC.js +25 -0
- package/dist/snapshots/index.js +14 -10
- package/dist/snapshots/index.js.map +1 -1
- package/dist/{stale-NBROTA66.js → stale-JOE7GBAE.js} +11 -10
- package/dist/storage-B3WBKXKT.js +23 -0
- package/dist/store/index.js +22 -0
- package/dist/{store-coordination-provider-P3IU5JHD.js → store-coordination-provider-5LX2UFU2.js} +3 -3
- package/dist/sync/index.js +14 -10
- package/dist/sync/index.js.map +1 -1
- package/dist/team/index.js +36 -29
- package/dist/tiers/index.js +10 -10
- package/dist/to/index.js +1 -1
- package/dist/{tx → transactions}/index.js +7 -3
- package/dist/transactions/index.js.map +1 -0
- package/dist/util/index.js +1 -1
- package/dist/{verify-5X37OXRY.js → verify-7XWHJWUN.js} +5 -5
- package/dist/via/blob/active.d.ts +7 -18
- package/dist/via/blob/binding.d.ts +1 -1
- package/dist/via/blob/index.d.ts +4 -2
- package/dist/via/i18n/core.d.ts +1 -1
- package/dist/via/i18n/index.d.ts +2 -0
- package/dist/via/money/money-reducer.d.ts +2 -2
- package/dist/walk-6OHAWGBS.js +21 -0
- package/dist/with-audit/consent/index.d.ts +2 -0
- package/dist/with-audit/forget/active.d.ts +3 -3
- package/dist/with-audit/forget/index.d.ts +4 -4
- package/dist/with-audit/forget/strategy.d.ts +3 -3
- package/dist/with-audit/guards/executor.d.ts +4 -4
- package/dist/with-audit/guards/immutable-guard.d.ts +3 -3
- package/dist/with-audit/guards/index.d.ts +1 -1
- package/dist/with-audit/guards/registry.d.ts +3 -3
- package/dist/with-audit/guards/transition-guard.d.ts +3 -3
- package/dist/with-audit/guards/types.d.ts +10 -10
- package/dist/with-audit/guards/with-guard.d.ts +2 -2
- package/dist/with-audit/periods/index.d.ts +2 -0
- package/dist/with-cargo/floor.d.ts +3 -3
- package/dist/with-commit/crdt/index.d.ts +2 -0
- package/dist/with-commit/history/index.d.ts +2 -0
- package/dist/with-commit/numbering/descriptor.d.ts +16 -6
- package/dist/with-commit/tx/active.d.ts +5 -5
- package/dist/with-commit/tx/index.d.ts +2 -2
- package/dist/with-commit/tx/invariants.d.ts +1 -1
- package/dist/with-commit/tx/strategy.d.ts +3 -3
- package/dist/with-fork/shadow/index.d.ts +2 -0
- package/dist/with-fork/snapshots/active.d.ts +2 -2
- package/dist/with-fork/snapshots/index.d.ts +3 -1
- package/dist/with-fork/snapshots/noydb-facade.d.ts +3 -3
- package/dist/with-fork/snapshots/strategy.d.ts +2 -2
- package/dist/with-formula/derivations/executor.d.ts +2 -2
- package/dist/with-formula/derivations/index.d.ts +2 -1
- package/dist/with-formula/derivations/registry.d.ts +3 -3
- package/dist/with-formula/derivations/stale.d.ts +2 -2
- package/dist/with-formula/derivations/types.d.ts +3 -3
- package/dist/with-formula/derivations/with-derivation.d.ts +2 -2
- package/dist/with-formula/derivations/with-rollup.d.ts +15 -8
- package/dist/with-formula/materialized-views/dependency-analyzer.d.ts +3 -3
- package/dist/with-formula/materialized-views/index.d.ts +1 -1
- package/dist/with-formula/materialized-views/registry.d.ts +4 -4
- package/dist/with-formula/materialized-views/types.d.ts +11 -11
- package/dist/with-formula/materialized-views/with-materialized-view.d.ts +2 -2
- package/dist/with-formula/overlay-views/index.d.ts +1 -1
- package/dist/with-formula/overlay-views/registry.d.ts +4 -4
- package/dist/with-formula/overlay-views/types.d.ts +3 -3
- package/dist/with-formula/overlay-views/virtual-collection.d.ts +2 -2
- package/dist/with-formula/overlay-views/with-overlayed-view.d.ts +2 -2
- package/dist/with-lookup/indexing/active.d.ts +5 -5
- package/dist/with-lookup/indexing/index.d.ts +3 -1
- package/dist/with-lookup/indexing/strategy.d.ts +3 -3
- package/dist/with-lookup/{aggregate → reduce}/active.d.ts +8 -8
- package/dist/with-lookup/{aggregate → reduce}/groupby.d.ts +21 -21
- package/dist/with-lookup/reduce/index.d.ts +34 -0
- package/dist/with-lookup/{aggregate → reduce}/reducers.d.ts +10 -10
- package/dist/with-lookup/{aggregate/aggregation.d.ts → reduce/reduction.d.ts} +21 -21
- package/dist/with-lookup/{aggregate → reduce}/strategy.d.ts +15 -15
- package/dist/with-lookup/search/build-docs.d.ts +7 -2
- package/dist/with-lookup/search/index.d.ts +1 -1
- package/dist/with-party/directory/cover/index.d.ts +1 -0
- package/dist/with-party/directory/index.d.ts +2 -0
- package/dist/with-party/session/index.d.ts +2 -0
- package/dist/with-party/sync/index.d.ts +2 -0
- package/dist/with-party/team/index.d.ts +2 -0
- package/dist/with-party/team/keyring.d.ts +68 -20
- package/dist/with-party/team/noydb-facade.d.ts +2 -1
- package/dist/with-shape/blobs/blob-set.d.ts +1 -1
- package/dist/with-shape/introspection/index.d.ts +6 -0
- package/dist/with-shape/schema-update/index.d.ts +1 -0
- package/dist/with-store/index.d.ts +3 -2
- package/dist/withdraw-accessible-DEUCOO4F.js +28 -0
- package/dist/withdraw-accessible-DEUCOO4F.js.map +1 -0
- package/package.json +42 -30
- package/dist/aggregate/index.js.map +0 -1
- package/dist/api-22ES33N3.js +0 -20
- package/dist/as/index.js +0 -30
- package/dist/at/index.js +0 -1
- package/dist/by/index.js +0 -11
- package/dist/chunk-2PDBYF2O.js.map +0 -1
- package/dist/chunk-2YELV6TV.js +0 -1
- package/dist/chunk-3LJYHE7S.js.map +0 -1
- package/dist/chunk-6SYOHUHM.js.map +0 -1
- package/dist/chunk-7ICV4ASA.js.map +0 -1
- package/dist/chunk-AFAPBZAA.js.map +0 -1
- package/dist/chunk-BY5YBSXA.js.map +0 -1
- package/dist/chunk-CJVEAVYH.js +0 -205
- package/dist/chunk-CJVEAVYH.js.map +0 -1
- package/dist/chunk-CKUYQO2P.js.map +0 -1
- package/dist/chunk-D4LAJ737.js.map +0 -1
- package/dist/chunk-DYZ5CCVM.js.map +0 -1
- package/dist/chunk-EEZCB74X.js.map +0 -1
- package/dist/chunk-EGU4PWQW.js.map +0 -1
- package/dist/chunk-FIP7KI2P.js.map +0 -1
- package/dist/chunk-GHEMAVTN.js.map +0 -1
- package/dist/chunk-HAPY7WFP.js.map +0 -1
- package/dist/chunk-HQKRZIX6.js.map +0 -1
- package/dist/chunk-I2XEBEEF.js.map +0 -1
- package/dist/chunk-IGLU4ME7.js +0 -255
- package/dist/chunk-IGLU4ME7.js.map +0 -1
- package/dist/chunk-J5TEU77Q.js.map +0 -1
- package/dist/chunk-KJTIAECI.js.map +0 -1
- package/dist/chunk-L2CAWCQL.js.map +0 -1
- package/dist/chunk-LB7FD65R.js +0 -163
- package/dist/chunk-LB7FD65R.js.map +0 -1
- package/dist/chunk-PWWWMRT7.js.map +0 -1
- package/dist/chunk-QMMOMBH6.js.map +0 -1
- package/dist/chunk-SEU6QHH4.js.map +0 -1
- package/dist/chunk-TNATF3HB.js.map +0 -1
- package/dist/chunk-TSNRZSRC.js.map +0 -1
- package/dist/chunk-V5JUAW4M.js.map +0 -1
- package/dist/chunk-VEGQYPCP.js.map +0 -1
- package/dist/chunk-X3MWEFPT.js.map +0 -1
- package/dist/chunk-XUFAFHQM.js.map +0 -1
- package/dist/chunk-YJ3TREAC.js.map +0 -1
- package/dist/chunk-YMUGBZN2.js.map +0 -1
- package/dist/chunk-YTW6ZIPD.js.map +0 -1
- package/dist/chunk-YXZNGHID.js.map +0 -1
- package/dist/chunk-YZN6NRTR.js.map +0 -1
- package/dist/chunk-ZX5FNWH7.js.map +0 -1
- package/dist/collection-facade-XKCFHSLR.js +0 -44
- package/dist/delegation-WWZPEDK2.js +0 -25
- package/dist/derive-CWWFEQ4N.js +0 -21
- package/dist/executor-FCJEH3FU.js +0 -9
- package/dist/executor-OHET7TF7.js +0 -9
- package/dist/executor-SHYLIBOM.js +0 -26
- package/dist/export-accessible-FBL6TDSK.js +0 -23
- package/dist/extract-partition-ZYIRYMTI.js +0 -38
- package/dist/find-LEBUXVL7.js +0 -11
- package/dist/in/index.js +0 -1
- package/dist/issue-F76PAGIR.js +0 -19
- package/dist/liberate-ZP7UB57K.js +0 -24
- package/dist/noydb-BNDGEK5X.js +0 -71
- package/dist/on/index.js +0 -17
- package/dist/port/as/index.d.ts +0 -26
- package/dist/port/at/index.d.ts +0 -18
- package/dist/port/in/index.d.ts +0 -21
- package/dist/port/on/index.d.ts +0 -27
- package/dist/port/ui/index.d.ts +0 -21
- package/dist/port/with/index.d.ts +0 -18
- package/dist/register-HB4TQZSV.js +0 -23
- package/dist/registry-6BMBFEXT.js +0 -19
- package/dist/registry-7CZWF3EQ.js +0 -9
- package/dist/registry-JOFO7RAH.js +0 -18
- package/dist/request-withdrawal-UN3TRHWI.js +0 -31
- package/dist/revoke-OLO2OVR7.js +0 -24
- package/dist/signer-MGGKPYAN.js +0 -25
- package/dist/storage-3R37QZLA.js +0 -23
- package/dist/tx/index.js.map +0 -1
- package/dist/ui/index.js +0 -1
- package/dist/with/index.js +0 -31
- package/dist/with-lookup/aggregate/index.d.ts +0 -23
- package/dist/withdraw-accessible-Q2EMATCU.js +0 -28
- /package/dist/{api-22ES33N3.js.map → api-3NKVNZPM.js.map} +0 -0
- /package/dist/{backup-YCHAC575.js.map → backup-PTSVXDDW.js.map} +0 -0
- /package/dist/{chunk-5WLDZZ6S.js.map → chunk-35NMVJ7I.js.map} +0 -0
- /package/dist/{chunk-TNJVDG2B.js.map → chunk-3XKESW5E.js.map} +0 -0
- /package/dist/{chunk-MUPZ6IZX.js.map → chunk-4JQK3L4V.js.map} +0 -0
- /package/dist/{chunk-Z4D3YGAB.js.map → chunk-4ZKNC6A6.js.map} +0 -0
- /package/dist/{chunk-ONB627HU.js.map → chunk-55LX6FSX.js.map} +0 -0
- /package/dist/{chunk-QMZ5A6FQ.js.map → chunk-56IIVAEO.js.map} +0 -0
- /package/dist/{chunk-FHHYCBBP.js.map → chunk-5DRROK5W.js.map} +0 -0
- /package/dist/{chunk-GTNRMJYH.js.map → chunk-5GQEU4DN.js.map} +0 -0
- /package/dist/{chunk-YQQPNXNO.js.map → chunk-6L3DKWRY.js.map} +0 -0
- /package/dist/{chunk-M6QA2KK2.js.map → chunk-6M2I3DKF.js.map} +0 -0
- /package/dist/{chunk-FTCGEUOY.js.map → chunk-6R6Q3MRN.js.map} +0 -0
- /package/dist/{chunk-ZUDAK436.js.map → chunk-6UBZ6I5Z.js.map} +0 -0
- /package/dist/{chunk-7U6AB7DZ.js.map → chunk-AKKRXT23.js.map} +0 -0
- /package/dist/{chunk-OWLZONGX.js.map → chunk-BLBAQRBM.js.map} +0 -0
- /package/dist/{chunk-QBOQI6PG.js.map → chunk-BN4HRYAZ.js.map} +0 -0
- /package/dist/{chunk-QVGEVZ5F.js.map → chunk-BQ6DHN4I.js.map} +0 -0
- /package/dist/{chunk-GP54LU5N.js.map → chunk-BYFXLDVV.js.map} +0 -0
- /package/dist/{chunk-QRHEAZ2Q.js.map → chunk-CUZLNGD5.js.map} +0 -0
- /package/dist/{chunk-YXIVUWDU.js.map → chunk-DGBIHDVK.js.map} +0 -0
- /package/dist/{chunk-QZJEYZ4I.js.map → chunk-DZAF24PG.js.map} +0 -0
- /package/dist/{chunk-TMR64XPL.js.map → chunk-EZNTORXE.js.map} +0 -0
- /package/dist/{chunk-JAMDDLIM.js.map → chunk-FMNU7IUG.js.map} +0 -0
- /package/dist/{as/index.js.map → chunk-GJW4HX2O.js.map} +0 -0
- /package/dist/{chunk-7BIJS6II.js.map → chunk-GP3UWP22.js.map} +0 -0
- /package/dist/{chunk-JIHH26WQ.js.map → chunk-HFUAFR6B.js.map} +0 -0
- /package/dist/{chunk-RWW3I3PO.js.map → chunk-ISRKW4YN.js.map} +0 -0
- /package/dist/{chunk-P4NUJVWL.js.map → chunk-IXNCZTWA.js.map} +0 -0
- /package/dist/{chunk-YFFEF6HR.js.map → chunk-JIDLU57U.js.map} +0 -0
- /package/dist/{chunk-PTT2NB46.js.map → chunk-JYJFGD2H.js.map} +0 -0
- /package/dist/{chunk-3OWYOECI.js.map → chunk-JYV4JJV2.js.map} +0 -0
- /package/dist/{chunk-OGVE4IJW.js.map → chunk-KBPU5M2E.js.map} +0 -0
- /package/dist/{chunk-UTEATWHO.js.map → chunk-KW42W6SV.js.map} +0 -0
- /package/dist/{chunk-UVBHM7AK.js.map → chunk-MANUDU7I.js.map} +0 -0
- /package/dist/{chunk-K7BADAOS.js.map → chunk-NEX7JCMO.js.map} +0 -0
- /package/dist/{chunk-5HSSTOOG.js.map → chunk-NFZGZ4AK.js.map} +0 -0
- /package/dist/{chunk-S4YERMGJ.js.map → chunk-OBPVWOSQ.js.map} +0 -0
- /package/dist/{chunk-OHV6T5JB.js.map → chunk-OLIWCCFM.js.map} +0 -0
- /package/dist/{chunk-2CRZOVDI.js.map → chunk-OLSARBZU.js.map} +0 -0
- /package/dist/{chunk-7LP7FFJ2.js.map → chunk-QD46HPZG.js.map} +0 -0
- /package/dist/{chunk-G4MFQXYX.js.map → chunk-QJNCB5SK.js.map} +0 -0
- /package/dist/{chunk-GEEJPID6.js.map → chunk-RZPOZPZU.js.map} +0 -0
- /package/dist/{chunk-YCAJDK4O.js.map → chunk-SGQ4N5FS.js.map} +0 -0
- /package/dist/{chunk-522MBPE5.js.map → chunk-SHEEBRZ4.js.map} +0 -0
- /package/dist/{chunk-YWZEDG7F.js.map → chunk-SHYIA73K.js.map} +0 -0
- /package/dist/{chunk-K4BWPNJO.js.map → chunk-TE6LH6J2.js.map} +0 -0
- /package/dist/{chunk-SBOHNJUD.js.map → chunk-V6UQZA2H.js.map} +0 -0
- /package/dist/{chunk-SC4JLMZI.js.map → chunk-VH6SOCXH.js.map} +0 -0
- /package/dist/{chunk-WQN5SM7P.js.map → chunk-W3G5REIU.js.map} +0 -0
- /package/dist/{chunk-OMSKGLYA.js.map → chunk-WO4T4OD5.js.map} +0 -0
- /package/dist/{chunk-6RPWILRH.js.map → chunk-WZ3NCMK6.js.map} +0 -0
- /package/dist/{chunk-BAAUFCJK.js.map → chunk-X4MVWPHV.js.map} +0 -0
- /package/dist/{chunk-R2N37AA6.js.map → chunk-XIDQKFZF.js.map} +0 -0
- /package/dist/{chunk-OWOT7CFC.js.map → chunk-Y6B6HVKC.js.map} +0 -0
- /package/dist/{chunk-5ATANZSW.js.map → chunk-Y6VZQGGH.js.map} +0 -0
- /package/dist/{chunk-YZNKFYDC.js.map → chunk-ZFUFAHZ3.js.map} +0 -0
- /package/dist/{classified-marker-52P3D72W.js.map → classified-marker-EOOSMWFC.js.map} +0 -0
- /package/dist/{at/index.js.map → collection-facade-TTRF5NFJ.js.map} +0 -0
- /package/dist/{by/index.js.map → computed-AB45PS4V.js.map} +0 -0
- /package/dist/{in → cover}/index.js.map +0 -0
- /package/dist/{on → custody}/index.js.map +0 -0
- /package/dist/{dead-filter-JXVCKS6W.js.map → dead-filter-6DYY7S64.js.map} +0 -0
- /package/dist/{chunk-2YELV6TV.js.map → derive-IGGVSUPH.js.map} +0 -0
- /package/dist/{ui → directory}/index.js.map +0 -0
- /package/dist/{dispatch-SMXUO7W5.js.map → dispatch-RPTLK7LJ.js.map} +0 -0
- /package/dist/{collection-facade-XKCFHSLR.js.map → enclave-CLJVSDFG.js.map} +0 -0
- /package/dist/{computed-33DRJDOC.js.map → executor-IEBLTBCW.js.map} +0 -0
- /package/dist/{cover-5BSNJREH.js.map → executor-RM7XWQDU.js.map} +0 -0
- /package/dist/{delegation-WWZPEDK2.js.map → executor-XZYM4KHT.js.map} +0 -0
- /package/dist/{derive-CWWFEQ4N.js.map → export-accessible-24XCCD3A.js.map} +0 -0
- /package/dist/{enclave-I5H3GINP.js.map → extract-partition-H2TPEEOF.js.map} +0 -0
- /package/dist/{fanout-sidecar-WWXVHHUH.js.map → fanout-sidecar-TV7CXAJ6.js.map} +0 -0
- /package/dist/{executor-FCJEH3FU.js.map → find-OZMTRIK3.js.map} +0 -0
- /package/dist/{with → introspection}/index.js.map +0 -0
- /package/dist/{executor-OHET7TF7.js.map → issue-55HJE7JF.js.map} +0 -0
- /package/dist/{executor-SHYLIBOM.js.map → ledger-XY6NP3J2.js.map} +0 -0
- /package/dist/{export-accessible-FBL6TDSK.js.map → liberate-LXOJ2EMB.js.map} +0 -0
- /package/dist/{extract-partition-ZYIRYMTI.js.map → link-set-POQB7BU5.js.map} +0 -0
- /package/dist/{find-LEBUXVL7.js.map → money/index.js.map} +0 -0
- /package/dist/{issue-F76PAGIR.js.map → noydb-KXS35UJS.js.map} +0 -0
- /package/dist/{ledger-M2BKCNVS.js.map → policy/index.js.map} +0 -0
- /package/dist/{post-register-XIAHB6KF.js.map → post-register-URQANI3B.js.map} +0 -0
- /package/dist/{liberate-ZP7UB57K.js.map → register-5W6CG4RM.js.map} +0 -0
- /package/dist/{link-set-ZU4E5J5S.js.map → registry-7Y5WF7GS.js.map} +0 -0
- /package/dist/{noydb-BNDGEK5X.js.map → registry-BWD2ED52.js.map} +0 -0
- /package/dist/{policy-IY2YEA3A.js.map → registry-MCSGBZXI.js.map} +0 -0
- /package/dist/{register-HB4TQZSV.js.map → registry-UJFP3NWF.js.map} +0 -0
- /package/dist/{registry-6BMBFEXT.js.map → request-withdrawal-IWYDM4SO.js.map} +0 -0
- /package/dist/{reveal-VWXRV2XU.js.map → reveal-BXZGWIOP.js.map} +0 -0
- /package/dist/{registry-7CZWF3EQ.js.map → revoke-TINYPHYY.js.map} +0 -0
- /package/dist/{registry-JOFO7RAH.js.map → schema-update/index.js.map} +0 -0
- /package/dist/{registry-VW6P6A3J.js.map → search/index.js.map} +0 -0
- /package/dist/{seed-CDBFOTIK.js.map → seed-F7YYQTRC.js.map} +0 -0
- /package/dist/{request-withdrawal-UN3TRHWI.js.map → sequence/index.js.map} +0 -0
- /package/dist/{revoke-OLO2OVR7.js.map → signer-WMZKCNKC.js.map} +0 -0
- /package/dist/{signer-MGGKPYAN.js.map → stale-JOE7GBAE.js.map} +0 -0
- /package/dist/{stale-NBROTA66.js.map → storage-B3WBKXKT.js.map} +0 -0
- /package/dist/{storage-3R37QZLA.js.map → store/index.js.map} +0 -0
- /package/dist/{store-coordination-provider-P3IU5JHD.js.map → store-coordination-provider-5LX2UFU2.js.map} +0 -0
- /package/dist/{verify-5X37OXRY.js.map → verify-7XWHJWUN.js.map} +0 -0
- /package/dist/{withdraw-accessible-Q2EMATCU.js.map → walk-6OHAWGBS.js.map} +0 -0
- /package/dist/with-lookup/{aggregate → reduce}/canonical-key.d.ts +0 -0
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
* exactly like the generic reducers they replace.
|
|
23
23
|
*/
|
|
24
24
|
import type { MoneyDescriptor } from './descriptor.js';
|
|
25
|
-
import type {
|
|
25
|
+
import type { ReduceSpec } from '../../with-lookup/reduce/reduction.js';
|
|
26
26
|
export type FxRates = Record<string, number | string>;
|
|
27
27
|
/**
|
|
28
28
|
* Rewrite any `sum` / `min` / `max` reducer over a declared money field
|
|
@@ -30,4 +30,4 @@ export type FxRates = Record<string, number | string>;
|
|
|
30
30
|
* reducers over non-money fields) pass through unchanged. Returns a new
|
|
31
31
|
* spec; the input is not mutated.
|
|
32
32
|
*/
|
|
33
|
-
export declare function wrapMoneyReducers(spec:
|
|
33
|
+
export declare function wrapMoneyReducers(spec: ReduceSpec, moneyFields: Record<string, MoneyDescriptor>): ReduceSpec;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import {
|
|
2
|
+
dumpVaultSchema
|
|
3
|
+
} from "./chunk-ZWBKDKXC.js";
|
|
4
|
+
import "./chunk-VYYM3MEN.js";
|
|
5
|
+
import "./chunk-6ZNSB3H6.js";
|
|
6
|
+
import "./chunk-Y2NBBT6K.js";
|
|
7
|
+
import "./chunk-OBPVWOSQ.js";
|
|
8
|
+
import "./chunk-RZPOZPZU.js";
|
|
9
|
+
import "./chunk-VH6SOCXH.js";
|
|
10
|
+
import "./chunk-35NMVJ7I.js";
|
|
11
|
+
import "./chunk-NFZGZ4AK.js";
|
|
12
|
+
import "./chunk-QJNCB5SK.js";
|
|
13
|
+
import "./chunk-LP7BEXCT.js";
|
|
14
|
+
import "./chunk-AKKRXT23.js";
|
|
15
|
+
import "./chunk-GZACYEOB.js";
|
|
16
|
+
import "./chunk-QZWTRENR.js";
|
|
17
|
+
import "./chunk-PZ5AY32C.js";
|
|
18
|
+
export {
|
|
19
|
+
dumpVaultSchema
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=walk-6OHAWGBS.js.map
|
|
@@ -12,3 +12,5 @@ export { withConsent } from './active.js';
|
|
|
12
12
|
export type { ConsentStrategy } from './strategy.js';
|
|
13
13
|
export { CONSENT_AUDIT_COLLECTION, writeConsentEntry, loadConsentEntries, } from './consent.js';
|
|
14
14
|
export type { ConsentContext, ConsentOp, ConsentAuditEntry, ConsentAuditFilter, } from './consent.js';
|
|
15
|
+
/** The un-opted-in stub for this service — exported so callers can compare against it (#844). */
|
|
16
|
+
export { NO_CONSENT } from './strategy.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `
|
|
2
|
+
* `withForget` — the active factory for GDPR right-to-erasure via
|
|
3
3
|
* per-record CEK crypto-shred. Mirrors the canonical
|
|
4
4
|
* `strategy.ts` (type + `NO_FORGET` sentinel) / `active.ts` (factory) split
|
|
5
5
|
* used by the other services.
|
|
@@ -22,10 +22,10 @@ import type { SubjectDeclaration, ForgetStrategy } from './strategy.js';
|
|
|
22
22
|
* ```ts
|
|
23
23
|
* createNoydb({
|
|
24
24
|
* secret, user,
|
|
25
|
-
* forgetStrategy:
|
|
25
|
+
* forgetStrategy: withForget({ subjects: { invoices: 'buyerId' } }),
|
|
26
26
|
* })
|
|
27
27
|
* const result = await vault.forget('buyer-123')
|
|
28
28
|
* // → { subject, recordsShredded, historyVersionsShredded, collections, … }
|
|
29
29
|
* ```
|
|
30
30
|
*/
|
|
31
|
-
export declare function
|
|
31
|
+
export declare function withForget(opts: SubjectDeclaration): ForgetStrategy;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `@noy-db/hub/forget` — GDPR right-to-erasure via per-record CEK crypto-shred.
|
|
3
|
-
* Import `
|
|
3
|
+
* Import `withForget` and pass it to `createNoydb`:
|
|
4
4
|
*
|
|
5
5
|
* ```ts
|
|
6
6
|
* import { createNoydb } from '@noy-db/hub'
|
|
7
|
-
* import {
|
|
7
|
+
* import { withForget } from '@noy-db/hub/forget'
|
|
8
8
|
*
|
|
9
9
|
* const db = createNoydb({
|
|
10
10
|
* secret, user,
|
|
11
11
|
* historyStrategy: withHistory(), // ledger for the erasure proof
|
|
12
|
-
* forgetStrategy:
|
|
12
|
+
* forgetStrategy: withForget({ subjects: { invoices: 'buyerId' } }),
|
|
13
13
|
* })
|
|
14
14
|
* const vault = await db.openVault('main')
|
|
15
15
|
* const result = await vault.forget('buyer-123')
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
*
|
|
23
23
|
* @module
|
|
24
24
|
*/
|
|
25
|
-
export {
|
|
25
|
+
export { withForget } from './active.js';
|
|
26
26
|
export { NO_FORGET } from './strategy.js';
|
|
27
27
|
export type { SubjectDeclaration, ForgetStrategy, ForgetResult, ScopedPurgeResidueNotice, } from './strategy.js';
|
|
28
28
|
export type { SubjectRef } from './subject-index.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `
|
|
2
|
+
* `withForget` — declaration surface for GDPR right-to-erasure via
|
|
3
3
|
* per-record CEK crypto-shred.
|
|
4
4
|
*
|
|
5
5
|
* This file holds only the *declaration* shape and the disabled sentinel.
|
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
*/
|
|
19
19
|
import type { LedgerEntry } from '../../with-commit/history/ledger/entry.js';
|
|
20
20
|
/**
|
|
21
|
-
* User-supplied declaration passed to {@link
|
|
21
|
+
* User-supplied declaration passed to {@link withForget}. Maps a
|
|
22
22
|
* collection name to the record field (dotted path supported, e.g.
|
|
23
23
|
* `'billing.buyerId'`) that identifies the data subject for erasure.
|
|
24
24
|
*
|
|
25
25
|
* ```ts
|
|
26
|
-
*
|
|
26
|
+
* withForget({ subjects: { invoices: 'buyerId', contacts: 'id' } })
|
|
27
27
|
* ```
|
|
28
28
|
*/
|
|
29
29
|
export interface SubjectDeclaration {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { GuardSpec, GuardContext, GuardChange } from './types.js';
|
|
2
2
|
/**
|
|
3
|
-
* Pure functions that execute the work declared by a `
|
|
3
|
+
* Pure functions that execute the work declared by a `GuardSpec`.
|
|
4
4
|
* Stateless — `GuardRegistry` decides when to call these.
|
|
5
5
|
*
|
|
6
6
|
* @internal
|
|
@@ -17,10 +17,10 @@ export declare const GuardExecutor: {
|
|
|
17
17
|
* `existing[field]` vs `incoming[field]` would always look like a
|
|
18
18
|
* change even when the computed result is unchanged.
|
|
19
19
|
*/
|
|
20
|
-
checkFrozenFields<T extends Record<string, unknown>>(guard:
|
|
20
|
+
checkFrozenFields<T extends Record<string, unknown>>(guard: GuardSpec<T>, id: string, existing: T | null, incoming: T, skipFields?: ReadonlySet<string>): Promise<void>;
|
|
21
21
|
/**
|
|
22
22
|
* Run a single guard's invariant over its slice of the change-set.
|
|
23
23
|
* Any throw is converted to `InvariantError` unless it already is one.
|
|
24
24
|
*/
|
|
25
|
-
runInvariant<T extends Record<string, unknown>>(guard:
|
|
25
|
+
runInvariant<T extends Record<string, unknown>>(guard: GuardSpec<T>, changes: ReadonlyArray<GuardChange<T>>, ctx: GuardContext<T>): Promise<void>;
|
|
26
26
|
};
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
* ledgered by the guard amendment mechanism). `appendOnly: true` is
|
|
26
26
|
* shorthand for `after: () => true` — immutable from creation.
|
|
27
27
|
*/
|
|
28
|
-
import type {
|
|
28
|
+
import type { GuardStrategy, GuardContext, GuardChange } from './types.js';
|
|
29
29
|
export interface ImmutableGuardConfig<T extends Record<string, unknown>> {
|
|
30
30
|
/** The collection to make WORM. */
|
|
31
31
|
collection: string;
|
|
@@ -42,7 +42,7 @@ export interface ImmutableGuardConfig<T extends Record<string, unknown>> {
|
|
|
42
42
|
amendmentRoles?: ReadonlyArray<'admin' | 'owner'>;
|
|
43
43
|
/**
|
|
44
44
|
* Optional set-level invariant run over the amendment change-set after
|
|
45
|
-
* the writes execute. Signature matches `
|
|
45
|
+
* the writes execute. Signature matches `GuardSpec.amendment.invariant`
|
|
46
46
|
* exactly: it receives every {before, after} pair touching this
|
|
47
47
|
* collection in the amendment plus the guard context; throwing reverts
|
|
48
48
|
* the whole amendment and surfaces as `InvariantError`.
|
|
@@ -60,4 +60,4 @@ export interface ImmutableGuardConfig<T extends Record<string, unknown>> {
|
|
|
60
60
|
* Build an immutability guard. Pass the returned handle to
|
|
61
61
|
* `createNoydb({ guardStrategies: [...] })`.
|
|
62
62
|
*/
|
|
63
|
-
export declare function immutableGuard<T extends Record<string, unknown>>(config: ImmutableGuardConfig<T>):
|
|
63
|
+
export declare function immutableGuard<T extends Record<string, unknown>>(config: ImmutableGuardConfig<T>): GuardStrategy<T>;
|
|
@@ -6,5 +6,5 @@ export type { TransitionGuardConfig } from './transition-guard.js';
|
|
|
6
6
|
export { GuardRegistry } from './registry.js';
|
|
7
7
|
export { GuardExecutor } from './executor.js';
|
|
8
8
|
export { ReadOnlyVaultFacade } from './read-only-facade.js';
|
|
9
|
-
export type {
|
|
9
|
+
export type { GuardSpec, GuardStrategy, GuardContext, GuardChange, } from './types.js';
|
|
10
10
|
export { RecordLockedError, FieldFrozenError, IllegalTransitionError, InvariantError, AmendmentForbiddenError, } from '../../kernel/errors.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { GuardSpec, GuardContext, GuardChange } from './types.js';
|
|
2
2
|
/**
|
|
3
3
|
* Per-record metadata attached to every entry in an amendment's
|
|
4
4
|
* change-set. Carried in a parallel map alongside `_amendmentChanges`
|
|
@@ -20,14 +20,14 @@ export interface AmendmentChangeMeta {
|
|
|
20
20
|
*
|
|
21
21
|
* @internal
|
|
22
22
|
*/
|
|
23
|
-
type AnyGuard =
|
|
23
|
+
type AnyGuard = GuardSpec<Record<string, unknown>>;
|
|
24
24
|
type AnyChange = GuardChange<Record<string, unknown>>;
|
|
25
25
|
export declare class GuardRegistry {
|
|
26
26
|
private readonly _byCollection;
|
|
27
27
|
private _amendmentChanges;
|
|
28
28
|
private _amendmentMeta;
|
|
29
29
|
/** Register a guard. Multiple guards per collection are allowed. */
|
|
30
|
-
register<T extends Record<string, unknown>>(spec:
|
|
30
|
+
register<T extends Record<string, unknown>>(spec: GuardSpec<T>): void;
|
|
31
31
|
/** All guards registered against `collection` in registration order. */
|
|
32
32
|
guardsFor(collection: string): ReadonlyArray<AnyGuard>;
|
|
33
33
|
/** Per-collection guard counts, for introspection. */
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
*
|
|
43
43
|
* The status graph is caller-supplied data — no UI, no domain logic.
|
|
44
44
|
*/
|
|
45
|
-
import type {
|
|
45
|
+
import type { GuardStrategy, GuardContext, GuardChange } from './types.js';
|
|
46
46
|
export interface TransitionGuardConfig<T extends Record<string, unknown>> {
|
|
47
47
|
/** The collection whose state field is governed. */
|
|
48
48
|
collection: string;
|
|
@@ -68,7 +68,7 @@ export interface TransitionGuardConfig<T extends Record<string, unknown>> {
|
|
|
68
68
|
amendmentRoles?: ReadonlyArray<'admin' | 'owner'>;
|
|
69
69
|
/**
|
|
70
70
|
* Optional set-level invariant run over the amendment change-set after
|
|
71
|
-
* the writes execute. Signature matches `
|
|
71
|
+
* the writes execute. Signature matches `GuardSpec.amendment.invariant`
|
|
72
72
|
* exactly. When omitted the amendment is unconditionally allowed (the
|
|
73
73
|
* amendment itself is the sanctioned, ledgered override) — the
|
|
74
74
|
* backward-compatible default. Mirrors {@link immutableGuard}.
|
|
@@ -79,4 +79,4 @@ export interface TransitionGuardConfig<T extends Record<string, unknown>> {
|
|
|
79
79
|
* Build a state-machine transition guard. Pass the returned handle to
|
|
80
80
|
* `createNoydb({ guardStrategies: [...] })`.
|
|
81
81
|
*/
|
|
82
|
-
export declare function transitionGuard<T extends Record<string, unknown>>(config: TransitionGuardConfig<T>):
|
|
82
|
+
export declare function transitionGuard<T extends Record<string, unknown>>(config: TransitionGuardConfig<T>): GuardStrategy<T>;
|
|
@@ -36,16 +36,16 @@ export interface GuardChange<T> {
|
|
|
36
36
|
after: T;
|
|
37
37
|
}
|
|
38
38
|
/** @internal — output of {@link withGuard}. */
|
|
39
|
-
export interface
|
|
39
|
+
export interface GuardStrategy<T extends Record<string, unknown>> {
|
|
40
40
|
readonly __noydb_strategy: 'guard';
|
|
41
|
-
readonly spec:
|
|
41
|
+
readonly spec: GuardSpec<T>;
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
44
|
-
* Existential erasure of `
|
|
44
|
+
* Existential erasure of `GuardStrategy<T>` — used as the
|
|
45
45
|
* element type of `ReadonlyArray<>` fields where the per-handle T
|
|
46
46
|
* differs (e.g. `guardStrategies: [invoiceGuard, disbursementGuard]`).
|
|
47
47
|
*
|
|
48
|
-
* Background: `
|
|
48
|
+
* Background: `GuardStrategy<T>` is INVARIANT in T because T
|
|
49
49
|
* appears in callback positions on the spec (`check(incoming: T, ctx)`,
|
|
50
50
|
* `invariant(changes: ReadonlyArray<GuardChange<T>>, ctx)`). So
|
|
51
51
|
* `Handle<Invoice>` is not assignable to `Handle<Record<string, unknown>>`.
|
|
@@ -55,9 +55,9 @@ export interface GuardStrategyHandle<T extends Record<string, unknown>> {
|
|
|
55
55
|
* interface that ERASES T from both the discriminant and the spec.
|
|
56
56
|
*
|
|
57
57
|
* Consumers continue to construct typed handles via `withGuard<T>(...)`
|
|
58
|
-
* which returns `
|
|
59
|
-
* `Handle<Disbursement>` structurally assign to `
|
|
60
|
-
* so an array of them is `
|
|
58
|
+
* which returns `GuardStrategy<T>`. Both `Handle<Invoice>` and
|
|
59
|
+
* `Handle<Disbursement>` structurally assign to `GuardStrategyAny`,
|
|
60
|
+
* so an array of them is `GuardStrategyAny[]`.
|
|
61
61
|
*
|
|
62
62
|
* Internal code that needs T re-narrows via the runtime discriminant
|
|
63
63
|
* (`__noydb_strategy === 'guard'`) plus per-handle type information
|
|
@@ -69,12 +69,12 @@ export interface GuardStrategyHandle<T extends Record<string, unknown>> {
|
|
|
69
69
|
*
|
|
70
70
|
* @internal
|
|
71
71
|
*/
|
|
72
|
-
export interface
|
|
72
|
+
export interface GuardStrategyAny {
|
|
73
73
|
readonly __noydb_strategy: 'guard';
|
|
74
|
-
readonly spec:
|
|
74
|
+
readonly spec: GuardSpec<any>;
|
|
75
75
|
}
|
|
76
76
|
/** Public registration shape. See `withGuard()`. */
|
|
77
|
-
export interface
|
|
77
|
+
export interface GuardSpec<T extends Record<string, unknown>> {
|
|
78
78
|
collection: string;
|
|
79
79
|
/**
|
|
80
80
|
* Fires on `Collection.put` (insert + update). The `incoming` argument
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { GuardSpec, GuardStrategy } from './types.js';
|
|
2
2
|
/**
|
|
3
3
|
* Register a guard for a collection. Guards run on every `put()` /
|
|
4
4
|
* `delete()` for the named collection (after permissions, before
|
|
@@ -12,4 +12,4 @@ import type { GuardStrategy, GuardStrategyHandle } from './types.js';
|
|
|
12
12
|
*
|
|
13
13
|
* @see docs/superpowers/specs/2026-05-18-guards-design.md
|
|
14
14
|
*/
|
|
15
|
-
export declare function withGuard<T extends Record<string, unknown>>(strategy:
|
|
15
|
+
export declare function withGuard<T extends Record<string, unknown>>(strategy: GuardSpec<T>): GuardStrategy<T>;
|
|
@@ -16,3 +16,5 @@ export { withPeriods } from './active.js';
|
|
|
16
16
|
export type { PeriodsStrategy } from './strategy.js';
|
|
17
17
|
export { PERIODS_COLLECTION, PERIOD_FREEZES_COLLECTION, PERIOD_ARCHIVES_COLLECTION, PERIOD_TARGET_PURGES_COLLECTION, periodExclusiveUpperBound, loadPeriods, chainAnchor, assertTsWritable, validatePeriodName, appendPeriodLedgerEntry, } from './periods.js';
|
|
18
18
|
export type { PeriodRecord, PeriodFreezeRecord, PeriodArchiveRecord, PeriodTargetPurgeRecord, TargetPurgeCount, ClosePeriodOptions, OpenPeriodOptions, CarryForwardContext, ReadOnlyCollection, } from './periods.js';
|
|
19
|
+
/** The un-opted-in stub for this service — exported so callers can compare against it (#844). */
|
|
20
|
+
export { NO_PERIODS } from './strategy.js';
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
* @packageDocumentation
|
|
11
11
|
*/
|
|
12
12
|
export { readPath } from '../kernel/query/predicate.js';
|
|
13
|
-
export { reduceRecords } from '../with-lookup/
|
|
14
|
-
export { groupAndReduce } from '../with-lookup/
|
|
13
|
+
export { reduceRecords } from '../with-lookup/reduce/reduction.js';
|
|
14
|
+
export { groupAndReduce } from '../with-lookup/reduce/groupby.js';
|
|
15
15
|
export { generateULID } from '../with-pod/ulid.js';
|
|
16
16
|
export { sha256Hex } from '../kernel/enclave/index.js';
|
|
17
17
|
export { isQuorum, runDrainBarrier } from '../port/by/index.js';
|
|
@@ -26,7 +26,7 @@ export type { Operator } from '../kernel/query/predicate.js';
|
|
|
26
26
|
export type { Query } from '../kernel/query/builder.js';
|
|
27
27
|
export type { JoinStrategy } from '../kernel/query/join.js';
|
|
28
28
|
export type { LiveQuery } from '../kernel/query/live.js';
|
|
29
|
-
export type {
|
|
29
|
+
export type { ReduceResult, ReduceSpec, LiveReduction, } from '../with-lookup/reduce/reduction.js';
|
|
30
30
|
export type { IndexDef } from '../with-lookup/indexing/eager-indexes.js';
|
|
31
31
|
export type { FuseOptions } from '../with-lookup/search/fuse.js';
|
|
32
32
|
export type { RetrieveHit, RetrieveOptions } from '../with-lookup/search/retrieve-types.js';
|
|
@@ -14,3 +14,5 @@ export { withCrdt } from './active.js';
|
|
|
14
14
|
export type { CrdtStrategy } from './strategy.js';
|
|
15
15
|
export { resolveCrdtSnapshot, mergeCrdtStates, buildLwwMapState, buildRgaState, } from './crdt.js';
|
|
16
16
|
export type { CrdtMode, CrdtState, LwwMapState, RgaState, YjsState, } from './crdt.js';
|
|
17
|
+
/** The un-opted-in stub for this service — exported so callers can compare against it (#844). */
|
|
18
|
+
export { NO_CRDT } from './strategy.js';
|
|
@@ -28,3 +28,5 @@ export { computePatch, applyPatch } from './ledger/patch.js';
|
|
|
28
28
|
export type { JsonPatch, JsonPatchOp } from './ledger/patch.js';
|
|
29
29
|
export { VaultInstant, CollectionInstant } from './time-machine.js';
|
|
30
30
|
export type { VaultEngine } from './time-machine.js';
|
|
31
|
+
/** The un-opted-in stub for this service — exported so callers can compare against it (#844). */
|
|
32
|
+
export { NO_HISTORY } from './strategy.js';
|
|
@@ -18,10 +18,20 @@ export interface DeferredNumberingConfig {
|
|
|
18
18
|
*/
|
|
19
19
|
readonly settleWindowMs: number;
|
|
20
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* Options for {@link withDeferredNumbering} (#844b — was an inline literal, so
|
|
23
|
+
* unnameable). Same shape as {@link DeferredNumberingConfig} except
|
|
24
|
+
* `settleWindowMs` is optional; the factory defaults it to 0.
|
|
25
|
+
*/
|
|
26
|
+
export interface WithDeferredNumberingOptions {
|
|
27
|
+
/** Series name — the key passed to `vault.sequence(series)`. */
|
|
28
|
+
readonly series: string;
|
|
29
|
+
/** Collection holding the records to number. */
|
|
30
|
+
readonly collection: string;
|
|
31
|
+
/** Field on each record where the assigned serial is written. */
|
|
32
|
+
readonly field: string;
|
|
33
|
+
/** See {@link DeferredNumberingConfig.settleWindowMs}. Default 0. */
|
|
34
|
+
readonly settleWindowMs?: number;
|
|
35
|
+
}
|
|
21
36
|
/** Declare a deferred-numbering series. Pass the result in `createNoydb({ numbering: [...] })`. */
|
|
22
|
-
export declare function withDeferredNumbering(
|
|
23
|
-
series: string;
|
|
24
|
-
collection: string;
|
|
25
|
-
field: string;
|
|
26
|
-
settleWindowMs?: number;
|
|
27
|
-
}): DeferredNumberingConfig;
|
|
37
|
+
export declare function withDeferredNumbering(opts: WithDeferredNumberingOptions): DeferredNumberingConfig;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Active transactions strategy. Only reachable via `@noy-db/hub/
|
|
2
|
+
* Active transactions strategy. Only reachable via `@noy-db/hub/transactions`.
|
|
3
3
|
*/
|
|
4
|
-
import type {
|
|
4
|
+
import type { TransactionsStrategy } from './strategy.js';
|
|
5
5
|
import type { TransactionInvariant } from './invariants.js';
|
|
6
6
|
/**
|
|
7
7
|
* Options for {@link withTransactions}. Currently only commit-time
|
|
8
8
|
* changeset `invariants` (see {@link TransactionInvariant}).
|
|
9
9
|
*/
|
|
10
|
-
export interface
|
|
10
|
+
export interface WithTransactionsOptions {
|
|
11
11
|
/**
|
|
12
12
|
* Commit-time set-level invariants run over the changeset on every
|
|
13
13
|
* commit (ordinary AND amendment). See {@link TransactionInvariant}.
|
|
@@ -16,7 +16,7 @@ export interface TransactionStrategyOptions {
|
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
18
|
* Build the default transactions strategy. Pass into
|
|
19
|
-
* `createNoydb({
|
|
19
|
+
* `createNoydb({ transactionsStrategy: withTransactions() })` to enable
|
|
20
20
|
* `db.transaction(fn)` (and `db.transaction({ dryRun: true }, fn)`).
|
|
21
21
|
*
|
|
22
22
|
* Supply `{ invariants }` to register commit-time changeset invariants —
|
|
@@ -24,4 +24,4 @@ export interface TransactionStrategyOptions {
|
|
|
24
24
|
* transaction on a throw. Unlike `amendment.invariant`, these run for
|
|
25
25
|
* ordinary `db.transaction(fn)` calls (and amendments) with no role gate.
|
|
26
26
|
*/
|
|
27
|
-
export declare function withTransactions(opts?:
|
|
27
|
+
export declare function withTransactions(opts?: WithTransactionsOptions): TransactionsStrategy;
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* code.
|
|
7
7
|
*/
|
|
8
8
|
export { withTransactions } from './active.js';
|
|
9
|
-
export type {
|
|
10
|
-
export type {
|
|
9
|
+
export type { WithTransactionsOptions } from './active.js';
|
|
10
|
+
export type { TransactionsStrategy } from './strategy.js';
|
|
11
11
|
export type { TransactionInvariant } from './invariants.js';
|
|
12
12
|
export { TxContext, TxVault, TxCollection, runTransaction } from './transaction.js';
|
|
13
13
|
export type { AmendmentTxOptions } from './transaction.js';
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
* `InvariantError` thrown by the check passes through unwrapped).
|
|
31
31
|
*
|
|
32
32
|
* ```ts
|
|
33
|
-
* createNoydb({
|
|
33
|
+
* createNoydb({ transactionsStrategy: withTransactions({
|
|
34
34
|
* invariants: [{
|
|
35
35
|
* scope: 'payments',
|
|
36
36
|
* check(changes) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Strategy seam for the optional multi-record transaction service.
|
|
3
3
|
* `runTransaction` is only reachable through `withTransactions()`
|
|
4
|
-
* exported from `@noy-db/hub/
|
|
4
|
+
* exported from `@noy-db/hub/transactions`. Consumers who don't use
|
|
5
5
|
* `db.transaction(fn)` ship none of the ~288 LOC.
|
|
6
6
|
*
|
|
7
7
|
* @internal
|
|
@@ -13,11 +13,11 @@ import type { TransactionInvariant } from './invariants.js';
|
|
|
13
13
|
/**
|
|
14
14
|
* @internal
|
|
15
15
|
*/
|
|
16
|
-
export interface
|
|
16
|
+
export interface TransactionsStrategy {
|
|
17
17
|
runTransaction<T>(db: Noydb, fn: (tx: TxContext) => Promise<T> | T, options?: AmendmentTxOptions, txInvariants?: ReadonlyArray<TransactionInvariant>): Promise<T>;
|
|
18
18
|
runDryRun(db: Noydb, fn: (tx: TxContext) => unknown): Promise<DryRunResult>;
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
21
|
* @internal
|
|
22
22
|
*/
|
|
23
|
-
export declare const
|
|
23
|
+
export declare const NO_TRANSACTIONS: TransactionsStrategy;
|
|
@@ -12,3 +12,5 @@
|
|
|
12
12
|
export { withShadow } from './active.js';
|
|
13
13
|
export type { ShadowStrategy } from './strategy.js';
|
|
14
14
|
export { VaultFrame, CollectionFrame } from './vault-frame.js';
|
|
15
|
+
/** The un-opted-in stub for this service — exported so callers can compare against it (#844). */
|
|
16
|
+
export { NO_SHADOW } from './strategy.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { SnapshotsStrategy, RetentionPolicy } from './strategy.js';
|
|
2
2
|
import type { SnapshotPolicy } from './policy.js';
|
|
3
3
|
import type { NoydbPodStore } from '../../kernel/types.js';
|
|
4
4
|
export interface WithSnapshotsOptions {
|
|
@@ -17,4 +17,4 @@ export interface WithSnapshotsOptions {
|
|
|
17
17
|
*/
|
|
18
18
|
snapshotPolicy?: SnapshotPolicy;
|
|
19
19
|
}
|
|
20
|
-
export declare function withSnapshots(opts: WithSnapshotsOptions):
|
|
20
|
+
export declare function withSnapshots(opts: WithSnapshotsOptions): SnapshotsStrategy;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export { withSnapshots } from './active.js';
|
|
2
2
|
export type { WithSnapshotsOptions } from './active.js';
|
|
3
|
-
export type {
|
|
3
|
+
export type { SnapshotsStrategy, SnapshotMeta, RetentionPolicy } from './strategy.js';
|
|
4
4
|
export type { SnapshotPolicy, SnapshotMode } from './policy.js';
|
|
5
5
|
export { SnapshotNotFoundError } from '../../kernel/errors.js';
|
|
6
|
+
/** The un-opted-in stub for this service — exported so callers can compare against it (#844). */
|
|
7
|
+
export { NO_SNAPSHOTS } from './strategy.js';
|
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
*
|
|
10
10
|
* Internal service — reached through `noydb.snapshot(...)` etc.
|
|
11
11
|
*/
|
|
12
|
-
import { NO_SNAPSHOTS, type
|
|
12
|
+
import { NO_SNAPSHOTS, type SnapshotsStrategy, type SnapshotMeta } from './strategy.js';
|
|
13
13
|
import type { Vault } from '../../kernel/vault.js';
|
|
14
14
|
import type { WriteHook, Unsubscribe } from '../../port/with/write-hooks.js';
|
|
15
15
|
/** Everything the moving snapshot methods touched on the Noydb instance's `this.*`. */
|
|
16
16
|
export interface NoydbSnapshotsDeps {
|
|
17
17
|
/** Resolved snapshot strategy (NO_SNAPSHOTS when not configured). */
|
|
18
|
-
readonly strategy:
|
|
18
|
+
readonly strategy: SnapshotsStrategy;
|
|
19
19
|
/** Acting user id, used as the snapshot `by`. */
|
|
20
20
|
readonly user: string;
|
|
21
21
|
/** Whether the owning instance has been closed. */
|
|
@@ -32,7 +32,7 @@ export declare class NoydbSnapshots {
|
|
|
32
32
|
constructor(deps: NoydbSnapshotsDeps);
|
|
33
33
|
/**
|
|
34
34
|
* Take an on-demand checkpoint of the given vault.
|
|
35
|
-
* Requires `
|
|
35
|
+
* Requires `snapshotsStrategy: withSnapshots({ store })` in `createNoydb`.
|
|
36
36
|
* @throws ValidationError when the vault is not open
|
|
37
37
|
*/
|
|
38
38
|
snapshot(vault: string, opts?: {
|
|
@@ -29,7 +29,7 @@ export interface SnapshotIndex {
|
|
|
29
29
|
auto?: SnapshotMeta;
|
|
30
30
|
}
|
|
31
31
|
/** @internal */
|
|
32
|
-
export interface
|
|
32
|
+
export interface SnapshotsStrategy {
|
|
33
33
|
snapshot(vault: unknown, by: string, opts?: {
|
|
34
34
|
label?: string;
|
|
35
35
|
note?: string;
|
|
@@ -45,4 +45,4 @@ export interface SnapshotStrategy {
|
|
|
45
45
|
readonly policy?: SnapshotPolicy;
|
|
46
46
|
}
|
|
47
47
|
/** No-op stub. @internal */
|
|
48
|
-
export declare const NO_SNAPSHOTS:
|
|
48
|
+
export declare const NO_SNAPSHOTS: SnapshotsStrategy;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DerivationContext,
|
|
1
|
+
import type { DerivationContext, DerivationSpec } from './types.js';
|
|
2
2
|
export interface RunResult {
|
|
3
3
|
outputs: Record<string, OutputResult>;
|
|
4
4
|
failed: boolean;
|
|
@@ -55,7 +55,7 @@ export declare const DerivationExecutor: {
|
|
|
55
55
|
* `_derivedFrom` onto every output. Returns per-output success or
|
|
56
56
|
* failure; throws only for shape mismatches (a contract violation).
|
|
57
57
|
*/
|
|
58
|
-
run<TSource extends Record<string, unknown>, TOutputs extends Record<string, Record<string, unknown> | ReadonlyArray<Record<string, unknown>>>>(strategy:
|
|
58
|
+
run<TSource extends Record<string, unknown>, TOutputs extends Record<string, Record<string, unknown> | ReadonlyArray<Record<string, unknown>>>>(strategy: DerivationSpec<TSource, TOutputs>, source: TSource & {
|
|
59
59
|
id: string;
|
|
60
60
|
}, sourceVersion: number, strategyHash: string, ctx: DerivationContext): Promise<RunResult>;
|
|
61
61
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
export { withDerivation } from './with-derivation.js';
|
|
2
2
|
export { withRollup } from './with-rollup.js';
|
|
3
|
+
export type { WithRollupOptions } from './with-rollup.js';
|
|
3
4
|
export { DerivationRegistry } from './registry.js';
|
|
4
5
|
export { DerivationExecutor } from './executor.js';
|
|
5
|
-
export type {
|
|
6
|
+
export type { DerivationSpec, DerivationStrategy, DerivedFromMeta, OutputSpec, RecordOutputSpec, ArrayOutputSpec, } from './types.js';
|
|
6
7
|
export { DerivationCycleError, DerivationDepthError, DerivationOutputUnknownError, DerivationOutputShapeError, DerivationCapExceededError, } from '../../kernel/errors.js';
|
|
7
8
|
export type { DerivationContext } from './types.js';
|
|
8
9
|
export type { RunResult } from './executor.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ViaGraph, type FieldRef, type EdgeKind, type Grain } from '../../kernel/via/graph.js';
|
|
2
|
-
import type {
|
|
2
|
+
import type { DerivationSpec } from './types.js';
|
|
3
3
|
interface RegisteredStrategy {
|
|
4
|
-
spec:
|
|
4
|
+
spec: DerivationSpec<any, any>;
|
|
5
5
|
strategyHash: string;
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
@@ -13,7 +13,7 @@ interface RegisteredStrategy {
|
|
|
13
13
|
export declare class DerivationRegistry {
|
|
14
14
|
private readonly _bySource;
|
|
15
15
|
private readonly _byOutput;
|
|
16
|
-
register(spec:
|
|
16
|
+
register(spec: DerivationSpec<any, any>): Promise<void>;
|
|
17
17
|
strategiesForSource(source: string): ReadonlyArray<RegisteredStrategy>;
|
|
18
18
|
strategiesProducingOutput(collection: string): ReadonlyArray<RegisteredStrategy>;
|
|
19
19
|
/**
|
|
@@ -2,7 +2,7 @@ import type { Collection } from '../../kernel/collection.js';
|
|
|
2
2
|
import type { ReadOnlyVaultFacade } from '../../with-audit/guards/types.js';
|
|
3
3
|
import type { TxContext } from '../../with-commit/tx/transaction.js';
|
|
4
4
|
import type { DerivationRegistry } from './registry.js';
|
|
5
|
-
import type {
|
|
5
|
+
import type { DerivationSpec } from './types.js';
|
|
6
6
|
/**
|
|
7
7
|
* Accessor shape passed through from the owning Vault. Provides the
|
|
8
8
|
* registry (used to look up strategies and as the WeakMap key) and a
|
|
@@ -29,7 +29,7 @@ export interface DerivationStaleAccessor {
|
|
|
29
29
|
getActiveTxContext(): TxContext | null;
|
|
30
30
|
}
|
|
31
31
|
/** Mark every output of (strategy, sourceId) as stale. */
|
|
32
|
-
export declare function markStale(registry: DerivationRegistry, strategy:
|
|
32
|
+
export declare function markStale(registry: DerivationRegistry, strategy: DerivationSpec<any, any>, sourceId: string): Promise<void>;
|
|
33
33
|
/**
|
|
34
34
|
* Called from `Collection.get` on lazy-mode output collections. If the
|
|
35
35
|
* id has a pending stale flag for any strategy producing this output
|
|
@@ -119,7 +119,7 @@ export type OutputSpec = RecordOutputSpec | ArrayOutputSpec;
|
|
|
119
119
|
* value may be a single record, or — for `shape: 'array'` outputs — an
|
|
120
120
|
* array of records (the fanout sidecar upserts/deletes each row).
|
|
121
121
|
*/
|
|
122
|
-
export interface
|
|
122
|
+
export interface DerivationSpec<TSource extends Record<string, unknown>, TOutputs extends Record<string, Record<string, unknown> | ReadonlyArray<Record<string, unknown>>>> {
|
|
123
123
|
/** Source collection name. */
|
|
124
124
|
source: string;
|
|
125
125
|
/**
|
|
@@ -242,7 +242,7 @@ export interface DerivationStrategy<TSource extends Record<string, unknown>, TOu
|
|
|
242
242
|
strict?: boolean;
|
|
243
243
|
}
|
|
244
244
|
/** Returned by `withDerivation()` and consumed by `createNoydb`. */
|
|
245
|
-
export interface
|
|
245
|
+
export interface DerivationStrategy {
|
|
246
246
|
readonly __noydb_strategy: 'derivation';
|
|
247
|
-
readonly spec:
|
|
247
|
+
readonly spec: DerivationSpec<any, any>;
|
|
248
248
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { DerivationSpec, DerivationStrategy } from './types.js';
|
|
2
2
|
/**
|
|
3
3
|
* Register a deterministic derivation: one source collection → one or
|
|
4
4
|
* more typed outputs, computed by the user's `derive` function on
|
|
@@ -7,4 +7,4 @@ import type { DerivationStrategy, DerivationStrategyHandle } from './types.js';
|
|
|
7
7
|
*
|
|
8
8
|
* See docs/superpowers/specs/2026-05-01-dim14-derivation-v1-design.md.
|
|
9
9
|
*/
|
|
10
|
-
export declare function withDerivation<TSource extends Record<string, unknown>, TOutputs extends Record<string, Record<string, unknown> | ReadonlyArray<Record<string, unknown>>>>(spec:
|
|
10
|
+
export declare function withDerivation<TSource extends Record<string, unknown>, TOutputs extends Record<string, Record<string, unknown> | ReadonlyArray<Record<string, unknown>>>>(spec: DerivationSpec<TSource, TOutputs>): DerivationStrategy;
|