@nicia-ai/typegraph 0.49.0 → 0.51.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -0
- package/dist/backend/drizzle/indexes.cjs +11 -9
- 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 -5
- package/dist/backend/index.cjs +190 -53
- package/dist/backend/index.d.cts +90 -4
- package/dist/backend/index.d.ts +90 -4
- package/dist/backend/index.js +9 -12
- package/dist/backend/postgres/index.cjs +36 -28
- package/dist/backend/postgres/index.d.cts +7 -7
- package/dist/backend/postgres/index.d.ts +7 -7
- package/dist/backend/postgres/index.js +19 -15
- package/dist/backend/postgres/pglite-store.cjs +7 -62
- package/dist/backend/postgres/pglite-store.cjs.map +1 -1
- package/dist/backend/postgres/pglite-store.d.cts +8 -8
- package/dist/backend/postgres/pglite-store.d.ts +8 -8
- package/dist/backend/postgres/pglite-store.js +7 -62
- package/dist/backend/postgres/pglite-store.js.map +1 -1
- package/dist/backend/postgres/pglite.cjs +21 -17
- package/dist/backend/postgres/pglite.d.cts +3 -3
- package/dist/backend/postgres/pglite.d.ts +3 -3
- package/dist/backend/postgres/pglite.js +20 -16
- package/dist/backend/sqlite/index.cjs +33 -25
- package/dist/backend/sqlite/index.d.cts +7 -7
- package/dist/backend/sqlite/index.d.ts +7 -7
- package/dist/backend/sqlite/index.js +17 -13
- package/dist/backend/sqlite/libsql.cjs +24 -20
- package/dist/backend/sqlite/libsql.cjs.map +1 -1
- package/dist/backend/sqlite/libsql.d.cts +3 -3
- package/dist/backend/sqlite/libsql.d.ts +3 -3
- package/dist/backend/sqlite/libsql.js +19 -15
- package/dist/backend/sqlite/libsql.js.map +1 -1
- package/dist/backend/sqlite/local-store.cjs +9 -64
- package/dist/backend/sqlite/local-store.cjs.map +1 -1
- package/dist/backend/sqlite/local-store.d.cts +8 -8
- package/dist/backend/sqlite/local-store.d.ts +8 -8
- package/dist/backend/sqlite/local-store.js +8 -64
- package/dist/backend/sqlite/local-store.js.map +1 -1
- package/dist/backend/sqlite/local.cjs +25 -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 +21 -16
- package/dist/chunk-2CVDZCXH.cjs +1278 -0
- package/dist/chunk-2CVDZCXH.cjs.map +1 -0
- package/dist/{chunk-MYKHJI2J.js → chunk-2DWTBNSH.js} +3 -3
- package/dist/{chunk-MYKHJI2J.js.map → chunk-2DWTBNSH.js.map} +1 -1
- package/dist/{chunk-JB6T4GLL.cjs → chunk-2KCTP3U2.cjs} +870 -528
- package/dist/chunk-2KCTP3U2.cjs.map +1 -0
- package/dist/{chunk-OORXGFL5.cjs → chunk-322TBTOQ.cjs} +48 -48
- package/dist/{chunk-OORXGFL5.cjs.map → chunk-322TBTOQ.cjs.map} +1 -1
- package/dist/{chunk-FA2AFWLP.cjs → chunk-36SX6QXP.cjs} +31 -12
- package/dist/chunk-36SX6QXP.cjs.map +1 -0
- package/dist/{chunk-SDBBMD4N.js → chunk-36VYWVQU.js} +3 -3
- package/dist/{chunk-SDBBMD4N.js.map → chunk-36VYWVQU.js.map} +1 -1
- package/dist/chunk-4DKY6RIU.js +1253 -0
- package/dist/chunk-4DKY6RIU.js.map +1 -0
- package/dist/chunk-4QKOZYMV.js +9 -0
- package/dist/chunk-4QKOZYMV.js.map +1 -0
- package/dist/{chunk-WIC7DRXW.js → chunk-57JM6NW3.js} +9 -19
- package/dist/chunk-57JM6NW3.js.map +1 -0
- package/dist/chunk-5WWEYV4H.cjs +5113 -0
- package/dist/chunk-5WWEYV4H.cjs.map +1 -0
- package/dist/chunk-6KQEICJ6.cjs +12 -0
- package/dist/{chunk-MKJ4KXL5.cjs.map → chunk-6KQEICJ6.cjs.map} +1 -1
- package/dist/{chunk-DZAICA5J.js → chunk-6NKSE5AU.js} +4 -4
- package/dist/{chunk-DZAICA5J.js.map → chunk-6NKSE5AU.js.map} +1 -1
- package/dist/{chunk-KKBDXCLQ.js → chunk-6NLYIMJO.js} +4 -4
- package/dist/{chunk-KKBDXCLQ.js.map → chunk-6NLYIMJO.js.map} +1 -1
- package/dist/{chunk-BFUOME67.cjs → chunk-7B7I7YAW.cjs} +20 -11
- package/dist/chunk-7B7I7YAW.cjs.map +1 -0
- package/dist/{chunk-ZDKTPBGV.js → chunk-7G5IYROL.js} +6 -548
- package/dist/chunk-7G5IYROL.js.map +1 -0
- package/dist/{chunk-3DMMGT6S.js → chunk-7QFRK6PU.js} +4 -8
- package/dist/chunk-7QFRK6PU.js.map +1 -0
- package/dist/chunk-A4C4NJ5U.cjs +12 -0
- package/dist/chunk-A4C4NJ5U.cjs.map +1 -0
- package/dist/{chunk-CHAOFCHV.js → chunk-AH2A74OZ.js} +3 -3
- package/dist/{chunk-CHAOFCHV.js.map → chunk-AH2A74OZ.js.map} +1 -1
- package/dist/{chunk-UGHQV7MP.cjs → chunk-B3MN7EJR.cjs} +228 -162
- package/dist/chunk-B3MN7EJR.cjs.map +1 -0
- package/dist/{chunk-TZEGUG6D.cjs → chunk-BZ5MVITP.cjs} +4 -4
- package/dist/{chunk-TZEGUG6D.cjs.map → chunk-BZ5MVITP.cjs.map} +1 -1
- package/dist/{chunk-YVF2EM7B.js → chunk-CAI6SMP6.js} +3 -3
- package/dist/{chunk-YVF2EM7B.js.map → chunk-CAI6SMP6.js.map} +1 -1
- package/dist/{chunk-JONXFAPO.js → chunk-CBOD7TXH.js} +5 -5
- package/dist/{chunk-JONXFAPO.js.map → chunk-CBOD7TXH.js.map} +1 -1
- package/dist/{chunk-FQPEMEWX.cjs → chunk-CRZ56SZU.cjs} +81 -32
- package/dist/chunk-CRZ56SZU.cjs.map +1 -0
- package/dist/{chunk-DO7SAMEK.cjs → chunk-D3GWARN7.cjs} +47 -47
- package/dist/{chunk-DO7SAMEK.cjs.map → chunk-D3GWARN7.cjs.map} +1 -1
- package/dist/{chunk-QTD6HX4O.js → chunk-D3OUDFU7.js} +5 -5
- package/dist/{chunk-QTD6HX4O.js.map → chunk-D3OUDFU7.js.map} +1 -1
- package/dist/{chunk-2QGYQBS2.cjs → chunk-DWUDZ66O.cjs} +10 -10
- package/dist/{chunk-2QGYQBS2.cjs.map → chunk-DWUDZ66O.cjs.map} +1 -1
- package/dist/chunk-EKG2UXNX.cjs +23 -0
- package/dist/chunk-EKG2UXNX.cjs.map +1 -0
- package/dist/chunk-FMMW3KX7.cjs +148 -0
- package/dist/chunk-FMMW3KX7.cjs.map +1 -0
- package/dist/{chunk-XVWOYKIK.js → chunk-FZHF5UWR.js} +3 -3
- package/dist/{chunk-XVWOYKIK.js.map → chunk-FZHF5UWR.js.map} +1 -1
- package/dist/chunk-H2VWDQWC.cjs +571 -0
- package/dist/chunk-H2VWDQWC.cjs.map +1 -0
- package/dist/chunk-H4FY6OZK.js +13 -0
- package/dist/chunk-H4FY6OZK.js.map +1 -0
- package/dist/{chunk-EDN4Y4ZG.cjs → chunk-H5IJSROF.cjs} +9 -15
- package/dist/chunk-H5IJSROF.cjs.map +1 -0
- package/dist/chunk-HZUB5CON.js +27 -0
- package/dist/chunk-HZUB5CON.js.map +1 -0
- package/dist/{chunk-NACVVDWB.js → chunk-I5IOSA27.js} +103 -105
- package/dist/chunk-I5IOSA27.js.map +1 -0
- package/dist/{chunk-OI2GQ25X.cjs → chunk-I7YAY2VQ.cjs} +7 -7
- package/dist/{chunk-OI2GQ25X.cjs.map → chunk-I7YAY2VQ.cjs.map} +1 -1
- package/dist/chunk-IRCWIA3R.js +20 -0
- package/dist/chunk-IRCWIA3R.js.map +1 -0
- package/dist/chunk-IVQBLXBK.cjs +55 -0
- package/dist/chunk-IVQBLXBK.cjs.map +1 -0
- package/dist/{chunk-7SQSZN2J.js → chunk-IZD4HTCP.js} +5 -5
- package/dist/{chunk-7SQSZN2J.js.map → chunk-IZD4HTCP.js.map} +1 -1
- package/dist/{chunk-3FPR224C.cjs → chunk-JHRUZ73O.cjs} +116 -107
- package/dist/chunk-JHRUZ73O.cjs.map +1 -0
- package/dist/{chunk-EZEEWCFJ.cjs → chunk-JQKMEKKW.cjs} +525 -298
- package/dist/chunk-JQKMEKKW.cjs.map +1 -0
- package/dist/chunk-JVA3KDEA.cjs +691 -0
- package/dist/chunk-JVA3KDEA.cjs.map +1 -0
- package/dist/{chunk-5K2BKEBD.js → chunk-K46SDNQD.js} +10 -4
- package/dist/chunk-K46SDNQD.js.map +1 -0
- package/dist/{chunk-7LZJNLA5.js → chunk-K67P5DLL.js} +108 -42
- package/dist/chunk-K67P5DLL.js.map +1 -0
- package/dist/{chunk-3G5W2U2L.cjs → chunk-KACEYDYV.cjs} +335 -258
- package/dist/chunk-KACEYDYV.cjs.map +1 -0
- package/dist/{chunk-JFRT7S3B.cjs → chunk-L6EVYIID.cjs} +318 -478
- package/dist/chunk-L6EVYIID.cjs.map +1 -0
- package/dist/{chunk-SHFBB23Q.js → chunk-LI4K2KEJ.js} +6 -4
- package/dist/chunk-LI4K2KEJ.js.map +1 -0
- package/dist/chunk-LKZDQ2B4.js +1581 -0
- package/dist/chunk-LKZDQ2B4.js.map +1 -0
- package/dist/{chunk-WODMN3Q2.cjs → chunk-LLFPQOBA.cjs} +27 -27
- package/dist/{chunk-WODMN3Q2.cjs.map → chunk-LLFPQOBA.cjs.map} +1 -1
- package/dist/{chunk-P6YLZTRE.js → chunk-LZMQ3SFK.js} +3 -3
- package/dist/{chunk-P6YLZTRE.js.map → chunk-LZMQ3SFK.js.map} +1 -1
- package/dist/{chunk-HEV35TGT.js → chunk-M3VTS3F6.js} +13 -4
- package/dist/chunk-M3VTS3F6.js.map +1 -0
- package/dist/{chunk-TQHGE7UC.cjs → chunk-M5MSP3BI.cjs} +18 -10
- package/dist/chunk-M5MSP3BI.cjs.map +1 -0
- package/dist/{chunk-D4QLTJSM.js → chunk-NBOS7BY3.js} +63 -23
- package/dist/chunk-NBOS7BY3.js.map +1 -0
- package/dist/chunk-NGQDGL5X.js +140 -0
- package/dist/chunk-NGQDGL5X.js.map +1 -0
- package/dist/{chunk-SIT26LAZ.cjs → chunk-NLX5OWK7.cjs} +33 -5
- package/dist/chunk-NLX5OWK7.cjs.map +1 -0
- package/dist/chunk-NUQ2YFFH.cjs +1637 -0
- package/dist/chunk-NUQ2YFFH.cjs.map +1 -0
- package/dist/{chunk-UMGZDVOA.cjs → chunk-OGL4X4PH.cjs} +206 -208
- package/dist/chunk-OGL4X4PH.cjs.map +1 -0
- package/dist/{chunk-LRQKXRXO.cjs → chunk-OTNTGEXR.cjs} +4 -4
- package/dist/{chunk-LRQKXRXO.cjs.map → chunk-OTNTGEXR.cjs.map} +1 -1
- package/dist/chunk-OTWE63BW.js +53 -0
- package/dist/chunk-OTWE63BW.js.map +1 -0
- package/dist/chunk-PC5NGH5A.js +549 -0
- package/dist/chunk-PC5NGH5A.js.map +1 -0
- package/dist/{chunk-26YKDNUD.cjs → chunk-PS3TUWJM.cjs} +12 -10
- package/dist/chunk-PS3TUWJM.cjs.map +1 -0
- package/dist/{chunk-OMZ37BM2.js → chunk-PVFFH7TL.js} +5 -5
- package/dist/{chunk-OMZ37BM2.js.map → chunk-PVFFH7TL.js.map} +1 -1
- package/dist/chunk-QCD5JKU4.cjs +15 -0
- package/dist/chunk-QCD5JKU4.cjs.map +1 -0
- package/dist/{chunk-UGHG7PGX.js → chunk-QG5VEOKX.js} +30 -4
- package/dist/chunk-QG5VEOKX.js.map +1 -0
- package/dist/{chunk-TUNPBZY3.cjs → chunk-QLLZM5I3.cjs} +4 -4
- package/dist/{chunk-TUNPBZY3.cjs.map → chunk-QLLZM5I3.cjs.map} +1 -1
- package/dist/{chunk-BRRP76WO.js → chunk-RCBG6YMT.js} +781 -375
- package/dist/chunk-RCBG6YMT.js.map +1 -0
- package/dist/{chunk-LTXQOEIC.js → chunk-RI7RJH4G.js} +281 -204
- package/dist/chunk-RI7RJH4G.js.map +1 -0
- package/dist/{chunk-GYEG3ZLZ.cjs → chunk-RJMHU2MG.cjs} +121 -18
- package/dist/chunk-RJMHU2MG.cjs.map +1 -0
- package/dist/{chunk-GLHXM7C4.js → chunk-RVUL2HXY.js} +61 -23
- package/dist/chunk-RVUL2HXY.js.map +1 -0
- package/dist/chunk-RWUWTJQY.cjs +30 -0
- package/dist/chunk-RWUWTJQY.cjs.map +1 -0
- package/dist/{chunk-2O4PCIZ6.cjs → chunk-S5GU4LUN.cjs} +13 -13
- package/dist/{chunk-2O4PCIZ6.cjs.map → chunk-S5GU4LUN.cjs.map} +1 -1
- package/dist/{chunk-JPD2CTC3.js → chunk-SDPWO2Z5.js} +7 -7
- package/dist/{chunk-JPD2CTC3.js.map → chunk-SDPWO2Z5.js.map} +1 -1
- package/dist/{chunk-OVI7IXYX.js → chunk-SLGGT2XD.js} +3 -3
- package/dist/{chunk-OVI7IXYX.js.map → chunk-SLGGT2XD.js.map} +1 -1
- package/dist/{chunk-ROR5ZR6A.cjs → chunk-TIJUA4I6.cjs} +45 -45
- package/dist/{chunk-ROR5ZR6A.cjs.map → chunk-TIJUA4I6.cjs.map} +1 -1
- package/dist/{chunk-AOSSQDVO.cjs → chunk-TM54OBHX.cjs} +13 -13
- package/dist/{chunk-AOSSQDVO.cjs.map → chunk-TM54OBHX.cjs.map} +1 -1
- package/dist/{chunk-KF6K7TGH.js → chunk-TYEYRCXL.js} +766 -433
- package/dist/chunk-TYEYRCXL.js.map +1 -0
- package/dist/{chunk-Z2JCLZFJ.js → chunk-UKOVGCRN.js} +2151 -570
- package/dist/chunk-UKOVGCRN.js.map +1 -0
- package/dist/chunk-UYKDYE5D.cjs +12 -0
- package/dist/{chunk-CICO5GXD.cjs.map → chunk-UYKDYE5D.cjs.map} +1 -1
- package/dist/{chunk-S5TERQVW.js → chunk-VAAC7L57.js} +284 -66
- package/dist/chunk-VAAC7L57.js.map +1 -0
- package/dist/{chunk-7UOLHNWC.cjs → chunk-VKHXYVN7.cjs} +22 -33
- package/dist/chunk-VKHXYVN7.cjs.map +1 -0
- package/dist/{chunk-6NGW27EO.cjs → chunk-VLBTRXA2.cjs} +10 -10
- package/dist/{chunk-6NGW27EO.cjs.map → chunk-VLBTRXA2.cjs.map} +1 -1
- package/dist/{chunk-YIURNGXI.js → chunk-VUQZNUHU.js} +22 -6
- package/dist/chunk-VUQZNUHU.js.map +1 -0
- package/dist/{chunk-YYUHLYM2.cjs → chunk-WDM5WQK4.cjs} +183 -143
- package/dist/chunk-WDM5WQK4.cjs.map +1 -0
- package/dist/{chunk-ZFMCDJGB.js → chunk-WFSYYU4W.js} +70 -220
- package/dist/chunk-WFSYYU4W.js.map +1 -0
- package/dist/{chunk-SR725PWF.cjs → chunk-WRBV2FNH.cjs} +2065 -1659
- package/dist/chunk-WRBV2FNH.cjs.map +1 -0
- package/dist/{chunk-MRDBBHIZ.cjs → chunk-X4GDXBOP.cjs} +2 -2
- package/dist/chunk-X4GDXBOP.cjs.map +1 -0
- package/dist/chunk-XORONCV3.js +202 -0
- package/dist/chunk-XORONCV3.js.map +1 -0
- package/dist/{chunk-D5R42W5D.js → chunk-XZW2CTNO.js} +115 -12
- package/dist/chunk-XZW2CTNO.js.map +1 -0
- package/dist/{chunk-ZLONH2UD.js → chunk-YDEJQWOL.js} +2 -2
- package/dist/chunk-YDEJQWOL.js.map +1 -0
- package/dist/{chunk-2TYSSBU5.js → chunk-YT2IVFAI.js} +30 -21
- package/dist/chunk-YT2IVFAI.js.map +1 -0
- package/dist/chunk-ZGVTNKTX.cjs +217 -0
- package/dist/chunk-ZGVTNKTX.cjs.map +1 -0
- package/dist/core/index.cjs +29 -28
- package/dist/core/index.d.cts +4 -4
- package/dist/core/index.d.ts +4 -4
- package/dist/core/index.js +9 -8
- package/dist/{ddl-D_oW-EVO.d.ts → ddl-BvcbgzHo.d.ts} +3 -3
- package/dist/{ddl-BL1NZLMY.d.cts → ddl-Ufebz5q5.d.cts} +3 -3
- package/dist/graph-extension/index.cjs +21 -20
- package/dist/graph-extension/index.d.cts +2 -4
- package/dist/graph-extension/index.d.ts +2 -4
- package/dist/graph-extension/index.js +5 -4
- package/dist/graph-merge/index.cjs +324 -307
- package/dist/graph-merge/index.cjs.map +1 -1
- package/dist/graph-merge/index.d.cts +8 -9
- package/dist/graph-merge/index.d.ts +8 -9
- package/dist/graph-merge/index.js +51 -34
- package/dist/graph-merge/index.js.map +1 -1
- package/dist/index.cjs +224 -222
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -12
- package/dist/index.d.ts +11 -12
- package/dist/index.js +38 -36
- package/dist/index.js.map +1 -1
- package/dist/indexes/index.cjs +15 -13
- package/dist/indexes/index.d.cts +4 -4
- package/dist/indexes/index.d.ts +4 -4
- package/dist/indexes/index.js +8 -6
- package/dist/{ingestion-import-target-dNeL7iAv.d.ts → ingestion-import-target-CAs1OX-l.d.cts} +1 -1
- package/dist/{ingestion-import-target-XPxZYw89.d.cts → ingestion-import-target-DCQSPfNx.d.ts} +1 -1
- package/dist/interchange/index.cjs +57 -54
- package/dist/interchange/index.cjs.map +1 -1
- package/dist/interchange/index.d.cts +19 -8
- package/dist/interchange/index.d.ts +19 -8
- package/dist/interchange/index.js +21 -18
- package/dist/interchange/index.js.map +1 -1
- package/dist/local-store-impl-6DDTFM32.cjs +77 -0
- package/dist/local-store-impl-6DDTFM32.cjs.map +1 -0
- package/dist/local-store-impl-OXTOVU2J.js +75 -0
- package/dist/local-store-impl-OXTOVU2J.js.map +1 -0
- package/dist/{manager-CYaff3n3.d.cts → manager-B68OrPR2.d.ts} +29 -2
- package/dist/{manager-D9eRT_ns.d.ts → manager-D_t7oK69.d.cts} +29 -2
- package/dist/pglite-store-impl-6EMZGL7K.js +73 -0
- package/dist/pglite-store-impl-6EMZGL7K.js.map +1 -0
- package/dist/pglite-store-impl-GJG3Y7RP.cjs +75 -0
- package/dist/pglite-store-impl-GJG3Y7RP.cjs.map +1 -0
- package/dist/{postgres-CcL4bAHS.d.ts → postgres-BPLSVyHM.d.ts} +279 -2
- package/dist/{postgres-DMj39MEu.d.cts → postgres-CqvtFC2y.d.cts} +279 -2
- package/dist/profiler/index.d.cts +9 -9
- package/dist/profiler/index.d.ts +9 -9
- package/dist/provenance/index.cjs +59 -44
- 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 +28 -13
- package/dist/provenance/index.js.map +1 -1
- package/dist/{repair-validity-windows-BFNZvd_H.d.cts → repair-validity-windows-DEzCKAdy.d.cts} +7 -3
- package/dist/{repair-validity-windows-DlUSqwCg.d.ts → repair-validity-windows-GMdaS2AH.d.ts} +7 -3
- package/dist/resolve-D_H8MHtq.d.ts +1805 -0
- package/dist/resolve-WEW8gWws.d.cts +1805 -0
- package/dist/schema/index.cjs +48 -46
- package/dist/schema/index.d.cts +4 -6
- package/dist/schema/index.d.ts +4 -6
- package/dist/schema/index.js +21 -19
- package/dist/{searchable-bpE1bBfc.d.ts → searchable-C_UREI9K.d.ts} +1 -1
- package/dist/{searchable-DHJMh_nj.d.cts → searchable-ClgET_i7.d.cts} +1 -1
- package/dist/{sqlite-YppHrNFb.d.cts → sqlite-D1mXO9Kp.d.cts} +310 -2
- package/dist/{sqlite-D7Oz0SQh.d.ts → sqlite-MZA3oZNB.d.ts} +310 -2
- package/dist/{store-bphCSo7z.d.cts → store-CuFX7fCx.d.cts} +117 -31
- package/dist/{store-DRrFCx5x.d.ts → store-D-ZjXQpW.d.ts} +117 -31
- package/dist/{temporal-CbnLzTmM.d.ts → temporal-CpyEiRY8.d.cts} +1 -1
- package/dist/{temporal-5GqpYCk2.d.cts → temporal-y0Aep9Su.d.ts} +1 -1
- package/dist/{types-BqFZTQmV.d.cts → types-6yf0Vv-_.d.cts} +2016 -94
- package/dist/{types-BqFZTQmV.d.ts → types-6yf0Vv-_.d.ts} +2016 -94
- package/dist/{types-Bx74kaTt.d.ts → types-DzJ4dlzk.d.cts} +1 -1
- package/dist/{types-CXAhpW-c.d.cts → types-_vVSB9k-.d.ts} +1 -1
- package/dist/{where-O-k2wgYm.d.ts → where-DuG2LCLe.d.ts} +1 -1
- package/dist/{where-DI_Fqz-X.d.cts → where-Mhf_yyKX.d.cts} +1 -1
- package/package.json +7 -2
- package/dist/chunk-26YKDNUD.cjs.map +0 -1
- package/dist/chunk-2TYSSBU5.js.map +0 -1
- package/dist/chunk-3DMMGT6S.js.map +0 -1
- package/dist/chunk-3FPR224C.cjs.map +0 -1
- package/dist/chunk-3G5W2U2L.cjs.map +0 -1
- package/dist/chunk-3KOY4FH3.cjs +0 -934
- package/dist/chunk-3KOY4FH3.cjs.map +0 -1
- package/dist/chunk-3QNZ5SAJ.cjs +0 -3502
- package/dist/chunk-3QNZ5SAJ.cjs.map +0 -1
- package/dist/chunk-3U5ABFDW.cjs +0 -259
- package/dist/chunk-3U5ABFDW.cjs.map +0 -1
- package/dist/chunk-5K2BKEBD.js.map +0 -1
- package/dist/chunk-5PRKMB24.cjs +0 -124
- package/dist/chunk-5PRKMB24.cjs.map +0 -1
- package/dist/chunk-6LN7FIVU.js +0 -107
- package/dist/chunk-6LN7FIVU.js.map +0 -1
- package/dist/chunk-6SWPJEYN.js +0 -1126
- package/dist/chunk-6SWPJEYN.js.map +0 -1
- package/dist/chunk-7LZJNLA5.js.map +0 -1
- package/dist/chunk-7UOLHNWC.cjs.map +0 -1
- package/dist/chunk-BFUOME67.cjs.map +0 -1
- package/dist/chunk-BRRP76WO.js.map +0 -1
- package/dist/chunk-CICO5GXD.cjs +0 -12
- package/dist/chunk-D4QLTJSM.js.map +0 -1
- package/dist/chunk-D5R42W5D.js.map +0 -1
- package/dist/chunk-EDN4Y4ZG.cjs.map +0 -1
- package/dist/chunk-EZEEWCFJ.cjs.map +0 -1
- package/dist/chunk-FA2AFWLP.cjs.map +0 -1
- package/dist/chunk-FQPEMEWX.cjs.map +0 -1
- package/dist/chunk-GLHXM7C4.js.map +0 -1
- package/dist/chunk-GYEG3ZLZ.cjs.map +0 -1
- package/dist/chunk-HDL2ARHX.cjs +0 -1156
- package/dist/chunk-HDL2ARHX.cjs.map +0 -1
- package/dist/chunk-HEV35TGT.js.map +0 -1
- package/dist/chunk-I4GAZH5Z.js +0 -913
- package/dist/chunk-I4GAZH5Z.js.map +0 -1
- package/dist/chunk-JB6T4GLL.cjs.map +0 -1
- package/dist/chunk-JBQQ7THH.js +0 -20
- package/dist/chunk-JBQQ7THH.js.map +0 -1
- package/dist/chunk-JFRT7S3B.cjs.map +0 -1
- package/dist/chunk-KF6K7TGH.js.map +0 -1
- package/dist/chunk-L3LQNR34.cjs +0 -1254
- package/dist/chunk-L3LQNR34.cjs.map +0 -1
- package/dist/chunk-LTXQOEIC.js.map +0 -1
- package/dist/chunk-MKJ4KXL5.cjs +0 -12
- package/dist/chunk-MRDBBHIZ.cjs.map +0 -1
- package/dist/chunk-NACVVDWB.js.map +0 -1
- package/dist/chunk-NVY5CJFP.js +0 -244
- package/dist/chunk-NVY5CJFP.js.map +0 -1
- package/dist/chunk-PWLJ77UV.cjs +0 -23
- package/dist/chunk-PWLJ77UV.cjs.map +0 -1
- package/dist/chunk-S5TERQVW.js.map +0 -1
- package/dist/chunk-SHFBB23Q.js.map +0 -1
- package/dist/chunk-SIT26LAZ.cjs.map +0 -1
- package/dist/chunk-SR725PWF.cjs.map +0 -1
- package/dist/chunk-TQHGE7UC.cjs.map +0 -1
- package/dist/chunk-UGHG7PGX.js.map +0 -1
- package/dist/chunk-UGHQV7MP.cjs.map +0 -1
- package/dist/chunk-UMGZDVOA.cjs.map +0 -1
- package/dist/chunk-WIC7DRXW.js.map +0 -1
- package/dist/chunk-YIURNGXI.js.map +0 -1
- package/dist/chunk-YYUHLYM2.cjs.map +0 -1
- package/dist/chunk-Z2JCLZFJ.js.map +0 -1
- package/dist/chunk-ZDKTPBGV.js.map +0 -1
- package/dist/chunk-ZFMCDJGB.js.map +0 -1
- package/dist/chunk-ZLONH2UD.js.map +0 -1
- package/dist/index-COs_z6nV.d.cts +0 -1132
- package/dist/index-D7d1u2gr.d.ts +0 -1132
- package/dist/materialize-indexes-DJ3ykH59.d.ts +0 -266
- package/dist/materialize-indexes-DTtAnvfY.d.cts +0 -266
package/dist/index-D7d1u2gr.d.ts
DELETED
|
@@ -1,1132 +0,0 @@
|
|
|
1
|
-
import { bj as KindEntity } from './types-BqFZTQmV.js';
|
|
2
|
-
import { M as MaterializeIndexesResult, S as SchemaDiff } from './materialize-indexes-DJ3ykH59.js';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* TypeGraph Error Hierarchy
|
|
6
|
-
*
|
|
7
|
-
* All errors extend TypeGraphError with:
|
|
8
|
-
* - `code`: Machine-readable error code for programmatic handling
|
|
9
|
-
* - `category`: Classification for error handling strategies
|
|
10
|
-
* - `suggestion`: Optional recovery guidance for users
|
|
11
|
-
* - `details`: Structured context about the error
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* ```typescript
|
|
15
|
-
* try {
|
|
16
|
-
* await store.nodes.Person.create({ name: "" });
|
|
17
|
-
* } catch (error) {
|
|
18
|
-
* if (isTypeGraphError(error)) {
|
|
19
|
-
* console.error(error.toUserMessage());
|
|
20
|
-
* if (isUserRecoverable(error)) {
|
|
21
|
-
* // Show to user for correction
|
|
22
|
-
* }
|
|
23
|
-
* }
|
|
24
|
-
* }
|
|
25
|
-
* ```
|
|
26
|
-
*/
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Error category for programmatic handling.
|
|
30
|
-
*
|
|
31
|
-
* - `user`: Caused by invalid input or incorrect usage. Recoverable by fixing input.
|
|
32
|
-
* - `constraint`: Business rule or schema constraint violation. Recoverable by changing data.
|
|
33
|
-
* - `system`: Internal error or infrastructure issue. May require investigation or retry.
|
|
34
|
-
*/
|
|
35
|
-
type ErrorCategory = "user" | "constraint" | "system";
|
|
36
|
-
/**
|
|
37
|
-
* Options for TypeGraphError constructor.
|
|
38
|
-
*/
|
|
39
|
-
type TypeGraphErrorOptions = Readonly<{
|
|
40
|
-
/** Structured context about the error */
|
|
41
|
-
details?: Record<string, unknown>;
|
|
42
|
-
/** Error category for handling strategies */
|
|
43
|
-
category: ErrorCategory;
|
|
44
|
-
/** Recovery guidance for users */
|
|
45
|
-
suggestion?: string;
|
|
46
|
-
/** Underlying cause of the error */
|
|
47
|
-
cause?: unknown;
|
|
48
|
-
}>;
|
|
49
|
-
/**
|
|
50
|
-
* Base error class for all TypeGraph errors.
|
|
51
|
-
*
|
|
52
|
-
* Provides structured error information for both programmatic handling
|
|
53
|
-
* and user-friendly messages.
|
|
54
|
-
*/
|
|
55
|
-
declare class TypeGraphError extends Error {
|
|
56
|
-
/** Machine-readable error code (e.g., "VALIDATION_ERROR") */
|
|
57
|
-
readonly code: string;
|
|
58
|
-
/** Error category for handling strategies */
|
|
59
|
-
readonly category: ErrorCategory;
|
|
60
|
-
/** Structured context about the error */
|
|
61
|
-
readonly details: Readonly<Record<string, unknown>>;
|
|
62
|
-
/** Recovery guidance for users */
|
|
63
|
-
readonly suggestion?: string;
|
|
64
|
-
constructor(message: string, code: string, options: TypeGraphErrorOptions);
|
|
65
|
-
/**
|
|
66
|
-
* Returns a user-friendly error message with suggestion if available.
|
|
67
|
-
*/
|
|
68
|
-
toUserMessage(): string;
|
|
69
|
-
/**
|
|
70
|
-
* Returns a detailed string representation for logging.
|
|
71
|
-
*/
|
|
72
|
-
toLogString(): string;
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Validation issue from Zod or custom validation.
|
|
76
|
-
*/
|
|
77
|
-
type ValidationIssue = Readonly<{
|
|
78
|
-
/** Path to the invalid field (e.g., "address.city") */
|
|
79
|
-
path: string;
|
|
80
|
-
/** Human-readable error message */
|
|
81
|
-
message: string;
|
|
82
|
-
/** Zod error code if from Zod validation */
|
|
83
|
-
code?: string;
|
|
84
|
-
/**
|
|
85
|
-
* The identity assertion the issue is about, carried structurally so
|
|
86
|
-
* consumers (e.g. interchange import error reporting) never have to parse
|
|
87
|
-
* the human-readable message for it.
|
|
88
|
-
*/
|
|
89
|
-
assertionId?: string;
|
|
90
|
-
}>;
|
|
91
|
-
/**
|
|
92
|
-
* The stable {@link ValidationIssue.code} every inverted-validity-window
|
|
93
|
-
* refusal carries, so a caller can recognize that specific failure without
|
|
94
|
-
* matching on the message. `ValidationError`'s own code is the family-wide
|
|
95
|
-
* `VALIDATION_ERROR`, so the discriminator lives on the issue — mirroring the
|
|
96
|
-
* identity-import window refusal (`IDENTITY_IMPORT_INVALID_WINDOW`).
|
|
97
|
-
*
|
|
98
|
-
* A write carrying it was refused because `validTo` precedes the row's
|
|
99
|
-
* effective `validFrom`: the row would have stopped being true before it
|
|
100
|
-
* started, observable at no `asOf` coordinate at all. Zero-width windows
|
|
101
|
-
* (`validTo === validFrom`) are legal and never raise it.
|
|
102
|
-
*/
|
|
103
|
-
declare const INVERTED_VALIDITY_WINDOW_CODE = "INVERTED_VALIDITY_WINDOW";
|
|
104
|
-
/**
|
|
105
|
-
* The stable {@link ValidationIssue.code} carried by a refusal to accept a
|
|
106
|
-
* `validFrom` the write cannot apply: the target row is LIVE, and an in-place
|
|
107
|
-
* update never rewrites a live row's lower bound — that bound is history.
|
|
108
|
-
* `ValidationError`'s own code is the family-wide `VALIDATION_ERROR`, so the
|
|
109
|
-
* discriminator lives on the issue — mirroring
|
|
110
|
-
* {@link INVERTED_VALIDITY_WINDOW_CODE}.
|
|
111
|
-
*
|
|
112
|
-
* Only a bound naming a DIFFERENT instant than the row already stores raises it.
|
|
113
|
-
* Restating the stored bound is legal and writes nothing new, and a resurrection
|
|
114
|
-
* — which does rewrite `valid_from` — applies a stated bound rather than
|
|
115
|
-
* refusing it.
|
|
116
|
-
*
|
|
117
|
-
* The message names both instants: the one stated and the one the row stores, so
|
|
118
|
-
* the caller can restate the stored bound without a second read.
|
|
119
|
-
*/
|
|
120
|
-
declare const IMMUTABLE_VALIDITY_LOWER_BOUND_CODE = "IMMUTABLE_VALIDITY_LOWER_BOUND";
|
|
121
|
-
/**
|
|
122
|
-
* Stable {@link ValidationIssue.code} for an edge-id ownership mismatch.
|
|
123
|
-
*
|
|
124
|
-
* Edge ids are graph-global. A collection-scoped write therefore has to prove
|
|
125
|
-
* that the stored row has the collection's kind and, when the caller supplies
|
|
126
|
-
* endpoints, the same immutable endpoints. This refusal prevents a collection
|
|
127
|
-
* from mutating another kind's row and prevents an upsert from silently
|
|
128
|
-
* ignoring an attempted repoint.
|
|
129
|
-
*/
|
|
130
|
-
declare const EDGE_IDENTITY_MISMATCH_CODE = "EDGE_IDENTITY_MISMATCH";
|
|
131
|
-
/**
|
|
132
|
-
* The stable {@link ValidationIssue.code} every "this id is already taken"
|
|
133
|
-
* create refusal carries, whichever way the create found out: its own existence
|
|
134
|
-
* probe, or the engine refusing the INSERT. `ValidationError`'s own code is the
|
|
135
|
-
* family-wide `VALIDATION_ERROR`, so the discriminator lives on the issue —
|
|
136
|
-
* mirroring {@link INVERTED_VALIDITY_WINDOW_CODE}.
|
|
137
|
-
*
|
|
138
|
-
* `details.entityType` says whether a node or an edge was refused and
|
|
139
|
-
* `details.kind` names its kind. `details.id` names the taken id, and is absent
|
|
140
|
-
* only when the refused statement inserted MORE THAN ONE row: the engine reports
|
|
141
|
-
* that the statement collided without saying which row did.
|
|
142
|
-
*/
|
|
143
|
-
declare const ENTITY_ALREADY_EXISTS_CODE = "ENTITY_ALREADY_EXISTS";
|
|
144
|
-
/**
|
|
145
|
-
* Details for ValidationError.
|
|
146
|
-
*/
|
|
147
|
-
type ValidationErrorDetails = Readonly<{
|
|
148
|
-
/** Type of entity being validated */
|
|
149
|
-
entityType?: KindEntity;
|
|
150
|
-
/** Kind/type name of the entity */
|
|
151
|
-
kind?: string;
|
|
152
|
-
/** Operation being performed */
|
|
153
|
-
operation?: "create" | "update" | "delete" | "hardDelete";
|
|
154
|
-
/** Entity ID if updating */
|
|
155
|
-
id?: string;
|
|
156
|
-
/** Individual validation issues */
|
|
157
|
-
issues: readonly ValidationIssue[];
|
|
158
|
-
}>;
|
|
159
|
-
/**
|
|
160
|
-
* Thrown when schema validation fails during node or edge operations.
|
|
161
|
-
*
|
|
162
|
-
* @example
|
|
163
|
-
* ```typescript
|
|
164
|
-
* try {
|
|
165
|
-
* await store.nodes.Person.create({ email: "invalid" });
|
|
166
|
-
* } catch (error) {
|
|
167
|
-
* if (error instanceof ValidationError) {
|
|
168
|
-
* console.log(error.details.issues);
|
|
169
|
-
* // [{ path: "email", message: "Invalid email" }]
|
|
170
|
-
* }
|
|
171
|
-
* }
|
|
172
|
-
* ```
|
|
173
|
-
*/
|
|
174
|
-
declare class ValidationError extends TypeGraphError {
|
|
175
|
-
readonly details: ValidationErrorDetails;
|
|
176
|
-
constructor(message: string, details: ValidationErrorDetails, options?: {
|
|
177
|
-
cause?: unknown;
|
|
178
|
-
suggestion?: string;
|
|
179
|
-
});
|
|
180
|
-
}
|
|
181
|
-
/**
|
|
182
|
-
* Details for NodeNotFoundError.
|
|
183
|
-
*/
|
|
184
|
-
type NodeNotFoundErrorDetails = Readonly<{
|
|
185
|
-
kind: string;
|
|
186
|
-
id: string;
|
|
187
|
-
}>;
|
|
188
|
-
/**
|
|
189
|
-
* Thrown when a node is not found.
|
|
190
|
-
*
|
|
191
|
-
* @example
|
|
192
|
-
* ```typescript
|
|
193
|
-
* try {
|
|
194
|
-
* await store.nodes.Person.get("nonexistent-id");
|
|
195
|
-
* } catch (error) {
|
|
196
|
-
* if (error instanceof NodeNotFoundError) {
|
|
197
|
-
* console.log(error.details.kind, error.details.id);
|
|
198
|
-
* }
|
|
199
|
-
* }
|
|
200
|
-
* ```
|
|
201
|
-
*/
|
|
202
|
-
declare class NodeNotFoundError extends TypeGraphError {
|
|
203
|
-
readonly details: NodeNotFoundErrorDetails;
|
|
204
|
-
constructor(kind: string, id: string, options?: {
|
|
205
|
-
cause?: unknown;
|
|
206
|
-
});
|
|
207
|
-
}
|
|
208
|
-
/**
|
|
209
|
-
* Details for EdgeNotFoundError.
|
|
210
|
-
*/
|
|
211
|
-
type EdgeNotFoundErrorDetails = Readonly<{
|
|
212
|
-
kind: string;
|
|
213
|
-
id: string;
|
|
214
|
-
}>;
|
|
215
|
-
/**
|
|
216
|
-
* Thrown when an edge is not found.
|
|
217
|
-
*/
|
|
218
|
-
declare class EdgeNotFoundError extends TypeGraphError {
|
|
219
|
-
readonly details: EdgeNotFoundErrorDetails;
|
|
220
|
-
constructor(kind: string, id: string, options?: {
|
|
221
|
-
cause?: unknown;
|
|
222
|
-
});
|
|
223
|
-
}
|
|
224
|
-
/**
|
|
225
|
-
* Details for KindNotFoundError.
|
|
226
|
-
*/
|
|
227
|
-
type KindNotFoundErrorDetails = Readonly<{
|
|
228
|
-
kindName: string;
|
|
229
|
-
entity: KindEntity;
|
|
230
|
-
graphId?: string;
|
|
231
|
-
}>;
|
|
232
|
-
/**
|
|
233
|
-
* Thrown when an operation references a kind that isn't registered on
|
|
234
|
-
* the graph — `getNodeCollectionOrThrow` against an unknown kind, a
|
|
235
|
-
* `materializeIndexes({ kinds })` filter naming a missing kind, an
|
|
236
|
-
* extension referencing an unresolved endpoint, search facade typos,
|
|
237
|
-
* etc. Carries the offending `kindName` and `entity` plus the host
|
|
238
|
-
* `graphId` so logs are unambiguous when multiple stores share a
|
|
239
|
-
* process.
|
|
240
|
-
*/
|
|
241
|
-
declare class KindNotFoundError extends TypeGraphError {
|
|
242
|
-
readonly details: KindNotFoundErrorDetails;
|
|
243
|
-
readonly kindName: string;
|
|
244
|
-
readonly entity: KindEntity;
|
|
245
|
-
constructor(kindName: string, entity: KindEntity, options?: Readonly<{
|
|
246
|
-
graphId?: string;
|
|
247
|
-
suggestion?: string;
|
|
248
|
-
cause?: unknown;
|
|
249
|
-
}>);
|
|
250
|
-
}
|
|
251
|
-
/**
|
|
252
|
-
* Details for NodeConstraintNotFoundError.
|
|
253
|
-
*/
|
|
254
|
-
type NodeConstraintNotFoundErrorDetails = Readonly<{
|
|
255
|
-
constraintName: string;
|
|
256
|
-
kind: string;
|
|
257
|
-
}>;
|
|
258
|
-
/**
|
|
259
|
-
* Thrown when a uniqueness constraint name is not found on a node kind.
|
|
260
|
-
*/
|
|
261
|
-
declare class NodeConstraintNotFoundError extends TypeGraphError {
|
|
262
|
-
readonly details: NodeConstraintNotFoundErrorDetails;
|
|
263
|
-
constructor(constraintName: string, kind: string, options?: {
|
|
264
|
-
cause?: unknown;
|
|
265
|
-
});
|
|
266
|
-
}
|
|
267
|
-
/**
|
|
268
|
-
* Details for NodeIndexNotFoundError.
|
|
269
|
-
*/
|
|
270
|
-
type NodeIndexNotFoundErrorDetails = Readonly<{
|
|
271
|
-
indexName: string;
|
|
272
|
-
kind: string;
|
|
273
|
-
}>;
|
|
274
|
-
/**
|
|
275
|
-
* Thrown when a declared node index name is not found on a node kind.
|
|
276
|
-
*/
|
|
277
|
-
declare class NodeIndexNotFoundError extends TypeGraphError {
|
|
278
|
-
readonly details: NodeIndexNotFoundErrorDetails;
|
|
279
|
-
constructor(indexName: string, kind: string, options?: {
|
|
280
|
-
cause?: unknown;
|
|
281
|
-
});
|
|
282
|
-
}
|
|
283
|
-
/**
|
|
284
|
-
* Details for EndpointNotFoundError.
|
|
285
|
-
*/
|
|
286
|
-
type EndpointNotFoundErrorDetails = Readonly<{
|
|
287
|
-
edgeKind: string;
|
|
288
|
-
endpoint: "from" | "to";
|
|
289
|
-
nodeKind: string;
|
|
290
|
-
nodeId: string;
|
|
291
|
-
}>;
|
|
292
|
-
/**
|
|
293
|
-
* Thrown when edge endpoint node does not exist or is deleted.
|
|
294
|
-
*/
|
|
295
|
-
declare class EndpointNotFoundError extends TypeGraphError {
|
|
296
|
-
readonly details: EndpointNotFoundErrorDetails;
|
|
297
|
-
constructor(details: EndpointNotFoundErrorDetails, options?: {
|
|
298
|
-
cause?: unknown;
|
|
299
|
-
});
|
|
300
|
-
}
|
|
301
|
-
/**
|
|
302
|
-
* Details for EndpointError.
|
|
303
|
-
*/
|
|
304
|
-
type EndpointErrorDetails = Readonly<{
|
|
305
|
-
edgeKind: string;
|
|
306
|
-
endpoint: "from" | "to";
|
|
307
|
-
actualKind: string;
|
|
308
|
-
expectedKinds: readonly string[];
|
|
309
|
-
}>;
|
|
310
|
-
/**
|
|
311
|
-
* Thrown when edge endpoint has wrong node type.
|
|
312
|
-
*/
|
|
313
|
-
declare class EndpointError extends TypeGraphError {
|
|
314
|
-
readonly details: EndpointErrorDetails;
|
|
315
|
-
constructor(details: EndpointErrorDetails, options?: {
|
|
316
|
-
cause?: unknown;
|
|
317
|
-
});
|
|
318
|
-
}
|
|
319
|
-
/**
|
|
320
|
-
* Details for UniquenessError.
|
|
321
|
-
*/
|
|
322
|
-
type UniquenessErrorDetails = Readonly<{
|
|
323
|
-
constraintName: string;
|
|
324
|
-
kind: string;
|
|
325
|
-
existingId: string;
|
|
326
|
-
newId: string;
|
|
327
|
-
fields: readonly string[];
|
|
328
|
-
}>;
|
|
329
|
-
/**
|
|
330
|
-
* Thrown when uniqueness constraint is violated.
|
|
331
|
-
*/
|
|
332
|
-
declare class UniquenessError extends TypeGraphError {
|
|
333
|
-
readonly details: UniquenessErrorDetails;
|
|
334
|
-
constructor(details: UniquenessErrorDetails, options?: {
|
|
335
|
-
cause?: unknown;
|
|
336
|
-
});
|
|
337
|
-
}
|
|
338
|
-
/**
|
|
339
|
-
* Details for CardinalityError.
|
|
340
|
-
*/
|
|
341
|
-
type CardinalityErrorDetails = Readonly<{
|
|
342
|
-
edgeKind: string;
|
|
343
|
-
fromKind: string;
|
|
344
|
-
fromId: string;
|
|
345
|
-
cardinality: string;
|
|
346
|
-
existingCount: number;
|
|
347
|
-
}>;
|
|
348
|
-
/**
|
|
349
|
-
* Thrown when cardinality constraint is violated.
|
|
350
|
-
*/
|
|
351
|
-
declare class CardinalityError extends TypeGraphError {
|
|
352
|
-
readonly details: CardinalityErrorDetails;
|
|
353
|
-
constructor(details: CardinalityErrorDetails, options?: {
|
|
354
|
-
cause?: unknown;
|
|
355
|
-
});
|
|
356
|
-
}
|
|
357
|
-
/**
|
|
358
|
-
* Details for DisjointError.
|
|
359
|
-
*/
|
|
360
|
-
type DisjointErrorDetails = Readonly<{
|
|
361
|
-
nodeId: string;
|
|
362
|
-
attemptedKind: string;
|
|
363
|
-
conflictingKind: string;
|
|
364
|
-
}>;
|
|
365
|
-
/**
|
|
366
|
-
* Thrown when disjointness constraint is violated.
|
|
367
|
-
*
|
|
368
|
-
* Disjoint types cannot share the same ID - a node cannot be both
|
|
369
|
-
* a Person and an Organization if they are declared disjoint.
|
|
370
|
-
*/
|
|
371
|
-
declare class DisjointError extends TypeGraphError {
|
|
372
|
-
readonly details: DisjointErrorDetails;
|
|
373
|
-
constructor(details: DisjointErrorDetails, options?: {
|
|
374
|
-
cause?: unknown;
|
|
375
|
-
});
|
|
376
|
-
}
|
|
377
|
-
type IdentityContradictionErrorDetails = Readonly<{
|
|
378
|
-
/**
|
|
379
|
-
* The identity write that could not stand. `merge` is the post-write
|
|
380
|
-
* affected-class assertion a graph merge runs inside its commit
|
|
381
|
-
* transaction, which names the whole merge rather than a single assertion
|
|
382
|
-
* because the contradiction is a property of the state the merge would
|
|
383
|
-
* leave behind.
|
|
384
|
-
*/
|
|
385
|
-
operation: "assertSame" | "assertDifferent" | "fold" | "import" | "merge";
|
|
386
|
-
a: Readonly<{
|
|
387
|
-
kind: string;
|
|
388
|
-
id: string;
|
|
389
|
-
}>;
|
|
390
|
-
b: Readonly<{
|
|
391
|
-
kind: string;
|
|
392
|
-
id: string;
|
|
393
|
-
}>;
|
|
394
|
-
reason: "different-assertion" | "same-class" | "disjoint-kinds";
|
|
395
|
-
conflictingAssertionId?: string;
|
|
396
|
-
conflictingKinds?: readonly [string, string];
|
|
397
|
-
}>;
|
|
398
|
-
/** Thrown when an identity mutation would make the ledger contradictory. */
|
|
399
|
-
declare class IdentityContradictionError extends TypeGraphError {
|
|
400
|
-
readonly details: IdentityContradictionErrorDetails;
|
|
401
|
-
constructor(details: IdentityContradictionErrorDetails, options?: Readonly<{
|
|
402
|
-
cause?: unknown;
|
|
403
|
-
}>);
|
|
404
|
-
}
|
|
405
|
-
type IdentityValidityWindowErrorDetails = Readonly<{
|
|
406
|
-
reason: "future-valid-from" | "future-valid-to" | "inverted" | "overlapping-open-window";
|
|
407
|
-
validFrom: string;
|
|
408
|
-
validTo?: string;
|
|
409
|
-
operationInstant: string;
|
|
410
|
-
}>;
|
|
411
|
-
/** Thrown when an identity assertion validity window cannot be applied. */
|
|
412
|
-
declare class IdentityValidityWindowError extends TypeGraphError {
|
|
413
|
-
readonly details: IdentityValidityWindowErrorDetails;
|
|
414
|
-
constructor(details: IdentityValidityWindowErrorDetails);
|
|
415
|
-
}
|
|
416
|
-
type IdentityEndpointValidityErrorDetails = Readonly<{
|
|
417
|
-
endpoint: Readonly<{
|
|
418
|
-
kind: string;
|
|
419
|
-
id: string;
|
|
420
|
-
}>;
|
|
421
|
-
assertionWindow: Readonly<{
|
|
422
|
-
validFrom: string;
|
|
423
|
-
validTo?: string;
|
|
424
|
-
}>;
|
|
425
|
-
endpointWindow: Readonly<{
|
|
426
|
-
validFrom?: string;
|
|
427
|
-
validTo?: string;
|
|
428
|
-
deletedAt?: string;
|
|
429
|
-
}>;
|
|
430
|
-
}>;
|
|
431
|
-
/** Thrown when an identity endpoint does not exist throughout the assertion window. */
|
|
432
|
-
declare class IdentityEndpointValidityError extends TypeGraphError {
|
|
433
|
-
readonly details: IdentityEndpointValidityErrorDetails;
|
|
434
|
-
constructor(details: IdentityEndpointValidityErrorDetails);
|
|
435
|
-
}
|
|
436
|
-
type IdentitySeparationViolationErrorDetails = Readonly<{
|
|
437
|
-
graphId: string;
|
|
438
|
-
/**
|
|
439
|
-
* `"database"` when the CHECK constraint on the separation relation aborted
|
|
440
|
-
* the write — the backstop firing as designed. `"writer"` when the write was
|
|
441
|
-
* accepted, which means the relation was provisioned without its constraint
|
|
442
|
-
* and only the writer's own re-check caught the contradiction.
|
|
443
|
-
*/
|
|
444
|
-
enforcedBy: "database" | "writer";
|
|
445
|
-
/** The single class key both endpoints collapsed onto. */
|
|
446
|
-
classKey: string;
|
|
447
|
-
/** The `different` assertion whose endpoints landed in one class. */
|
|
448
|
-
assertionId: string;
|
|
449
|
-
a: Readonly<{
|
|
450
|
-
kind: string;
|
|
451
|
-
id: string;
|
|
452
|
-
}>;
|
|
453
|
-
b: Readonly<{
|
|
454
|
-
kind: string;
|
|
455
|
-
id: string;
|
|
456
|
-
}>;
|
|
457
|
-
}>;
|
|
458
|
-
/**
|
|
459
|
-
* Thrown when the derived separation relation refuses a write that would place
|
|
460
|
-
* both endpoints of a current `different` assertion in one identity class.
|
|
461
|
-
*
|
|
462
|
-
* This is the database-level backstop beneath the plan-time simulation and the
|
|
463
|
-
* applier's validation. Reaching it means an earlier layer let a contradiction
|
|
464
|
-
* through: the transaction is aborted rather than committed, but the layer that
|
|
465
|
-
* should have refused it typed and early is worth investigating.
|
|
466
|
-
*/
|
|
467
|
-
declare class IdentitySeparationViolationError extends TypeGraphError {
|
|
468
|
-
readonly details: IdentitySeparationViolationErrorDetails;
|
|
469
|
-
constructor(details: IdentitySeparationViolationErrorDetails, options?: Readonly<{
|
|
470
|
-
cause?: unknown;
|
|
471
|
-
}>);
|
|
472
|
-
}
|
|
473
|
-
/**
|
|
474
|
-
* Details for RestrictedDeleteError.
|
|
475
|
-
*/
|
|
476
|
-
type RestrictedDeleteErrorDetails = Readonly<{
|
|
477
|
-
nodeKind: string;
|
|
478
|
-
nodeId: string;
|
|
479
|
-
edgeCount: number;
|
|
480
|
-
edgeKinds: readonly string[];
|
|
481
|
-
}>;
|
|
482
|
-
/**
|
|
483
|
-
* Thrown when deletion is blocked due to existing edges (restrict behavior).
|
|
484
|
-
*/
|
|
485
|
-
declare class RestrictedDeleteError extends TypeGraphError {
|
|
486
|
-
readonly details: RestrictedDeleteErrorDetails;
|
|
487
|
-
constructor(details: RestrictedDeleteErrorDetails, options?: {
|
|
488
|
-
cause?: unknown;
|
|
489
|
-
});
|
|
490
|
-
}
|
|
491
|
-
/**
|
|
492
|
-
* Details for VersionConflictError.
|
|
493
|
-
*/
|
|
494
|
-
type VersionConflictErrorDetails = Readonly<{
|
|
495
|
-
kind: string;
|
|
496
|
-
id: string;
|
|
497
|
-
expectedVersion: number;
|
|
498
|
-
actualVersion: number;
|
|
499
|
-
}>;
|
|
500
|
-
/**
|
|
501
|
-
* Thrown when optimistic locking detects a concurrent modification.
|
|
502
|
-
*
|
|
503
|
-
* This occurs when two operations try to update the same entity simultaneously.
|
|
504
|
-
* The operation with the stale version fails.
|
|
505
|
-
*/
|
|
506
|
-
declare class VersionConflictError extends TypeGraphError {
|
|
507
|
-
readonly details: VersionConflictErrorDetails;
|
|
508
|
-
constructor(details: VersionConflictErrorDetails, options?: {
|
|
509
|
-
cause?: unknown;
|
|
510
|
-
});
|
|
511
|
-
}
|
|
512
|
-
/**
|
|
513
|
-
* Details for SchemaMismatchError.
|
|
514
|
-
*/
|
|
515
|
-
type SchemaMismatchErrorDetails = Readonly<{
|
|
516
|
-
graphId: string;
|
|
517
|
-
expectedHash: string;
|
|
518
|
-
actualHash: string;
|
|
519
|
-
}>;
|
|
520
|
-
/**
|
|
521
|
-
* Thrown when the schema in code doesn't match the schema in the database.
|
|
522
|
-
*/
|
|
523
|
-
declare class SchemaMismatchError extends TypeGraphError {
|
|
524
|
-
readonly details: SchemaMismatchErrorDetails;
|
|
525
|
-
constructor(details: SchemaMismatchErrorDetails, options?: {
|
|
526
|
-
cause?: unknown;
|
|
527
|
-
});
|
|
528
|
-
}
|
|
529
|
-
/**
|
|
530
|
-
* Details for MigrationError.
|
|
531
|
-
*/
|
|
532
|
-
/**
|
|
533
|
-
* Why a migration operation failed. A stable discriminant so callers can
|
|
534
|
-
* branch on the outcome instead of matching the message text, which is free
|
|
535
|
-
* to be reworded in any release.
|
|
536
|
-
*/
|
|
537
|
-
declare const MIGRATION_FAILURE_REASONS: readonly ["schema-behind", "breaking-change", "no-active-version", "version-not-found", "kind-removal"];
|
|
538
|
-
type MigrationFailureReason = (typeof MIGRATION_FAILURE_REASONS)[number];
|
|
539
|
-
/**
|
|
540
|
-
* Structured context for a {@link MigrationError}, discriminated on `reason`.
|
|
541
|
-
*
|
|
542
|
-
* Modelled as a union rather than one shape with optional fields so the
|
|
543
|
-
* payload a reason promises is the payload it must carry: narrowing on
|
|
544
|
-
* `reason === "kind-removal"` gives you a non-optional `droppedKinds`, and the
|
|
545
|
-
* constructor cannot be handed a `kind-removal` without one.
|
|
546
|
-
*
|
|
547
|
-
* The common fields are repeated per member rather than factored into a shared
|
|
548
|
-
* base alias, which would be a hoisted-unexported symbol on the public
|
|
549
|
-
* entrypoint.
|
|
550
|
-
*/
|
|
551
|
-
type MigrationErrorDetails = Readonly<{
|
|
552
|
-
graphId: string;
|
|
553
|
-
fromVersion: number;
|
|
554
|
-
toVersion: number;
|
|
555
|
-
/** Stable discriminant — branch on this, not the message. */
|
|
556
|
-
reason: "schema-behind" | "breaking-change";
|
|
557
|
-
/**
|
|
558
|
-
* The structured diff behind the failure. Carries per-change `severity`
|
|
559
|
-
* alongside `hasChanges` / `hasBreakingChanges`, so a caller can decide
|
|
560
|
-
* "additive → proceed, incompatible → ask the user" without re-querying.
|
|
561
|
-
*/
|
|
562
|
-
diff?: SchemaDiff;
|
|
563
|
-
}> | Readonly<{
|
|
564
|
-
graphId: string;
|
|
565
|
-
fromVersion: number;
|
|
566
|
-
toVersion: number;
|
|
567
|
-
reason: "no-active-version" | "version-not-found";
|
|
568
|
-
}> | Readonly<{
|
|
569
|
-
graphId: string;
|
|
570
|
-
fromVersion: number;
|
|
571
|
-
toVersion: number;
|
|
572
|
-
reason: "kind-removal";
|
|
573
|
-
/**
|
|
574
|
-
* The dropped kinds that still held rows, and so caused the refusal. A
|
|
575
|
-
* kind the commit drops but that is already empty is permitted and does
|
|
576
|
-
* NOT appear here. Both lists are sorted; at least one is non-empty.
|
|
577
|
-
*/
|
|
578
|
-
droppedKinds: Readonly<{
|
|
579
|
-
nodes: readonly string[];
|
|
580
|
-
edges: readonly string[];
|
|
581
|
-
}>;
|
|
582
|
-
}>;
|
|
583
|
-
/**
|
|
584
|
-
* Thrown when schema migration fails.
|
|
585
|
-
*/
|
|
586
|
-
declare class MigrationError extends TypeGraphError {
|
|
587
|
-
readonly details: MigrationErrorDetails;
|
|
588
|
-
constructor(message: string, details: MigrationErrorDetails, options?: {
|
|
589
|
-
cause?: unknown;
|
|
590
|
-
});
|
|
591
|
-
}
|
|
592
|
-
/**
|
|
593
|
-
* Details for EagerMaterializationError.
|
|
594
|
-
*/
|
|
595
|
-
type EagerMaterializationErrorDetails = Readonly<{
|
|
596
|
-
graphId: string;
|
|
597
|
-
failedIndexNames: readonly string[];
|
|
598
|
-
}>;
|
|
599
|
-
/**
|
|
600
|
-
* Thrown by `Store.evolve(extension, { eager })` when the schema
|
|
601
|
-
* commit succeeded but the follow-on `materializeIndexes()` produced
|
|
602
|
-
* one or more failed entries.
|
|
603
|
-
*
|
|
604
|
-
* Recovery: the schema commit is NOT rolled back. The new `Store` is
|
|
605
|
-
* fully constructed and (when `options.ref` was supplied) `ref.current`
|
|
606
|
-
* already points to it — the caller can read the new store via the ref
|
|
607
|
-
* and decide how to handle the failed indexes (retry, skip, alert).
|
|
608
|
-
* The full `MaterializeIndexesResult` is attached as `.materialization`.
|
|
609
|
-
*
|
|
610
|
-
* @example
|
|
611
|
-
* ```ts
|
|
612
|
-
* const ref = { current: store };
|
|
613
|
-
* try {
|
|
614
|
-
* await store.evolve(extension, { ref, eager: {} });
|
|
615
|
-
* } catch (error) {
|
|
616
|
-
* if (error instanceof EagerMaterializationError) {
|
|
617
|
-
* // schema is committed; ref.current is the new store
|
|
618
|
-
* log.warn(
|
|
619
|
-
* { failed: error.failedIndexNames },
|
|
620
|
-
* "indexes did not materialize; will retry",
|
|
621
|
-
* );
|
|
622
|
-
* await ref.current.materializeIndexes();
|
|
623
|
-
* } else {
|
|
624
|
-
* throw error;
|
|
625
|
-
* }
|
|
626
|
-
* }
|
|
627
|
-
* ```
|
|
628
|
-
*/
|
|
629
|
-
declare class EagerMaterializationError extends TypeGraphError {
|
|
630
|
-
readonly details: EagerMaterializationErrorDetails;
|
|
631
|
-
/**
|
|
632
|
-
* The full materialization result, including successful and failed
|
|
633
|
-
* entries. Same shape as `Store.materializeIndexes()` returns.
|
|
634
|
-
*/
|
|
635
|
-
readonly materialization: MaterializeIndexesResult;
|
|
636
|
-
constructor(materialization: MaterializeIndexesResult, graphId: string);
|
|
637
|
-
/**
|
|
638
|
-
* Names of just the indexes that failed — derived from
|
|
639
|
-
* `materialization.results` so the two views can never disagree.
|
|
640
|
-
*/
|
|
641
|
-
get failedIndexNames(): readonly string[];
|
|
642
|
-
}
|
|
643
|
-
/**
|
|
644
|
-
* Details for StaleVersionError. `actual` is the active version the rejecting
|
|
645
|
-
* read observed, and is `0` only when the graph genuinely has no active version
|
|
646
|
-
* (an initial-commit race where another writer initialized first, or a graph
|
|
647
|
-
* whose schema rows were removed out of band). A concurrent advance always
|
|
648
|
-
* reports the newly active version, so `0` is a reliable signal of absence
|
|
649
|
-
* rather than of contention.
|
|
650
|
-
*/
|
|
651
|
-
type StaleVersionErrorDetails = Readonly<{
|
|
652
|
-
graphId: string;
|
|
653
|
-
expected: number;
|
|
654
|
-
actual: number;
|
|
655
|
-
}>;
|
|
656
|
-
/**
|
|
657
|
-
* Thrown by `commitSchemaVersion`, `setActiveVersion`, and the schema write
|
|
658
|
-
* fence a schema-managed Store write takes, when the caller's view of the
|
|
659
|
-
* active schema version is out of date — another writer has already advanced
|
|
660
|
-
* it.
|
|
661
|
-
*
|
|
662
|
-
* Recovery: re-read the active version with `getActiveSchema(graphId)`,
|
|
663
|
-
* recompute against the new baseline, and retry. This is a routine
|
|
664
|
-
* concurrency signal, not a bug.
|
|
665
|
-
*/
|
|
666
|
-
declare class StaleVersionError extends TypeGraphError {
|
|
667
|
-
readonly details: StaleVersionErrorDetails;
|
|
668
|
-
constructor(details: StaleVersionErrorDetails, options?: {
|
|
669
|
-
cause?: unknown;
|
|
670
|
-
});
|
|
671
|
-
}
|
|
672
|
-
/**
|
|
673
|
-
* Details for SchemaContentConflictError.
|
|
674
|
-
*/
|
|
675
|
-
type SchemaContentConflictErrorDetails = Readonly<{
|
|
676
|
-
graphId: string;
|
|
677
|
-
version: number;
|
|
678
|
-
existingHash: string;
|
|
679
|
-
incomingHash: string;
|
|
680
|
-
}>;
|
|
681
|
-
/**
|
|
682
|
-
* Thrown by `commitSchemaVersion` when a row already exists at the
|
|
683
|
-
* target version with a *different* schema hash — i.e. two writers
|
|
684
|
-
* committed materially different schemas at the same version number.
|
|
685
|
-
*
|
|
686
|
-
* Distinct from `StaleVersionError`: this is not a refetch-and-retry
|
|
687
|
-
* situation, it's a content disagreement that needs operator
|
|
688
|
-
* intervention. Typically caused by inconsistent application
|
|
689
|
-
* deployments writing schemas that hash differently.
|
|
690
|
-
*/
|
|
691
|
-
declare class SchemaContentConflictError extends TypeGraphError {
|
|
692
|
-
readonly details: SchemaContentConflictErrorDetails;
|
|
693
|
-
constructor(details: SchemaContentConflictErrorDetails, options?: {
|
|
694
|
-
cause?: unknown;
|
|
695
|
-
});
|
|
696
|
-
}
|
|
697
|
-
/**
|
|
698
|
-
* Thrown when graph configuration is invalid.
|
|
699
|
-
*
|
|
700
|
-
* This includes invalid schema definitions, ontology conflicts,
|
|
701
|
-
* and other configuration issues detected at graph creation time.
|
|
702
|
-
*/
|
|
703
|
-
declare class ConfigurationError extends TypeGraphError {
|
|
704
|
-
constructor(message: string, details?: Record<string, unknown>, options?: {
|
|
705
|
-
cause?: unknown;
|
|
706
|
-
suggestion?: string;
|
|
707
|
-
});
|
|
708
|
-
}
|
|
709
|
-
/**
|
|
710
|
-
* Why a destructive contribution rebuild is refused.
|
|
711
|
-
*
|
|
712
|
-
* - `vector-source-unavailable` — the projection is vector storage.
|
|
713
|
-
* TypeGraph stores caller-supplied embeddings and nothing else: the
|
|
714
|
-
* vectors exist only in the table a rebuild would drop, so there is no
|
|
715
|
-
* source to reconstruct them from. Dropping anyway would silently
|
|
716
|
-
* destroy the embeddings and hand back storage that looks healthy and
|
|
717
|
-
* returns nothing. `store.reembedVectorField(kind, fieldPath, {
|
|
718
|
-
* embed })` is the sanctioned destructive path — it takes the callback
|
|
719
|
-
* that can regenerate what the drop destroys.
|
|
720
|
-
* - `no-drop-ddl` — the active strategy declares no `dropDdl` for the
|
|
721
|
-
* contribution, so TypeGraph does not know how to tear its storage
|
|
722
|
-
* down. Synthesizing a `DROP TABLE` from the resolved name would
|
|
723
|
-
* guess at a teardown the strategy never sanctioned.
|
|
724
|
-
* - `no-schema-fence` — the backend exposes no transactional schema
|
|
725
|
-
* fence (`schemaWriteTransaction`), so the drop, recreate, refill, and
|
|
726
|
-
* stamp could not be made atomic. Running them unfenced could leave
|
|
727
|
-
* storage attested but empty, or a concurrent schema writer
|
|
728
|
-
* interleaved with the drop.
|
|
729
|
-
* - `shared-storage-in-use` — the contribution's recorded shape is stale,
|
|
730
|
-
* so only recreating its storage repairs it, but that storage is one
|
|
731
|
-
* table holding other graphs' rows as well. Their content is derived
|
|
732
|
-
* from their own nodes through their own schemas, so this process cannot
|
|
733
|
-
* put it back. A rebuild that dropped anyway would leave every other
|
|
734
|
-
* graph's search silently empty; one that re-stamped this graph's marker
|
|
735
|
-
* without the drop would bless a physical shape nothing verified.
|
|
736
|
-
*/
|
|
737
|
-
type ContributionRebuildRefusal = "vector-source-unavailable" | "no-drop-ddl" | "no-schema-fence" | "shared-storage-in-use";
|
|
738
|
-
/**
|
|
739
|
-
* Thrown when `store.rebuildContribution()` cannot honor a rebuild.
|
|
740
|
-
*
|
|
741
|
-
* A refusal, never a partial attempt: nothing has been dropped when this
|
|
742
|
-
* throws. The point is that the alternative — proceeding — destroys data
|
|
743
|
-
* that cannot be reconstructed, so the operation declines instead of
|
|
744
|
-
* quietly doing less than its name promises.
|
|
745
|
-
*/
|
|
746
|
-
declare class ContributionRebuildUnsupportedError extends TypeGraphError {
|
|
747
|
-
readonly reason: ContributionRebuildRefusal;
|
|
748
|
-
constructor(reason: ContributionRebuildRefusal, details?: Readonly<Record<string, unknown>>, options?: {
|
|
749
|
-
cause?: unknown;
|
|
750
|
-
});
|
|
751
|
-
}
|
|
752
|
-
/**
|
|
753
|
-
* Thrown when an iterative graph algorithm exhausts its caller-visible round
|
|
754
|
-
* budget before reaching its convergence predicate.
|
|
755
|
-
*/
|
|
756
|
-
declare class GraphAlgorithmConvergenceError extends TypeGraphError {
|
|
757
|
-
constructor(algorithm: string, maxIterations: number, options?: Readonly<{
|
|
758
|
-
oscillating?: boolean;
|
|
759
|
-
}>);
|
|
760
|
-
}
|
|
761
|
-
/** Stable reasons a weighted traversal can reject an edge's weight value. */
|
|
762
|
-
type InvalidEdgeWeightReason = "missing" | "negative" | "non_numeric" | "out_of_range";
|
|
763
|
-
/** Details for InvalidEdgeWeightError. */
|
|
764
|
-
type InvalidEdgeWeightErrorDetails = Readonly<{
|
|
765
|
-
/** Id of the first offending edge, in binary-collation order. */
|
|
766
|
-
edgeId: string;
|
|
767
|
-
/** Kind of the offending edge. */
|
|
768
|
-
edgeKind: string;
|
|
769
|
-
/** The audited weight property. */
|
|
770
|
-
property: string;
|
|
771
|
-
/** Why the weight was rejected. */
|
|
772
|
-
reason: InvalidEdgeWeightReason;
|
|
773
|
-
/** The offending value, when one was present and renderable. */
|
|
774
|
-
value?: string;
|
|
775
|
-
}>;
|
|
776
|
-
/**
|
|
777
|
-
* Thrown when a weighted graph algorithm finds an edge whose weight property
|
|
778
|
-
* violates the weighted-traversal contract (missing without a default,
|
|
779
|
-
* non-numeric, or negative). Raised before any traversal rounds run, so a
|
|
780
|
-
* weighted call either observes a fully valid weight domain or fails fast.
|
|
781
|
-
*/
|
|
782
|
-
declare class InvalidEdgeWeightError extends TypeGraphError {
|
|
783
|
-
readonly details: InvalidEdgeWeightErrorDetails;
|
|
784
|
-
constructor(details: InvalidEdgeWeightErrorDetails);
|
|
785
|
-
}
|
|
786
|
-
/** Thrown when an operation requires a backend capability it does not expose. */
|
|
787
|
-
declare class UnsupportedBackendCapabilityError extends TypeGraphError {
|
|
788
|
-
constructor(operation: string, capability: string, details?: Readonly<Record<string, unknown>>, suggestion?: string);
|
|
789
|
-
}
|
|
790
|
-
/** Stable reasons an intentionally trusted initial import can be rejected. */
|
|
791
|
-
type TrustedImportErrorReason = "backend_unsupported" | "database_not_empty" | "fulltext_unsupported" | "history_unsupported" | "identity_unsupported" | "invalid_stream" | "revision_tracking_unsupported" | "uniqueness_unsupported" | "vector_unsupported";
|
|
792
|
-
/** Thrown when the trusted initial-import contract is unavailable or violated. */
|
|
793
|
-
declare class TrustedImportError extends TypeGraphError {
|
|
794
|
-
constructor(message: string, reason: TrustedImportErrorReason, details?: Readonly<Record<string, unknown>>, options?: Readonly<{
|
|
795
|
-
cause?: unknown;
|
|
796
|
-
suggestion?: string;
|
|
797
|
-
}>);
|
|
798
|
-
}
|
|
799
|
-
/**
|
|
800
|
-
* Thrown to a graph export stream's consumer when the caller's `AbortSignal`
|
|
801
|
-
* settled the stream instead of it reaching its end.
|
|
802
|
-
*
|
|
803
|
-
* Raised only after the export has given back everything it took, so receiving
|
|
804
|
-
* it means the connection is already usable again. WHAT it took depends on the
|
|
805
|
-
* backend: an export on one reporting `capabilities.transactions` holds a
|
|
806
|
-
* repeatable-read snapshot (and, on a serialized connection, that connection's
|
|
807
|
-
* stream lease), and both are settled before this is thrown; an export on a
|
|
808
|
-
* backend without transactions holds neither, and its remaining reads are
|
|
809
|
-
* simply abandoned — its already-delivered chunks were never one snapshot to
|
|
810
|
-
* begin with. The message says which case applies. `cause` carries the signal's
|
|
811
|
-
* own `reason` when the caller supplied one.
|
|
812
|
-
*/
|
|
813
|
-
declare class ExportStreamCancelledError extends TypeGraphError {
|
|
814
|
-
constructor(message: string, details?: Readonly<Record<string, unknown>>, options?: Readonly<{
|
|
815
|
-
cause?: unknown;
|
|
816
|
-
suggestion?: string;
|
|
817
|
-
}>);
|
|
818
|
-
}
|
|
819
|
-
/**
|
|
820
|
-
* Thrown when an export stream's consumer leaves a delivered chunk
|
|
821
|
-
* unacknowledged for longer than its configured idle timeout.
|
|
822
|
-
*
|
|
823
|
-
* The timeout measures consumer idleness only: it starts when a chunk is
|
|
824
|
-
* yielded and stops when the consumer asks for the next one. Receiving this
|
|
825
|
-
* error means the timed-out export has settled its snapshot transaction and
|
|
826
|
-
* released any serialized connection lease it held. `details.idleTimeoutMs`
|
|
827
|
-
* carries the configured bound.
|
|
828
|
-
*/
|
|
829
|
-
declare class ExportStreamIdleTimeoutError extends TypeGraphError {
|
|
830
|
-
constructor(graphId: string, idleTimeoutMs: number, transactional: boolean);
|
|
831
|
-
}
|
|
832
|
-
/**
|
|
833
|
-
* The stable `details.code` values raised by the recorded-capture guards on a
|
|
834
|
-
* history- or revision-tracked store. These are the sanctioned branch points
|
|
835
|
-
* for a portable caller that must pick a transaction strategy without
|
|
836
|
-
* substring-matching {@link ConfigurationError} messages.
|
|
837
|
-
*
|
|
838
|
-
* - `RECORDED_CAPTURE_REQUIRES_CALLBACK_TRANSACTION`: `store.withTransaction`
|
|
839
|
-
* was called on a history-enabled store, which has no flush point before the
|
|
840
|
-
* caller commits — use `store.withRecordedTransaction` instead.
|
|
841
|
-
* - `RECORDED_CAPTURE_RAW_SQL_DISABLED`: a raw SQL escape (`tx.sql`,
|
|
842
|
-
* `backend.executeStatement`/`executeDdl`) was reached on a history-enabled
|
|
843
|
-
* store, where it would bypass recorded-time capture.
|
|
844
|
-
* - `REVISION_TRACKING_RAW_SQL_DISABLED`: the same raw SQL escape on a
|
|
845
|
-
* revision-tracked store, where it would bypass the revision anchor.
|
|
846
|
-
*
|
|
847
|
-
* @see isRecordedCaptureGuardError
|
|
848
|
-
*/
|
|
849
|
-
declare const RECORDED_CAPTURE_GUARD_CODES: readonly ["RECORDED_CAPTURE_REQUIRES_CALLBACK_TRANSACTION", "RECORDED_CAPTURE_RAW_SQL_DISABLED", "REVISION_TRACKING_RAW_SQL_DISABLED"];
|
|
850
|
-
/** A stable, branchable code raised by a recorded-capture guard. */
|
|
851
|
-
type RecordedCaptureGuardCode = (typeof RECORDED_CAPTURE_GUARD_CODES)[number];
|
|
852
|
-
/**
|
|
853
|
-
* A {@link ConfigurationError} narrowed to carry a {@link RecordedCaptureGuardCode}
|
|
854
|
-
* in `details.code` — the shape {@link isRecordedCaptureGuardError} guarantees.
|
|
855
|
-
* `C` narrows `details.code` to a single code when the guard was called with a
|
|
856
|
-
* specific one; it defaults to the full union.
|
|
857
|
-
*/
|
|
858
|
-
type RecordedCaptureGuardError<C extends RecordedCaptureGuardCode = RecordedCaptureGuardCode> = ConfigurationError & Readonly<{
|
|
859
|
-
details: Readonly<{
|
|
860
|
-
code: C;
|
|
861
|
-
}>;
|
|
862
|
-
}>;
|
|
863
|
-
/**
|
|
864
|
-
* Type guard for the recorded-capture guard errors, so a portable caller can
|
|
865
|
-
* branch on the invariant a store enforced instead of substring-matching the
|
|
866
|
-
* message. Pass `code` to narrow to a single guard; omit it to match any.
|
|
867
|
-
*
|
|
868
|
-
* Distinguishes "history capture forbids raw SQL here" from "this backend has
|
|
869
|
-
* no transactions" (the latter carries no guard code — see
|
|
870
|
-
* `TransactionContext.sqlAvailability` for the capability discriminant).
|
|
871
|
-
*
|
|
872
|
-
* Passing `code` also narrows `details.code` to that literal on the guarded
|
|
873
|
-
* branch, so a caller can read the payload without re-checking.
|
|
874
|
-
*
|
|
875
|
-
* @example
|
|
876
|
-
* ```typescript
|
|
877
|
-
* // `withTransaction` is a compile error on a history-enabled store, so widen
|
|
878
|
-
* // to the base Store surface to reach the runtime guard this branches on.
|
|
879
|
-
* const store: Store<typeof graph> = historyStore;
|
|
880
|
-
* try {
|
|
881
|
-
* store.withTransaction(externalTx);
|
|
882
|
-
* } catch (error) {
|
|
883
|
-
* if (
|
|
884
|
-
* isRecordedCaptureGuardError(
|
|
885
|
-
* error,
|
|
886
|
-
* "RECORDED_CAPTURE_REQUIRES_CALLBACK_TRANSACTION",
|
|
887
|
-
* )
|
|
888
|
-
* ) {
|
|
889
|
-
* // error.details.code is now the literal, not the union.
|
|
890
|
-
* await historyStore.withRecordedTransaction(externalTx, run);
|
|
891
|
-
* } else {
|
|
892
|
-
* throw error;
|
|
893
|
-
* }
|
|
894
|
-
* }
|
|
895
|
-
* ```
|
|
896
|
-
*/
|
|
897
|
-
declare function isRecordedCaptureGuardError<C extends RecordedCaptureGuardCode>(error: unknown, code: C): error is RecordedCaptureGuardError<C>;
|
|
898
|
-
declare function isRecordedCaptureGuardError(error: unknown): error is RecordedCaptureGuardError;
|
|
899
|
-
/**
|
|
900
|
-
* Why a store's strategy-owned storage is not usable on the current
|
|
901
|
-
* connection. Drives the {@link StoreNotInitializedError} message and
|
|
902
|
-
* is surfaced in `details.reason` for programmatic handling.
|
|
903
|
-
*
|
|
904
|
-
* - `missing`: no durable materialization marker exists — the database
|
|
905
|
-
* was never initialized for this graph's runtime contributions.
|
|
906
|
-
* - `stale`: a marker exists but its recorded signature no longer
|
|
907
|
-
* matches the resolved contribution DDL (strategy swap or DDL drift).
|
|
908
|
-
* The hot path refuses rather than silently re-materializing.
|
|
909
|
-
* - `failed`: the most recent boot-time materialization attempt
|
|
910
|
-
* recorded an error. Boot may retry; the hot path refuses.
|
|
911
|
-
*/
|
|
912
|
-
type StoreNotInitializedReason = "missing" | "stale" | "failed";
|
|
913
|
-
/**
|
|
914
|
-
* Details for StoreNotInitializedError. `graphId`/`reason` are always
|
|
915
|
-
* present; callers may merge additional context (e.g. `logicalName`) via
|
|
916
|
-
* `options.details`.
|
|
917
|
-
*/
|
|
918
|
-
type StoreNotInitializedErrorDetails = Readonly<{
|
|
919
|
-
graphId: string;
|
|
920
|
-
reason: StoreNotInitializedReason;
|
|
921
|
-
}> & Readonly<Record<string, unknown>>;
|
|
922
|
-
/**
|
|
923
|
-
* Thrown when a fulltext- or vector-dependent operation runs against a
|
|
924
|
-
* connection whose strategy-owned storage has not been durably materialized.
|
|
925
|
-
*
|
|
926
|
-
* `createStore()` is a synchronous, zero-I/O attach: it never creates
|
|
927
|
-
* tables, repairs DDL, or writes materialization markers. The durable
|
|
928
|
-
* marker is written exclusively by the async boot path
|
|
929
|
-
* (`createStoreWithSchema`). When a fulltext or embedding read/write — or
|
|
930
|
-
* an adopted/business transaction — observes no valid marker, it refuses
|
|
931
|
-
* loudly here instead of lazily emitting DDL on the hot path.
|
|
932
|
-
*/
|
|
933
|
-
declare class StoreNotInitializedError extends TypeGraphError {
|
|
934
|
-
readonly details: StoreNotInitializedErrorDetails;
|
|
935
|
-
constructor(graphId: string, reason: StoreNotInitializedReason, options?: {
|
|
936
|
-
cause?: unknown;
|
|
937
|
-
details?: Readonly<Record<string, unknown>> & Readonly<{
|
|
938
|
-
graphId?: never;
|
|
939
|
-
reason?: never;
|
|
940
|
-
}>;
|
|
941
|
-
});
|
|
942
|
-
}
|
|
943
|
-
/** Details for a runtime contribution whose durable marker outlived storage. */
|
|
944
|
-
type ContributionUnavailableErrorDetails = Readonly<{
|
|
945
|
-
graphId: string;
|
|
946
|
-
logicalName: "fulltext";
|
|
947
|
-
physicalName: string;
|
|
948
|
-
state: "physical-storage-missing";
|
|
949
|
-
}>;
|
|
950
|
-
/**
|
|
951
|
-
* Thrown when a gated fulltext operation discovers that materialized storage
|
|
952
|
-
* disappeared after its durable marker recorded successful initialization.
|
|
953
|
-
*/
|
|
954
|
-
declare class ContributionUnavailableError extends TypeGraphError {
|
|
955
|
-
readonly details: ContributionUnavailableErrorDetails;
|
|
956
|
-
constructor(graphId: string, physicalName: string, options?: Readonly<{
|
|
957
|
-
cause?: unknown;
|
|
958
|
-
}>);
|
|
959
|
-
}
|
|
960
|
-
/**
|
|
961
|
-
* Details for DatabaseOperationError.
|
|
962
|
-
*/
|
|
963
|
-
type DatabaseOperationErrorDetails = Readonly<{
|
|
964
|
-
operation: string;
|
|
965
|
-
entity: string;
|
|
966
|
-
/**
|
|
967
|
-
* `"duplicate_key"` means the engine refused the write because the entity's
|
|
968
|
-
* identity is already taken — the shape a concurrent create of the same new id
|
|
969
|
-
* produces on an engine that does not serialize the two writers. It is a
|
|
970
|
-
* *classified* driver failure, so callers that own a better error for the
|
|
971
|
-
* condition (the create paths, which report it as "already exists") translate
|
|
972
|
-
* it rather than surfacing it.
|
|
973
|
-
*/
|
|
974
|
-
reason?: "no_row_returned" | "duplicate_key";
|
|
975
|
-
/**
|
|
976
|
-
* The entities the failed statement tried to insert, carried structurally so a
|
|
977
|
-
* translating caller never has to parse the driver's message for them. One
|
|
978
|
-
* element for a single insert; for a batch, every row in the failing chunk —
|
|
979
|
-
* the engine reports the collision without saying which row lost.
|
|
980
|
-
*/
|
|
981
|
-
attempted?: readonly Readonly<{
|
|
982
|
-
kind: string;
|
|
983
|
-
id: string;
|
|
984
|
-
}>[];
|
|
985
|
-
}>;
|
|
986
|
-
/**
|
|
987
|
-
* Thrown when a database operation fails unexpectedly.
|
|
988
|
-
*
|
|
989
|
-
* This indicates a system-level failure in the database backend,
|
|
990
|
-
* not a user-recoverable error.
|
|
991
|
-
*/
|
|
992
|
-
declare class DatabaseOperationError extends TypeGraphError {
|
|
993
|
-
readonly details: DatabaseOperationErrorDetails;
|
|
994
|
-
constructor(message: string, details: DatabaseOperationErrorDetails, options?: {
|
|
995
|
-
cause?: unknown;
|
|
996
|
-
});
|
|
997
|
-
}
|
|
998
|
-
/**
|
|
999
|
-
* Details for EmbeddingDimensionChangedError.
|
|
1000
|
-
*/
|
|
1001
|
-
type EmbeddingDimensionChangedErrorDetails = Readonly<{
|
|
1002
|
-
kind: string;
|
|
1003
|
-
fieldPath: string;
|
|
1004
|
-
declaredDimensions?: number;
|
|
1005
|
-
storedDimensions?: number;
|
|
1006
|
-
}>;
|
|
1007
|
-
/**
|
|
1008
|
-
* Thrown when an embedding field's declared dimension no longer matches the
|
|
1009
|
-
* dimension of its materialized per-field storage — i.e. a field's
|
|
1010
|
-
* `embedding(N)` was changed to `embedding(M)`. The stored vectors are invalid
|
|
1011
|
-
* under the new dimension and cannot be converted, only recomputed, so this is
|
|
1012
|
-
* a deliberate app-driven migration: call
|
|
1013
|
-
* `store.reembedVectorField(kind, fieldPath, ...)` to recreate the storage at
|
|
1014
|
-
* the new dimension and re-embed existing rows.
|
|
1015
|
-
*/
|
|
1016
|
-
declare class EmbeddingDimensionChangedError extends TypeGraphError {
|
|
1017
|
-
readonly details: EmbeddingDimensionChangedErrorDetails;
|
|
1018
|
-
constructor(message: string, details: EmbeddingDimensionChangedErrorDetails, options?: {
|
|
1019
|
-
cause?: unknown;
|
|
1020
|
-
});
|
|
1021
|
-
}
|
|
1022
|
-
/**
|
|
1023
|
-
* Thrown when a query predicate cannot be compiled for the target database.
|
|
1024
|
-
*/
|
|
1025
|
-
declare class UnsupportedPredicateError extends TypeGraphError {
|
|
1026
|
-
constructor(message: string, details?: Readonly<Record<string, unknown>>, options?: {
|
|
1027
|
-
cause?: unknown;
|
|
1028
|
-
suggestion?: string;
|
|
1029
|
-
});
|
|
1030
|
-
}
|
|
1031
|
-
/**
|
|
1032
|
-
* Thrown when a compiler invariant is violated.
|
|
1033
|
-
*
|
|
1034
|
-
* This indicates a bug in the query compiler — the compiler reached
|
|
1035
|
-
* a state that should be unreachable. These errors are not user-recoverable.
|
|
1036
|
-
*/
|
|
1037
|
-
declare class CompilerInvariantError extends TypeGraphError {
|
|
1038
|
-
constructor(message: string, details?: Readonly<Record<string, unknown>>, options?: {
|
|
1039
|
-
cause?: unknown;
|
|
1040
|
-
});
|
|
1041
|
-
}
|
|
1042
|
-
/**
|
|
1043
|
-
* Thrown when an operation is attempted on a backend that has been disposed.
|
|
1044
|
-
*
|
|
1045
|
-
* This typically occurs during runtime teardown — for example, when a
|
|
1046
|
-
* Cloudflare Workers test runner resets Durable Object storage while
|
|
1047
|
-
* the TypeGraph backend still has queued operations.
|
|
1048
|
-
*/
|
|
1049
|
-
declare class BackendDisposedError extends TypeGraphError {
|
|
1050
|
-
constructor(options?: {
|
|
1051
|
-
cause?: unknown;
|
|
1052
|
-
});
|
|
1053
|
-
}
|
|
1054
|
-
/**
|
|
1055
|
-
* Thrown when a statement is issued on a transaction-scoped backend after
|
|
1056
|
-
* its transaction boundary has already returned.
|
|
1057
|
-
*
|
|
1058
|
-
* The usual source is a callback that lets work escape it. `Promise.all`
|
|
1059
|
-
* rejects on its first rejection while its siblings keep running, so
|
|
1060
|
-
*
|
|
1061
|
-
* ```typescript
|
|
1062
|
-
* await store.transaction(async (tx) => {
|
|
1063
|
-
* await Promise.all([tx.nodes.Doc.create(a), tx.nodes.Doc.create(b)]);
|
|
1064
|
-
* });
|
|
1065
|
-
* ```
|
|
1066
|
-
*
|
|
1067
|
-
* leaves `b`'s remaining statements in flight when `a` fails. Those
|
|
1068
|
-
* statements have nowhere safe to go: the driver is about to emit `ROLLBACK`
|
|
1069
|
-
* on the same pinned connection and then hand it back to the pool, where a
|
|
1070
|
-
* late arrival would execute inside somebody else's transaction. TypeGraph
|
|
1071
|
-
* refuses them here instead.
|
|
1072
|
-
*
|
|
1073
|
-
* The error is normally invisible — `Promise.all` has already rejected with
|
|
1074
|
-
* the original failure, and discards this one.
|
|
1075
|
-
*/
|
|
1076
|
-
declare class TransactionClosedError extends TypeGraphError {
|
|
1077
|
-
constructor(options?: {
|
|
1078
|
-
cause?: unknown;
|
|
1079
|
-
});
|
|
1080
|
-
}
|
|
1081
|
-
/**
|
|
1082
|
-
* Type guard for TypeGraphError.
|
|
1083
|
-
*
|
|
1084
|
-
* @example
|
|
1085
|
-
* ```typescript
|
|
1086
|
-
* try {
|
|
1087
|
-
* await store.nodes.Person.create({});
|
|
1088
|
-
* } catch (error) {
|
|
1089
|
-
* if (isTypeGraphError(error)) {
|
|
1090
|
-
* console.log(error.code, error.category);
|
|
1091
|
-
* }
|
|
1092
|
-
* }
|
|
1093
|
-
* ```
|
|
1094
|
-
*/
|
|
1095
|
-
declare function isTypeGraphError(error: unknown): error is TypeGraphError;
|
|
1096
|
-
/**
|
|
1097
|
-
* Check if error is recoverable by user action (user or constraint error).
|
|
1098
|
-
*
|
|
1099
|
-
* User-recoverable errors can typically be resolved by:
|
|
1100
|
-
* - Fixing invalid input data
|
|
1101
|
-
* - Using different IDs or values
|
|
1102
|
-
* - Deleting conflicting data first
|
|
1103
|
-
*
|
|
1104
|
-
* @example
|
|
1105
|
-
* ```typescript
|
|
1106
|
-
* if (isUserRecoverable(error)) {
|
|
1107
|
-
* showErrorToUser(error.toUserMessage());
|
|
1108
|
-
* } else {
|
|
1109
|
-
* logAndAlertOps(error);
|
|
1110
|
-
* }
|
|
1111
|
-
* ```
|
|
1112
|
-
*/
|
|
1113
|
-
declare function isUserRecoverable(error: unknown): boolean;
|
|
1114
|
-
/**
|
|
1115
|
-
* Check if error indicates a system/infrastructure issue.
|
|
1116
|
-
*
|
|
1117
|
-
* System errors typically require:
|
|
1118
|
-
* - Retry logic (for transient failures)
|
|
1119
|
-
* - Investigation (for persistent failures)
|
|
1120
|
-
* - Ops team notification
|
|
1121
|
-
*/
|
|
1122
|
-
declare function isSystemError(error: unknown): boolean;
|
|
1123
|
-
/**
|
|
1124
|
-
* Check if error is a constraint violation.
|
|
1125
|
-
*/
|
|
1126
|
-
declare function isConstraintError(error: unknown): boolean;
|
|
1127
|
-
/**
|
|
1128
|
-
* Extract suggestion from error if available.
|
|
1129
|
-
*/
|
|
1130
|
-
declare function getErrorSuggestion(error: unknown): string | undefined;
|
|
1131
|
-
|
|
1132
|
-
export { type NodeIndexNotFoundErrorDetails as $, IdentityContradictionError as A, BackendDisposedError as B, CardinalityError as C, DatabaseOperationError as D, EDGE_IDENTITY_MISMATCH_CODE as E, type IdentityContradictionErrorDetails as F, GraphAlgorithmConvergenceError as G, IdentityEndpointValidityError as H, IMMUTABLE_VALIDITY_LOWER_BOUND_CODE as I, type IdentityEndpointValidityErrorDetails as J, IdentitySeparationViolationError as K, type IdentitySeparationViolationErrorDetails as L, IdentityValidityWindowError as M, type IdentityValidityWindowErrorDetails as N, InvalidEdgeWeightError as O, type InvalidEdgeWeightErrorDetails as P, type InvalidEdgeWeightReason as Q, KindNotFoundError as R, type KindNotFoundErrorDetails as S, MIGRATION_FAILURE_REASONS as T, MigrationError as U, type ValidationIssue as V, type MigrationErrorDetails as W, type MigrationFailureReason as X, NodeConstraintNotFoundError as Y, type NodeConstraintNotFoundErrorDetails as Z, NodeIndexNotFoundError as _, ValidationError as a, NodeNotFoundError as a0, type NodeNotFoundErrorDetails as a1, RECORDED_CAPTURE_GUARD_CODES as a2, type RecordedCaptureGuardCode as a3, type RecordedCaptureGuardError as a4, RestrictedDeleteError as a5, type RestrictedDeleteErrorDetails as a6, SchemaContentConflictError as a7, type SchemaContentConflictErrorDetails as a8, SchemaMismatchError as a9, type SchemaMismatchErrorDetails as aa, StaleVersionError as ab, type StaleVersionErrorDetails as ac, StoreNotInitializedError as ad, type StoreNotInitializedErrorDetails as ae, type StoreNotInitializedReason as af, TransactionClosedError as ag, TrustedImportError as ah, type TrustedImportErrorReason as ai, TypeGraphError as aj, type TypeGraphErrorOptions as ak, UniquenessError as al, type UniquenessErrorDetails as am, UnsupportedBackendCapabilityError as an, UnsupportedPredicateError as ao, type ValidationErrorDetails as ap, VersionConflictError as aq, type VersionConflictErrorDetails as ar, getErrorSuggestion as as, isConstraintError as at, isRecordedCaptureGuardError as au, isSystemError as av, isTypeGraphError as aw, isUserRecoverable as ax, type CardinalityErrorDetails as b, CompilerInvariantError as c, ConfigurationError as d, type ContributionRebuildRefusal as e, ContributionRebuildUnsupportedError as f, ContributionUnavailableError as g, type ContributionUnavailableErrorDetails as h, type DatabaseOperationErrorDetails as i, DisjointError as j, type DisjointErrorDetails as k, ENTITY_ALREADY_EXISTS_CODE as l, EagerMaterializationError as m, type EagerMaterializationErrorDetails as n, EdgeNotFoundError as o, type EdgeNotFoundErrorDetails as p, EmbeddingDimensionChangedError as q, type EmbeddingDimensionChangedErrorDetails as r, EndpointError as s, type EndpointErrorDetails as t, EndpointNotFoundError as u, type EndpointNotFoundErrorDetails as v, type ErrorCategory as w, ExportStreamCancelledError as x, ExportStreamIdleTimeoutError as y, INVERTED_VALIDITY_WINDOW_CODE as z };
|