@nicia-ai/typegraph 0.24.0 → 0.25.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.
Files changed (159) hide show
  1. package/dist/backend/postgres/index.cjs +178 -55
  2. package/dist/backend/postgres/index.cjs.map +1 -1
  3. package/dist/backend/postgres/index.d.cts +6 -7
  4. package/dist/backend/postgres/index.d.ts +6 -7
  5. package/dist/backend/postgres/index.js +151 -28
  6. package/dist/backend/postgres/index.js.map +1 -1
  7. package/dist/backend/sqlite/index.cjs +19 -17
  8. package/dist/backend/sqlite/index.d.cts +6 -7
  9. package/dist/backend/sqlite/index.d.ts +6 -7
  10. package/dist/backend/sqlite/index.js +9 -7
  11. package/dist/backend/sqlite/libsql.cjs +12 -10
  12. package/dist/backend/sqlite/libsql.cjs.map +1 -1
  13. package/dist/backend/sqlite/libsql.d.cts +4 -5
  14. package/dist/backend/sqlite/libsql.d.ts +4 -5
  15. package/dist/backend/sqlite/libsql.js +9 -7
  16. package/dist/backend/sqlite/libsql.js.map +1 -1
  17. package/dist/backend/sqlite/local.cjs +14 -12
  18. package/dist/backend/sqlite/local.cjs.map +1 -1
  19. package/dist/backend/sqlite/local.d.cts +4 -5
  20. package/dist/backend/sqlite/local.d.ts +4 -5
  21. package/dist/backend/sqlite/local.js +9 -7
  22. package/dist/backend/sqlite/local.js.map +1 -1
  23. package/dist/chunk-4BOWVUGQ.js +2029 -0
  24. package/dist/chunk-4BOWVUGQ.js.map +1 -0
  25. package/dist/{chunk-RNUNP5JD.cjs → chunk-7CDXX3QZ.cjs} +2 -2
  26. package/dist/chunk-7CDXX3QZ.cjs.map +1 -0
  27. package/dist/chunk-7V335GHG.cjs +112 -0
  28. package/dist/chunk-7V335GHG.cjs.map +1 -0
  29. package/dist/chunk-7W3KAMVQ.cjs +2678 -0
  30. package/dist/chunk-7W3KAMVQ.cjs.map +1 -0
  31. package/dist/chunk-CTHNVU6K.cjs +551 -0
  32. package/dist/chunk-CTHNVU6K.cjs.map +1 -0
  33. package/dist/chunk-D2GO3RBL.cjs +12 -0
  34. package/dist/chunk-D2GO3RBL.cjs.map +1 -0
  35. package/dist/{chunk-WFMTAEEN.js → chunk-DOTEN2FG.js} +81 -7
  36. package/dist/chunk-DOTEN2FG.js.map +1 -0
  37. package/dist/chunk-E5JZSEGJ.cjs +301 -0
  38. package/dist/chunk-E5JZSEGJ.cjs.map +1 -0
  39. package/dist/chunk-EG6TJ3I5.js +286 -0
  40. package/dist/chunk-EG6TJ3I5.js.map +1 -0
  41. package/dist/chunk-EJCDOA37.js +537 -0
  42. package/dist/chunk-EJCDOA37.js.map +1 -0
  43. package/dist/{chunk-UVZHTBZ5.cjs → chunk-EK6RJ373.cjs} +7 -150
  44. package/dist/chunk-EK6RJ373.cjs.map +1 -0
  45. package/dist/{chunk-7TU5EWQ7.js → chunk-FPCOUJSL.js} +2 -2
  46. package/dist/chunk-FPCOUJSL.js.map +1 -0
  47. package/dist/{chunk-3JK66E3I.cjs → chunk-JTI5WT4P.cjs} +630 -59
  48. package/dist/chunk-JTI5WT4P.cjs.map +1 -0
  49. package/dist/chunk-LVCSL6A3.js +2626 -0
  50. package/dist/chunk-LVCSL6A3.js.map +1 -0
  51. package/dist/chunk-NHQWXSTS.js +10 -0
  52. package/dist/chunk-NHQWXSTS.js.map +1 -0
  53. package/dist/chunk-NZ5PMBTG.js +105 -0
  54. package/dist/chunk-NZ5PMBTG.js.map +1 -0
  55. package/dist/{chunk-5HVDOPZU.cjs → chunk-O2P3KAUT.cjs} +416 -93
  56. package/dist/chunk-O2P3KAUT.cjs.map +1 -0
  57. package/dist/{chunk-GTG5J4UP.js → chunk-OJ6IQVZG.js} +151 -13
  58. package/dist/chunk-OJ6IQVZG.js.map +1 -0
  59. package/dist/{chunk-EYELZHKY.js → chunk-OOS2RKRH.js} +5 -140
  60. package/dist/chunk-OOS2RKRH.js.map +1 -0
  61. package/dist/chunk-RCAJZG67.cjs +2069 -0
  62. package/dist/chunk-RCAJZG67.cjs.map +1 -0
  63. package/dist/{chunk-O5PST6TB.cjs → chunk-W5MTHMTE.cjs} +83 -6
  64. package/dist/chunk-W5MTHMTE.cjs.map +1 -0
  65. package/dist/{chunk-EY4LBX3F.js → chunk-WI5VRP3X.js} +337 -26
  66. package/dist/chunk-WI5VRP3X.js.map +1 -0
  67. package/dist/chunk-WVQXAFP3.js +79 -0
  68. package/dist/chunk-WVQXAFP3.js.map +1 -0
  69. package/dist/chunk-X3244EKP.cjs +84 -0
  70. package/dist/chunk-X3244EKP.cjs.map +1 -0
  71. package/dist/{chunk-753F33CV.js → chunk-YZZBDCLV.js} +617 -44
  72. package/dist/chunk-YZZBDCLV.js.map +1 -0
  73. package/dist/{chunk-3MDBMCFF.cjs → chunk-ZEMNF3QK.cjs} +171 -33
  74. package/dist/chunk-ZEMNF3QK.cjs.map +1 -0
  75. package/dist/{ddl-B_H8JM-E.d.cts → ddl-B2jjLjpR.d.cts} +762 -99
  76. package/dist/{ddl-1tFIvt9V.d.ts → ddl-DpaeAKPp.d.ts} +762 -99
  77. package/dist/extension-types-D07e_NTw.d.cts +543 -0
  78. package/dist/extension-types-D07e_NTw.d.ts +543 -0
  79. package/dist/graph-extension/index.cjs +71 -0
  80. package/dist/graph-extension/index.cjs.map +1 -0
  81. package/dist/graph-extension/index.d.cts +278 -0
  82. package/dist/graph-extension/index.d.ts +278 -0
  83. package/dist/graph-extension/index.js +6 -0
  84. package/dist/graph-extension/index.js.map +1 -0
  85. package/dist/{index-DXkEXpNz.d.ts → index-CT6nvtxL.d.cts} +114 -5
  86. package/dist/{index-DXkEXpNz.d.cts → index-DQheiVQV.d.ts} +114 -5
  87. package/dist/index.cjs +2672 -901
  88. package/dist/index.cjs.map +1 -1
  89. package/dist/index.d.cts +29 -10
  90. package/dist/index.d.ts +29 -10
  91. package/dist/index.js +2248 -598
  92. package/dist/index.js.map +1 -1
  93. package/dist/indexes/index.cjs +25 -23
  94. package/dist/indexes/index.d.cts +40 -22
  95. package/dist/indexes/index.d.ts +40 -22
  96. package/dist/indexes/index.js +5 -3
  97. package/dist/interchange/index.cjs +8 -7
  98. package/dist/interchange/index.cjs.map +1 -1
  99. package/dist/interchange/index.d.cts +5 -4
  100. package/dist/interchange/index.d.ts +5 -4
  101. package/dist/interchange/index.js +3 -2
  102. package/dist/interchange/index.js.map +1 -1
  103. package/dist/{manager-Vkz28eAC.d.cts → manager-BKaPQbns.d.ts} +189 -6
  104. package/dist/{manager-nIhmttD-.d.ts → manager-BpjBW1JK.d.cts} +189 -6
  105. package/dist/materialize-indexes-BB9N5uQl.d.cts +68 -0
  106. package/dist/materialize-indexes-BYpU2RKh.d.ts +68 -0
  107. package/dist/profiler/index.cjs +10 -8
  108. package/dist/profiler/index.cjs.map +1 -1
  109. package/dist/profiler/index.d.cts +8 -7
  110. package/dist/profiler/index.d.ts +8 -7
  111. package/dist/profiler/index.js +3 -1
  112. package/dist/profiler/index.js.map +1 -1
  113. package/dist/schema/index.cjs +43 -22
  114. package/dist/schema/index.cjs.map +1 -1
  115. package/dist/schema/index.d.cts +17 -8
  116. package/dist/schema/index.d.ts +17 -8
  117. package/dist/schema/index.js +9 -4
  118. package/dist/schema/index.js.map +1 -1
  119. package/dist/{sqlite-D0aceIe0.d.cts → sqlite-CU3j6rc7.d.ts} +837 -120
  120. package/dist/{sqlite-SUxbZqfy.d.ts → sqlite-Myo8e3Lr.d.cts} +837 -120
  121. package/dist/{store-CpvwTMxV.d.cts → store-BAGuOHDh.d.cts} +659 -23
  122. package/dist/{store-U3i2tUch.d.ts → store-De98Lod4.d.ts} +659 -23
  123. package/dist/types--0EslBx5.d.cts +2123 -0
  124. package/dist/{types-qYFZ9SqD.d.ts → types-BLmJq4wI.d.ts} +3 -2
  125. package/dist/types-BNWYZ-0-.d.ts +2123 -0
  126. package/dist/{types-yH4_p0XB.d.cts → types-CYga3lZp.d.cts} +3 -2
  127. package/dist/where-CluR73rs.d.ts +11 -0
  128. package/dist/where-m1uWsdua.d.cts +11 -0
  129. package/package.json +37 -77
  130. package/dist/ast-C8S37w1A.d.ts +0 -497
  131. package/dist/ast-dgLhLOg0.d.cts +0 -497
  132. package/dist/chunk-3JK66E3I.cjs.map +0 -1
  133. package/dist/chunk-3MDBMCFF.cjs.map +0 -1
  134. package/dist/chunk-3PPEHLGK.js +0 -1116
  135. package/dist/chunk-3PPEHLGK.js.map +0 -1
  136. package/dist/chunk-5HVDOPZU.cjs.map +0 -1
  137. package/dist/chunk-753F33CV.js.map +0 -1
  138. package/dist/chunk-7TU5EWQ7.js.map +0 -1
  139. package/dist/chunk-EY4LBX3F.js.map +0 -1
  140. package/dist/chunk-EYELZHKY.js.map +0 -1
  141. package/dist/chunk-GTG5J4UP.js.map +0 -1
  142. package/dist/chunk-HRNQ3DVJ.cjs +0 -1417
  143. package/dist/chunk-HRNQ3DVJ.cjs.map +0 -1
  144. package/dist/chunk-JYUQA77I.js +0 -1381
  145. package/dist/chunk-JYUQA77I.js.map +0 -1
  146. package/dist/chunk-O5PST6TB.cjs.map +0 -1
  147. package/dist/chunk-PEE4EWXZ.cjs +0 -1131
  148. package/dist/chunk-PEE4EWXZ.cjs.map +0 -1
  149. package/dist/chunk-RNUNP5JD.cjs.map +0 -1
  150. package/dist/chunk-RS5OLGEW.js +0 -135
  151. package/dist/chunk-RS5OLGEW.js.map +0 -1
  152. package/dist/chunk-UVZHTBZ5.cjs.map +0 -1
  153. package/dist/chunk-WFMTAEEN.js.map +0 -1
  154. package/dist/chunk-WRWVWKQL.cjs +0 -147
  155. package/dist/chunk-WRWVWKQL.cjs.map +0 -1
  156. package/dist/types-C-zfYDJB.d.ts +0 -159
  157. package/dist/types-CQx4iW5Y.d.cts +0 -159
  158. package/dist/types-Qk2l3IkQ.d.cts +0 -1254
  159. package/dist/types-Qk2l3IkQ.d.ts +0 -1254
@@ -1,4 +1,5 @@
1
- import { J as JsonPointer } from './ast-dgLhLOg0.cjs';
1
+ import { K as KindEntity } from './extension-types-D07e_NTw.cjs';
2
+ import { J as JsonPointer } from './types--0EslBx5.cjs';
2
3
 
3
4
  /**
4
5
  * QueryProfiler types.
@@ -7,7 +8,7 @@ import { J as JsonPointer } from './ast-dgLhLOg0.cjs';
7
8
  * property access patterns and generates index recommendations.
8
9
  */
9
10
 
10
- type ProfileEntityType = "node" | "edge";
11
+ type ProfileEntityType = KindEntity;
11
12
  type PropertyTarget = Readonly<{
12
13
  __type: "prop";
13
14
  pointer: JsonPointer;
@@ -0,0 +1,11 @@
1
+ import { A as AnyEdgeType, N as NodeType } from './extension-types-D07e_NTw.js';
2
+ import { E as EdgeIndexConfig, a as EdgeIndexDeclaration, N as NodeIndexConfig, b as NodeIndexDeclaration, c as IndexWhereExpression } from './types-BNWYZ-0-.js';
3
+
4
+ declare function defineNodeIndex<N extends NodeType>(node: N, config: NodeIndexConfig<N>): NodeIndexDeclaration;
5
+ declare function defineEdgeIndex<E extends AnyEdgeType>(edge: E, config: EdgeIndexConfig<E>): EdgeIndexDeclaration;
6
+
7
+ declare function andWhere(...predicates: [IndexWhereExpression, ...IndexWhereExpression[]]): IndexWhereExpression;
8
+ declare function orWhere(...predicates: [IndexWhereExpression, ...IndexWhereExpression[]]): IndexWhereExpression;
9
+ declare function notWhere(predicate: IndexWhereExpression): IndexWhereExpression;
10
+
11
+ export { andWhere as a, defineNodeIndex as b, defineEdgeIndex as d, notWhere as n, orWhere as o };
@@ -0,0 +1,11 @@
1
+ import { A as AnyEdgeType, N as NodeType } from './extension-types-D07e_NTw.cjs';
2
+ import { E as EdgeIndexConfig, a as EdgeIndexDeclaration, N as NodeIndexConfig, b as NodeIndexDeclaration, c as IndexWhereExpression } from './types--0EslBx5.cjs';
3
+
4
+ declare function defineNodeIndex<N extends NodeType>(node: N, config: NodeIndexConfig<N>): NodeIndexDeclaration;
5
+ declare function defineEdgeIndex<E extends AnyEdgeType>(edge: E, config: EdgeIndexConfig<E>): EdgeIndexDeclaration;
6
+
7
+ declare function andWhere(...predicates: [IndexWhereExpression, ...IndexWhereExpression[]]): IndexWhereExpression;
8
+ declare function orWhere(...predicates: [IndexWhereExpression, ...IndexWhereExpression[]]): IndexWhereExpression;
9
+ declare function notWhere(predicate: IndexWhereExpression): IndexWhereExpression;
10
+
11
+ export { andWhere as a, defineNodeIndex as b, defineEdgeIndex as d, notWhere as n, orWhere as o };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nicia-ai/typegraph",
3
- "version": "0.24.0",
3
+ "version": "0.25.0",
4
4
  "description": "TypeScript-first embedded knowledge graph library with ontological reasoning",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -8,94 +8,54 @@
8
8
  "types": "./dist/index.d.ts",
9
9
  "exports": {
10
10
  ".": {
11
- "import": {
12
- "types": "./dist/index.d.ts",
13
- "default": "./dist/index.js"
14
- },
15
- "require": {
16
- "types": "./dist/index.d.cts",
17
- "default": "./dist/index.cjs"
18
- }
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js",
13
+ "require": "./dist/index.cjs"
19
14
  },
20
15
  "./interchange": {
21
- "import": {
22
- "types": "./dist/interchange/index.d.ts",
23
- "default": "./dist/interchange/index.js"
24
- },
25
- "require": {
26
- "types": "./dist/interchange/index.d.cts",
27
- "default": "./dist/interchange/index.cjs"
28
- }
16
+ "types": "./dist/interchange/index.d.ts",
17
+ "import": "./dist/interchange/index.js",
18
+ "require": "./dist/interchange/index.cjs"
29
19
  },
30
20
  "./profiler": {
31
- "import": {
32
- "types": "./dist/profiler/index.d.ts",
33
- "default": "./dist/profiler/index.js"
34
- },
35
- "require": {
36
- "types": "./dist/profiler/index.d.cts",
37
- "default": "./dist/profiler/index.cjs"
38
- }
21
+ "types": "./dist/profiler/index.d.ts",
22
+ "import": "./dist/profiler/index.js",
23
+ "require": "./dist/profiler/index.cjs"
39
24
  },
40
25
  "./schema": {
41
- "import": {
42
- "types": "./dist/schema/index.d.ts",
43
- "default": "./dist/schema/index.js"
44
- },
45
- "require": {
46
- "types": "./dist/schema/index.d.cts",
47
- "default": "./dist/schema/index.cjs"
48
- }
26
+ "types": "./dist/schema/index.d.ts",
27
+ "import": "./dist/schema/index.js",
28
+ "require": "./dist/schema/index.cjs"
49
29
  },
50
30
  "./indexes": {
51
- "import": {
52
- "types": "./dist/indexes/index.d.ts",
53
- "default": "./dist/indexes/index.js"
54
- },
55
- "require": {
56
- "types": "./dist/indexes/index.d.cts",
57
- "default": "./dist/indexes/index.cjs"
58
- }
31
+ "types": "./dist/indexes/index.d.ts",
32
+ "import": "./dist/indexes/index.js",
33
+ "require": "./dist/indexes/index.cjs"
34
+ },
35
+ "./graph-extension": {
36
+ "types": "./dist/graph-extension/index.d.ts",
37
+ "import": "./dist/graph-extension/index.js",
38
+ "require": "./dist/graph-extension/index.cjs"
59
39
  },
60
40
  "./sqlite": {
61
- "import": {
62
- "types": "./dist/backend/sqlite/index.d.ts",
63
- "default": "./dist/backend/sqlite/index.js"
64
- },
65
- "require": {
66
- "types": "./dist/backend/sqlite/index.d.cts",
67
- "default": "./dist/backend/sqlite/index.cjs"
68
- }
41
+ "types": "./dist/backend/sqlite/index.d.ts",
42
+ "import": "./dist/backend/sqlite/index.js",
43
+ "require": "./dist/backend/sqlite/index.cjs"
69
44
  },
70
45
  "./postgres": {
71
- "import": {
72
- "types": "./dist/backend/postgres/index.d.ts",
73
- "default": "./dist/backend/postgres/index.js"
74
- },
75
- "require": {
76
- "types": "./dist/backend/postgres/index.d.cts",
77
- "default": "./dist/backend/postgres/index.cjs"
78
- }
46
+ "types": "./dist/backend/postgres/index.d.ts",
47
+ "import": "./dist/backend/postgres/index.js",
48
+ "require": "./dist/backend/postgres/index.cjs"
79
49
  },
80
50
  "./sqlite/local": {
81
- "import": {
82
- "types": "./dist/backend/sqlite/local.d.ts",
83
- "default": "./dist/backend/sqlite/local.js"
84
- },
85
- "require": {
86
- "types": "./dist/backend/sqlite/local.d.cts",
87
- "default": "./dist/backend/sqlite/local.cjs"
88
- }
51
+ "types": "./dist/backend/sqlite/local.d.ts",
52
+ "import": "./dist/backend/sqlite/local.js",
53
+ "require": "./dist/backend/sqlite/local.cjs"
89
54
  },
90
55
  "./sqlite/libsql": {
91
- "import": {
92
- "types": "./dist/backend/sqlite/libsql.d.ts",
93
- "default": "./dist/backend/sqlite/libsql.js"
94
- },
95
- "require": {
96
- "types": "./dist/backend/sqlite/libsql.d.cts",
97
- "default": "./dist/backend/sqlite/libsql.cjs"
98
- }
56
+ "types": "./dist/backend/sqlite/libsql.d.ts",
57
+ "import": "./dist/backend/sqlite/libsql.js",
58
+ "require": "./dist/backend/sqlite/libsql.cjs"
99
59
  }
100
60
  },
101
61
  "files": [
@@ -158,10 +118,10 @@
158
118
  }
159
119
  },
160
120
  "dependencies": {
161
- "nanoid": "^5.1.9"
121
+ "nanoid": "^5.1.11"
162
122
  },
163
123
  "devDependencies": {
164
- "@libsql/client": "^0.17.2",
124
+ "@libsql/client": "^0.17.3",
165
125
  "@neondatabase/serverless": "^1.1.0",
166
126
  "@stryker-mutator/core": "^9.6.1",
167
127
  "@stryker-mutator/vitest-runner": "^9.6.1",
@@ -171,7 +131,7 @@
171
131
  "@vitest/coverage-v8": "^4.1.5",
172
132
  "better-sqlite3": "^12.9.0",
173
133
  "drizzle-orm": "^0.45.2",
174
- "eslint": "^10.2.1",
134
+ "eslint": "^10.3.0",
175
135
  "fast-check": "^4.7.0",
176
136
  "pg": "^8.20.0",
177
137
  "postgres": "^3.4.9",
@@ -180,7 +140,7 @@
180
140
  "tsup": "^8.5.1",
181
141
  "typescript": "^5.9.3",
182
142
  "vitest": "^4.1.5",
183
- "zod": "^4.3.6",
143
+ "zod": "^4.4.3",
184
144
  "@typegraph/eslint-config": "0.1.0"
185
145
  },
186
146
  "scripts": {