@nicia-ai/typegraph 0.45.0 → 0.46.1
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/backend/drizzle/indexes.cjs +11 -11
- package/dist/backend/drizzle/indexes.d.cts +1 -1
- package/dist/backend/drizzle/indexes.d.ts +1 -1
- package/dist/backend/drizzle/indexes.js +7 -7
- package/dist/backend/index.cjs +53 -54
- package/dist/backend/index.d.cts +3 -3
- package/dist/backend/index.d.ts +3 -3
- package/dist/backend/index.js +13 -14
- package/dist/backend/postgres/index.cjs +29 -30
- package/dist/backend/postgres/index.d.cts +7 -7
- package/dist/backend/postgres/index.d.ts +7 -7
- package/dist/backend/postgres/index.js +16 -17
- package/dist/backend/postgres/pglite-store.cjs +48 -42
- package/dist/backend/postgres/pglite-store.cjs.map +1 -1
- package/dist/backend/postgres/pglite-store.d.cts +15 -9
- package/dist/backend/postgres/pglite-store.d.ts +15 -9
- package/dist/backend/postgres/pglite-store.js +44 -38
- package/dist/backend/postgres/pglite-store.js.map +1 -1
- package/dist/backend/postgres/pglite.cjs +18 -19
- package/dist/backend/postgres/pglite.d.cts +4 -4
- package/dist/backend/postgres/pglite.d.ts +4 -4
- package/dist/backend/postgres/pglite.js +17 -18
- package/dist/backend/sqlite/index.cjs +26 -27
- package/dist/backend/sqlite/index.d.cts +6 -6
- package/dist/backend/sqlite/index.d.ts +6 -6
- package/dist/backend/sqlite/index.js +14 -15
- package/dist/backend/sqlite/libsql.cjs +21 -22
- package/dist/backend/sqlite/libsql.cjs.map +1 -1
- package/dist/backend/sqlite/libsql.d.cts +15 -8
- package/dist/backend/sqlite/libsql.d.ts +15 -8
- package/dist/backend/sqlite/libsql.js +17 -18
- package/dist/backend/sqlite/libsql.js.map +1 -1
- package/dist/backend/sqlite/local-store.cjs +49 -43
- package/dist/backend/sqlite/local-store.cjs.map +1 -1
- package/dist/backend/sqlite/local-store.d.cts +15 -10
- package/dist/backend/sqlite/local-store.d.ts +15 -10
- package/dist/backend/sqlite/local-store.js +45 -39
- package/dist/backend/sqlite/local-store.js.map +1 -1
- package/dist/backend/sqlite/local.cjs +19 -20
- package/dist/backend/sqlite/local.d.cts +3 -3
- package/dist/backend/sqlite/local.d.ts +3 -3
- package/dist/backend/sqlite/local.js +17 -18
- package/dist/{chunk-S3ZRKJHY.js → chunk-2LG2XB2M.js} +3 -3
- package/dist/{chunk-S3ZRKJHY.js.map → chunk-2LG2XB2M.js.map} +1 -1
- package/dist/{chunk-7PF2L3H6.cjs → chunk-2NA5DYLO.cjs} +4 -4
- package/dist/{chunk-7PF2L3H6.cjs.map → chunk-2NA5DYLO.cjs.map} +1 -1
- package/dist/chunk-2Z2Z3ZD6.js +58 -0
- package/dist/chunk-2Z2Z3ZD6.js.map +1 -0
- package/dist/{chunk-VVQM4CZD.cjs → chunk-3DHZCOT7.cjs} +20 -20
- package/dist/{chunk-VVQM4CZD.cjs.map → chunk-3DHZCOT7.cjs.map} +1 -1
- package/dist/{chunk-JXUTCSXX.cjs → chunk-4UGOKMI5.cjs} +250 -158
- package/dist/chunk-4UGOKMI5.cjs.map +1 -0
- package/dist/{chunk-RFRM3Q5K.js → chunk-5262ZMTR.js} +14 -5
- package/dist/chunk-5262ZMTR.js.map +1 -0
- package/dist/{chunk-QRNYDV5Z.js → chunk-5763DULU.js} +214 -69
- package/dist/chunk-5763DULU.js.map +1 -0
- package/dist/{chunk-BGYJW37L.js → chunk-5UVRGXD3.js} +277 -7
- package/dist/chunk-5UVRGXD3.js.map +1 -0
- package/dist/{chunk-QR24DJDF.cjs → chunk-62ZP23AW.cjs} +15 -15
- package/dist/{chunk-QR24DJDF.cjs.map → chunk-62ZP23AW.cjs.map} +1 -1
- package/dist/{chunk-ZI6VQSZA.cjs → chunk-65E3XWGF.cjs} +724 -577
- package/dist/chunk-65E3XWGF.cjs.map +1 -0
- package/dist/{chunk-S4KQ5LV4.js → chunk-775A4ZMN.js} +40 -6
- package/dist/chunk-775A4ZMN.js.map +1 -0
- package/dist/{chunk-J2ICGNHO.cjs → chunk-7BQXPCGN.cjs} +830 -169
- package/dist/chunk-7BQXPCGN.cjs.map +1 -0
- package/dist/{chunk-FJMPR3OH.cjs → chunk-7EO3TCQB.cjs} +33 -7
- package/dist/chunk-7EO3TCQB.cjs.map +1 -0
- package/dist/{chunk-DXEEHSGN.js → chunk-7VQXLT5O.js} +436 -43
- package/dist/chunk-7VQXLT5O.js.map +1 -0
- package/dist/chunk-A4OC4DVN.cjs +12 -0
- package/dist/{chunk-4SZ6XPTG.cjs.map → chunk-A4OC4DVN.cjs.map} +1 -1
- package/dist/{chunk-TDXIBCGY.cjs → chunk-A7J2YDDI.cjs} +5 -3
- package/dist/chunk-A7J2YDDI.cjs.map +1 -0
- package/dist/{chunk-55ITBQJI.js → chunk-AKLS3BYZ.js} +56 -5
- package/dist/chunk-AKLS3BYZ.js.map +1 -0
- package/dist/{chunk-D7PG5D5K.js → chunk-AMKPPFUO.js} +32 -6
- package/dist/chunk-AMKPPFUO.js.map +1 -0
- package/dist/{chunk-WUFASQUO.js → chunk-ASTI57H3.js} +3 -3
- package/dist/{chunk-WUFASQUO.js.map → chunk-ASTI57H3.js.map} +1 -1
- package/dist/{chunk-4QIKLIGG.js → chunk-BKCUOV7A.js} +15 -5
- package/dist/chunk-BKCUOV7A.js.map +1 -0
- package/dist/{chunk-JQXSZHF2.cjs → chunk-BSFJMMV3.cjs} +134 -7
- package/dist/chunk-BSFJMMV3.cjs.map +1 -0
- package/dist/{chunk-4GUTQPVO.js → chunk-C23WSN5E.js} +185 -24
- package/dist/chunk-C23WSN5E.js.map +1 -0
- package/dist/{chunk-QLUXRWKL.js → chunk-CBTIUB76.js} +3 -3
- package/dist/{chunk-QLUXRWKL.js.map → chunk-CBTIUB76.js.map} +1 -1
- package/dist/chunk-CMWHLBVN.cjs +2082 -0
- package/dist/chunk-CMWHLBVN.cjs.map +1 -0
- package/dist/{chunk-QB6VMOJ2.cjs → chunk-CXBHOOIQ.cjs} +45 -10
- package/dist/chunk-CXBHOOIQ.cjs.map +1 -0
- package/dist/{chunk-FL5UQRES.js → chunk-DCQVHAYQ.js} +5 -5
- package/dist/{chunk-FL5UQRES.js.map → chunk-DCQVHAYQ.js.map} +1 -1
- package/dist/chunk-DTVWX77L.cjs +3432 -0
- package/dist/chunk-DTVWX77L.cjs.map +1 -0
- package/dist/chunk-DYATYRY4.js +47 -0
- package/dist/chunk-DYATYRY4.js.map +1 -0
- package/dist/chunk-E4WNQBEF.cjs +217 -0
- package/dist/chunk-E4WNQBEF.cjs.map +1 -0
- package/dist/{chunk-G6Q5UM7U.js → chunk-FWJKWH6U.js} +5 -3
- package/dist/chunk-FWJKWH6U.js.map +1 -0
- package/dist/chunk-GF3KXUTW.js +3393 -0
- package/dist/chunk-GF3KXUTW.js.map +1 -0
- package/dist/{chunk-VTN3C3CH.js → chunk-HFHTMECK.js} +7 -7
- package/dist/{chunk-VTN3C3CH.js.map → chunk-HFHTMECK.js.map} +1 -1
- package/dist/{chunk-FLEQ2HBK.js → chunk-I5MOXA4H.js} +20 -14
- package/dist/chunk-I5MOXA4H.js.map +1 -0
- package/dist/{chunk-4MB3AQAQ.js → chunk-J3WZ3FA2.js} +77 -3
- package/dist/chunk-J3WZ3FA2.js.map +1 -0
- package/dist/{chunk-UR7W5YQK.js → chunk-JBQQ7THH.js} +5 -3
- package/dist/chunk-JBQQ7THH.js.map +1 -0
- package/dist/{chunk-TKP5T34P.js → chunk-JXA2ZP2Q.js} +6 -16
- package/dist/chunk-JXA2ZP2Q.js.map +1 -0
- package/dist/{chunk-GYA4JRP5.js → chunk-JXXDZTMN.js} +2 -2
- package/dist/chunk-JXXDZTMN.js.map +1 -0
- package/dist/chunk-JZUR7ZWE.js +254 -0
- package/dist/chunk-JZUR7ZWE.js.map +1 -0
- package/dist/{chunk-42PYUGLS.js → chunk-K5ELX2GT.js} +108 -8
- package/dist/chunk-K5ELX2GT.js.map +1 -0
- package/dist/{chunk-Q6EDCUXV.js → chunk-L65OU2U3.js} +556 -204
- package/dist/chunk-L65OU2U3.js.map +1 -0
- package/dist/{chunk-D54WH24V.cjs → chunk-LBJKZXDE.cjs} +115 -13
- package/dist/chunk-LBJKZXDE.cjs.map +1 -0
- package/dist/{chunk-FQ7ZPOTZ.js → chunk-LGHCOKTT.js} +637 -493
- package/dist/chunk-LGHCOKTT.js.map +1 -0
- package/dist/chunk-M3WP7RQZ.js +736 -0
- package/dist/chunk-M3WP7RQZ.js.map +1 -0
- package/dist/{chunk-4MEWSUVM.cjs → chunk-M4BDU5RX.cjs} +12 -12
- package/dist/chunk-M4BDU5RX.cjs.map +1 -0
- package/dist/chunk-MCLYU6BN.cjs +332 -0
- package/dist/chunk-MCLYU6BN.cjs.map +1 -0
- package/dist/{chunk-MIJKEVV7.js → chunk-MSY7FSX4.js} +37 -4
- package/dist/chunk-MSY7FSX4.js.map +1 -0
- package/dist/{chunk-H7VE3FL4.cjs → chunk-MUK4BU7K.cjs} +519 -125
- package/dist/chunk-MUK4BU7K.cjs.map +1 -0
- package/dist/{chunk-D56XG4EI.cjs → chunk-MXJDTH5B.cjs} +56 -45
- package/dist/chunk-MXJDTH5B.cjs.map +1 -0
- package/dist/{chunk-5EKPX6QU.js → chunk-MZLPX2R7.js} +8 -9
- package/dist/chunk-MZLPX2R7.js.map +1 -0
- package/dist/chunk-N66HCGCY.cjs +57 -0
- package/dist/chunk-N66HCGCY.cjs.map +1 -0
- package/dist/{chunk-CPEL3YIR.cjs → chunk-NFCVHQ5P.cjs} +55 -22
- package/dist/chunk-NFCVHQ5P.cjs.map +1 -0
- package/dist/{chunk-C4F7VJ5D.cjs → chunk-NI72YOJB.cjs} +84 -2
- package/dist/chunk-NI72YOJB.cjs.map +1 -0
- package/dist/{chunk-BNS75YNF.cjs → chunk-NK5Q7UNE.cjs} +10 -20
- package/dist/chunk-NK5Q7UNE.cjs.map +1 -0
- package/dist/{chunk-TKORQCG4.js → chunk-NLI2AVEF.js} +386 -862
- package/dist/chunk-NLI2AVEF.js.map +1 -0
- package/dist/{chunk-YMTXMPV6.js → chunk-NMWDXFPH.js} +4 -4
- package/dist/{chunk-YMTXMPV6.js.map → chunk-NMWDXFPH.js.map} +1 -1
- package/dist/{chunk-J7LXTUTP.cjs → chunk-PF6F5NLJ.cjs} +604 -1094
- package/dist/chunk-PF6F5NLJ.cjs.map +1 -0
- package/dist/{chunk-NAAMUYMS.cjs → chunk-PNN7RHVR.cjs} +58 -48
- package/dist/chunk-PNN7RHVR.cjs.map +1 -0
- package/dist/{chunk-YOALGKRE.cjs → chunk-PNTCATDE.cjs} +3528 -1763
- package/dist/chunk-PNTCATDE.cjs.map +1 -0
- package/dist/{chunk-6DCB664D.js → chunk-PQBQG7IM.js} +3 -3
- package/dist/{chunk-6DCB664D.js.map → chunk-PQBQG7IM.js.map} +1 -1
- package/dist/{chunk-UCQ3BFSY.cjs → chunk-PT7RIRIZ.cjs} +684 -332
- package/dist/chunk-PT7RIRIZ.cjs.map +1 -0
- package/dist/{chunk-ACSVZPK7.cjs → chunk-PWLJ77UV.cjs} +5 -3
- package/dist/chunk-PWLJ77UV.cjs.map +1 -0
- package/dist/chunk-Q3G6A4I3.cjs +755 -0
- package/dist/chunk-Q3G6A4I3.cjs.map +1 -0
- package/dist/{chunk-Z3WO6MND.cjs → chunk-RMQLSPA2.cjs} +297 -27
- package/dist/chunk-RMQLSPA2.cjs.map +1 -0
- package/dist/{chunk-SJDMVITW.cjs → chunk-RT5ZY4XA.cjs} +6 -5
- package/dist/chunk-RT5ZY4XA.cjs.map +1 -0
- package/dist/{chunk-ID4WXTKL.js → chunk-S6PW7VV5.js} +2382 -617
- package/dist/chunk-S6PW7VV5.js.map +1 -0
- package/dist/{chunk-4GUBTVPV.js → chunk-T4XNKYXB.js} +780 -126
- package/dist/chunk-T4XNKYXB.js.map +1 -0
- package/dist/{chunk-YDWLUT5V.cjs → chunk-TQR4KBY2.cjs} +323 -178
- package/dist/chunk-TQR4KBY2.cjs.map +1 -0
- package/dist/{chunk-OOA273IJ.cjs → chunk-U5SON7R2.cjs} +27 -27
- package/dist/{chunk-OOA273IJ.cjs.map → chunk-U5SON7R2.cjs.map} +1 -1
- package/dist/{chunk-IX64T5OL.cjs → chunk-U63GDNRC.cjs} +32 -26
- package/dist/chunk-U63GDNRC.cjs.map +1 -0
- package/dist/{chunk-WDBXJOU5.cjs → chunk-UDISNXDL.cjs} +56 -47
- package/dist/chunk-UDISNXDL.cjs.map +1 -0
- package/dist/{chunk-EFEOOCJ3.js → chunk-UV3SN74I.js} +5 -5
- package/dist/{chunk-EFEOOCJ3.js.map → chunk-UV3SN74I.js.map} +1 -1
- package/dist/{chunk-U5W4LKZV.cjs → chunk-VCRRKBLN.cjs} +9 -9
- package/dist/{chunk-U5W4LKZV.cjs.map → chunk-VCRRKBLN.cjs.map} +1 -1
- package/dist/{chunk-ISLPNELU.js → chunk-VGTJPTIC.js} +16 -5
- package/dist/chunk-VGTJPTIC.js.map +1 -0
- package/dist/chunk-VLT6PEWR.cjs +60 -0
- package/dist/chunk-VLT6PEWR.cjs.map +1 -0
- package/dist/chunk-VQH4VAWD.cjs +12 -0
- package/dist/{chunk-B3F2D3SP.cjs.map → chunk-VQH4VAWD.cjs.map} +1 -1
- package/dist/{chunk-SNXVDZAJ.js → chunk-W6OG3HDG.js} +5 -4
- package/dist/chunk-W6OG3HDG.js.map +1 -0
- package/dist/chunk-WDGA7IYB.js +207 -0
- package/dist/chunk-WDGA7IYB.js.map +1 -0
- package/dist/chunk-WQZLUGVR.js +2057 -0
- package/dist/chunk-WQZLUGVR.js.map +1 -0
- package/dist/{chunk-EKFUG4G7.cjs → chunk-XBYVV3MP.cjs} +60 -5
- package/dist/chunk-XBYVV3MP.cjs.map +1 -0
- package/dist/{chunk-5GAONX5G.cjs → chunk-XCAGZAKP.cjs} +7 -7
- package/dist/{chunk-5GAONX5G.cjs.map → chunk-XCAGZAKP.cjs.map} +1 -1
- package/dist/chunk-XL7SLCXS.js +309 -0
- package/dist/chunk-XL7SLCXS.js.map +1 -0
- package/dist/{chunk-SVJ5GEXW.cjs → chunk-XUO3KQFO.cjs} +2 -2
- package/dist/chunk-XUO3KQFO.cjs.map +1 -0
- package/dist/{chunk-F4NHQHEZ.cjs → chunk-YAAM3M2S.cjs} +10 -10
- package/dist/{chunk-F4NHQHEZ.cjs.map → chunk-YAAM3M2S.cjs.map} +1 -1
- package/dist/{chunk-RUQS6M7G.js → chunk-YBFHZUXX.js} +6 -6
- package/dist/chunk-YBFHZUXX.js.map +1 -0
- package/dist/{chunk-KMXWZLQX.cjs → chunk-YBQOHKHN.cjs} +99 -100
- package/dist/chunk-YBQOHKHN.cjs.map +1 -0
- package/dist/{chunk-PVUI6KGR.js → chunk-YDFDBE6D.js} +93 -6
- package/dist/chunk-YDFDBE6D.js.map +1 -0
- package/dist/{chunk-P7GTYOLB.cjs → chunk-YVWGEQJE.cjs} +297 -135
- package/dist/chunk-YVWGEQJE.cjs.map +1 -0
- package/dist/{chunk-QT6V3YRH.js → chunk-YWGVVALJ.js} +3 -3
- package/dist/{chunk-QT6V3YRH.js.map → chunk-YWGVVALJ.js.map} +1 -1
- package/dist/core/index.cjs +40 -40
- package/dist/core/index.d.cts +4 -5
- package/dist/core/index.d.ts +4 -5
- package/dist/core/index.js +8 -8
- package/dist/{ddl-BG4J805L.d.cts → ddl-BJcOp4WZ.d.cts} +3 -3
- package/dist/{ddl-CgiS9QLj.d.ts → ddl-BXfGHbPN.d.ts} +3 -3
- package/dist/graph-extension/index.cjs +26 -22
- package/dist/graph-extension/index.d.cts +16 -6
- package/dist/graph-extension/index.d.ts +16 -6
- package/dist/graph-extension/index.js +7 -7
- package/dist/graph-merge/index.cjs +2459 -654
- package/dist/graph-merge/index.cjs.map +1 -1
- package/dist/graph-merge/index.d.cts +170 -33
- package/dist/graph-merge/index.d.ts +170 -33
- package/dist/graph-merge/index.js +2269 -467
- package/dist/graph-merge/index.js.map +1 -1
- package/dist/{index-C3y_98iN.d.cts → index-BSHvKfok.d.ts} +221 -10
- package/dist/{index-BBxZCUdu.d.ts → index-DxaYCv8Y.d.cts} +221 -10
- package/dist/index.cjs +330 -268
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +590 -576
- package/dist/index.d.ts +590 -576
- package/dist/index.js +73 -49
- package/dist/index.js.map +1 -1
- package/dist/indexes/index.cjs +17 -17
- package/dist/indexes/index.d.cts +4 -4
- package/dist/indexes/index.d.ts +4 -4
- package/dist/indexes/index.js +10 -10
- package/dist/interchange/index.cjs +165 -51
- package/dist/interchange/index.cjs.map +1 -1
- package/dist/interchange/index.d.cts +261 -16
- package/dist/interchange/index.d.ts +261 -16
- package/dist/interchange/index.js +128 -25
- package/dist/interchange/index.js.map +1 -1
- package/dist/{manager-YoLEfcc1.d.ts → manager-CfZAimti.d.ts} +36 -5
- package/dist/{manager-KS7CGQQT.d.cts → manager-HGk6E_HW.d.cts} +36 -5
- package/dist/{materialize-indexes-Bhhyb1B3.d.ts → materialize-indexes-6A7dWGtb.d.cts} +10 -2
- package/dist/{materialize-indexes-OHRWypW6.d.cts → materialize-indexes-BMJP6Tms.d.ts} +10 -2
- package/dist/{postgres-DpkW3R5Y.d.cts → postgres-DFYWENdR.d.cts} +1961 -439
- package/dist/{postgres-DwqyIniy.d.ts → postgres-e7a9TdvR.d.ts} +1961 -439
- package/dist/profiler/index.cjs +15 -15
- package/dist/profiler/index.d.cts +9 -10
- package/dist/profiler/index.d.ts +9 -10
- package/dist/profiler/index.js +4 -4
- package/dist/provenance/index.cjs +46 -48
- package/dist/provenance/index.cjs.map +1 -1
- package/dist/provenance/index.d.cts +7 -7
- package/dist/provenance/index.d.ts +7 -7
- package/dist/provenance/index.js +12 -14
- package/dist/provenance/index.js.map +1 -1
- package/dist/schema/index.cjs +50 -48
- package/dist/schema/index.d.cts +9 -16
- package/dist/schema/index.d.ts +9 -16
- package/dist/schema/index.js +23 -21
- package/dist/{searchable-DLWEfC4a.d.ts → searchable-9OQoPuRs.d.ts} +1 -2
- package/dist/{searchable-CIZL8Hyw.d.cts → searchable-CIje5XYD.d.cts} +1 -2
- package/dist/{sqlite-DY0WODUK.d.cts → sqlite-DerU5tc7.d.ts} +2029 -347
- package/dist/{sqlite-L-VIRzqA.d.ts → sqlite-DitnISa9.d.cts} +2029 -347
- package/dist/{store-view-A85FFRnk.d.cts → store-B0h6x7wo.d.cts} +1289 -767
- package/dist/{store-view-66p92IPi.d.ts → store-ClQ-MZQS.d.ts} +1289 -767
- package/dist/{temporal-BNbjXqer.d.cts → temporal-Bn-Fi8FJ.d.cts} +1 -1
- package/dist/{temporal-Bob6Nfbp.d.ts → temporal-BtM4UALv.d.ts} +1 -1
- package/dist/{types-DeORZhxn.d.cts → types-CoIx8HX5.d.cts} +1 -1
- package/dist/{types-Ch9a0Dx6.d.ts → types-HkveCCx0.d.cts} +726 -5
- package/dist/{types-Ch9a0Dx6.d.cts → types-HkveCCx0.d.ts} +726 -5
- package/dist/{types-ClCzT-dT.d.ts → types-KFfk-8Ah.d.ts} +1 -1
- package/dist/{where-DPw52ksb.d.cts → where--fk7_0kv.d.cts} +1 -1
- package/dist/{where-kWUZPvEA.d.ts → where-ws5hf-Ov.d.ts} +1 -1
- package/package.json +3 -3
- package/dist/chunk-2L54C2C2.js +0 -144
- package/dist/chunk-2L54C2C2.js.map +0 -1
- package/dist/chunk-35S6P5ZU.js +0 -27
- package/dist/chunk-35S6P5ZU.js.map +0 -1
- package/dist/chunk-42PYUGLS.js.map +0 -1
- package/dist/chunk-4GUBTVPV.js.map +0 -1
- package/dist/chunk-4GUTQPVO.js.map +0 -1
- package/dist/chunk-4MB3AQAQ.js.map +0 -1
- package/dist/chunk-4MEWSUVM.cjs.map +0 -1
- package/dist/chunk-4QIKLIGG.js.map +0 -1
- package/dist/chunk-4SZ6XPTG.cjs +0 -12
- package/dist/chunk-55ITBQJI.js.map +0 -1
- package/dist/chunk-5EKPX6QU.js.map +0 -1
- package/dist/chunk-6RYPD3NJ.cjs +0 -1282
- package/dist/chunk-6RYPD3NJ.cjs.map +0 -1
- package/dist/chunk-764JHTLT.cjs +0 -15
- package/dist/chunk-764JHTLT.cjs.map +0 -1
- package/dist/chunk-ACSVZPK7.cjs.map +0 -1
- package/dist/chunk-B3F2D3SP.cjs +0 -12
- package/dist/chunk-BGYJW37L.js.map +0 -1
- package/dist/chunk-BNS75YNF.cjs.map +0 -1
- package/dist/chunk-C4F7VJ5D.cjs.map +0 -1
- package/dist/chunk-CBKG6HEP.js +0 -1263
- package/dist/chunk-CBKG6HEP.js.map +0 -1
- package/dist/chunk-CPEL3YIR.cjs.map +0 -1
- package/dist/chunk-D54WH24V.cjs.map +0 -1
- package/dist/chunk-D56XG4EI.cjs.map +0 -1
- package/dist/chunk-D7PG5D5K.js.map +0 -1
- package/dist/chunk-DI74SMXS.cjs +0 -29
- package/dist/chunk-DI74SMXS.cjs.map +0 -1
- package/dist/chunk-DK2S42XB.js +0 -77
- package/dist/chunk-DK2S42XB.js.map +0 -1
- package/dist/chunk-DRACN6XG.js +0 -27
- package/dist/chunk-DRACN6XG.js.map +0 -1
- package/dist/chunk-DXEEHSGN.js.map +0 -1
- package/dist/chunk-EKFUG4G7.cjs.map +0 -1
- package/dist/chunk-EQ7JKLZO.cjs +0 -157
- package/dist/chunk-EQ7JKLZO.cjs.map +0 -1
- package/dist/chunk-FJMPR3OH.cjs.map +0 -1
- package/dist/chunk-FLEQ2HBK.js.map +0 -1
- package/dist/chunk-FQ7ZPOTZ.js.map +0 -1
- package/dist/chunk-G6Q5UM7U.js.map +0 -1
- package/dist/chunk-GYA4JRP5.js.map +0 -1
- package/dist/chunk-H7VE3FL4.cjs.map +0 -1
- package/dist/chunk-ID4WXTKL.js.map +0 -1
- package/dist/chunk-ISLPNELU.js.map +0 -1
- package/dist/chunk-ITE4IXAK.js +0 -25
- package/dist/chunk-ITE4IXAK.js.map +0 -1
- package/dist/chunk-IX64T5OL.cjs.map +0 -1
- package/dist/chunk-J2ICGNHO.cjs.map +0 -1
- package/dist/chunk-J7LXTUTP.cjs.map +0 -1
- package/dist/chunk-JQXSZHF2.cjs.map +0 -1
- package/dist/chunk-JXUTCSXX.cjs.map +0 -1
- package/dist/chunk-KCO5EFJU.js +0 -79
- package/dist/chunk-KCO5EFJU.js.map +0 -1
- package/dist/chunk-KKYELPZ2.cjs +0 -83
- package/dist/chunk-KKYELPZ2.cjs.map +0 -1
- package/dist/chunk-KMXWZLQX.cjs.map +0 -1
- package/dist/chunk-MIJKEVV7.js.map +0 -1
- package/dist/chunk-NAAMUYMS.cjs.map +0 -1
- package/dist/chunk-P7GTYOLB.cjs.map +0 -1
- package/dist/chunk-PVUI6KGR.js.map +0 -1
- package/dist/chunk-Q6EDCUXV.js.map +0 -1
- package/dist/chunk-QB6VMOJ2.cjs.map +0 -1
- package/dist/chunk-QC4MCOFV.cjs +0 -83
- package/dist/chunk-QC4MCOFV.cjs.map +0 -1
- package/dist/chunk-QMQLUA66.js +0 -12
- package/dist/chunk-QMQLUA66.js.map +0 -1
- package/dist/chunk-QRNYDV5Z.js.map +0 -1
- package/dist/chunk-RFRM3Q5K.js.map +0 -1
- package/dist/chunk-RUQS6M7G.js.map +0 -1
- package/dist/chunk-S4KQ5LV4.js.map +0 -1
- package/dist/chunk-SJDMVITW.cjs.map +0 -1
- package/dist/chunk-SNXVDZAJ.js.map +0 -1
- package/dist/chunk-SVJ5GEXW.cjs.map +0 -1
- package/dist/chunk-TDXIBCGY.cjs.map +0 -1
- package/dist/chunk-TKORQCG4.js.map +0 -1
- package/dist/chunk-TKP5T34P.js.map +0 -1
- package/dist/chunk-TRF4EBJT.cjs +0 -30
- package/dist/chunk-TRF4EBJT.cjs.map +0 -1
- package/dist/chunk-UCQ3BFSY.cjs.map +0 -1
- package/dist/chunk-UR7W5YQK.js.map +0 -1
- package/dist/chunk-V34A6R5V.js +0 -134
- package/dist/chunk-V34A6R5V.js.map +0 -1
- package/dist/chunk-WDAVPX46.js +0 -81
- package/dist/chunk-WDAVPX46.js.map +0 -1
- package/dist/chunk-WDBXJOU5.cjs.map +0 -1
- package/dist/chunk-YDWLUT5V.cjs.map +0 -1
- package/dist/chunk-YOALGKRE.cjs.map +0 -1
- package/dist/chunk-Z3WO6MND.cjs.map +0 -1
- package/dist/chunk-ZDH3DX3C.cjs +0 -30
- package/dist/chunk-ZDH3DX3C.cjs.map +0 -1
- package/dist/chunk-ZI6VQSZA.cjs.map +0 -1
- package/dist/chunk-ZTAJL4DT.cjs +0 -85
- package/dist/chunk-ZTAJL4DT.cjs.map +0 -1
- package/dist/define-graph-BGrJahvp.d.ts +0 -173
- package/dist/define-graph-alREY2wj.d.cts +0 -173
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { G as GraphDef, E as EdgeKinds, N as NodeKinds, a as AllNodeTypes } from './define-graph-alREY2wj.cjs';
|
|
2
|
-
import { R as RecordedInstant, d as ReadCoordinate } from './temporal-BNbjXqer.cjs';
|
|
3
|
-
import { cb as ValueType, cc as PredicateExpression, aC as FulltextQueryMode, cd as VectorMetricType, Q as QueryAst, J as JsonPointer, a4 as FieldRef, b3 as ParameterRef, d as NodeType, e as AnyEdgeType, a2 as EdgeType, bB as TraversalExpansion, z as GraphBackend, S as SqlDialect, bs as SqlSchema, ce as Traversal, cf as NodePredicate, cg as ProjectedField, b2 as OrderSpec, ch as AggregateOrderSpec, T as TemporalMode, ci as GroupBySpec, aL as HybridFusionOptions, aP as JsonPointerInput, cj as RecursiveCyclePolicy, a7 as TraversalDirection$1, E as EdgeRegistration, b0 as NodeId, by as TransactionBackend, a3 as AggregateExpr, bl as SortDirection, ak as CompiledSelectSql, F as FulltextStrategy, V as VectorStrategy, ck as VectorSlotMap, cl as RecordedReadBinding, cm as SelectiveField, cn as ComposableQuery, co as SetOperationType, cp as SetOperation, K as KindEntity, av as ExternalRecordedReadSource, cq as NodeRow, ar as EdgeId, cr as EdgeRow, N as NodeRegistration, bA as TransactionReadBackend, cs as VectorMetric, aU as KindAnnotations, _ as JsonSchema, bG as UniquenessScope, af as Collation, ae as Cardinality, au as EndpointExistence, G as GraphExtension, B as BackendCapabilities, C as ContributionDiagnostic, c as ContributionRepairResult, bz as TransactionOptions, A as AdapterBackend } from './types-Ch9a0Dx6.cjs';
|
|
4
|
-
import { K as KindRegistry, S as SchemaManagerOptions, b as SchemaValidationResult } from './manager-KS7CGQQT.cjs';
|
|
5
1
|
import { z } from 'zod';
|
|
6
|
-
import { S as
|
|
7
|
-
import {
|
|
2
|
+
import { cw as ValueType, cx as PredicateExpression, aY as FulltextQueryMode, cy as VectorMetricType, Q as QueryAst, J as JsonPointer, ad as FieldRef, bo as ParameterRef, u as NodeType, v as AnyEdgeType, a5 as EdgeType, bV as TraversalExpansion, y as GraphBackend, S as SqlDialect, w as SqlSchema, cz as Traversal, cA as NodePredicate, cB as ProjectedField, bn as OrderSpec, cC as AggregateOrderSpec, T as TemporalMode, cD as GroupBySpec, b7 as HybridFusionOptions, bb as JsonPointerInput, cE as RecursiveCyclePolicy, d as GraphDef, ag as TraversalDirection$1, aO as EdgeRegistration, _ as NodeId, bS as TransactionBackend, ac as AggregateExpr, bG as SortDirection, ax as CompiledSelectSql, F as FulltextStrategy, V as VectorStrategy, cF as VectorSlotMap, cG as RecordedReadBinding, cH as SelectiveField, cI as ComposableQuery, cJ as SetOperationType, cK as SetOperation, G as GraphIdentityConfig, a1 as NodeKinds, cL as NodeRow, K as KindEntity, aR as ExternalRecordedReadSource, $ as EdgeId, cM as EdgeRow, bm as NodeRegistration, aM as EdgeKinds, bU as TransactionReadBackend, al as AllNodeTypes, a3 as KindAnnotations, X as JsonSchema, b_ as UniquenessScope, as as Collation, ar as Cardinality, aQ as EndpointExistence, b4 as GraphExtension, cN as VectorMetric, B as BackendCapabilities, C as ContributionDiagnostic, c as ContributionRepairResult, aD as ContributionProbeResult, aG as ContributionRebuildScope, aF as ContributionRebuildResult, bT as TransactionOptions, A as AdapterBackend } from './types-HkveCCx0.cjs';
|
|
3
|
+
import { R as RecordedInstant, d as ReadCoordinate } from './temporal-Bn-Fi8FJ.cjs';
|
|
4
|
+
import { S as SearchableMetadata, c as EmbeddingValue } from './searchable-CIje5XYD.cjs';
|
|
5
|
+
import { K as KindRegistry, S as SchemaManagerOptions, b as SchemaValidationResult } from './manager-HGk6E_HW.cjs';
|
|
6
|
+
import { S as SchemaDiff, j as MaterializeIndexesOptions, M as MaterializeIndexesResult, k as MaterializeSystemIndexesOptions } from './materialize-indexes-6A7dWGtb.cjs';
|
|
8
7
|
|
|
9
8
|
type FieldTypeInfo = Readonly<{
|
|
10
9
|
valueType: ValueType;
|
|
@@ -22,6 +21,25 @@ type SchemaIntrospector = Readonly<{
|
|
|
22
21
|
getSharedFieldTypeInfo: (kindNames: readonly string[], fieldName: string) => FieldTypeInfo | undefined;
|
|
23
22
|
getEdgeFieldTypeInfo: (edgeKindName: string, fieldName: string) => FieldTypeInfo | undefined;
|
|
24
23
|
getSharedEdgeFieldTypeInfo: (edgeKindNames: readonly string[], fieldName: string) => FieldTypeInfo | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* True iff at least one kind in `kindNames` DECLARES `fieldName` as an own
|
|
26
|
+
* key of its schema shape.
|
|
27
|
+
*
|
|
28
|
+
* The single owner of "is this name a schema field?", asked by any layer that
|
|
29
|
+
* must tell a field access apart from something else the name could mean —
|
|
30
|
+
* today the select-tracking proxies, which would otherwise classify a
|
|
31
|
+
* DECLARED field named `toString` / `constructor` / `valueOf` as an inherited
|
|
32
|
+
* `Object.prototype` member and never track it.
|
|
33
|
+
*
|
|
34
|
+
* Deliberately ANY rather than every: a name one kind of a polymorphic alias
|
|
35
|
+
* declares is a field access, not a prototype access. Whether the field has a
|
|
36
|
+
* usable type across all of them is a separate question, answered by
|
|
37
|
+
* {@link SchemaIntrospector.getSharedFieldTypeInfo}, which stays `undefined`
|
|
38
|
+
* unless every kind agrees.
|
|
39
|
+
*/
|
|
40
|
+
hasDeclaredField: (kindNames: readonly string[], fieldName: string) => boolean;
|
|
41
|
+
/** Edge counterpart of {@link SchemaIntrospector.hasDeclaredField}. */
|
|
42
|
+
hasDeclaredEdgeField: (edgeKindNames: readonly string[], fieldName: string) => boolean;
|
|
25
43
|
/**
|
|
26
44
|
* True iff every kind in `kindNames` has at least one `searchable()`
|
|
27
45
|
* field. For polymorphic aliases, `$fulltext` is available only when
|
|
@@ -135,8 +153,21 @@ type SimilarToOptions = Readonly<{
|
|
|
135
153
|
* distance scan. This is a SEMANTIC change — results are subject to the
|
|
136
154
|
* index's recall, and predicates composed alongside constrain the ANN
|
|
137
155
|
* candidate set (exact on pgvector/vec0; bounded by over-fetch on
|
|
138
|
-
* libSQL).
|
|
139
|
-
*
|
|
156
|
+
* libSQL). Default: exact.
|
|
157
|
+
*
|
|
158
|
+
* Two states cannot serve it, and they are handled differently on purpose:
|
|
159
|
+
*
|
|
160
|
+
* - **A slot declared `indexType: "none"`** has no ANN structure, so the
|
|
161
|
+
* opt-in compiles to the exact scan and results are unchanged. A
|
|
162
|
+
* DECLARED degradation: the query is still exactly what was asked for,
|
|
163
|
+
* only faster or slower.
|
|
164
|
+
* - **A `metric` override that differs from the field's declared metric**
|
|
165
|
+
* is REFUSED with a `ConfigurationError` naming both metrics. An ANN
|
|
166
|
+
* structure retrieves only under the metric it was built for, so the two
|
|
167
|
+
* options state something that cannot both hold — and serving the exact
|
|
168
|
+
* scan instead would silently drop one of them. Omit `metric` (or pass
|
|
169
|
+
* the declared one) to keep approximate retrieval, or drop `approximate`
|
|
170
|
+
* to scan exactly under the overriding metric.
|
|
140
171
|
*/
|
|
141
172
|
approximate?: boolean;
|
|
142
173
|
}>;
|
|
@@ -713,6 +744,10 @@ type QueryBuilderConfig = Readonly<{
|
|
|
713
744
|
schemaIntrospector: SchemaIntrospector;
|
|
714
745
|
/** Default traversal ontology expansion mode. */
|
|
715
746
|
defaultTraversalExpansion: TraversalExpansion;
|
|
747
|
+
/** Whether this builder's graph enables Operational Identity. */
|
|
748
|
+
identityEnabled: boolean;
|
|
749
|
+
/** Equal-id behavior used by historical identity traversal compilation. */
|
|
750
|
+
identitySameIdAcrossKinds: "fold" | "ignore";
|
|
716
751
|
backend?: GraphBackend;
|
|
717
752
|
dialect?: SqlDialect;
|
|
718
753
|
/** SQL schema configuration from createSqlSchema(...) for custom table names. */
|
|
@@ -762,6 +797,17 @@ type CreateQueryBuilderOptions = Readonly<{
|
|
|
762
797
|
schema?: SqlSchema;
|
|
763
798
|
/** Default traversal ontology expansion mode (default: "inverse"). */
|
|
764
799
|
defaultTraversalExpansion?: TraversalExpansion;
|
|
800
|
+
/**
|
|
801
|
+
* Overrides whether a builder may compile identity-aware traversals
|
|
802
|
+
* (`traverse(..., { includeIdentityMembers: true })`).
|
|
803
|
+
*
|
|
804
|
+
* Defaults to the graph capability carried by `buildKindRegistry(graph)`.
|
|
805
|
+
* Passing `true` with a registry from a graph that does not enable identity
|
|
806
|
+
* throws a `ConfigurationError` instead of producing invalid SQL.
|
|
807
|
+
*/
|
|
808
|
+
identityEnabled?: boolean;
|
|
809
|
+
/** Overrides the graph registry's same-id behavior. */
|
|
810
|
+
identitySameIdAcrossKinds?: "fold" | "ignore";
|
|
765
811
|
}>;
|
|
766
812
|
|
|
767
813
|
/**
|
|
@@ -917,6 +963,8 @@ type CompileQueryOptions = Readonly<{
|
|
|
917
963
|
* across executions with a fresh "now" each call. See {@link ReadInstantMode}.
|
|
918
964
|
*/
|
|
919
965
|
readInstant?: ReadInstantMode | undefined;
|
|
966
|
+
/** Equal-id behavior for historical identity traversal reconstruction. */
|
|
967
|
+
identitySameIdAcrossKinds?: "fold" | "ignore" | undefined;
|
|
920
968
|
}>;
|
|
921
969
|
|
|
922
970
|
/**
|
|
@@ -1263,7 +1311,7 @@ interface VariableLengthState {
|
|
|
1263
1311
|
*/
|
|
1264
1312
|
declare class TraversalBuilder<G extends GraphDef, Aliases extends AliasMap, EdgeAliases extends EdgeAliasMap = EmptyEdgeAliasMap, EK extends keyof G["edges"] & string = keyof G["edges"] & string, EA extends string = string, Dir extends TraversalDirection$1 = "out", Optional extends boolean = false, DC extends boolean | string = false, PC extends boolean | string = false, RecAliases extends RecursiveAliasMap = EmptyRecursiveAliasMap, CoordinateState extends QueryCoordinateState = "open"> {
|
|
1265
1313
|
#private;
|
|
1266
|
-
constructor(config: QueryBuilderConfig, state: QueryBuilderState, edgeKinds: readonly string[], edgeAlias: EA, direction: Dir, fromAlias: string, inverseEdgeKinds?: readonly string[], optional?: Optional, variableLength?: VariableLengthState, pendingEdgePredicates?: readonly NodePredicate[]);
|
|
1314
|
+
constructor(config: QueryBuilderConfig, state: QueryBuilderState, edgeKinds: readonly string[], edgeAlias: EA, direction: Dir, fromAlias: string, inverseEdgeKinds?: readonly string[], optional?: Optional, variableLength?: VariableLengthState, pendingEdgePredicates?: readonly NodePredicate[], includeIdentityMembers?: boolean);
|
|
1267
1315
|
/**
|
|
1268
1316
|
* Enables variable-length (recursive) traversal.
|
|
1269
1317
|
* Defaults to MAX_RECURSIVE_DEPTH (10) hops with cycle prevention.
|
|
@@ -1310,6 +1358,32 @@ declare class TraversalBuilder<G extends GraphDef, Aliases extends AliasMap, Edg
|
|
|
1310
1358
|
* QueryBuilder - The fluent query builder.
|
|
1311
1359
|
*/
|
|
1312
1360
|
|
|
1361
|
+
/**
|
|
1362
|
+
* Identity-aware traversal option, available only on a graph that declares an
|
|
1363
|
+
* identity configuration. On any other graph the property is typed `never`, so
|
|
1364
|
+
* setting it is a compile error (and a runtime guard rejects it as well).
|
|
1365
|
+
*
|
|
1366
|
+
* When `includeIdentityMembers` is true, the traversal's source hop matches an
|
|
1367
|
+
* edge attached to *any* coordinate-visible member of the source node's
|
|
1368
|
+
* identity class, not just the source node itself. Semantics:
|
|
1369
|
+
*
|
|
1370
|
+
* - Results are physical rows: the nodes and edges returned are the ones
|
|
1371
|
+
* actually stored, never a synthesized merge of the class.
|
|
1372
|
+
* - Identity-class membership is resolved at the query's own coordinate, so a
|
|
1373
|
+
* traversal under `asOf`/`asOfRecorded` follows only the assertions that were
|
|
1374
|
+
* in force at that instant; a retracted assertion stops conducting.
|
|
1375
|
+
* - Within a step, physical edge ids are deduplicated. The one exception is a
|
|
1376
|
+
* self-inverse edge between two folded peers (same id, different kind), which
|
|
1377
|
+
* legitimately matches in both directions and is kept.
|
|
1378
|
+
* - Under recursion, cycle detection keys on (kind, id) rather than id alone,
|
|
1379
|
+
* so passing through two folded peers is not mistaken for a revisit. Path
|
|
1380
|
+
* output is unaffected: it remains an array of bare node ids.
|
|
1381
|
+
*/
|
|
1382
|
+
type IdentityTraversalOption<G extends GraphDef> = G["identity"] extends GraphIdentityConfig ? Readonly<{
|
|
1383
|
+
includeIdentityMembers?: boolean;
|
|
1384
|
+
}> : Readonly<{
|
|
1385
|
+
includeIdentityMembers?: never;
|
|
1386
|
+
}>;
|
|
1313
1387
|
type TemporalMethod<G extends GraphDef, Aliases extends AliasMap, EdgeAliases extends EdgeAliasMap, RecursiveAliases extends RecursiveAliasMap, CoordinateState extends QueryCoordinateState> = CoordinateState extends "open" ? (mode: TemporalMode, asOf?: string) => QueryBuilder<G, Aliases, EdgeAliases, RecursiveAliases, "open"> : never;
|
|
1314
1388
|
/**
|
|
1315
1389
|
* The fluent query builder.
|
|
@@ -1367,7 +1441,7 @@ declare class QueryBuilder<G extends GraphDef, Aliases extends AliasMap = EmptyA
|
|
|
1367
1441
|
direction?: "out";
|
|
1368
1442
|
expand?: TraversalExpansion;
|
|
1369
1443
|
from?: keyof Aliases & string;
|
|
1370
|
-
}): TraversalBuilder<G, Aliases, EdgeAliases, EK, EA, "out", false, false, false, RecursiveAliases, CoordinateState>;
|
|
1444
|
+
} & IdentityTraversalOption<G>): TraversalBuilder<G, Aliases, EdgeAliases, EK, EA, "out", false, false, false, RecursiveAliases, CoordinateState>;
|
|
1371
1445
|
/**
|
|
1372
1446
|
* Traverses an edge to another node (incoming direction).
|
|
1373
1447
|
*
|
|
@@ -1382,7 +1456,7 @@ declare class QueryBuilder<G extends GraphDef, Aliases extends AliasMap = EmptyA
|
|
|
1382
1456
|
direction: "in";
|
|
1383
1457
|
expand?: TraversalExpansion;
|
|
1384
1458
|
from?: keyof Aliases & string;
|
|
1385
|
-
}): TraversalBuilder<G, Aliases, EdgeAliases, EK, EA, "in", false, false, false, RecursiveAliases, CoordinateState>;
|
|
1459
|
+
} & IdentityTraversalOption<G>): TraversalBuilder<G, Aliases, EdgeAliases, EK, EA, "in", false, false, false, RecursiveAliases, CoordinateState>;
|
|
1386
1460
|
/**
|
|
1387
1461
|
* String-keyed sibling of `traverse` for runtime-declared edge kinds.
|
|
1388
1462
|
* Throws `KindNotFoundError` if the edge kind is not registered.
|
|
@@ -1391,7 +1465,7 @@ declare class QueryBuilder<G extends GraphDef, Aliases extends AliasMap = EmptyA
|
|
|
1391
1465
|
direction?: TraversalDirection$1;
|
|
1392
1466
|
expand?: TraversalExpansion;
|
|
1393
1467
|
from?: keyof Aliases & string;
|
|
1394
|
-
}): TraversalBuilder<G, Aliases, EdgeAliases & Record<EA, EdgeAlias<DynamicEdgeType>>, string, EA, TraversalDirection$1, false, false, false, RecursiveAliases, CoordinateState>;
|
|
1468
|
+
} & IdentityTraversalOption<G>): TraversalBuilder<G, Aliases, EdgeAliases & Record<EA, EdgeAlias<DynamicEdgeType>>, string, EA, TraversalDirection$1, false, false, false, RecursiveAliases, CoordinateState>;
|
|
1395
1469
|
/**
|
|
1396
1470
|
* Optionally traverses an edge to another node (LEFT JOIN semantics).
|
|
1397
1471
|
* If no matching edge/node exists, the result will include null values.
|
|
@@ -1407,12 +1481,12 @@ declare class QueryBuilder<G extends GraphDef, Aliases extends AliasMap = EmptyA
|
|
|
1407
1481
|
direction?: "out";
|
|
1408
1482
|
expand?: TraversalExpansion;
|
|
1409
1483
|
from?: keyof Aliases & string;
|
|
1410
|
-
}): TraversalBuilder<G, Aliases, EdgeAliases, EK, EA, "out", true, false, false, RecursiveAliases, CoordinateState>;
|
|
1484
|
+
} & IdentityTraversalOption<G>): TraversalBuilder<G, Aliases, EdgeAliases, EK, EA, "out", true, false, false, RecursiveAliases, CoordinateState>;
|
|
1411
1485
|
optionalTraverse<EK extends keyof G["edges"] & string, EA extends string>(edgeKind: EK, edgeAlias: EA, options: {
|
|
1412
1486
|
direction: "in";
|
|
1413
1487
|
expand?: TraversalExpansion;
|
|
1414
1488
|
from?: keyof Aliases & string;
|
|
1415
|
-
}): TraversalBuilder<G, Aliases, EdgeAliases, EK, EA, "in", true, false, false, RecursiveAliases, CoordinateState>;
|
|
1489
|
+
} & IdentityTraversalOption<G>): TraversalBuilder<G, Aliases, EdgeAliases, EK, EA, "in", true, false, false, RecursiveAliases, CoordinateState>;
|
|
1416
1490
|
/**
|
|
1417
1491
|
* String-keyed sibling of `optionalTraverse` for runtime-declared edge
|
|
1418
1492
|
* kinds. LEFT JOIN semantics — non-matching rows produce a null edge
|
|
@@ -1423,7 +1497,7 @@ declare class QueryBuilder<G extends GraphDef, Aliases extends AliasMap = EmptyA
|
|
|
1423
1497
|
direction?: TraversalDirection$1;
|
|
1424
1498
|
expand?: TraversalExpansion;
|
|
1425
1499
|
from?: keyof Aliases & string;
|
|
1426
|
-
}): TraversalBuilder<G, Aliases, EdgeAliases & Record<EA, EdgeAlias<DynamicEdgeType, true>>, string, EA, TraversalDirection$1, true, false, false, RecursiveAliases, CoordinateState>;
|
|
1500
|
+
} & IdentityTraversalOption<G>): TraversalBuilder<G, Aliases, EdgeAliases & Record<EA, EdgeAlias<DynamicEdgeType, true>>, string, EA, TraversalDirection$1, true, false, false, RecursiveAliases, CoordinateState>;
|
|
1427
1501
|
/**
|
|
1428
1502
|
* Selects fields to return.
|
|
1429
1503
|
*/
|
|
@@ -1732,7 +1806,12 @@ type OperationHookContext = HookContext & Readonly<{
|
|
|
1732
1806
|
/** Entity ID */
|
|
1733
1807
|
id: string;
|
|
1734
1808
|
}>;
|
|
1735
|
-
/**
|
|
1809
|
+
/**
|
|
1810
|
+
* Context for one set-based collection mutation. Node `updateWhere` is the only
|
|
1811
|
+
* mutation that reports one: the `operation` union is the exhaustive list of
|
|
1812
|
+
* what `onBulkOperationStart` / `onBulkOperationEnd` observe, so a batch method
|
|
1813
|
+
* absent from it (every `bulk*`, including `bulkDelete`) emits no bulk event.
|
|
1814
|
+
*/
|
|
1736
1815
|
type BulkOperationHookContext = HookContext & Readonly<{
|
|
1737
1816
|
operation: "updateWhere";
|
|
1738
1817
|
entity: "node";
|
|
@@ -1741,8 +1820,11 @@ type BulkOperationHookContext = HookContext & Readonly<{
|
|
|
1741
1820
|
/**
|
|
1742
1821
|
* Observability hooks for monitoring store operations.
|
|
1743
1822
|
*
|
|
1744
|
-
* Note: Batch operations (`bulkCreate`, `bulkInsert`, `bulkUpsertById
|
|
1745
|
-
* per-item operation hooks for throughput
|
|
1823
|
+
* Note: Batch operations (`bulkCreate`, `bulkInsert`, `bulkUpsertById`,
|
|
1824
|
+
* `bulkDelete`) skip per-item operation hooks for throughput, and the bulk
|
|
1825
|
+
* hooks below do not stand in for them — those fire only for node
|
|
1826
|
+
* `updateWhere`, so a batch method emits no hook events at all, neither
|
|
1827
|
+
* per-item nor bulk. Query hooks still fire normally.
|
|
1746
1828
|
*
|
|
1747
1829
|
* @example
|
|
1748
1830
|
* ```typescript
|
|
@@ -1873,7 +1955,9 @@ type BaseStoreOptions = Readonly<{
|
|
|
1873
1955
|
*
|
|
1874
1956
|
* A write is coalesced only when **all** of the following hold; otherwise the
|
|
1875
1957
|
* normal write happens:
|
|
1876
|
-
* 1.
|
|
1958
|
+
* 1. A value to compare against is known for the id: an existing row, or —
|
|
1959
|
+
* for a repeated id in one bulk batch — the value an earlier item in that
|
|
1960
|
+
* batch already queued (a create or an update).
|
|
1877
1961
|
* 2. That row is not soft-deleted (a deleted row resurrects — a real
|
|
1878
1962
|
* change — and is never coalesced).
|
|
1879
1963
|
* 3. The caller passed no explicit `validFrom` / `validTo` (an explicit
|
|
@@ -2006,7 +2090,9 @@ type TransactionReceipt = Readonly<{
|
|
|
2006
2090
|
nodes: Readonly<Record<string, number>>;
|
|
2007
2091
|
/** Completed edge write intents by edge kind. */
|
|
2008
2092
|
edges: Readonly<Record<string, number>>;
|
|
2009
|
-
/**
|
|
2093
|
+
/** Completed identity assertion and retraction write intents. */
|
|
2094
|
+
identity: IdentityWriteSummary;
|
|
2095
|
+
/** Sum of all node, edge, and identity write intents. */
|
|
2010
2096
|
total: number;
|
|
2011
2097
|
}>;
|
|
2012
2098
|
/**
|
|
@@ -2133,13 +2219,22 @@ type EdgeGetOrCreateByEndpointsOptions<E extends AnyEdgeType> = Readonly<{
|
|
|
2133
2219
|
/** Existing record behavior. Default: "return" */
|
|
2134
2220
|
ifExists?: IfExistsMode;
|
|
2135
2221
|
/**
|
|
2136
|
-
* Valid-time start for a
|
|
2137
|
-
*
|
|
2222
|
+
* Valid-time start for a created or RESURRECTED edge — on a resurrection it
|
|
2223
|
+
* asserts the complete window, so an omitted `validTo` reopens the revived
|
|
2224
|
+
* row.
|
|
2225
|
+
*
|
|
2226
|
+
* A live edge's stored lower bound is history, so an in-place update
|
|
2227
|
+
* (`ifExists: "update"`) cannot store this: one naming a different instant is
|
|
2228
|
+
* REFUSED with `IMMUTABLE_VALIDITY_LOWER_BOUND_CODE`, and one restating the
|
|
2229
|
+
* bound the edge holds is accepted. Ignored when an existing edge is returned
|
|
2230
|
+
* (`ifExists: "return"`), which writes nothing at all — there the window
|
|
2231
|
+
* describes the edge to create if none is found.
|
|
2138
2232
|
*/
|
|
2139
2233
|
validFrom?: string;
|
|
2140
2234
|
/**
|
|
2141
2235
|
* Valid-time end for a created, updated, or resurrected edge. Ignored when
|
|
2142
|
-
* the operation returns an existing edge without writing.
|
|
2236
|
+
* the operation returns an existing edge without writing. May not precede
|
|
2237
|
+
* the row's effective start; see `INVERTED_VALIDITY_WINDOW_CODE`.
|
|
2143
2238
|
*/
|
|
2144
2239
|
validTo?: string;
|
|
2145
2240
|
}>;
|
|
@@ -2233,12 +2328,21 @@ type NodeCollection<N extends NodeType, CN extends string = string> = Readonly<{
|
|
|
2233
2328
|
* If a node with the given ID exists, updates it with the provided props.
|
|
2234
2329
|
* Otherwise, creates a new node with that ID.
|
|
2235
2330
|
*
|
|
2236
|
-
* `validFrom`
|
|
2237
|
-
*
|
|
2331
|
+
* `validFrom` applies when the upsert CREATES the row and when it RESURRECTS
|
|
2332
|
+
* a tombstoned one — both write a fresh validity window — defaulting to the
|
|
2333
|
+
* operation's timestamp when omitted. An update to a LIVE row stores no lower
|
|
2334
|
+
* bound, because that row's is already history, so one naming a different
|
|
2335
|
+
* instant is REFUSED (`ValidationError` carrying
|
|
2336
|
+
* `IMMUTABLE_VALIDITY_LOWER_BOUND_CODE`) rather than ignored. Restating the
|
|
2337
|
+
* bound the row already holds is accepted and changes nothing. Set
|
|
2338
|
+
* `onImmutableLowerBound: "preserve"` for event materializers whose
|
|
2339
|
+
* `validFrom` is create/resurrection input: a live update then preserves the
|
|
2340
|
+
* stored lower bound while still applying props and `validTo`.
|
|
2238
2341
|
*/
|
|
2239
2342
|
upsertById: (id: string, props: z.input<N["schema"]>, options?: Readonly<{
|
|
2240
2343
|
validFrom?: string;
|
|
2241
2344
|
validTo?: string;
|
|
2345
|
+
onImmutableLowerBound?: "preserve" | "refuse";
|
|
2242
2346
|
}>) => Promise<Node<N>>;
|
|
2243
2347
|
/**
|
|
2244
2348
|
* Upsert a node from untyped data, relying on runtime Zod validation.
|
|
@@ -2247,12 +2351,19 @@ type NodeCollection<N extends NodeType, CN extends string = string> = Readonly<{
|
|
|
2247
2351
|
* the data shape is determined at runtime, not compile time.
|
|
2248
2352
|
* The return type is fully typed — only the input gate is relaxed.
|
|
2249
2353
|
*
|
|
2250
|
-
* `validFrom`
|
|
2251
|
-
*
|
|
2354
|
+
* `validFrom` applies when the upsert CREATES the row and when it RESURRECTS
|
|
2355
|
+
* a tombstoned one — both write a fresh validity window — defaulting to the
|
|
2356
|
+
* operation's timestamp when omitted. An update to a LIVE row stores no lower
|
|
2357
|
+
* bound, because that row's is already history, so one naming a different
|
|
2358
|
+
* instant is REFUSED (`ValidationError` carrying
|
|
2359
|
+
* `IMMUTABLE_VALIDITY_LOWER_BOUND_CODE`) rather than ignored. Restating the
|
|
2360
|
+
* bound the row already holds is accepted and changes nothing. Set
|
|
2361
|
+
* `onImmutableLowerBound: "preserve"` for create/resurrection-only input.
|
|
2252
2362
|
*/
|
|
2253
2363
|
upsertByIdFromRecord: (id: string, data: Record<string, unknown>, options?: Readonly<{
|
|
2254
2364
|
validFrom?: string;
|
|
2255
2365
|
validTo?: string;
|
|
2366
|
+
onImmutableLowerBound?: "preserve" | "refuse";
|
|
2256
2367
|
}>) => Promise<Node<N>>;
|
|
2257
2368
|
/**
|
|
2258
2369
|
* Create multiple nodes in a batch.
|
|
@@ -2274,14 +2385,41 @@ type NodeCollection<N extends NodeType, CN extends string = string> = Readonly<{
|
|
|
2274
2385
|
* For each item, if a node with the given ID exists, updates it.
|
|
2275
2386
|
* Otherwise, creates a new node with that ID.
|
|
2276
2387
|
*
|
|
2277
|
-
*
|
|
2278
|
-
*
|
|
2388
|
+
* Items are applied in order, so a **repeated id** within one batch is
|
|
2389
|
+
* last-write-wins: the first item creates or updates the row, and every later
|
|
2390
|
+
* copy is an update over the value the earlier item wrote — the same final row
|
|
2391
|
+
* the equivalent sequence of `upsertById` calls produces. This holds whether
|
|
2392
|
+
* or not the row existed before the batch.
|
|
2393
|
+
*
|
|
2394
|
+
* `validFrom` applies when the upsert CREATES the row and when it RESURRECTS
|
|
2395
|
+
* a tombstoned one — both write a fresh validity window — defaulting to the
|
|
2396
|
+
* operation's timestamp when omitted. An update to a LIVE row stores no lower
|
|
2397
|
+
* bound, because that row's is already history, so one naming a different
|
|
2398
|
+
* instant is REFUSED (`ValidationError` carrying
|
|
2399
|
+
* `IMMUTABLE_VALIDITY_LOWER_BOUND_CODE`) rather than ignored. Restating the
|
|
2400
|
+
* bound the row already holds is accepted and changes nothing. Per-item
|
|
2401
|
+
* `onImmutableLowerBound: "preserve"` makes the bound create/resurrection
|
|
2402
|
+
* input while a live update preserves the stored lower bound.
|
|
2403
|
+
*
|
|
2404
|
+
* **Limitation — a batch cannot hand a unique value from one row to
|
|
2405
|
+
* another.** Item order settles which value each id ends up with, but the
|
|
2406
|
+
* writes themselves are grouped: every create runs before every update. So a
|
|
2407
|
+
* batch where one item RELEASES a `unique` constraint value and a later item
|
|
2408
|
+
* CLAIMS it — `[{ id: "a", props: { email: "moved@x" } }, { id: "b", props:
|
|
2409
|
+
* { email: "shared@x" } }]` where `a` currently holds `"shared@x"` and `b` is
|
|
2410
|
+
* new — checks `b`'s create while `a` still reserves the value, and the whole
|
|
2411
|
+
* batch fails with a `UniquenessError`. The equivalent sequence of
|
|
2412
|
+
* single `upsertById` calls succeeds. A batch states the set of rows it wants,
|
|
2413
|
+
* not a script to reach them by; the failure is loud rather than silent, and
|
|
2414
|
+
* the workaround is to split the handoff across two batches (release, then
|
|
2415
|
+
* claim) or to apply those items as sequential `upsertById` calls.
|
|
2279
2416
|
*/
|
|
2280
2417
|
bulkUpsertById: (items: readonly Readonly<{
|
|
2281
2418
|
id: string;
|
|
2282
2419
|
props: z.input<N["schema"]>;
|
|
2283
2420
|
validFrom?: string;
|
|
2284
2421
|
validTo?: string;
|
|
2422
|
+
onImmutableLowerBound?: "preserve" | "refuse";
|
|
2285
2423
|
}>[]) => Promise<Node<N>[]>;
|
|
2286
2424
|
/**
|
|
2287
2425
|
* Insert multiple nodes without returning results.
|
|
@@ -2564,8 +2702,34 @@ type EdgeCollection<E extends AnyEdgeType, From extends NodeType = NodeType, To
|
|
|
2564
2702
|
* For each item, if an edge with the given ID exists, updates it.
|
|
2565
2703
|
* Otherwise, creates a new edge with that ID.
|
|
2566
2704
|
*
|
|
2567
|
-
*
|
|
2568
|
-
*
|
|
2705
|
+
* Items are applied in order, so a **repeated id** within one batch is
|
|
2706
|
+
* last-write-wins: the first item creates or updates the edge, and every later
|
|
2707
|
+
* copy is an update over the value the earlier item wrote. This holds whether
|
|
2708
|
+
* or not the edge existed before the batch. An update never repoints an edge,
|
|
2709
|
+
* so every item's `from` / `to` must exactly restate the endpoints already
|
|
2710
|
+
* owned by that id (including an earlier item in the same batch). A mismatch
|
|
2711
|
+
* is refused with `ValidationError` carrying
|
|
2712
|
+
* `EDGE_IDENTITY_MISMATCH_CODE`; it is never silently ignored.
|
|
2713
|
+
*
|
|
2714
|
+
* `validFrom` applies when the upsert CREATES the row and when it RESURRECTS
|
|
2715
|
+
* a tombstoned one — both write a fresh validity window — defaulting to the
|
|
2716
|
+
* operation's timestamp when omitted. An update to a LIVE row stores no lower
|
|
2717
|
+
* bound, because that row's is already history, so one naming a different
|
|
2718
|
+
* instant is REFUSED (`ValidationError` carrying
|
|
2719
|
+
* `IMMUTABLE_VALIDITY_LOWER_BOUND_CODE`) rather than ignored. Restating the
|
|
2720
|
+
* bound the row already holds is accepted and changes nothing.
|
|
2721
|
+
*
|
|
2722
|
+
* **Limitation — a batch cannot hand a constrained slot from one edge to
|
|
2723
|
+
* another.** Item order settles the final props, but the writes are grouped:
|
|
2724
|
+
* every create runs before every update. So a batch where one item frees the
|
|
2725
|
+
* slot a `cardinality` constraint allows and a later item claims it — ending
|
|
2726
|
+
* the lone `oneActive` edge from a source while creating its replacement —
|
|
2727
|
+
* checks the create while the old edge is still active, and the whole batch
|
|
2728
|
+
* fails with a `CardinalityError`. Applying the update first, as
|
|
2729
|
+
* separate `update` / `create` calls, succeeds. A batch states the set of
|
|
2730
|
+
* edges it wants, not a script to reach them by; the failure is loud rather
|
|
2731
|
+
* than silent, and the workaround is to split the handoff across two batches
|
|
2732
|
+
* (free the slot, then claim it) or to apply those items individually.
|
|
2569
2733
|
*/
|
|
2570
2734
|
bulkUpsertById: (items: readonly Readonly<{
|
|
2571
2735
|
id: EdgeId<E>;
|
|
@@ -2597,6 +2761,12 @@ type EdgeCollection<E extends AnyEdgeType, From extends NodeType = NodeType, To
|
|
|
2597
2761
|
*
|
|
2598
2762
|
* Atomic when the backend supports transactions. Silently ignores IDs
|
|
2599
2763
|
* that don't exist.
|
|
2764
|
+
*
|
|
2765
|
+
* The batch runs as one transaction, checking each id's kind against the
|
|
2766
|
+
* authoritative row as it goes. An id owned by another edge kind is
|
|
2767
|
+
* refused with `ValidationError` carrying `EDGE_IDENTITY_MISMATCH_CODE`;
|
|
2768
|
+
* because the whole batch is one transaction, that refusal rolls back
|
|
2769
|
+
* every delete already applied for an earlier id in the same batch.
|
|
2600
2770
|
*/
|
|
2601
2771
|
bulkDelete: (ids: readonly EdgeId<E>[]) => Promise<void>;
|
|
2602
2772
|
/**
|
|
@@ -2623,10 +2793,15 @@ type EdgeCollection<E extends AnyEdgeType, From extends NodeType = NodeType, To
|
|
|
2623
2793
|
* property fields, only edges whose properties match on those fields are considered.
|
|
2624
2794
|
* Soft-deleted matches are resurrected when cardinality allows.
|
|
2625
2795
|
*
|
|
2626
|
-
* `validFrom`
|
|
2627
|
-
* operation's creation timestamp when omitted.
|
|
2628
|
-
*
|
|
2629
|
-
*
|
|
2796
|
+
* `validFrom` applies on the create and RESURRECT branches, defaulting to the
|
|
2797
|
+
* operation's creation timestamp when omitted. On the `ifExists: "update"`
|
|
2798
|
+
* branch a live edge's lower bound is history and cannot be stored, so a
|
|
2799
|
+
* `validFrom` naming a different instant is REFUSED (`ValidationError`
|
|
2800
|
+
* carrying `IMMUTABLE_VALIDITY_LOWER_BOUND_CODE`); restating the bound the
|
|
2801
|
+
* edge holds is accepted. A returned existing edge (`ifExists: "return"`)
|
|
2802
|
+
* writes nothing and judges nothing — the window options describe the row to
|
|
2803
|
+
* create if none is found. `validTo` applies on create, update, and
|
|
2804
|
+
* resurrection, but not when an existing edge is returned without a write.
|
|
2630
2805
|
*
|
|
2631
2806
|
* @param from - Source node
|
|
2632
2807
|
* @param to - Target node
|
|
@@ -2858,7 +3033,9 @@ type TransactionCollections<G extends GraphDef> = Readonly<{
|
|
|
2858
3033
|
* registered in this graph.
|
|
2859
3034
|
*/
|
|
2860
3035
|
getNodeCollection: (kind: string) => DynamicNodeCollection | undefined;
|
|
2861
|
-
}
|
|
3036
|
+
}> & (G["identity"] extends GraphIdentityConfig ? Readonly<{
|
|
3037
|
+
identity: IdentityFacade<G>;
|
|
3038
|
+
}> : Readonly<Record<never, never>>);
|
|
2862
3039
|
/**
|
|
2863
3040
|
* A portable transaction context containing only TypeGraph-owned graph
|
|
2864
3041
|
* operations. Managed Stores use this surface so adapter-native handles never
|
|
@@ -2994,6 +3171,110 @@ type StoreProjection<G extends GraphDef, N extends keyof G["nodes"] & string = n
|
|
|
2994
3171
|
edges: Pick<GraphEdgeCollections<G>, E>;
|
|
2995
3172
|
}>;
|
|
2996
3173
|
|
|
3174
|
+
/**
|
|
3175
|
+
* The loose *input* form every identity facade method accepts: a whole node, a
|
|
3176
|
+
* bare id, or a `{ kind, id }` pair, for any node kind in the graph. Its kind
|
|
3177
|
+
* and id are independent, so a caller can pass what it already has without
|
|
3178
|
+
* re-correlating them.
|
|
3179
|
+
*
|
|
3180
|
+
* Identity *results* use the strict {@link GraphNodeReference} instead, whose
|
|
3181
|
+
* `kind` and branded `id` stay correlated.
|
|
3182
|
+
*/
|
|
3183
|
+
type IdentityNodeRefInput<G extends GraphDef> = NodeRef<AllNodeTypes<G>>;
|
|
3184
|
+
/** A hydrated identity member, discriminated by its registered node kind. */
|
|
3185
|
+
type IdentityNode<G extends GraphDef> = {
|
|
3186
|
+
[K in NodeKinds<G>]: Node<G["nodes"][K]["type"]>;
|
|
3187
|
+
}[NodeKinds<G>];
|
|
3188
|
+
declare const __identityAssertionId: unique symbol;
|
|
3189
|
+
type IdentityAssertionId = string & Readonly<{
|
|
3190
|
+
[__identityAssertionId]: true;
|
|
3191
|
+
}>;
|
|
3192
|
+
/**
|
|
3193
|
+
* Brands a non-empty string as an {@link IdentityAssertionId}.
|
|
3194
|
+
*
|
|
3195
|
+
* Use this when a persisted identity assertion id has round-tripped through
|
|
3196
|
+
* untyped storage or an external boundary and must be passed back to a
|
|
3197
|
+
* retraction surface such as `retractAssertion` or `bulkRetractAssertions`.
|
|
3198
|
+
* Mirrors the `asNodeId` / `asEdgeId` precedent.
|
|
3199
|
+
*
|
|
3200
|
+
* @throws {ValidationError} when `value` is empty.
|
|
3201
|
+
*/
|
|
3202
|
+
declare function asIdentityAssertionId(value: string): IdentityAssertionId;
|
|
3203
|
+
/**
|
|
3204
|
+
* What one assertion claims about a pair of nodes: `"same"` merges them into
|
|
3205
|
+
* one equivalence set, `"different"` records a disjointness that a later
|
|
3206
|
+
* `"same"` claim must not contradict.
|
|
3207
|
+
*/
|
|
3208
|
+
type IdentityRelation = "same" | "different";
|
|
3209
|
+
/**
|
|
3210
|
+
* One persisted identity claim about an ordered pair of nodes. Returned by the
|
|
3211
|
+
* assertion writers and by `identity.assertionsOf(...)`; `validTo` is set when
|
|
3212
|
+
* the assertion has been retracted, so a historical read can still see it.
|
|
3213
|
+
*/
|
|
3214
|
+
type IdentityAssertion<G extends GraphDef> = Readonly<{
|
|
3215
|
+
id: IdentityAssertionId;
|
|
3216
|
+
relation: IdentityRelation;
|
|
3217
|
+
a: GraphNodeReference<G>;
|
|
3218
|
+
b: GraphNodeReference<G>;
|
|
3219
|
+
validFrom: string;
|
|
3220
|
+
validTo?: string;
|
|
3221
|
+
}>;
|
|
3222
|
+
/** Result of an idempotent assertion write. */
|
|
3223
|
+
type IdentityAssertionResult<G extends GraphDef> = Readonly<{
|
|
3224
|
+
assertion: IdentityAssertion<G>;
|
|
3225
|
+
action: "created" | "existing";
|
|
3226
|
+
}>;
|
|
3227
|
+
/** One ordered node pair handed to `bulkAssertSame` / `bulkAssertDifferent`. */
|
|
3228
|
+
type IdentityPair<G extends GraphDef> = Readonly<{
|
|
3229
|
+
a: IdentityNodeRefInput<G>;
|
|
3230
|
+
b: IdentityNodeRefInput<G>;
|
|
3231
|
+
}>;
|
|
3232
|
+
/**
|
|
3233
|
+
* The read half of the identity surface: equivalence-set membership,
|
|
3234
|
+
* representative selection, and the assertions behind them.
|
|
3235
|
+
*
|
|
3236
|
+
* Obtained from a read-only lens — `store.asOf(...).identity`,
|
|
3237
|
+
* `store.snapshot().identity` — where it answers at that view's coordinate.
|
|
3238
|
+
* The full read+write surface is {@link IdentityFacade}.
|
|
3239
|
+
*/
|
|
3240
|
+
type IdentityReadFacade<G extends GraphDef> = Readonly<{
|
|
3241
|
+
representativeOf: (ref: IdentityNodeRefInput<G>) => Promise<GraphNodeReference<G> | undefined>;
|
|
3242
|
+
membersOf: (ref: IdentityNodeRefInput<G>) => Promise<readonly GraphNodeReference<G>[]>;
|
|
3243
|
+
nodesOf: (ref: IdentityNodeRefInput<G>) => Promise<readonly IdentityNode<G>[]>;
|
|
3244
|
+
areSame: (a: IdentityNodeRefInput<G>, b: IdentityNodeRefInput<G>) => Promise<boolean>;
|
|
3245
|
+
areDifferent: (a: IdentityNodeRefInput<G>, b: IdentityNodeRefInput<G>) => Promise<boolean>;
|
|
3246
|
+
assertionsOf: (ref: IdentityNodeRefInput<G>) => Promise<readonly IdentityAssertion<G>[]>;
|
|
3247
|
+
}>;
|
|
3248
|
+
/**
|
|
3249
|
+
* The full TypeGraph Identity Profile surface: {@link IdentityReadFacade} plus
|
|
3250
|
+
* the assertion writers and retractions.
|
|
3251
|
+
*
|
|
3252
|
+
* Obtained from `store.identity` or `tx.identity`, and present only on graphs
|
|
3253
|
+
* that declared `identity: { ... }` in `defineGraph`. Every writer is
|
|
3254
|
+
* idempotent — re-asserting an existing claim returns it with
|
|
3255
|
+
* `action: "existing"` rather than duplicating it.
|
|
3256
|
+
*/
|
|
3257
|
+
type IdentityFacade<G extends GraphDef> = IdentityReadFacade<G> & Readonly<{
|
|
3258
|
+
assertSame: (a: IdentityNodeRefInput<G>, b: IdentityNodeRefInput<G>) => Promise<IdentityAssertionResult<G>>;
|
|
3259
|
+
assertDifferent: (a: IdentityNodeRefInput<G>, b: IdentityNodeRefInput<G>) => Promise<IdentityAssertionResult<G>>;
|
|
3260
|
+
bulkAssertSame: (pairs: readonly IdentityPair<G>[]) => Promise<readonly IdentityAssertionResult<G>[]>;
|
|
3261
|
+
bulkAssertDifferent: (pairs: readonly IdentityPair<G>[]) => Promise<readonly IdentityAssertionResult<G>[]>;
|
|
3262
|
+
retractAssertion: (id: IdentityAssertionId) => Promise<IdentityAssertion<G> | undefined>;
|
|
3263
|
+
retractSameAssertion: (a: IdentityNodeRefInput<G>, b: IdentityNodeRefInput<G>) => Promise<IdentityAssertion<G> | undefined>;
|
|
3264
|
+
retractDifferentAssertion: (a: IdentityNodeRefInput<G>, b: IdentityNodeRefInput<G>) => Promise<IdentityAssertion<G> | undefined>;
|
|
3265
|
+
bulkRetractAssertions: (ids: readonly IdentityAssertionId[]) => Promise<readonly IdentityAssertion<G>[]>;
|
|
3266
|
+
}>;
|
|
3267
|
+
/**
|
|
3268
|
+
* Per-transaction identity write counts carried by a transaction receipt.
|
|
3269
|
+
* `total` is the sum of the three preceding counters.
|
|
3270
|
+
*/
|
|
3271
|
+
type IdentityWriteSummary = Readonly<{
|
|
3272
|
+
sameAssertions: number;
|
|
3273
|
+
differentAssertions: number;
|
|
3274
|
+
retractions: number;
|
|
3275
|
+
total: number;
|
|
3276
|
+
}>;
|
|
3277
|
+
|
|
2997
3278
|
/**
|
|
2998
3279
|
* Shared types for Tier 1 graph algorithms.
|
|
2999
3280
|
*
|
|
@@ -3224,6 +3505,11 @@ type WeaklyConnectedComponentsOptions<G extends GraphDef> = TemporalAlgorithmOpt
|
|
|
3224
3505
|
edges: readonly EdgeKinds<G>[];
|
|
3225
3506
|
/** Optional node kinds defining the induced subgraph to analyze. */
|
|
3226
3507
|
nodeKinds?: readonly NodeKinds<G>[];
|
|
3508
|
+
/**
|
|
3509
|
+
* Return only components containing at least this many nodes. Must be a
|
|
3510
|
+
* positive safe integer.
|
|
3511
|
+
*/
|
|
3512
|
+
minComponentSize?: number;
|
|
3227
3513
|
/** Maximum label-propagation rounds before throwing. Defaults to 1000. */
|
|
3228
3514
|
maxIterations?: number;
|
|
3229
3515
|
}>;
|
|
@@ -3290,6 +3576,11 @@ type PageRankOptions<G extends GraphDef> = TemporalAlgorithmOptions & IterativeM
|
|
|
3290
3576
|
tolerance?: number;
|
|
3291
3577
|
/** Maximum power-iteration rounds before throwing. Defaults to `1000`. */
|
|
3292
3578
|
maxIterations?: number;
|
|
3579
|
+
/**
|
|
3580
|
+
* Return only the first this many scores after deterministic ordering.
|
|
3581
|
+
* Must be a positive safe integer.
|
|
3582
|
+
*/
|
|
3583
|
+
topK?: number;
|
|
3293
3584
|
}>;
|
|
3294
3585
|
type InternalPageRankOptions<G extends GraphDef> = InternalTemporalAlgorithmOptions & Omit<PageRankOptions<G>, keyof TemporalAlgorithmOptions>;
|
|
3295
3586
|
/** One weighted teleport target for personalized PageRank. */
|
|
@@ -3422,558 +3713,234 @@ type InternalGraphAlgorithms<G extends GraphDef> = Readonly<{
|
|
|
3422
3713
|
personalizedPageRank: (options: InternalPersonalizedPageRankOptions<G>) => Promise<readonly PageRankScore[]>;
|
|
3423
3714
|
}>;
|
|
3424
3715
|
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3716
|
+
/**
|
|
3717
|
+
* Members that are safe to expose through a history-enabled adapter Store.
|
|
3718
|
+
*
|
|
3719
|
+
* Graph entity writes remain because the source is the capture-wrapped
|
|
3720
|
+
* backend. Direct raw SQL, native import, graph clearing, and nested backend
|
|
3721
|
+
* transactions stay internal because each can mutate live rows without a
|
|
3722
|
+
* corresponding capture flush.
|
|
3723
|
+
*/
|
|
3724
|
+
declare const HISTORY_STORE_BACKEND_KEYS: readonly ["assertRuntimeContributionsInitialized", "assertVectorSlotInitialized", "assertVectorSlotsInitialized", "bootstrapTables", "capabilities", "checkUnique", "checkUniqueBatch", "claimIndexMaterialization", "close", "commitSchemaVersion", "commitSchemaVersionIfKindsEmpty", "lockSchemaVersionForWrite", "compileSql", "countEdgesByKind", "countEdgesFrom", "countNodesByKind", "createVectorIndex", "deleteEdge", "deleteEdgesBatch", "deleteEmbedding", "deleteEmbeddingBatch", "deleteFulltext", "deleteFulltextBatch", "deleteNode", "deleteUnique", "hardDeleteUniquesByNodeIds", "deleteVectorSlotContribution", "dialect", "dropVectorIndex", "edgeExistsBetween", "ensureContributionMaterializationsTable", "ensureFulltextTable", "ensureIndexMaterializationsTable", "ensureKindRemovalsTable", "ensureReconciliationMarkersTable", "ensureRevisionOriginsTable", "ensureRuntimeContributions", "ensureVectorSlotContribution", "ensureVectorSlotContributions", "execute", "executeTemporaryStatement", "findEdgesByKind", "findEdgesByEndpointSet", "findEdgesByHeterogeneousEndpointSet", "findEdgesConnectedTo", "findNodesByKind", "fulltextSearch", "fulltextStrategy", "getActiveSchema", "getAllKindRemovals", "getContributionMaterialization", "getEdge", "getEdges", "getIndexMaterialization", "getIndexMaterializations", "getNode", "getNodes", "getPendingKindRemovals", "getReconciliationMarker", "getSchemaVersion", "hardDeleteEdge", "hardDeleteEdgesBatch", "hardDeleteNode", "hardDeleteUniquesByNodeIds", "hybridSearch", "insertEdge", "insertEdgeNoReturn", "insertEdgesBatch", "insertEdgesBatchReturning", "insertNode", "insertNodeNoReturn", "insertNodesBatch", "insertNodesBatchReturning", "insertUnique", "insertUniqueBatch", "probeContributions", "recordContributionMaterialization", "recordIndexMaterialization", "recordKindRemoval", "refreshStatistics", "releaseIndexMaterializationClaim", "setActiveVersion", "setReconciliationMarker", "tableNames", "updateEdge", "updateNode", "updateNodeSet", "upsertEmbedding", "upsertEmbeddingBatch", "upsertFulltext", "upsertFulltextBatch", "vectorSearch", "vectorStrategy", "verifyContributions"];
|
|
3725
|
+
type HistoryStoreBackendMember = (typeof HISTORY_STORE_BACKEND_KEYS)[number];
|
|
3726
|
+
type UnsafeHistoryStoreBackendMember = "clearGraph" | "commitSchemaVersionWithPreflight" | "executeDdl" | "executeRaw" | "executeStatement" | "ensureIdentityTables" | "identityTableDdl" | "rebuildContribution" | "repairContributions" | "schemaWriteTransaction" | "transaction" | "trustedImport";
|
|
3727
|
+
type UnclassifiedHistoryStoreBackendMember = Exclude<keyof GraphBackend, HistoryStoreBackendMember | UnsafeHistoryStoreBackendMember>;
|
|
3728
|
+
type HistoryStoreBackend = UnclassifiedHistoryStoreBackendMember extends never ? Readonly<Pick<GraphBackend, HistoryStoreBackendMember>> : never;
|
|
3729
|
+
|
|
3730
|
+
/**
|
|
3731
|
+
* `store.introspect()` — unified read of the merged schema.
|
|
3732
|
+
*
|
|
3733
|
+
* Returns a coherent snapshot of "what does my schema look like right
|
|
3734
|
+
* now" suitable for schema-management UIs, codegen, and IDE plugins.
|
|
3735
|
+
* The previous surface was fragmented across `registry.hasNodeType`,
|
|
3736
|
+
* `store.deprecatedKinds`, and direct graph poking; `introspect()`
|
|
3737
|
+
* unifies them with explicit `origin` markers distinguishing
|
|
3738
|
+
* compile-time from runtime declarations.
|
|
3739
|
+
*
|
|
3740
|
+
* Pure read — no I/O. Built from the in-memory `GraphDef` and the
|
|
3741
|
+
* persisted-but-already-merged `extension`. `schemaVersion` /
|
|
3742
|
+
* `schemaHash` are populated when the loader cached them at
|
|
3743
|
+
* construction time and `undefined` otherwise; consumers needing a
|
|
3744
|
+
* fresh read should call `backend.getActiveSchema(graphId)` directly.
|
|
3745
|
+
*/
|
|
3746
|
+
|
|
3747
|
+
type SchemaIntrospection = Readonly<{
|
|
3748
|
+
graphId: string;
|
|
3749
|
+
/** Active schema version on the backend, when known to the caller. */
|
|
3750
|
+
schemaVersion: number | undefined;
|
|
3751
|
+
/** Hash of the active schema document, when known to the caller. */
|
|
3752
|
+
schemaHash: string | undefined;
|
|
3753
|
+
kinds: readonly KindIntrospection[];
|
|
3754
|
+
edges: readonly EdgeIntrospection[];
|
|
3755
|
+
ontology: readonly OntologyIntrospection[];
|
|
3756
|
+
deprecatedKinds: ReadonlySet<string>;
|
|
3428
3757
|
/**
|
|
3429
|
-
*
|
|
3430
|
-
*
|
|
3431
|
-
*
|
|
3432
|
-
*
|
|
3758
|
+
* The persisted graph extension, or `undefined` when the store has
|
|
3759
|
+
* no extensions. Round-trips: passing this value to
|
|
3760
|
+
* `defineGraphExtension` and `evolve` against an empty graph yields
|
|
3761
|
+
* a graph with the same extension kinds.
|
|
3433
3762
|
*/
|
|
3434
|
-
|
|
3763
|
+
extension: GraphExtension | undefined;
|
|
3435
3764
|
}>;
|
|
3436
|
-
type
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
upserted: number;
|
|
3443
|
-
/** Fulltext delete operations executed (soft-deleted or all-empty nodes). */
|
|
3444
|
-
cleared: number;
|
|
3445
|
-
/**
|
|
3446
|
-
* Nodes skipped due to corrupt or non-object `props` (not counted in
|
|
3447
|
-
* upserted/cleared).
|
|
3448
|
-
*/
|
|
3449
|
-
skipped: number;
|
|
3765
|
+
type KindIntrospection = Readonly<{
|
|
3766
|
+
name: string;
|
|
3767
|
+
origin: "compile-time" | "runtime";
|
|
3768
|
+
description: string | undefined;
|
|
3769
|
+
annotations: KindAnnotations | undefined;
|
|
3770
|
+
deprecated: boolean;
|
|
3450
3771
|
/**
|
|
3451
|
-
*
|
|
3452
|
-
*
|
|
3453
|
-
*
|
|
3772
|
+
* JSON-Schema view of the kind's properties. For extension kinds the
|
|
3773
|
+
* lower-level `ExtensionPropertyType` shape (with first-class
|
|
3774
|
+
* `searchable` / `embedding` modifiers) is reachable via
|
|
3775
|
+
* `introspection.extension.nodes[name].properties`.
|
|
3454
3776
|
*/
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3777
|
+
properties: JsonSchema;
|
|
3778
|
+
unique: readonly UniqueIntrospection[];
|
|
3779
|
+
}>;
|
|
3780
|
+
type EdgeIntrospection = Readonly<{
|
|
3781
|
+
name: string;
|
|
3782
|
+
origin: "compile-time" | "runtime";
|
|
3783
|
+
description: string | undefined;
|
|
3784
|
+
from: readonly string[];
|
|
3785
|
+
to: readonly string[];
|
|
3786
|
+
cardinality: Cardinality;
|
|
3787
|
+
endpointExistence: EndpointExistence;
|
|
3788
|
+
properties: JsonSchema;
|
|
3789
|
+
annotations: KindAnnotations | undefined;
|
|
3790
|
+
deprecated: boolean;
|
|
3791
|
+
}>;
|
|
3792
|
+
type OntologyIntrospection = Readonly<{
|
|
3793
|
+
metaEdge: string;
|
|
3794
|
+
from: string;
|
|
3795
|
+
to: string;
|
|
3796
|
+
origin: "compile-time" | "runtime";
|
|
3797
|
+
}>;
|
|
3798
|
+
type UniqueIntrospection = Readonly<{
|
|
3799
|
+
name: string;
|
|
3800
|
+
fields: readonly string[];
|
|
3801
|
+
scope: UniquenessScope;
|
|
3802
|
+
collation: Collation;
|
|
3458
3803
|
}>;
|
|
3459
3804
|
|
|
3460
3805
|
/**
|
|
3461
|
-
*
|
|
3806
|
+
* Data-cleanup phase for `store.removeKinds()`.
|
|
3462
3807
|
*
|
|
3463
|
-
*
|
|
3464
|
-
*
|
|
3465
|
-
*
|
|
3466
|
-
*
|
|
3467
|
-
*
|
|
3808
|
+
* The removeKinds verb commits the new schema atomically (millisecond
|
|
3809
|
+
* budget); the data deletion happens here, scoped per-deployment via
|
|
3810
|
+
* the `typegraph_kind_removals` status table. Splitting the verbs
|
|
3811
|
+
* mirrors how `materializeIndexes` complements `evolve`: schema
|
|
3812
|
+
* commits are atomic and fast, while data work is bounded by row count and
|
|
3813
|
+
* deferrable. Candidates run sequentially because they share one graph lock.
|
|
3468
3814
|
*/
|
|
3469
3815
|
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
type FulltextSearchHit<N = Node> = Readonly<{
|
|
3476
|
-
node: N;
|
|
3477
|
-
/** Backend-native relevance score; higher is better. */
|
|
3478
|
-
score: number;
|
|
3479
|
-
/** 1-based rank within the result set. */
|
|
3480
|
-
rank: number;
|
|
3481
|
-
/** Highlighted snippet (only present when `includeSnippets: true`). */
|
|
3482
|
-
snippet?: string;
|
|
3483
|
-
}>;
|
|
3484
|
-
type VectorSearchHit<N = Node> = Readonly<{
|
|
3485
|
-
node: N;
|
|
3486
|
-
score: number;
|
|
3487
|
-
rank: number;
|
|
3816
|
+
type MaterializeRemovalsOptions = Readonly<{
|
|
3817
|
+
/** Restrict to specific kind names. */
|
|
3818
|
+
kinds?: readonly string[];
|
|
3819
|
+
/** Halt on first failure. Default: false (best-effort). */
|
|
3820
|
+
stopOnError?: boolean;
|
|
3488
3821
|
}>;
|
|
3489
3822
|
/**
|
|
3490
|
-
*
|
|
3491
|
-
*
|
|
3823
|
+
* Outcome of one queued kind removal, discriminated on `status`.
|
|
3824
|
+
*
|
|
3825
|
+
* A union rather than one shape with optional fields, so each outcome carries
|
|
3826
|
+
* exactly its own payload: `"failed"` always has an `error`, `"skipped"`
|
|
3827
|
+
* always has a `reason`, and `"removed"` has neither. The flat form permitted
|
|
3828
|
+
* impossible states — a `"skipped"` with no reason, or a `"removed"` carrying
|
|
3829
|
+
* `reason: "kind-is-live"` — and narrowing on `status` still left both fields
|
|
3830
|
+
* optional at the use site.
|
|
3492
3831
|
*/
|
|
3493
|
-
type
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3832
|
+
type MaterializeRemovalsEntry = Readonly<{
|
|
3833
|
+
kind: string;
|
|
3834
|
+
entity: KindEntity;
|
|
3835
|
+
status: "removed";
|
|
3836
|
+
}> | Readonly<{
|
|
3837
|
+
kind: string;
|
|
3838
|
+
entity: KindEntity;
|
|
3839
|
+
status: "failed";
|
|
3840
|
+
error: Error;
|
|
3841
|
+
}> | Readonly<{
|
|
3842
|
+
kind: string;
|
|
3843
|
+
entity: KindEntity;
|
|
3844
|
+
status: "skipped";
|
|
3845
|
+
/**
|
|
3846
|
+
* `"kind-is-live"`: the active schema declares this kind again — it was
|
|
3847
|
+
* dropped, then re-added — so deleting its rows would destroy live
|
|
3848
|
+
* data. The queue row stays pending, so a later removal of the same
|
|
3849
|
+
* kind still reclaims it.
|
|
3850
|
+
*
|
|
3851
|
+
* Reported rather than silent: an empty `results` array would otherwise
|
|
3852
|
+
* be indistinguishable from "nothing was pending", leaving the queue at
|
|
3853
|
+
* a non-zero depth with nothing explaining why.
|
|
3854
|
+
*/
|
|
3855
|
+
reason: "kind-is-live";
|
|
3503
3856
|
}>;
|
|
3504
3857
|
/**
|
|
3505
|
-
*
|
|
3506
|
-
*
|
|
3507
|
-
*
|
|
3508
|
-
*
|
|
3509
|
-
* filtering happens INSIDE the engine's top-k — never by post-filtering a
|
|
3510
|
-
* ranked list. `offset` is rank-relative pagination: the engine fetches
|
|
3511
|
-
* `limit + offset` ranked candidates and discards the leading page.
|
|
3858
|
+
* Outcome of reclaiming one per-`(graphId, kind, field)` vector table that
|
|
3859
|
+
* was orphaned when its embedding field was dropped from a *surviving*
|
|
3860
|
+
* kind's schema. Distinct from {@link MaterializeRemovalsEntry} (whole
|
|
3861
|
+
* kinds) because the unit is a single embedding field, not a kind.
|
|
3512
3862
|
*/
|
|
3513
|
-
type
|
|
3863
|
+
type ReclaimedVectorFieldEntry = Readonly<{
|
|
3864
|
+
kind: string;
|
|
3865
|
+
fieldPath: string;
|
|
3866
|
+
status: "reclaimed" | "failed";
|
|
3867
|
+
error?: Error;
|
|
3868
|
+
}>;
|
|
3869
|
+
type MaterializeRemovalsResult = Readonly<{
|
|
3870
|
+
results: readonly MaterializeRemovalsEntry[];
|
|
3514
3871
|
/**
|
|
3515
|
-
*
|
|
3516
|
-
*
|
|
3517
|
-
*
|
|
3518
|
-
*
|
|
3519
|
-
*
|
|
3520
|
-
*
|
|
3521
|
-
*/
|
|
3522
|
-
where?: (accessor: NodeAccessor<N>) => Predicate;
|
|
3523
|
-
/** Rows to skip after ranking (rank-relative pagination). */
|
|
3524
|
-
offset?: number;
|
|
3525
|
-
/**
|
|
3526
|
-
* Expand the searched kind to include its `subClassOf` descendants.
|
|
3527
|
-
* Vector legs search each declaring kind's storage and merge by score;
|
|
3528
|
-
* kinds that don't declare the embedding field are skipped (mirroring
|
|
3529
|
-
* the query builder). Requires a query-capable store.
|
|
3530
|
-
*/
|
|
3531
|
-
includeSubClasses?: boolean;
|
|
3532
|
-
}>;
|
|
3533
|
-
type FulltextSearchOptions<N extends NodeType = NodeType> = SearchScopeOptions<N> & Readonly<{
|
|
3534
|
-
/** The user-supplied query string. */
|
|
3535
|
-
query: string;
|
|
3536
|
-
/** Max results. Required. */
|
|
3537
|
-
limit: number;
|
|
3538
|
-
/** Query parser mode. Default: "websearch". */
|
|
3539
|
-
mode?: FulltextQueryMode;
|
|
3540
|
-
/**
|
|
3541
|
-
* Language override for query parsing. Default: the kind's
|
|
3542
|
-
* declared language (the same config rows were indexed with),
|
|
3543
|
-
* which keeps the parsed tsquery a plan-time constant on
|
|
3544
|
-
* PostgreSQL so the GIN index can serve the match.
|
|
3545
|
-
*/
|
|
3546
|
-
language?: string;
|
|
3547
|
-
/** Minimum relevance score to include in results. */
|
|
3548
|
-
minScore?: number;
|
|
3549
|
-
/** Return a highlighted snippet alongside each hit. */
|
|
3550
|
-
includeSnippets?: boolean;
|
|
3551
|
-
}>;
|
|
3552
|
-
type HybridVectorOptions = Readonly<{
|
|
3553
|
-
/** Field path of the embedding column on the node kind. */
|
|
3554
|
-
fieldPath: string;
|
|
3555
|
-
/** Query embedding to compare against. */
|
|
3556
|
-
queryEmbedding: readonly number[];
|
|
3557
|
-
/** Distance metric. Default: "cosine". */
|
|
3558
|
-
metric?: VectorMetric;
|
|
3559
|
-
/** How many candidates to retrieve from the vector side. Default: 4 * limit. */
|
|
3560
|
-
k?: number;
|
|
3561
|
-
/** Minimum similarity to include (units depend on metric). */
|
|
3562
|
-
minScore?: number;
|
|
3563
|
-
/**
|
|
3564
|
-
* HNSW search frontier for this query (pgvector `hnsw.ef_search`).
|
|
3565
|
-
* The vector side over-fetches `k` (default `4 * limit`) candidates;
|
|
3566
|
-
* `efSearch` must be `>= k` for the index to surface that many
|
|
3567
|
-
* neighbors, and ~2–4× `k` is the high-recall target. Postgres HNSW
|
|
3568
|
-
* only — no-op elsewhere. See `VectorSearchOptions.efSearch`.
|
|
3569
|
-
*/
|
|
3570
|
-
efSearch?: number;
|
|
3571
|
-
}>;
|
|
3572
|
-
/**
|
|
3573
|
-
* Options for the standalone `store.search.vector` path. Mirrors the
|
|
3574
|
-
* vector half of `HybridSearchOptions` but flattens it because the
|
|
3575
|
-
* standalone path doesn't fuse against fulltext.
|
|
3576
|
-
*/
|
|
3577
|
-
type VectorSearchOptions<N extends NodeType = NodeType> = SearchScopeOptions<N> & Readonly<{
|
|
3578
|
-
/** Field path of the embedding column on the node kind. */
|
|
3579
|
-
fieldPath: string;
|
|
3580
|
-
/** Query embedding to compare against. */
|
|
3581
|
-
queryEmbedding: readonly number[];
|
|
3582
|
-
/** Max results. Required. */
|
|
3583
|
-
limit: number;
|
|
3584
|
-
/** Distance metric. Default: "cosine". */
|
|
3585
|
-
metric?: VectorMetric;
|
|
3586
|
-
/** Minimum similarity to include (units depend on metric). */
|
|
3587
|
-
minScore?: number;
|
|
3588
|
-
/**
|
|
3589
|
-
* HNSW search frontier for this query (pgvector `hnsw.ef_search`).
|
|
3590
|
-
* Sizes the dynamic candidate list the index scan maintains — higher
|
|
3591
|
-
* trades latency for recall. The floor for the index to surface
|
|
3592
|
-
* `limit` neighbors is `efSearch >= limit`; ~2–4× is the high-recall
|
|
3593
|
-
* target on million-scale corpora. Lets a latency-sensitive
|
|
3594
|
-
* interactive path and a recall-sensitive batch path share one
|
|
3595
|
-
* connection pool, tuning per query rather than per session.
|
|
3596
|
-
*
|
|
3597
|
-
* Postgres HNSW only: applied transaction-locally via `SET LOCAL`.
|
|
3598
|
-
* sqlite-vec has no equivalent frontier knob and ignores it; Postgres
|
|
3599
|
-
* backends without transactions (`drizzle-orm/neon-http`) ignore it
|
|
3600
|
-
* with a one-time warning. Must be a positive integer; pgvector caps
|
|
3601
|
-
* it at 1000.
|
|
3872
|
+
* Embedding fields removed from a *surviving* kind whose per-field vector
|
|
3873
|
+
* table this pass dropped (or confirmed already absent). Empty when the
|
|
3874
|
+
* backend has no vector strategy or no embedding field has ever been
|
|
3875
|
+
* dropped. Re-derived from immutable schema history each call, so it lists
|
|
3876
|
+
* the same removed fields on repeat passes — the underlying drop is
|
|
3877
|
+
* idempotent (`DROP ... IF EXISTS`). See {@link reclaimRemovedVectorFieldTables}.
|
|
3602
3878
|
*/
|
|
3603
|
-
|
|
3604
|
-
}>;
|
|
3605
|
-
type HybridFulltextOptions = Readonly<{
|
|
3606
|
-
query: string;
|
|
3607
|
-
/** How many candidates to retrieve from the fulltext side. Default: 4 * limit. */
|
|
3608
|
-
k?: number;
|
|
3609
|
-
mode?: FulltextQueryMode;
|
|
3610
|
-
language?: string;
|
|
3611
|
-
minScore?: number;
|
|
3612
|
-
includeSnippets?: boolean;
|
|
3613
|
-
}>;
|
|
3614
|
-
type HybridSearchOptions<N extends NodeType = NodeType> = SearchScopeOptions<N> & Readonly<{
|
|
3615
|
-
vector: HybridVectorOptions;
|
|
3616
|
-
fulltext: HybridFulltextOptions;
|
|
3617
|
-
fusion?: HybridFusionOptions;
|
|
3618
|
-
/** Final number of fused results to return. Required. */
|
|
3619
|
-
limit: number;
|
|
3879
|
+
reclaimedVectorFields: readonly ReclaimedVectorFieldEntry[];
|
|
3620
3880
|
}>;
|
|
3621
3881
|
|
|
3622
3882
|
/**
|
|
3623
|
-
*
|
|
3883
|
+
* Subgraph Extraction
|
|
3624
3884
|
*
|
|
3625
|
-
*
|
|
3626
|
-
*
|
|
3627
|
-
*
|
|
3628
|
-
* modules; this class exists to shape the surface and to gate kind
|
|
3629
|
-
* names through the registry — the kind argument is `string` so
|
|
3630
|
-
* graph-extension kinds (added via `store.evolve()`) work without a
|
|
3631
|
-
* type cast, with a runtime guard rejecting misspellings at the call
|
|
3632
|
-
* site.
|
|
3885
|
+
* Extracts a typed subgraph from a root node by traversing a set of edge kinds.
|
|
3886
|
+
* Uses a recursive CTE for BFS traversal with cycle detection, then hydrates
|
|
3887
|
+
* the reachable nodes and connecting edges in two parallel queries.
|
|
3633
3888
|
*/
|
|
3634
3889
|
|
|
3635
3890
|
/**
|
|
3636
|
-
*
|
|
3637
|
-
* narrowed `Node<N>`; kinds outside `G` (added via graph extension through
|
|
3638
|
-
* `store.evolve()`, or string variables the type system can't see)
|
|
3639
|
-
* widen to the base `Node` so callers don't need a cast.
|
|
3891
|
+
* Discriminated union of all Node runtime types in a graph.
|
|
3640
3892
|
*
|
|
3641
|
-
*
|
|
3642
|
-
*
|
|
3643
|
-
* when) the literal is statically known.
|
|
3893
|
+
* Unlike `AllNodeTypes<G>` which gives the union of *type definitions*,
|
|
3894
|
+
* `AnyNode<G>` gives the union of *runtime node instances*.
|
|
3644
3895
|
*/
|
|
3645
|
-
type
|
|
3896
|
+
type AnyNode<G extends GraphDef> = {
|
|
3897
|
+
[K in NodeKinds<G>]: Node<G["nodes"][K]["type"]>;
|
|
3898
|
+
}[NodeKinds<G>];
|
|
3646
3899
|
/**
|
|
3647
|
-
*
|
|
3648
|
-
* companion of {@link ResolveNode}, used to type `where` predicates.
|
|
3649
|
-
* Falls back to the base `NodeType` for dynamic (string) kinds.
|
|
3900
|
+
* Discriminated union of all Edge runtime types in a graph.
|
|
3650
3901
|
*/
|
|
3651
|
-
type
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
backend: GraphBackend;
|
|
3655
|
-
registry: KindRegistry;
|
|
3656
|
-
createQuery?: () => QueryBuilder<GraphDef>;
|
|
3657
|
-
}>;
|
|
3902
|
+
type AnyEdge<G extends GraphDef> = {
|
|
3903
|
+
[K in EdgeKinds<G>]: Edge<G["edges"][K]["type"]>;
|
|
3904
|
+
}[EdgeKinds<G>];
|
|
3658
3905
|
/**
|
|
3659
|
-
*
|
|
3660
|
-
*
|
|
3661
|
-
* @example
|
|
3662
|
-
* ```typescript
|
|
3663
|
-
* // Fulltext only
|
|
3664
|
-
* const hits = await store.search.fulltext("Document", {
|
|
3665
|
-
* query: "climate change",
|
|
3666
|
-
* limit: 10,
|
|
3667
|
-
* includeSnippets: true,
|
|
3668
|
-
* });
|
|
3669
|
-
*
|
|
3670
|
-
* // Vector only — for extension kinds with embedding() modifiers,
|
|
3671
|
-
* // the auto-derived index serves this query.
|
|
3672
|
-
* const nearest = await store.search.vector("Document", {
|
|
3673
|
-
* fieldPath: "embedding",
|
|
3674
|
-
* queryEmbedding: vec,
|
|
3675
|
-
* limit: 10,
|
|
3676
|
-
* });
|
|
3677
|
-
*
|
|
3678
|
-
* // Hybrid: vector + fulltext, fused with RRF
|
|
3679
|
-
* const ranked = await store.search.hybrid("Document", {
|
|
3680
|
-
* limit: 10,
|
|
3681
|
-
* vector: { fieldPath: "embedding", queryEmbedding: vec },
|
|
3682
|
-
* fulltext: { query: "climate change" },
|
|
3683
|
-
* });
|
|
3684
|
-
*
|
|
3685
|
-
* // Rebuild after backfill / schema change
|
|
3686
|
-
* const stats = await store.search.rebuildFulltext();
|
|
3687
|
-
* ```
|
|
3688
|
-
*
|
|
3689
|
-
* Extension kinds added via `store.evolve(...)` work with all four
|
|
3690
|
-
* methods without a type cast — the kind argument is `string` and a
|
|
3691
|
-
* registry check rejects misspellings at the call site.
|
|
3906
|
+
* Discriminated union of Node runtime types narrowed to a subset of kinds.
|
|
3692
3907
|
*/
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3908
|
+
type SubsetNode<G extends GraphDef, K extends NodeKinds<G>> = {
|
|
3909
|
+
[Kind in K]: Node<G["nodes"][Kind]["type"]>;
|
|
3910
|
+
}[K];
|
|
3911
|
+
/**
|
|
3912
|
+
* Discriminated union of Edge runtime types narrowed to a subset of kinds.
|
|
3913
|
+
*/
|
|
3914
|
+
type SubsetEdge<G extends GraphDef, K extends EdgeKinds<G>> = {
|
|
3915
|
+
[Kind in K]: Edge<G["edges"][Kind]["type"]>;
|
|
3916
|
+
}[K];
|
|
3917
|
+
type EmptyShape = Readonly<Record<never, never>>;
|
|
3918
|
+
type NodeProjectionPropertyKey<N extends NodeType> = Exclude<keyof Node<N>, "id" | "kind" | "meta"> & string;
|
|
3919
|
+
type EdgeProjectionPropertyKey<E extends AnyEdgeType> = Exclude<keyof Edge<E>, "id" | "kind" | "fromKind" | "fromId" | "toKind" | "toId" | "meta"> & string;
|
|
3920
|
+
type SubgraphNodeProjectionField<N extends NodeType = NodeType> = NodeProjectionPropertyKey<N> | "meta";
|
|
3921
|
+
type SubgraphEdgeProjectionField<E extends AnyEdgeType = AnyEdgeType> = EdgeProjectionPropertyKey<E> | "meta";
|
|
3922
|
+
type SubgraphNodeProjectionMap<G extends GraphDef, NK extends NodeKinds<G> = NodeKinds<G>> = Readonly<{
|
|
3923
|
+
[K in NodeKinds<G>]?: K extends NK ? readonly SubgraphNodeProjectionField<G["nodes"][K]["type"]>[] : never;
|
|
3924
|
+
}>;
|
|
3925
|
+
type SubgraphEdgeProjectionMap<G extends GraphDef, EK extends EdgeKinds<G> = EdgeKinds<G>> = Readonly<{
|
|
3926
|
+
[K in EdgeKinds<G>]?: K extends EK ? readonly SubgraphEdgeProjectionField<G["edges"][K]["type"]>[] : never;
|
|
3927
|
+
}>;
|
|
3928
|
+
type SubgraphProject<G extends GraphDef, NK extends NodeKinds<G> = NodeKinds<G>, EK extends EdgeKinds<G> = EdgeKinds<G>> = Readonly<{
|
|
3706
3929
|
/**
|
|
3707
|
-
*
|
|
3708
|
-
*
|
|
3709
|
-
* Requires a field on the node schema declared with `embedding()`,
|
|
3710
|
-
* either at compile time or via a graph extension (the auto-derived
|
|
3711
|
-
* `VectorIndexDeclaration` flows through `materializeIndexes()` on
|
|
3712
|
-
* the same path either way).
|
|
3930
|
+
* Node fields to keep per kind.
|
|
3713
3931
|
*
|
|
3714
|
-
*
|
|
3715
|
-
*
|
|
3932
|
+
* Projected nodes always retain `kind` and `id`.
|
|
3933
|
+
* Use `"meta"` to include the full metadata object; omit it to exclude metadata entirely.
|
|
3934
|
+
* Only kinds present in `includeKinds` (or all node kinds when omitted) are valid keys.
|
|
3716
3935
|
*/
|
|
3717
|
-
|
|
3936
|
+
nodes?: SubgraphNodeProjectionMap<G, NK>;
|
|
3718
3937
|
/**
|
|
3719
|
-
*
|
|
3720
|
-
* Reciprocal Rank Fusion.
|
|
3938
|
+
* Edge fields to keep per kind.
|
|
3721
3939
|
*
|
|
3722
|
-
*
|
|
3723
|
-
*
|
|
3724
|
-
*
|
|
3725
|
-
* `
|
|
3726
|
-
*/
|
|
3727
|
-
hybrid<K extends string>(nodeKind: K, options: HybridSearchOptions<ResolveNodeType<G, K>>): Promise<readonly HybridSearchHit<ResolveNode<G, K>>[]>;
|
|
3728
|
-
/**
|
|
3729
|
-
* Rebuilds the fulltext index from existing node data.
|
|
3730
|
-
*
|
|
3731
|
-
* Use when:
|
|
3732
|
-
* - A node kind gained a `searchable()` field after data was already
|
|
3733
|
-
* written and existing rows were never indexed.
|
|
3734
|
-
* - The fulltext table was dropped / truncated.
|
|
3735
|
-
* - `language` was changed on a `searchable()` field.
|
|
3736
|
-
*
|
|
3737
|
-
* Iterates nodes with keyset pagination (stable under shared
|
|
3738
|
-
* timestamps and light concurrent writes), transacts per page, skips
|
|
3739
|
-
* kinds with no searchable fields, and cleans up stale rows for
|
|
3740
|
-
* soft-deleted nodes. Corrupt or non-object `props` are counted in
|
|
3741
|
-
* `skipped` with their node IDs surfaced via `skippedIds` so operators
|
|
3742
|
-
* can investigate. Concurrent hard-deletes between page fetches can
|
|
3743
|
-
* be missed by a single pass — run during a maintenance window for
|
|
3744
|
-
* full consistency.
|
|
3745
|
-
*/
|
|
3746
|
-
rebuildFulltext<K extends string>(nodeKind?: K, options?: RebuildFulltextOptions): Promise<RebuildFulltextResult>;
|
|
3747
|
-
}
|
|
3748
|
-
|
|
3749
|
-
/**
|
|
3750
|
-
* Members that are safe to expose through a history-enabled adapter Store.
|
|
3751
|
-
*
|
|
3752
|
-
* Graph entity writes remain because the source is the capture-wrapped
|
|
3753
|
-
* backend. Direct raw SQL, native import, graph clearing, and nested backend
|
|
3754
|
-
* transactions stay internal because each can mutate live rows without a
|
|
3755
|
-
* corresponding capture flush.
|
|
3756
|
-
*/
|
|
3757
|
-
declare const HISTORY_STORE_BACKEND_KEYS: readonly ["assertRuntimeContributionsInitialized", "assertVectorSlotInitialized", "assertVectorSlotsInitialized", "bootstrapTables", "capabilities", "checkUnique", "checkUniqueBatch", "claimIndexMaterialization", "close", "commitSchemaVersion", "commitSchemaVersionIfKindsEmpty", "lockSchemaVersionForWrite", "compileSql", "countEdgesByKind", "countEdgesFrom", "countNodesByKind", "createVectorIndex", "deleteEdge", "deleteEdgesBatch", "deleteEmbedding", "deleteEmbeddingBatch", "deleteFulltext", "deleteFulltextBatch", "deleteNode", "deleteUnique", "hardDeleteUniquesByNodeIds", "deleteVectorSlotContribution", "dialect", "dropVectorIndex", "edgeExistsBetween", "ensureContributionMaterializationsTable", "ensureFulltextTable", "ensureIndexMaterializationsTable", "ensureKindRemovalsTable", "ensureReconciliationMarkersTable", "ensureRevisionOriginsTable", "ensureRuntimeContributions", "ensureVectorSlotContribution", "ensureVectorSlotContributions", "execute", "executeTemporaryStatement", "findEdgesByKind", "findEdgesByEndpointSet", "findEdgesByHeterogeneousEndpointSet", "findEdgesConnectedTo", "findNodesByKind", "fulltextSearch", "fulltextStrategy", "getActiveSchema", "getAllKindRemovals", "getContributionMaterialization", "getEdge", "getEdges", "getIndexMaterialization", "getIndexMaterializations", "getNode", "getNodes", "getPendingKindRemovals", "getReconciliationMarker", "getSchemaVersion", "hardDeleteEdge", "hardDeleteEdgesBatch", "hardDeleteNode", "hardDeleteUniquesByNodeIds", "hybridSearch", "insertEdge", "insertEdgeNoReturn", "insertEdgesBatch", "insertEdgesBatchReturning", "insertNode", "insertNodeNoReturn", "insertNodesBatch", "insertNodesBatchReturning", "insertUnique", "insertUniqueBatch", "recordContributionMaterialization", "recordIndexMaterialization", "recordKindRemoval", "refreshStatistics", "releaseIndexMaterializationClaim", "setActiveVersion", "setReconciliationMarker", "tableNames", "updateEdge", "updateNode", "updateNodeSet", "upsertEmbedding", "upsertEmbeddingBatch", "upsertFulltext", "upsertFulltextBatch", "vectorSearch", "vectorStrategy", "verifyContributions"];
|
|
3758
|
-
type HistoryStoreBackendMember = (typeof HISTORY_STORE_BACKEND_KEYS)[number];
|
|
3759
|
-
type UnsafeHistoryStoreBackendMember = "clearGraph" | "executeDdl" | "executeRaw" | "executeStatement" | "repairContributions" | "schemaWriteTransaction" | "transaction" | "trustedImport";
|
|
3760
|
-
type UnclassifiedHistoryStoreBackendMember = Exclude<keyof GraphBackend, HistoryStoreBackendMember | UnsafeHistoryStoreBackendMember>;
|
|
3761
|
-
type HistoryStoreBackend = UnclassifiedHistoryStoreBackendMember extends never ? Readonly<Pick<GraphBackend, HistoryStoreBackendMember>> : never;
|
|
3762
|
-
|
|
3763
|
-
/**
|
|
3764
|
-
* `store.introspect()` — unified read of the merged schema.
|
|
3765
|
-
*
|
|
3766
|
-
* Returns a coherent snapshot of "what does my schema look like right
|
|
3767
|
-
* now" suitable for schema-management UIs, codegen, and IDE plugins.
|
|
3768
|
-
* The previous surface was fragmented across `registry.hasNodeType`,
|
|
3769
|
-
* `store.deprecatedKinds`, and direct graph poking; `introspect()`
|
|
3770
|
-
* unifies them with explicit `origin` markers distinguishing
|
|
3771
|
-
* compile-time from runtime declarations.
|
|
3772
|
-
*
|
|
3773
|
-
* Pure read — no I/O. Built from the in-memory `GraphDef` and the
|
|
3774
|
-
* persisted-but-already-merged `extension`. `schemaVersion` /
|
|
3775
|
-
* `schemaHash` are populated when the loader cached them at
|
|
3776
|
-
* construction time and `undefined` otherwise; consumers needing a
|
|
3777
|
-
* fresh read should call `backend.getActiveSchema(graphId)` directly.
|
|
3778
|
-
*/
|
|
3779
|
-
|
|
3780
|
-
type SchemaIntrospection = Readonly<{
|
|
3781
|
-
graphId: string;
|
|
3782
|
-
/** Active schema version on the backend, when known to the caller. */
|
|
3783
|
-
schemaVersion: number | undefined;
|
|
3784
|
-
/** Hash of the active schema document, when known to the caller. */
|
|
3785
|
-
schemaHash: string | undefined;
|
|
3786
|
-
kinds: readonly KindIntrospection[];
|
|
3787
|
-
edges: readonly EdgeIntrospection[];
|
|
3788
|
-
ontology: readonly OntologyIntrospection[];
|
|
3789
|
-
deprecatedKinds: ReadonlySet<string>;
|
|
3790
|
-
/**
|
|
3791
|
-
* The persisted graph extension, or `undefined` when the store has
|
|
3792
|
-
* no extensions. Round-trips: passing this value to
|
|
3793
|
-
* `defineGraphExtension` and `evolve` against an empty graph yields
|
|
3794
|
-
* a graph with the same extension kinds.
|
|
3795
|
-
*/
|
|
3796
|
-
extension: GraphExtension | undefined;
|
|
3797
|
-
}>;
|
|
3798
|
-
type KindIntrospection = Readonly<{
|
|
3799
|
-
name: string;
|
|
3800
|
-
origin: "compile-time" | "runtime";
|
|
3801
|
-
description: string | undefined;
|
|
3802
|
-
annotations: KindAnnotations | undefined;
|
|
3803
|
-
deprecated: boolean;
|
|
3804
|
-
/**
|
|
3805
|
-
* JSON-Schema view of the kind's properties. For extension kinds the
|
|
3806
|
-
* lower-level `ExtensionPropertyType` shape (with first-class
|
|
3807
|
-
* `searchable` / `embedding` modifiers) is reachable via
|
|
3808
|
-
* `introspection.extension.nodes[name].properties`.
|
|
3809
|
-
*/
|
|
3810
|
-
properties: JsonSchema;
|
|
3811
|
-
unique: readonly UniqueIntrospection[];
|
|
3812
|
-
}>;
|
|
3813
|
-
type EdgeIntrospection = Readonly<{
|
|
3814
|
-
name: string;
|
|
3815
|
-
origin: "compile-time" | "runtime";
|
|
3816
|
-
description: string | undefined;
|
|
3817
|
-
from: readonly string[];
|
|
3818
|
-
to: readonly string[];
|
|
3819
|
-
cardinality: Cardinality;
|
|
3820
|
-
endpointExistence: EndpointExistence;
|
|
3821
|
-
properties: JsonSchema;
|
|
3822
|
-
annotations: KindAnnotations | undefined;
|
|
3823
|
-
deprecated: boolean;
|
|
3824
|
-
}>;
|
|
3825
|
-
type OntologyIntrospection = Readonly<{
|
|
3826
|
-
metaEdge: string;
|
|
3827
|
-
from: string;
|
|
3828
|
-
to: string;
|
|
3829
|
-
origin: "compile-time" | "runtime";
|
|
3830
|
-
}>;
|
|
3831
|
-
type UniqueIntrospection = Readonly<{
|
|
3832
|
-
name: string;
|
|
3833
|
-
fields: readonly string[];
|
|
3834
|
-
scope: UniquenessScope;
|
|
3835
|
-
collation: Collation;
|
|
3836
|
-
}>;
|
|
3837
|
-
|
|
3838
|
-
/**
|
|
3839
|
-
* Data-cleanup phase for `store.removeKinds()`.
|
|
3840
|
-
*
|
|
3841
|
-
* The removeKinds verb commits the new schema atomically (millisecond
|
|
3842
|
-
* budget); the data deletion happens here, scoped per-deployment via
|
|
3843
|
-
* the `typegraph_kind_removals` status table. Splitting the verbs
|
|
3844
|
-
* mirrors how `materializeIndexes` complements `evolve`: schema
|
|
3845
|
-
* commits are atomic and fast, while data work is bounded by row count and
|
|
3846
|
-
* deferrable. Candidates run sequentially because they share one graph lock.
|
|
3847
|
-
*/
|
|
3848
|
-
|
|
3849
|
-
type MaterializeRemovalsOptions = Readonly<{
|
|
3850
|
-
/** Restrict to specific kind names. */
|
|
3851
|
-
kinds?: readonly string[];
|
|
3852
|
-
/** Halt on first failure. Default: false (best-effort). */
|
|
3853
|
-
stopOnError?: boolean;
|
|
3854
|
-
}>;
|
|
3855
|
-
/**
|
|
3856
|
-
* Outcome of one queued kind removal, discriminated on `status`.
|
|
3857
|
-
*
|
|
3858
|
-
* A union rather than one shape with optional fields, so each outcome carries
|
|
3859
|
-
* exactly its own payload: `"failed"` always has an `error`, `"skipped"`
|
|
3860
|
-
* always has a `reason`, and `"removed"` has neither. The flat form permitted
|
|
3861
|
-
* impossible states — a `"skipped"` with no reason, or a `"removed"` carrying
|
|
3862
|
-
* `reason: "kind-is-live"` — and narrowing on `status` still left both fields
|
|
3863
|
-
* optional at the use site.
|
|
3864
|
-
*/
|
|
3865
|
-
type MaterializeRemovalsEntry = Readonly<{
|
|
3866
|
-
kind: string;
|
|
3867
|
-
entity: KindEntity;
|
|
3868
|
-
status: "removed";
|
|
3869
|
-
}> | Readonly<{
|
|
3870
|
-
kind: string;
|
|
3871
|
-
entity: KindEntity;
|
|
3872
|
-
status: "failed";
|
|
3873
|
-
error: Error;
|
|
3874
|
-
}> | Readonly<{
|
|
3875
|
-
kind: string;
|
|
3876
|
-
entity: KindEntity;
|
|
3877
|
-
status: "skipped";
|
|
3878
|
-
/**
|
|
3879
|
-
* `"kind-is-live"`: the active schema declares this kind again — it was
|
|
3880
|
-
* dropped, then re-added — so deleting its rows would destroy live
|
|
3881
|
-
* data. The queue row stays pending, so a later removal of the same
|
|
3882
|
-
* kind still reclaims it.
|
|
3883
|
-
*
|
|
3884
|
-
* Reported rather than silent: an empty `results` array would otherwise
|
|
3885
|
-
* be indistinguishable from "nothing was pending", leaving the queue at
|
|
3886
|
-
* a non-zero depth with nothing explaining why.
|
|
3887
|
-
*/
|
|
3888
|
-
reason: "kind-is-live";
|
|
3889
|
-
}>;
|
|
3890
|
-
/**
|
|
3891
|
-
* Outcome of reclaiming one per-`(graphId, kind, field)` vector table that
|
|
3892
|
-
* was orphaned when its embedding field was dropped from a *surviving*
|
|
3893
|
-
* kind's schema. Distinct from {@link MaterializeRemovalsEntry} (whole
|
|
3894
|
-
* kinds) because the unit is a single embedding field, not a kind.
|
|
3895
|
-
*/
|
|
3896
|
-
type ReclaimedVectorFieldEntry = Readonly<{
|
|
3897
|
-
kind: string;
|
|
3898
|
-
fieldPath: string;
|
|
3899
|
-
status: "reclaimed" | "failed";
|
|
3900
|
-
error?: Error;
|
|
3901
|
-
}>;
|
|
3902
|
-
type MaterializeRemovalsResult = Readonly<{
|
|
3903
|
-
results: readonly MaterializeRemovalsEntry[];
|
|
3904
|
-
/**
|
|
3905
|
-
* Embedding fields removed from a *surviving* kind whose per-field vector
|
|
3906
|
-
* table this pass dropped (or confirmed already absent). Empty when the
|
|
3907
|
-
* backend has no vector strategy or no embedding field has ever been
|
|
3908
|
-
* dropped. Re-derived from immutable schema history each call, so it lists
|
|
3909
|
-
* the same removed fields on repeat passes — the underlying drop is
|
|
3910
|
-
* idempotent (`DROP ... IF EXISTS`). See {@link reclaimRemovedVectorFieldTables}.
|
|
3911
|
-
*/
|
|
3912
|
-
reclaimedVectorFields: readonly ReclaimedVectorFieldEntry[];
|
|
3913
|
-
}>;
|
|
3914
|
-
|
|
3915
|
-
/**
|
|
3916
|
-
* Subgraph Extraction
|
|
3917
|
-
*
|
|
3918
|
-
* Extracts a typed subgraph from a root node by traversing a set of edge kinds.
|
|
3919
|
-
* Uses a recursive CTE for BFS traversal with cycle detection, then hydrates
|
|
3920
|
-
* the reachable nodes and connecting edges in two parallel queries.
|
|
3921
|
-
*/
|
|
3922
|
-
|
|
3923
|
-
/**
|
|
3924
|
-
* Discriminated union of all Node runtime types in a graph.
|
|
3925
|
-
*
|
|
3926
|
-
* Unlike `AllNodeTypes<G>` which gives the union of *type definitions*,
|
|
3927
|
-
* `AnyNode<G>` gives the union of *runtime node instances*.
|
|
3928
|
-
*/
|
|
3929
|
-
type AnyNode<G extends GraphDef> = {
|
|
3930
|
-
[K in NodeKinds<G>]: Node<G["nodes"][K]["type"]>;
|
|
3931
|
-
}[NodeKinds<G>];
|
|
3932
|
-
/**
|
|
3933
|
-
* Discriminated union of all Edge runtime types in a graph.
|
|
3934
|
-
*/
|
|
3935
|
-
type AnyEdge<G extends GraphDef> = {
|
|
3936
|
-
[K in EdgeKinds<G>]: Edge<G["edges"][K]["type"]>;
|
|
3937
|
-
}[EdgeKinds<G>];
|
|
3938
|
-
/**
|
|
3939
|
-
* Discriminated union of Node runtime types narrowed to a subset of kinds.
|
|
3940
|
-
*/
|
|
3941
|
-
type SubsetNode<G extends GraphDef, K extends NodeKinds<G>> = {
|
|
3942
|
-
[Kind in K]: Node<G["nodes"][Kind]["type"]>;
|
|
3943
|
-
}[K];
|
|
3944
|
-
/**
|
|
3945
|
-
* Discriminated union of Edge runtime types narrowed to a subset of kinds.
|
|
3946
|
-
*/
|
|
3947
|
-
type SubsetEdge<G extends GraphDef, K extends EdgeKinds<G>> = {
|
|
3948
|
-
[Kind in K]: Edge<G["edges"][Kind]["type"]>;
|
|
3949
|
-
}[K];
|
|
3950
|
-
type EmptyShape = Readonly<Record<never, never>>;
|
|
3951
|
-
type NodeProjectionPropertyKey<N extends NodeType> = Exclude<keyof Node<N>, "id" | "kind" | "meta"> & string;
|
|
3952
|
-
type EdgeProjectionPropertyKey<E extends AnyEdgeType> = Exclude<keyof Edge<E>, "id" | "kind" | "fromKind" | "fromId" | "toKind" | "toId" | "meta"> & string;
|
|
3953
|
-
type SubgraphNodeProjectionField<N extends NodeType = NodeType> = NodeProjectionPropertyKey<N> | "meta";
|
|
3954
|
-
type SubgraphEdgeProjectionField<E extends AnyEdgeType = AnyEdgeType> = EdgeProjectionPropertyKey<E> | "meta";
|
|
3955
|
-
type SubgraphNodeProjectionMap<G extends GraphDef, NK extends NodeKinds<G> = NodeKinds<G>> = Readonly<{
|
|
3956
|
-
[K in NodeKinds<G>]?: K extends NK ? readonly SubgraphNodeProjectionField<G["nodes"][K]["type"]>[] : never;
|
|
3957
|
-
}>;
|
|
3958
|
-
type SubgraphEdgeProjectionMap<G extends GraphDef, EK extends EdgeKinds<G> = EdgeKinds<G>> = Readonly<{
|
|
3959
|
-
[K in EdgeKinds<G>]?: K extends EK ? readonly SubgraphEdgeProjectionField<G["edges"][K]["type"]>[] : never;
|
|
3960
|
-
}>;
|
|
3961
|
-
type SubgraphProject<G extends GraphDef, NK extends NodeKinds<G> = NodeKinds<G>, EK extends EdgeKinds<G> = EdgeKinds<G>> = Readonly<{
|
|
3962
|
-
/**
|
|
3963
|
-
* Node fields to keep per kind.
|
|
3964
|
-
*
|
|
3965
|
-
* Projected nodes always retain `kind` and `id`.
|
|
3966
|
-
* Use `"meta"` to include the full metadata object; omit it to exclude metadata entirely.
|
|
3967
|
-
* Only kinds present in `includeKinds` (or all node kinds when omitted) are valid keys.
|
|
3968
|
-
*/
|
|
3969
|
-
nodes?: SubgraphNodeProjectionMap<G, NK>;
|
|
3970
|
-
/**
|
|
3971
|
-
* Edge fields to keep per kind.
|
|
3972
|
-
*
|
|
3973
|
-
* Projected edges always retain `id`, `kind`, `fromKind`, `fromId`,
|
|
3974
|
-
* `toKind`, and `toId`.
|
|
3975
|
-
* Use `"meta"` to include the full metadata object; omit it to exclude metadata entirely.
|
|
3976
|
-
* Only edge kinds listed in `edges` are valid keys.
|
|
3940
|
+
* Projected edges always retain `id`, `kind`, `fromKind`, `fromId`,
|
|
3941
|
+
* `toKind`, and `toId`.
|
|
3942
|
+
* Use `"meta"` to include the full metadata object; omit it to exclude metadata entirely.
|
|
3943
|
+
* Only edge kinds listed in `edges` are valid keys.
|
|
3977
3944
|
*/
|
|
3978
3945
|
edges?: SubgraphEdgeProjectionMap<G, EK>;
|
|
3979
3946
|
}>;
|
|
@@ -4061,46 +4028,752 @@ type InternalSubgraphOptions<G extends GraphDef, EK extends EdgeKinds<G>, NK ext
|
|
|
4061
4028
|
recordedAsOf?: RecordedInstant;
|
|
4062
4029
|
}>;
|
|
4063
4030
|
/**
|
|
4064
|
-
* Union of all node result types in a subgraph, respecting projection.
|
|
4031
|
+
* Union of all node result types in a subgraph, respecting projection.
|
|
4032
|
+
*/
|
|
4033
|
+
type SubgraphNodeResult<G extends GraphDef, NK extends NodeKinds<G> = NodeKinds<G>, P = undefined> = {
|
|
4034
|
+
[Kind in NK]: SubgraphNodeResultForKind<G, Kind, P>;
|
|
4035
|
+
}[NK];
|
|
4036
|
+
/**
|
|
4037
|
+
* Union of all edge result types in a subgraph, respecting projection.
|
|
4038
|
+
*/
|
|
4039
|
+
type SubgraphEdgeResult<G extends GraphDef, EK extends EdgeKinds<G> = EdgeKinds<G>, P = undefined> = {
|
|
4040
|
+
[Kind in EK]: SubgraphEdgeResultForKind<G, Kind, P>;
|
|
4041
|
+
}[EK];
|
|
4042
|
+
type SubgraphResult<G extends GraphDef, NK extends NodeKinds<G> = NodeKinds<G>, EK extends EdgeKinds<G> = EdgeKinds<G>, P extends SubgraphProject<G, NK, EK> | undefined = undefined> = Readonly<{
|
|
4043
|
+
/** The root node, or undefined if the root was not found or excluded. */
|
|
4044
|
+
root: SubgraphNodeResult<G, NK, P> | undefined;
|
|
4045
|
+
nodes: ReadonlyMap<string, SubgraphNodeResult<G, NK, P>>;
|
|
4046
|
+
/** Forward adjacency: fromId → edgeKind → edges to targets. */
|
|
4047
|
+
adjacency: ReadonlyMap<string, ReadonlyMap<EK, readonly SubgraphEdgeResult<G, EK, P>[]>>;
|
|
4048
|
+
/** Reverse adjacency: toId → edgeKind → edges from sources. */
|
|
4049
|
+
reverseAdjacency: ReadonlyMap<string, ReadonlyMap<EK, readonly SubgraphEdgeResult<G, EK, P>[]>>;
|
|
4050
|
+
}>;
|
|
4051
|
+
|
|
4052
|
+
declare const STORE_RUNTIME: unique symbol;
|
|
4053
|
+
/**
|
|
4054
|
+
* @internal Operations used by Store-owned views. The port is absent from the
|
|
4055
|
+
* public Store contract and non-enumerable at runtime. JavaScript reflection
|
|
4056
|
+
* can still discover symbol properties, so this is an unsupported internal
|
|
4057
|
+
* surface rather than a security boundary.
|
|
4058
|
+
*/
|
|
4059
|
+
type StoreRuntime<G extends GraphDef> = Readonly<{
|
|
4060
|
+
backend: GraphBackend;
|
|
4061
|
+
sealedQuery: (coordinate: ReadCoordinate) => InitialQueryBuilder<G, "sealed">;
|
|
4062
|
+
recordedNodeGetById: <N extends NodeType>(kind: string, id: NodeId<N>, coordinate: ReadCoordinate) => Promise<Node<N> | undefined>;
|
|
4063
|
+
recordedNodeGetByIds: <N extends NodeType>(kind: string, ids: readonly NodeId<N>[], coordinate: ReadCoordinate) => Promise<readonly (Node<N> | undefined)[]>;
|
|
4064
|
+
recordedNodeScan: <N extends NodeType>(kind: string, coordinate: ReadCoordinate, options?: RecordedScanOptions) => Promise<RecordedScanPage<Node<N>>>;
|
|
4065
|
+
recordedEdgeGetById: <E extends AnyEdgeType>(kind: string, id: EdgeId<E>, coordinate: ReadCoordinate) => Promise<Edge<E> | undefined>;
|
|
4066
|
+
recordedEdgeGetByIds: <E extends AnyEdgeType>(kind: string, ids: readonly EdgeId<E>[], coordinate: ReadCoordinate) => Promise<readonly (Edge<E> | undefined)[]>;
|
|
4067
|
+
recordedEdgeScan: <E extends AnyEdgeType>(kind: string, coordinate: ReadCoordinate, options?: RecordedScanOptions) => Promise<RecordedScanPage<Edge<E>>>;
|
|
4068
|
+
subgraphAtCoordinate: <const EK extends EdgeKinds<G>, const NK extends NodeKinds<G> = NodeKinds<G>, const P extends SubgraphProject<G, NK, EK> | undefined = undefined>(rootId: NodeId<AllNodeTypes<G>>, options: InternalSubgraphOptions<G, EK, NK, P>) => Promise<SubgraphResult<G, NK, EK, P>>;
|
|
4069
|
+
algorithmsAtCoordinate: (coordinate: ReadCoordinate) => InternalGraphAlgorithms<G>;
|
|
4070
|
+
identityAtCoordinate: (coordinate: ReadCoordinate) => IdentityReadFacade<G>;
|
|
4071
|
+
rebuildIdentityClosure: () => Promise<void>;
|
|
4072
|
+
validateIdentity: () => Promise<void>;
|
|
4073
|
+
/**
|
|
4074
|
+
* @internal Reads the graph's identity assertions in transfer shape, honoring
|
|
4075
|
+
* this store's SQL binding. Used by interchange export, base-version
|
|
4076
|
+
* fingerprinting, and merge staging/diff.
|
|
4077
|
+
*/
|
|
4078
|
+
readCurrentIdentityAssertions: (mode: "state" | "archival", options?: Readonly<{
|
|
4079
|
+
nodeKinds?: readonly string[];
|
|
4080
|
+
includeDeleted?: boolean;
|
|
4081
|
+
}>) => Promise<readonly Readonly<{
|
|
4082
|
+
id: string;
|
|
4083
|
+
relation: "same" | "different";
|
|
4084
|
+
a: Readonly<{
|
|
4085
|
+
kind: string;
|
|
4086
|
+
id: string;
|
|
4087
|
+
}>;
|
|
4088
|
+
b: Readonly<{
|
|
4089
|
+
kind: string;
|
|
4090
|
+
id: string;
|
|
4091
|
+
}>;
|
|
4092
|
+
validFrom: string;
|
|
4093
|
+
validTo?: string | undefined;
|
|
4094
|
+
endedBy?: Readonly<{
|
|
4095
|
+
kind: string;
|
|
4096
|
+
id: string;
|
|
4097
|
+
}> | undefined;
|
|
4098
|
+
}>[]>;
|
|
4099
|
+
/**
|
|
4100
|
+
* Live nodes (registry kinds only) sharing any of the given bare ids —
|
|
4101
|
+
* the cross-kind peer set same-id folding would join. Used by graph-merge's
|
|
4102
|
+
* plan-time contradiction simulation to seed its node universe.
|
|
4103
|
+
*/
|
|
4104
|
+
liveNodesSharingIds: (ids: readonly string[], target?: GraphBackend | TransactionBackend) => Promise<readonly Readonly<{
|
|
4105
|
+
kind: string;
|
|
4106
|
+
id: string;
|
|
4107
|
+
}>[]>;
|
|
4108
|
+
/**
|
|
4109
|
+
* Every stored assertion row (ended rows included) for the given assertion
|
|
4110
|
+
* ids — the rows the import coordinator's id-conflict check compares
|
|
4111
|
+
* against. Used by graph-merge to validate the one-id-one-truth invariant
|
|
4112
|
+
* at plan time and inside the commit transaction.
|
|
4113
|
+
*/
|
|
4114
|
+
identityAssertionRowsByIds: (ids: readonly string[], target?: GraphBackend | TransactionBackend) => Promise<ReadonlyMap<string, Readonly<{
|
|
4115
|
+
id: string;
|
|
4116
|
+
relation: "same" | "different";
|
|
4117
|
+
a: Readonly<{
|
|
4118
|
+
kind: string;
|
|
4119
|
+
id: string;
|
|
4120
|
+
}>;
|
|
4121
|
+
b: Readonly<{
|
|
4122
|
+
kind: string;
|
|
4123
|
+
id: string;
|
|
4124
|
+
}>;
|
|
4125
|
+
validFrom: string;
|
|
4126
|
+
validTo?: string | undefined;
|
|
4127
|
+
endedBy?: Readonly<{
|
|
4128
|
+
kind: string;
|
|
4129
|
+
id: string;
|
|
4130
|
+
}> | undefined;
|
|
4131
|
+
}>>>;
|
|
4132
|
+
/**
|
|
4133
|
+
* The CURRENT structural identity class (materialized closure: folds plus
|
|
4134
|
+
* asserted links) of each reference, keyed by `refKey` — the
|
|
4135
|
+
* `JSON.stringify([kind, id])` serialization exported from
|
|
4136
|
+
* `identity/service`, which callers must use to probe the returned map. A
|
|
4137
|
+
* missing node coalesces to its singleton. Used by graph-merge's fold-peer
|
|
4138
|
+
* window guard to detect class-transitive drift in the plan→commit window.
|
|
4139
|
+
*/
|
|
4140
|
+
structuralIdentityClasses: (references: readonly Readonly<{
|
|
4141
|
+
kind: string;
|
|
4142
|
+
id: string;
|
|
4143
|
+
}>[], target?: GraphBackend | TransactionBackend) => Promise<ReadonlyMap<string, readonly Readonly<{
|
|
4144
|
+
kind: string;
|
|
4145
|
+
id: string;
|
|
4146
|
+
}>[]>>;
|
|
4147
|
+
identityAssertionsAtTarget: (target: GraphBackend | TransactionBackend, mode?: "state" | "archival") => Promise<readonly Readonly<{
|
|
4148
|
+
id: string;
|
|
4149
|
+
relation: "same" | "different";
|
|
4150
|
+
a: Readonly<{
|
|
4151
|
+
kind: string;
|
|
4152
|
+
id: string;
|
|
4153
|
+
}>;
|
|
4154
|
+
b: Readonly<{
|
|
4155
|
+
kind: string;
|
|
4156
|
+
id: string;
|
|
4157
|
+
}>;
|
|
4158
|
+
validFrom: string;
|
|
4159
|
+
validTo?: string | undefined;
|
|
4160
|
+
endedBy?: Readonly<{
|
|
4161
|
+
kind: string;
|
|
4162
|
+
id: string;
|
|
4163
|
+
}> | undefined;
|
|
4164
|
+
}>[]>;
|
|
4165
|
+
readIdentityAssertionPageAtTarget: (target: GraphBackend | TransactionBackend, mode: "state" | "archival", options: Readonly<{
|
|
4166
|
+
nodeKinds?: readonly string[];
|
|
4167
|
+
includeDeleted?: boolean;
|
|
4168
|
+
after?: string;
|
|
4169
|
+
limit: number;
|
|
4170
|
+
}>) => Promise<Readonly<{
|
|
4171
|
+
assertions: readonly Readonly<{
|
|
4172
|
+
id: string;
|
|
4173
|
+
relation: "same" | "different";
|
|
4174
|
+
a: Readonly<{
|
|
4175
|
+
kind: string;
|
|
4176
|
+
id: string;
|
|
4177
|
+
}>;
|
|
4178
|
+
b: Readonly<{
|
|
4179
|
+
kind: string;
|
|
4180
|
+
id: string;
|
|
4181
|
+
}>;
|
|
4182
|
+
validFrom: string;
|
|
4183
|
+
validTo?: string | undefined;
|
|
4184
|
+
endedBy?: Readonly<{
|
|
4185
|
+
kind: string;
|
|
4186
|
+
id: string;
|
|
4187
|
+
}> | undefined;
|
|
4188
|
+
}>[];
|
|
4189
|
+
nextAfter?: string;
|
|
4190
|
+
done: boolean;
|
|
4191
|
+
}>>;
|
|
4192
|
+
lockIdentityImportTarget: (target: GraphBackend | TransactionBackend) => Promise<void>;
|
|
4193
|
+
foldImportedIdentityNodes: (target: GraphBackend | TransactionBackend, references: readonly Readonly<{
|
|
4194
|
+
kind: string;
|
|
4195
|
+
id: string;
|
|
4196
|
+
}>[]) => Promise<void>;
|
|
4197
|
+
importIdentityAssertionsAtTarget: (target: GraphBackend | TransactionBackend, assertions: readonly Readonly<{
|
|
4198
|
+
id: string;
|
|
4199
|
+
relation: "same" | "different";
|
|
4200
|
+
a: Readonly<{
|
|
4201
|
+
kind: string;
|
|
4202
|
+
id: string;
|
|
4203
|
+
}>;
|
|
4204
|
+
b: Readonly<{
|
|
4205
|
+
kind: string;
|
|
4206
|
+
id: string;
|
|
4207
|
+
}>;
|
|
4208
|
+
validFrom: string;
|
|
4209
|
+
validTo?: string | undefined;
|
|
4210
|
+
endedBy?: Readonly<{
|
|
4211
|
+
kind: string;
|
|
4212
|
+
id: string;
|
|
4213
|
+
}> | undefined;
|
|
4214
|
+
}>[], mode: "state" | "archival") => Promise<Readonly<{
|
|
4215
|
+
created: number;
|
|
4216
|
+
skipped: number;
|
|
4217
|
+
}>>;
|
|
4218
|
+
applyIdentityMergeAtTarget: (target: GraphBackend | TransactionBackend, retractionIds: readonly string[], assertions: readonly Readonly<{
|
|
4219
|
+
id: string;
|
|
4220
|
+
relation: "same" | "different";
|
|
4221
|
+
a: Readonly<{
|
|
4222
|
+
kind: string;
|
|
4223
|
+
id: string;
|
|
4224
|
+
}>;
|
|
4225
|
+
b: Readonly<{
|
|
4226
|
+
kind: string;
|
|
4227
|
+
id: string;
|
|
4228
|
+
}>;
|
|
4229
|
+
validFrom: string;
|
|
4230
|
+
validTo?: string | undefined;
|
|
4231
|
+
endedBy?: Readonly<{
|
|
4232
|
+
kind: string;
|
|
4233
|
+
id: string;
|
|
4234
|
+
}> | undefined;
|
|
4235
|
+
}>[]) => Promise<Readonly<{
|
|
4236
|
+
created: number;
|
|
4237
|
+
retracted: number;
|
|
4238
|
+
}>>;
|
|
4239
|
+
/**
|
|
4240
|
+
* Proves the identity classes of `seeds` carry no contradiction in the state
|
|
4241
|
+
* the caller's transaction has just written — the post-write half of
|
|
4242
|
+
* graph-merge's identity correctness, scoped to the classes the merge
|
|
4243
|
+
* touched. A refusal aborts the caller's transaction; identity-disabled
|
|
4244
|
+
* graphs resolve immediately.
|
|
4245
|
+
*/
|
|
4246
|
+
assertIdentityClassesConsistentAtTarget: (target: GraphBackend | TransactionBackend, seeds: readonly Readonly<{
|
|
4247
|
+
kind: string;
|
|
4248
|
+
id: string;
|
|
4249
|
+
}>[]) => Promise<void>;
|
|
4250
|
+
}>;
|
|
4251
|
+
|
|
4252
|
+
type RebuildFulltextOptions = Readonly<{
|
|
4253
|
+
/** Page size. Must be a positive integer. Default: 500. */
|
|
4254
|
+
pageSize?: number;
|
|
4255
|
+
/**
|
|
4256
|
+
* Maximum number of skipped node IDs to include in the `skippedIds`
|
|
4257
|
+
* array. Default: 10,000. Set higher to collect the full list when
|
|
4258
|
+
* investigating systemic corruption; set lower when `processed` is
|
|
4259
|
+
* all you care about. The `skipped` total is always accurate.
|
|
4260
|
+
*/
|
|
4261
|
+
maxSkippedIds?: number;
|
|
4262
|
+
}>;
|
|
4263
|
+
type RebuildFulltextResult = Readonly<{
|
|
4264
|
+
/** Node kinds that were rebuilt (those with at least one searchable field). */
|
|
4265
|
+
kinds: readonly string[];
|
|
4266
|
+
/** Total nodes scanned. */
|
|
4267
|
+
processed: number;
|
|
4268
|
+
/** Fulltext upsert operations executed. */
|
|
4269
|
+
upserted: number;
|
|
4270
|
+
/** Fulltext delete operations executed (soft-deleted or all-empty nodes). */
|
|
4271
|
+
cleared: number;
|
|
4272
|
+
/**
|
|
4273
|
+
* Nodes skipped due to corrupt or non-object `props` (not counted in
|
|
4274
|
+
* upserted/cleared).
|
|
4275
|
+
*/
|
|
4276
|
+
skipped: number;
|
|
4277
|
+
/**
|
|
4278
|
+
* IDs of skipped nodes, capped at 10,000 entries so pathological
|
|
4279
|
+
* corruption doesn't turn rebuild into an OOM. See `skippedTruncated`
|
|
4280
|
+
* to tell whether the cap was hit. Empty when `skipped === 0`.
|
|
4281
|
+
*/
|
|
4282
|
+
skippedIds: readonly string[];
|
|
4283
|
+
/** True when `skipped > skippedIds.length` (the cap was reached). */
|
|
4284
|
+
skippedTruncated: boolean;
|
|
4285
|
+
}>;
|
|
4286
|
+
|
|
4287
|
+
/**
|
|
4288
|
+
* Store-level search helpers.
|
|
4289
|
+
*
|
|
4290
|
+
* `fulltextSearch` is a thin typed wrapper over `backend.fulltextSearch`.
|
|
4291
|
+
* `hybridSearch` runs a vector and a fulltext query in parallel and
|
|
4292
|
+
* fuses the two ranked lists with Reciprocal Rank Fusion. RRF is
|
|
4293
|
+
* rank-based, so it papers over score-scale differences between
|
|
4294
|
+
* pgvector/sqlite-vec (distance-derived) and tsvector/FTS5 (BM25-style).
|
|
4295
|
+
*/
|
|
4296
|
+
|
|
4297
|
+
/**
|
|
4298
|
+
* A fulltext search hit. `N` defaults to the generic `Node`; the
|
|
4299
|
+
* `store.search.fulltext<K>(kind)` facade narrows it to the concrete
|
|
4300
|
+
* typed node for that kind so callers get `hit.node.title` without a cast.
|
|
4301
|
+
*/
|
|
4302
|
+
type FulltextSearchHit<N = Node> = Readonly<{
|
|
4303
|
+
node: N;
|
|
4304
|
+
/** Backend-native relevance score; higher is better. */
|
|
4305
|
+
score: number;
|
|
4306
|
+
/** 1-based rank within the result set. */
|
|
4307
|
+
rank: number;
|
|
4308
|
+
/** Highlighted snippet (only present when `includeSnippets: true`). */
|
|
4309
|
+
snippet?: string;
|
|
4310
|
+
}>;
|
|
4311
|
+
type VectorSearchHit<N = Node> = Readonly<{
|
|
4312
|
+
node: N;
|
|
4313
|
+
score: number;
|
|
4314
|
+
rank: number;
|
|
4315
|
+
}>;
|
|
4316
|
+
/**
|
|
4317
|
+
* A hybrid search hit. Both sub-results (`vector`, `fulltext`) carry the
|
|
4318
|
+
* same narrowed node type as the top-level `node` for ergonomic access.
|
|
4319
|
+
*/
|
|
4320
|
+
type HybridSearchHit<N = Node> = Readonly<{
|
|
4321
|
+
node: N;
|
|
4322
|
+
/** Fused RRF score (higher is better). */
|
|
4323
|
+
score: number;
|
|
4324
|
+
/** 1-based rank in the fused list. */
|
|
4325
|
+
rank: number;
|
|
4326
|
+
/** Sub-result from the vector half, if it ranked this node. */
|
|
4327
|
+
vector?: VectorSearchHit<N>;
|
|
4328
|
+
/** Sub-result from the fulltext half, if it ranked this node. */
|
|
4329
|
+
fulltext?: FulltextSearchHit<N>;
|
|
4330
|
+
}>;
|
|
4331
|
+
/**
|
|
4332
|
+
* Scope options shared by every facade search leg.
|
|
4333
|
+
*
|
|
4334
|
+
* `where` and `includeSubClasses` compile into the search statement's
|
|
4335
|
+
* candidate set (a subquery produced by the store's own query compiler), so
|
|
4336
|
+
* filtering happens INSIDE the engine's top-k — never by post-filtering a
|
|
4337
|
+
* ranked list. `offset` is rank-relative pagination: the engine fetches
|
|
4338
|
+
* `limit + offset` ranked candidates and discards the leading page.
|
|
4339
|
+
*/
|
|
4340
|
+
type SearchScopeOptions<N extends NodeType = NodeType> = Readonly<{
|
|
4341
|
+
/**
|
|
4342
|
+
* Predicate over the node's properties, compiled by the shared query
|
|
4343
|
+
* compiler into the candidate subquery. Requires a query-capable store.
|
|
4344
|
+
* The facade instantiates `N` to the searched kind's node type, so the
|
|
4345
|
+
* accessor is fully typed at the call site; the base instantiation
|
|
4346
|
+
* exposes the system accessors (`id`, `kind`) for standalone option
|
|
4347
|
+
* values.
|
|
4348
|
+
*/
|
|
4349
|
+
where?: (accessor: NodeAccessor<N>) => Predicate;
|
|
4350
|
+
/** Rows to skip after ranking (rank-relative pagination). */
|
|
4351
|
+
offset?: number;
|
|
4352
|
+
/**
|
|
4353
|
+
* Expand the searched kind to include its `subClassOf` descendants.
|
|
4354
|
+
* Vector legs search each declaring kind's storage and merge by score;
|
|
4355
|
+
* kinds that don't declare the embedding field are skipped (mirroring
|
|
4356
|
+
* the query builder). Requires a query-capable store.
|
|
4357
|
+
*/
|
|
4358
|
+
includeSubClasses?: boolean;
|
|
4359
|
+
}>;
|
|
4360
|
+
type FulltextSearchOptions<N extends NodeType = NodeType> = SearchScopeOptions<N> & Readonly<{
|
|
4361
|
+
/** The user-supplied query string. */
|
|
4362
|
+
query: string;
|
|
4363
|
+
/** Max results. Required. */
|
|
4364
|
+
limit: number;
|
|
4365
|
+
/** Query parser mode. Default: "websearch". */
|
|
4366
|
+
mode?: FulltextQueryMode;
|
|
4367
|
+
/**
|
|
4368
|
+
* Language override for query parsing. Default: the kind's
|
|
4369
|
+
* declared language (the same config rows were indexed with),
|
|
4370
|
+
* which keeps the parsed tsquery a plan-time constant on
|
|
4371
|
+
* PostgreSQL so the GIN index can serve the match.
|
|
4372
|
+
*/
|
|
4373
|
+
language?: string;
|
|
4374
|
+
/** Minimum relevance score to include in results. */
|
|
4375
|
+
minScore?: number;
|
|
4376
|
+
/** Return a highlighted snippet alongside each hit. */
|
|
4377
|
+
includeSnippets?: boolean;
|
|
4378
|
+
}>;
|
|
4379
|
+
type HybridVectorOptions = Readonly<{
|
|
4380
|
+
/** Field path of the embedding column on the node kind. */
|
|
4381
|
+
fieldPath: string;
|
|
4382
|
+
/** Query embedding to compare against. */
|
|
4383
|
+
queryEmbedding: readonly number[];
|
|
4384
|
+
/** Distance metric. Default: "cosine". */
|
|
4385
|
+
metric?: VectorMetric;
|
|
4386
|
+
/** How many candidates to retrieve from the vector side. Default: 4 * limit. */
|
|
4387
|
+
k?: number;
|
|
4388
|
+
/** Minimum similarity to include (units depend on metric). */
|
|
4389
|
+
minScore?: number;
|
|
4390
|
+
/**
|
|
4391
|
+
* HNSW search frontier for this query (pgvector `hnsw.ef_search`).
|
|
4392
|
+
* The vector side over-fetches `k` (default `4 * limit`) candidates;
|
|
4393
|
+
* `efSearch` must be `>= k` for the index to surface that many
|
|
4394
|
+
* neighbors, and ~2–4× `k` is the high-recall target. PostgreSQL
|
|
4395
|
+
* requires an HNSW index and a transaction-capable driver, refusing the
|
|
4396
|
+
* option with a typed error otherwise. Engines with no frontier knob at
|
|
4397
|
+
* all (sqlite-vec, libSQL DiskANN) refuse it too, rather than searching
|
|
4398
|
+
* as if it had not been passed. See `VectorSearchOptions.efSearch`.
|
|
4399
|
+
*/
|
|
4400
|
+
efSearch?: number;
|
|
4401
|
+
}>;
|
|
4402
|
+
/**
|
|
4403
|
+
* Options for the standalone `store.search.vector` path. Mirrors the
|
|
4404
|
+
* vector half of `HybridSearchOptions` but flattens it because the
|
|
4405
|
+
* standalone path doesn't fuse against fulltext.
|
|
4406
|
+
*/
|
|
4407
|
+
type VectorSearchOptions<N extends NodeType = NodeType> = SearchScopeOptions<N> & Readonly<{
|
|
4408
|
+
/** Field path of the embedding column on the node kind. */
|
|
4409
|
+
fieldPath: string;
|
|
4410
|
+
/** Query embedding to compare against. */
|
|
4411
|
+
queryEmbedding: readonly number[];
|
|
4412
|
+
/** Max results. Required. */
|
|
4413
|
+
limit: number;
|
|
4414
|
+
/** Distance metric. Default: "cosine". */
|
|
4415
|
+
metric?: VectorMetric;
|
|
4416
|
+
/** Minimum similarity to include (units depend on metric). */
|
|
4417
|
+
minScore?: number;
|
|
4418
|
+
/**
|
|
4419
|
+
* HNSW search frontier for this query (pgvector `hnsw.ef_search`).
|
|
4420
|
+
* Sizes the dynamic candidate list the index scan maintains — higher
|
|
4421
|
+
* trades latency for recall. The floor for the index to surface
|
|
4422
|
+
* `limit` neighbors is `efSearch >= limit`; ~2–4× is the high-recall
|
|
4423
|
+
* target on million-scale corpora. Lets a latency-sensitive
|
|
4424
|
+
* interactive path and a recall-sensitive batch path share one
|
|
4425
|
+
* connection pool, tuning per query rather than per session.
|
|
4426
|
+
*
|
|
4427
|
+
* PostgreSQL HNSW only: applied transaction-locally via `SET LOCAL`.
|
|
4428
|
+
* Everywhere else the option is REFUSED with a typed error naming the
|
|
4429
|
+
* state, never silently ignored — a non-HNSW slot or a driver that
|
|
4430
|
+
* cannot hold a transaction (for example `drizzle-orm/neon-http`) on
|
|
4431
|
+
* PostgreSQL, and any SQLite backend, since neither sqlite-vec's vec0
|
|
4432
|
+
* KNN nor libSQL's `vector_top_k` has a per-search frontier to set.
|
|
4433
|
+
* `backend.capabilities.vector.searchFrontierTuning` states which you
|
|
4434
|
+
* have. Must be a positive integer; pgvector caps it at 1000.
|
|
4435
|
+
*/
|
|
4436
|
+
efSearch?: number;
|
|
4437
|
+
}>;
|
|
4438
|
+
type HybridFulltextOptions = Readonly<{
|
|
4439
|
+
query: string;
|
|
4440
|
+
/** How many candidates to retrieve from the fulltext side. Default: 4 * limit. */
|
|
4441
|
+
k?: number;
|
|
4442
|
+
mode?: FulltextQueryMode;
|
|
4443
|
+
language?: string;
|
|
4444
|
+
minScore?: number;
|
|
4445
|
+
includeSnippets?: boolean;
|
|
4446
|
+
}>;
|
|
4447
|
+
type HybridSearchOptions<N extends NodeType = NodeType> = SearchScopeOptions<N> & Readonly<{
|
|
4448
|
+
vector: HybridVectorOptions;
|
|
4449
|
+
fulltext: HybridFulltextOptions;
|
|
4450
|
+
fusion?: HybridFusionOptions;
|
|
4451
|
+
/** Final number of fused results to return. Required. */
|
|
4452
|
+
limit: number;
|
|
4453
|
+
}>;
|
|
4454
|
+
|
|
4455
|
+
/**
|
|
4456
|
+
* StoreSearch — store.search facade.
|
|
4457
|
+
*
|
|
4458
|
+
* Groups fulltext, vector, hybrid, and maintenance operations under one
|
|
4459
|
+
* namespace so the top-level Store API stays focused on CRUD + graph
|
|
4460
|
+
* traversal. The methods delegate to their respective execution
|
|
4461
|
+
* modules; this class exists to shape the surface and to gate kind
|
|
4462
|
+
* names through the registry — the kind argument is `string` so
|
|
4463
|
+
* graph-extension kinds (added via `store.evolve()`) work without a
|
|
4464
|
+
* type cast, with a runtime guard rejecting misspellings at the call
|
|
4465
|
+
* site.
|
|
4466
|
+
*/
|
|
4467
|
+
|
|
4468
|
+
/**
|
|
4469
|
+
* Resolves the hit's `node` type. Compile-time kinds keep their
|
|
4470
|
+
* narrowed `Node<N>`; kinds outside `G` (added via graph extension through
|
|
4471
|
+
* `store.evolve()`, or string variables the type system can't see)
|
|
4472
|
+
* widen to the base `Node` so callers don't need a cast.
|
|
4473
|
+
*
|
|
4474
|
+
* This is the same shape as `getNodeCollection` — the dynamic form
|
|
4475
|
+
* works for any registered kind, and the type narrows when (and only
|
|
4476
|
+
* when) the literal is statically known.
|
|
4477
|
+
*/
|
|
4478
|
+
type ResolveNode<G extends GraphDef, K extends string> = K extends NodeKinds<G> ? G["nodes"][K] extends NodeRegistration<infer N extends NodeType> ? Node<N> : Node : Node;
|
|
4479
|
+
/**
|
|
4480
|
+
* The registered `NodeType` behind a kind literal — the accessor-level
|
|
4481
|
+
* companion of {@link ResolveNode}, used to type `where` predicates.
|
|
4482
|
+
* Falls back to the base `NodeType` for dynamic (string) kinds.
|
|
4483
|
+
*/
|
|
4484
|
+
type ResolveNodeType<G extends GraphDef, K extends string> = K extends NodeKinds<G> ? G["nodes"][K] extends NodeRegistration<infer N extends NodeType> ? N : NodeType : NodeType;
|
|
4485
|
+
type StoreSearchContext = Readonly<{
|
|
4486
|
+
graphId: string;
|
|
4487
|
+
backend: GraphBackend;
|
|
4488
|
+
registry: KindRegistry;
|
|
4489
|
+
createQuery?: () => QueryBuilder<GraphDef>;
|
|
4490
|
+
}>;
|
|
4491
|
+
/**
|
|
4492
|
+
* Search-related operations exposed via `store.search`.
|
|
4493
|
+
*
|
|
4494
|
+
* @example
|
|
4495
|
+
* ```typescript
|
|
4496
|
+
* // Fulltext only
|
|
4497
|
+
* const hits = await store.search.fulltext("Document", {
|
|
4498
|
+
* query: "climate change",
|
|
4499
|
+
* limit: 10,
|
|
4500
|
+
* includeSnippets: true,
|
|
4501
|
+
* });
|
|
4502
|
+
*
|
|
4503
|
+
* // Vector only — for extension kinds with embedding() modifiers,
|
|
4504
|
+
* // the auto-derived index serves this query.
|
|
4505
|
+
* const nearest = await store.search.vector("Document", {
|
|
4506
|
+
* fieldPath: "embedding",
|
|
4507
|
+
* queryEmbedding: vec,
|
|
4508
|
+
* limit: 10,
|
|
4509
|
+
* });
|
|
4510
|
+
*
|
|
4511
|
+
* // Hybrid: vector + fulltext, fused with RRF
|
|
4512
|
+
* const ranked = await store.search.hybrid("Document", {
|
|
4513
|
+
* limit: 10,
|
|
4514
|
+
* vector: { fieldPath: "embedding", queryEmbedding: vec },
|
|
4515
|
+
* fulltext: { query: "climate change" },
|
|
4516
|
+
* });
|
|
4517
|
+
*
|
|
4518
|
+
* // Rebuild after backfill / schema change
|
|
4519
|
+
* const stats = await store.search.rebuildFulltext();
|
|
4520
|
+
* ```
|
|
4521
|
+
*
|
|
4522
|
+
* Extension kinds added via `store.evolve(...)` work with all four
|
|
4523
|
+
* methods without a type cast — the kind argument is `string` and a
|
|
4524
|
+
* registry check rejects misspellings at the call site.
|
|
4525
|
+
*/
|
|
4526
|
+
declare class StoreSearch<G extends GraphDef> {
|
|
4527
|
+
#private;
|
|
4528
|
+
constructor(context: StoreSearchContext);
|
|
4529
|
+
/**
|
|
4530
|
+
* Runs a fulltext search against nodes of the given kind.
|
|
4531
|
+
*
|
|
4532
|
+
* Requires fields on the node schema declared with `searchable()`.
|
|
4533
|
+
* The search hits the backend's fulltext index (tsvector + GIN on
|
|
4534
|
+
* Postgres, FTS5 on SQLite — or whatever strategy the backend is
|
|
4535
|
+
* configured with) and resolves the matching node IDs back to typed
|
|
4536
|
+
* `Node` objects.
|
|
4537
|
+
*/
|
|
4538
|
+
fulltext<K extends string>(nodeKind: K, options: FulltextSearchOptions<ResolveNodeType<G, K>>): Promise<readonly FulltextSearchHit<ResolveNode<G, K>>[]>;
|
|
4539
|
+
/**
|
|
4540
|
+
* Runs a vector similarity search against nodes of the given kind.
|
|
4541
|
+
*
|
|
4542
|
+
* Requires a field on the node schema declared with `embedding()`,
|
|
4543
|
+
* either at compile time or via a graph extension (the auto-derived
|
|
4544
|
+
* `VectorIndexDeclaration` flows through `materializeIndexes()` on
|
|
4545
|
+
* the same path either way).
|
|
4546
|
+
*
|
|
4547
|
+
* Pure vector — no fulltext leg, no fusion. For combined
|
|
4548
|
+
* vector+fulltext ranking, use `hybrid`.
|
|
4549
|
+
*/
|
|
4550
|
+
vector<K extends string>(nodeKind: K, options: VectorSearchOptions<ResolveNodeType<G, K>>): Promise<readonly VectorSearchHit<ResolveNode<G, K>>[]>;
|
|
4551
|
+
/**
|
|
4552
|
+
* Runs a vector + fulltext hybrid search and fuses the results with
|
|
4553
|
+
* Reciprocal Rank Fusion.
|
|
4554
|
+
*
|
|
4555
|
+
* RRF is rank-based, so it composes well across heterogeneous score
|
|
4556
|
+
* scales (cosine similarity vs ts_rank_cd vs FTS5 BM25). Default
|
|
4557
|
+
* over-fetch is 4× `limit` from each source — tune via `vector.k` /
|
|
4558
|
+
* `fulltext.k` for higher-recall corpora.
|
|
4559
|
+
*/
|
|
4560
|
+
hybrid<K extends string>(nodeKind: K, options: HybridSearchOptions<ResolveNodeType<G, K>>): Promise<readonly HybridSearchHit<ResolveNode<G, K>>[]>;
|
|
4561
|
+
/**
|
|
4562
|
+
* Rebuilds the fulltext index from existing node data.
|
|
4563
|
+
*
|
|
4564
|
+
* Use when:
|
|
4565
|
+
* - A node kind gained a `searchable()` field after data was already
|
|
4566
|
+
* written and existing rows were never indexed.
|
|
4567
|
+
* - The fulltext table was dropped / truncated.
|
|
4568
|
+
* - `language` was changed on a `searchable()` field.
|
|
4569
|
+
*
|
|
4570
|
+
* Iterates nodes with keyset pagination (stable under shared
|
|
4571
|
+
* timestamps and light concurrent writes), transacts per page, skips
|
|
4572
|
+
* kinds with no searchable fields, and cleans up stale rows for
|
|
4573
|
+
* soft-deleted nodes. Corrupt or non-object `props` are counted in
|
|
4574
|
+
* `skipped` with their node IDs surfaced via `skippedIds` so operators
|
|
4575
|
+
* can investigate. Concurrent hard-deletes between page fetches can
|
|
4576
|
+
* be missed by a single pass — run during a maintenance window for
|
|
4577
|
+
* full consistency.
|
|
4578
|
+
*/
|
|
4579
|
+
rebuildFulltext<K extends string>(nodeKind?: K, options?: RebuildFulltextOptions): Promise<RebuildFulltextResult>;
|
|
4580
|
+
}
|
|
4581
|
+
|
|
4582
|
+
/**
|
|
4583
|
+
* StoreView — a read-only `(mode, asOf)` lens over a {@link Store}.
|
|
4584
|
+
*
|
|
4585
|
+
* A `StoreView` pins a temporal coordinate and routes every supported
|
|
4586
|
+
* read through it, mirroring Datomic's `(d/as-of db t)` database value
|
|
4587
|
+
* and SQL:2011 `FOR SYSTEM_TIME AS OF`. It is *read-only by
|
|
4588
|
+
* construction*: mutating "the graph as of last Tuesday" is incoherent,
|
|
4589
|
+
* so writes stay on the live `Store`.
|
|
4590
|
+
*
|
|
4591
|
+
* The view is an explicit read context, not a single default flip — the
|
|
4592
|
+
* temporal seam is not uniform across surfaces (the query builder
|
|
4593
|
+
* hardcodes `"current"`, `subgraph` reads `graph.defaults` directly,
|
|
4594
|
+
* collections apply a per-call default). The view therefore injects its
|
|
4595
|
+
* pinned {@link ReadCoordinate} into each surface it hands out through one
|
|
4596
|
+
* helper ({@link withCoordinate}), so a future temporal axis (recorded
|
|
4597
|
+
* time) lands on every surface at once instead of splitting by surface.
|
|
4598
|
+
*
|
|
4599
|
+
* Built on the public `Store` surface (plus one internal sealed-query
|
|
4600
|
+
* seam), so it composes the same reads `branch()` / `merge()` consume.
|
|
4601
|
+
*/
|
|
4602
|
+
|
|
4603
|
+
/**
|
|
4604
|
+
* The temporal coordinate a {@link StoreView} pins. A discriminated union on
|
|
4605
|
+
* `mode`: `asOf` is *required* for `"asOf"` and *rejected* (`never`) for every
|
|
4606
|
+
* other mode, so the type mirrors the runtime contract. `view({ mode: "asOf" })`
|
|
4607
|
+
* (missing timestamp) and `view({ mode: "current", asOf })` (pinning an instant
|
|
4608
|
+
* outside `"asOf"`) are both compile errors, not merely runtime
|
|
4609
|
+
* `ValidationError`s.
|
|
4610
|
+
*/
|
|
4611
|
+
type StoreViewCoordinate = Readonly<{
|
|
4612
|
+
mode: "asOf";
|
|
4613
|
+
asOf: string;
|
|
4614
|
+
}> | Readonly<{
|
|
4615
|
+
mode: Exclude<TemporalMode, "asOf">;
|
|
4616
|
+
asOf?: never;
|
|
4617
|
+
}>;
|
|
4618
|
+
/**
|
|
4619
|
+
* {@link Store.subgraph} options with the temporal axis removed — the
|
|
4620
|
+
* view's pinned coordinate supplies it.
|
|
4621
|
+
*/
|
|
4622
|
+
type StoreViewSubgraphOptions<G extends GraphDef, EK extends EdgeKinds<G>, NK extends NodeKinds<G>, P extends SubgraphProject<G, NK, EK> | undefined = undefined> = Omit<SubgraphOptions<G, EK, NK, P>, "temporalMode" | "asOf" | "recordedAsOf">;
|
|
4623
|
+
/** `reachable` options with the temporal axis removed (the pin supplies it). */
|
|
4624
|
+
type StoreViewReachableOptions<G extends GraphDef> = Omit<ReachableOptions<G>, keyof TemporalAlgorithmOptions>;
|
|
4625
|
+
/** `shortestPath` options with the temporal axis removed (the pin supplies it). */
|
|
4626
|
+
type StoreViewShortestPathOptions<G extends GraphDef> = Omit<ShortestPathOptions<G>, keyof TemporalAlgorithmOptions>;
|
|
4627
|
+
/**
|
|
4628
|
+
* `weightedShortestPath` options with the temporal axis removed (the pin
|
|
4629
|
+
* supplies it).
|
|
4630
|
+
*/
|
|
4631
|
+
type StoreViewWeightedShortestPathOptions<G extends GraphDef> = Omit<WeightedShortestPathOptions<G>, keyof TemporalAlgorithmOptions>;
|
|
4632
|
+
/** `canReach` options with the temporal axis removed (the pin supplies it). */
|
|
4633
|
+
type StoreViewCanReachOptions<G extends GraphDef> = Omit<BaseTraversalOptions<G>, keyof TemporalAlgorithmOptions>;
|
|
4634
|
+
/** `neighbors` options with the temporal axis removed (the pin supplies it). */
|
|
4635
|
+
type StoreViewNeighborsOptions<G extends GraphDef> = Omit<NeighborsOptions<G>, keyof TemporalAlgorithmOptions>;
|
|
4636
|
+
/** `degree` options with the temporal axis removed (the pin supplies it). */
|
|
4637
|
+
type StoreViewDegreeOptions<G extends GraphDef> = Omit<DegreeOptions<G>, keyof TemporalAlgorithmOptions>;
|
|
4638
|
+
/** WCC options with the temporal axis removed (the view's pin supplies it). */
|
|
4639
|
+
type StoreViewWeaklyConnectedComponentsOptions<G extends GraphDef> = Omit<WeaklyConnectedComponentsOptions<G>, keyof TemporalAlgorithmOptions>;
|
|
4640
|
+
/** Label-propagation options pinned to the view's temporal coordinate. */
|
|
4641
|
+
type StoreViewLabelPropagationOptions<G extends GraphDef> = Omit<LabelPropagationOptions<G>, keyof TemporalAlgorithmOptions>;
|
|
4642
|
+
/** PageRank options with the temporal axis removed (the view supplies it). */
|
|
4643
|
+
type StoreViewPageRankOptions<G extends GraphDef> = Omit<PageRankOptions<G>, keyof TemporalAlgorithmOptions>;
|
|
4644
|
+
/** Personalized PageRank options pinned to the view's temporal coordinate. */
|
|
4645
|
+
type StoreViewPersonalizedPageRankOptions<G extends GraphDef> = Omit<PersonalizedPageRankOptions<G>, keyof TemporalAlgorithmOptions>;
|
|
4646
|
+
/** Graph-algorithm facade sealed to a {@link StoreView}'s coordinate. */
|
|
4647
|
+
type StoreViewGraphAlgorithms<G extends GraphDef> = Readonly<{
|
|
4648
|
+
shortestPath: (from: NodeIdentifier, to: NodeIdentifier, options: StoreViewShortestPathOptions<G>) => Promise<ShortestPathResult | undefined>;
|
|
4649
|
+
weightedShortestPath: (from: NodeIdentifier, to: NodeIdentifier, options: StoreViewWeightedShortestPathOptions<G>) => Promise<WeightedShortestPathResult | undefined>;
|
|
4650
|
+
reachable: (from: NodeIdentifier, options: StoreViewReachableOptions<G>) => Promise<readonly ReachableNode[]>;
|
|
4651
|
+
canReach: (from: NodeIdentifier, to: NodeIdentifier, options: StoreViewCanReachOptions<G>) => Promise<boolean>;
|
|
4652
|
+
neighbors: (node: NodeIdentifier, options: StoreViewNeighborsOptions<G>) => Promise<readonly ReachableNode[]>;
|
|
4653
|
+
degree: (node: NodeIdentifier, options?: StoreViewDegreeOptions<G>) => Promise<number>;
|
|
4654
|
+
labelPropagation: (options: StoreViewLabelPropagationOptions<G>) => Promise<readonly LabelPropagationMembership[]>;
|
|
4655
|
+
weaklyConnectedComponents: (options: StoreViewWeaklyConnectedComponentsOptions<G>) => Promise<readonly WeaklyConnectedComponentMembership[]>;
|
|
4656
|
+
pageRank: (options: StoreViewPageRankOptions<G>) => Promise<readonly PageRankScore[]>;
|
|
4657
|
+
personalizedPageRank: (options: StoreViewPersonalizedPageRankOptions<G>) => Promise<readonly PageRankScore[]>;
|
|
4658
|
+
}>;
|
|
4659
|
+
/**
|
|
4660
|
+
* Shared base for the read-only views. Holds the pinned {@link ReadCoordinate}
|
|
4661
|
+
* and delegates the graph algorithms, `subgraph`, and `query` to the live store
|
|
4662
|
+
* with that coordinate flattened into each call. {@link StoreView} (valid-time)
|
|
4663
|
+
* and {@link RecordedStoreView} (recorded-time) extend it; only the surfaces
|
|
4664
|
+
* that genuinely differ — collections, search, and the coordinate-changing
|
|
4665
|
+
* helpers — live on the subclasses.
|
|
4666
|
+
*/
|
|
4667
|
+
declare abstract class CoordinatePinnedView<G extends GraphDef> {
|
|
4668
|
+
#private;
|
|
4669
|
+
protected readonly store: Store<G>;
|
|
4670
|
+
protected readonly coordinate: ReadCoordinate;
|
|
4671
|
+
constructor(store: Store<G>, coordinate: ReadCoordinate);
|
|
4672
|
+
/** The temporal mode this view reads in. */
|
|
4673
|
+
get mode(): TemporalMode;
|
|
4674
|
+
/** The pinned valid-time `asOf` timestamp, or `undefined` for other modes. */
|
|
4675
|
+
get asOf(): string | undefined;
|
|
4676
|
+
/**
|
|
4677
|
+
* A query builder pinned to this view's coordinate. The temporal axis is
|
|
4678
|
+
* sealed: calling `.temporal(...)` on the returned builder throws, so the
|
|
4679
|
+
* view's coordinate cannot be overridden on a per-query basis.
|
|
4680
|
+
*/
|
|
4681
|
+
query(): InitialQueryBuilder<G, "sealed">;
|
|
4682
|
+
protected internalAlgorithms(): InternalGraphAlgorithms<G>;
|
|
4683
|
+
/** Graph algorithms pinned to this view's immutable temporal coordinate. */
|
|
4684
|
+
get algorithms(): StoreViewGraphAlgorithms<G>;
|
|
4685
|
+
/** Extracts a subgraph at this view's pinned coordinate. */
|
|
4686
|
+
subgraph<const EK extends EdgeKinds<G>, const NK extends NodeKinds<G> = NodeKinds<G>, const P extends SubgraphProject<G, NK, EK> | undefined = undefined>(rootId: NodeId<AllNodeTypes<G>>, options: StoreViewSubgraphOptions<G, EK, NK, P>): Promise<SubgraphResult<G, NK, EK, P>>;
|
|
4687
|
+
/** Shortest path between two nodes at this view's pinned coordinate. */
|
|
4688
|
+
shortestPath(from: NodeIdentifier, to: NodeIdentifier, options: StoreViewShortestPathOptions<G>): Promise<ShortestPathResult | undefined>;
|
|
4689
|
+
/** Minimum-total-weight path at this view's pinned coordinate. */
|
|
4690
|
+
weightedShortestPath(from: NodeIdentifier, to: NodeIdentifier, options: StoreViewWeightedShortestPathOptions<G>): Promise<WeightedShortestPathResult | undefined>;
|
|
4691
|
+
/** Nodes reachable from `from` at this view's pinned coordinate. */
|
|
4692
|
+
reachable(from: NodeIdentifier, options: StoreViewReachableOptions<G>): Promise<readonly ReachableNode[]>;
|
|
4693
|
+
/** Whether `to` is reachable from `from` at this view's pinned coordinate. */
|
|
4694
|
+
canReach(from: NodeIdentifier, to: NodeIdentifier, options: StoreViewCanReachOptions<G>): Promise<boolean>;
|
|
4695
|
+
/** The k-hop neighborhood of `node` at this view's pinned coordinate. */
|
|
4696
|
+
neighbors(node: NodeIdentifier, options: StoreViewNeighborsOptions<G>): Promise<readonly ReachableNode[]>;
|
|
4697
|
+
/** Counts active edges incident to `node` at this view's pinned coordinate. */
|
|
4698
|
+
degree(node: NodeIdentifier, options?: StoreViewDegreeOptions<G>): Promise<number>;
|
|
4699
|
+
/** Deterministic label-propagation memberships at this view's coordinate. */
|
|
4700
|
+
labelPropagation(options: StoreViewLabelPropagationOptions<G>): Promise<readonly LabelPropagationMembership[]>;
|
|
4701
|
+
/** Exact WCC memberships at this view's pinned coordinate. */
|
|
4702
|
+
weaklyConnectedComponents(options: StoreViewWeaklyConnectedComponentsOptions<G>): Promise<readonly WeaklyConnectedComponentMembership[]>;
|
|
4703
|
+
/** Global PageRank scores at this view's pinned coordinate. */
|
|
4704
|
+
pageRank(options: StoreViewPageRankOptions<G>): Promise<readonly PageRankScore[]>;
|
|
4705
|
+
/** Personalized PageRank scores at this view's pinned coordinate. */
|
|
4706
|
+
personalizedPageRank(options: StoreViewPersonalizedPageRankOptions<G>): Promise<readonly PageRankScore[]>;
|
|
4707
|
+
}
|
|
4708
|
+
/** The runtime half of {@link StoreView}; see that alias for the contract. */
|
|
4709
|
+
declare class StoreViewImplementation<G extends GraphDef> extends CoordinatePinnedView<G> {
|
|
4710
|
+
#private;
|
|
4711
|
+
constructor(store: Store<G>, coordinate: StoreViewCoordinate | ReadCoordinate);
|
|
4712
|
+
/** Adds a recorded-time pin, returning the narrow reconstructing view. */
|
|
4713
|
+
asOfRecorded(recordedAsOf: RecordedInstant): RecordedStoreView<G>;
|
|
4714
|
+
/** Read-only node collections pinned to this view's coordinate. */
|
|
4715
|
+
get nodes(): StoreViewNodeCollections<G>;
|
|
4716
|
+
/** Read-only edge collections pinned to this view's coordinate. */
|
|
4717
|
+
get edges(): StoreViewEdgeCollections<G>;
|
|
4718
|
+
/** Heterogeneous multi-kind edge read pinned to this view's coordinate. */
|
|
4719
|
+
bulkFindEdgesFrom<const K extends EdgeKinds<G>>(params: BulkFindEdgesFromParams<G, K>, options?: Omit<EdgeBulkFindEndpointOptions, "temporalMode" | "asOf">): Promise<readonly BulkFindEdgesFromResult<G, K>[]>;
|
|
4720
|
+
/**
|
|
4721
|
+
* Read-only search facade. On a `current` view the read methods
|
|
4722
|
+
* (`fulltext` / `vector` / `hybrid`) delegate to the live `store.search`,
|
|
4723
|
+
* while the mutating `rebuildFulltext` is refused — the view is read-only.
|
|
4724
|
+
* On any non-`current` pin every search method refuses: the fulltext /
|
|
4725
|
+
* vector index reflects current state only, so historical relevance is
|
|
4726
|
+
* out of scope.
|
|
4727
|
+
*/
|
|
4728
|
+
get search(): StoreSearch<G>;
|
|
4729
|
+
}
|
|
4730
|
+
/**
|
|
4731
|
+
* A read-only `(mode, asOf)` lens over a {@link Store}. Construct one via
|
|
4732
|
+
* {@link Store.asOf} (valid-time) or {@link Store.view} (any public
|
|
4733
|
+
* mode), never directly.
|
|
4734
|
+
*
|
|
4735
|
+
* Carries `identity` — pinned identity reads — only when the graph declared
|
|
4736
|
+
* `identity: { ... }`. That conditional presence is why this is a type alias
|
|
4737
|
+
* over an implementation class plus {@link ViewIdentityAccess} rather than a
|
|
4738
|
+
* class declaration, which would put the member on every graph's view.
|
|
4739
|
+
* `instanceof StoreView` still works.
|
|
4740
|
+
*
|
|
4741
|
+
* @example
|
|
4742
|
+
* ```typescript
|
|
4743
|
+
* const past = store.asOf("2026-01-01T00:00:00.000Z");
|
|
4744
|
+
* const alice = await past.nodes.Person.getById(aliceId);
|
|
4745
|
+
* const jobs = await past.edges.worksAt.findFrom(alice!);
|
|
4746
|
+
* const reach = await past.reachable(alice!, { edges: ["knows"] });
|
|
4747
|
+
* ```
|
|
4065
4748
|
*/
|
|
4066
|
-
type
|
|
4067
|
-
|
|
4068
|
-
}[NK];
|
|
4749
|
+
type StoreView<G extends GraphDef> = StoreViewImplementation<G> & ViewIdentityAccess<G>;
|
|
4750
|
+
declare const StoreView: new <G extends GraphDef>(store: Store<G>, coordinate: StoreViewCoordinate | ReadCoordinate) => StoreView<G>;
|
|
4069
4751
|
/**
|
|
4070
|
-
*
|
|
4752
|
+
* The runtime half of {@link RecordedStoreView}; see that alias for the
|
|
4753
|
+
* contract.
|
|
4071
4754
|
*/
|
|
4072
|
-
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
nodes:
|
|
4079
|
-
/**
|
|
4080
|
-
|
|
4081
|
-
|
|
4082
|
-
reverseAdjacency: ReadonlyMap<string, ReadonlyMap<EK, readonly SubgraphEdgeResult<G, EK, P>[]>>;
|
|
4083
|
-
}>;
|
|
4084
|
-
|
|
4085
|
-
declare const STORE_RUNTIME: unique symbol;
|
|
4755
|
+
declare class RecordedStoreViewImplementation<G extends GraphDef> extends CoordinatePinnedView<G> {
|
|
4756
|
+
#private;
|
|
4757
|
+
constructor(store: Store<G>, coordinate: ReadCoordinate);
|
|
4758
|
+
/** The recorded/system-time anchor this view reconstructs. */
|
|
4759
|
+
get asOfRecorded(): RecordedInstant;
|
|
4760
|
+
/** Recorded-time node reconstructing-read collections. */
|
|
4761
|
+
get nodes(): RecordedStoreViewNodeCollections<G>;
|
|
4762
|
+
/** Recorded-time edge reconstructing-read collections. */
|
|
4763
|
+
get edges(): RecordedStoreViewEdgeCollections<G>;
|
|
4764
|
+
}
|
|
4086
4765
|
/**
|
|
4087
|
-
*
|
|
4088
|
-
*
|
|
4089
|
-
*
|
|
4090
|
-
*
|
|
4766
|
+
* A narrow recorded-time read lens. It preserves the valid-time coordinate
|
|
4767
|
+
* carried by the source view and adds a recorded/system-time pin. Collection
|
|
4768
|
+
* reads expose point reconstruction and bounded scans; broad collection
|
|
4769
|
+
* predicates, endpoint reads, search, and further coordinate changes are absent
|
|
4770
|
+
* from the typed surface and refused by the runtime proxies for JS callers.
|
|
4771
|
+
*
|
|
4772
|
+
* Like {@link StoreView}, an alias over an implementation class so `identity`
|
|
4773
|
+
* is present only for identity-enabled graphs.
|
|
4091
4774
|
*/
|
|
4092
|
-
type
|
|
4093
|
-
|
|
4094
|
-
sealedQuery: (coordinate: ReadCoordinate) => InitialQueryBuilder<G, "sealed">;
|
|
4095
|
-
recordedNodeGetById: <N extends NodeType>(kind: string, id: NodeId<N>, coordinate: ReadCoordinate) => Promise<Node<N> | undefined>;
|
|
4096
|
-
recordedNodeGetByIds: <N extends NodeType>(kind: string, ids: readonly NodeId<N>[], coordinate: ReadCoordinate) => Promise<readonly (Node<N> | undefined)[]>;
|
|
4097
|
-
recordedNodeScan: <N extends NodeType>(kind: string, coordinate: ReadCoordinate, options?: RecordedScanOptions) => Promise<RecordedScanPage<Node<N>>>;
|
|
4098
|
-
recordedEdgeGetById: <E extends AnyEdgeType>(kind: string, id: EdgeId<E>, coordinate: ReadCoordinate) => Promise<Edge<E> | undefined>;
|
|
4099
|
-
recordedEdgeGetByIds: <E extends AnyEdgeType>(kind: string, ids: readonly EdgeId<E>[], coordinate: ReadCoordinate) => Promise<readonly (Edge<E> | undefined)[]>;
|
|
4100
|
-
recordedEdgeScan: <E extends AnyEdgeType>(kind: string, coordinate: ReadCoordinate, options?: RecordedScanOptions) => Promise<RecordedScanPage<Edge<E>>>;
|
|
4101
|
-
subgraphAtCoordinate: <const EK extends EdgeKinds<G>, const NK extends NodeKinds<G> = NodeKinds<G>, const P extends SubgraphProject<G, NK, EK> | undefined = undefined>(rootId: NodeId<AllNodeTypes<G>>, options: InternalSubgraphOptions<G, EK, NK, P>) => Promise<SubgraphResult<G, NK, EK, P>>;
|
|
4102
|
-
algorithmsAtCoordinate: (coordinate: ReadCoordinate) => InternalGraphAlgorithms<G>;
|
|
4103
|
-
}>;
|
|
4775
|
+
type RecordedStoreView<G extends GraphDef> = RecordedStoreViewImplementation<G> & ViewIdentityAccess<G>;
|
|
4776
|
+
declare const RecordedStoreView: new <G extends GraphDef>(store: Store<G>, coordinate: ReadCoordinate) => RecordedStoreView<G>;
|
|
4104
4777
|
|
|
4105
4778
|
/**
|
|
4106
4779
|
* Main Store implementation for TypeGraph.
|
|
@@ -4172,6 +4845,31 @@ type ReembedVectorFieldResult = Readonly<{
|
|
|
4172
4845
|
/** Number of nodes whose embedding was re-written (0 without `embed`). */
|
|
4173
4846
|
reembedded: number;
|
|
4174
4847
|
}>;
|
|
4848
|
+
/** Options for {@link Store.rebuildContribution}. */
|
|
4849
|
+
type RebuildContributionOptions = Readonly<{
|
|
4850
|
+
/**
|
|
4851
|
+
* Page size for the content reconstruction pass. Default 500.
|
|
4852
|
+
*
|
|
4853
|
+
* Every page runs inside the rebuild's single transaction, so this
|
|
4854
|
+
* trades statement count against per-statement size rather than
|
|
4855
|
+
* bounding how long the transaction is held — that is set by the graph.
|
|
4856
|
+
*/
|
|
4857
|
+
pageSize?: number;
|
|
4858
|
+
}>;
|
|
4859
|
+
/**
|
|
4860
|
+
* The identity surface a store carries, present only when the graph declared
|
|
4861
|
+
* `identity: { ... }`. Conditional *presence* (not a `never`-typed property) is
|
|
4862
|
+
* the encoding used everywhere identity is exposed — `tx.identity` and the
|
|
4863
|
+
* read-only views included — so an identity-disabled graph simply has no
|
|
4864
|
+
* `identity` member to reach for.
|
|
4865
|
+
*/
|
|
4866
|
+
type StoreIdentityAccess<G extends GraphDef> = G["identity"] extends GraphIdentityConfig ? Readonly<{
|
|
4867
|
+
identity: IdentityFacade<G>;
|
|
4868
|
+
}> : Readonly<Record<never, never>>;
|
|
4869
|
+
/** The same conditional presence for the read-only pinned views. */
|
|
4870
|
+
type ViewIdentityAccess<G extends GraphDef> = G["identity"] extends GraphIdentityConfig ? Readonly<{
|
|
4871
|
+
identity: IdentityReadFacade<G>;
|
|
4872
|
+
}> : Readonly<Record<never, never>>;
|
|
4175
4873
|
type StoreCore<G extends GraphDef> = Readonly<{
|
|
4176
4874
|
[STORE_RUNTIME]: StoreRuntime<G>;
|
|
4177
4875
|
graph: G;
|
|
@@ -4201,7 +4899,7 @@ type StoreCore<G extends GraphDef> = Readonly<{
|
|
|
4201
4899
|
asOf: (asOf: string) => StoreView<G>;
|
|
4202
4900
|
asOfRecorded: (recordedAsOf: RecordedInstant) => RecordedStoreView<G>;
|
|
4203
4901
|
recordedNow: () => Promise<RecordedInstant | undefined>;
|
|
4204
|
-
revisionNow: () => Promise<
|
|
4902
|
+
revisionNow: () => Promise<RecordedInstant | undefined>;
|
|
4205
4903
|
revisionOriginNow: () => Promise<string>;
|
|
4206
4904
|
view: (coordinate: StoreViewCoordinate) => StoreView<G>;
|
|
4207
4905
|
snapshot: () => StoreView<G>;
|
|
@@ -4219,9 +4917,11 @@ type StoreCore<G extends GraphDef> = Readonly<{
|
|
|
4219
4917
|
reembedVectorField: (kind: string, fieldPath: string, options?: ReembedVectorFieldOptions) => Promise<ReembedVectorFieldResult>;
|
|
4220
4918
|
verifyContributions: () => Promise<readonly ContributionDiagnostic[]>;
|
|
4221
4919
|
repairContributions: () => Promise<ContributionRepairResult>;
|
|
4920
|
+
probeContributions: () => Promise<ContributionProbeResult>;
|
|
4921
|
+
rebuildContribution: (scope: ContributionRebuildScope, options?: RebuildContributionOptions) => Promise<ContributionRebuildResult>;
|
|
4222
4922
|
materializeRemovals: (options?: MaterializeRemovalsOptions) => Promise<MaterializeRemovalsResult>;
|
|
4223
4923
|
close: () => Promise<void>;
|
|
4224
|
-
}>;
|
|
4924
|
+
}> & StoreIdentityAccess<G>;
|
|
4225
4925
|
type StoreTransactions<G extends GraphDef> = Readonly<{
|
|
4226
4926
|
transaction: <T>(fn: (tx: TransactionContext<G>) => Promise<T>, options?: TransactionOptions) => Promise<T>;
|
|
4227
4927
|
transactionWithReceipt: <T>(fn: (tx: MeasurableTransactionContext<G>) => Promise<T>, options?: TransactionOptions) => Promise<TransactionOutcome<T>>;
|
|
@@ -4517,182 +5217,4 @@ declare function createVerifiedAdapterStore<G extends GraphDef, TNativeTransacti
|
|
|
4517
5217
|
SchemaValidationResult
|
|
4518
5218
|
]>;
|
|
4519
5219
|
|
|
4520
|
-
|
|
4521
|
-
* StoreView — a read-only `(mode, asOf)` lens over a {@link Store}.
|
|
4522
|
-
*
|
|
4523
|
-
* A `StoreView` pins a temporal coordinate and routes every supported
|
|
4524
|
-
* read through it, mirroring Datomic's `(d/as-of db t)` database value
|
|
4525
|
-
* and SQL:2011 `FOR SYSTEM_TIME AS OF`. It is *read-only by
|
|
4526
|
-
* construction*: mutating "the graph as of last Tuesday" is incoherent,
|
|
4527
|
-
* so writes stay on the live `Store`.
|
|
4528
|
-
*
|
|
4529
|
-
* The view is an explicit read context, not a single default flip — the
|
|
4530
|
-
* temporal seam is not uniform across surfaces (the query builder
|
|
4531
|
-
* hardcodes `"current"`, `subgraph` reads `graph.defaults` directly,
|
|
4532
|
-
* collections apply a per-call default). The view therefore injects its
|
|
4533
|
-
* pinned {@link ReadCoordinate} into each surface it hands out through one
|
|
4534
|
-
* helper ({@link withCoordinate}), so a future temporal axis (recorded
|
|
4535
|
-
* time) lands on every surface at once instead of splitting by surface.
|
|
4536
|
-
*
|
|
4537
|
-
* Built on the public `Store` surface (plus one internal sealed-query
|
|
4538
|
-
* seam), so it composes the same reads `branch()` / `merge()` consume.
|
|
4539
|
-
*/
|
|
4540
|
-
|
|
4541
|
-
/**
|
|
4542
|
-
* The temporal coordinate a {@link StoreView} pins. A discriminated union on
|
|
4543
|
-
* `mode`: `asOf` is *required* for `"asOf"` and *rejected* (`never`) for every
|
|
4544
|
-
* other mode, so the type mirrors the runtime contract. `view({ mode: "asOf" })`
|
|
4545
|
-
* (missing timestamp) and `view({ mode: "current", asOf })` (pinning an instant
|
|
4546
|
-
* outside `"asOf"`) are both compile errors, not merely runtime
|
|
4547
|
-
* `ValidationError`s.
|
|
4548
|
-
*/
|
|
4549
|
-
type StoreViewCoordinate = Readonly<{
|
|
4550
|
-
mode: "asOf";
|
|
4551
|
-
asOf: string;
|
|
4552
|
-
}> | Readonly<{
|
|
4553
|
-
mode: Exclude<TemporalMode, "asOf">;
|
|
4554
|
-
asOf?: never;
|
|
4555
|
-
}>;
|
|
4556
|
-
/**
|
|
4557
|
-
* {@link Store.subgraph} options with the temporal axis removed — the
|
|
4558
|
-
* view's pinned coordinate supplies it.
|
|
4559
|
-
*/
|
|
4560
|
-
type StoreViewSubgraphOptions<G extends GraphDef, EK extends EdgeKinds<G>, NK extends NodeKinds<G>, P extends SubgraphProject<G, NK, EK> | undefined = undefined> = Omit<SubgraphOptions<G, EK, NK, P>, "temporalMode" | "asOf" | "recordedAsOf">;
|
|
4561
|
-
/** `reachable` options with the temporal axis removed (the pin supplies it). */
|
|
4562
|
-
type StoreViewReachableOptions<G extends GraphDef> = Omit<ReachableOptions<G>, keyof TemporalAlgorithmOptions>;
|
|
4563
|
-
/** `shortestPath` options with the temporal axis removed (the pin supplies it). */
|
|
4564
|
-
type StoreViewShortestPathOptions<G extends GraphDef> = Omit<ShortestPathOptions<G>, keyof TemporalAlgorithmOptions>;
|
|
4565
|
-
/**
|
|
4566
|
-
* `weightedShortestPath` options with the temporal axis removed (the pin
|
|
4567
|
-
* supplies it).
|
|
4568
|
-
*/
|
|
4569
|
-
type StoreViewWeightedShortestPathOptions<G extends GraphDef> = Omit<WeightedShortestPathOptions<G>, keyof TemporalAlgorithmOptions>;
|
|
4570
|
-
/** `canReach` options with the temporal axis removed (the pin supplies it). */
|
|
4571
|
-
type StoreViewCanReachOptions<G extends GraphDef> = Omit<BaseTraversalOptions<G>, keyof TemporalAlgorithmOptions>;
|
|
4572
|
-
/** `neighbors` options with the temporal axis removed (the pin supplies it). */
|
|
4573
|
-
type StoreViewNeighborsOptions<G extends GraphDef> = Omit<NeighborsOptions<G>, keyof TemporalAlgorithmOptions>;
|
|
4574
|
-
/** `degree` options with the temporal axis removed (the pin supplies it). */
|
|
4575
|
-
type StoreViewDegreeOptions<G extends GraphDef> = Omit<DegreeOptions<G>, keyof TemporalAlgorithmOptions>;
|
|
4576
|
-
/** WCC options with the temporal axis removed (the view's pin supplies it). */
|
|
4577
|
-
type StoreViewWeaklyConnectedComponentsOptions<G extends GraphDef> = Omit<WeaklyConnectedComponentsOptions<G>, keyof TemporalAlgorithmOptions>;
|
|
4578
|
-
/** Label-propagation options pinned to the view's temporal coordinate. */
|
|
4579
|
-
type StoreViewLabelPropagationOptions<G extends GraphDef> = Omit<LabelPropagationOptions<G>, keyof TemporalAlgorithmOptions>;
|
|
4580
|
-
/** PageRank options with the temporal axis removed (the view supplies it). */
|
|
4581
|
-
type StoreViewPageRankOptions<G extends GraphDef> = Omit<PageRankOptions<G>, keyof TemporalAlgorithmOptions>;
|
|
4582
|
-
/** Personalized PageRank options pinned to the view's temporal coordinate. */
|
|
4583
|
-
type StoreViewPersonalizedPageRankOptions<G extends GraphDef> = Omit<PersonalizedPageRankOptions<G>, keyof TemporalAlgorithmOptions>;
|
|
4584
|
-
/** Graph-algorithm facade sealed to a {@link StoreView}'s coordinate. */
|
|
4585
|
-
type StoreViewGraphAlgorithms<G extends GraphDef> = Readonly<{
|
|
4586
|
-
shortestPath: (from: NodeIdentifier, to: NodeIdentifier, options: StoreViewShortestPathOptions<G>) => Promise<ShortestPathResult | undefined>;
|
|
4587
|
-
weightedShortestPath: (from: NodeIdentifier, to: NodeIdentifier, options: StoreViewWeightedShortestPathOptions<G>) => Promise<WeightedShortestPathResult | undefined>;
|
|
4588
|
-
reachable: (from: NodeIdentifier, options: StoreViewReachableOptions<G>) => Promise<readonly ReachableNode[]>;
|
|
4589
|
-
canReach: (from: NodeIdentifier, to: NodeIdentifier, options: StoreViewCanReachOptions<G>) => Promise<boolean>;
|
|
4590
|
-
neighbors: (node: NodeIdentifier, options: StoreViewNeighborsOptions<G>) => Promise<readonly ReachableNode[]>;
|
|
4591
|
-
degree: (node: NodeIdentifier, options?: StoreViewDegreeOptions<G>) => Promise<number>;
|
|
4592
|
-
labelPropagation: (options: StoreViewLabelPropagationOptions<G>) => Promise<readonly LabelPropagationMembership[]>;
|
|
4593
|
-
weaklyConnectedComponents: (options: StoreViewWeaklyConnectedComponentsOptions<G>) => Promise<readonly WeaklyConnectedComponentMembership[]>;
|
|
4594
|
-
pageRank: (options: StoreViewPageRankOptions<G>) => Promise<readonly PageRankScore[]>;
|
|
4595
|
-
personalizedPageRank: (options: StoreViewPersonalizedPageRankOptions<G>) => Promise<readonly PageRankScore[]>;
|
|
4596
|
-
}>;
|
|
4597
|
-
/**
|
|
4598
|
-
* Shared base for the read-only views. Holds the pinned {@link ReadCoordinate}
|
|
4599
|
-
* and delegates the graph algorithms, `subgraph`, and `query` to the live store
|
|
4600
|
-
* with that coordinate flattened into each call. {@link StoreView} (valid-time)
|
|
4601
|
-
* and {@link RecordedStoreView} (recorded-time) extend it; only the surfaces
|
|
4602
|
-
* that genuinely differ — collections, search, and the coordinate-changing
|
|
4603
|
-
* helpers — live on the subclasses.
|
|
4604
|
-
*/
|
|
4605
|
-
declare abstract class CoordinatePinnedView<G extends GraphDef> {
|
|
4606
|
-
#private;
|
|
4607
|
-
protected readonly store: Store<G>;
|
|
4608
|
-
protected readonly coordinate: ReadCoordinate;
|
|
4609
|
-
constructor(store: Store<G>, coordinate: ReadCoordinate);
|
|
4610
|
-
/** The temporal mode this view reads in. */
|
|
4611
|
-
get mode(): TemporalMode;
|
|
4612
|
-
/** The pinned valid-time `asOf` timestamp, or `undefined` for other modes. */
|
|
4613
|
-
get asOf(): string | undefined;
|
|
4614
|
-
/**
|
|
4615
|
-
* A query builder pinned to this view's coordinate. The temporal axis is
|
|
4616
|
-
* sealed: calling `.temporal(...)` on the returned builder throws, so the
|
|
4617
|
-
* view's coordinate cannot be overridden on a per-query basis.
|
|
4618
|
-
*/
|
|
4619
|
-
query(): InitialQueryBuilder<G, "sealed">;
|
|
4620
|
-
protected internalAlgorithms(): InternalGraphAlgorithms<G>;
|
|
4621
|
-
/** Graph algorithms pinned to this view's immutable temporal coordinate. */
|
|
4622
|
-
get algorithms(): StoreViewGraphAlgorithms<G>;
|
|
4623
|
-
/** Extracts a subgraph at this view's pinned coordinate. */
|
|
4624
|
-
subgraph<const EK extends EdgeKinds<G>, const NK extends NodeKinds<G> = NodeKinds<G>, const P extends SubgraphProject<G, NK, EK> | undefined = undefined>(rootId: NodeId<AllNodeTypes<G>>, options: StoreViewSubgraphOptions<G, EK, NK, P>): Promise<SubgraphResult<G, NK, EK, P>>;
|
|
4625
|
-
/** Shortest path between two nodes at this view's pinned coordinate. */
|
|
4626
|
-
shortestPath(from: NodeIdentifier, to: NodeIdentifier, options: StoreViewShortestPathOptions<G>): Promise<ShortestPathResult | undefined>;
|
|
4627
|
-
/** Minimum-total-weight path at this view's pinned coordinate. */
|
|
4628
|
-
weightedShortestPath(from: NodeIdentifier, to: NodeIdentifier, options: StoreViewWeightedShortestPathOptions<G>): Promise<WeightedShortestPathResult | undefined>;
|
|
4629
|
-
/** Nodes reachable from `from` at this view's pinned coordinate. */
|
|
4630
|
-
reachable(from: NodeIdentifier, options: StoreViewReachableOptions<G>): Promise<readonly ReachableNode[]>;
|
|
4631
|
-
/** Whether `to` is reachable from `from` at this view's pinned coordinate. */
|
|
4632
|
-
canReach(from: NodeIdentifier, to: NodeIdentifier, options: StoreViewCanReachOptions<G>): Promise<boolean>;
|
|
4633
|
-
/** The k-hop neighborhood of `node` at this view's pinned coordinate. */
|
|
4634
|
-
neighbors(node: NodeIdentifier, options: StoreViewNeighborsOptions<G>): Promise<readonly ReachableNode[]>;
|
|
4635
|
-
/** Counts active edges incident to `node` at this view's pinned coordinate. */
|
|
4636
|
-
degree(node: NodeIdentifier, options?: StoreViewDegreeOptions<G>): Promise<number>;
|
|
4637
|
-
/** Deterministic label-propagation memberships at this view's coordinate. */
|
|
4638
|
-
labelPropagation(options: StoreViewLabelPropagationOptions<G>): Promise<readonly LabelPropagationMembership[]>;
|
|
4639
|
-
/** Exact WCC memberships at this view's pinned coordinate. */
|
|
4640
|
-
weaklyConnectedComponents(options: StoreViewWeaklyConnectedComponentsOptions<G>): Promise<readonly WeaklyConnectedComponentMembership[]>;
|
|
4641
|
-
/** Global PageRank scores at this view's pinned coordinate. */
|
|
4642
|
-
pageRank(options: StoreViewPageRankOptions<G>): Promise<readonly PageRankScore[]>;
|
|
4643
|
-
/** Personalized PageRank scores at this view's pinned coordinate. */
|
|
4644
|
-
personalizedPageRank(options: StoreViewPersonalizedPageRankOptions<G>): Promise<readonly PageRankScore[]>;
|
|
4645
|
-
}
|
|
4646
|
-
/**
|
|
4647
|
-
* A read-only `(mode, asOf)` lens over a {@link Store}. Construct one via
|
|
4648
|
-
* {@link Store.asOf} (valid-time) or {@link Store.view} (any public
|
|
4649
|
-
* mode), never directly.
|
|
4650
|
-
*
|
|
4651
|
-
* @example
|
|
4652
|
-
* ```typescript
|
|
4653
|
-
* const past = store.asOf("2026-01-01T00:00:00.000Z");
|
|
4654
|
-
* const alice = await past.nodes.Person.getById(aliceId);
|
|
4655
|
-
* const jobs = await past.edges.worksAt.findFrom(alice!);
|
|
4656
|
-
* const reach = await past.reachable(alice!, { edges: ["knows"] });
|
|
4657
|
-
* ```
|
|
4658
|
-
*/
|
|
4659
|
-
declare class StoreView<G extends GraphDef> extends CoordinatePinnedView<G> {
|
|
4660
|
-
#private;
|
|
4661
|
-
constructor(store: Store<G>, coordinate: StoreViewCoordinate | ReadCoordinate);
|
|
4662
|
-
/** Adds a recorded-time pin, returning the narrow reconstructing view. */
|
|
4663
|
-
asOfRecorded(recordedAsOf: RecordedInstant): RecordedStoreView<G>;
|
|
4664
|
-
/** Read-only node collections pinned to this view's coordinate. */
|
|
4665
|
-
get nodes(): StoreViewNodeCollections<G>;
|
|
4666
|
-
/** Read-only edge collections pinned to this view's coordinate. */
|
|
4667
|
-
get edges(): StoreViewEdgeCollections<G>;
|
|
4668
|
-
/** Heterogeneous multi-kind edge read pinned to this view's coordinate. */
|
|
4669
|
-
bulkFindEdgesFrom<const K extends EdgeKinds<G>>(params: BulkFindEdgesFromParams<G, K>, options?: Omit<EdgeBulkFindEndpointOptions, "temporalMode" | "asOf">): Promise<readonly BulkFindEdgesFromResult<G, K>[]>;
|
|
4670
|
-
/**
|
|
4671
|
-
* Read-only search facade. On a `current` view the read methods
|
|
4672
|
-
* (`fulltext` / `vector` / `hybrid`) delegate to the live `store.search`,
|
|
4673
|
-
* while the mutating `rebuildFulltext` is refused — the view is read-only.
|
|
4674
|
-
* On any non-`current` pin every search method refuses: the fulltext /
|
|
4675
|
-
* vector index reflects current state only, so historical relevance is
|
|
4676
|
-
* out of scope.
|
|
4677
|
-
*/
|
|
4678
|
-
get search(): StoreSearch<G>;
|
|
4679
|
-
}
|
|
4680
|
-
/**
|
|
4681
|
-
* A narrow recorded-time read lens. It preserves the valid-time coordinate
|
|
4682
|
-
* carried by the source view and adds a recorded/system-time pin. Collection
|
|
4683
|
-
* reads expose point reconstruction and bounded scans; broad collection
|
|
4684
|
-
* predicates, endpoint reads, search, and further coordinate changes are absent
|
|
4685
|
-
* from the typed surface and refused by the runtime proxies for JS callers.
|
|
4686
|
-
*/
|
|
4687
|
-
declare class RecordedStoreView<G extends GraphDef> extends CoordinatePinnedView<G> {
|
|
4688
|
-
#private;
|
|
4689
|
-
constructor(store: Store<G>, coordinate: ReadCoordinate);
|
|
4690
|
-
/** The recorded/system-time anchor this view reconstructs. */
|
|
4691
|
-
get asOfRecorded(): RecordedInstant;
|
|
4692
|
-
/** Recorded-time node reconstructing-read collections. */
|
|
4693
|
-
get nodes(): RecordedStoreViewNodeCollections<G>;
|
|
4694
|
-
/** Recorded-time edge reconstructing-read collections. */
|
|
4695
|
-
get edges(): RecordedStoreViewEdgeCollections<G>;
|
|
4696
|
-
}
|
|
4697
|
-
|
|
4698
|
-
export { type EdgeGetOrCreateByEndpointsResult as $, type AliasMap as A, type BaseStoreOptions as B, type ConstraintNames as C, type DegreeOptions as D, type EdgeAliasMap as E, type DynamicEdgeType as F, type DynamicFieldBuilder as G, type HistoryStoreOptions as H, type DynamicNodeAccessor as I, type DynamicNodeCollection as J, type DynamicNodeType as K, type LiveStoreOptions as L, type DynamicSelectableEdge as M, type DynamicSelectableNode as N, type Edge as O, type EdgeAccessor as P, type QueryCoordinateState as Q, type RecordedReadStoreOptions as R, type StoreOptions as S, TraversalBuilder as T, type UnboundLiveStoreOptions as U, type EdgeBatchReads as V, type EdgeBulkFindEndpointOptions as W, type EdgeBulkFindOptions as X, type EdgeCollection as Y, type EdgeFindByEndpointsOptions as Z, type EdgeGetOrCreateByEndpointsOptions as _, type Store as a, type RebuildFulltextOptions as a$, type EdgeIntrospection as a0, type EdgeTemporalReads as a1, type EdgeWrites as a2, type EmptyAliasMap as a3, type EmptyEdgeAliasMap as a4, ExecutableAggregateQuery as a5, ExecutableQuery as a6, type FieldAccessor as a7, type FulltextSearchHit as a8, type FulltextSearchOptions as a9, type NodeAccessor as aA, type NodeAlias as aB, type NodeBulkFindByIndexOptions as aC, type NodeCollection as aD, type NodeCurrentReads as aE, type NodeGetOrCreateByConstraintOptions as aF, type NodeGetOrCreateByConstraintResult as aG, type NodeIdentifier as aH, type NodeRef as aI, type NodeTemporalReads as aJ, type NodeWrites as aK, type OntologyIntrospection as aL, type OperationHookContext as aM, type PageRankOptions as aN, type PageRankScore as aO, type PaginateOptions as aP, type PaginatedResult as aQ, type PathNode as aR, type PersonalizedPageRankOptions as aS, type PersonalizedPageRankSeed as aT, type Predicate as aU, PreparedQuery as aV, type PropsAccessor as aW, type QueryHookContext as aX, type QueryOptions as aY, type ReachableNode as aZ, type ReachableOptions as a_, type GetOrCreateAction as aa, type GraphAlgorithms as ab, type GraphEdgeCollections as ac, type GraphEdgeForKinds as ad, type GraphNodeCollections as ae, type GraphNodeReference as af, type HistoryStoreBackend as ag, type HookContext as ah, type HybridFulltextOptions as ai, type HybridSearchHit as aj, type HybridSearchOptions as ak, type HybridVectorOptions as al, type IfExistsMode as am, type InitialQueryBuilder as an, type KindIntrospection as ao, type LabelPropagationMembership as ap, type LabelPropagationOptions as aq, type MaterializeRemovalsEntry as ar, type MaterializeRemovalsOptions as as, type MaterializeRemovalsResult as at, type MeasurableAdapterHistoryTransactionContext as au, type MeasurableAdapterTransactionContext as av, type MeasurableTransactionContext as aw, type NeighborsOptions as ax, type NoRecordedCoordinate as ay, type Node as az, type HistoryStore as b, type UpdateNodeInput as b$, type RebuildFulltextResult as b0, type ReclaimedVectorFieldEntry as b1, type ReconciledSchema as b2, type RecordedScanOptions as b3, type RecordedScanPage as b4, RecordedStoreView as b5, type RecordedStoreViewEdgeCollection as b6, type RecordedStoreViewEdgeCollections as b7, type RecordedStoreViewNodeCollection as b8, type RecordedStoreViewNodeCollections as b9, type StoreViewNodeCollection as bA, type StoreViewNodeCollections as bB, type StoreViewPageRankOptions as bC, type StoreViewPersonalizedPageRankOptions as bD, type StoreViewReachableOptions as bE, type StoreViewShortestPathOptions as bF, type StoreViewSubgraphOptions as bG, type StoreViewWeaklyConnectedComponentsOptions as bH, type StoreViewWeightedShortestPathOptions as bI, type StreamOptions as bJ, type SubgraphEdgeResult as bK, type SubgraphNodeResult as bL, type SubgraphOptions as bM, type SubgraphResult as bN, type SubsetEdge as bO, type SubsetNode as bP, type TemporalAlgorithmOptions as bQ, type TransactionContext as bR, type TransactionOutcome as bS, type TransactionReceipt as bT, type TraversalDirection as bU, type TypedEdgeCollection as bV, type TypedRecordedStoreViewEdgeCollection as bW, type TypedStoreViewEdgeCollection as bX, UnionableQuery as bY, type UniqueIntrospection as bZ, type UpdateEdgeInput as b_, type RecursiveTraversalOptions as ba, type ReembedFunction as bb, type ReembedVectorFieldOptions as bc, type ReembedVectorFieldResult as bd, type SchemaIntrospection as be, type ScopedMeasure as bf, type SearchScopeOptions as bg, type SelectContext as bh, type SelectableEdge as bi, type SelectableNode as bj, type ShortestPathOptions as bk, type ShortestPathResult as bl, type SqlAvailability as bm, type StoreHooks as bn, type StoreProjection as bo, type StoreRef as bp, StoreSearch as bq, StoreView as br, type StoreViewCanReachOptions as bs, type StoreViewCoordinate as bt, type StoreViewDegreeOptions as bu, type StoreViewEdgeCollection as bv, type StoreViewEdgeCollections as bw, type StoreViewGraphAlgorithms as bx, type StoreViewLabelPropagationOptions as by, type StoreViewNeighborsOptions as bz, type RecordedReadStore as c, type VectorSearchHit as c0, type VectorSearchOptions as c1, type WeaklyConnectedComponentMembership as c2, type WeaklyConnectedComponentsOptions as c3, type WeightedShortestPathOptions as c4, type WeightedShortestPathResult as c5, createAdapterStore as c6, createAdapterStoreWithSchema as c7, createQueryBuilder as c8, createStore as c9, createStoreWithSchema as ca, createVerifiedAdapterStore as cb, createVerifiedStore as cc, defineSubgraphProject as cd, exists as ce, fieldRef as cf, inSubquery as cg, isParameterRef as ch, notExists as ci, notInSubquery as cj, param as ck, type RecursiveAliasMap as d, QueryBuilder as e, type EmptyRecursiveAliasMap as f, type AdapterHistoryStore as g, type AdapterHistoryTransactionContext as h, type AdapterRecordedReadStore as i, type AdapterStore as j, type AdapterTransactionContext as k, type AggregateResult as l, type AlgorithmCyclePolicy as m, type AnyEdge as n, type AnyNode as o, type BaseTraversalOptions as p, type BatchResults as q, type BatchableQuery as r, type BulkEdgeSourceGroup as s, type BulkFindEdgesFromParams as t, type BulkFindEdgesFromResult as u, type BulkOperationHookContext as v, type CreateEdgeInput as w, type CreateNodeInput as x, type DynamicEdgeAccessor as y, type DynamicEdgeCollection as z };
|
|
5220
|
+
export { type DynamicNodeCollection as $, type AliasMap as A, type BaseStoreOptions as B, type BatchResults as C, type BatchableQuery as D, type EdgeAliasMap as E, type BulkEdgeSourceGroup as F, type BulkFindEdgesFromParams as G, type HistoryStoreOptions as H, type IdentityAssertion as I, type BulkFindEdgesFromResult as J, type BulkOperationHookContext as K, type LiveStoreOptions as L, type ConstraintNames as M, type Node as N, type CreateEdgeInput as O, type CreateNodeInput as P, type QueryCoordinateState as Q, type RecordedReadStoreOptions as R, type StoreOptions as S, TraversalBuilder as T, type UnboundLiveStoreOptions as U, type DegreeOptions as V, type DynamicEdgeAccessor as W, type DynamicEdgeCollection as X, type DynamicEdgeType as Y, type DynamicFieldBuilder as Z, type DynamicNodeAccessor as _, type Store as a, type PaginateOptions as a$, type DynamicNodeType as a0, type DynamicSelectableEdge as a1, type DynamicSelectableNode as a2, type Edge as a3, type EdgeAccessor as a4, type EdgeBatchReads as a5, type EdgeBulkFindEndpointOptions as a6, type EdgeBulkFindOptions as a7, type EdgeCollection as a8, type EdgeFindByEndpointsOptions as a9, type InitialQueryBuilder as aA, type KindIntrospection as aB, type LabelPropagationMembership as aC, type LabelPropagationOptions as aD, type MaterializeRemovalsEntry as aE, type MaterializeRemovalsOptions as aF, type MaterializeRemovalsResult as aG, type MeasurableAdapterHistoryTransactionContext as aH, type MeasurableAdapterTransactionContext as aI, type MeasurableTransactionContext as aJ, type NeighborsOptions as aK, type NoRecordedCoordinate as aL, type NodeAccessor as aM, type NodeAlias as aN, type NodeBulkFindByIndexOptions as aO, type NodeCollection as aP, type NodeCurrentReads as aQ, type NodeGetOrCreateByConstraintOptions as aR, type NodeGetOrCreateByConstraintResult as aS, type NodeIdentifier as aT, type NodeRef as aU, type NodeTemporalReads as aV, type NodeWrites as aW, type OntologyIntrospection as aX, type OperationHookContext as aY, type PageRankOptions as aZ, type PageRankScore as a_, type EdgeGetOrCreateByEndpointsOptions as aa, type EdgeGetOrCreateByEndpointsResult as ab, type EdgeIntrospection as ac, type EdgeTemporalReads as ad, type EdgeWrites as ae, type EmptyAliasMap as af, type EmptyEdgeAliasMap as ag, ExecutableAggregateQuery as ah, ExecutableQuery as ai, type FieldAccessor as aj, type FulltextSearchHit as ak, type FulltextSearchOptions as al, type GetOrCreateAction as am, type GraphAlgorithms as an, type GraphEdgeCollections as ao, type GraphEdgeForKinds as ap, type GraphNodeCollections as aq, type GraphNodeReference as ar, type HistoryStoreBackend as as, type HookContext as at, type HybridFulltextOptions as au, type HybridSearchHit as av, type HybridSearchOptions as aw, type HybridVectorOptions as ax, type IdentityTraversalOption as ay, type IfExistsMode as az, type HistoryStore as b, type SubsetEdge as b$, type PaginatedResult as b0, type PathNode as b1, type PersonalizedPageRankOptions as b2, type PersonalizedPageRankSeed as b3, type Predicate as b4, PreparedQuery as b5, type PropsAccessor as b6, type QueryHookContext as b7, type QueryOptions as b8, type ReachableNode as b9, type StoreHooks as bA, type StoreProjection as bB, type StoreRef as bC, StoreSearch as bD, StoreView as bE, type StoreViewCanReachOptions as bF, type StoreViewCoordinate as bG, type StoreViewDegreeOptions as bH, type StoreViewEdgeCollection as bI, type StoreViewEdgeCollections as bJ, type StoreViewGraphAlgorithms as bK, type StoreViewLabelPropagationOptions as bL, type StoreViewNeighborsOptions as bM, type StoreViewNodeCollection as bN, type StoreViewNodeCollections as bO, type StoreViewPageRankOptions as bP, type StoreViewPersonalizedPageRankOptions as bQ, type StoreViewReachableOptions as bR, type StoreViewShortestPathOptions as bS, type StoreViewSubgraphOptions as bT, type StoreViewWeaklyConnectedComponentsOptions as bU, type StoreViewWeightedShortestPathOptions as bV, type StreamOptions as bW, type SubgraphEdgeResult as bX, type SubgraphNodeResult as bY, type SubgraphOptions as bZ, type SubgraphResult as b_, type ReachableOptions as ba, type RebuildContributionOptions as bb, type RebuildFulltextOptions as bc, type RebuildFulltextResult as bd, type ReclaimedVectorFieldEntry as be, type ReconciledSchema as bf, type RecordedScanOptions as bg, type RecordedScanPage as bh, RecordedStoreView as bi, type RecordedStoreViewEdgeCollection as bj, type RecordedStoreViewEdgeCollections as bk, type RecordedStoreViewNodeCollection as bl, type RecordedStoreViewNodeCollections as bm, type RecursiveTraversalOptions as bn, type ReembedFunction as bo, type ReembedVectorFieldOptions as bp, type ReembedVectorFieldResult as bq, type SchemaIntrospection as br, type ScopedMeasure as bs, type SearchScopeOptions as bt, type SelectContext as bu, type SelectableEdge as bv, type SelectableNode as bw, type ShortestPathOptions as bx, type ShortestPathResult as by, type SqlAvailability as bz, type RecordedReadStore as c, type SubsetNode as c0, type TemporalAlgorithmOptions as c1, type TransactionContext as c2, type TransactionOutcome as c3, type TransactionReceipt as c4, type TraversalDirection as c5, type TypedEdgeCollection as c6, type TypedRecordedStoreViewEdgeCollection as c7, type TypedStoreViewEdgeCollection as c8, UnionableQuery as c9, type UpdateEdgeInput as ca, type UpdateNodeInput as cb, type VectorSearchHit as cc, type VectorSearchOptions as cd, type WeaklyConnectedComponentMembership as ce, type WeaklyConnectedComponentsOptions as cf, type WeightedShortestPathOptions as cg, type WeightedShortestPathResult as ch, asIdentityAssertionId as ci, createAdapterStore as cj, createAdapterStoreWithSchema as ck, createQueryBuilder as cl, createStore as cm, createStoreWithSchema as cn, createVerifiedAdapterStore as co, createVerifiedStore as cp, defineSubgraphProject as cq, exists as cr, fieldRef as cs, inSubquery as ct, isParameterRef as cu, notExists as cv, notInSubquery as cw, param as cx, type IdentityAssertionId as d, type IdentityAssertionResult as e, type IdentityFacade as f, type IdentityNode as g, type IdentityNodeRefInput as h, type IdentityPair as i, type IdentityReadFacade as j, type IdentityRelation as k, type IdentityWriteSummary as l, type UniqueIntrospection as m, type RecursiveAliasMap as n, QueryBuilder as o, type EmptyRecursiveAliasMap as p, type AdapterHistoryStore as q, type AdapterHistoryTransactionContext as r, type AdapterRecordedReadStore as s, type AdapterStore as t, type AdapterTransactionContext as u, type AggregateResult as v, type AlgorithmCyclePolicy as w, type AnyEdge as x, type AnyNode as y, type BaseTraversalOptions as z };
|