@noy-db/hub 0.2.0-pre.17 → 0.2.0-pre.19
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 +227 -3
- package/dist/aggregate/index.cjs.map +1 -1
- package/dist/aggregate/index.d.cts +3 -3
- package/dist/aggregate/index.d.ts +3 -3
- package/dist/aggregate/index.js +5 -4
- package/dist/aggregate/index.js.map +1 -1
- package/dist/attestation/index.cjs.map +1 -1
- package/dist/attestation/index.d.cts +5 -5
- package/dist/attestation/index.d.ts +5 -5
- package/dist/attestation/index.js +6 -6
- package/dist/blobs/index.cjs +4 -10
- package/dist/blobs/index.cjs.map +1 -1
- package/dist/blobs/index.d.cts +6 -6
- package/dist/blobs/index.d.ts +6 -6
- package/dist/blobs/index.js +6 -6
- package/dist/bundle/index.cjs +1587 -392
- package/dist/bundle/index.cjs.map +1 -1
- package/dist/bundle/index.d.cts +7 -7
- package/dist/bundle/index.d.ts +7 -7
- package/dist/bundle/index.js +10 -10
- package/dist/{chunk-NBBMMJ2H.js → chunk-3FSMVWBN.js} +4 -4
- package/dist/{chunk-HGVSHKZW.js → chunk-3Q2AOPLT.js} +100 -29
- package/dist/chunk-3Q2AOPLT.js.map +1 -0
- package/dist/{chunk-SHX5QBCI.js → chunk-4ULLGYPA.js} +3 -3
- package/dist/{chunk-CD2AVTEM.js → chunk-5IGWRMEC.js} +5 -5
- package/dist/{chunk-QO6RGLLD.js → chunk-6KESZO5D.js} +35 -7
- package/dist/chunk-6KESZO5D.js.map +1 -0
- package/dist/{chunk-GP3SDSH2.js → chunk-6OSOE6BY.js} +15 -2
- package/dist/chunk-6OSOE6BY.js.map +1 -0
- package/dist/{chunk-F4G63NTZ.js → chunk-7C6VFNIY.js} +2 -2
- package/dist/{chunk-XJV6OB4D.js → chunk-7HD67R6U.js} +2 -2
- package/dist/{chunk-UMLVJTYV.js → chunk-ADB7GPM3.js} +7 -4
- package/dist/chunk-ADB7GPM3.js.map +1 -0
- package/dist/{chunk-NYSYPFXJ.js → chunk-B6E5IRPJ.js} +3 -3
- package/dist/chunk-CYNTFU2D.js +129 -0
- package/dist/chunk-CYNTFU2D.js.map +1 -0
- package/dist/{chunk-ZEGSDPB7.js → chunk-DJF3FXW5.js} +35 -1
- package/dist/chunk-DJF3FXW5.js.map +1 -0
- package/dist/{chunk-3G3W65EQ.js → chunk-DY3EOJEN.js} +2 -2
- package/dist/{chunk-YYVZYTWW.js → chunk-E66DSTJP.js} +3 -3
- package/dist/{chunk-5LIROIDM.js → chunk-FBLAWK6A.js} +2 -2
- package/dist/{chunk-E77UKJYL.js → chunk-FPHRTW2Z.js} +5 -5
- package/dist/{state-vault-W2OEABNO.js → chunk-G4PYA575.js} +24 -7
- package/dist/chunk-G4PYA575.js.map +1 -0
- package/dist/{chunk-U5QCMH3W.js → chunk-GKQAU52M.js} +4 -4
- package/dist/{chunk-2FU2FTXD.js → chunk-GYAWXHFO.js} +2 -2
- package/dist/{chunk-ROPJVUG3.js → chunk-H42KZXNV.js} +5 -210
- package/dist/chunk-H42KZXNV.js.map +1 -0
- package/dist/{chunk-XPIHJ34I.js → chunk-IBVTH4JR.js} +4 -4
- package/dist/{chunk-C3HYQPV4.js → chunk-IVP5IVON.js} +2 -2
- package/dist/{chunk-BL5GYANC.js → chunk-KEDJDWWQ.js} +3 -3
- package/dist/{chunk-I5IUYN7B.js → chunk-KNKNOJFS.js} +3 -3
- package/dist/chunk-KNKNOJFS.js.map +1 -0
- package/dist/{chunk-D77ZQSQQ.js → chunk-KYGGXXT6.js} +829 -170
- package/dist/chunk-KYGGXXT6.js.map +1 -0
- package/dist/{chunk-J7RWBXFY.js → chunk-LSIIPKYT.js} +2 -2
- package/dist/{chunk-BSZOCSDZ.js → chunk-M3FPNTO2.js} +4 -4
- package/dist/{chunk-XMVHEWF6.js → chunk-MI36HL5G.js} +4 -4
- package/dist/{chunk-ROVO6NPJ.js → chunk-NN6IISZO.js} +58 -3
- package/dist/chunk-NN6IISZO.js.map +1 -0
- package/dist/{chunk-7H2GEJ3O.js → chunk-OBMYMKGO.js} +29 -6
- package/dist/{chunk-7H2GEJ3O.js.map → chunk-OBMYMKGO.js.map} +1 -1
- package/dist/{chunk-UNTGHX5A.js → chunk-OKOKPYWH.js} +2 -2
- package/dist/{chunk-WV7WV6JO.js → chunk-OY7RX2VL.js} +9 -15
- package/dist/chunk-OY7RX2VL.js.map +1 -0
- package/dist/{chunk-H2MRGONI.js → chunk-PTGQPWMV.js} +2 -2
- package/dist/{chunk-BJSLBUJ7.js → chunk-PWFTQHYX.js} +2 -2
- package/dist/{chunk-5AXTH4QZ.js → chunk-Q5MCHUXZ.js} +2 -2
- package/dist/{chunk-QHM6XEAH.js → chunk-S22UOMHM.js} +6 -6
- package/dist/{chunk-WIAOUFFB.js → chunk-S3XA7G35.js} +2 -2
- package/dist/{chunk-SISBMAPO.js → chunk-SHIUFIPW.js} +1 -1
- package/dist/chunk-SHIUFIPW.js.map +1 -0
- package/dist/{chunk-KCEHMDZF.js → chunk-U7JNBSS3.js} +3 -3
- package/dist/{chunk-ZNGPEV5J.js → chunk-V3VIRTTE.js} +3 -3
- package/dist/{chunk-TIDXB5DF.js → chunk-V5FZWQNN.js} +4 -4
- package/dist/chunk-VEIVAYJ7.js +361 -0
- package/dist/chunk-VEIVAYJ7.js.map +1 -0
- package/dist/{chunk-AEIKD3PP.js → chunk-VNUE6FHP.js} +3 -3
- package/dist/{chunk-DYYYUW5D.js → chunk-WFK2EVYU.js} +10 -2
- package/dist/chunk-WFK2EVYU.js.map +1 -0
- package/dist/{chunk-XMHUK5PN.js → chunk-X7FJMKT3.js} +2 -2
- package/dist/{chunk-FEJDVE3Z.js → chunk-XPH3FWME.js} +7 -2
- package/dist/{chunk-FEJDVE3Z.js.map → chunk-XPH3FWME.js.map} +1 -1
- package/dist/{chunk-SNMJ7SB3.js → chunk-Y5J63SMF.js} +5 -5
- package/dist/{chunk-M476FOQ7.js → chunk-YLRRU72W.js} +2 -2
- package/dist/{chunk-DWEBTE2W.js → chunk-YX333DPS.js} +4 -4
- package/dist/{chunk-BH3X5L6A.js → chunk-YZE6C3TQ.js} +3 -3
- package/dist/consent/index.cjs.map +1 -1
- package/dist/consent/index.d.cts +6 -6
- package/dist/consent/index.d.ts +6 -6
- package/dist/consent/index.js +3 -3
- package/dist/{crypto-7BN2HDWG.js → crypto-B46VNH6X.js} +3 -3
- package/dist/{delegation-MGH5SODX.js → delegation-5HON72PV.js} +5 -5
- package/dist/derivations/index.cjs +82 -2
- package/dist/derivations/index.cjs.map +1 -1
- package/dist/derivations/index.d.cts +7 -7
- package/dist/derivations/index.d.ts +7 -7
- package/dist/derivations/index.js +8 -6
- package/dist/{dev-unlock-iXbYFAWl.d.cts → dev-unlock-BR1rMOS-.d.cts} +1 -1
- package/dist/{dev-unlock-CI1ijTML.d.ts → dev-unlock-whL49sxV.d.ts} +1 -1
- package/dist/{errors-Dz64FA65.d.cts → errors-DL-zTrrF.d.cts} +29 -1
- package/dist/{errors-Dz64FA65.d.ts → errors-DL-zTrrF.d.ts} +29 -1
- package/dist/executor-44R5CUS2.js +12 -0
- package/dist/executor-AOACUK7Z.js +8 -0
- package/dist/executor-OKFLQCDW.js +8 -0
- package/dist/{fanout-sidecar-FIJJ46YG.js → fanout-sidecar-DCQWJQ6S.js} +2 -2
- package/dist/forget/index.cjs.map +1 -1
- package/dist/forget/index.d.cts +1 -1
- package/dist/forget/index.d.ts +1 -1
- package/dist/forget/index.js +4 -4
- package/dist/guards/index.cjs +80 -3
- package/dist/guards/index.cjs.map +1 -1
- package/dist/guards/index.d.cts +7 -7
- package/dist/guards/index.d.ts +7 -7
- package/dist/guards/index.js +8 -4
- package/dist/{hash-tEcM5fnv.d.cts → hash-BEUBmmI4.d.cts} +1 -1
- package/dist/{hash-blk7Bkes.d.ts → hash-Dtb7FwWd.d.ts} +1 -1
- package/dist/history/index.cjs.map +1 -1
- package/dist/history/index.d.cts +7 -7
- package/dist/history/index.d.ts +7 -7
- package/dist/history/index.js +5 -5
- package/dist/i18n/index.cjs +149 -132
- package/dist/i18n/index.cjs.map +1 -1
- package/dist/i18n/index.d.cts +6 -6
- package/dist/i18n/index.d.ts +6 -6
- package/dist/i18n/index.js +14 -14
- package/dist/{index-u-kWzSrL.d.cts → index-BM7O48Ur.d.cts} +85 -9
- package/dist/{index-C-SSRIxP.d.cts → index-BMmajblo.d.cts} +14 -0
- package/dist/{index-C-SSRIxP.d.ts → index-BMmajblo.d.ts} +14 -0
- package/dist/{index-DpU6KWof.d.ts → index-BelbyUwz.d.ts} +85 -9
- package/dist/index.cjs +2206 -992
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +29 -16
- package/dist/index.d.ts +29 -16
- package/dist/index.js +76 -54
- package/dist/index.js.map +1 -1
- package/dist/indexing/index.cjs.map +1 -1
- package/dist/indexing/index.js +4 -4
- package/dist/issue-EPA2PSWP.js +12 -0
- package/dist/{ledger-LFVLHE5H.js → ledger-LS6GXCBP.js} +5 -5
- package/dist/materialized-views/index.cjs +257 -4
- package/dist/materialized-views/index.cjs.map +1 -1
- package/dist/materialized-views/index.d.cts +7 -7
- package/dist/materialized-views/index.d.ts +7 -7
- package/dist/materialized-views/index.js +8 -7
- package/dist/noydb-BVKFP74P.js +38 -0
- package/dist/overlay-views/index.cjs.map +1 -1
- package/dist/overlay-views/index.d.cts +7 -7
- package/dist/overlay-views/index.d.ts +7 -7
- package/dist/overlay-views/index.js +4 -4
- package/dist/periods/index.cjs.map +1 -1
- package/dist/periods/index.d.cts +6 -6
- package/dist/periods/index.d.ts +6 -6
- package/dist/periods/index.js +5 -5
- package/dist/{public-envelope-RXZNP3V6.js → public-envelope-AGU6SS4Z.js} +4 -4
- package/dist/query/index.cjs +320 -28
- 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 +7 -6
- package/dist/read-only-facade-EX6WZZBP.js +7 -0
- package/dist/registry-ERNAMRDE.js +8 -0
- package/dist/registry-EXTHSXQW.js +8 -0
- package/dist/{registry-SECUWSGY.js → registry-RDPTFXQ7.js} +3 -3
- package/dist/{revoke-B54H2S2W.js → revoke-IFLXEZA5.js} +6 -6
- package/dist/sealed-record/index.cjs.map +1 -1
- package/dist/sealed-record/index.d.cts +1 -1
- package/dist/sealed-record/index.d.ts +1 -1
- package/dist/sealed-record/index.js +2 -2
- package/dist/session/index.cjs.map +1 -1
- package/dist/session/index.d.cts +7 -7
- package/dist/session/index.d.ts +7 -7
- package/dist/session/index.js +3 -3
- package/dist/shadow/index.cjs.map +1 -1
- package/dist/shadow/index.d.cts +6 -6
- package/dist/shadow/index.d.ts +6 -6
- package/dist/shadow/index.js +2 -2
- package/dist/{signer-YSXZT574.js → signer-UNWOUJAK.js} +5 -5
- package/dist/snapshots/index.cjs.map +1 -1
- package/dist/snapshots/index.d.cts +6 -6
- package/dist/snapshots/index.d.ts +6 -6
- package/dist/snapshots/index.js +4 -4
- package/dist/{stale-TOA36SRK.js → stale-NTEV5SLX.js} +2 -2
- package/dist/state-vault-TUTFRTOA.js +14 -0
- package/dist/state-vault-TUTFRTOA.js.map +1 -0
- package/dist/store/index.cjs +8 -0
- package/dist/store/index.cjs.map +1 -1
- package/dist/store/index.d.cts +13 -6
- package/dist/store/index.d.ts +13 -6
- package/dist/store/index.js +2 -2
- package/dist/{strategy-4M9jo172.d.ts → strategy-BDxQnnTX.d.ts} +315 -4
- package/dist/{strategy-CLC1j79g.d.cts → strategy-C5ol6NdV.d.cts} +315 -4
- package/dist/sync/index.cjs.map +1 -1
- package/dist/sync/index.d.cts +5 -5
- package/dist/sync/index.d.ts +5 -5
- package/dist/sync/index.js +4 -4
- package/dist/team/index.cjs.map +1 -1
- package/dist/team/index.d.cts +6 -6
- package/dist/team/index.d.ts +6 -6
- package/dist/team/index.js +8 -8
- package/dist/transition-guard-B1N82hMf.d.cts +165 -0
- package/dist/transition-guard-C__YeF3_.d.ts +165 -0
- package/dist/tx/index.cjs.map +1 -1
- package/dist/tx/index.d.cts +6 -6
- package/dist/tx/index.d.ts +6 -6
- package/dist/tx/index.js +3 -3
- package/dist/{types-CljIHm_J.d.ts → types-CraiZOyO.d.ts} +609 -305
- package/dist/{types-CrSpRDuG.d.cts → types-D-gr5t0G.d.cts} +609 -305
- package/dist/{ulid-CrI7PPbA.d.cts → ulid-DQnSAP5W.d.cts} +1 -1
- package/dist/{ulid-CWfL2Vfv.d.ts → ulid-FFRRHkVf.d.ts} +1 -1
- package/dist/util/index.cjs.map +1 -1
- package/dist/util/index.js +1 -1
- package/dist/{vault-group-DHAHFX2A.js → vault-group-27EV7KB4.js} +205 -8
- package/dist/vault-group-27EV7KB4.js.map +1 -0
- package/dist/{with-materialized-view-NzF71cG_.d.cts → with-materialized-view-BboqxyV3.d.cts} +1 -1
- package/dist/{with-materialized-view-B892zYZV.d.ts → with-materialized-view-CguCeVcT.d.ts} +1 -1
- package/dist/{with-overlayed-view-CR6m7CHe.d.ts → with-overlayed-view-DO08u_tx.d.ts} +1 -1
- package/dist/{with-overlayed-view-UI8qSGL4.d.cts → with-overlayed-view-mmsg5Of3.d.cts} +1 -1
- package/dist/with-rollup-_TyBzz3T.d.ts +47 -0
- package/dist/with-rollup-aaxOZcIb.d.cts +47 -0
- package/package.json +3 -3
- package/dist/chunk-D77ZQSQQ.js.map +0 -1
- package/dist/chunk-DYYYUW5D.js.map +0 -1
- package/dist/chunk-GP3SDSH2.js.map +0 -1
- package/dist/chunk-HGVSHKZW.js.map +0 -1
- package/dist/chunk-I5IUYN7B.js.map +0 -1
- package/dist/chunk-JDWE6JMX.js +0 -139
- package/dist/chunk-JDWE6JMX.js.map +0 -1
- package/dist/chunk-PDULVIBY.js +0 -63
- package/dist/chunk-PDULVIBY.js.map +0 -1
- package/dist/chunk-QO6RGLLD.js.map +0 -1
- package/dist/chunk-ROPJVUG3.js.map +0 -1
- package/dist/chunk-ROVO6NPJ.js.map +0 -1
- package/dist/chunk-SISBMAPO.js.map +0 -1
- package/dist/chunk-UMLVJTYV.js.map +0 -1
- package/dist/chunk-WV7WV6JO.js.map +0 -1
- package/dist/chunk-ZEGSDPB7.js.map +0 -1
- package/dist/executor-3W63Y44O.js +0 -11
- package/dist/executor-CFFWPWBJ.js +0 -8
- package/dist/executor-VDQQOR4F.js +0 -8
- package/dist/immutable-guard-B5M95nbq.d.ts +0 -82
- package/dist/immutable-guard-qN3zF8o1.d.cts +0 -82
- package/dist/issue-TTMGHQ2J.js +0 -12
- package/dist/noydb-36S6GQNC.js +0 -37
- package/dist/read-only-facade-ITU6L7BL.js +0 -7
- package/dist/registry-3YFLZ7WD.js +0 -8
- package/dist/registry-TGZISEWC.js +0 -8
- package/dist/state-vault-W2OEABNO.js.map +0 -1
- package/dist/vault-group-DHAHFX2A.js.map +0 -1
- package/dist/with-derivation-BZ2y4bzF.d.ts +0 -13
- package/dist/with-derivation-Bozs8DmD.d.cts +0 -13
- /package/dist/{chunk-NBBMMJ2H.js.map → chunk-3FSMVWBN.js.map} +0 -0
- /package/dist/{chunk-SHX5QBCI.js.map → chunk-4ULLGYPA.js.map} +0 -0
- /package/dist/{chunk-CD2AVTEM.js.map → chunk-5IGWRMEC.js.map} +0 -0
- /package/dist/{chunk-F4G63NTZ.js.map → chunk-7C6VFNIY.js.map} +0 -0
- /package/dist/{chunk-XJV6OB4D.js.map → chunk-7HD67R6U.js.map} +0 -0
- /package/dist/{chunk-NYSYPFXJ.js.map → chunk-B6E5IRPJ.js.map} +0 -0
- /package/dist/{chunk-3G3W65EQ.js.map → chunk-DY3EOJEN.js.map} +0 -0
- /package/dist/{chunk-YYVZYTWW.js.map → chunk-E66DSTJP.js.map} +0 -0
- /package/dist/{chunk-5LIROIDM.js.map → chunk-FBLAWK6A.js.map} +0 -0
- /package/dist/{chunk-E77UKJYL.js.map → chunk-FPHRTW2Z.js.map} +0 -0
- /package/dist/{chunk-U5QCMH3W.js.map → chunk-GKQAU52M.js.map} +0 -0
- /package/dist/{chunk-2FU2FTXD.js.map → chunk-GYAWXHFO.js.map} +0 -0
- /package/dist/{chunk-XPIHJ34I.js.map → chunk-IBVTH4JR.js.map} +0 -0
- /package/dist/{chunk-C3HYQPV4.js.map → chunk-IVP5IVON.js.map} +0 -0
- /package/dist/{chunk-BL5GYANC.js.map → chunk-KEDJDWWQ.js.map} +0 -0
- /package/dist/{chunk-J7RWBXFY.js.map → chunk-LSIIPKYT.js.map} +0 -0
- /package/dist/{chunk-BSZOCSDZ.js.map → chunk-M3FPNTO2.js.map} +0 -0
- /package/dist/{chunk-XMVHEWF6.js.map → chunk-MI36HL5G.js.map} +0 -0
- /package/dist/{chunk-UNTGHX5A.js.map → chunk-OKOKPYWH.js.map} +0 -0
- /package/dist/{chunk-H2MRGONI.js.map → chunk-PTGQPWMV.js.map} +0 -0
- /package/dist/{chunk-BJSLBUJ7.js.map → chunk-PWFTQHYX.js.map} +0 -0
- /package/dist/{chunk-5AXTH4QZ.js.map → chunk-Q5MCHUXZ.js.map} +0 -0
- /package/dist/{chunk-QHM6XEAH.js.map → chunk-S22UOMHM.js.map} +0 -0
- /package/dist/{chunk-WIAOUFFB.js.map → chunk-S3XA7G35.js.map} +0 -0
- /package/dist/{chunk-KCEHMDZF.js.map → chunk-U7JNBSS3.js.map} +0 -0
- /package/dist/{chunk-ZNGPEV5J.js.map → chunk-V3VIRTTE.js.map} +0 -0
- /package/dist/{chunk-TIDXB5DF.js.map → chunk-V5FZWQNN.js.map} +0 -0
- /package/dist/{chunk-AEIKD3PP.js.map → chunk-VNUE6FHP.js.map} +0 -0
- /package/dist/{chunk-XMHUK5PN.js.map → chunk-X7FJMKT3.js.map} +0 -0
- /package/dist/{chunk-SNMJ7SB3.js.map → chunk-Y5J63SMF.js.map} +0 -0
- /package/dist/{chunk-M476FOQ7.js.map → chunk-YLRRU72W.js.map} +0 -0
- /package/dist/{chunk-DWEBTE2W.js.map → chunk-YX333DPS.js.map} +0 -0
- /package/dist/{chunk-BH3X5L6A.js.map → chunk-YZE6C3TQ.js.map} +0 -0
- /package/dist/{crypto-7BN2HDWG.js.map → crypto-B46VNH6X.js.map} +0 -0
- /package/dist/{delegation-MGH5SODX.js.map → delegation-5HON72PV.js.map} +0 -0
- /package/dist/{executor-3W63Y44O.js.map → executor-44R5CUS2.js.map} +0 -0
- /package/dist/{executor-CFFWPWBJ.js.map → executor-AOACUK7Z.js.map} +0 -0
- /package/dist/{executor-VDQQOR4F.js.map → executor-OKFLQCDW.js.map} +0 -0
- /package/dist/{fanout-sidecar-FIJJ46YG.js.map → fanout-sidecar-DCQWJQ6S.js.map} +0 -0
- /package/dist/{issue-TTMGHQ2J.js.map → issue-EPA2PSWP.js.map} +0 -0
- /package/dist/{ledger-LFVLHE5H.js.map → ledger-LS6GXCBP.js.map} +0 -0
- /package/dist/{noydb-36S6GQNC.js.map → noydb-BVKFP74P.js.map} +0 -0
- /package/dist/{public-envelope-RXZNP3V6.js.map → public-envelope-AGU6SS4Z.js.map} +0 -0
- /package/dist/{read-only-facade-ITU6L7BL.js.map → read-only-facade-EX6WZZBP.js.map} +0 -0
- /package/dist/{registry-3YFLZ7WD.js.map → registry-ERNAMRDE.js.map} +0 -0
- /package/dist/{registry-SECUWSGY.js.map → registry-EXTHSXQW.js.map} +0 -0
- /package/dist/{registry-TGZISEWC.js.map → registry-RDPTFXQ7.js.map} +0 -0
- /package/dist/{revoke-B54H2S2W.js.map → revoke-IFLXEZA5.js.map} +0 -0
- /package/dist/{signer-YSXZT574.js.map → signer-UNWOUJAK.js.map} +0 -0
- /package/dist/{stale-TOA36SRK.js.map → stale-NTEV5SLX.js.map} +0 -0
package/dist/store/index.d.cts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
1
|
+
import { aP as NoydbStore, ap as NoydbBundleStore } from '../types-D-gr5t0G.cjs';
|
|
2
|
+
export { bD as BUNDLE_STORE_POLICY, cC as INDEXED_STORE_POLICY, dy as PullMode, dA as PullPolicy, dC as PushMode, dE as PushPolicy, et as SyncPolicy, eu as SyncScheduler, ev as SyncSchedulerStatus } from '../types-D-gr5t0G.cjs';
|
|
3
|
+
export { ay as StoreCapabilityError } from '../errors-DL-zTrrF.cjs';
|
|
4
4
|
import '../lazy-builder-eYZzLEL1.cjs';
|
|
5
5
|
import '../predicate-BmhBSPCH.cjs';
|
|
6
|
-
import '../strategy-
|
|
6
|
+
import '../strategy-C5ol6NdV.cjs';
|
|
7
7
|
import '../strategy-BSxFXGzb.cjs';
|
|
8
|
-
import '../index-
|
|
9
|
-
import '../index-
|
|
8
|
+
import '../index-BMmajblo.cjs';
|
|
9
|
+
import '../index-BM7O48Ur.cjs';
|
|
10
10
|
import '@noy-db/attestation';
|
|
11
11
|
|
|
12
12
|
interface WrapBundleStoreOptions {
|
|
@@ -280,6 +280,13 @@ interface RoutedNoydbStore extends NoydbStore {
|
|
|
280
280
|
resume(route: OverrideTarget): Promise<number>;
|
|
281
281
|
/** Snapshot the current override/suspend state for diagnostics. */
|
|
282
282
|
routeStatus(): RouteStatus;
|
|
283
|
+
/**
|
|
284
|
+
* Resolve the physical backend a vault id maps to via the geographic
|
|
285
|
+
* `vaultRoutes` prefix routing (collection-independent), falling back to
|
|
286
|
+
* the `default` store. Used by the federation data-residency guard (#271)
|
|
287
|
+
* to read the placement backend's `capabilities.region`.
|
|
288
|
+
*/
|
|
289
|
+
resolveBackend(vaultId: string): NoydbStore;
|
|
283
290
|
}
|
|
284
291
|
/**
|
|
285
292
|
* Create a store multiplexer that dispatches operations to different backends
|
package/dist/store/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
1
|
+
import { aP as NoydbStore, ap as NoydbBundleStore } from '../types-CraiZOyO.js';
|
|
2
|
+
export { bD as BUNDLE_STORE_POLICY, cC as INDEXED_STORE_POLICY, dy as PullMode, dA as PullPolicy, dC as PushMode, dE as PushPolicy, et as SyncPolicy, eu as SyncScheduler, ev as SyncSchedulerStatus } from '../types-CraiZOyO.js';
|
|
3
|
+
export { ay as StoreCapabilityError } from '../errors-DL-zTrrF.js';
|
|
4
4
|
import '../lazy-builder-ChSqcF5t.js';
|
|
5
5
|
import '../predicate-BmhBSPCH.js';
|
|
6
|
-
import '../strategy-
|
|
6
|
+
import '../strategy-BDxQnnTX.js';
|
|
7
7
|
import '../strategy-BSxFXGzb.js';
|
|
8
|
-
import '../index-
|
|
9
|
-
import '../index-
|
|
8
|
+
import '../index-BMmajblo.js';
|
|
9
|
+
import '../index-BelbyUwz.js';
|
|
10
10
|
import '@noy-db/attestation';
|
|
11
11
|
|
|
12
12
|
interface WrapBundleStoreOptions {
|
|
@@ -280,6 +280,13 @@ interface RoutedNoydbStore extends NoydbStore {
|
|
|
280
280
|
resume(route: OverrideTarget): Promise<number>;
|
|
281
281
|
/** Snapshot the current override/suspend state for diagnostics. */
|
|
282
282
|
routeStatus(): RouteStatus;
|
|
283
|
+
/**
|
|
284
|
+
* Resolve the physical backend a vault id maps to via the geographic
|
|
285
|
+
* `vaultRoutes` prefix routing (collection-independent), falling back to
|
|
286
|
+
* the `default` store. Used by the federation data-residency guard (#271)
|
|
287
|
+
* to read the placement backend's `capabilities.region`.
|
|
288
|
+
*/
|
|
289
|
+
resolveBackend(vaultId: string): NoydbStore;
|
|
283
290
|
}
|
|
284
291
|
/**
|
|
285
292
|
* Create a store multiplexer that dispatches operations to different backends
|
package/dist/store/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
withRetry,
|
|
10
10
|
wrapBundleStore,
|
|
11
11
|
wrapStore
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-WFK2EVYU.js";
|
|
13
13
|
import {
|
|
14
14
|
BUNDLE_STORE_POLICY,
|
|
15
15
|
INDEXED_STORE_POLICY,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
} from "../chunk-2QR2PQTT.js";
|
|
18
18
|
import {
|
|
19
19
|
StoreCapabilityError
|
|
20
|
-
} from "../chunk-
|
|
20
|
+
} from "../chunk-DJF3FXW5.js";
|
|
21
21
|
export {
|
|
22
22
|
BUNDLE_STORE_POLICY,
|
|
23
23
|
INDEXED_STORE_POLICY,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as NoydbError } from './errors-
|
|
1
|
+
import { N as NoydbError } from './errors-DL-zTrrF.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Aggregation reducers for the query DSL.
|
|
@@ -432,6 +432,305 @@ declare function money(options: MoneyOptions): MoneyDescriptor;
|
|
|
432
432
|
/** Runtime predicate for detecting a {@link MoneyDescriptor}. */
|
|
433
433
|
declare function isMoneyDescriptor(x: unknown): x is MoneyDescriptor;
|
|
434
434
|
|
|
435
|
+
/**
|
|
436
|
+
* Per-layer i18n resolution policy.
|
|
437
|
+
*
|
|
438
|
+
* `onMissing` governs what happens when a multilingual field is resolved
|
|
439
|
+
* to a target locale that is absent. It may be a single scalar policy or
|
|
440
|
+
* a per-layer map, so a field can be lenient at the app read boundary but
|
|
441
|
+
* strict inside a materialized view.
|
|
442
|
+
*
|
|
443
|
+
* Effective policy for layer `λ`:
|
|
444
|
+
*
|
|
445
|
+
* ```
|
|
446
|
+
* explicit(λ) = typeof onMissing === 'object' ? onMissing[λ] : undefined
|
|
447
|
+
* scalar = typeof onMissing === 'string' ? onMissing : undefined
|
|
448
|
+
* policy(λ) = explicit(λ) ?? layerDefault(λ) ?? scalar ?? 'throw'
|
|
449
|
+
* ```
|
|
450
|
+
*
|
|
451
|
+
* - `layerDefault('guard') = 'substitute'` — guards are lenient unless
|
|
452
|
+
* EXPLICITLY overridden; they never inherit a scalar policy (a guard
|
|
453
|
+
* reading a display value must not hard-fail on a missing locale).
|
|
454
|
+
* - every other layer has no default, so it inherits the scalar, else
|
|
455
|
+
* falls back to `'throw'` (today's behavior — zero breaking change).
|
|
456
|
+
*
|
|
457
|
+
* @public
|
|
458
|
+
*/
|
|
459
|
+
type OnMissing = 'substitute' | 'null' | 'throw';
|
|
460
|
+
/**
|
|
461
|
+
* The contexts in which a multilingual field is resolved. Each can carry
|
|
462
|
+
* its own `onMissing` policy.
|
|
463
|
+
*
|
|
464
|
+
* - `read` — ordinary app reads (`get`/`list`/query projection).
|
|
465
|
+
* - `guard` — a guard callback reading a value.
|
|
466
|
+
* - `join` — a joined record expanded onto a row.
|
|
467
|
+
* - `mv` — materialized-view input.
|
|
468
|
+
* - `derivation` — derivation input.
|
|
469
|
+
* - `export` — bundle/public-envelope export.
|
|
470
|
+
*/
|
|
471
|
+
type Layer = 'read' | 'guard' | 'join' | 'mv' | 'derivation' | 'export';
|
|
472
|
+
/** Field-level policy: a single scalar, or a per-layer map. */
|
|
473
|
+
type OnMissingPolicy = OnMissing | Partial<Record<Layer, OnMissing>>;
|
|
474
|
+
/**
|
|
475
|
+
* Resolve the effective `OnMissing` for a layer from a field's declared
|
|
476
|
+
* policy. See module docs for the resolution rule.
|
|
477
|
+
*/
|
|
478
|
+
declare function resolvePolicy(onMissing: OnMissingPolicy | undefined, layer: Layer): OnMissing;
|
|
479
|
+
|
|
480
|
+
/**
|
|
481
|
+
* i18nText schema type —
|
|
482
|
+
*
|
|
483
|
+
* `i18nText({ languages, required })` creates a descriptor for a
|
|
484
|
+
* multi-language content field whose value is stored as a
|
|
485
|
+
* `{ [locale]: string }` map (e.g. `{ en: 'Consulting', th: 'ที่ปรึกษา' }`).
|
|
486
|
+
*
|
|
487
|
+
* On put, the descriptor validates that required languages are present.
|
|
488
|
+
* On read (when a `locale` option is passed), the map is collapsed to the
|
|
489
|
+
* caller's locale string via the fallback chain.
|
|
490
|
+
*
|
|
491
|
+
* Design decisions
|
|
492
|
+
* ────────────────
|
|
493
|
+
*
|
|
494
|
+
* **Descriptor pattern (not a Zod type).**
|
|
495
|
+
* `i18nText()` returns a plain descriptor object used in the collection's
|
|
496
|
+
* `i18nFields` option — same pattern as `ref()` / `dictKey()`. This keeps
|
|
497
|
+
* `@noy-db/core` at zero runtime dependencies and avoids Zod v3 field-type
|
|
498
|
+
* constraints. TypeScript inference is handled via the descriptor's type.
|
|
499
|
+
*
|
|
500
|
+
* **Enforcement at the collection boundary.**
|
|
501
|
+
* The `required` option is checked by `Collection.put()` via the compartment's
|
|
502
|
+
* registered `i18nFields`. Failed validation throws `MissingTranslationError`
|
|
503
|
+
* — a distinct class from `SchemaValidationError` so callers can tell
|
|
504
|
+
* "wrong shape" from "missing translations".
|
|
505
|
+
*
|
|
506
|
+
* **Resolution is post-decryption.**
|
|
507
|
+
* Locale resolution happens AFTER `decryptRecord()`, as a pure in-memory
|
|
508
|
+
* transform. No additional crypto work is needed. The resolved record is
|
|
509
|
+
* returned in place of the stored one, with i18nText fields replaced by
|
|
510
|
+
* their locale-resolved strings.
|
|
511
|
+
*
|
|
512
|
+
* **`locale: 'raw'`.**
|
|
513
|
+
* Passing `{ locale: 'raw' }` skips resolution and returns the full
|
|
514
|
+
* `{ [locale]: string }` map — useful for bilingual exports, admin UIs,
|
|
515
|
+
* and any context where all translations must be visible at once.
|
|
516
|
+
*
|
|
517
|
+
* **Out of scope.**
|
|
518
|
+
* Pluralization, RTL rendering, date/number formatting, per-locale CRDT
|
|
519
|
+
* merging.
|
|
520
|
+
*/
|
|
521
|
+
|
|
522
|
+
/** Flatten an intersection into a single object literal for nicer hovers. */
|
|
523
|
+
type Prettify<T> = {
|
|
524
|
+
[K in keyof T]: T[K];
|
|
525
|
+
} & {};
|
|
526
|
+
/**
|
|
527
|
+
* The stored shape of a multilingual field, inferred from its `required`
|
|
528
|
+
* mode — so the compiler forces you to handle an absent optional locale
|
|
529
|
+
* (`string | undefined`) instead of silently yielding `undefined`.
|
|
530
|
+
*
|
|
531
|
+
* Mirrors `i18nText({ languages, required })`:
|
|
532
|
+
* - `'all'` (default) — every locale required: `{ th: string; en: string }`
|
|
533
|
+
* - `'any'` — every locale optional: `{ th?: string; en?: string }`
|
|
534
|
+
* (the "at least one present" guarantee is runtime-only — not expressible
|
|
535
|
+
* in TypeScript — so each key is optional)
|
|
536
|
+
* - `readonly L[]` — listed locales required, the rest optional:
|
|
537
|
+
* `I18nMap<'th'|'en', ['th']>` → `{ th: string; en?: string }`
|
|
538
|
+
*
|
|
539
|
+
* @example
|
|
540
|
+
* ```ts
|
|
541
|
+
* type Lang = 'th' | 'en'
|
|
542
|
+
* interface Contact {
|
|
543
|
+
* name: I18nMap<Lang, 'any'> // { th?: string; en?: string }
|
|
544
|
+
* legalName: I18nMap<Lang, ['th']> // { th: string; en?: string }
|
|
545
|
+
* slug: I18nMap<Lang> // { th: string; en: string }
|
|
546
|
+
* }
|
|
547
|
+
* ```
|
|
548
|
+
*
|
|
549
|
+
* @public
|
|
550
|
+
*/
|
|
551
|
+
type I18nMap<Langs extends string, Required extends 'all' | 'any' | readonly Langs[] = 'all'> = Required extends 'all' ? Record<Langs, string> : Required extends 'any' ? Partial<Record<Langs, string>> : Required extends readonly (infer R extends Langs)[] ? Prettify<Record<R, string> & Partial<Record<Exclude<Langs, R>, string>>> : never;
|
|
552
|
+
/**
|
|
553
|
+
* Options for `i18nText()`.
|
|
554
|
+
*
|
|
555
|
+
* `languages` declares the full set of supported locales. `required`
|
|
556
|
+
* controls which must be present on every `put()`.
|
|
557
|
+
*
|
|
558
|
+
* `autoTranslate` is the per-field opt-in for the `plaintextTranslator`
|
|
559
|
+
* hook. When `true` and a `plaintextTranslator` is configured
|
|
560
|
+
* on `createNoydb()`, missing translations are generated before `put()`.
|
|
561
|
+
* Default: `false`.
|
|
562
|
+
*/
|
|
563
|
+
interface I18nTextOptions {
|
|
564
|
+
/** All supported locale codes (BCP 47). */
|
|
565
|
+
readonly languages: readonly string[];
|
|
566
|
+
/**
|
|
567
|
+
* Which locales must be present on every `put()`.
|
|
568
|
+
*
|
|
569
|
+
* - `'all'` — every declared language must be present.
|
|
570
|
+
* - `'any'` — at least one declared language must be present.
|
|
571
|
+
* - `string[]` — listed locales are required; others are optional.
|
|
572
|
+
*/
|
|
573
|
+
readonly required: 'all' | 'any' | readonly string[];
|
|
574
|
+
/**
|
|
575
|
+
* Per-field opt-in for the `plaintextTranslator` hook.
|
|
576
|
+
* When `true`, missing required translations are auto-generated
|
|
577
|
+
* before `put()` if a translator is configured. Default: `false`.
|
|
578
|
+
*/
|
|
579
|
+
readonly autoTranslate?: boolean;
|
|
580
|
+
/**
|
|
581
|
+
* What to do when this field is resolved to a locale that is absent.
|
|
582
|
+
* A single policy, or a per-layer map (read/guard/join/mv/derivation/
|
|
583
|
+
* export). Default `'throw'` — today's behavior, zero breaking change.
|
|
584
|
+
* See {@link OnMissingPolicy}.
|
|
585
|
+
*
|
|
586
|
+
* NOTE (current wiring): ALL layers are enforced — `read` (`get`/`list`),
|
|
587
|
+
* `guard`, `derivation`, `mv`, `join`, `export`. Guard / derivation
|
|
588
|
+
* `ctx.vault` reads resolve under their own layer policy (`guard` defaults to
|
|
589
|
+
* the lenient `'substitute'`). The `mv` layer fires for materialized views
|
|
590
|
+
* that declare `{ i18nLocale, i18nFields }` — UNION (group-key i18n fields
|
|
591
|
+
* resolve before the unified-row bucketing) and query-form (resolved in
|
|
592
|
+
* `GroupedAggregation.run` before `groupAndReduce`); grouping a raw i18n field
|
|
593
|
+
* without a locale throws. The `join` layer resolves a joined right-side i18n
|
|
594
|
+
* field to the query locale (`toArray({ locale })` or the vault default; raw
|
|
595
|
+
* when locale-less). The `export` layer fires for
|
|
596
|
+
* `exportStream`/`exportJSON({ resolveLabels })` — records collapse to the
|
|
597
|
+
* export locale.
|
|
598
|
+
*/
|
|
599
|
+
readonly onMissing?: OnMissingPolicy;
|
|
600
|
+
/**
|
|
601
|
+
* Ordered preferred-substitute locales used when `onMissing` resolves
|
|
602
|
+
* to `'substitute'` and the target locale is absent. `'any'` as an
|
|
603
|
+
* element means "first non-empty value". A caller-supplied `fallback`
|
|
604
|
+
* at read time takes precedence over this declared list.
|
|
605
|
+
*/
|
|
606
|
+
readonly substitute?: readonly string[];
|
|
607
|
+
/**
|
|
608
|
+
* #285 smart-substitute. When `true`, a missing-locale `substitute` walk that
|
|
609
|
+
* misses the explicit chain prefers the available locale whose script is
|
|
610
|
+
* nearest the target (same script, then Latin) rather than an arbitrary value
|
|
611
|
+
* — e.g. a missing Thai label prefers another Thai (or Latin) translation over
|
|
612
|
+
* an unreadable script. Default `false` (legacy first-non-empty behavior).
|
|
613
|
+
*/
|
|
614
|
+
readonly smartSubstitute?: boolean;
|
|
615
|
+
/**
|
|
616
|
+
* Per-locale script enforcement (write-time). `'auto'` infers the
|
|
617
|
+
* allowed Unicode scripts per locale (asymmetric Latin tolerance); an
|
|
618
|
+
* object overrides per slot. Absent ⇒ no check. See `./script.ts`.
|
|
619
|
+
*/
|
|
620
|
+
readonly script?: 'auto' | Partial<Record<string, readonly string[]>>;
|
|
621
|
+
/**
|
|
622
|
+
* What to do when a slot's value contains characters outside its
|
|
623
|
+
* allowed script set. Default `'reject'`.
|
|
624
|
+
*/
|
|
625
|
+
readonly onScriptViolation?: 'reject' | 'filter' | 'warn';
|
|
626
|
+
}
|
|
627
|
+
/**
|
|
628
|
+
* Descriptor returned by `i18nText()`. Attach to the collection's
|
|
629
|
+
* `i18nFields` option:
|
|
630
|
+
*
|
|
631
|
+
* ```ts
|
|
632
|
+
* const lineItems = company.collection<LineItem>('line-items', {
|
|
633
|
+
* i18nFields: {
|
|
634
|
+
* description: i18nText({ languages: ['en', 'th'], required: 'all' }),
|
|
635
|
+
* },
|
|
636
|
+
* })
|
|
637
|
+
* ```
|
|
638
|
+
*/
|
|
639
|
+
interface I18nTextDescriptor {
|
|
640
|
+
readonly _noydbI18nText: true;
|
|
641
|
+
readonly options: I18nTextOptions;
|
|
642
|
+
}
|
|
643
|
+
/**
|
|
644
|
+
* Create an `I18nTextDescriptor` for a multi-language content field.
|
|
645
|
+
*
|
|
646
|
+
* @param options Language list + enforcement mode.
|
|
647
|
+
*
|
|
648
|
+
* @example
|
|
649
|
+
* ```ts
|
|
650
|
+
* i18nText({ languages: ['en', 'th'], required: 'all' })
|
|
651
|
+
* i18nText({ languages: ['en', 'th'], required: ['th'], autoTranslate: true })
|
|
652
|
+
* ```
|
|
653
|
+
*/
|
|
654
|
+
declare function i18nText(options: I18nTextOptions): I18nTextDescriptor;
|
|
655
|
+
/** Runtime predicate for detecting an `I18nTextDescriptor`. */
|
|
656
|
+
declare function isI18nTextDescriptor(x: unknown): x is I18nTextDescriptor;
|
|
657
|
+
/**
|
|
658
|
+
* Validate that a value is a valid `{ [locale]: string }` map and that
|
|
659
|
+
* all required locales are present. Throws `MissingTranslationError`
|
|
660
|
+
* when the required constraint is violated.
|
|
661
|
+
*
|
|
662
|
+
* Called by `Collection.put()` for each registered `i18nField`.
|
|
663
|
+
*
|
|
664
|
+
* @param value The raw field value from the record being put.
|
|
665
|
+
* @param field The field name (used in the thrown error message).
|
|
666
|
+
* @param descriptor The `i18nText()` descriptor for this field.
|
|
667
|
+
*/
|
|
668
|
+
declare function validateI18nTextValue(value: unknown, field: string, descriptor: I18nTextDescriptor): void;
|
|
669
|
+
/**
|
|
670
|
+
* Resolve an i18nText value (`{ [locale]: string }` map) to a string
|
|
671
|
+
* for the given locale.
|
|
672
|
+
*
|
|
673
|
+
* @param value The stored locale map.
|
|
674
|
+
* @param locale The requested locale code, or `'raw'` to return the map.
|
|
675
|
+
* @param fallback Single locale or ordered list; use `'any'` as the last
|
|
676
|
+
* element to fall back to any available translation.
|
|
677
|
+
* @param field Field name used in `LocaleNotSpecifiedError` messages.
|
|
678
|
+
* @returns The resolved string, OR the original map when `locale === 'raw'`.
|
|
679
|
+
*/
|
|
680
|
+
/** Options for the policy-aware form of {@link resolveI18nText}. */
|
|
681
|
+
interface ResolveI18nOptions {
|
|
682
|
+
/** Effective policy for the resolution layer. Default `'throw'`. */
|
|
683
|
+
readonly policy?: OnMissing;
|
|
684
|
+
/** Declared substitute chain; applied only under policy `'substitute'`. */
|
|
685
|
+
readonly substitute?: readonly string[];
|
|
686
|
+
/**
|
|
687
|
+
* #285 smart-substitute. When `true` and policy is `'substitute'`, after the
|
|
688
|
+
* explicit chain misses, pick the available locale whose script is nearest the
|
|
689
|
+
* target (same script first, then Latin's broad readability) instead of an
|
|
690
|
+
* arbitrary value. Default `false`.
|
|
691
|
+
*/
|
|
692
|
+
readonly smartSubstitute?: boolean;
|
|
693
|
+
}
|
|
694
|
+
declare function resolveI18nText(value: Record<string, string>, locale: string, fallback?: string | readonly string[], field?: string): string | Record<string, string>;
|
|
695
|
+
declare function resolveI18nText(value: Record<string, string>, locale: string, fallback: string | readonly string[] | undefined, field: string | undefined, opts: ResolveI18nOptions): string | Record<string, string> | null;
|
|
696
|
+
/**
|
|
697
|
+
* Return all leaf values at `path`, expanding `[].` array wildcards.
|
|
698
|
+
*
|
|
699
|
+
* - `'name'` → `[obj.name]`
|
|
700
|
+
* - `'address.lineOne'` → `[obj.address.lineOne]`
|
|
701
|
+
* - `'contacts[].title'` → `[obj.contacts[0].title, obj.contacts[1].title, …]`
|
|
702
|
+
*
|
|
703
|
+
* Returns an empty array when the path does not resolve (missing key,
|
|
704
|
+
* wrong type, etc.). Used by `enforceI18nOnPut` to validate nested fields.
|
|
705
|
+
*/
|
|
706
|
+
declare function getAtPath(obj: Record<string, unknown>, path: string): unknown[];
|
|
707
|
+
/**
|
|
708
|
+
* Mutate `obj` in-place, setting `value` at the nested `path`.
|
|
709
|
+
* Supports dot notation (`'address.lineOne'`) but not array wildcards —
|
|
710
|
+
* auto-translate on `contacts[].title` style paths is not supported.
|
|
711
|
+
*/
|
|
712
|
+
declare function setAtPathInPlace(obj: Record<string, unknown>, path: string, value: unknown): void;
|
|
713
|
+
/**
|
|
714
|
+
* Apply locale resolution to a single record, returning a new copy.
|
|
715
|
+
*
|
|
716
|
+
* For each field registered as an `i18nText` descriptor:
|
|
717
|
+
* - If `locale === 'raw'`, the field value is left as the stored map.
|
|
718
|
+
* - Otherwise, the field value is replaced with the resolved string.
|
|
719
|
+
*
|
|
720
|
+
* Field paths support dot notation (`'address.lineOne'`) and array
|
|
721
|
+
* wildcards (`'contacts[].title'`). Top-level fields work as before.
|
|
722
|
+
*
|
|
723
|
+
* @param record The decrypted record.
|
|
724
|
+
* @param i18nFields Map of field path → `I18nTextDescriptor`.
|
|
725
|
+
* @param locale The requested locale (or `'raw'`).
|
|
726
|
+
* @param fallback Fallback chain (optional).
|
|
727
|
+
* @param layer Resolution layer (default `'read'`). Each field's
|
|
728
|
+
* `onMissing` policy is resolved for this layer, so the
|
|
729
|
+
* same record resolves leniently on a get but strictly
|
|
730
|
+
* inside an mv/derivation.
|
|
731
|
+
*/
|
|
732
|
+
declare function applyI18nLocale(record: Record<string, unknown>, i18nFields: Record<string, I18nTextDescriptor>, locale: string, fallback?: string | readonly string[], layer?: Layer): Record<string, unknown>;
|
|
733
|
+
|
|
435
734
|
/**
|
|
436
735
|
* Query DSL `.groupBy()` —.
|
|
437
736
|
*
|
|
@@ -649,8 +948,20 @@ declare class GroupedAggregation<R> {
|
|
|
649
948
|
*. Present when the grouping field is a dictKey.
|
|
650
949
|
*/
|
|
651
950
|
dictLabelResolver?: ((key: string, locale: string, fallback?: string | readonly string[]) => Promise<string | undefined>) | undefined);
|
|
652
|
-
/**
|
|
653
|
-
|
|
951
|
+
/**
|
|
952
|
+
* Execute the query, group, reduce, and return an array of rows.
|
|
953
|
+
*
|
|
954
|
+
* `opts` (#285 query-form MV grouping): when a `locale` + `i18nFields` are
|
|
955
|
+
* given, the declared group-key `i18nText` fields are resolved to that locale
|
|
956
|
+
* at the `mv` layer BEFORE bucketing — so an i18n group key is a stable string
|
|
957
|
+
* instead of a raw `{locale}` map. The MV executor passes the MV's
|
|
958
|
+
* `i18nLocale`/`i18nFields`; ordinary `.run()` callers pass nothing and are
|
|
959
|
+
* unaffected.
|
|
960
|
+
*/
|
|
961
|
+
run(opts?: {
|
|
962
|
+
locale?: string;
|
|
963
|
+
i18nFields?: Record<string, I18nTextDescriptor>;
|
|
964
|
+
}): R[];
|
|
654
965
|
/**
|
|
655
966
|
* Execute the query, group, reduce, and resolve `<field>Label` for
|
|
656
967
|
* each result row when the grouping field is a `dictKey` and a
|
|
@@ -736,4 +1047,4 @@ interface AggregateStrategy {
|
|
|
736
1047
|
scanAggregate<Spec extends AggregateSpec>(iter: AsyncIterable<unknown>, spec: Spec): Promise<AggregateResult<Spec>>;
|
|
737
1048
|
}
|
|
738
1049
|
|
|
739
|
-
export { type AggregateStrategy as A,
|
|
1050
|
+
export { type AggregateStrategy as A, count as B, groupAndReduce as C, max as D, min as E, reduceRecords as F, GROUPBY_MAX_CARDINALITY as G, resetGroupByWarnings as H, type I18nMap as I, sum as J, type RoundingMode as K, type Layer as L, MoneyCurrencyError as M, type MoneyDescriptor as N, type OnMissing as O, type MoneyOptions as P, type MoneyOptionsFixed as Q, type ResolveI18nOptions as R, type MoneyOptionsMulti as S, MoneyPrecisionError as T, MoneyUnsupportedError as U, isMoneyDescriptor as V, money as W, type I18nTextDescriptor as a, type I18nTextOptions as b, type OnMissingPolicy as c, applyI18nLocale as d, isI18nTextDescriptor as e, resolvePolicy as f, getAtPath as g, type AggregateResult as h, i18nText as i, type AggregateSpec as j, Aggregation as k, type AggregationUpstream as l, GROUPBY_WARN_CARDINALITY as m, GroupedAggregation as n, GroupedQuery as o, GroupedQueryN as p, type GroupedRow as q, resolveI18nText as r, setAtPathInPlace as s, type GroupedRowN as t, type LiveAggregation as u, validateI18nTextValue as v, type Reducer as w, type ReducerOptions as x, avg as y, buildLiveAggregation as z };
|