@noy-db/hub 0.2.0-pre.3 → 0.2.0-pre.31

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.
Files changed (384) hide show
  1. package/README.md +126 -0
  2. package/dist/adapter/index.d.ts +9 -0
  3. package/dist/adapter/index.js +14 -0
  4. package/dist/aggregate/index.d.ts +3 -2
  5. package/dist/aggregate/index.js +10 -8
  6. package/dist/aggregate/index.js.map +1 -1
  7. package/dist/attestation/index.d.ts +7 -5
  8. package/dist/attestation/index.js +7 -6
  9. package/dist/attestation/index.js.map +1 -1
  10. package/dist/blobs/index.d.ts +9 -7
  11. package/dist/blobs/index.js +12 -6
  12. package/dist/blobs/index.js.map +1 -1
  13. package/dist/bundle/index.d.ts +29 -18
  14. package/dist/bundle/index.js +53 -192
  15. package/dist/bundle/index.js.map +1 -1
  16. package/dist/{chunk-75QDHSE4.js → chunk-2QDWRK3B.js} +5 -5
  17. package/dist/{chunk-74JEQFMT.js → chunk-2UT7HJJR.js} +5 -5
  18. package/dist/chunk-2UT7HJJR.js.map +1 -0
  19. package/dist/{chunk-FCDO7UAO.js → chunk-2ZYIN3BL.js} +2 -2
  20. package/dist/{chunk-BFI3RS42.js → chunk-33EQCZXE.js} +2 -2
  21. package/dist/chunk-33EQCZXE.js.map +1 -0
  22. package/dist/{chunk-WRLHNG6H.js → chunk-4K4QKYK4.js} +4 -4
  23. package/dist/chunk-4K4QKYK4.js.map +1 -0
  24. package/dist/{chunk-HGZ7DC5H.js → chunk-4L6N56B4.js} +2 -2
  25. package/dist/chunk-4L6N56B4.js.map +1 -0
  26. package/dist/{chunk-YMYK7US4.js → chunk-4YD7VZH4.js} +2 -2
  27. package/dist/chunk-4YD7VZH4.js.map +1 -0
  28. package/dist/{chunk-ZUMGGHRB.js → chunk-5PTX7PKD.js} +4 -4
  29. package/dist/{chunk-QAU5HM6Q.js → chunk-6EKRQ7QF.js} +3 -3
  30. package/dist/{chunk-ZC2AAE6J.js → chunk-7GPQPLGO.js} +19 -4
  31. package/dist/chunk-7GPQPLGO.js.map +1 -0
  32. package/dist/{chunk-EPK6A3WJ.js → chunk-A3JMGXPG.js} +2 -2
  33. package/dist/chunk-A3JMGXPG.js.map +1 -0
  34. package/dist/{chunk-FXQYZNOW.js → chunk-A7DNZVAV.js} +1 -1
  35. package/dist/chunk-A7DNZVAV.js.map +1 -0
  36. package/dist/{chunk-UMLVJTYV.js → chunk-ADB7GPM3.js} +7 -4
  37. package/dist/chunk-ADB7GPM3.js.map +1 -0
  38. package/dist/{chunk-YL2DR3HY.js → chunk-ASIGWYRA.js} +2 -2
  39. package/dist/chunk-ASIGWYRA.js.map +1 -0
  40. package/dist/{chunk-2EYC3WDT.js → chunk-AWU4JF7C.js} +93 -93
  41. package/dist/chunk-AWU4JF7C.js.map +1 -0
  42. package/dist/chunk-BEZ2EV43.js +129 -0
  43. package/dist/chunk-BEZ2EV43.js.map +1 -0
  44. package/dist/{chunk-IS5HWQO7.js → chunk-CIZDUAHI.js} +30 -4
  45. package/dist/chunk-CIZDUAHI.js.map +1 -0
  46. package/dist/{chunk-4OQWR46B.js → chunk-CUPTCF4R.js} +5 -5
  47. package/dist/chunk-CUPTCF4R.js.map +1 -0
  48. package/dist/{chunk-5ZGZ6HIZ.js → chunk-DEE4CRYN.js} +30 -7
  49. package/dist/chunk-DEE4CRYN.js.map +1 -0
  50. package/dist/{chunk-UOF74WQY.js → chunk-E2MDPPOC.js} +37 -2
  51. package/dist/chunk-E2MDPPOC.js.map +1 -0
  52. package/dist/{chunk-SAVQ6E2O.js → chunk-FFKQ65YX.js} +10 -3
  53. package/dist/chunk-FFKQ65YX.js.map +1 -0
  54. package/dist/{chunk-2XLVPKXG.js → chunk-G7ALNCQH.js} +10 -2
  55. package/dist/chunk-G7ALNCQH.js.map +1 -0
  56. package/dist/chunk-GGXN73NM.js +252 -0
  57. package/dist/chunk-GGXN73NM.js.map +1 -0
  58. package/dist/{chunk-UVPGJXVO.js → chunk-JOJPBZSZ.js} +5 -5
  59. package/dist/{chunk-YDLAFP36.js → chunk-JZ5DS4DP.js} +346 -3
  60. package/dist/chunk-JZ5DS4DP.js.map +1 -0
  61. package/dist/{chunk-KMI2NBBF.js → chunk-K4JID2ZE.js} +44 -8
  62. package/dist/chunk-K4JID2ZE.js.map +1 -0
  63. package/dist/{aggregate/index.cjs → chunk-K6NVSHAH.js} +241 -210
  64. package/dist/chunk-K6NVSHAH.js.map +1 -0
  65. package/dist/chunk-KJ3K5VZM.js +524 -0
  66. package/dist/chunk-KJ3K5VZM.js.map +1 -0
  67. package/dist/chunk-L5HHBOMS.js +232 -0
  68. package/dist/chunk-L5HHBOMS.js.map +1 -0
  69. package/dist/{chunk-YK72A4IT.js → chunk-LBILABKZ.js} +4 -4
  70. package/dist/chunk-LXKBG52H.js +151 -0
  71. package/dist/chunk-LXKBG52H.js.map +1 -0
  72. package/dist/{chunk-NGSPBLLE.js → chunk-MPIZQGFA.js} +50 -20
  73. package/dist/chunk-MPIZQGFA.js.map +1 -0
  74. package/dist/{chunk-4X2S7PBF.js → chunk-MRJPSXPE.js} +84 -70
  75. package/dist/chunk-MRJPSXPE.js.map +1 -0
  76. package/dist/{chunk-6S3LLAQ5.js → chunk-MSMDDDDJ.js} +3 -3
  77. package/dist/{chunk-6S3LLAQ5.js.map → chunk-MSMDDDDJ.js.map} +1 -1
  78. package/dist/{chunk-GAUBWHAF.js → chunk-OCYFFBZS.js} +4 -4
  79. package/dist/{chunk-NCO2JGKK.js → chunk-PDVP3C2I.js} +1 -1
  80. package/dist/chunk-PDVP3C2I.js.map +1 -0
  81. package/dist/chunk-PZ5AY32C.js +10 -0
  82. package/dist/{chunk-P6256WTJ.js → chunk-QBLPY44S.js} +3 -3
  83. package/dist/chunk-QBLPY44S.js.map +1 -0
  84. package/dist/{query/index.cjs → chunk-QGBBQKDS.js} +706 -831
  85. package/dist/chunk-QGBBQKDS.js.map +1 -0
  86. package/dist/{chunk-FS7A4XNF.js → chunk-QWJCNXH2.js} +3 -3
  87. package/dist/chunk-QXWJQ7UU.js +380 -0
  88. package/dist/chunk-QXWJQ7UU.js.map +1 -0
  89. package/dist/{chunk-GDTCGIPX.js → chunk-RCB6GWTC.js} +27 -5
  90. package/dist/chunk-RCB6GWTC.js.map +1 -0
  91. package/dist/{chunk-K5PVGKE4.js → chunk-SAAJYSVV.js} +2 -2
  92. package/dist/{chunk-G7PAZ3TD.js → chunk-SHJ3BRTZ.js} +46 -10
  93. package/dist/chunk-SHJ3BRTZ.js.map +1 -0
  94. package/dist/chunk-SQXTKZL7.js +125 -0
  95. package/dist/chunk-SQXTKZL7.js.map +1 -0
  96. package/dist/chunk-STNPB3UM.js +9 -0
  97. package/dist/chunk-STNPB3UM.js.map +1 -0
  98. package/dist/{chunk-NSLTPGEN.js → chunk-TMUMMAWV.js} +12 -2
  99. package/dist/{chunk-NSLTPGEN.js.map → chunk-TMUMMAWV.js.map} +1 -1
  100. package/dist/{chunk-LS3JLEIB.js → chunk-TZGWI5AX.js} +4 -4
  101. package/dist/{chunk-GD3BGKAR.js → chunk-UBF5JEOJ.js} +44 -5
  102. package/dist/chunk-UBF5JEOJ.js.map +1 -0
  103. package/dist/{chunk-T6HQMVML.js → chunk-W5NVNJDX.js} +5250 -801
  104. package/dist/chunk-W5NVNJDX.js.map +1 -0
  105. package/dist/chunk-XAYDHD2O.js +123 -0
  106. package/dist/chunk-XAYDHD2O.js.map +1 -0
  107. package/dist/{chunk-LOL725S4.js → chunk-XYW2CSCI.js} +31 -3
  108. package/dist/chunk-XYW2CSCI.js.map +1 -0
  109. package/dist/{chunk-TLFUDXVV.js → chunk-ZCMOS4H2.js} +31 -10
  110. package/dist/chunk-ZCMOS4H2.js.map +1 -0
  111. package/dist/{chunk-FBMXWVGP.js → chunk-ZK66B5EY.js} +450 -30
  112. package/dist/chunk-ZK66B5EY.js.map +1 -0
  113. package/dist/{chunk-GVXBHCZ2.js → chunk-ZPJSQPQH.js} +66 -7
  114. package/dist/chunk-ZPJSQPQH.js.map +1 -0
  115. package/dist/consent/index.d.ts +8 -6
  116. package/dist/consent/index.js +4 -3
  117. package/dist/consent/index.js.map +1 -1
  118. package/dist/crdt/index.js +1 -0
  119. package/dist/crdt/index.js.map +1 -1
  120. package/dist/{crypto-H2Y3DDFW.js → crypto-OSIV2IIW.js} +8 -3
  121. package/dist/{ulid-CiM2OAeM.d.ts → decrypt-partition-CXS5KopB.d.ts} +37 -82
  122. package/dist/{delegation-QSC7G5QC.js → delegation-BQTRJATI.js} +6 -5
  123. package/dist/derivations/index.d.ts +11 -9
  124. package/dist/derivations/index.js +9 -6
  125. package/dist/{dev-unlock-Cf2B7Kih.d.ts → dev-unlock-CnHTTVea.d.ts} +1 -1
  126. package/dist/discriminant-BN9REW3o.d.ts +60 -0
  127. package/dist/errors-BAWO5Z5a.d.ts +1500 -0
  128. package/dist/executor-KYSKFJ2R.js +9 -0
  129. package/dist/executor-M7W3NEKR.js +9 -0
  130. package/dist/executor-VDTDGWO6.js +13 -0
  131. package/dist/{fanout-sidecar-NRBWSLRK.js → fanout-sidecar-AZALISHB.js} +3 -2
  132. package/dist/fanout-sidecar-AZALISHB.js.map +1 -0
  133. package/dist/forget/index.d.ts +1 -0
  134. package/dist/forget/index.js +15 -0
  135. package/dist/guards/index.d.ts +16 -8
  136. package/dist/guards/index.js +12 -5
  137. package/dist/{hash-gVn_uKhp.d.ts → hash-oc5paYl0.d.ts} +1 -1
  138. package/dist/history/index.d.ts +9 -7
  139. package/dist/history/index.js +10 -7
  140. package/dist/history/index.js.map +1 -1
  141. package/dist/i18n/index.d.ts +8 -6
  142. package/dist/i18n/index.js +116 -15
  143. package/dist/i18n/index.js.map +1 -1
  144. package/dist/index-BMmajblo.d.ts +362 -0
  145. package/dist/index-BmhGztUi.d.ts +93 -0
  146. package/dist/{types-D9eB0Rvh.d.ts → index-DHn9lEP0.d.ts} +4305 -1523
  147. package/dist/{index-BF1B2HB9.d.ts → index-Ddm8D3Oo.d.ts} +186 -1151
  148. package/dist/index.d.ts +342 -70
  149. package/dist/index.js +420 -112
  150. package/dist/index.js.map +1 -1
  151. package/dist/indexing/index.d.ts +3 -3
  152. package/dist/indexing/index.js +5 -4
  153. package/dist/indexing/index.js.map +1 -1
  154. package/dist/issue-DPHRF2TI.js +13 -0
  155. package/dist/kernel/index.d.ts +11 -0
  156. package/dist/kernel/index.js +50 -0
  157. package/dist/{lazy-builder-Rpd-V3jP.d.ts → lazy-builder-ChSqcF5t.d.ts} +2 -2
  158. package/dist/{ledger-WOEJUYTP.js → ledger-CI7GSMLB.js} +7 -6
  159. package/dist/materialized-views/index.d.ts +23 -20
  160. package/dist/materialized-views/index.js +9 -7
  161. package/dist/mime-magic-JeLKHRng.d.ts +103 -0
  162. package/dist/noydb-NAU2DTFP.js +40 -0
  163. package/dist/overlay-views/index.d.ts +32 -12
  164. package/dist/overlay-views/index.js +7 -6
  165. package/dist/periods/index.d.ts +8 -6
  166. package/dist/periods/index.js +7 -6
  167. package/dist/{predicate-Dnu81tsS.d.cts → predicate-BmhBSPCH.d.ts} +87 -5
  168. package/dist/{public-envelope-OHQ5UZFM.js → public-envelope-MFMBFJLZ.js} +5 -4
  169. package/dist/query/index.d.ts +4 -3
  170. package/dist/query/index.js +14 -6
  171. package/dist/read-only-facade-3OQRZ3VS.js +8 -0
  172. package/dist/registry-IX5WKK4F.js +8 -0
  173. package/dist/registry-LMHO5265.js +11 -0
  174. package/dist/registry-TXCKWH26.js +9 -0
  175. package/dist/registry-VFEDQSYV.js +9 -0
  176. package/dist/revoke-5PUOZPJJ.js +18 -0
  177. package/dist/revoke-5PUOZPJJ.js.map +1 -0
  178. package/dist/sealed-record/index.d.ts +123 -0
  179. package/dist/sealed-record/index.js +43 -0
  180. package/dist/sealed-record/index.js.map +1 -0
  181. package/dist/session/index.d.ts +9 -7
  182. package/dist/session/index.js +4 -3
  183. package/dist/session/index.js.map +1 -1
  184. package/dist/shadow/index.d.ts +8 -6
  185. package/dist/shadow/index.js +3 -2
  186. package/dist/shadow/index.js.map +1 -1
  187. package/dist/{signer-M4K5HBLD.js → signer-UB5TQOZ6.js} +6 -5
  188. package/dist/signer-UB5TQOZ6.js.map +1 -0
  189. package/dist/snapshots/index.d.ts +30 -0
  190. package/dist/snapshots/index.js +153 -0
  191. package/dist/snapshots/index.js.map +1 -0
  192. package/dist/{stale-PAGCS4K5.js → stale-J3TUF5C5.js} +3 -2
  193. package/dist/stale-J3TUF5C5.js.map +1 -0
  194. package/dist/store/index.d.ts +15 -6
  195. package/dist/store/index.js +3 -2
  196. package/dist/{strategy-DSTrsZ8t.d.ts → strategy-8QGs5KQE.d.ts} +475 -7
  197. package/dist/sync/index.d.ts +7 -5
  198. package/dist/sync/index.js +5 -4
  199. package/dist/sync/index.js.map +1 -1
  200. package/dist/team/index.d.ts +8 -6
  201. package/dist/team/index.js +9 -8
  202. package/dist/transition-guard-Dy3NioQr.d.ts +165 -0
  203. package/dist/tx/index.d.ts +26 -8
  204. package/dist/tx/index.js +10 -5
  205. package/dist/tx/index.js.map +1 -1
  206. package/dist/ulid-DRH25k3y.d.ts +66 -0
  207. package/dist/{ulid-COREQ2RQ.js → ulid-KEPZMD2N.js} +2 -1
  208. package/dist/ulid-KEPZMD2N.js.map +1 -0
  209. package/dist/util/index.d.ts +2 -0
  210. package/dist/util/index.js +6 -1
  211. package/dist/util/index.js.map +1 -1
  212. package/dist/{with-materialized-view-qtoJ3xKJ.d.ts → with-materialized-view-DIVeez0W.d.ts} +2 -2
  213. package/dist/{with-overlayed-view-DFaRfgMr.d.ts → with-overlayed-view-DVZrc5Hb.d.ts} +2 -2
  214. package/dist/with-rollup-CbU-O4wP.d.ts +47 -0
  215. package/dist/zod-HAJM7LMS.js +14763 -0
  216. package/dist/zod-HAJM7LMS.js.map +1 -0
  217. package/package.json +73 -191
  218. package/dist/aggregate/index.cjs.map +0 -1
  219. package/dist/aggregate/index.d.cts +0 -38
  220. package/dist/attestation/index.cjs +0 -305
  221. package/dist/attestation/index.cjs.map +0 -1
  222. package/dist/attestation/index.d.cts +0 -52
  223. package/dist/blobs/index.cjs +0 -1480
  224. package/dist/blobs/index.cjs.map +0 -1
  225. package/dist/blobs/index.d.cts +0 -46
  226. package/dist/bundle/index.cjs +0 -18561
  227. package/dist/bundle/index.cjs.map +0 -1
  228. package/dist/bundle/index.d.cts +0 -176
  229. package/dist/chunk-2EYC3WDT.js.map +0 -1
  230. package/dist/chunk-2XLVPKXG.js.map +0 -1
  231. package/dist/chunk-4OQWR46B.js.map +0 -1
  232. package/dist/chunk-4UBOTYP5.js +0 -1367
  233. package/dist/chunk-4UBOTYP5.js.map +0 -1
  234. package/dist/chunk-4X2S7PBF.js.map +0 -1
  235. package/dist/chunk-5YHWBPOT.js +0 -19
  236. package/dist/chunk-5YHWBPOT.js.map +0 -1
  237. package/dist/chunk-5ZGZ6HIZ.js.map +0 -1
  238. package/dist/chunk-74JEQFMT.js.map +0 -1
  239. package/dist/chunk-A6SWRXUQ.js +0 -118
  240. package/dist/chunk-A6SWRXUQ.js.map +0 -1
  241. package/dist/chunk-BFI3RS42.js.map +0 -1
  242. package/dist/chunk-EMEX37ZN.js +0 -51
  243. package/dist/chunk-EMEX37ZN.js.map +0 -1
  244. package/dist/chunk-EPK6A3WJ.js.map +0 -1
  245. package/dist/chunk-FBMXWVGP.js.map +0 -1
  246. package/dist/chunk-FXQYZNOW.js.map +0 -1
  247. package/dist/chunk-G7PAZ3TD.js.map +0 -1
  248. package/dist/chunk-GD3BGKAR.js.map +0 -1
  249. package/dist/chunk-GDTCGIPX.js.map +0 -1
  250. package/dist/chunk-GVXBHCZ2.js.map +0 -1
  251. package/dist/chunk-HGZ7DC5H.js.map +0 -1
  252. package/dist/chunk-IS5HWQO7.js.map +0 -1
  253. package/dist/chunk-KMI2NBBF.js.map +0 -1
  254. package/dist/chunk-KYKMKLJ6.js +0 -340
  255. package/dist/chunk-KYKMKLJ6.js.map +0 -1
  256. package/dist/chunk-LOL725S4.js.map +0 -1
  257. package/dist/chunk-MRIBLZL3.js +0 -86
  258. package/dist/chunk-MRIBLZL3.js.map +0 -1
  259. package/dist/chunk-NCO2JGKK.js.map +0 -1
  260. package/dist/chunk-NGSPBLLE.js.map +0 -1
  261. package/dist/chunk-P6256WTJ.js.map +0 -1
  262. package/dist/chunk-SAVQ6E2O.js.map +0 -1
  263. package/dist/chunk-T6HQMVML.js.map +0 -1
  264. package/dist/chunk-TLFUDXVV.js.map +0 -1
  265. package/dist/chunk-UMLVJTYV.js.map +0 -1
  266. package/dist/chunk-UOF74WQY.js.map +0 -1
  267. package/dist/chunk-WRLHNG6H.js.map +0 -1
  268. package/dist/chunk-YDLAFP36.js.map +0 -1
  269. package/dist/chunk-YL2DR3HY.js.map +0 -1
  270. package/dist/chunk-YMYK7US4.js.map +0 -1
  271. package/dist/chunk-ZC2AAE6J.js.map +0 -1
  272. package/dist/consent/index.cjs +0 -204
  273. package/dist/consent/index.cjs.map +0 -1
  274. package/dist/consent/index.d.cts +0 -25
  275. package/dist/crdt/index.cjs +0 -152
  276. package/dist/crdt/index.cjs.map +0 -1
  277. package/dist/crdt/index.d.cts +0 -30
  278. package/dist/derivations/index.cjs +0 -351
  279. package/dist/derivations/index.cjs.map +0 -1
  280. package/dist/derivations/index.d.cts +0 -72
  281. package/dist/dev-unlock-De3mjQWv.d.cts +0 -263
  282. package/dist/executor-BZKFZVRC.js +0 -8
  283. package/dist/executor-GFZFDQXV.js +0 -8
  284. package/dist/executor-KT2IOZVP.js +0 -11
  285. package/dist/fanout-sidecar-NRBWSLRK.js.map +0 -1
  286. package/dist/guards/index.cjs +0 -322
  287. package/dist/guards/index.cjs.map +0 -1
  288. package/dist/guards/index.d.cts +0 -31
  289. package/dist/hash-vBCB0-Ps.d.cts +0 -63
  290. package/dist/history/index.cjs +0 -1222
  291. package/dist/history/index.cjs.map +0 -1
  292. package/dist/history/index.d.cts +0 -63
  293. package/dist/i18n/index.cjs +0 -840
  294. package/dist/i18n/index.cjs.map +0 -1
  295. package/dist/i18n/index.d.cts +0 -39
  296. package/dist/index-DVkvrgpm.d.cts +0 -2290
  297. package/dist/index.cjs +0 -23590
  298. package/dist/index.cjs.map +0 -1
  299. package/dist/index.d.cts +0 -778
  300. package/dist/indexing/index.cjs +0 -738
  301. package/dist/indexing/index.cjs.map +0 -1
  302. package/dist/indexing/index.d.cts +0 -36
  303. package/dist/issue-BAJ7ZB4S.js +0 -12
  304. package/dist/lazy-builder-C-rPfWG0.d.cts +0 -304
  305. package/dist/materialized-views/index.cjs +0 -837
  306. package/dist/materialized-views/index.cjs.map +0 -1
  307. package/dist/materialized-views/index.d.cts +0 -184
  308. package/dist/mime-magic-CBBSOkjm.d.cts +0 -50
  309. package/dist/mime-magic-CBBSOkjm.d.ts +0 -50
  310. package/dist/noydb-XNQSKXGO.js +0 -34
  311. package/dist/overlay-views/index.cjs +0 -359
  312. package/dist/overlay-views/index.cjs.map +0 -1
  313. package/dist/overlay-views/index.d.cts +0 -82
  314. package/dist/periods/index.cjs +0 -1041
  315. package/dist/periods/index.cjs.map +0 -1
  316. package/dist/periods/index.d.cts +0 -22
  317. package/dist/predicate-Dnu81tsS.d.ts +0 -185
  318. package/dist/query/index.cjs.map +0 -1
  319. package/dist/query/index.d.cts +0 -3
  320. package/dist/read-only-facade-ITU6L7BL.js +0 -7
  321. package/dist/registry-2IEARCGT.js +0 -7
  322. package/dist/registry-CDHASH73.js +0 -10
  323. package/dist/registry-EMGLZGR6.js +0 -8
  324. package/dist/registry-NQALYR77.js +0 -8
  325. package/dist/revoke-7JOVLZFD.js +0 -17
  326. package/dist/session/index.cjs +0 -495
  327. package/dist/session/index.cjs.map +0 -1
  328. package/dist/session/index.d.cts +0 -46
  329. package/dist/shadow/index.cjs +0 -133
  330. package/dist/shadow/index.cjs.map +0 -1
  331. package/dist/shadow/index.d.cts +0 -17
  332. package/dist/store/index.cjs +0 -1083
  333. package/dist/store/index.cjs.map +0 -1
  334. package/dist/store/index.d.cts +0 -492
  335. package/dist/strategy-BSxFXGzb.d.cts +0 -110
  336. package/dist/strategy-DSTrsZ8t.d.cts +0 -601
  337. package/dist/sync/index.cjs +0 -1062
  338. package/dist/sync/index.cjs.map +0 -1
  339. package/dist/sync/index.d.cts +0 -43
  340. package/dist/team/index.cjs +0 -2798
  341. package/dist/team/index.cjs.map +0 -1
  342. package/dist/team/index.d.cts +0 -118
  343. package/dist/tx/index.cjs +0 -544
  344. package/dist/tx/index.cjs.map +0 -1
  345. package/dist/tx/index.d.cts +0 -21
  346. package/dist/types-CSLcfytP.d.cts +0 -12493
  347. package/dist/ulid-CG2YvAbg.d.cts +0 -603
  348. package/dist/util/index.cjs +0 -230
  349. package/dist/util/index.cjs.map +0 -1
  350. package/dist/util/index.d.cts +0 -77
  351. package/dist/with-derivation-Bzpj6UTv.d.ts +0 -13
  352. package/dist/with-derivation-DWajFh4K.d.cts +0 -13
  353. package/dist/with-guard-DF_Ul3DT.d.cts +0 -18
  354. package/dist/with-guard-DR7U-l4v.d.ts +0 -18
  355. package/dist/with-materialized-view-_piodoIz.d.cts +0 -27
  356. package/dist/with-overlayed-view-DwzCKxn2.d.cts +0 -13
  357. /package/dist/{crypto-H2Y3DDFW.js.map → adapter/index.js.map} +0 -0
  358. /package/dist/{chunk-75QDHSE4.js.map → chunk-2QDWRK3B.js.map} +0 -0
  359. /package/dist/{chunk-FCDO7UAO.js.map → chunk-2ZYIN3BL.js.map} +0 -0
  360. /package/dist/{chunk-ZUMGGHRB.js.map → chunk-5PTX7PKD.js.map} +0 -0
  361. /package/dist/{chunk-QAU5HM6Q.js.map → chunk-6EKRQ7QF.js.map} +0 -0
  362. /package/dist/{chunk-UVPGJXVO.js.map → chunk-JOJPBZSZ.js.map} +0 -0
  363. /package/dist/{chunk-YK72A4IT.js.map → chunk-LBILABKZ.js.map} +0 -0
  364. /package/dist/{chunk-GAUBWHAF.js.map → chunk-OCYFFBZS.js.map} +0 -0
  365. /package/dist/{delegation-QSC7G5QC.js.map → chunk-PZ5AY32C.js.map} +0 -0
  366. /package/dist/{chunk-FS7A4XNF.js.map → chunk-QWJCNXH2.js.map} +0 -0
  367. /package/dist/{chunk-K5PVGKE4.js.map → chunk-SAAJYSVV.js.map} +0 -0
  368. /package/dist/{chunk-LS3JLEIB.js.map → chunk-TZGWI5AX.js.map} +0 -0
  369. /package/dist/{executor-BZKFZVRC.js.map → crypto-OSIV2IIW.js.map} +0 -0
  370. /package/dist/{executor-GFZFDQXV.js.map → delegation-BQTRJATI.js.map} +0 -0
  371. /package/dist/{executor-KT2IOZVP.js.map → executor-KYSKFJ2R.js.map} +0 -0
  372. /package/dist/{issue-BAJ7ZB4S.js.map → executor-M7W3NEKR.js.map} +0 -0
  373. /package/dist/{ledger-WOEJUYTP.js.map → executor-VDTDGWO6.js.map} +0 -0
  374. /package/dist/{noydb-XNQSKXGO.js.map → forget/index.js.map} +0 -0
  375. /package/dist/{public-envelope-OHQ5UZFM.js.map → issue-DPHRF2TI.js.map} +0 -0
  376. /package/dist/{read-only-facade-ITU6L7BL.js.map → kernel/index.js.map} +0 -0
  377. /package/dist/{registry-2IEARCGT.js.map → ledger-CI7GSMLB.js.map} +0 -0
  378. /package/dist/{registry-CDHASH73.js.map → noydb-NAU2DTFP.js.map} +0 -0
  379. /package/dist/{registry-EMGLZGR6.js.map → public-envelope-MFMBFJLZ.js.map} +0 -0
  380. /package/dist/{registry-NQALYR77.js.map → read-only-facade-3OQRZ3VS.js.map} +0 -0
  381. /package/dist/{revoke-7JOVLZFD.js.map → registry-IX5WKK4F.js.map} +0 -0
  382. /package/dist/{signer-M4K5HBLD.js.map → registry-LMHO5265.js.map} +0 -0
  383. /package/dist/{stale-PAGCS4K5.js.map → registry-TXCKWH26.js.map} +0 -0
  384. /package/dist/{ulid-COREQ2RQ.js.map → registry-VFEDQSYV.js.map} +0 -0
@@ -1,4 +1,4 @@
1
- import { ba as PublicEnvelope, bb as SealingKeyProvider, bc as BundleRecipient, bd as RecipientSealer, be as RecipientHint, bf as Vault } from './types-D9eB0Rvh.js';
1
+ import { bc as PublicEnvelope, bd as SealingKeyProvider, be as BundleRecipient, bf as RecipientSealer, bg as RecipientHint, bh as Vault } from './index-DHn9lEP0.js';
2
2
 
3
3
  /**
4
4
  * `.noydb` container format — byte layout, header schema, validators.
@@ -124,7 +124,7 @@ interface NoydbBundleHeader {
124
124
  */
125
125
  readonly publicEnvelope?: PublicEnvelope;
126
126
  /**
127
- * Auto-unlock material indicator (#197). When present, the bundle
127
+ * Auto-unlock material indicator. When present, the bundle
128
128
  * body wraps the dump JSON in a structure carrying per-user
129
129
  * passphrases — either plaintext (`'unsealed'`, public-by-design)
130
130
  * or sealed under a `SealingKeyProvider` (`'sealed'`, requires
@@ -136,17 +136,17 @@ interface NoydbBundleHeader {
136
136
  * (sealed).
137
137
  *
138
138
  * Absent → the body is a raw `vault.dump()` JSON string (the
139
- * pre-#197 shape; back-compatible).
139
+ * the legacy shape; back-compatible).
140
140
  */
141
141
  readonly autoUnlock?: 'unsealed' | 'sealed';
142
142
  /**
143
- * Bundle's role in the source → destination lifecycle (#203).
143
+ * Bundle's role in the source → destination lifecycle.
144
144
  * - omitted / 'snapshot' (default): backup/copy of an existing vault.
145
145
  * - 'extracted-partition': re-keyed projection awaiting adoption.
146
146
  */
147
147
  readonly bundleKind?: 'snapshot' | 'extracted-partition';
148
148
  /**
149
- * Transfer-seal INDICATOR (#206) — metadata only, no payload (the
149
+ * Transfer-seal INDICATOR — metadata only, no payload (the
150
150
  * sealed DEKs live in the body). Present iff
151
151
  * bundleKind === 'extracted-partition'.
152
152
  */
@@ -248,7 +248,7 @@ interface AutoCredential {
248
248
  * - `compression: 'gzip'` — force gzip
249
249
  * - `compression: 'none'` — no compression (round-trip testing only)
250
250
  *
251
- * **Slice filtering** (added in ):
251
+ * **Slice filtering:**
252
252
  * - `collections` — allowlist of collection names to include. Internal
253
253
  * collections (keyrings, ledger) and excluded user collections are
254
254
  * dropped from the bundle. Records inside included collections are
@@ -311,7 +311,7 @@ interface WriteNoydbBundleOptions {
311
311
  */
312
312
  readonly recipients?: readonly BundleRecipient[];
313
313
  /**
314
- * Auto-unlock — unsealed per-user credentials (#215).
314
+ * Auto-unlock — unsealed per-user credentials.
315
315
  *
316
316
  * Generalises `autoPassphrases` to support any bundleable credential
317
317
  * kind (`passphrase` | `password` | `pin`).
@@ -333,7 +333,7 @@ interface WriteNoydbBundleOptions {
333
333
  };
334
334
  /**
335
335
  * Auto-unlock — per-user credentials sealed under a
336
- * {@link SealingKeyProvider} (#215).
336
+ * {@link SealingKeyProvider}.
337
337
  *
338
338
  * Generalises `sealedPassphrases` to support any bundleable
339
339
  * credential kind (`passphrase` | `password` | `pin`).
@@ -369,9 +369,9 @@ interface WriteNoydbBundleOptions {
369
369
  }>;
370
370
  };
371
371
  /**
372
- * @deprecated Use `autoCredentials` instead (#215).
372
+ * @deprecated Use `autoCredentials` instead.
373
373
  *
374
- * Auto-unlock — unsealed per-user passphrases (#197 slice 1).
374
+ * Auto-unlock — unsealed per-user passphrases.
375
375
  *
376
376
  * Public-by-design: anyone holding the bundle bytes can read these
377
377
  * plaintext credentials. Use for demo data, sample vaults,
@@ -389,10 +389,10 @@ interface WriteNoydbBundleOptions {
389
389
  readonly perUser: Record<string, string>;
390
390
  };
391
391
  /**
392
- * @deprecated Use `sealedCredentials` instead (#215).
392
+ * @deprecated Use `sealedCredentials` instead.
393
393
  *
394
394
  * Auto-unlock — per-user passphrases sealed under a
395
- * {@link SealingKeyProvider} (#197 slice 1, self-target only).
395
+ * {@link SealingKeyProvider} (self-target only).
396
396
  *
397
397
  * The hub seals each user's plaintext passphrase under `provider`
398
398
  * and embeds the resulting sealed envelopes in the bundle. The
@@ -424,7 +424,7 @@ interface NoydbBundleReadResult {
424
424
  readonly header: NoydbBundleHeader;
425
425
  readonly dumpJson: string;
426
426
  /**
427
- * Auto-unlock material (#197, widened in #215). Present only when
427
+ * Auto-unlock material. Present only when
428
428
  * the header's `autoUnlock` flag is set AND the body's wrapped
429
429
  * structure survived parsing. Values are typed credentials — either
430
430
  * delivered plain (`kind: 'unsealed'`) or unsealed at read time
@@ -444,9 +444,9 @@ interface NoydbBundleReadResult {
444
444
  };
445
445
  }
446
446
  /**
447
- * Options accepted by {@link readNoydbBundle} for the #197
448
- * auto-unlock paths. Without these the reader behaves exactly as
449
- * pre-#197 (header parsed; body returned as `dumpJson`).
447
+ * Options accepted by {@link readNoydbBundle} for the
448
+ * auto-unlock paths. Without these the reader behaves exactly as before
449
+ * (header parsed; body returned as `dumpJson`).
450
450
  */
451
451
  interface ReadNoydbBundleOptions {
452
452
  /**
@@ -469,10 +469,10 @@ interface ReadNoydbBundleOptions {
469
469
  readonly attemptUnsealAcrossProviders?: boolean;
470
470
  }
471
471
  /**
472
- * Transfer-seal payload (#206). The destination DEKs, exported to raw
472
+ * Transfer-seal payload. The destination DEKs, exported to raw
473
473
  * bytes and AES-256-GCM-sealed *as a set* under the one-time transfer
474
- * key. `adoptPartition` (#207) unseals this; `createOwnerOnAdoptedPartition`
475
- * (#208) re-wraps the raw DEKs under the recipient's KEK.
474
+ * key. `adoptPartition` unseals this; `createOwnerOnAdoptedPartition`
475
+ * re-wraps the raw DEKs under the recipient's KEK.
476
476
  */
477
477
  interface TransferSealPayload {
478
478
  readonly v: 1;
@@ -535,69 +535,24 @@ declare function readNoydbBundlePublicEnvelope(bytes: Uint8Array, opts?: {
535
535
  */
536
536
  declare function readNoydbBundle(bytes: Uint8Array, opts?: ReadNoydbBundleOptions): Promise<NoydbBundleReadResult>;
537
537
 
538
+ /** One decrypted record from an extracted-partition compartment. */
539
+ interface DecryptedRecord {
540
+ readonly id: string;
541
+ readonly record: Record<string, unknown>;
542
+ /** Source envelope write timestamp (ISO) — for last-write-wins merges. */
543
+ readonly ts: string;
544
+ /** Source envelope version. */
545
+ readonly version: number;
546
+ /** Provenance source id (FR-5). Present only when the source collection had provenance:true and a source was supplied on put. */
547
+ readonly source?: string;
548
+ /** ISO-8601 timestamp the provenance source was recorded (FR-5). */
549
+ readonly sourceTs?: string;
550
+ }
538
551
  /**
539
- * Minimal ULID generator zero dependencies, Web Crypto API only.
540
- *
541
- *. Used by the bundle writer to generate stable opaque
542
- * handles for `.noydb` containers.
543
- *
544
- * **What's a ULID?** A 128-bit identifier encoded as 26 Crockford
545
- * base32 characters. Layout:
546
- *
547
- * ```
548
- * 01HYABCDEFGHJKMNPQRSTVWXYZ
549
- * |--------||---------------|
550
- * 48-bit 80-bit
551
- * timestamp randomness
552
- * ```
553
- *
554
- * The first 10 chars encode a millisecond Unix timestamp (so ULIDs
555
- * sort lexicographically by creation time), and the remaining 16
556
- * chars are random. Crockford base32 omits I/L/O/U to avoid
557
- * ambiguity in handwriting and URLs.
558
- *
559
- * **Why hand-roll instead of pulling in `ulid`?** The package adds
560
- * a dep, the implementation is ~30 lines, and the bundle module
561
- * is the only consumer. Adding `ulid` would also drag in its own
562
- * crypto polyfill that we don't need on Node 18+ or modern
563
- * browsers.
564
- *
565
- * **Privacy consideration:** the timestamp prefix is observable in
566
- * the bundle header. This is a deliberate trade-off:
567
- * - Pro: lexicographic sortability lets bundle adapters list
568
- * newest-first without an extra index.
569
- * - Con: a casual observer can read the bundle's creation time
570
- * from the handle. They cannot read it from any OTHER field
571
- * (the header explicitly forbids `_exported_at`), and a
572
- * creation timestamp is the same kind of metadata that
573
- * filesystem mtime would already expose for a downloaded
574
- * bundle. The leak is therefore equivalent to what's already
575
- * visible from the file's mtime — not a new exposure.
576
- *
577
- * If a future use case needs timestamp-free handles, a v2 of the
578
- * format could specify "use the random portion only" without a
579
- * format break — `validateBundleHeader` only checks the regex
580
- * shape, not the encoded timestamp.
581
- */
582
- /**
583
- * Generate a fresh ULID. Uses `crypto.getRandomValues` for the
584
- * randomness portion — same Web Crypto API the rest of the
585
- * codebase uses for IVs and salt.
586
- *
587
- * Returns a 26-character string. Calling twice in the same
588
- * millisecond produces two distinct ULIDs (the random portion
589
- * differs); ULIDs from the same millisecond are NOT guaranteed
590
- * to be monotonically ordered relative to each other, only
591
- * relative to ULIDs from a different millisecond. The bundle
592
- * format never relies on intra-millisecond ordering.
593
- */
594
- declare function generateULID(): string;
595
- /**
596
- * Validate that a string is a syntactically well-formed ULID. Used
597
- * by the bundle header validator. Does NOT verify that the
598
- * timestamp portion decodes to a sensible date — the format only
599
- * cares about the encoding shape.
552
+ * Decrypt every record of an extracted-partition bundle to plaintext,
553
+ * grouped by collection. Throws if the bundle isn't an
554
+ * extracted-partition or the transfer key is wrong.
600
555
  */
601
- declare function isULID(value: string): boolean;
556
+ declare function decryptExtractedPartition(bundleBytes: Uint8Array, transferKey: Uint8Array): Promise<Record<string, DecryptedRecord[]>>;
602
557
 
603
- export { type AutoCredential as A, COMPRESSION_BROTLI as C, FLAG_COMPRESSED as F, NOYDB_BUNDLE_FORMAT_VERSION as N, type ReadNoydbBundleOptions as R, type TransferSealPayload as T, type WriteNoydbBundleOptions as W, COMPRESSION_GZIP as a, COMPRESSION_NONE as b, type CompressionAlgo as c, FLAG_HAS_INTEGRITY_HASH as d, NOYDB_BUNDLE_MAGIC as e, NOYDB_BUNDLE_PREFIX_BYTES as f, type NoydbBundleHeader as g, type NoydbBundleReadResult as h, encodeBundleHeader as i, generateULID as j, isULID as k, readNoydbBundleHeader as l, resetBrotliSupportCache as m, type AutoCredentialKind as n, hasNoydbBundleMagic as o, readNoydbBundlePublicEnvelope as p, readNoydbBundle as r, validateBundleHeader as v, writeNoydbBundle as w };
558
+ export { type AutoCredential as A, COMPRESSION_BROTLI as C, type DecryptedRecord as D, FLAG_COMPRESSED as F, NOYDB_BUNDLE_FORMAT_VERSION as N, type ReadNoydbBundleOptions as R, type TransferSealPayload as T, type WriteNoydbBundleOptions as W, COMPRESSION_GZIP as a, COMPRESSION_NONE as b, type CompressionAlgo as c, FLAG_HAS_INTEGRITY_HASH as d, NOYDB_BUNDLE_MAGIC as e, NOYDB_BUNDLE_PREFIX_BYTES as f, type NoydbBundleHeader as g, type NoydbBundleReadResult as h, decryptExtractedPartition as i, encodeBundleHeader as j, readNoydbBundleHeader as k, resetBrotliSupportCache as l, type AutoCredentialKind as m, hasNoydbBundleMagic as n, readNoydbBundlePublicEnvelope as o, readNoydbBundle as r, validateBundleHeader as v, writeNoydbBundle as w };
@@ -3,15 +3,16 @@ import {
3
3
  issueDelegation,
4
4
  loadActiveDelegations,
5
5
  revokeDelegation
6
- } from "./chunk-YK72A4IT.js";
7
- import "./chunk-6S3LLAQ5.js";
6
+ } from "./chunk-LBILABKZ.js";
7
+ import "./chunk-MSMDDDDJ.js";
8
8
  import "./chunk-FZU343FL.js";
9
- import "./chunk-UOF74WQY.js";
10
- import "./chunk-YDLAFP36.js";
9
+ import "./chunk-E2MDPPOC.js";
10
+ import "./chunk-JZ5DS4DP.js";
11
+ import "./chunk-PZ5AY32C.js";
11
12
  export {
12
13
  DELEGATIONS_COLLECTION,
13
14
  issueDelegation,
14
15
  loadActiveDelegations,
15
16
  revokeDelegation
16
17
  };
17
- //# sourceMappingURL=delegation-QSC7G5QC.js.map
18
+ //# sourceMappingURL=delegation-BQTRJATI.js.map
@@ -1,11 +1,13 @@
1
- export { w as withDerivation } from '../with-derivation-Bzpj6UTv.js';
2
- import { aw as DerivationStrategy, ax as DerivationContext } from '../types-D9eB0Rvh.js';
3
- export { ay as ArrayOutputSpec, az as DerivationRegistry, aA as DerivationStrategyHandle, aB as DerivedFromMeta, aC as OutputSpec, aD as RecordOutputSpec } from '../types-D9eB0Rvh.js';
4
- export { e as DerivationCapExceededError, f as DerivationCycleError, g as DerivationDepthError, h as DerivationOutputShapeError, i as DerivationOutputUnknownError } from '../index-BF1B2HB9.js';
5
- import '../lazy-builder-Rpd-V3jP.js';
6
- import '../predicate-Dnu81tsS.js';
7
- import '../strategy-DSTrsZ8t.js';
1
+ export { w as withDerivation, a as withRollup } from '../with-rollup-CbU-O4wP.js';
2
+ import { aC as DerivationStrategy, aD as DerivationContext } from '../index-DHn9lEP0.js';
3
+ export { aE as ArrayOutputSpec, aF as DerivationRegistry, aG as DerivationStrategyHandle, aH as DerivedFromMeta, aI as OutputSpec, aJ as RecordOutputSpec } from '../index-DHn9lEP0.js';
4
+ export { i as DerivationCapExceededError, j as DerivationCycleError, k as DerivationDepthError, l as DerivationOutputShapeError, m as DerivationOutputUnknownError } from '../errors-BAWO5Z5a.js';
5
+ import '../lazy-builder-ChSqcF5t.js';
6
+ import '../predicate-BmhBSPCH.js';
7
+ import '../strategy-8QGs5KQE.js';
8
8
  import '../strategy-BSxFXGzb.js';
9
+ import '../index-BMmajblo.js';
10
+ import '../index-Ddm8D3Oo.js';
9
11
  import '@noy-db/attestation';
10
12
 
11
13
  interface RunResult {
@@ -18,7 +20,7 @@ interface RunResult {
18
20
  *
19
21
  * - `record` — the existing v1 shape: one value (or a "skipped"
20
22
  * marker if the output was optional and `derive` returned null).
21
- * - `array` — the #200 shape: a list of `(key, value)` entries.
23
+ * - `array` — a list of `(key, value)` entries.
22
24
  * The caller diffs these against the previously-emitted key set
23
25
  * (loaded from the fanout sidecar) to compute deletes + upserts.
24
26
  */
@@ -28,7 +30,7 @@ interface RecordOutputResult {
28
30
  value: Record<string, unknown>;
29
31
  ok: true;
30
32
  /**
31
- * `true` when an optional output (#144) returned `null` /
33
+ * `true` when an optional output returned `null` /
32
34
  * `undefined`. The caller deletes any previously-emitted output at
33
35
  * the same id (mirrors "tombstone for derived data"); a never-emitted
34
36
  * output is a silent no-op. `ok: true` because skipping is a
@@ -1,19 +1,21 @@
1
1
  import {
2
- withDerivation
3
- } from "../chunk-EMEX37ZN.js";
2
+ withDerivation,
3
+ withRollup
4
+ } from "../chunk-BEZ2EV43.js";
4
5
  import {
5
6
  DerivationRegistry
6
- } from "../chunk-GD3BGKAR.js";
7
+ } from "../chunk-UBF5JEOJ.js";
7
8
  import {
8
9
  DerivationExecutor
9
- } from "../chunk-HGZ7DC5H.js";
10
+ } from "../chunk-4L6N56B4.js";
10
11
  import {
11
12
  DerivationCapExceededError,
12
13
  DerivationCycleError,
13
14
  DerivationDepthError,
14
15
  DerivationOutputShapeError,
15
16
  DerivationOutputUnknownError
16
- } from "../chunk-YDLAFP36.js";
17
+ } from "../chunk-JZ5DS4DP.js";
18
+ import "../chunk-PZ5AY32C.js";
17
19
  export {
18
20
  DerivationCapExceededError,
19
21
  DerivationCycleError,
@@ -22,6 +24,7 @@ export {
22
24
  DerivationOutputShapeError,
23
25
  DerivationOutputUnknownError,
24
26
  DerivationRegistry,
25
- withDerivation
27
+ withDerivation,
28
+ withRollup
26
29
  };
27
30
  //# sourceMappingURL=index.js.map
@@ -1,4 +1,4 @@
1
- import { aL as Role, aM as UnlockedKeyring } from './types-D9eB0Rvh.js';
1
+ import { aT as Role, aU as UnlockedKeyring } from './index-DHn9lEP0.js';
2
2
 
3
3
  /**
4
4
  * Session tokens —
@@ -0,0 +1,60 @@
1
+ /**
2
+ * Type-guard helper for narrowing discriminated-union records.
3
+ *
4
+ * `Collection<T>` correctly threads `T` through `get` / `query` / `scan`, but
5
+ * accessing member-specific fields after reading from a `Collection<Union>`
6
+ * still requires a narrowing step in application code. In regular `.ts` files
7
+ * a simple `if (r.kind === 'IV')` block narrows correctly; in vue-tsc /
8
+ * template contexts the inline comparison is sometimes not enough, and the
9
+ * helper below makes the guard portable and avoids `as unknown as …` casts.
10
+ *
11
+ * **Usage with Collection<T>**
12
+ *
13
+ * ```ts
14
+ * import { isDiscriminant } from '@noy-db/hub'
15
+ *
16
+ * type IV = { kind: 'IV'; invoiceNo: string; amount: number }
17
+ * type RE = { kind: 'RE'; receiptNo: string; paidAt: string }
18
+ * type Receipt = IV | RE | ...
19
+ *
20
+ * const receipts = await vault.collection<Receipt>('receipts').query().toArray()
21
+ *
22
+ * // Filter approach — result is IV[], invoiceNo accessible without cast:
23
+ * const ivs = receipts.filter(r => isDiscriminant(r, 'kind', 'IV'))
24
+ * console.log(ivs[0].invoiceNo)
25
+ *
26
+ * // Branch approach:
27
+ * for (const r of receipts) {
28
+ * if (isDiscriminant(r, 'kind', 'IV')) {
29
+ * console.log(r.invoiceNo) // r: IV here
30
+ * }
31
+ * }
32
+ * ```
33
+ *
34
+ * @module
35
+ */
36
+ /**
37
+ * Type-guard for narrowing a discriminated-union record by its discriminant.
38
+ *
39
+ * Returns `true` when `record[key] === value`, and narrows `record` to
40
+ * `Extract<T, Record<K, V>>` — the exact union member(s) that carry that
41
+ * discriminant value.
42
+ *
43
+ * The discriminant key is a parameter (not hardcoded to `'kind'`), so this
44
+ * works with any field name: `'kind'`, `'type'`, `'tag'`, etc.
45
+ *
46
+ * @example
47
+ * const ivs = receipts.filter(r => isDiscriminant(r, 'kind', 'IV'))
48
+ * // ivs: IV[] — invoiceNo accessible, no cast needed
49
+ *
50
+ * @typeParam T - The union type of the record (e.g. `Receipt`). Both type-alias
51
+ * unions and interface-extended unions work; use a `type` alias (`type Receipt = IV | RE`) for best
52
+ * results.
53
+ * @typeParam K - The discriminant key (must be a key of `T`).
54
+ * @typeParam V - The discriminant value to match. The `const` modifier ensures
55
+ * TypeScript infers the string literal (e.g. `'IV'`), not the full union
56
+ * `T[K]`, so the predicate resolves to the exact member type.
57
+ */
58
+ declare function isDiscriminant<T, K extends keyof T, const V extends T[K]>(record: T, key: K, value: V): record is Extract<T, Record<K, V>>;
59
+
60
+ export { isDiscriminant as i };