@noy-db/hub 0.4.0-pre.1 → 0.4.0-pre.11
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 +3 -4
- package/dist/api-ZDKTWNBB.js +20 -0
- package/dist/attestation/index.js +18 -18
- package/dist/{backup-LU2DTZTI.js → backup-2UX7PRM5.js} +13 -13
- package/dist/blobs/index.js +30 -15
- package/dist/blobs/index.js.map +1 -1
- package/dist/broker/index.js +12 -12
- package/dist/broker/index.js.map +1 -1
- package/dist/cargo/index.js +53 -43
- package/dist/{chunk-YTGDPCPW.js → chunk-2J6UEN2V.js} +42 -18
- package/dist/chunk-2J6UEN2V.js.map +1 -0
- package/dist/{chunk-IY23KFNZ.js → chunk-35NMVJ7I.js} +3 -3
- package/dist/{chunk-S3BFKGET.js → chunk-3HUYRN24.js} +4 -4
- package/dist/chunk-3HUYRN24.js.map +1 -0
- package/dist/{walk-XS3PKM6I.js → chunk-3V3XR4S4.js} +4 -13
- package/dist/{walk-XS3PKM6I.js.map → chunk-3V3XR4S4.js.map} +1 -1
- package/dist/{chunk-RTEK4C4I.js → chunk-4JQK3L4V.js} +2 -2
- package/dist/{chunk-3ELCWU56.js → chunk-4ZKNC6A6.js} +2 -2
- package/dist/{chunk-VQNJ7UZL.js → chunk-55LKVALY.js} +106 -10
- package/dist/chunk-55LKVALY.js.map +1 -0
- package/dist/{chunk-VAIS3SOM.js → chunk-55LX6FSX.js} +2 -2
- package/dist/chunk-5D2ALSM5.js +19 -0
- package/dist/chunk-5D2ALSM5.js.map +1 -0
- package/dist/{chunk-6HPG2YNX.js → chunk-5DRROK5W.js} +2 -2
- package/dist/{chunk-S6Q37VGE.js → chunk-5GQEU4DN.js} +2 -2
- package/dist/chunk-5JOFWL4G.js +25 -0
- package/dist/chunk-5JOFWL4G.js.map +1 -0
- package/dist/{chunk-TOPYT5U5.js → chunk-63FE525P.js} +6 -6
- package/dist/chunk-6LJY7X5A.js +18 -0
- package/dist/chunk-6LJY7X5A.js.map +1 -0
- package/dist/{chunk-JVBO4SZL.js → chunk-6UBZ6I5Z.js} +2 -2
- package/dist/{chunk-BOKIKJJB.js → chunk-6ZNSB3H6.js} +5 -17
- package/dist/chunk-6ZNSB3H6.js.map +1 -0
- package/dist/{chunk-BMQWTQZ4.js → chunk-7YVBQJ7K.js} +13 -355
- package/dist/chunk-7YVBQJ7K.js.map +1 -0
- package/dist/{chunk-UFEVO57O.js → chunk-ABS7FMMD.js} +6 -6
- package/dist/chunk-AFHQATY4.js +47 -0
- package/dist/chunk-AFHQATY4.js.map +1 -0
- package/dist/{chunk-HOONYZY2.js → chunk-AKKRXT23.js} +7 -7
- package/dist/chunk-AKKRXT23.js.map +1 -0
- package/dist/{chunk-DDHM2TLX.js → chunk-AT2JJEKJ.js} +4 -4
- package/dist/chunk-AT2JJEKJ.js.map +1 -0
- package/dist/{chunk-M75ZZHSR.js → chunk-BLBAQRBM.js} +2 -2
- package/dist/{chunk-3SV2EPMN.js → chunk-BLCWSJLN.js} +88 -81
- package/dist/chunk-BLCWSJLN.js.map +1 -0
- package/dist/chunk-CADUYBQD.js +151 -0
- package/dist/chunk-CADUYBQD.js.map +1 -0
- package/dist/{chunk-G6EQYAL6.js → chunk-CI32CAFS.js} +5 -5
- package/dist/{chunk-FH52K7EG.js → chunk-CUZLNGD5.js} +2 -6
- package/dist/{chunk-FH52K7EG.js.map → chunk-CUZLNGD5.js.map} +1 -1
- package/dist/{chunk-2P7EGNKF.js → chunk-CXQW2NWO.js} +145 -3
- package/dist/chunk-CXQW2NWO.js.map +1 -0
- package/dist/{chunk-6B4DYGWO.js → chunk-DABACXEF.js} +3 -3
- package/dist/{chunk-F6T6L2UK.js → chunk-DMH3VZU5.js} +4 -4
- package/dist/chunk-DSDXAKIP.js +50 -0
- package/dist/chunk-DSDXAKIP.js.map +1 -0
- package/dist/{chunk-MQ6WOPSY.js → chunk-DZ2JXHWK.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-UBNCR3YK.js → chunk-EE7UHLKH.js} +4 -4
- package/dist/chunk-EIPVYUEP.js +654 -0
- package/dist/chunk-EIPVYUEP.js.map +1 -0
- package/dist/{chunk-EGCRBCNA.js → chunk-EKRSCRNM.js} +3 -3
- package/dist/{chunk-YMUGBZN2.js → chunk-FQ5CHJR7.js} +1 -1
- package/dist/chunk-FQ5CHJR7.js.map +1 -0
- package/dist/{chunk-LB6OH6K2.js → chunk-FQZ6XTQ7.js} +17 -20
- package/dist/chunk-FQZ6XTQ7.js.map +1 -0
- package/dist/{chunk-IRQY7IR5.js → chunk-FRMPM7WG.js} +4 -4
- package/dist/{chunk-DVUZMT2W.js → chunk-G2JUIDFA.js} +9 -9
- package/dist/{chunk-DVUZMT2W.js.map → chunk-G2JUIDFA.js.map} +1 -1
- package/dist/{chunk-RND5ZPNP.js → chunk-G6WWZNJP.js} +13 -13
- package/dist/chunk-G6WWZNJP.js.map +1 -0
- package/dist/chunk-GJW4HX2O.js +1 -0
- package/dist/{chunk-T6GU5PPZ.js → chunk-GU3IP74F.js} +6 -6
- package/dist/{chunk-5OI6BR4H.js → chunk-GWWOGNBK.js} +308 -18
- package/dist/chunk-GWWOGNBK.js.map +1 -0
- package/dist/{chunk-UNCOC7QH.js → chunk-H2GPHUZD.js} +12 -13
- package/dist/chunk-H2GPHUZD.js.map +1 -0
- package/dist/{chunk-7CI6CP7Z.js → chunk-HMU5P6RL.js} +5 -5
- package/dist/chunk-HMU5P6RL.js.map +1 -0
- package/dist/{chunk-YJV2UZ7H.js → chunk-I5GEJX3R.js} +5 -5
- package/dist/chunk-I5GEJX3R.js.map +1 -0
- package/dist/{chunk-GWKAVKHI.js → chunk-IG6KUWBX.js} +2 -2
- package/dist/chunk-IG6KUWBX.js.map +1 -0
- package/dist/{chunk-MTQPRQHB.js → chunk-IPUG56GJ.js} +15 -5
- package/dist/{chunk-MTQPRQHB.js.map → chunk-IPUG56GJ.js.map} +1 -1
- package/dist/{chunk-SMIRGMS7.js → chunk-IXNCZTWA.js} +2 -2
- package/dist/{chunk-RM2XV574.js → chunk-IXTSNGYY.js} +3 -3
- package/dist/{chunk-KUPKLSX5.js → chunk-IYZISPGD.js} +7 -5
- package/dist/chunk-IYZISPGD.js.map +1 -0
- package/dist/{chunk-SMGEYW6G.js → chunk-JDOMW53O.js} +26 -16
- package/dist/chunk-JDOMW53O.js.map +1 -0
- package/dist/{chunk-PK6QCH2C.js → chunk-JJZGIE4U.js} +6 -5
- package/dist/{chunk-DRWBEDYO.js → chunk-JYJFGD2H.js} +2 -2
- package/dist/{chunk-TAGR72IR.js → chunk-KRCBZYTZ.js} +26 -177
- package/dist/chunk-KRCBZYTZ.js.map +1 -0
- package/dist/{chunk-HPUWOVR7.js → chunk-L2DGWBCT.js} +14 -14
- package/dist/chunk-L2DGWBCT.js.map +1 -0
- package/dist/{chunk-VEALDPHW.js → chunk-L3YYLT4E.js} +15 -2
- package/dist/chunk-L3YYLT4E.js.map +1 -0
- package/dist/{chunk-A7JJLVGH.js → chunk-LNPUSMZL.js} +29 -31
- package/dist/chunk-LNPUSMZL.js.map +1 -0
- package/dist/{chunk-KUIB4B5Q.js → chunk-LNZKOUJR.js} +2 -2
- package/dist/{chunk-IM3QVF53.js → chunk-MBKVNOJS.js} +6 -6
- package/dist/chunk-MCHBCNCE.js +367 -0
- package/dist/chunk-MCHBCNCE.js.map +1 -0
- package/dist/{chunk-VCBHAE4R.js → chunk-MHMLXJ3I.js} +2 -2
- package/dist/chunk-MHMLXJ3I.js.map +1 -0
- package/dist/{chunk-WNGGJWF7.js → chunk-MSMJJB4J.js} +2 -2
- package/dist/chunk-MSMJJB4J.js.map +1 -0
- package/dist/{chunk-T36RFODW.js → chunk-MXUT7FTE.js} +2 -2
- package/dist/chunk-MXUT7FTE.js.map +1 -0
- package/dist/{chunk-BGK233EA.js → chunk-N4BBNYIB.js} +11 -9
- package/dist/chunk-N4BBNYIB.js.map +1 -0
- package/dist/{chunk-3PF6CRDT.js → chunk-NFIBXF4V.js} +1082 -1583
- package/dist/chunk-NFIBXF4V.js.map +1 -0
- package/dist/{chunk-LOF2W3JU.js → chunk-NFNJLRY7.js} +368 -52
- package/dist/chunk-NFNJLRY7.js.map +1 -0
- package/dist/{chunk-N6WF5PKC.js → chunk-NFZGZ4AK.js} +2 -2
- package/dist/{chunk-JRBNCUNT.js → chunk-NGSJZFGL.js} +21 -4
- package/dist/chunk-NGSJZFGL.js.map +1 -0
- package/dist/chunk-NJ4DYYO5.js +81 -0
- package/dist/chunk-NJ4DYYO5.js.map +1 -0
- package/dist/{chunk-2IALOXZS.js → chunk-NM5UYF6Q.js} +2 -2
- package/dist/chunk-NM5UYF6Q.js.map +1 -0
- package/dist/{chunk-JBBSYJHP.js → chunk-NYEFP7DY.js} +4 -4
- package/dist/chunk-NYEFP7DY.js.map +1 -0
- package/dist/{chunk-CCOP5XDW.js → chunk-NZ24MX4J.js} +8 -46
- package/dist/chunk-NZ24MX4J.js.map +1 -0
- package/dist/{chunk-KWVJAOIN.js → chunk-OLEPKFTW.js} +4 -4
- package/dist/chunk-OLEPKFTW.js.map +1 -0
- package/dist/{chunk-OF75ACKS.js → chunk-PEATRIYJ.js} +9 -9
- package/dist/chunk-PEOZ34EM.js +13 -0
- package/dist/chunk-PEOZ34EM.js.map +1 -0
- package/dist/{chunk-UC2ETWF3.js → chunk-PTHKZWEH.js} +2 -14
- package/dist/{chunk-UC2ETWF3.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-LSASLXGC.js → chunk-QBAC3GXA.js} +1 -1
- package/dist/chunk-QBAC3GXA.js.map +1 -0
- package/dist/{chunk-RDXW3OBQ.js → chunk-QD46HPZG.js} +2 -2
- package/dist/chunk-QD46HPZG.js.map +1 -0
- package/dist/{chunk-N55W7KUL.js → chunk-QDIH2744.js} +2 -2
- package/dist/{chunk-6HY2X62D.js → chunk-QJNCB5SK.js} +2 -2
- package/dist/{chunk-4BRCIYFG.js → chunk-QX76XVQH.js} +6 -6
- package/dist/chunk-QX76XVQH.js.map +1 -0
- package/dist/{chunk-W2OG6JOL.js → chunk-QZWTRENR.js} +24 -7
- package/dist/chunk-QZWTRENR.js.map +1 -0
- package/dist/{chunk-6NQMXTYC.js → chunk-RO5NM6UI.js} +2 -2
- package/dist/chunk-RO5NM6UI.js.map +1 -0
- package/dist/chunk-SGDPRCC4.js +1075 -0
- package/dist/chunk-SGDPRCC4.js.map +1 -0
- package/dist/{chunk-2PCAVW2I.js → chunk-SHEEBRZ4.js} +2 -2
- package/dist/chunk-SMY5X46Z.js +14 -0
- package/dist/chunk-SMY5X46Z.js.map +1 -0
- package/dist/{chunk-ISMV2QVG.js → chunk-TG634KCO.js} +11 -2
- package/dist/chunk-TG634KCO.js.map +1 -0
- package/dist/{chunk-J6Q7UVQE.js → chunk-TUXQSFHZ.js} +4 -16
- package/dist/{chunk-J6Q7UVQE.js.map → chunk-TUXQSFHZ.js.map} +1 -1
- package/dist/{chunk-GULTLPFB.js → chunk-UADPR6F4.js} +3 -3
- package/dist/{chunk-GULTLPFB.js.map → chunk-UADPR6F4.js.map} +1 -1
- package/dist/{chunk-ZEQWCBCM.js → chunk-UDHBXYGG.js} +27 -5
- package/dist/chunk-UDHBXYGG.js.map +1 -0
- package/dist/{chunk-RA5VTXXG.js → chunk-V6UQZA2H.js} +2 -2
- package/dist/chunk-VG2ZSFYD.js +32 -0
- package/dist/chunk-VG2ZSFYD.js.map +1 -0
- package/dist/chunk-VKQCVU2Z.js +21 -0
- package/dist/chunk-VKQCVU2Z.js.map +1 -0
- package/dist/{chunk-QDPZWTN2.js → chunk-W3G5REIU.js} +2 -2
- package/dist/{chunk-WEYZTLXN.js → chunk-W3L64Y3J.js} +2 -2
- package/dist/{chunk-ONTBCHCP.js → chunk-W66AM5IB.js} +2 -2
- package/dist/chunk-W66AM5IB.js.map +1 -0
- package/dist/{chunk-A5BDDEXK.js → chunk-WBKZUO5V.js} +26 -43
- package/dist/chunk-WBKZUO5V.js.map +1 -0
- package/dist/{chunk-CBSY2N76.js → chunk-WLXMTYGO.js} +2 -2
- package/dist/{chunk-3U3FBR7O.js → chunk-X3F5YJG2.js} +2 -2
- package/dist/{chunk-GQNGCEP5.js → chunk-X45JYIAY.js} +3 -3
- package/dist/chunk-X45JYIAY.js.map +1 -0
- package/dist/{chunk-6XE5TMPR.js → chunk-X4MVWPHV.js} +3 -3
- package/dist/chunk-X4MVWPHV.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-DDATL6PU.js → chunk-Y2NJBNX3.js} +8 -8
- package/dist/{chunk-DDATL6PU.js.map → chunk-Y2NJBNX3.js.map} +1 -1
- package/dist/chunk-YMUFFJCO.js +23 -0
- package/dist/chunk-YMUFFJCO.js.map +1 -0
- package/dist/{chunk-O7WJ47EF.js → chunk-YWWQM7KP.js} +5 -14
- package/dist/chunk-YWWQM7KP.js.map +1 -0
- package/dist/{chunk-7O3AYBC7.js → chunk-YZJSJOUI.js} +235 -65
- package/dist/chunk-YZJSJOUI.js.map +1 -0
- package/dist/{chunk-5WZXVULX.js → chunk-ZTLOXFPB.js} +2 -2
- package/dist/chunk-ZTLOXFPB.js.map +1 -0
- package/dist/classified/index.js +5 -5
- package/dist/{classified-marker-WQVIJAW2.js → classified-marker-7PKJBFCG.js} +3 -3
- package/dist/collection-facade-6I5K5IOD.js +45 -0
- package/dist/{computed-DSMPXG2Y.js → computed-AB45PS4V.js} +3 -3
- package/dist/consent/index.js +13 -9
- package/dist/consent/index.js.map +1 -1
- package/dist/cover/index.js +37 -0
- 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-2A7IAJ3D.js → dead-filter-FL3WIUZS.js} +2 -2
- package/dist/{chunk-GYYCX5K6.js → delegation-QXZ4MPPH.js} +12 -6
- package/dist/{chunk-GYYCX5K6.js.map → delegation-QXZ4MPPH.js.map} +1 -1
- package/dist/derivations/index.js +12 -12
- package/dist/derive-VGS7FKE3.js +22 -0
- package/dist/directory/index.js +46 -0
- package/dist/dispatch-EGGC7UD7.js +72 -0
- package/dist/dispatch-EGGC7UD7.js.map +1 -0
- package/dist/dispatch-GDSTUTVP.js +194 -0
- package/dist/dispatch-GDSTUTVP.js.map +1 -0
- package/dist/{enclave-7MW6ZGXW.js → enclave-SPEEDYZ4.js} +11 -11
- package/dist/executor-IEBLTBCW.js +9 -0
- package/dist/executor-OTF556PL.js +28 -0
- package/dist/executor-RM7XWQDU.js +9 -0
- package/dist/export-accessible-P42BQ4PB.js +23 -0
- package/dist/extract-partition-TCYXRWBN.js +38 -0
- package/dist/{fanout-sidecar-WDYQ77VB.js → fanout-sidecar-SSMRSC2L.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 +6 -6
- 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 +42 -42
- package/dist/index.js +330 -2106
- 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-FCKN5O6C.js +19 -0
- package/dist/kernel/best-effort-revert.d.ts +9 -1
- package/dist/kernel/collection-config.d.ts +12 -70
- package/dist/kernel/collection.d.ts +11 -23
- package/dist/kernel/enclave/crypto.d.ts +8 -8
- package/dist/kernel/enclave/index.d.ts +3 -3
- package/dist/kernel/errors.d.ts +41 -22
- package/dist/kernel/lazy.d.ts +30 -0
- package/dist/kernel/noydb.d.ts +81 -124
- 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/sync-policy.d.ts +76 -4
- package/dist/kernel/types.d.ts +146 -86
- package/dist/kernel/validation.d.ts +33 -33
- package/dist/kernel/vault.d.ts +41 -229
- package/dist/kernel/via/dispatch.d.ts +7 -0
- package/dist/{ledger-33BC4TR7.js → ledger-6XBEVWYP.js} +11 -11
- package/dist/liberate-CYUOS4NC.js +24 -0
- package/dist/{link-set-QK22TDEX.js → link-set-NK6L2A5S.js} +11 -11
- package/dist/materialized-views/index.js +22 -19
- package/dist/money/index.js +31 -0
- package/dist/noydb-FZZIMLCI.js +81 -0
- package/dist/overlay-views/index.js +4 -4
- package/dist/periods/index.js +15 -13
- package/dist/pod/index.js +26 -12
- package/dist/{policy-NAHB2TUT.js → policy/index.js} +6 -6
- package/dist/port/with/archive-strategy.d.ts +31 -0
- package/dist/port/with/blob-strategy.d.ts +15 -5
- package/dist/port/with/collection-options.d.ts +171 -0
- package/dist/port/with/collection-registries.d.ts +62 -0
- package/dist/port/with/strategies.d.ts +134 -0
- package/dist/port/with/team-strategy.d.ts +3 -2
- package/dist/portability/index.js +8 -8
- package/dist/{post-register-JVTMJ6OW.js → post-register-VFIYISUK.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-UKU2J6MN.js +25 -0
- package/dist/registry-2VCWVHZS.js +19 -0
- package/dist/registry-7Y5WF7GS.js +9 -0
- package/dist/{registry-VW6P6A3J.js → registry-BWD2ED52.js} +2 -2
- package/dist/registry-DTWRJLSF.js +18 -0
- package/dist/request-withdrawal-JYDZ5XY2.js +31 -0
- package/dist/{reveal-LGBOM2BO.js → reveal-CL2BCW6A.js} +6 -6
- package/dist/revoke-2TSAD2T4.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-PWK45HDF.js → seed-NUVJEL7T.js} +12 -12
- package/dist/seed-NUVJEL7T.js.map +1 -0
- 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-K7Z2EOMG.js +25 -0
- package/dist/snapshots/index.js +14 -10
- package/dist/snapshots/index.js.map +1 -1
- package/dist/{stale-FJED42DM.js → stale-A4J26OIC.js} +11 -10
- package/dist/storage-YVHZUISN.js +23 -0
- package/dist/store/index.js +22 -0
- package/dist/{store-coordination-provider-APODTV4W.js → store-coordination-provider-EWRZL7XF.js} +3 -3
- package/dist/sync/index.js +15 -12
- package/dist/sync/index.js.map +1 -1
- package/dist/team/index.js +33 -48
- 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-26Y5GNMK.js → verify-7XWHJWUN.js} +5 -5
- package/dist/via/blob/active.d.ts +23 -7
- package/dist/via/blob/binding.d.ts +1 -1
- package/dist/via/blob/index.d.ts +7 -1
- 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-P5D6CF4V.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 +6 -5
- 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-audit/periods/vault-facade.d.ts +6 -0
- package/dist/with-audit/portability/export-accessible.d.ts +4 -4
- package/dist/with-audit/portability/request-withdrawal.d.ts +3 -3
- package/dist/with-audit/portability/withdraw-accessible.d.ts +2 -2
- package/dist/with-audit/sealed-record/strategy.d.ts +1 -1
- package/dist/with-audit/tiers/index.d.ts +1 -0
- package/dist/with-cargo/adopt-partition.d.ts +7 -7
- package/dist/{legacy/kernel.d.ts → with-cargo/floor.d.ts} +4 -4
- package/dist/with-cargo/index.d.ts +9 -2
- package/dist/with-commit/crdt/index.d.ts +2 -0
- package/dist/with-commit/history/index.d.ts +2 -0
- package/dist/with-commit/history/time-machine.d.ts +2 -2
- 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/dispatch.d.ts +98 -0
- package/dist/with-formula/derivations/executor.d.ts +2 -2
- package/dist/with-formula/derivations/index.d.ts +4 -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/dispatch.d.ts +75 -0
- package/dist/with-formula/materialized-views/index.d.ts +2 -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 +11 -12
- 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/broker/index.d.ts +1 -0
- package/dist/with-party/broker/seed.d.ts +1 -1
- package/dist/with-party/custody/liberate.d.ts +3 -3
- package/dist/with-party/directory/cover/index.d.ts +1 -5
- package/dist/with-party/directory/cover/schema.d.ts +0 -6
- package/dist/with-party/directory/cover/storage.d.ts +0 -8
- package/dist/with-party/directory/cover/types.d.ts +0 -21
- package/dist/with-party/directory/index.d.ts +2 -0
- package/dist/with-party/session/dev-unlock.d.ts +2 -2
- package/dist/with-party/session/index.d.ts +2 -0
- package/dist/with-party/session/session.d.ts +2 -2
- package/dist/with-party/team/deed.d.ts +8 -8
- package/dist/with-party/team/index.d.ts +4 -7
- package/dist/with-party/team/keyring.d.ts +83 -35
- package/dist/with-party/team/{managed-passphrase.d.ts → managed-secret.d.ts} +27 -27
- package/dist/with-party/team/noydb-facade.d.ts +43 -42
- package/dist/with-party/team/peer-recover.d.ts +13 -13
- package/dist/with-party/team/recovery.d.ts +5 -5
- package/dist/with-party/team/rotate-recover.d.ts +30 -30
- package/dist/with-pod/bundle.d.ts +30 -32
- package/dist/with-pod/format.d.ts +2 -2
- package/dist/with-pod/index.d.ts +2 -1
- package/dist/with-shape/blobs/blob-compaction.d.ts +43 -3
- package/dist/with-shape/blobs/blob-pinning.d.ts +112 -0
- package/dist/with-shape/blobs/blob-set.d.ts +86 -2
- 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/with-store/route-store.d.ts +1 -1
- package/dist/{with-party/team/sync-active.d.ts → with-sync/active.d.ts} +1 -1
- package/dist/{with-party/team/sync-credentials.d.ts → with-sync/credentials.d.ts} +3 -3
- package/dist/{with-party/team/sync.d.ts → with-sync/engine.d.ts} +5 -5
- package/dist/{with-party/sync → with-sync}/index.d.ts +4 -2
- package/dist/{with-party/team/sync-period-scope.d.ts → with-sync/period-scope.d.ts} +2 -2
- package/dist/{with-party/team → with-sync}/presence.d.ts +2 -2
- package/dist/{with-party/team/sync-strategy.d.ts → with-sync/strategy.d.ts} +6 -6
- package/dist/{with-party/team/sync-transaction.d.ts → with-sync/transaction.d.ts} +3 -3
- package/dist/withdraw-accessible-A2PWF5MZ.js +28 -0
- package/package.json +45 -36
- package/dist/aggregate/index.js.map +0 -1
- package/dist/api-IQFZJSQO.js +0 -20
- package/dist/as/index.js +0 -30
- package/dist/at/index.js +0 -1
- package/dist/bundle/index.js +0 -105
- package/dist/by/index.js +0 -11
- package/dist/chunk-2IALOXZS.js.map +0 -1
- package/dist/chunk-2MUZ3LY6.js +0 -205
- package/dist/chunk-2MUZ3LY6.js.map +0 -1
- package/dist/chunk-2P7EGNKF.js.map +0 -1
- package/dist/chunk-3PF6CRDT.js.map +0 -1
- package/dist/chunk-3SV2EPMN.js.map +0 -1
- package/dist/chunk-4BRCIYFG.js.map +0 -1
- package/dist/chunk-5OI6BR4H.js.map +0 -1
- package/dist/chunk-5WZXVULX.js.map +0 -1
- package/dist/chunk-6NQMXTYC.js.map +0 -1
- package/dist/chunk-6XE5TMPR.js.map +0 -1
- package/dist/chunk-7CI6CP7Z.js.map +0 -1
- package/dist/chunk-7O3AYBC7.js.map +0 -1
- package/dist/chunk-A5BDDEXK.js.map +0 -1
- package/dist/chunk-A7JJLVGH.js.map +0 -1
- package/dist/chunk-BGK233EA.js.map +0 -1
- package/dist/chunk-BMQWTQZ4.js.map +0 -1
- package/dist/chunk-BOKIKJJB.js.map +0 -1
- package/dist/chunk-CCOP5XDW.js.map +0 -1
- package/dist/chunk-CHFZDSE4.js +0 -1
- package/dist/chunk-DDHM2TLX.js.map +0 -1
- package/dist/chunk-GQNGCEP5.js.map +0 -1
- package/dist/chunk-GVZQ4NAM.js +0 -14
- package/dist/chunk-GVZQ4NAM.js.map +0 -1
- package/dist/chunk-GWKAVKHI.js.map +0 -1
- package/dist/chunk-HOONYZY2.js.map +0 -1
- package/dist/chunk-HPUWOVR7.js.map +0 -1
- package/dist/chunk-ISMV2QVG.js.map +0 -1
- package/dist/chunk-JBBSYJHP.js.map +0 -1
- package/dist/chunk-JRBNCUNT.js.map +0 -1
- package/dist/chunk-JZWWLLVY.js +0 -99
- package/dist/chunk-JZWWLLVY.js.map +0 -1
- package/dist/chunk-KUPKLSX5.js.map +0 -1
- package/dist/chunk-KWVJAOIN.js.map +0 -1
- package/dist/chunk-LB6OH6K2.js.map +0 -1
- package/dist/chunk-LB7FD65R.js +0 -163
- package/dist/chunk-LB7FD65R.js.map +0 -1
- package/dist/chunk-LOF2W3JU.js.map +0 -1
- package/dist/chunk-LSASLXGC.js.map +0 -1
- package/dist/chunk-O7WJ47EF.js.map +0 -1
- package/dist/chunk-ONTBCHCP.js.map +0 -1
- package/dist/chunk-PT37L5DV.js +0 -255
- package/dist/chunk-PT37L5DV.js.map +0 -1
- package/dist/chunk-RDXW3OBQ.js.map +0 -1
- package/dist/chunk-RND5ZPNP.js.map +0 -1
- package/dist/chunk-S3BFKGET.js.map +0 -1
- package/dist/chunk-SMGEYW6G.js.map +0 -1
- package/dist/chunk-T36RFODW.js.map +0 -1
- package/dist/chunk-TAGR72IR.js.map +0 -1
- package/dist/chunk-UNCOC7QH.js.map +0 -1
- package/dist/chunk-VCBHAE4R.js.map +0 -1
- package/dist/chunk-VEALDPHW.js.map +0 -1
- package/dist/chunk-VQNJ7UZL.js.map +0 -1
- package/dist/chunk-W2OG6JOL.js.map +0 -1
- package/dist/chunk-WNGGJWF7.js.map +0 -1
- package/dist/chunk-YJV2UZ7H.js.map +0 -1
- package/dist/chunk-YMUGBZN2.js.map +0 -1
- package/dist/chunk-YTGDPCPW.js.map +0 -1
- package/dist/chunk-ZEQWCBCM.js.map +0 -1
- package/dist/collection-facade-MJXSC3Q6.js +0 -44
- package/dist/cover-B5SJDHR3.js +0 -52
- package/dist/delegation-A5A75KQO.js +0 -25
- package/dist/derive-HJSMH7RA.js +0 -21
- package/dist/executor-AXE4XMLT.js +0 -26
- package/dist/executor-KGNLJD6M.js +0 -9
- package/dist/executor-XGIS6CR7.js +0 -9
- package/dist/export-accessible-VVBJM3MM.js +0 -23
- package/dist/extract-partition-LGGBTQET.js +0 -38
- package/dist/find-YS6XWB46.js +0 -11
- package/dist/in/index.js +0 -1
- package/dist/issue-LSR5PS6H.js +0 -19
- package/dist/legacy/bundle.d.ts +0 -30
- package/dist/liberate-GBSAYLPJ.js +0 -24
- package/dist/noydb-MTUBMWFE.js +0 -70
- 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-X462DNDM.js +0 -23
- package/dist/registry-3XMCT7MQ.js +0 -18
- package/dist/registry-KHD2I3M2.js +0 -19
- package/dist/registry-NPOWJHC4.js +0 -9
- package/dist/request-withdrawal-U7K3JTMY.js +0 -31
- package/dist/revoke-OCWDSWRQ.js +0 -24
- package/dist/seed-PWK45HDF.js.map +0 -1
- package/dist/signer-3YFBLZRN.js +0 -25
- package/dist/storage-W3GURVFU.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-Y3B2535F.js +0 -28
- /package/dist/{api-IQFZJSQO.js.map → api-ZDKTWNBB.js.map} +0 -0
- /package/dist/{backup-LU2DTZTI.js.map → backup-2UX7PRM5.js.map} +0 -0
- /package/dist/{chunk-IY23KFNZ.js.map → chunk-35NMVJ7I.js.map} +0 -0
- /package/dist/{chunk-RTEK4C4I.js.map → chunk-4JQK3L4V.js.map} +0 -0
- /package/dist/{chunk-3ELCWU56.js.map → chunk-4ZKNC6A6.js.map} +0 -0
- /package/dist/{chunk-VAIS3SOM.js.map → chunk-55LX6FSX.js.map} +0 -0
- /package/dist/{chunk-6HPG2YNX.js.map → chunk-5DRROK5W.js.map} +0 -0
- /package/dist/{chunk-S6Q37VGE.js.map → chunk-5GQEU4DN.js.map} +0 -0
- /package/dist/{chunk-TOPYT5U5.js.map → chunk-63FE525P.js.map} +0 -0
- /package/dist/{chunk-JVBO4SZL.js.map → chunk-6UBZ6I5Z.js.map} +0 -0
- /package/dist/{chunk-UFEVO57O.js.map → chunk-ABS7FMMD.js.map} +0 -0
- /package/dist/{chunk-M75ZZHSR.js.map → chunk-BLBAQRBM.js.map} +0 -0
- /package/dist/{chunk-G6EQYAL6.js.map → chunk-CI32CAFS.js.map} +0 -0
- /package/dist/{chunk-6B4DYGWO.js.map → chunk-DABACXEF.js.map} +0 -0
- /package/dist/{chunk-F6T6L2UK.js.map → chunk-DMH3VZU5.js.map} +0 -0
- /package/dist/{chunk-MQ6WOPSY.js.map → chunk-DZ2JXHWK.js.map} +0 -0
- /package/dist/{chunk-UBNCR3YK.js.map → chunk-EE7UHLKH.js.map} +0 -0
- /package/dist/{chunk-EGCRBCNA.js.map → chunk-EKRSCRNM.js.map} +0 -0
- /package/dist/{chunk-IRQY7IR5.js.map → chunk-FRMPM7WG.js.map} +0 -0
- /package/dist/{as/index.js.map → chunk-GJW4HX2O.js.map} +0 -0
- /package/dist/{chunk-T6GU5PPZ.js.map → chunk-GU3IP74F.js.map} +0 -0
- /package/dist/{chunk-SMIRGMS7.js.map → chunk-IXNCZTWA.js.map} +0 -0
- /package/dist/{chunk-RM2XV574.js.map → chunk-IXTSNGYY.js.map} +0 -0
- /package/dist/{chunk-PK6QCH2C.js.map → chunk-JJZGIE4U.js.map} +0 -0
- /package/dist/{chunk-DRWBEDYO.js.map → chunk-JYJFGD2H.js.map} +0 -0
- /package/dist/{chunk-KUIB4B5Q.js.map → chunk-LNZKOUJR.js.map} +0 -0
- /package/dist/{chunk-IM3QVF53.js.map → chunk-MBKVNOJS.js.map} +0 -0
- /package/dist/{chunk-N6WF5PKC.js.map → chunk-NFZGZ4AK.js.map} +0 -0
- /package/dist/{chunk-OF75ACKS.js.map → chunk-PEATRIYJ.js.map} +0 -0
- /package/dist/{chunk-N55W7KUL.js.map → chunk-QDIH2744.js.map} +0 -0
- /package/dist/{chunk-6HY2X62D.js.map → chunk-QJNCB5SK.js.map} +0 -0
- /package/dist/{chunk-2PCAVW2I.js.map → chunk-SHEEBRZ4.js.map} +0 -0
- /package/dist/{chunk-RA5VTXXG.js.map → chunk-V6UQZA2H.js.map} +0 -0
- /package/dist/{chunk-QDPZWTN2.js.map → chunk-W3G5REIU.js.map} +0 -0
- /package/dist/{chunk-WEYZTLXN.js.map → chunk-W3L64Y3J.js.map} +0 -0
- /package/dist/{chunk-CBSY2N76.js.map → chunk-WLXMTYGO.js.map} +0 -0
- /package/dist/{chunk-3U3FBR7O.js.map → chunk-X3F5YJG2.js.map} +0 -0
- /package/dist/{classified-marker-WQVIJAW2.js.map → classified-marker-7PKJBFCG.js.map} +0 -0
- /package/dist/{at/index.js.map → collection-facade-6I5K5IOD.js.map} +0 -0
- /package/dist/{bundle/index.js.map → computed-AB45PS4V.js.map} +0 -0
- /package/dist/{by → cover}/index.js.map +0 -0
- /package/dist/{in → custody}/index.js.map +0 -0
- /package/dist/{dead-filter-2A7IAJ3D.js.map → dead-filter-FL3WIUZS.js.map} +0 -0
- /package/dist/{chunk-CHFZDSE4.js.map → derive-VGS7FKE3.js.map} +0 -0
- /package/dist/{on → directory}/index.js.map +0 -0
- /package/dist/{collection-facade-MJXSC3Q6.js.map → enclave-SPEEDYZ4.js.map} +0 -0
- /package/dist/{computed-DSMPXG2Y.js.map → executor-IEBLTBCW.js.map} +0 -0
- /package/dist/{cover-B5SJDHR3.js.map → executor-OTF556PL.js.map} +0 -0
- /package/dist/{delegation-A5A75KQO.js.map → executor-RM7XWQDU.js.map} +0 -0
- /package/dist/{derive-HJSMH7RA.js.map → export-accessible-P42BQ4PB.js.map} +0 -0
- /package/dist/{enclave-7MW6ZGXW.js.map → extract-partition-TCYXRWBN.js.map} +0 -0
- /package/dist/{fanout-sidecar-WDYQ77VB.js.map → fanout-sidecar-SSMRSC2L.js.map} +0 -0
- /package/dist/{executor-AXE4XMLT.js.map → find-OZMTRIK3.js.map} +0 -0
- /package/dist/{ui → introspection}/index.js.map +0 -0
- /package/dist/{executor-KGNLJD6M.js.map → issue-FCKN5O6C.js.map} +0 -0
- /package/dist/{executor-XGIS6CR7.js.map → ledger-6XBEVWYP.js.map} +0 -0
- /package/dist/{export-accessible-VVBJM3MM.js.map → liberate-CYUOS4NC.js.map} +0 -0
- /package/dist/{extract-partition-LGGBTQET.js.map → link-set-NK6L2A5S.js.map} +0 -0
- /package/dist/{with → money}/index.js.map +0 -0
- /package/dist/{find-YS6XWB46.js.map → noydb-FZZIMLCI.js.map} +0 -0
- /package/dist/{issue-LSR5PS6H.js.map → policy/index.js.map} +0 -0
- /package/dist/{post-register-JVTMJ6OW.js.map → post-register-VFIYISUK.js.map} +0 -0
- /package/dist/{ledger-33BC4TR7.js.map → register-UKU2J6MN.js.map} +0 -0
- /package/dist/{liberate-GBSAYLPJ.js.map → registry-2VCWVHZS.js.map} +0 -0
- /package/dist/{link-set-QK22TDEX.js.map → registry-7Y5WF7GS.js.map} +0 -0
- /package/dist/{noydb-MTUBMWFE.js.map → registry-BWD2ED52.js.map} +0 -0
- /package/dist/{policy-NAHB2TUT.js.map → registry-DTWRJLSF.js.map} +0 -0
- /package/dist/{register-X462DNDM.js.map → request-withdrawal-JYDZ5XY2.js.map} +0 -0
- /package/dist/{reveal-LGBOM2BO.js.map → reveal-CL2BCW6A.js.map} +0 -0
- /package/dist/{registry-3XMCT7MQ.js.map → revoke-2TSAD2T4.js.map} +0 -0
- /package/dist/{registry-KHD2I3M2.js.map → schema-update/index.js.map} +0 -0
- /package/dist/{registry-NPOWJHC4.js.map → search/index.js.map} +0 -0
- /package/dist/{registry-VW6P6A3J.js.map → sequence/index.js.map} +0 -0
- /package/dist/{request-withdrawal-U7K3JTMY.js.map → signer-K7Z2EOMG.js.map} +0 -0
- /package/dist/{revoke-OCWDSWRQ.js.map → stale-A4J26OIC.js.map} +0 -0
- /package/dist/{signer-3YFBLZRN.js.map → storage-YVHZUISN.js.map} +0 -0
- /package/dist/{stale-FJED42DM.js.map → store/index.js.map} +0 -0
- /package/dist/{store-coordination-provider-APODTV4W.js.map → store-coordination-provider-EWRZL7XF.js.map} +0 -0
- /package/dist/{verify-26Y5GNMK.js.map → verify-7XWHJWUN.js.map} +0 -0
- /package/dist/{storage-W3GURVFU.js.map → walk-P5D6CF4V.js.map} +0 -0
- /package/dist/with-lookup/{aggregate → reduce}/canonical-key.d.ts +0 -0
- /package/dist/{with-party → with-sync}/tab-coordination.d.ts +0 -0
- /package/dist/{with-party → with-sync}/tab-write-relay.d.ts +0 -0
- /package/dist/{withdraw-accessible-Y3B2535F.js.map → withdraw-accessible-A2PWF5MZ.js.map} +0 -0
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
* groupBy doesn't need its own seam for the moment, because it
|
|
59
59
|
* delegates to the reducer protocol for all per-bucket state.
|
|
60
60
|
*/
|
|
61
|
-
import type {
|
|
61
|
+
import type { ReduceSpec, ReduceResult, ReductionUpstream, LiveReduction } from './reduction.js';
|
|
62
62
|
import type { ReducerBuilder } from './reducers.js';
|
|
63
63
|
import type { MoneyDescriptor } from '../../via/money/descriptor.js';
|
|
64
64
|
import type { ViaPipeline } from '../../kernel/via/pipeline.js';
|
|
@@ -78,7 +78,7 @@ export declare const GROUPBY_MAX_CARDINALITY = 100000;
|
|
|
78
78
|
*/
|
|
79
79
|
export declare function resetGroupByWarnings(): void;
|
|
80
80
|
/**
|
|
81
|
-
* Result row shape for a grouped
|
|
81
|
+
* Result row shape for a grouped reduction. Each row carries the
|
|
82
82
|
* group key value under the grouping field name plus every reducer
|
|
83
83
|
* output from the spec.
|
|
84
84
|
*
|
|
@@ -116,7 +116,7 @@ export type GroupedRowN<F extends readonly string[], R> = {
|
|
|
116
116
|
*/
|
|
117
117
|
declare abstract class GroupedQueryBase {
|
|
118
118
|
protected readonly executeRecords: () => readonly unknown[];
|
|
119
|
-
protected readonly upstreams: readonly
|
|
119
|
+
protected readonly upstreams: readonly ReductionUpstream[];
|
|
120
120
|
/**
|
|
121
121
|
* Optional dict label resolver attached by the query builder when
|
|
122
122
|
* the grouping field is a dictKey. Variadic groupings always pass
|
|
@@ -137,7 +137,7 @@ declare abstract class GroupedQueryBase {
|
|
|
137
137
|
* `[field]`.
|
|
138
138
|
*/
|
|
139
139
|
protected readonly fields: readonly string[];
|
|
140
|
-
constructor(executeRecords: () => readonly unknown[], fieldOrFields: string | readonly string[], upstreams: readonly
|
|
140
|
+
constructor(executeRecords: () => readonly unknown[], fieldOrFields: string | readonly string[], upstreams: readonly ReductionUpstream[],
|
|
141
141
|
/**
|
|
142
142
|
* Optional dict label resolver attached by the query builder when
|
|
143
143
|
* the grouping field is a dictKey. Variadic groupings always pass
|
|
@@ -152,21 +152,21 @@ declare abstract class GroupedQueryBase {
|
|
|
152
152
|
*/
|
|
153
153
|
via?: ViaPipeline | undefined);
|
|
154
154
|
/** Apply Via-aware reducer rewriting (e.g. money) when the source declares one. */
|
|
155
|
-
protected wrapSpec<Spec extends
|
|
155
|
+
protected wrapSpec<Spec extends ReduceSpec>(spec: Spec): Spec;
|
|
156
156
|
}
|
|
157
157
|
/**
|
|
158
158
|
* Chainable wrapper returned by `Query.groupBy(field)`. Terminates
|
|
159
|
-
* with `.aggregate(spec)` which returns a `
|
|
159
|
+
* with `.aggregate(spec)` which returns a `GroupedReduction`.
|
|
160
160
|
*
|
|
161
161
|
* Kept minimal — the only operation on a grouped query is
|
|
162
|
-
*
|
|
162
|
+
* reduction. Ordering, limiting, and further filtering belong on
|
|
163
163
|
* the underlying `Query` before `.groupBy()` is called; applying
|
|
164
164
|
* them post-group would be a different operation (`having` /
|
|
165
165
|
* `groupOrderBy`), out of scope for.
|
|
166
166
|
*/
|
|
167
167
|
export declare class GroupedQuery<T, F extends string, S extends keyof T = never, M extends keyof T & string = never> extends GroupedQueryBase {
|
|
168
168
|
/**
|
|
169
|
-
* Build a grouped
|
|
169
|
+
* Build a grouped reduction. Returns a `GroupedReduction`
|
|
170
170
|
* with `.run()`, `.runAsync()`, and `.live()` terminals — same shape
|
|
171
171
|
* as the non-grouped `.aggregate()` wrapper, just with an array
|
|
172
172
|
* result (one row per bucket) instead of a single reduced object.
|
|
@@ -178,8 +178,8 @@ export declare class GroupedQuery<T, F extends string, S extends keyof T = never
|
|
|
178
178
|
* declared `moneyFields` (`M`) member return a `MoneyString`. The
|
|
179
179
|
* bare-spec overload is preserved for backward compatibility.
|
|
180
180
|
*/
|
|
181
|
-
aggregate<Spec extends
|
|
182
|
-
aggregate<Spec extends
|
|
181
|
+
aggregate<Spec extends ReduceSpec>(spec: Spec): GroupedReduction<GroupedRow<F, ReduceResult<Spec>>>;
|
|
182
|
+
aggregate<Spec extends ReduceSpec>(build: (b: ReducerBuilder<T, S, M>) => Spec): GroupedReduction<GroupedRow<F, ReduceResult<Spec>>>;
|
|
183
183
|
}
|
|
184
184
|
/**
|
|
185
185
|
* Variadic-keyed sibling of `GroupedQuery<T, F>`. Constructed by the
|
|
@@ -187,12 +187,12 @@ export declare class GroupedQuery<T, F extends string, S extends keyof T = never
|
|
|
187
187
|
* identical — only the type-level result-row narrowing differs.
|
|
188
188
|
*/
|
|
189
189
|
export declare class GroupedQueryN<T, F extends readonly string[], S extends keyof T = never, M extends keyof T & string = never> extends GroupedQueryBase {
|
|
190
|
-
aggregate<Spec extends
|
|
191
|
-
aggregate<Spec extends
|
|
190
|
+
aggregate<Spec extends ReduceSpec>(spec: Spec): GroupedReduction<GroupedRowN<F, ReduceResult<Spec>>>;
|
|
191
|
+
aggregate<Spec extends ReduceSpec>(build: (b: ReducerBuilder<T, S, M>) => Spec): GroupedReduction<GroupedRowN<F, ReduceResult<Spec>>>;
|
|
192
192
|
}
|
|
193
193
|
/**
|
|
194
194
|
* Execute the group-and-reduce pipeline. Pure function over a
|
|
195
|
-
* record array and a spec — shared by `
|
|
195
|
+
* record array and a spec — shared by `GroupedReduction.run()`
|
|
196
196
|
* and the live-mode refresh path. Exported for tests and for any
|
|
197
197
|
* future `scan().groupBy().aggregate()` reuse.
|
|
198
198
|
*
|
|
@@ -201,10 +201,10 @@ export declare class GroupedQueryN<T, F extends readonly string[], S extends key
|
|
|
201
201
|
* bucket would be created — the consumer doesn't have to wait for
|
|
202
202
|
* the full partition to materialize before the error fires.
|
|
203
203
|
*/
|
|
204
|
-
export declare function groupAndReduce<R>(records: readonly unknown[], fieldOrFields: string | readonly string[], spec:
|
|
204
|
+
export declare function groupAndReduce<R>(records: readonly unknown[], fieldOrFields: string | readonly string[], spec: ReduceSpec, moneyFields?: Record<string, MoneyDescriptor>): R[];
|
|
205
205
|
/**
|
|
206
|
-
* Grouped
|
|
207
|
-
* terminal. Shape mirrors `
|
|
206
|
+
* Grouped reduction wrapper — the `.groupBy(field).aggregate(spec)`
|
|
207
|
+
* terminal. Shape mirrors `Reduction<R>` from aggregate.ts: two
|
|
208
208
|
* terminals (`.run()` and `.live()`), spec bound at construction
|
|
209
209
|
* time, upstreams collected for live mode.
|
|
210
210
|
*
|
|
@@ -212,7 +212,7 @@ export declare function groupAndReduce<R>(records: readonly unknown[], fieldOrFi
|
|
|
212
212
|
* grouped row), and the terminals return `R[]` — one row per
|
|
213
213
|
* bucket.
|
|
214
214
|
*/
|
|
215
|
-
export declare class
|
|
215
|
+
export declare class GroupedReduction<R> {
|
|
216
216
|
private readonly executeRecords;
|
|
217
217
|
private readonly spec;
|
|
218
218
|
private readonly upstreams;
|
|
@@ -222,7 +222,7 @@ export declare class GroupedAggregation<R> {
|
|
|
222
222
|
*/
|
|
223
223
|
private readonly dictLabelResolver?;
|
|
224
224
|
private readonly fields;
|
|
225
|
-
constructor(executeRecords: () => readonly unknown[], fields: string | readonly string[], spec:
|
|
225
|
+
constructor(executeRecords: () => readonly unknown[], fields: string | readonly string[], spec: ReduceSpec, upstreams: readonly ReductionUpstream[],
|
|
226
226
|
/**
|
|
227
227
|
* Optional dict label resolver for `<field>Label` projection
|
|
228
228
|
*. Present when the grouping field is a dictKey.
|
|
@@ -260,10 +260,10 @@ export declare class GroupedAggregation<R> {
|
|
|
260
260
|
fallback?: string | readonly string[];
|
|
261
261
|
}): Promise<R[]>;
|
|
262
262
|
/**
|
|
263
|
-
* Build a reactive `
|
|
263
|
+
* Build a reactive `LiveReduction<R[]>` that re-runs the full
|
|
264
264
|
* group-and-reduce pipeline whenever any upstream source notifies
|
|
265
265
|
* of a change. Same error-isolation and idempotent-stop contract
|
|
266
|
-
* as `
|
|
266
|
+
* as `Reduction.live()` — the implementation delegates to the
|
|
267
267
|
* same `LiveAggregationImpl` class by threading a fresh
|
|
268
268
|
* recompute closure through the existing constructor.
|
|
269
269
|
*
|
|
@@ -275,6 +275,6 @@ export declare class GroupedAggregation<R> {
|
|
|
275
275
|
*
|
|
276
276
|
* Always call `live.stop()` when finished.
|
|
277
277
|
*/
|
|
278
|
-
live():
|
|
278
|
+
live(): LiveReduction<R[]>;
|
|
279
279
|
}
|
|
280
280
|
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @noy-db/hub/reduce — opt-in reduction + groupBy service.
|
|
3
|
+
*
|
|
4
|
+
* @category capability
|
|
5
|
+
*
|
|
6
|
+
* Groups every file whose reason-for-existing is record reduction:
|
|
7
|
+
* - `reduction` (`Reduction<R>`, `reduceRecords`, `buildLiveReduction`)
|
|
8
|
+
* - `groupby` (`GroupedQuery`, `GroupedReduction`, cardinality guards)
|
|
9
|
+
* - `reducers` (`count`, `sum`, `avg`, `min`, `max` factories)
|
|
10
|
+
*
|
|
11
|
+
* The root barrel (`@noy-db/hub`) and the `@noy-db/hub/query` subpath
|
|
12
|
+
* continue to re-export the same symbols for backward compatibility
|
|
13
|
+
* with consumers written before the relocation. New code should
|
|
14
|
+
* prefer this subpath.
|
|
15
|
+
*/
|
|
16
|
+
export { withReduce } from './active.js';
|
|
17
|
+
export type { ReduceStrategy } from './strategy.js';
|
|
18
|
+
export { Reduction, reduceRecords, buildLiveReduction } from './reduction.js';
|
|
19
|
+
export type { ReduceSpec, ReduceResult, ReductionUpstream, LiveReduction, } from './reduction.js';
|
|
20
|
+
export { GroupedQuery, GroupedQueryN, GroupedReduction, groupAndReduce, resetGroupByWarnings, GROUPBY_WARN_CARDINALITY, GROUPBY_MAX_CARDINALITY, } from './groupby.js';
|
|
21
|
+
export type { GroupedRow, GroupedRowN } from './groupby.js';
|
|
22
|
+
export { count, sum, avg, min, max, moneySum, moneyMin, moneyMax, reducerBuilder } from './reducers.js';
|
|
23
|
+
export type { Reducer, ReducerOptions, ReducerBuilder } from './reducers.js';
|
|
24
|
+
/** The un-opted-in stub for this service — exported so callers can compare against it (#844). */
|
|
25
|
+
export { NO_REDUCE } from './strategy.js';
|
|
26
|
+
/**
|
|
27
|
+
* Types named by this entry's own signatures (#843a). `min`/`max` return a
|
|
28
|
+
* `MinMaxState`, and the money reducers speak `MoneyString`; both must be
|
|
29
|
+
* nameable from the entry that exports the functions, or a caller can invoke
|
|
30
|
+
* them and cannot annotate the result.
|
|
31
|
+
*/
|
|
32
|
+
export type { MinMaxState } from './reducers.js';
|
|
33
|
+
export type { MoneyString } from '../../via/money/branded.js';
|
|
34
|
+
export type { MoneyDescriptor } from '../../via/money/descriptor.js';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Reduction reducers for the query DSL.
|
|
3
3
|
*
|
|
4
4
|
* the reducer protocol plus five built-in factories
|
|
5
5
|
* (`count`, `sum`, `avg`, `min`, `max`) consumed by `Query.aggregate()`
|
|
6
6
|
* and, in the future, `Scan.aggregate()`. Every factory accepts
|
|
7
7
|
* an optional `{ seed }` parameter that is plumbed through the
|
|
8
8
|
* protocol but unused by the executor — that's the load-bearing
|
|
9
|
-
* half of constraint #2. When partition-aware
|
|
9
|
+
* half of constraint #2. When partition-aware reduction
|
|
10
10
|
* lands, the seed carries the previous partition's running total into
|
|
11
11
|
* the next partition without requiring a protocol change.
|
|
12
12
|
*
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* Reducers are pure data — `init` / `step` / `finalize` / optional
|
|
20
20
|
* `remove` are stateless functions that receive and return `S`. This
|
|
21
21
|
* is the shape that admits O(1) incremental maintenance in a future
|
|
22
|
-
* optimization (delta-aware `
|
|
22
|
+
* optimization (delta-aware `LiveReduction` applies `step` or
|
|
23
23
|
* `remove` per delta), without blocking the simpler "full re-run on
|
|
24
24
|
* source change" that ships.
|
|
25
25
|
*/
|
|
@@ -30,19 +30,19 @@ import type { QueryField } from '../../kernel/types.js';
|
|
|
30
30
|
* `.aggregate()` spec.
|
|
31
31
|
*
|
|
32
32
|
* Type parameters:
|
|
33
|
-
* - `R` — user-visible result type (what the
|
|
33
|
+
* - `R` — user-visible result type (what the reduction returns
|
|
34
34
|
* for this slot, e.g. `number` for `sum()`)
|
|
35
35
|
* - `S` — internal state type, defaults to `R` for simple reducers
|
|
36
36
|
* that don't need compound bookkeeping
|
|
37
37
|
*
|
|
38
38
|
* A reducer is stateless: every method is pure over `S`. `init()` is
|
|
39
|
-
* called once per
|
|
39
|
+
* called once per reduction run to build the initial state; `step()`
|
|
40
40
|
* folds a record into the state; `remove()` (optional) un-folds a
|
|
41
41
|
* record, enabling incremental live maintenance; `finalize()` reads
|
|
42
42
|
* the final answer out of the state at the end of the run.
|
|
43
43
|
*/
|
|
44
44
|
export interface Reducer<R, S = R> {
|
|
45
|
-
/** Build the initial state for a fresh
|
|
45
|
+
/** Build the initial state for a fresh reduction run. */
|
|
46
46
|
init(): S;
|
|
47
47
|
/** Fold a record into the state. Returns the new state. */
|
|
48
48
|
step(state: S, record: unknown): S;
|
|
@@ -63,7 +63,7 @@ export interface Reducer<R, S = R> {
|
|
|
63
63
|
* Combine two independent partial states into one (then `finalize` once).
|
|
64
64
|
* Optional. MUST be associative + commutative with `init()` as identity.
|
|
65
65
|
* Never merge finalized results — only states. Enables parallel /
|
|
66
|
-
* hierarchical
|
|
66
|
+
* hierarchical reduction (e.g. cross-shard or advisor→firm rollup).
|
|
67
67
|
*/
|
|
68
68
|
merge?(a: S, b: S): S;
|
|
69
69
|
/**
|
|
@@ -94,10 +94,10 @@ export interface Reducer<R, S = R> {
|
|
|
94
94
|
*
|
|
95
95
|
* `seed` — optional initial value for the internal state. **Unused by
|
|
96
96
|
* the executor**, plumbed through the protocol for constraint
|
|
97
|
-
* #2 (partition-aware
|
|
98
|
-
*
|
|
97
|
+
* #2 (partition-aware reduction seam). In, partitioned
|
|
98
|
+
* reductions will pass the previous partition's carry as `seed` so
|
|
99
99
|
* a long time series can be rolled forward one partition at a time
|
|
100
|
-
* without re-
|
|
100
|
+
* without re-reducing closed partitions.
|
|
101
101
|
*
|
|
102
102
|
* always uses `init()` with the factory's zero value, regardless
|
|
103
103
|
* of whether `seed` was passed. Do not remove the parameter — that's
|
|
@@ -156,7 +156,7 @@ export declare function avg(field: string, opts?: ReducerOptions<{
|
|
|
156
156
|
sum: number;
|
|
157
157
|
count: number;
|
|
158
158
|
}>;
|
|
159
|
-
interface MinMaxState {
|
|
159
|
+
export interface MinMaxState {
|
|
160
160
|
/**
|
|
161
161
|
* Multiset of contributing field values. Stored as a plain array
|
|
162
162
|
* because we need to support `remove` and a plain array gives us
|
|
@@ -254,4 +254,3 @@ export interface ReducerBuilder<T, S extends keyof T = never, M extends keyof T
|
|
|
254
254
|
* parameter-contravariance, so this single instance works for all `T`/`S`.
|
|
255
255
|
*/
|
|
256
256
|
export declare const reducerBuilder: ReducerBuilder<Record<string, unknown>>;
|
|
257
|
-
export {};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Aggregate execution — the runtime behind `Query.aggregate()`.
|
|
3
3
|
*
|
|
4
|
-
* takes an `
|
|
4
|
+
* takes an `ReduceSpec` (a record of named reducers
|
|
5
5
|
* built from `reducers.ts`) and runs every reducer over the records
|
|
6
6
|
* produced by the underlying query. Two terminal surfaces:
|
|
7
7
|
*
|
|
8
8
|
* - `.run(): R` — synchronous one-shot reduction. Matches the
|
|
9
9
|
* existing `Query.toArray()` / `.first()` / `.count()` style.
|
|
10
|
-
* - `.live():
|
|
10
|
+
* - `.live(): LiveReduction<R>` — reactive primitive that
|
|
11
11
|
* re-runs the reduction whenever the query's source notifies of
|
|
12
12
|
* a change. uses naive full re-run; incremental delta
|
|
13
13
|
* maintenance is admitted by the reducer protocol (`remove()`)
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* can switch from full re-run to delta-based without breaking
|
|
16
16
|
* the public API. Consumers get correct, reactive values today.
|
|
17
17
|
*
|
|
18
|
-
* The `
|
|
18
|
+
* The `Reduction<R>` wrapper is deliberately tiny — it exists so
|
|
19
19
|
* `.aggregate(spec)` can be chained with either `.run()` or `.live()`
|
|
20
20
|
* without the builder needing two separate terminal methods. It
|
|
21
21
|
* holds the closure over the query execution (produces the current
|
|
@@ -39,9 +39,9 @@ import type { Reducer } from './reducers.js';
|
|
|
39
39
|
* }
|
|
40
40
|
* ```
|
|
41
41
|
*/
|
|
42
|
-
export type
|
|
42
|
+
export type ReduceSpec = Readonly<Record<string, Reducer<unknown, unknown>>>;
|
|
43
43
|
/**
|
|
44
|
-
* Map an `
|
|
44
|
+
* Map an `ReduceSpec` to its reduced result shape — each key
|
|
45
45
|
* carries the finalized result type from its reducer. A spec built
|
|
46
46
|
* from `{ total: sum('amount'), n: count() }` yields a result of
|
|
47
47
|
* `{ total: number, n: number }`.
|
|
@@ -50,26 +50,26 @@ export type AggregateSpec = Readonly<Record<string, Reducer<unknown, unknown>>>;
|
|
|
50
50
|
* each `Reducer<R, _>`. The `infer` captures the user-visible result
|
|
51
51
|
* type, discarding the internal state type `S`.
|
|
52
52
|
*/
|
|
53
|
-
export type
|
|
53
|
+
export type ReduceResult<Spec extends ReduceSpec> = {
|
|
54
54
|
[K in keyof Spec]: Spec[K] extends Reducer<infer R, unknown> ? R : never;
|
|
55
55
|
};
|
|
56
56
|
/**
|
|
57
57
|
* Pure reduction over a record array. Runs every reducer's
|
|
58
58
|
* `init → step* → finalize` pipeline exactly once over the records.
|
|
59
59
|
*
|
|
60
|
-
* Called by `
|
|
60
|
+
* Called by `Reduction.run()` and by the live-mode refresh path.
|
|
61
61
|
* Exported for tests and for future `scan().aggregate()` reuse
|
|
62
62
|
* — the streaming path will call the same reducer protocol with a
|
|
63
63
|
* per-page loop instead of a single array.
|
|
64
64
|
*/
|
|
65
|
-
export declare function reduceRecords<Spec extends
|
|
65
|
+
export declare function reduceRecords<Spec extends ReduceSpec>(records: readonly unknown[], spec: Spec): ReduceResult<Spec>;
|
|
66
66
|
/**
|
|
67
|
-
* A minimal reactive primitive for
|
|
67
|
+
* A minimal reactive primitive for reduction results.
|
|
68
68
|
*
|
|
69
69
|
* Same spirit as the `LiveQuery` in : frame-agnostic, a plain
|
|
70
70
|
* object with `value` / `error` fields and a `subscribe(cb)`
|
|
71
71
|
* notification channel that Vue / React / Solid adapters wrap in
|
|
72
|
-
* their own primitive. Intentionally NOT a Promise —
|
|
72
|
+
* their own primitive. Intentionally NOT a Promise — reductions
|
|
73
73
|
* have a well-defined "current value" at every instant, and the
|
|
74
74
|
* reactive consumer wants to read that value synchronously.
|
|
75
75
|
*
|
|
@@ -86,7 +86,7 @@ export declare function reduceRecords<Spec extends AggregateSpec>(records: reado
|
|
|
86
86
|
* Always call `stop()` when done; Vue's `onUnmounted` is the
|
|
87
87
|
* canonical place. Raw consumers must do it themselves.
|
|
88
88
|
*/
|
|
89
|
-
export interface
|
|
89
|
+
export interface LiveReduction<R> {
|
|
90
90
|
/** Current reduced value. Undefined only if the first compute threw. */
|
|
91
91
|
readonly value: R | undefined;
|
|
92
92
|
/** Last execution error, if any. Cleared on the next successful run. */
|
|
@@ -97,14 +97,14 @@ export interface LiveAggregation<R> {
|
|
|
97
97
|
stop(): void;
|
|
98
98
|
}
|
|
99
99
|
/**
|
|
100
|
-
* Upstream change-notification hook for live
|
|
100
|
+
* Upstream change-notification hook for live reduction.
|
|
101
101
|
*
|
|
102
102
|
* Matches the shape that `QuerySource.subscribe` already uses — a
|
|
103
103
|
* single method that accepts a callback and returns an unsubscribe
|
|
104
|
-
* function. The `
|
|
104
|
+
* function. The `Reduction` wrapper collects upstreams from the
|
|
105
105
|
* query's source and wires them into a single re-run trigger.
|
|
106
106
|
*/
|
|
107
|
-
export interface
|
|
107
|
+
export interface ReductionUpstream {
|
|
108
108
|
subscribe(cb: () => void): () => void;
|
|
109
109
|
}
|
|
110
110
|
/**
|
|
@@ -120,14 +120,14 @@ export interface AggregationUpstream {
|
|
|
120
120
|
* `.aggregate(spec).live()`. Wrapping lets the spec be named once
|
|
121
121
|
* and reused for either terminal, and keeps the `Query` class
|
|
122
122
|
* from growing a pair of near-duplicate method overloads
|
|
123
|
-
* (`
|
|
123
|
+
* (`reduceRun` / `reduceLive`) that would be harder to
|
|
124
124
|
* discover.
|
|
125
125
|
*/
|
|
126
|
-
export declare class
|
|
126
|
+
export declare class Reduction<R> {
|
|
127
127
|
private readonly executeRecords;
|
|
128
128
|
private readonly spec;
|
|
129
129
|
private readonly upstreams;
|
|
130
|
-
constructor(executeRecords: () => readonly unknown[], spec:
|
|
130
|
+
constructor(executeRecords: () => readonly unknown[], spec: ReduceSpec, upstreams: readonly ReductionUpstream[]);
|
|
131
131
|
/**
|
|
132
132
|
* Execute the query and reduce the results synchronously.
|
|
133
133
|
* Returns the reduced shape matching the spec — e.g. a spec of
|
|
@@ -136,7 +136,7 @@ export declare class Aggregation<R> {
|
|
|
136
136
|
*/
|
|
137
137
|
run(): R;
|
|
138
138
|
/**
|
|
139
|
-
* Build a reactive `
|
|
139
|
+
* Build a reactive `LiveReduction<R>` that re-runs the reduction
|
|
140
140
|
* whenever any upstream source notifies of a change. The initial
|
|
141
141
|
* value is computed eagerly in the constructor, so consumers can
|
|
142
142
|
* read `live.value` immediately after calling `.live()`.
|
|
@@ -153,14 +153,14 @@ export declare class Aggregation<R> {
|
|
|
153
153
|
* correct, reactive values today; future PRs can switch to
|
|
154
154
|
* delta-based maintenance without changing this API.
|
|
155
155
|
*/
|
|
156
|
-
live():
|
|
156
|
+
live(): LiveReduction<R>;
|
|
157
157
|
}
|
|
158
158
|
/**
|
|
159
|
-
* Build a `
|
|
159
|
+
* Build a `LiveReduction<V>` from a recompute closure and a list
|
|
160
160
|
* of upstreams. Exposed so sibling files in the query DSL
|
|
161
161
|
* (currently `groupby.ts`) can reuse the reactive primitive
|
|
162
162
|
* without reaching into `LiveAggregationImpl` directly. This keeps
|
|
163
163
|
* the implementation class private while still allowing planned
|
|
164
164
|
* composition with `.groupBy().aggregate().live()`.
|
|
165
165
|
*/
|
|
166
|
-
export declare function
|
|
166
|
+
export declare function buildLiveReduction<V>(recompute: () => V, upstreams: readonly ReductionUpstream[]): LiveReduction<V>;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Strategy seam between the core Query / ScanBuilder chain and the
|
|
3
3
|
* optional aggregate / groupBy service. Core imports
|
|
4
|
-
* `
|
|
4
|
+
* `ReduceStrategy` as a TYPE-ONLY symbol and `NO_REDUCE` as a
|
|
5
5
|
* tiny runtime stub.
|
|
6
6
|
*
|
|
7
|
-
* The heavy machinery — `
|
|
8
|
-
* reducer-step logic — is only reachable from `
|
|
7
|
+
* The heavy machinery — `Reduction`, `GroupedQuery`, the
|
|
8
|
+
* reducer-step logic — is only reachable from `withReduce()` in
|
|
9
9
|
* `./active.ts`, which is only exported through the
|
|
10
|
-
* `@noy-db/hub/
|
|
10
|
+
* `@noy-db/hub/reduce` subpath. Consumers that don't import the
|
|
11
11
|
* subpath ship none of the ~886 LOC.
|
|
12
12
|
*
|
|
13
13
|
* @internal
|
|
14
14
|
*/
|
|
15
|
-
import type {
|
|
15
|
+
import type { Reduction, ReduceSpec, ReduceResult, ReductionUpstream } from './reduction.js';
|
|
16
16
|
import type { GroupedQuery, GroupedQueryN } from './groupby.js';
|
|
17
17
|
import type { ViaPipeline } from '../../kernel/via/pipeline.js';
|
|
18
18
|
/**
|
|
@@ -21,39 +21,39 @@ import type { ViaPipeline } from '../../kernel/via/pipeline.js';
|
|
|
21
21
|
*
|
|
22
22
|
* @internal
|
|
23
23
|
*/
|
|
24
|
-
export interface
|
|
24
|
+
export interface ReduceStrategy {
|
|
25
25
|
/**
|
|
26
|
-
* Build an `
|
|
26
|
+
* Build an `Reduction<R>` for `Query.aggregate(spec)`. `executeRecords`
|
|
27
27
|
* is a closure that produces the matching record set when the
|
|
28
|
-
*
|
|
29
|
-
* constructs a real `
|
|
28
|
+
* reduction runs. NO_REDUCE throws; the active strategy
|
|
29
|
+
* constructs a real `Reduction`.
|
|
30
30
|
*/
|
|
31
|
-
aggregate<Spec extends
|
|
31
|
+
aggregate<Spec extends ReduceSpec>(executeRecords: () => readonly unknown[], spec: Spec, upstreams: readonly ReductionUpstream[]): Reduction<ReduceResult<Spec>>;
|
|
32
32
|
/**
|
|
33
33
|
* Build a `GroupedQuery<T, F, S>` for `Query.groupBy(field)`. Same
|
|
34
34
|
* closure / upstream inputs as `aggregate` plus the group key field.
|
|
35
35
|
*/
|
|
36
|
-
groupBy<T, F extends string, S extends keyof T = never, M extends keyof T & string = never>(executeRecords: () => readonly unknown[], field: F, upstreams: readonly
|
|
36
|
+
groupBy<T, F extends string, S extends keyof T = never, M extends keyof T & string = never>(executeRecords: () => readonly unknown[], field: F, upstreams: readonly ReductionUpstream[], dictLabelResolver?: (key: string, locale: string, fallback?: string | readonly string[]) => Promise<string | undefined>, via?: ViaPipeline): GroupedQuery<T, F, S, M>;
|
|
37
37
|
/**
|
|
38
38
|
* Variadic-keyed sibling — builds a `GroupedQueryN<T, F, S>` for
|
|
39
39
|
* `Query.groupBy(...fields)`. No dictLabelResolver — `<field>Label`
|
|
40
40
|
* projection only applies to single-field groupings, which dispatch
|
|
41
41
|
* through `groupBy` above.
|
|
42
42
|
*/
|
|
43
|
-
groupByN<T, F extends readonly string[], S extends keyof T = never, M extends keyof T & string = never>(executeRecords: () => readonly unknown[], fields: F, upstreams: readonly
|
|
43
|
+
groupByN<T, F extends readonly string[], S extends keyof T = never, M extends keyof T & string = never>(executeRecords: () => readonly unknown[], fields: F, upstreams: readonly ReductionUpstream[], via?: ViaPipeline): GroupedQueryN<T, F, S, M>;
|
|
44
44
|
/**
|
|
45
45
|
* Terminal streaming aggregator for `ScanBuilder.aggregate(spec)`.
|
|
46
46
|
* Takes an async iterable of decrypted records + the spec and
|
|
47
47
|
* returns the reduced result.
|
|
48
48
|
*/
|
|
49
|
-
scanAggregate<Spec extends
|
|
49
|
+
scanAggregate<Spec extends ReduceSpec>(iter: AsyncIterable<unknown>, spec: Spec): Promise<ReduceResult<Spec>>;
|
|
50
50
|
}
|
|
51
51
|
/**
|
|
52
52
|
* No-aggregate stub. Every `.aggregate()` / `.groupBy()` / streaming
|
|
53
53
|
* `scan().aggregate()` call throws with a pointer at the subpath. The
|
|
54
|
-
* real `
|
|
54
|
+
* real `Reduction` / `GroupedQuery` classes are never referenced at
|
|
55
55
|
* runtime, so the bundler drops the ~886 LOC.
|
|
56
56
|
*
|
|
57
57
|
* @internal
|
|
58
58
|
*/
|
|
59
|
-
export declare const
|
|
59
|
+
export declare const NO_REDUCE: ReduceStrategy;
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import type { I18nTextDescriptor } from '../../via/i18n/core.js';
|
|
2
2
|
import type { DictKeyDescriptor, StaticDictDescriptor } from '../../via/i18n/dictionary.js';
|
|
3
3
|
import type { IndexDoc } from './inverted-index.js';
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* One entry in an {@link IndexDoc}'s `fields` array — the return shape of the
|
|
6
|
+
* `build*FieldEntries` helpers. Exported so `@noy-db/hub/search` can name the
|
|
7
|
+
* return type of its own public functions (#843 C1: the subpath's first
|
|
8
|
+
* type-reachability gap).
|
|
9
|
+
*/
|
|
10
|
+
export type FieldEntry = IndexDoc['fields'][number];
|
|
5
11
|
export declare function buildStringFieldEntries(record: Record<string, unknown>, textIndexes: readonly string[], only?: readonly string[]): FieldEntry[];
|
|
6
12
|
export declare function buildI18nFieldEntries(record: Record<string, unknown>, i18nFields: Record<string, I18nTextDescriptor>, textIndexes: readonly string[], only?: readonly string[]): FieldEntry[];
|
|
7
13
|
/** label map: field -> (key -> { locale -> label }). Precomputed in the collection (async for dynamic dicts). */
|
|
@@ -12,4 +18,3 @@ export declare function buildDictKeyFieldEntries(record: Record<string, unknown>
|
|
|
12
18
|
* caller). Bytes are never tokenized; only the slot `filename` is indexed.
|
|
13
19
|
*/
|
|
14
20
|
export declare function buildBlobFieldEntries(filenamesByField: Map<string, string[]>): FieldEntry[];
|
|
15
|
-
export {};
|
|
@@ -11,7 +11,7 @@ export { segmentTokens, segmentTokenizer, type Token } from './segment.js';
|
|
|
11
11
|
export { InvertedIndex, type IndexDoc, type IndexHit, type QueryOptions } from './inverted-index.js';
|
|
12
12
|
export { extractSnippet } from './snippet.js';
|
|
13
13
|
export { MemoryIndexStore, type IndexStore } from './index-store.js';
|
|
14
|
-
export { buildStringFieldEntries } from './build-docs.js';
|
|
14
|
+
export { buildStringFieldEntries, type FieldEntry } from './build-docs.js';
|
|
15
15
|
export type { RetrieveOptions, RetrieveHit } from './retrieve-types.js';
|
|
16
16
|
export { fuseRetrieval, type FuseOptions } from './fuse.js';
|
|
17
17
|
export { withSearch } from './active.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `_broker` reserved-collection seed lifecycle (#479, credential-broker
|
|
3
|
-
* spec §2/§3). Modeled on `with-
|
|
3
|
+
* spec §2/§3). Modeled on `with-sync/credentials.ts`: a
|
|
4
4
|
* `_`-prefixed reserved collection, record id = `brokerId`, encrypted under
|
|
5
5
|
* the collection's own DEK, `requireAdminAccess` role gate (owner/admin
|
|
6
6
|
* only — custodian intentionally excluded, same rationale as
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
* unseal the original sealed owner. The old sealed-owner credential is left
|
|
25
25
|
* untouched and ORPHANED (its `_keyring/<id>` file remains, its KEK is still
|
|
26
26
|
* sealed under the non-firm provider), never impersonated. The new owner is a
|
|
27
|
-
* DISTINCT principal under a fresh KEK derived from `
|
|
27
|
+
* DISTINCT principal under a fresh KEK derived from `newOwnerSecret`. This
|
|
28
28
|
* preserves the inalienability floor: the act of claiming ownership is itself
|
|
29
29
|
* auditable and produces a different principal, rather than silently assuming
|
|
30
30
|
* the latent owner's identity.
|
|
@@ -47,8 +47,8 @@ import type { FrozenSnapshotRef } from '../../with-audit/portability/withdraw-ac
|
|
|
47
47
|
export interface LiberateOptions {
|
|
48
48
|
/** The id of the new owner principal the custodian mints by claiming ownership. */
|
|
49
49
|
readonly newOwnerId: string;
|
|
50
|
-
/** The
|
|
51
|
-
readonly
|
|
50
|
+
/** The secret that derives the new owner's KEK (the DEKs are re-wrapped under it). */
|
|
51
|
+
readonly newOwnerSecret: string;
|
|
52
52
|
/** Legal/contractual basis recorded in the audit (e.g. 'contractual-handover'). */
|
|
53
53
|
readonly legalBasis: string;
|
|
54
54
|
readonly factors?: FactorProofBundle;
|
|
@@ -8,12 +8,8 @@
|
|
|
8
8
|
*/
|
|
9
9
|
export type { Cover, CoverText, CoverSchema, CoverField, JsonValue, ResolvedCoverSchema, } from './types.js';
|
|
10
10
|
export { COVER_FIELDS, DEFAULT_COVER_SCHEMA, resolveSchema, } from './types.js';
|
|
11
|
+
export { resolveSchema as resolveCoverSchema } from './types.js';
|
|
11
12
|
export type { SetCoverInput } from './schema.js';
|
|
12
13
|
export { validateCoverInput, isCover } from './schema.js';
|
|
13
14
|
export { mergeCustom, validateCoverSize } from './custom.js';
|
|
14
15
|
export { loadCover, saveCover, readCover, resolveLocale, pickLocale, COVER_RECORD_ID, } from './storage.js';
|
|
15
|
-
export type { PublicEnvelope, PublicEnvelopeText, PublicEnvelopeSchema, PublicEnvelopeField, ResolvedPublicEnvelopeSchema, } from './types.js';
|
|
16
|
-
export { PUBLIC_ENVELOPE_FIELDS, DEFAULT_PUBLIC_ENVELOPE_SCHEMA, } from './types.js';
|
|
17
|
-
export type { SetPublicEnvelopeInput } from './schema.js';
|
|
18
|
-
export { validatePublicEnvelopeInput, isPublicEnvelope } from './schema.js';
|
|
19
|
-
export { loadPublicEnvelope, savePublicEnvelope, readPublicEnvelope, PUBLIC_ENVELOPE_RECORD_ID, } from './storage.js';
|
|
@@ -31,9 +31,3 @@ export declare function validateCoverInput(input: SetCoverInput, schema: Resolve
|
|
|
31
31
|
* discriminator keeps its frozen name: `_noydb_public: 1`.)
|
|
32
32
|
*/
|
|
33
33
|
export declare function isCover(x: unknown): x is Cover;
|
|
34
|
-
/** @deprecated Use {@link SetCoverInput}. */
|
|
35
|
-
export type SetPublicEnvelopeInput = SetCoverInput;
|
|
36
|
-
/** @deprecated Use {@link validateCoverInput}. */
|
|
37
|
-
export declare const validatePublicEnvelopeInput: typeof validateCoverInput;
|
|
38
|
-
/** @deprecated Use {@link isCover}. */
|
|
39
|
-
export declare const isPublicEnvelope: typeof isCover;
|
|
@@ -61,11 +61,3 @@ export declare function resolveLocale(cover: Cover, locale: string): Cover;
|
|
|
61
61
|
* This deviation is documented in `https://github.com/vLannaAi/noy-db-docs/blob/main/content/docs/services/public-envelope.md`.
|
|
62
62
|
*/
|
|
63
63
|
export declare function pickLocale(value: string | Record<string, string>, locale: string, defaultLocale: string | undefined): string;
|
|
64
|
-
/** @deprecated Use {@link COVER_RECORD_ID}. */
|
|
65
|
-
export declare const PUBLIC_ENVELOPE_RECORD_ID = "public-envelope";
|
|
66
|
-
/** @deprecated Use {@link loadCover}. */
|
|
67
|
-
export declare const loadPublicEnvelope: typeof loadCover;
|
|
68
|
-
/** @deprecated Use {@link saveCover}. */
|
|
69
|
-
export declare const savePublicEnvelope: typeof saveCover;
|
|
70
|
-
/** @deprecated Use {@link readCover}. */
|
|
71
|
-
export declare const readPublicEnvelope: typeof readCover;
|
|
@@ -126,24 +126,3 @@ export interface ResolvedCoverSchema {
|
|
|
126
126
|
* overrides the keys it provides.
|
|
127
127
|
*/
|
|
128
128
|
export declare function resolveSchema(schema: true | CoverSchema | undefined): ResolvedCoverSchema | undefined;
|
|
129
|
-
/** @deprecated Use {@link Cover}. */
|
|
130
|
-
export type PublicEnvelope = Cover;
|
|
131
|
-
/** @deprecated Use {@link CoverText}. */
|
|
132
|
-
export type PublicEnvelopeText = CoverText;
|
|
133
|
-
/** @deprecated Use {@link CoverField}. */
|
|
134
|
-
export type PublicEnvelopeField = CoverField;
|
|
135
|
-
/** @deprecated Use {@link CoverSchema}. */
|
|
136
|
-
export type PublicEnvelopeSchema = CoverSchema;
|
|
137
|
-
/** @deprecated Use {@link ResolvedCoverSchema}. */
|
|
138
|
-
export type ResolvedPublicEnvelopeSchema = ResolvedCoverSchema;
|
|
139
|
-
/** @deprecated Use {@link COVER_FIELDS}. */
|
|
140
|
-
export declare const PUBLIC_ENVELOPE_FIELDS: readonly ["name", "description", "icon", "createdAt", "updatedAt", "defaultLocale", "custom"];
|
|
141
|
-
/** @deprecated Use {@link DEFAULT_COVER_SCHEMA}. */
|
|
142
|
-
export declare const DEFAULT_PUBLIC_ENVELOPE_SCHEMA: {
|
|
143
|
-
readonly fields: readonly ["name", "description", "icon", "createdAt", "updatedAt", "defaultLocale"];
|
|
144
|
-
readonly maxIconBytes: number;
|
|
145
|
-
readonly iconMimeTypes: readonly ["image/png", "image/svg+xml"];
|
|
146
|
-
readonly maxStringChars: 200;
|
|
147
|
-
readonly maxCustomBytes: number;
|
|
148
|
-
readonly maxCoverBytes: number;
|
|
149
|
-
};
|
|
@@ -7,5 +7,7 @@
|
|
|
7
7
|
* @module
|
|
8
8
|
*/
|
|
9
9
|
export type { DirectoryConfig, UserVisibility } from './types.js';
|
|
10
|
+
export { loadUserEnvelope, saveUserEnvelope, deleteUserEnvelope, listUserEnvelopeIds, } from './user-envelope/storage.js';
|
|
11
|
+
export { UserApi } from './user-envelope/api.js';
|
|
10
12
|
export { readDirectoryConfig, persistDirectoryConfig, META_COLLECTION, DIRECTORY_RECORD_ID, } from './storage.js';
|
|
11
13
|
export { readUserVisibility, persistUserVisibility, deleteUserVisibility, visibilityRecordId, VISIBILITY_RECORD_PREFIX, } from './visibility.js';
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* Dev-mode persistent unlock —
|
|
3
3
|
*
|
|
4
4
|
* Solves the developer inner-loop friction: hot-reload destroys the session
|
|
5
|
-
* (page navigation semantics), forcing a
|
|
5
|
+
* (page navigation semantics), forcing a secret re-entry every refresh.
|
|
6
6
|
*
|
|
7
7
|
* This module provides an opt-in, deliberately-named escape hatch that lets
|
|
8
8
|
* developers store the keyring payload in sessionStorage or localStorage so
|
|
9
|
-
* the vault auto-unlocks on every page load — without a
|
|
9
|
+
* the vault auto-unlocks on every page load — without a secret,
|
|
10
10
|
* without a biometric prompt, without any OIDC flow.
|
|
11
11
|
*
|
|
12
12
|
* ⚠️ WARNING — this is a loaded footgun ⚠️
|
|
@@ -21,3 +21,5 @@ export type { DevUnlockOptions } from './dev-unlock.js';
|
|
|
21
21
|
export { withSession } from './active.js';
|
|
22
22
|
export type { SessionStrategy } from './strategy.js';
|
|
23
23
|
export { SessionExpiredError, SessionNotFoundError, SessionPolicyError, } from '../../kernel/errors.js';
|
|
24
|
+
/** The un-opted-in stub for this service — exported so callers can compare against it (#844). */
|
|
25
|
+
export { NO_SESSION } from './strategy.js';
|