@noy-db/hub 0.1.0-pre.9 → 0.2.0-pre.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/aggregate/index.cjs +100 -36
- package/dist/aggregate/index.cjs.map +1 -1
- package/dist/aggregate/index.d.cts +2 -2
- package/dist/aggregate/index.d.ts +2 -2
- package/dist/aggregate/index.js +16 -9
- package/dist/aggregate/index.js.map +1 -1
- package/dist/attestation/index.cjs +305 -0
- package/dist/attestation/index.cjs.map +1 -0
- package/dist/attestation/index.d.cts +52 -0
- package/dist/attestation/index.d.ts +52 -0
- package/dist/attestation/index.js +36 -0
- package/dist/attestation/index.js.map +1 -0
- package/dist/blobs/index.cjs.map +1 -1
- package/dist/blobs/index.d.cts +7 -6
- package/dist/blobs/index.d.ts +7 -6
- package/dist/blobs/index.js +10 -8
- package/dist/blobs/index.js.map +1 -1
- package/dist/bundle/index.cjs +19121 -60
- package/dist/bundle/index.cjs.map +1 -1
- package/dist/bundle/index.d.cts +175 -6
- package/dist/bundle/index.d.ts +175 -6
- package/dist/bundle/index.js +543 -4
- package/dist/bundle/index.js.map +1 -1
- package/dist/chunk-26NK23DZ.js +296 -0
- package/dist/chunk-26NK23DZ.js.map +1 -0
- package/dist/{chunk-TDR6T5CJ.js → chunk-2LPPNWF6.js} +91 -132
- package/dist/chunk-2LPPNWF6.js.map +1 -0
- package/dist/{chunk-PTVMYYON.js → chunk-2N62W5YP.js} +3 -3
- package/dist/{chunk-QGZRWRSL.js → chunk-3LPV6BXR.js} +4 -4
- package/dist/{chunk-QAVUREFT.js → chunk-4CLICFEY.js} +12 -6
- package/dist/chunk-4CLICFEY.js.map +1 -0
- package/dist/chunk-4USCAEDT.js +10529 -0
- package/dist/chunk-4USCAEDT.js.map +1 -0
- package/dist/chunk-5IXJGFF2.js +83 -0
- package/dist/chunk-5IXJGFF2.js.map +1 -0
- package/dist/chunk-5OEJ6GOT.js +124 -0
- package/dist/chunk-5OEJ6GOT.js.map +1 -0
- package/dist/{chunk-4PWAI7Q4.js → chunk-5OX6XVNS.js} +5 -5
- package/dist/{chunk-2CSJGFCB.js → chunk-6EOXTJS2.js} +6 -229
- package/dist/chunk-6EOXTJS2.js.map +1 -0
- package/dist/chunk-6T2UDBKG.js +53 -0
- package/dist/chunk-6T2UDBKG.js.map +1 -0
- package/dist/{chunk-GOUT6DND.js → chunk-6YLPHBKR.js} +382 -95
- package/dist/chunk-6YLPHBKR.js.map +1 -0
- package/dist/chunk-7CEGU63S.js +179 -0
- package/dist/chunk-7CEGU63S.js.map +1 -0
- package/dist/chunk-A3JMGXPG.js +125 -0
- package/dist/chunk-A3JMGXPG.js.map +1 -0
- package/dist/chunk-BB27JMWB.js +795 -0
- package/dist/chunk-BB27JMWB.js.map +1 -0
- package/dist/{chunk-SCZXXXU4.js → chunk-BDV7INMP.js} +7 -32
- package/dist/chunk-BDV7INMP.js.map +1 -0
- package/dist/chunk-C3WE6UJY.js +19 -0
- package/dist/chunk-C3WE6UJY.js.map +1 -0
- package/dist/chunk-CH22FZHT.js +96 -0
- package/dist/chunk-CH22FZHT.js.map +1 -0
- package/dist/chunk-CXFOITNS.js +34 -0
- package/dist/chunk-CXFOITNS.js.map +1 -0
- package/dist/chunk-CXJG63MA.js +109 -0
- package/dist/chunk-CXJG63MA.js.map +1 -0
- package/dist/chunk-DAP2XL7Q.js +51 -0
- package/dist/chunk-DAP2XL7Q.js.map +1 -0
- package/dist/{chunk-AVVPZ4BC.js → chunk-DJRWA3Q5.js} +4 -4
- package/dist/chunk-DRXIZOFV.js +233 -0
- package/dist/chunk-DRXIZOFV.js.map +1 -0
- package/dist/chunk-FO3UEG4S.js +313 -0
- package/dist/chunk-FO3UEG4S.js.map +1 -0
- package/dist/chunk-GAUEWM7D.js +147 -0
- package/dist/chunk-GAUEWM7D.js.map +1 -0
- package/dist/{chunk-MDDTIZUO.js → chunk-GNHAC43Q.js} +218 -119
- package/dist/chunk-GNHAC43Q.js.map +1 -0
- package/dist/chunk-HHOO7HGH.js +57 -0
- package/dist/chunk-HHOO7HGH.js.map +1 -0
- package/dist/{chunk-WDM5XGGS.js → chunk-HQSQC2XL.js} +182 -12
- package/dist/chunk-HQSQC2XL.js.map +1 -0
- package/dist/chunk-IMYKDWB4.js +139 -0
- package/dist/chunk-IMYKDWB4.js.map +1 -0
- package/dist/{chunk-M62XNWRA.js → chunk-LSTBFLL2.js} +2 -2
- package/dist/{chunk-ACLDOTNQ.js → chunk-O6EJ6WTI.js} +436 -3
- package/dist/chunk-O6EJ6WTI.js.map +1 -0
- package/dist/chunk-PC6ZEDRL.js +71 -0
- package/dist/chunk-PC6ZEDRL.js.map +1 -0
- package/dist/chunk-PM3QYWUU.js +251 -0
- package/dist/chunk-PM3QYWUU.js.map +1 -0
- package/dist/chunk-PVUUIWHY.js +73 -0
- package/dist/chunk-PVUUIWHY.js.map +1 -0
- package/dist/chunk-PXTQPZO4.js +830 -0
- package/dist/chunk-PXTQPZO4.js.map +1 -0
- package/dist/{chunk-ZFKD4QMV.js → chunk-QSOYKKMD.js} +4 -4
- package/dist/chunk-QSOYKKMD.js.map +1 -0
- package/dist/{chunk-MR4424N3.js → chunk-R233SLY3.js} +2 -2
- package/dist/chunk-RC6SU5NO.js +36 -0
- package/dist/chunk-RC6SU5NO.js.map +1 -0
- package/dist/{chunk-USKYUS74.js → chunk-RRNA5GKT.js} +2 -2
- package/dist/{chunk-R36SIKES.js → chunk-RYIL3PI2.js} +2 -2
- package/dist/chunk-STNPB3UM.js +9 -0
- package/dist/chunk-STNPB3UM.js.map +1 -0
- package/dist/{chunk-M5INGEFC.js → chunk-TV3YZ35S.js} +7 -1
- package/dist/chunk-TV3YZ35S.js.map +1 -0
- package/dist/chunk-TY32C732.js +59 -0
- package/dist/chunk-TY32C732.js.map +1 -0
- package/dist/chunk-UMLVJTYV.js +20 -0
- package/dist/chunk-UMLVJTYV.js.map +1 -0
- package/dist/{chunk-NPC4LFV5.js → chunk-WIBHRONM.js} +2 -2
- package/dist/chunk-WIBHRONM.js.map +1 -0
- package/dist/{chunk-RKJ6OL7K.js → chunk-WIRRPTFH.js} +1 -1
- package/dist/chunk-WIRRPTFH.js.map +1 -0
- package/dist/{chunk-VQBTTTUN.js → chunk-Y26YV5R3.js} +4 -4
- package/dist/{chunk-VQBTTTUN.js.map → chunk-Y26YV5R3.js.map} +1 -1
- package/dist/{chunk-NXFEYLVG.js → chunk-YM7LFCG7.js} +5 -4
- package/dist/{chunk-NXFEYLVG.js.map → chunk-YM7LFCG7.js.map} +1 -1
- package/dist/{chunk-CIMZBAZB.js → chunk-Z6FNBOTC.js} +1 -1
- package/dist/chunk-Z6FNBOTC.js.map +1 -0
- package/dist/chunk-ZROPXHJY.js +82 -0
- package/dist/chunk-ZROPXHJY.js.map +1 -0
- package/dist/consent/index.cjs.map +1 -1
- package/dist/consent/index.d.cts +7 -6
- package/dist/consent/index.d.ts +7 -6
- package/dist/consent/index.js +3 -3
- package/dist/{crypto-IVKU7YTT.js → crypto-2CRLG4F4.js} +3 -3
- package/dist/{delegation-2DBS2EOH.js → delegation-ZTRT2PRV.js} +5 -4
- package/dist/derivations/index.cjs +368 -0
- package/dist/derivations/index.cjs.map +1 -0
- package/dist/derivations/index.d.cts +72 -0
- package/dist/derivations/index.d.ts +72 -0
- package/dist/derivations/index.js +27 -0
- package/dist/{dev-unlock-Da1B0TIK.d.cts → dev-unlock-AglVnkPY.d.cts} +1 -1
- package/dist/{dev-unlock-BdPp68qn.d.ts → dev-unlock-BOEYl1xl.d.ts} +1 -1
- package/dist/discriminant-BN9REW3o.d.cts +60 -0
- package/dist/discriminant-BN9REW3o.d.ts +60 -0
- package/dist/executor-S76VN45G.js +8 -0
- package/dist/executor-UCXLIGLW.js +11 -0
- package/dist/executor-UCXLIGLW.js.map +1 -0
- package/dist/executor-ZCNZJMGR.js +8 -0
- package/dist/executor-ZCNZJMGR.js.map +1 -0
- package/dist/fanout-sidecar-OKPMMPLG.js +51 -0
- package/dist/fanout-sidecar-OKPMMPLG.js.map +1 -0
- package/dist/guards/index.cjs +322 -0
- package/dist/guards/index.cjs.map +1 -0
- package/dist/guards/index.d.cts +31 -0
- package/dist/guards/index.d.ts +31 -0
- package/dist/guards/index.js +29 -0
- package/dist/guards/index.js.map +1 -0
- package/dist/{hash-lsoL3eEW.d.ts → hash-B9m3_fhj.d.ts} +1 -1
- package/dist/{hash-BEfzPKwo.d.cts → hash-RVqz2zi8.d.cts} +1 -1
- package/dist/history/index.cjs +9 -2
- package/dist/history/index.cjs.map +1 -1
- package/dist/history/index.d.cts +8 -7
- package/dist/history/index.d.ts +8 -7
- package/dist/history/index.js +6 -6
- package/dist/i18n/index.cjs +368 -27
- package/dist/i18n/index.cjs.map +1 -1
- package/dist/i18n/index.d.cts +7 -6
- package/dist/i18n/index.d.ts +7 -6
- package/dist/i18n/index.js +34 -6
- package/dist/i18n/index.js.map +1 -1
- package/dist/{index-DJTf9yxn.d.ts → index-B8bjExET.d.cts} +508 -14
- package/dist/{index-6xNpPsxR.d.cts → index-DfUbNad8.d.ts} +508 -14
- package/dist/index.cjs +8779 -1260
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +231 -19
- package/dist/index.d.ts +231 -19
- package/dist/index.js +311 -7370
- package/dist/index.js.map +1 -1
- package/dist/indexing/index.cjs +7 -1
- package/dist/indexing/index.cjs.map +1 -1
- package/dist/indexing/index.d.cts +3 -3
- package/dist/indexing/index.d.ts +3 -3
- package/dist/indexing/index.js +4 -4
- package/dist/issue-3W6IVLKH.js +12 -0
- package/dist/issue-3W6IVLKH.js.map +1 -0
- package/dist/{lazy-builder-BwEoBQZ9.d.ts → lazy-builder-Ci5_YG73.d.cts} +2 -2
- package/dist/{lazy-builder-CZVLKh0Z.d.cts → lazy-builder-D5GU14TS.d.ts} +2 -2
- package/dist/{ledger-QZTTHQAQ.js → ledger-O7FXOG3D.js} +6 -6
- package/dist/ledger-O7FXOG3D.js.map +1 -0
- package/dist/materialized-views/index.cjs +856 -0
- package/dist/materialized-views/index.cjs.map +1 -0
- package/dist/materialized-views/index.d.cts +186 -0
- package/dist/materialized-views/index.d.ts +186 -0
- package/dist/materialized-views/index.js +45 -0
- package/dist/materialized-views/index.js.map +1 -0
- package/dist/noydb-YAZNH5TI.js +34 -0
- package/dist/noydb-YAZNH5TI.js.map +1 -0
- package/dist/overlay-views/index.cjs +369 -0
- package/dist/overlay-views/index.cjs.map +1 -0
- package/dist/overlay-views/index.d.cts +82 -0
- package/dist/overlay-views/index.d.ts +82 -0
- package/dist/overlay-views/index.js +25 -0
- package/dist/overlay-views/index.js.map +1 -0
- package/dist/periods/index.cjs +7 -1
- package/dist/periods/index.cjs.map +1 -1
- package/dist/periods/index.d.cts +7 -6
- package/dist/periods/index.d.ts +7 -6
- package/dist/periods/index.js +6 -6
- package/dist/{predicate-SBHmi6D0.d.cts → predicate-Bt5ft-9c.d.cts} +51 -2
- package/dist/{predicate-SBHmi6D0.d.ts → predicate-Bt5ft-9c.d.ts} +51 -2
- package/dist/{public-envelope-6JTACYJV.js → public-envelope-HMYHZIRH.js} +4 -4
- package/dist/public-envelope-HMYHZIRH.js.map +1 -0
- package/dist/query/index.cjs +555 -128
- package/dist/query/index.cjs.map +1 -1
- package/dist/query/index.d.cts +3 -3
- package/dist/query/index.d.ts +3 -3
- package/dist/query/index.js +32 -11
- package/dist/read-only-facade-ITU6L7BL.js +7 -0
- package/dist/read-only-facade-ITU6L7BL.js.map +1 -0
- package/dist/registry-DKEXOJVO.js +7 -0
- package/dist/registry-DKEXOJVO.js.map +1 -0
- package/dist/registry-ST2VNFZC.js +10 -0
- package/dist/registry-ST2VNFZC.js.map +1 -0
- package/dist/registry-UFIK7CSR.js +8 -0
- package/dist/registry-UFIK7CSR.js.map +1 -0
- package/dist/registry-ZGYYSM5I.js +8 -0
- package/dist/registry-ZGYYSM5I.js.map +1 -0
- package/dist/revoke-S6JMSLUN.js +17 -0
- package/dist/revoke-S6JMSLUN.js.map +1 -0
- package/dist/session/index.cjs +7 -1
- package/dist/session/index.cjs.map +1 -1
- package/dist/session/index.d.cts +8 -7
- package/dist/session/index.d.ts +8 -7
- package/dist/session/index.js +10 -3
- package/dist/session/index.js.map +1 -1
- package/dist/shadow/index.cjs.map +1 -1
- package/dist/shadow/index.d.cts +7 -6
- package/dist/shadow/index.d.ts +7 -6
- package/dist/shadow/index.js +2 -2
- package/dist/signer-7NPTB3SQ.js +18 -0
- package/dist/signer-7NPTB3SQ.js.map +1 -0
- package/dist/snapshots/index.cjs +937 -0
- package/dist/snapshots/index.cjs.map +1 -0
- package/dist/snapshots/index.d.cts +28 -0
- package/dist/snapshots/index.d.ts +28 -0
- package/dist/snapshots/index.js +152 -0
- package/dist/snapshots/index.js.map +1 -0
- package/dist/stale-VKXSXJF4.js +13 -0
- package/dist/stale-VKXSXJF4.js.map +1 -0
- package/dist/store/index.cjs +14 -0
- package/dist/store/index.cjs.map +1 -1
- package/dist/store/index.d.cts +7 -6
- package/dist/store/index.d.ts +7 -6
- package/dist/store/index.js +5 -2
- package/dist/{strategy-D-SrOLCl.d.ts → strategy-CT2LCKAX.d.cts} +84 -19
- package/dist/{strategy-D-SrOLCl.d.cts → strategy-CT2LCKAX.d.ts} +84 -19
- package/dist/sync/index.cjs.map +1 -1
- package/dist/sync/index.d.cts +6 -5
- package/dist/sync/index.d.ts +6 -5
- package/dist/sync/index.js +4 -4
- package/dist/team/index.cjs +1554 -2
- package/dist/team/index.cjs.map +1 -1
- package/dist/team/index.d.cts +7 -6
- package/dist/team/index.d.ts +7 -6
- package/dist/team/index.js +77 -8
- package/dist/tx/index.cjs +375 -43
- package/dist/tx/index.cjs.map +1 -1
- package/dist/tx/index.d.cts +8 -7
- package/dist/tx/index.d.ts +8 -7
- package/dist/tx/index.js +56 -3
- package/dist/tx/index.js.map +1 -1
- package/dist/{types-Bo7NSXJr.d.ts → types-CaNQm4i8.d.ts} +3902 -614
- package/dist/{types-Bnb82f5R.d.cts → types-n2_IfwlQ.d.cts} +3902 -614
- package/dist/{index-CywCC1qZ.d.cts → ulid-B9SMWj5i.d.ts} +216 -27
- package/dist/{index-8QDuznDr.d.ts → ulid-CLMjmyhG.d.cts} +216 -27
- package/dist/util/index.cjs +7 -0
- package/dist/util/index.cjs.map +1 -1
- package/dist/util/index.d.cts +2 -0
- package/dist/util/index.d.ts +2 -0
- package/dist/util/index.js +5 -1
- package/dist/util/index.js.map +1 -1
- package/dist/with-derivation-CVIOPTUf.d.ts +13 -0
- package/dist/with-derivation-aKrtS7Jj.d.cts +13 -0
- package/dist/with-guard-DZQbPzoP.d.cts +18 -0
- package/dist/with-guard-DseETUrF.d.ts +18 -0
- package/dist/with-materialized-view-C1eA1_T_.d.cts +27 -0
- package/dist/with-materialized-view-DaYaE8-Q.d.ts +27 -0
- package/dist/with-overlayed-view-DQsh2p8H.d.ts +13 -0
- package/dist/with-overlayed-view-DleJfKcV.d.cts +13 -0
- package/package.json +77 -3
- package/dist/chunk-2CSJGFCB.js.map +0 -1
- package/dist/chunk-ACLDOTNQ.js.map +0 -1
- package/dist/chunk-BTDCBVJW.js +0 -160
- package/dist/chunk-BTDCBVJW.js.map +0 -1
- package/dist/chunk-CIMZBAZB.js.map +0 -1
- package/dist/chunk-EXHNQEV4.js +0 -392
- package/dist/chunk-EXHNQEV4.js.map +0 -1
- package/dist/chunk-GOUT6DND.js.map +0 -1
- package/dist/chunk-M5INGEFC.js.map +0 -1
- package/dist/chunk-MDDTIZUO.js.map +0 -1
- package/dist/chunk-NPC4LFV5.js.map +0 -1
- package/dist/chunk-QAVUREFT.js.map +0 -1
- package/dist/chunk-RKJ6OL7K.js.map +0 -1
- package/dist/chunk-SCZXXXU4.js.map +0 -1
- package/dist/chunk-TDR6T5CJ.js.map +0 -1
- package/dist/chunk-WDM5XGGS.js.map +0 -1
- package/dist/chunk-ZFKD4QMV.js.map +0 -1
- /package/dist/{chunk-PTVMYYON.js.map → chunk-2N62W5YP.js.map} +0 -0
- /package/dist/{chunk-QGZRWRSL.js.map → chunk-3LPV6BXR.js.map} +0 -0
- /package/dist/{chunk-4PWAI7Q4.js.map → chunk-5OX6XVNS.js.map} +0 -0
- /package/dist/{chunk-AVVPZ4BC.js.map → chunk-DJRWA3Q5.js.map} +0 -0
- /package/dist/{chunk-M62XNWRA.js.map → chunk-LSTBFLL2.js.map} +0 -0
- /package/dist/{chunk-MR4424N3.js.map → chunk-R233SLY3.js.map} +0 -0
- /package/dist/{chunk-USKYUS74.js.map → chunk-RRNA5GKT.js.map} +0 -0
- /package/dist/{chunk-R36SIKES.js.map → chunk-RYIL3PI2.js.map} +0 -0
- /package/dist/{crypto-IVKU7YTT.js.map → crypto-2CRLG4F4.js.map} +0 -0
- /package/dist/{delegation-2DBS2EOH.js.map → delegation-ZTRT2PRV.js.map} +0 -0
- /package/dist/{ledger-QZTTHQAQ.js.map → derivations/index.js.map} +0 -0
- /package/dist/{public-envelope-6JTACYJV.js.map → executor-S76VN45G.js.map} +0 -0
package/dist/store/index.d.cts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
|
|
4
|
-
import '../
|
|
5
|
-
import '../
|
|
1
|
+
import { b3 as NoydbStore, aB as NoydbBundleStore } from '../types-n2_IfwlQ.cjs';
|
|
2
|
+
export { bT as BUNDLE_STORE_POLICY, cB as INDEXED_STORE_POLICY, dm as PullMode, dp as PullPolicy, dr as PushMode, dt as PushPolicy, e3 as SyncPolicy, e4 as SyncScheduler, e5 as SyncSchedulerStatus } from '../types-n2_IfwlQ.cjs';
|
|
3
|
+
export { aF as StoreCapabilityError } from '../index-B8bjExET.cjs';
|
|
4
|
+
import '../lazy-builder-Ci5_YG73.cjs';
|
|
5
|
+
import '../predicate-Bt5ft-9c.cjs';
|
|
6
|
+
import '../strategy-CT2LCKAX.cjs';
|
|
6
7
|
import '../strategy-BSxFXGzb.cjs';
|
|
7
|
-
import '
|
|
8
|
+
import '@noy-db/attestation';
|
|
8
9
|
|
|
9
10
|
interface WrapBundleStoreOptions {
|
|
10
11
|
/**
|
package/dist/store/index.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
|
|
4
|
-
import '../
|
|
5
|
-
import '../
|
|
1
|
+
import { b3 as NoydbStore, aB as NoydbBundleStore } from '../types-CaNQm4i8.js';
|
|
2
|
+
export { bT as BUNDLE_STORE_POLICY, cB as INDEXED_STORE_POLICY, dm as PullMode, dp as PullPolicy, dr as PushMode, dt as PushPolicy, e3 as SyncPolicy, e4 as SyncScheduler, e5 as SyncSchedulerStatus } from '../types-CaNQm4i8.js';
|
|
3
|
+
export { aF as StoreCapabilityError } from '../index-DfUbNad8.js';
|
|
4
|
+
import '../lazy-builder-D5GU14TS.js';
|
|
5
|
+
import '../predicate-Bt5ft-9c.js';
|
|
6
|
+
import '../strategy-CT2LCKAX.js';
|
|
6
7
|
import '../strategy-BSxFXGzb.js';
|
|
7
|
-
import '
|
|
8
|
+
import '@noy-db/attestation';
|
|
8
9
|
|
|
9
10
|
interface WrapBundleStoreOptions {
|
|
10
11
|
/**
|
package/dist/store/index.js
CHANGED
|
@@ -9,16 +9,19 @@ import {
|
|
|
9
9
|
withRetry,
|
|
10
10
|
wrapBundleStore,
|
|
11
11
|
wrapStore
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-RRNA5GKT.js";
|
|
13
13
|
import {
|
|
14
14
|
BUNDLE_STORE_POLICY,
|
|
15
15
|
INDEXED_STORE_POLICY,
|
|
16
16
|
SyncScheduler
|
|
17
17
|
} from "../chunk-2QR2PQTT.js";
|
|
18
|
-
import
|
|
18
|
+
import {
|
|
19
|
+
StoreCapabilityError
|
|
20
|
+
} from "../chunk-O6EJ6WTI.js";
|
|
19
21
|
export {
|
|
20
22
|
BUNDLE_STORE_POLICY,
|
|
21
23
|
INDEXED_STORE_POLICY,
|
|
24
|
+
StoreCapabilityError,
|
|
22
25
|
SyncScheduler,
|
|
23
26
|
createBundleStore,
|
|
24
27
|
routeStore,
|
|
@@ -57,6 +57,18 @@ interface Reducer<R, S = R> {
|
|
|
57
57
|
remove?(state: S, record: unknown): S;
|
|
58
58
|
/** Collapse the internal state into the user-visible result. */
|
|
59
59
|
finalize(state: S): R;
|
|
60
|
+
/**
|
|
61
|
+
* Identifying operation tag stamped by each built-in factory.
|
|
62
|
+
* Used by `summariseAggregateOp` in the introspection walker to
|
|
63
|
+
* render human-readable aggregate descriptors in `dumpSchema()`.
|
|
64
|
+
* Optional so third-party custom reducers are unaffected.
|
|
65
|
+
*/
|
|
66
|
+
readonly op?: 'count' | 'sum' | 'avg' | 'min' | 'max';
|
|
67
|
+
/**
|
|
68
|
+
* Field name for field-based reducers (`sum`, `avg`, `min`, `max`).
|
|
69
|
+
* Absent on `count` which aggregates over record count, not a field.
|
|
70
|
+
*/
|
|
71
|
+
readonly field?: string;
|
|
60
72
|
}
|
|
61
73
|
/**
|
|
62
74
|
* Common options accepted by every reducer factory.
|
|
@@ -399,30 +411,64 @@ type GroupedRow<F extends string, R> = {
|
|
|
399
411
|
[K in F]: unknown;
|
|
400
412
|
} & R;
|
|
401
413
|
/**
|
|
402
|
-
*
|
|
403
|
-
*
|
|
414
|
+
* Multi-key variant — result-row shape for variadic
|
|
415
|
+
* `.groupBy(...fields)`. Every grouped field name appears on the row
|
|
416
|
+
* (typed as `unknown` for the same reason as `GroupedRow`), plus the
|
|
417
|
+
* reducer outputs from the spec.
|
|
418
|
+
*/
|
|
419
|
+
type GroupedRowN<F extends readonly string[], R> = {
|
|
420
|
+
[K in F[number]]: unknown;
|
|
421
|
+
} & R;
|
|
422
|
+
/**
|
|
423
|
+
* Shared base class for the chainable grouped-query wrappers. Holds
|
|
424
|
+
* the constructor + protected fields that both single-key
|
|
425
|
+
* `GroupedQuery<T, F>` and variadic `GroupedQueryN<T, F>` need; each
|
|
426
|
+
* subclass only overrides `aggregate()` with its own result-row
|
|
427
|
+
* generic.
|
|
404
428
|
*
|
|
405
|
-
*
|
|
406
|
-
*
|
|
407
|
-
*
|
|
408
|
-
*
|
|
409
|
-
*
|
|
429
|
+
* Not exported — implementation detail. Adding `.having()` /
|
|
430
|
+
* `.live()` / `.orderByGroup()` etc. in the future lands here once
|
|
431
|
+
* and both subclasses pick it up automatically.
|
|
432
|
+
*
|
|
433
|
+
* @internal
|
|
410
434
|
*/
|
|
411
|
-
declare class
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
private readonly upstreams;
|
|
435
|
+
declare abstract class GroupedQueryBase {
|
|
436
|
+
protected readonly executeRecords: () => readonly unknown[];
|
|
437
|
+
protected readonly upstreams: readonly AggregationUpstream[];
|
|
415
438
|
/**
|
|
416
439
|
* Optional dict label resolver attached by the query builder when
|
|
417
|
-
* the grouping field is a dictKey.
|
|
440
|
+
* the grouping field is a dictKey. Variadic groupings always pass
|
|
441
|
+
* `undefined` — `<field>Label` projection has no meaningful shape
|
|
442
|
+
* for composite keys.
|
|
418
443
|
*/
|
|
419
|
-
|
|
420
|
-
|
|
444
|
+
protected readonly dictLabelResolver?: ((key: string, locale: string, fallback?: string | readonly string[]) => Promise<string | undefined>) | undefined;
|
|
445
|
+
/**
|
|
446
|
+
* Field set this grouped query buckets on. Stored in declaration
|
|
447
|
+
* order — the same order is preserved on every result row by
|
|
448
|
+
* `groupAndReduce`. For the single-field constructor, this is
|
|
449
|
+
* `[field]`.
|
|
450
|
+
*/
|
|
451
|
+
protected readonly fields: readonly string[];
|
|
452
|
+
constructor(executeRecords: () => readonly unknown[], fieldOrFields: string | readonly string[], upstreams: readonly AggregationUpstream[],
|
|
421
453
|
/**
|
|
422
454
|
* Optional dict label resolver attached by the query builder when
|
|
423
|
-
* the grouping field is a dictKey.
|
|
455
|
+
* the grouping field is a dictKey. Variadic groupings always pass
|
|
456
|
+
* `undefined` — `<field>Label` projection has no meaningful shape
|
|
457
|
+
* for composite keys.
|
|
424
458
|
*/
|
|
425
459
|
dictLabelResolver?: ((key: string, locale: string, fallback?: string | readonly string[]) => Promise<string | undefined>) | undefined);
|
|
460
|
+
}
|
|
461
|
+
/**
|
|
462
|
+
* Chainable wrapper returned by `Query.groupBy(field)`. Terminates
|
|
463
|
+
* with `.aggregate(spec)` which returns a `GroupedAggregation`.
|
|
464
|
+
*
|
|
465
|
+
* Kept minimal — the only operation on a grouped query is
|
|
466
|
+
* aggregation. Ordering, limiting, and further filtering belong on
|
|
467
|
+
* the underlying `Query` before `.groupBy()` is called; applying
|
|
468
|
+
* them post-group would be a different operation (`having` /
|
|
469
|
+
* `groupOrderBy`), out of scope for.
|
|
470
|
+
*/
|
|
471
|
+
declare class GroupedQuery<T, F extends string> extends GroupedQueryBase {
|
|
426
472
|
/**
|
|
427
473
|
* Build a grouped aggregation. Returns a `GroupedAggregation`
|
|
428
474
|
* with `.run()`, `.runAsync()`, and `.live()` terminals — same shape
|
|
@@ -431,6 +477,14 @@ declare class GroupedQuery<T, F extends string> {
|
|
|
431
477
|
*/
|
|
432
478
|
aggregate<Spec extends AggregateSpec>(spec: Spec): GroupedAggregation<GroupedRow<F, AggregateResult<Spec>>>;
|
|
433
479
|
}
|
|
480
|
+
/**
|
|
481
|
+
* Variadic-keyed sibling of `GroupedQuery<T, F>`. Constructed by the
|
|
482
|
+
* multi-arg `Query.groupBy(...fields)` overload. The runtime shape is
|
|
483
|
+
* identical — only the type-level result-row narrowing differs.
|
|
484
|
+
*/
|
|
485
|
+
declare class GroupedQueryN<T, F extends readonly string[]> extends GroupedQueryBase {
|
|
486
|
+
aggregate<Spec extends AggregateSpec>(spec: Spec): GroupedAggregation<GroupedRowN<F, AggregateResult<Spec>>>;
|
|
487
|
+
}
|
|
434
488
|
/**
|
|
435
489
|
* Execute the group-and-reduce pipeline. Pure function over a
|
|
436
490
|
* record array and a spec — shared by `GroupedAggregation.run()`
|
|
@@ -442,7 +496,7 @@ declare class GroupedQuery<T, F extends string> {
|
|
|
442
496
|
* bucket would be created — the consumer doesn't have to wait for
|
|
443
497
|
* the full partition to materialize before the error fires.
|
|
444
498
|
*/
|
|
445
|
-
declare function groupAndReduce<R>(records: readonly unknown[],
|
|
499
|
+
declare function groupAndReduce<R>(records: readonly unknown[], fieldOrFields: string | readonly string[], spec: AggregateSpec): R[];
|
|
446
500
|
/**
|
|
447
501
|
* Grouped aggregation wrapper — the `.groupBy(field).aggregate(spec)`
|
|
448
502
|
* terminal. Shape mirrors `Aggregation<R>` from aggregate.ts: two
|
|
@@ -455,7 +509,6 @@ declare function groupAndReduce<R>(records: readonly unknown[], field: string, s
|
|
|
455
509
|
*/
|
|
456
510
|
declare class GroupedAggregation<R> {
|
|
457
511
|
private readonly executeRecords;
|
|
458
|
-
private readonly field;
|
|
459
512
|
private readonly spec;
|
|
460
513
|
private readonly upstreams;
|
|
461
514
|
/**
|
|
@@ -463,7 +516,8 @@ declare class GroupedAggregation<R> {
|
|
|
463
516
|
*. Present when the grouping field is a dictKey.
|
|
464
517
|
*/
|
|
465
518
|
private readonly dictLabelResolver?;
|
|
466
|
-
|
|
519
|
+
private readonly fields;
|
|
520
|
+
constructor(executeRecords: () => readonly unknown[], fields: string | readonly string[], spec: AggregateSpec, upstreams: readonly AggregationUpstream[],
|
|
467
521
|
/**
|
|
468
522
|
* Optional dict label resolver for `<field>Label` projection
|
|
469
523
|
*. Present when the grouping field is a dictKey.
|
|
@@ -479,6 +533,10 @@ declare class GroupedAggregation<R> {
|
|
|
479
533
|
*
|
|
480
534
|
* The `<field>Label` field is appended to each row. Rows whose group
|
|
481
535
|
* key has no dictionary entry get `<field>Label: undefined`.
|
|
536
|
+
*
|
|
537
|
+
* Dict-label resolution is single-field only — multi-key groupings
|
|
538
|
+
* do not produce a `<field>Label`. The resolver is only attached
|
|
539
|
+
* by the builder when `fields.length === 1`.
|
|
482
540
|
*/
|
|
483
541
|
runAsync(opts?: {
|
|
484
542
|
locale?: string;
|
|
@@ -537,6 +595,13 @@ interface AggregateStrategy {
|
|
|
537
595
|
* closure / upstream inputs as `aggregate` plus the group key field.
|
|
538
596
|
*/
|
|
539
597
|
groupBy<T, F extends string>(executeRecords: () => readonly unknown[], field: F, upstreams: readonly AggregationUpstream[], dictLabelResolver?: (key: string, locale: string, fallback?: string | readonly string[]) => Promise<string | undefined>): GroupedQuery<T, F>;
|
|
598
|
+
/**
|
|
599
|
+
* Variadic-keyed sibling — builds a `GroupedQueryN<T, F>` for
|
|
600
|
+
* `Query.groupBy(...fields)`. No dictLabelResolver — `<field>Label`
|
|
601
|
+
* projection only applies to single-field groupings, which dispatch
|
|
602
|
+
* through `groupBy` above.
|
|
603
|
+
*/
|
|
604
|
+
groupByN<T, F extends readonly string[]>(executeRecords: () => readonly unknown[], fields: F, upstreams: readonly AggregationUpstream[]): GroupedQueryN<T, F>;
|
|
540
605
|
/**
|
|
541
606
|
* Terminal streaming aggregator for `ScanBuilder.aggregate(spec)`.
|
|
542
607
|
* Takes an async iterable of decrypted records + the spec and
|
|
@@ -545,4 +610,4 @@ interface AggregateStrategy {
|
|
|
545
610
|
scanAggregate<Spec extends AggregateSpec>(iter: AsyncIterable<unknown>, spec: Spec): Promise<AggregateResult<Spec>>;
|
|
546
611
|
}
|
|
547
612
|
|
|
548
|
-
export { type AggregateStrategy as A, GROUPBY_MAX_CARDINALITY as G, type LiveAggregation as L, type Reducer as R, type AggregateResult as a, type AggregateSpec as b, Aggregation as c, type AggregationUpstream as d, GROUPBY_WARN_CARDINALITY as e, GroupedAggregation as f, GroupedQuery as g,
|
|
613
|
+
export { type AggregateStrategy as A, GROUPBY_MAX_CARDINALITY as G, type LiveAggregation as L, type Reducer as R, type AggregateResult as a, type AggregateSpec as b, Aggregation as c, type AggregationUpstream as d, GROUPBY_WARN_CARDINALITY as e, GroupedAggregation as f, GroupedQuery as g, GroupedQueryN as h, type GroupedRow as i, type GroupedRowN as j, type ReducerOptions as k, avg as l, buildLiveAggregation as m, count as n, groupAndReduce as o, max as p, min as q, reduceRecords as r, resetGroupByWarnings as s, sum as t };
|
|
@@ -57,6 +57,18 @@ interface Reducer<R, S = R> {
|
|
|
57
57
|
remove?(state: S, record: unknown): S;
|
|
58
58
|
/** Collapse the internal state into the user-visible result. */
|
|
59
59
|
finalize(state: S): R;
|
|
60
|
+
/**
|
|
61
|
+
* Identifying operation tag stamped by each built-in factory.
|
|
62
|
+
* Used by `summariseAggregateOp` in the introspection walker to
|
|
63
|
+
* render human-readable aggregate descriptors in `dumpSchema()`.
|
|
64
|
+
* Optional so third-party custom reducers are unaffected.
|
|
65
|
+
*/
|
|
66
|
+
readonly op?: 'count' | 'sum' | 'avg' | 'min' | 'max';
|
|
67
|
+
/**
|
|
68
|
+
* Field name for field-based reducers (`sum`, `avg`, `min`, `max`).
|
|
69
|
+
* Absent on `count` which aggregates over record count, not a field.
|
|
70
|
+
*/
|
|
71
|
+
readonly field?: string;
|
|
60
72
|
}
|
|
61
73
|
/**
|
|
62
74
|
* Common options accepted by every reducer factory.
|
|
@@ -399,30 +411,64 @@ type GroupedRow<F extends string, R> = {
|
|
|
399
411
|
[K in F]: unknown;
|
|
400
412
|
} & R;
|
|
401
413
|
/**
|
|
402
|
-
*
|
|
403
|
-
*
|
|
414
|
+
* Multi-key variant — result-row shape for variadic
|
|
415
|
+
* `.groupBy(...fields)`. Every grouped field name appears on the row
|
|
416
|
+
* (typed as `unknown` for the same reason as `GroupedRow`), plus the
|
|
417
|
+
* reducer outputs from the spec.
|
|
418
|
+
*/
|
|
419
|
+
type GroupedRowN<F extends readonly string[], R> = {
|
|
420
|
+
[K in F[number]]: unknown;
|
|
421
|
+
} & R;
|
|
422
|
+
/**
|
|
423
|
+
* Shared base class for the chainable grouped-query wrappers. Holds
|
|
424
|
+
* the constructor + protected fields that both single-key
|
|
425
|
+
* `GroupedQuery<T, F>` and variadic `GroupedQueryN<T, F>` need; each
|
|
426
|
+
* subclass only overrides `aggregate()` with its own result-row
|
|
427
|
+
* generic.
|
|
404
428
|
*
|
|
405
|
-
*
|
|
406
|
-
*
|
|
407
|
-
*
|
|
408
|
-
*
|
|
409
|
-
*
|
|
429
|
+
* Not exported — implementation detail. Adding `.having()` /
|
|
430
|
+
* `.live()` / `.orderByGroup()` etc. in the future lands here once
|
|
431
|
+
* and both subclasses pick it up automatically.
|
|
432
|
+
*
|
|
433
|
+
* @internal
|
|
410
434
|
*/
|
|
411
|
-
declare class
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
private readonly upstreams;
|
|
435
|
+
declare abstract class GroupedQueryBase {
|
|
436
|
+
protected readonly executeRecords: () => readonly unknown[];
|
|
437
|
+
protected readonly upstreams: readonly AggregationUpstream[];
|
|
415
438
|
/**
|
|
416
439
|
* Optional dict label resolver attached by the query builder when
|
|
417
|
-
* the grouping field is a dictKey.
|
|
440
|
+
* the grouping field is a dictKey. Variadic groupings always pass
|
|
441
|
+
* `undefined` — `<field>Label` projection has no meaningful shape
|
|
442
|
+
* for composite keys.
|
|
418
443
|
*/
|
|
419
|
-
|
|
420
|
-
|
|
444
|
+
protected readonly dictLabelResolver?: ((key: string, locale: string, fallback?: string | readonly string[]) => Promise<string | undefined>) | undefined;
|
|
445
|
+
/**
|
|
446
|
+
* Field set this grouped query buckets on. Stored in declaration
|
|
447
|
+
* order — the same order is preserved on every result row by
|
|
448
|
+
* `groupAndReduce`. For the single-field constructor, this is
|
|
449
|
+
* `[field]`.
|
|
450
|
+
*/
|
|
451
|
+
protected readonly fields: readonly string[];
|
|
452
|
+
constructor(executeRecords: () => readonly unknown[], fieldOrFields: string | readonly string[], upstreams: readonly AggregationUpstream[],
|
|
421
453
|
/**
|
|
422
454
|
* Optional dict label resolver attached by the query builder when
|
|
423
|
-
* the grouping field is a dictKey.
|
|
455
|
+
* the grouping field is a dictKey. Variadic groupings always pass
|
|
456
|
+
* `undefined` — `<field>Label` projection has no meaningful shape
|
|
457
|
+
* for composite keys.
|
|
424
458
|
*/
|
|
425
459
|
dictLabelResolver?: ((key: string, locale: string, fallback?: string | readonly string[]) => Promise<string | undefined>) | undefined);
|
|
460
|
+
}
|
|
461
|
+
/**
|
|
462
|
+
* Chainable wrapper returned by `Query.groupBy(field)`. Terminates
|
|
463
|
+
* with `.aggregate(spec)` which returns a `GroupedAggregation`.
|
|
464
|
+
*
|
|
465
|
+
* Kept minimal — the only operation on a grouped query is
|
|
466
|
+
* aggregation. Ordering, limiting, and further filtering belong on
|
|
467
|
+
* the underlying `Query` before `.groupBy()` is called; applying
|
|
468
|
+
* them post-group would be a different operation (`having` /
|
|
469
|
+
* `groupOrderBy`), out of scope for.
|
|
470
|
+
*/
|
|
471
|
+
declare class GroupedQuery<T, F extends string> extends GroupedQueryBase {
|
|
426
472
|
/**
|
|
427
473
|
* Build a grouped aggregation. Returns a `GroupedAggregation`
|
|
428
474
|
* with `.run()`, `.runAsync()`, and `.live()` terminals — same shape
|
|
@@ -431,6 +477,14 @@ declare class GroupedQuery<T, F extends string> {
|
|
|
431
477
|
*/
|
|
432
478
|
aggregate<Spec extends AggregateSpec>(spec: Spec): GroupedAggregation<GroupedRow<F, AggregateResult<Spec>>>;
|
|
433
479
|
}
|
|
480
|
+
/**
|
|
481
|
+
* Variadic-keyed sibling of `GroupedQuery<T, F>`. Constructed by the
|
|
482
|
+
* multi-arg `Query.groupBy(...fields)` overload. The runtime shape is
|
|
483
|
+
* identical — only the type-level result-row narrowing differs.
|
|
484
|
+
*/
|
|
485
|
+
declare class GroupedQueryN<T, F extends readonly string[]> extends GroupedQueryBase {
|
|
486
|
+
aggregate<Spec extends AggregateSpec>(spec: Spec): GroupedAggregation<GroupedRowN<F, AggregateResult<Spec>>>;
|
|
487
|
+
}
|
|
434
488
|
/**
|
|
435
489
|
* Execute the group-and-reduce pipeline. Pure function over a
|
|
436
490
|
* record array and a spec — shared by `GroupedAggregation.run()`
|
|
@@ -442,7 +496,7 @@ declare class GroupedQuery<T, F extends string> {
|
|
|
442
496
|
* bucket would be created — the consumer doesn't have to wait for
|
|
443
497
|
* the full partition to materialize before the error fires.
|
|
444
498
|
*/
|
|
445
|
-
declare function groupAndReduce<R>(records: readonly unknown[],
|
|
499
|
+
declare function groupAndReduce<R>(records: readonly unknown[], fieldOrFields: string | readonly string[], spec: AggregateSpec): R[];
|
|
446
500
|
/**
|
|
447
501
|
* Grouped aggregation wrapper — the `.groupBy(field).aggregate(spec)`
|
|
448
502
|
* terminal. Shape mirrors `Aggregation<R>` from aggregate.ts: two
|
|
@@ -455,7 +509,6 @@ declare function groupAndReduce<R>(records: readonly unknown[], field: string, s
|
|
|
455
509
|
*/
|
|
456
510
|
declare class GroupedAggregation<R> {
|
|
457
511
|
private readonly executeRecords;
|
|
458
|
-
private readonly field;
|
|
459
512
|
private readonly spec;
|
|
460
513
|
private readonly upstreams;
|
|
461
514
|
/**
|
|
@@ -463,7 +516,8 @@ declare class GroupedAggregation<R> {
|
|
|
463
516
|
*. Present when the grouping field is a dictKey.
|
|
464
517
|
*/
|
|
465
518
|
private readonly dictLabelResolver?;
|
|
466
|
-
|
|
519
|
+
private readonly fields;
|
|
520
|
+
constructor(executeRecords: () => readonly unknown[], fields: string | readonly string[], spec: AggregateSpec, upstreams: readonly AggregationUpstream[],
|
|
467
521
|
/**
|
|
468
522
|
* Optional dict label resolver for `<field>Label` projection
|
|
469
523
|
*. Present when the grouping field is a dictKey.
|
|
@@ -479,6 +533,10 @@ declare class GroupedAggregation<R> {
|
|
|
479
533
|
*
|
|
480
534
|
* The `<field>Label` field is appended to each row. Rows whose group
|
|
481
535
|
* key has no dictionary entry get `<field>Label: undefined`.
|
|
536
|
+
*
|
|
537
|
+
* Dict-label resolution is single-field only — multi-key groupings
|
|
538
|
+
* do not produce a `<field>Label`. The resolver is only attached
|
|
539
|
+
* by the builder when `fields.length === 1`.
|
|
482
540
|
*/
|
|
483
541
|
runAsync(opts?: {
|
|
484
542
|
locale?: string;
|
|
@@ -537,6 +595,13 @@ interface AggregateStrategy {
|
|
|
537
595
|
* closure / upstream inputs as `aggregate` plus the group key field.
|
|
538
596
|
*/
|
|
539
597
|
groupBy<T, F extends string>(executeRecords: () => readonly unknown[], field: F, upstreams: readonly AggregationUpstream[], dictLabelResolver?: (key: string, locale: string, fallback?: string | readonly string[]) => Promise<string | undefined>): GroupedQuery<T, F>;
|
|
598
|
+
/**
|
|
599
|
+
* Variadic-keyed sibling — builds a `GroupedQueryN<T, F>` for
|
|
600
|
+
* `Query.groupBy(...fields)`. No dictLabelResolver — `<field>Label`
|
|
601
|
+
* projection only applies to single-field groupings, which dispatch
|
|
602
|
+
* through `groupBy` above.
|
|
603
|
+
*/
|
|
604
|
+
groupByN<T, F extends readonly string[]>(executeRecords: () => readonly unknown[], fields: F, upstreams: readonly AggregationUpstream[]): GroupedQueryN<T, F>;
|
|
540
605
|
/**
|
|
541
606
|
* Terminal streaming aggregator for `ScanBuilder.aggregate(spec)`.
|
|
542
607
|
* Takes an async iterable of decrypted records + the spec and
|
|
@@ -545,4 +610,4 @@ interface AggregateStrategy {
|
|
|
545
610
|
scanAggregate<Spec extends AggregateSpec>(iter: AsyncIterable<unknown>, spec: Spec): Promise<AggregateResult<Spec>>;
|
|
546
611
|
}
|
|
547
612
|
|
|
548
|
-
export { type AggregateStrategy as A, GROUPBY_MAX_CARDINALITY as G, type LiveAggregation as L, type Reducer as R, type AggregateResult as a, type AggregateSpec as b, Aggregation as c, type AggregationUpstream as d, GROUPBY_WARN_CARDINALITY as e, GroupedAggregation as f, GroupedQuery as g,
|
|
613
|
+
export { type AggregateStrategy as A, GROUPBY_MAX_CARDINALITY as G, type LiveAggregation as L, type Reducer as R, type AggregateResult as a, type AggregateSpec as b, Aggregation as c, type AggregationUpstream as d, GROUPBY_WARN_CARDINALITY as e, GroupedAggregation as f, GroupedQuery as g, GroupedQueryN as h, type GroupedRow as i, type GroupedRowN as j, type ReducerOptions as k, avg as l, buildLiveAggregation as m, count as n, groupAndReduce as o, max as p, min as q, reduceRecords as r, resetGroupByWarnings as s, sum as t };
|