@nicia-ai/typegraph 0.14.0 → 0.15.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/dist/backend/postgres/index.cjs +32 -26
- package/dist/backend/postgres/index.cjs.map +1 -1
- package/dist/backend/postgres/index.d.cts +5 -5
- package/dist/backend/postgres/index.d.ts +5 -5
- package/dist/backend/postgres/index.js +14 -8
- package/dist/backend/postgres/index.js.map +1 -1
- package/dist/backend/sqlite/index.cjs +12 -12
- package/dist/backend/sqlite/index.d.cts +5 -5
- package/dist/backend/sqlite/index.d.ts +5 -5
- package/dist/backend/sqlite/index.js +2 -2
- package/dist/backend/sqlite/local.cjs +5 -5
- package/dist/backend/sqlite/local.cjs.map +1 -1
- package/dist/backend/sqlite/local.d.cts +3 -3
- package/dist/backend/sqlite/local.d.ts +3 -3
- package/dist/backend/sqlite/local.js +5 -5
- package/dist/backend/sqlite/local.js.map +1 -1
- package/dist/{chunk-QFZ5QB2J.cjs → chunk-3HQLOKS5.cjs} +25 -3
- package/dist/chunk-3HQLOKS5.cjs.map +1 -0
- package/dist/{chunk-OEKH5PWL.cjs → chunk-56RQFK7U.cjs} +22 -15
- package/dist/chunk-56RQFK7U.cjs.map +1 -0
- package/dist/{chunk-KE2BL3JZ.cjs → chunk-CRMN2NOM.cjs} +179 -179
- package/dist/chunk-CRMN2NOM.cjs.map +1 -0
- package/dist/{chunk-BNIBR5U2.js → chunk-HWWF3FOP.js} +91 -91
- package/dist/chunk-HWWF3FOP.js.map +1 -0
- package/dist/{chunk-KLOSTZDQ.js → chunk-L4ON6RJF.js} +25 -3
- package/dist/chunk-L4ON6RJF.js.map +1 -0
- package/dist/{chunk-RVUEBUBH.js → chunk-XZBAGJJH.js} +15 -8
- package/dist/chunk-XZBAGJJH.js.map +1 -0
- package/dist/{ddl-BJg93HDN.d.cts → ddl-BBo2EcFc.d.cts} +2 -2
- package/dist/{ddl-CsfWcl_B.d.ts → ddl-D4jlcOH_.d.ts} +2 -2
- package/dist/index.cjs +67 -73
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +36 -42
- package/dist/index.js.map +1 -1
- package/dist/indexes/index.d.cts +2 -2
- package/dist/indexes/index.d.ts +2 -2
- package/dist/interchange/index.d.cts +3 -3
- package/dist/interchange/index.d.ts +3 -3
- package/dist/{manager-oh2mTMvy.d.cts → manager-Bj1UEnhE.d.cts} +2 -2
- package/dist/{manager-qRSdnKEO.d.ts → manager-Chhrq1vl.d.ts} +2 -2
- package/dist/profiler/index.d.cts +3 -3
- package/dist/profiler/index.d.ts +3 -3
- package/dist/schema/index.cjs +20 -20
- package/dist/schema/index.d.cts +4 -4
- package/dist/schema/index.d.ts +4 -4
- package/dist/schema/index.js +2 -2
- package/dist/{sqlite-DVca_IIy.d.cts → sqlite-Blq-AhmK.d.ts} +1 -1
- package/dist/{sqlite-H01wIXvB.d.ts → sqlite-DE-6NWtC.d.cts} +1 -1
- package/dist/{store-BJPIoe8u.d.cts → store-BNercm8P.d.cts} +51 -16
- package/dist/{store-B9ItxA-Q.d.ts → store-CD_0yf2s.d.ts} +51 -16
- package/dist/{types-Ckfwgv9l.d.cts → types-B3mmOMJV.d.cts} +8 -0
- package/dist/{types-C8Ra3ROE.d.cts → types-CZd2PEOc.d.cts} +8 -2
- package/dist/{types-CC8eB0PB.d.ts → types-Ceb01czq.d.ts} +8 -2
- package/dist/{types-5t_MIcvv.d.ts → types-ThB4cFLp.d.ts} +8 -0
- package/package.json +1 -1
- package/dist/chunk-BNIBR5U2.js.map +0 -1
- package/dist/chunk-KE2BL3JZ.cjs.map +0 -1
- package/dist/chunk-KLOSTZDQ.js.map +0 -1
- package/dist/chunk-OEKH5PWL.cjs.map +0 -1
- package/dist/chunk-QFZ5QB2J.cjs.map +0 -1
- package/dist/chunk-RVUEBUBH.js.map +0 -1
package/dist/indexes/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { S as SqlDialect, A as AnyEdgeType, N as NodeType } from '../types-DMzKq0d5.cjs';
|
|
2
|
-
import { E as EdgeIndex, T as TypeGraphIndex, N as NodeIndex, a as EdgeIndexConfig, b as NodeIndexConfig, I as IndexWhereExpression } from '../types-
|
|
3
|
-
export { c as EdgeIndexDirection, d as EdgeIndexWhereBuilder, e as IndexScope, f as IndexWhereFieldBuilder, g as IndexWhereInput, h as NodeIndexWhereBuilder, S as SystemColumnName } from '../types-
|
|
2
|
+
import { E as EdgeIndex, T as TypeGraphIndex, N as NodeIndex, a as EdgeIndexConfig, b as NodeIndexConfig, I as IndexWhereExpression } from '../types-CZd2PEOc.cjs';
|
|
3
|
+
export { c as EdgeIndexDirection, d as EdgeIndexWhereBuilder, e as IndexScope, f as IndexWhereFieldBuilder, g as IndexWhereInput, h as NodeIndexWhereBuilder, S as SystemColumnName } from '../types-CZd2PEOc.cjs';
|
|
4
4
|
import { SQLWrapper } from 'drizzle-orm';
|
|
5
5
|
import { IndexBuilder } from 'drizzle-orm/pg-core';
|
|
6
6
|
import { IndexBuilder as IndexBuilder$1 } from 'drizzle-orm/sqlite-core';
|
package/dist/indexes/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { S as SqlDialect, A as AnyEdgeType, N as NodeType } from '../types-DMzKq0d5.js';
|
|
2
|
-
import { E as EdgeIndex, T as TypeGraphIndex, N as NodeIndex, a as EdgeIndexConfig, b as NodeIndexConfig, I as IndexWhereExpression } from '../types-
|
|
3
|
-
export { c as EdgeIndexDirection, d as EdgeIndexWhereBuilder, e as IndexScope, f as IndexWhereFieldBuilder, g as IndexWhereInput, h as NodeIndexWhereBuilder, S as SystemColumnName } from '../types-
|
|
2
|
+
import { E as EdgeIndex, T as TypeGraphIndex, N as NodeIndex, a as EdgeIndexConfig, b as NodeIndexConfig, I as IndexWhereExpression } from '../types-Ceb01czq.js';
|
|
3
|
+
export { c as EdgeIndexDirection, d as EdgeIndexWhereBuilder, e as IndexScope, f as IndexWhereFieldBuilder, g as IndexWhereInput, h as NodeIndexWhereBuilder, S as SystemColumnName } from '../types-Ceb01czq.js';
|
|
4
4
|
import { SQLWrapper } from 'drizzle-orm';
|
|
5
5
|
import { IndexBuilder } from 'drizzle-orm/pg-core';
|
|
6
6
|
import { IndexBuilder as IndexBuilder$1 } from 'drizzle-orm/sqlite-core';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { G as GraphDef } from '../manager-
|
|
3
|
-
import {
|
|
2
|
+
import { G as GraphDef } from '../manager-Bj1UEnhE.cjs';
|
|
3
|
+
import { W as Store } from '../store-BNercm8P.cjs';
|
|
4
4
|
import '../types-DMzKq0d5.cjs';
|
|
5
|
-
import '../types-
|
|
5
|
+
import '../types-B3mmOMJV.cjs';
|
|
6
6
|
import 'drizzle-orm';
|
|
7
7
|
import '../ast-Bh2NDeaK.cjs';
|
|
8
8
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { G as GraphDef } from '../manager-
|
|
3
|
-
import {
|
|
2
|
+
import { G as GraphDef } from '../manager-Chhrq1vl.js';
|
|
3
|
+
import { W as Store } from '../store-CD_0yf2s.js';
|
|
4
4
|
import '../types-DMzKq0d5.js';
|
|
5
|
-
import '../types-
|
|
5
|
+
import '../types-ThB4cFLp.js';
|
|
6
6
|
import 'drizzle-orm';
|
|
7
7
|
import '../ast-COMyNeMn.js';
|
|
8
8
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as NodeRegistration, d as EdgeRegistration, D as DeleteBehavior, T as TemporalMode, N as NodeType, A as AnyEdgeType, G as GraphDefaults } from './types-DMzKq0d5.cjs';
|
|
2
|
-
import { O as OntologyRelation, d as SerializedNodeDef, e as SerializedEdgeDef, j as SerializedSchema, G as GraphBackend, n as SchemaVersionRow } from './types-
|
|
2
|
+
import { O as OntologyRelation, d as SerializedNodeDef, e as SerializedEdgeDef, j as SerializedSchema, G as GraphBackend, n as SchemaVersionRow } from './types-B3mmOMJV.cjs';
|
|
3
3
|
|
|
4
4
|
/** Brand key for GraphDef */
|
|
5
5
|
declare const GRAPH_DEF_BRAND: "__graphDef";
|
|
@@ -492,4 +492,4 @@ declare function isSchemaInitialized(backend: GraphBackend, graphId: string): Pr
|
|
|
492
492
|
*/
|
|
493
493
|
declare function getSchemaChanges<G extends GraphDef>(backend: GraphBackend, graph: G): Promise<SchemaDiff | undefined>;
|
|
494
494
|
|
|
495
|
-
export { type AllEdgeTypes as A, type ChangeSeverity as C, type EdgeKinds as E, type GraphDef as G, KindRegistry as K, type MigrationHookContext as M, type NodeKinds as N, type OntologyChange as O, type SchemaManagerOptions as S, type AllNodeTypes as a, type GetEdgeType as b, type GetNodeType as c,
|
|
495
|
+
export { type AllEdgeTypes as A, type ChangeSeverity as C, type EdgeKinds as E, type GraphDef as G, KindRegistry as K, type MigrationHookContext as M, type NodeKinds as N, type OntologyChange as O, type SchemaManagerOptions as S, type AllNodeTypes as a, type GetEdgeType as b, type GetNodeType as c, type SchemaValidationResult as d, defineGraph as e, getNodeKinds as f, getEdgeKinds as g, type ChangeType as h, isGraphDef as i, type EdgeChange as j, type NodeChange as k, type SchemaDiff as l, computeSchemaDiff as m, ensureSchema as n, getActiveSchema as o, getMigrationActions as p, getSchemaChanges as q, initializeSchema as r, isBackwardsCompatible as s, isSchemaInitialized as t, migrateSchema as u, rollbackSchema as v };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as NodeRegistration, d as EdgeRegistration, D as DeleteBehavior, T as TemporalMode, N as NodeType, A as AnyEdgeType, G as GraphDefaults } from './types-DMzKq0d5.js';
|
|
2
|
-
import { O as OntologyRelation, d as SerializedNodeDef, e as SerializedEdgeDef, j as SerializedSchema, G as GraphBackend, n as SchemaVersionRow } from './types-
|
|
2
|
+
import { O as OntologyRelation, d as SerializedNodeDef, e as SerializedEdgeDef, j as SerializedSchema, G as GraphBackend, n as SchemaVersionRow } from './types-ThB4cFLp.js';
|
|
3
3
|
|
|
4
4
|
/** Brand key for GraphDef */
|
|
5
5
|
declare const GRAPH_DEF_BRAND: "__graphDef";
|
|
@@ -492,4 +492,4 @@ declare function isSchemaInitialized(backend: GraphBackend, graphId: string): Pr
|
|
|
492
492
|
*/
|
|
493
493
|
declare function getSchemaChanges<G extends GraphDef>(backend: GraphBackend, graph: G): Promise<SchemaDiff | undefined>;
|
|
494
494
|
|
|
495
|
-
export { type AllEdgeTypes as A, type ChangeSeverity as C, type EdgeKinds as E, type GraphDef as G, KindRegistry as K, type MigrationHookContext as M, type NodeKinds as N, type OntologyChange as O, type SchemaManagerOptions as S, type AllNodeTypes as a, type GetEdgeType as b, type GetNodeType as c,
|
|
495
|
+
export { type AllEdgeTypes as A, type ChangeSeverity as C, type EdgeKinds as E, type GraphDef as G, KindRegistry as K, type MigrationHookContext as M, type NodeKinds as N, type OntologyChange as O, type SchemaManagerOptions as S, type AllNodeTypes as a, type GetEdgeType as b, type GetNodeType as c, type SchemaValidationResult as d, defineGraph as e, getNodeKinds as f, getEdgeKinds as g, type ChangeType as h, isGraphDef as i, type EdgeChange as j, type NodeChange as k, type SchemaDiff as l, computeSchemaDiff as m, ensureSchema as n, getActiveSchema as o, getMigrationActions as p, getSchemaChanges as q, initializeSchema as r, isBackwardsCompatible as s, isSchemaInitialized as t, migrateSchema as u, rollbackSchema as v };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { G as GraphDef } from '../manager-
|
|
1
|
+
import { G as GraphDef } from '../manager-Bj1UEnhE.cjs';
|
|
2
2
|
import { Q as QueryAst } from '../ast-Bh2NDeaK.cjs';
|
|
3
|
-
import {
|
|
3
|
+
import { W as Store } from '../store-BNercm8P.cjs';
|
|
4
4
|
import { P as ProfilerOptions, a as ProfileReport } from '../types-CVtGFpB9.cjs';
|
|
5
5
|
export { D as DeclaredIndex, I as IndexRecommendation, b as ProfileSummary, c as PropertyAccessStats, d as PropertyPath, R as RecommendationPriority, U as UsageContext } from '../types-CVtGFpB9.cjs';
|
|
6
6
|
import '../types-DMzKq0d5.cjs';
|
|
7
7
|
import 'zod';
|
|
8
|
-
import '../types-
|
|
8
|
+
import '../types-B3mmOMJV.cjs';
|
|
9
9
|
import 'drizzle-orm';
|
|
10
10
|
|
|
11
11
|
/**
|
package/dist/profiler/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { G as GraphDef } from '../manager-
|
|
1
|
+
import { G as GraphDef } from '../manager-Chhrq1vl.js';
|
|
2
2
|
import { Q as QueryAst } from '../ast-COMyNeMn.js';
|
|
3
|
-
import {
|
|
3
|
+
import { W as Store } from '../store-CD_0yf2s.js';
|
|
4
4
|
import { P as ProfilerOptions, a as ProfileReport } from '../types-COPePE8_.js';
|
|
5
5
|
export { D as DeclaredIndex, I as IndexRecommendation, b as ProfileSummary, c as PropertyAccessStats, d as PropertyPath, R as RecommendationPriority, U as UsageContext } from '../types-COPePE8_.js';
|
|
6
6
|
import '../types-DMzKq0d5.js';
|
|
7
7
|
import 'zod';
|
|
8
|
-
import '../types-
|
|
8
|
+
import '../types-ThB4cFLp.js';
|
|
9
9
|
import 'drizzle-orm';
|
|
10
10
|
|
|
11
11
|
/**
|
package/dist/schema/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk3HQLOKS5_cjs = require('../chunk-3HQLOKS5.cjs');
|
|
4
4
|
require('../chunk-NI2GV74U.cjs');
|
|
5
5
|
require('../chunk-44SXEVF4.cjs');
|
|
6
6
|
|
|
@@ -42,7 +42,7 @@ function buildRegistryFromClosures(schema) {
|
|
|
42
42
|
const edgeImplyingClosure = recordToMap(closures.edgeImplyingClosure);
|
|
43
43
|
const nodeKinds = /* @__PURE__ */ new Map();
|
|
44
44
|
const edgeKinds = /* @__PURE__ */ new Map();
|
|
45
|
-
return new
|
|
45
|
+
return new chunk3HQLOKS5_cjs.KindRegistry(nodeKinds, edgeKinds, {
|
|
46
46
|
subClassAncestors,
|
|
47
47
|
subClassDescendants,
|
|
48
48
|
broaderClosure,
|
|
@@ -70,75 +70,75 @@ function simpleRecordToMap(record) {
|
|
|
70
70
|
|
|
71
71
|
Object.defineProperty(exports, "computeSchemaDiff", {
|
|
72
72
|
enumerable: true,
|
|
73
|
-
get: function () { return
|
|
73
|
+
get: function () { return chunk3HQLOKS5_cjs.computeSchemaDiff; }
|
|
74
74
|
});
|
|
75
75
|
Object.defineProperty(exports, "computeSchemaHash", {
|
|
76
76
|
enumerable: true,
|
|
77
|
-
get: function () { return
|
|
77
|
+
get: function () { return chunk3HQLOKS5_cjs.computeSchemaHash; }
|
|
78
78
|
});
|
|
79
79
|
Object.defineProperty(exports, "createValidationError", {
|
|
80
80
|
enumerable: true,
|
|
81
|
-
get: function () { return
|
|
81
|
+
get: function () { return chunk3HQLOKS5_cjs.createValidationError; }
|
|
82
82
|
});
|
|
83
83
|
Object.defineProperty(exports, "deserializeWherePredicate", {
|
|
84
84
|
enumerable: true,
|
|
85
|
-
get: function () { return
|
|
85
|
+
get: function () { return chunk3HQLOKS5_cjs.deserializeWherePredicate; }
|
|
86
86
|
});
|
|
87
87
|
Object.defineProperty(exports, "ensureSchema", {
|
|
88
88
|
enumerable: true,
|
|
89
|
-
get: function () { return
|
|
89
|
+
get: function () { return chunk3HQLOKS5_cjs.ensureSchema; }
|
|
90
90
|
});
|
|
91
91
|
Object.defineProperty(exports, "getActiveSchema", {
|
|
92
92
|
enumerable: true,
|
|
93
|
-
get: function () { return
|
|
93
|
+
get: function () { return chunk3HQLOKS5_cjs.getActiveSchema; }
|
|
94
94
|
});
|
|
95
95
|
Object.defineProperty(exports, "getMigrationActions", {
|
|
96
96
|
enumerable: true,
|
|
97
|
-
get: function () { return
|
|
97
|
+
get: function () { return chunk3HQLOKS5_cjs.getMigrationActions; }
|
|
98
98
|
});
|
|
99
99
|
Object.defineProperty(exports, "getSchemaChanges", {
|
|
100
100
|
enumerable: true,
|
|
101
|
-
get: function () { return
|
|
101
|
+
get: function () { return chunk3HQLOKS5_cjs.getSchemaChanges; }
|
|
102
102
|
});
|
|
103
103
|
Object.defineProperty(exports, "initializeSchema", {
|
|
104
104
|
enumerable: true,
|
|
105
|
-
get: function () { return
|
|
105
|
+
get: function () { return chunk3HQLOKS5_cjs.initializeSchema; }
|
|
106
106
|
});
|
|
107
107
|
Object.defineProperty(exports, "isBackwardsCompatible", {
|
|
108
108
|
enumerable: true,
|
|
109
|
-
get: function () { return
|
|
109
|
+
get: function () { return chunk3HQLOKS5_cjs.isBackwardsCompatible; }
|
|
110
110
|
});
|
|
111
111
|
Object.defineProperty(exports, "isSchemaInitialized", {
|
|
112
112
|
enumerable: true,
|
|
113
|
-
get: function () { return
|
|
113
|
+
get: function () { return chunk3HQLOKS5_cjs.isSchemaInitialized; }
|
|
114
114
|
});
|
|
115
115
|
Object.defineProperty(exports, "migrateSchema", {
|
|
116
116
|
enumerable: true,
|
|
117
|
-
get: function () { return
|
|
117
|
+
get: function () { return chunk3HQLOKS5_cjs.migrateSchema; }
|
|
118
118
|
});
|
|
119
119
|
Object.defineProperty(exports, "rollbackSchema", {
|
|
120
120
|
enumerable: true,
|
|
121
|
-
get: function () { return
|
|
121
|
+
get: function () { return chunk3HQLOKS5_cjs.rollbackSchema; }
|
|
122
122
|
});
|
|
123
123
|
Object.defineProperty(exports, "serializeSchema", {
|
|
124
124
|
enumerable: true,
|
|
125
|
-
get: function () { return
|
|
125
|
+
get: function () { return chunk3HQLOKS5_cjs.serializeSchema; }
|
|
126
126
|
});
|
|
127
127
|
Object.defineProperty(exports, "validateEdgeProps", {
|
|
128
128
|
enumerable: true,
|
|
129
|
-
get: function () { return
|
|
129
|
+
get: function () { return chunk3HQLOKS5_cjs.validateEdgeProps; }
|
|
130
130
|
});
|
|
131
131
|
Object.defineProperty(exports, "validateNodeProps", {
|
|
132
132
|
enumerable: true,
|
|
133
|
-
get: function () { return
|
|
133
|
+
get: function () { return chunk3HQLOKS5_cjs.validateNodeProps; }
|
|
134
134
|
});
|
|
135
135
|
Object.defineProperty(exports, "validateProps", {
|
|
136
136
|
enumerable: true,
|
|
137
|
-
get: function () { return
|
|
137
|
+
get: function () { return chunk3HQLOKS5_cjs.validateProps; }
|
|
138
138
|
});
|
|
139
139
|
Object.defineProperty(exports, "wrapZodError", {
|
|
140
140
|
enumerable: true,
|
|
141
|
-
get: function () { return
|
|
141
|
+
get: function () { return chunk3HQLOKS5_cjs.wrapZodError; }
|
|
142
142
|
});
|
|
143
143
|
exports.deserializeSchema = deserializeSchema;
|
|
144
144
|
//# sourceMappingURL=index.cjs.map
|
package/dist/schema/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { K as KindRegistry, G as GraphDef } from '../manager-
|
|
2
|
-
export { C as ChangeSeverity, h as ChangeType, j as EdgeChange, M as MigrationHookContext, k as NodeChange, O as OntologyChange, l as SchemaDiff, S as SchemaManagerOptions,
|
|
3
|
-
import { d as SerializedNodeDef, e as SerializedEdgeDef, f as SerializedMetaEdge, g as SerializedOntologyRelation, h as SerializedClosures, j as SerializedSchema, k as SchemaHash } from '../types-
|
|
4
|
-
export { J as JsonSchema, l as SerializedOntology, m as SerializedUniqueConstraint } from '../types-
|
|
1
|
+
import { K as KindRegistry, G as GraphDef } from '../manager-Bj1UEnhE.cjs';
|
|
2
|
+
export { C as ChangeSeverity, h as ChangeType, j as EdgeChange, M as MigrationHookContext, k as NodeChange, O as OntologyChange, l as SchemaDiff, S as SchemaManagerOptions, d as SchemaValidationResult, m as computeSchemaDiff, n as ensureSchema, o as getActiveSchema, p as getMigrationActions, q as getSchemaChanges, r as initializeSchema, s as isBackwardsCompatible, t as isSchemaInitialized, u as migrateSchema, v as rollbackSchema } from '../manager-Bj1UEnhE.cjs';
|
|
3
|
+
import { d as SerializedNodeDef, e as SerializedEdgeDef, f as SerializedMetaEdge, g as SerializedOntologyRelation, h as SerializedClosures, j as SerializedSchema, k as SchemaHash } from '../types-B3mmOMJV.cjs';
|
|
4
|
+
export { J as JsonSchema, l as SerializedOntology, m as SerializedUniqueConstraint } from '../types-B3mmOMJV.cjs';
|
|
5
5
|
import { ZodType, ZodError } from 'zod';
|
|
6
6
|
import { k as ValidationIssue, V as ValidationError } from '../index-QTnQwakS.cjs';
|
|
7
7
|
import '../types-DMzKq0d5.cjs';
|
package/dist/schema/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { K as KindRegistry, G as GraphDef } from '../manager-
|
|
2
|
-
export { C as ChangeSeverity, h as ChangeType, j as EdgeChange, M as MigrationHookContext, k as NodeChange, O as OntologyChange, l as SchemaDiff, S as SchemaManagerOptions,
|
|
3
|
-
import { d as SerializedNodeDef, e as SerializedEdgeDef, f as SerializedMetaEdge, g as SerializedOntologyRelation, h as SerializedClosures, j as SerializedSchema, k as SchemaHash } from '../types-
|
|
4
|
-
export { J as JsonSchema, l as SerializedOntology, m as SerializedUniqueConstraint } from '../types-
|
|
1
|
+
import { K as KindRegistry, G as GraphDef } from '../manager-Chhrq1vl.js';
|
|
2
|
+
export { C as ChangeSeverity, h as ChangeType, j as EdgeChange, M as MigrationHookContext, k as NodeChange, O as OntologyChange, l as SchemaDiff, S as SchemaManagerOptions, d as SchemaValidationResult, m as computeSchemaDiff, n as ensureSchema, o as getActiveSchema, p as getMigrationActions, q as getSchemaChanges, r as initializeSchema, s as isBackwardsCompatible, t as isSchemaInitialized, u as migrateSchema, v as rollbackSchema } from '../manager-Chhrq1vl.js';
|
|
3
|
+
import { d as SerializedNodeDef, e as SerializedEdgeDef, f as SerializedMetaEdge, g as SerializedOntologyRelation, h as SerializedClosures, j as SerializedSchema, k as SchemaHash } from '../types-ThB4cFLp.js';
|
|
4
|
+
export { J as JsonSchema, l as SerializedOntology, m as SerializedUniqueConstraint } from '../types-ThB4cFLp.js';
|
|
5
5
|
import { ZodType, ZodError } from 'zod';
|
|
6
6
|
import { k as ValidationIssue, V as ValidationError } from '../index-QTnQwakS.js';
|
|
7
7
|
import '../types-DMzKq0d5.js';
|
package/dist/schema/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { KindRegistry } from '../chunk-
|
|
2
|
-
export { computeSchemaDiff, computeSchemaHash, createValidationError, deserializeWherePredicate, ensureSchema, getActiveSchema, getMigrationActions, getSchemaChanges, initializeSchema, isBackwardsCompatible, isSchemaInitialized, migrateSchema, rollbackSchema, serializeSchema, validateEdgeProps, validateNodeProps, validateProps, wrapZodError } from '../chunk-
|
|
1
|
+
import { KindRegistry } from '../chunk-L4ON6RJF.js';
|
|
2
|
+
export { computeSchemaDiff, computeSchemaHash, createValidationError, deserializeWherePredicate, ensureSchema, getActiveSchema, getMigrationActions, getSchemaChanges, initializeSchema, isBackwardsCompatible, isSchemaInitialized, migrateSchema, rollbackSchema, serializeSchema, validateEdgeProps, validateNodeProps, validateProps, wrapZodError } from '../chunk-L4ON6RJF.js';
|
|
3
3
|
import '../chunk-IRFD3MEU.js';
|
|
4
4
|
import '../chunk-SJ2QMDXY.js';
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as SqlSchema, G as GraphBackend, T as TransactionBackend, E as EdgeRow, N as NodeRow } from './types-
|
|
2
|
-
import { K as KindRegistry, G as GraphDef, E as EdgeKinds, N as NodeKinds, a as AllNodeTypes, S as SchemaManagerOptions,
|
|
1
|
+
import { S as SqlSchema, G as GraphBackend, T as TransactionBackend, E as EdgeRow, N as NodeRow } from './types-B3mmOMJV.cjs';
|
|
2
|
+
import { K as KindRegistry, G as GraphDef, E as EdgeKinds, N as NodeKinds, a as AllNodeTypes, S as SchemaManagerOptions, d as SchemaValidationResult } from './manager-Bj1UEnhE.cjs';
|
|
3
3
|
import { S as SqlDialect, N as NodeType, A as AnyEdgeType, T as TemporalMode, E as EdgeType, d as EdgeRegistration, b as EdgeId, g as NodeId, i as NodeRegistration } from './types-DMzKq0d5.cjs';
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
import { V as ValueType, i as PredicateExpression, k as VectorMetricType, Q as QueryAst, J as JsonPointer, F as FieldRef, P as ParameterRef, c as JsonPointerInput, T as TraversalExpansion, l as Traversal, N as NodePredicate, m as ProjectedField, O as OrderSpec, G as GroupBySpec, o as RecursiveCyclePolicy, q as TraversalDirection, A as AggregateExpr, r as SelectiveField, s as ComposableQuery, t as SetOperationType, u as SetOperation, S as SortDirection } from './ast-Bh2NDeaK.cjs';
|
|
@@ -1266,6 +1266,14 @@ type EdgeToTypes<R extends EdgeRegistration> = R["to"] extends readonly (infer N
|
|
|
1266
1266
|
* Extracts the edge type and from/to node types automatically.
|
|
1267
1267
|
*/
|
|
1268
1268
|
type TypedEdgeCollection<R extends EdgeRegistration> = EdgeCollection<R["type"], EdgeFromTypes<R> extends NodeType ? EdgeFromTypes<R> : NodeType, EdgeToTypes<R> extends NodeType ? EdgeToTypes<R> : NodeType>;
|
|
1269
|
+
/** Mapped type of all node collections for a graph. */
|
|
1270
|
+
type GraphNodeCollections<G extends GraphDef> = {
|
|
1271
|
+
[K in keyof G["nodes"] & string]-?: NodeCollection<G["nodes"][K]["type"], ConstraintNames<G["nodes"][K]>>;
|
|
1272
|
+
};
|
|
1273
|
+
/** Mapped type of all edge collections for a graph. */
|
|
1274
|
+
type GraphEdgeCollections<G extends GraphDef> = {
|
|
1275
|
+
[K in keyof G["edges"] & string]-?: TypedEdgeCollection<G["edges"][K]>;
|
|
1276
|
+
};
|
|
1269
1277
|
/**
|
|
1270
1278
|
* A typed transaction context with collection API.
|
|
1271
1279
|
*
|
|
@@ -1277,20 +1285,50 @@ type TypedEdgeCollection<R extends EdgeRegistration> = EdgeCollection<R["type"],
|
|
|
1277
1285
|
* await store.transaction(async (tx) => {
|
|
1278
1286
|
* const person = await tx.nodes.Person.create({ name: "Alice" });
|
|
1279
1287
|
* const company = await tx.nodes.Company.create({ name: "Acme" });
|
|
1280
|
-
* // Pass nodes directly - their kind and id properties are used
|
|
1281
1288
|
* await tx.edges.worksAt.create(person, company, { role: "Engineer" });
|
|
1282
1289
|
* });
|
|
1283
1290
|
* ```
|
|
1284
1291
|
*/
|
|
1285
1292
|
type TransactionContext<G extends GraphDef> = Readonly<{
|
|
1286
|
-
|
|
1293
|
+
nodes: GraphNodeCollections<G>;
|
|
1294
|
+
edges: GraphEdgeCollections<G>;
|
|
1295
|
+
}>;
|
|
1296
|
+
/**
|
|
1297
|
+
* A type-level projection of a store's surface onto a subset of its
|
|
1298
|
+
* node and edge collections.
|
|
1299
|
+
*
|
|
1300
|
+
* Node collections are projected with constraint names erased (`never`),
|
|
1301
|
+
* so constraint-based methods like `findByConstraint` become uncallable.
|
|
1302
|
+
* This is intentional: unique constraints are graph-registration-level
|
|
1303
|
+
* details that differ between graphs sharing the same node types.
|
|
1304
|
+
*
|
|
1305
|
+
* @example
|
|
1306
|
+
* ```typescript
|
|
1307
|
+
* type CoreStore = StoreProjection<
|
|
1308
|
+
* typeof myGraph,
|
|
1309
|
+
* "Document" | "Chunk",
|
|
1310
|
+
* "hasChunk"
|
|
1311
|
+
* >;
|
|
1312
|
+
*
|
|
1313
|
+
* async function ingestChunk(
|
|
1314
|
+
* store: CoreStore,
|
|
1315
|
+
* document: Node<typeof Document>,
|
|
1316
|
+
* text: string,
|
|
1317
|
+
* ) {
|
|
1318
|
+
* const chunk = await store.nodes.Chunk.create({ text });
|
|
1319
|
+
* await store.edges.hasChunk.create(document, chunk);
|
|
1320
|
+
* return chunk;
|
|
1321
|
+
* }
|
|
1322
|
+
* ```
|
|
1323
|
+
*
|
|
1324
|
+
* Both `Store<G>` and `TransactionContext<G>` are structurally assignable
|
|
1325
|
+
* to a `StoreProjection` whose keys are a subset of `G`.
|
|
1326
|
+
*/
|
|
1327
|
+
type StoreProjection<G extends GraphDef, N extends keyof G["nodes"] & string = never, E extends keyof G["edges"] & string = never> = Readonly<{
|
|
1287
1328
|
nodes: {
|
|
1288
|
-
[K in
|
|
1289
|
-
};
|
|
1290
|
-
/** Edge collections for the transaction */
|
|
1291
|
-
edges: {
|
|
1292
|
-
[K in keyof G["edges"] & string]-?: TypedEdgeCollection<G["edges"][K]>;
|
|
1329
|
+
[K in N]-?: NodeCollection<G["nodes"][K]["type"], never>;
|
|
1293
1330
|
};
|
|
1331
|
+
edges: Pick<GraphEdgeCollections<G>, E>;
|
|
1294
1332
|
}>;
|
|
1295
1333
|
|
|
1296
1334
|
/**
|
|
@@ -2047,9 +2085,7 @@ declare class Store<G extends GraphDef> {
|
|
|
2047
2085
|
* const people = await store.nodes.Person.find({ limit: 10 });
|
|
2048
2086
|
* ```
|
|
2049
2087
|
*/
|
|
2050
|
-
get nodes():
|
|
2051
|
-
[K in keyof G["nodes"] & string]-?: NodeCollection<G["nodes"][K]["type"], ConstraintNames<G["nodes"][K]>>;
|
|
2052
|
-
};
|
|
2088
|
+
get nodes(): GraphNodeCollections<G>;
|
|
2053
2089
|
/**
|
|
2054
2090
|
* Edge collections for ergonomic CRUD operations.
|
|
2055
2091
|
*
|
|
@@ -2066,9 +2102,7 @@ declare class Store<G extends GraphDef> {
|
|
|
2066
2102
|
* const edges = await store.edges.worksAt.findFrom({ kind: "Person", id: person.id });
|
|
2067
2103
|
* ```
|
|
2068
2104
|
*/
|
|
2069
|
-
get edges():
|
|
2070
|
-
[K in keyof G["edges"] & string]-?: TypedEdgeCollection<G["edges"][K]>;
|
|
2071
|
-
};
|
|
2105
|
+
get edges(): GraphEdgeCollections<G>;
|
|
2072
2106
|
/**
|
|
2073
2107
|
* Creates a query builder for this store.
|
|
2074
2108
|
*
|
|
@@ -2216,6 +2250,7 @@ declare function createStore<G extends GraphDef>(graph: G, backend: GraphBackend
|
|
|
2216
2250
|
*
|
|
2217
2251
|
* This is the recommended way to create a store in production.
|
|
2218
2252
|
* It automatically:
|
|
2253
|
+
* - Creates base tables on a fresh database (if the backend supports bootstrapTables)
|
|
2219
2254
|
* - Initializes the schema on first run (version 1)
|
|
2220
2255
|
* - Auto-migrates safe changes (additive changes)
|
|
2221
2256
|
* - Throws MigrationError for breaking changes
|
|
@@ -2240,4 +2275,4 @@ declare function createStore<G extends GraphDef>(graph: G, backend: GraphBackend
|
|
|
2240
2275
|
*/
|
|
2241
2276
|
declare function createStoreWithSchema<G extends GraphDef>(graph: G, backend: GraphBackend, options?: StoreOptions & SchemaManagerOptions): Promise<[Store<G>, SchemaValidationResult]>;
|
|
2242
2277
|
|
|
2243
|
-
export { type
|
|
2278
|
+
export { type SubgraphOptions as $, type AliasMap as A, type BatchResults as B, type CreateQueryBuilderOptions as C, type Predicate as D, type EdgeAliasMap as E, type FieldAccessor as F, type GetOrCreateAction as G, type HookContext as H, type IfExistsMode as I, PreparedQuery as J, type PropsAccessor as K, type QueryHookContext as L, type QueryOptions as M, type Node as N, type OperationHookContext as O, type PaginateOptions as P, QueryBuilder as Q, type RecursiveTraversalOptions as R, type SelectContext as S, TraversalBuilder as T, type SelectableEdge as U, type SelectableNode as V, Store as W, type StoreHooks as X, type StoreOptions as Y, type StoreProjection as Z, type StreamOptions as _, type AggregateResult as a, type SubgraphResult as a0, type SubsetEdge as a1, type SubsetNode as a2, type TransactionContext as a3, type TypedEdgeCollection as a4, UnionableQuery as a5, type UpdateEdgeInput as a6, type UpdateNodeInput as a7, createStore as a8, createStoreWithSchema as a9, defineSubgraphProject as aa, embedding as ab, exists as ac, fieldRef as ad, getEmbeddingDimensions as ae, inSubquery as af, isEmbeddingSchema as ag, isParameterRef as ah, notExists as ai, notInSubquery as aj, param as ak, type AnyEdge as b, type AnyNode as c, type BatchableQuery as d, type ConstraintNames as e, type CreateEdgeInput as f, type CreateNodeInput as g, type Edge as h, type EdgeAccessor as i, type EdgeCollection as j, type EdgeFindByEndpointsOptions as k, type EdgeGetOrCreateByEndpointsOptions as l, type EdgeGetOrCreateByEndpointsResult as m, type EmbeddingSchema as n, type EmbeddingValue as o, ExecutableAggregateQuery as p, ExecutableQuery as q, type GraphEdgeCollections as r, type GraphNodeCollections as s, type NodeAccessor as t, type NodeAlias as u, type NodeCollection as v, type NodeGetOrCreateByConstraintOptions as w, type NodeGetOrCreateByConstraintResult as x, type NodeRef as y, type PaginatedResult as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as SqlSchema, G as GraphBackend, T as TransactionBackend, E as EdgeRow, N as NodeRow } from './types-
|
|
2
|
-
import { K as KindRegistry, G as GraphDef, E as EdgeKinds, N as NodeKinds, a as AllNodeTypes, S as SchemaManagerOptions,
|
|
1
|
+
import { S as SqlSchema, G as GraphBackend, T as TransactionBackend, E as EdgeRow, N as NodeRow } from './types-ThB4cFLp.js';
|
|
2
|
+
import { K as KindRegistry, G as GraphDef, E as EdgeKinds, N as NodeKinds, a as AllNodeTypes, S as SchemaManagerOptions, d as SchemaValidationResult } from './manager-Chhrq1vl.js';
|
|
3
3
|
import { S as SqlDialect, N as NodeType, A as AnyEdgeType, T as TemporalMode, E as EdgeType, d as EdgeRegistration, b as EdgeId, g as NodeId, i as NodeRegistration } from './types-DMzKq0d5.js';
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
import { V as ValueType, i as PredicateExpression, k as VectorMetricType, Q as QueryAst, J as JsonPointer, F as FieldRef, P as ParameterRef, c as JsonPointerInput, T as TraversalExpansion, l as Traversal, N as NodePredicate, m as ProjectedField, O as OrderSpec, G as GroupBySpec, o as RecursiveCyclePolicy, q as TraversalDirection, A as AggregateExpr, r as SelectiveField, s as ComposableQuery, t as SetOperationType, u as SetOperation, S as SortDirection } from './ast-COMyNeMn.js';
|
|
@@ -1266,6 +1266,14 @@ type EdgeToTypes<R extends EdgeRegistration> = R["to"] extends readonly (infer N
|
|
|
1266
1266
|
* Extracts the edge type and from/to node types automatically.
|
|
1267
1267
|
*/
|
|
1268
1268
|
type TypedEdgeCollection<R extends EdgeRegistration> = EdgeCollection<R["type"], EdgeFromTypes<R> extends NodeType ? EdgeFromTypes<R> : NodeType, EdgeToTypes<R> extends NodeType ? EdgeToTypes<R> : NodeType>;
|
|
1269
|
+
/** Mapped type of all node collections for a graph. */
|
|
1270
|
+
type GraphNodeCollections<G extends GraphDef> = {
|
|
1271
|
+
[K in keyof G["nodes"] & string]-?: NodeCollection<G["nodes"][K]["type"], ConstraintNames<G["nodes"][K]>>;
|
|
1272
|
+
};
|
|
1273
|
+
/** Mapped type of all edge collections for a graph. */
|
|
1274
|
+
type GraphEdgeCollections<G extends GraphDef> = {
|
|
1275
|
+
[K in keyof G["edges"] & string]-?: TypedEdgeCollection<G["edges"][K]>;
|
|
1276
|
+
};
|
|
1269
1277
|
/**
|
|
1270
1278
|
* A typed transaction context with collection API.
|
|
1271
1279
|
*
|
|
@@ -1277,20 +1285,50 @@ type TypedEdgeCollection<R extends EdgeRegistration> = EdgeCollection<R["type"],
|
|
|
1277
1285
|
* await store.transaction(async (tx) => {
|
|
1278
1286
|
* const person = await tx.nodes.Person.create({ name: "Alice" });
|
|
1279
1287
|
* const company = await tx.nodes.Company.create({ name: "Acme" });
|
|
1280
|
-
* // Pass nodes directly - their kind and id properties are used
|
|
1281
1288
|
* await tx.edges.worksAt.create(person, company, { role: "Engineer" });
|
|
1282
1289
|
* });
|
|
1283
1290
|
* ```
|
|
1284
1291
|
*/
|
|
1285
1292
|
type TransactionContext<G extends GraphDef> = Readonly<{
|
|
1286
|
-
|
|
1293
|
+
nodes: GraphNodeCollections<G>;
|
|
1294
|
+
edges: GraphEdgeCollections<G>;
|
|
1295
|
+
}>;
|
|
1296
|
+
/**
|
|
1297
|
+
* A type-level projection of a store's surface onto a subset of its
|
|
1298
|
+
* node and edge collections.
|
|
1299
|
+
*
|
|
1300
|
+
* Node collections are projected with constraint names erased (`never`),
|
|
1301
|
+
* so constraint-based methods like `findByConstraint` become uncallable.
|
|
1302
|
+
* This is intentional: unique constraints are graph-registration-level
|
|
1303
|
+
* details that differ between graphs sharing the same node types.
|
|
1304
|
+
*
|
|
1305
|
+
* @example
|
|
1306
|
+
* ```typescript
|
|
1307
|
+
* type CoreStore = StoreProjection<
|
|
1308
|
+
* typeof myGraph,
|
|
1309
|
+
* "Document" | "Chunk",
|
|
1310
|
+
* "hasChunk"
|
|
1311
|
+
* >;
|
|
1312
|
+
*
|
|
1313
|
+
* async function ingestChunk(
|
|
1314
|
+
* store: CoreStore,
|
|
1315
|
+
* document: Node<typeof Document>,
|
|
1316
|
+
* text: string,
|
|
1317
|
+
* ) {
|
|
1318
|
+
* const chunk = await store.nodes.Chunk.create({ text });
|
|
1319
|
+
* await store.edges.hasChunk.create(document, chunk);
|
|
1320
|
+
* return chunk;
|
|
1321
|
+
* }
|
|
1322
|
+
* ```
|
|
1323
|
+
*
|
|
1324
|
+
* Both `Store<G>` and `TransactionContext<G>` are structurally assignable
|
|
1325
|
+
* to a `StoreProjection` whose keys are a subset of `G`.
|
|
1326
|
+
*/
|
|
1327
|
+
type StoreProjection<G extends GraphDef, N extends keyof G["nodes"] & string = never, E extends keyof G["edges"] & string = never> = Readonly<{
|
|
1287
1328
|
nodes: {
|
|
1288
|
-
[K in
|
|
1289
|
-
};
|
|
1290
|
-
/** Edge collections for the transaction */
|
|
1291
|
-
edges: {
|
|
1292
|
-
[K in keyof G["edges"] & string]-?: TypedEdgeCollection<G["edges"][K]>;
|
|
1329
|
+
[K in N]-?: NodeCollection<G["nodes"][K]["type"], never>;
|
|
1293
1330
|
};
|
|
1331
|
+
edges: Pick<GraphEdgeCollections<G>, E>;
|
|
1294
1332
|
}>;
|
|
1295
1333
|
|
|
1296
1334
|
/**
|
|
@@ -2047,9 +2085,7 @@ declare class Store<G extends GraphDef> {
|
|
|
2047
2085
|
* const people = await store.nodes.Person.find({ limit: 10 });
|
|
2048
2086
|
* ```
|
|
2049
2087
|
*/
|
|
2050
|
-
get nodes():
|
|
2051
|
-
[K in keyof G["nodes"] & string]-?: NodeCollection<G["nodes"][K]["type"], ConstraintNames<G["nodes"][K]>>;
|
|
2052
|
-
};
|
|
2088
|
+
get nodes(): GraphNodeCollections<G>;
|
|
2053
2089
|
/**
|
|
2054
2090
|
* Edge collections for ergonomic CRUD operations.
|
|
2055
2091
|
*
|
|
@@ -2066,9 +2102,7 @@ declare class Store<G extends GraphDef> {
|
|
|
2066
2102
|
* const edges = await store.edges.worksAt.findFrom({ kind: "Person", id: person.id });
|
|
2067
2103
|
* ```
|
|
2068
2104
|
*/
|
|
2069
|
-
get edges():
|
|
2070
|
-
[K in keyof G["edges"] & string]-?: TypedEdgeCollection<G["edges"][K]>;
|
|
2071
|
-
};
|
|
2105
|
+
get edges(): GraphEdgeCollections<G>;
|
|
2072
2106
|
/**
|
|
2073
2107
|
* Creates a query builder for this store.
|
|
2074
2108
|
*
|
|
@@ -2216,6 +2250,7 @@ declare function createStore<G extends GraphDef>(graph: G, backend: GraphBackend
|
|
|
2216
2250
|
*
|
|
2217
2251
|
* This is the recommended way to create a store in production.
|
|
2218
2252
|
* It automatically:
|
|
2253
|
+
* - Creates base tables on a fresh database (if the backend supports bootstrapTables)
|
|
2219
2254
|
* - Initializes the schema on first run (version 1)
|
|
2220
2255
|
* - Auto-migrates safe changes (additive changes)
|
|
2221
2256
|
* - Throws MigrationError for breaking changes
|
|
@@ -2240,4 +2275,4 @@ declare function createStore<G extends GraphDef>(graph: G, backend: GraphBackend
|
|
|
2240
2275
|
*/
|
|
2241
2276
|
declare function createStoreWithSchema<G extends GraphDef>(graph: G, backend: GraphBackend, options?: StoreOptions & SchemaManagerOptions): Promise<[Store<G>, SchemaValidationResult]>;
|
|
2242
2277
|
|
|
2243
|
-
export { type
|
|
2278
|
+
export { type SubgraphOptions as $, type AliasMap as A, type BatchResults as B, type CreateQueryBuilderOptions as C, type Predicate as D, type EdgeAliasMap as E, type FieldAccessor as F, type GetOrCreateAction as G, type HookContext as H, type IfExistsMode as I, PreparedQuery as J, type PropsAccessor as K, type QueryHookContext as L, type QueryOptions as M, type Node as N, type OperationHookContext as O, type PaginateOptions as P, QueryBuilder as Q, type RecursiveTraversalOptions as R, type SelectContext as S, TraversalBuilder as T, type SelectableEdge as U, type SelectableNode as V, Store as W, type StoreHooks as X, type StoreOptions as Y, type StoreProjection as Z, type StreamOptions as _, type AggregateResult as a, type SubgraphResult as a0, type SubsetEdge as a1, type SubsetNode as a2, type TransactionContext as a3, type TypedEdgeCollection as a4, UnionableQuery as a5, type UpdateEdgeInput as a6, type UpdateNodeInput as a7, createStore as a8, createStoreWithSchema as a9, defineSubgraphProject as aa, embedding as ab, exists as ac, fieldRef as ad, getEmbeddingDimensions as ae, inSubquery as af, isEmbeddingSchema as ag, isParameterRef as ah, notExists as ai, notInSubquery as aj, param as ak, type AnyEdge as b, type AnyNode as c, type BatchableQuery as d, type ConstraintNames as e, type CreateEdgeInput as f, type CreateNodeInput as g, type Edge as h, type EdgeAccessor as i, type EdgeCollection as j, type EdgeFindByEndpointsOptions as k, type EdgeGetOrCreateByEndpointsOptions as l, type EdgeGetOrCreateByEndpointsResult as m, type EmbeddingSchema as n, type EmbeddingValue as o, ExecutableAggregateQuery as p, ExecutableQuery as q, type GraphEdgeCollections as r, type GraphNodeCollections as s, type NodeAccessor as t, type NodeAlias as u, type NodeCollection as v, type NodeGetOrCreateByConstraintOptions as w, type NodeGetOrCreateByConstraintResult as x, type NodeRef as y, type PaginatedResult as z };
|
|
@@ -593,6 +593,14 @@ type GraphBackend = Readonly<{
|
|
|
593
593
|
* Intended for import-replacement workflows. No hooks, no per-row logic.
|
|
594
594
|
*/
|
|
595
595
|
clearGraph: (graphId: string) => Promise<void>;
|
|
596
|
+
/**
|
|
597
|
+
* Creates the base TypeGraph tables if they don't already exist.
|
|
598
|
+
*
|
|
599
|
+
* Called automatically by `createStoreWithSchema()` when a fresh database
|
|
600
|
+
* is detected. Users who manage DDL themselves via `createStore()` never
|
|
601
|
+
* hit this path.
|
|
602
|
+
*/
|
|
603
|
+
bootstrapTables?: () => Promise<void>;
|
|
596
604
|
execute: <T>(query: SQL) => Promise<readonly T[]>;
|
|
597
605
|
/** Execute pre-compiled SQL text with bound parameters. Available on sync SQLite and pg backends. */
|
|
598
606
|
executeRaw?: <T>(sqlText: string, params: readonly unknown[]) => Promise<readonly T[]>;
|
|
@@ -99,7 +99,10 @@ type NonEmptyJsonPointerFor<T> = Exclude<JsonPointerFor<T>, "">;
|
|
|
99
99
|
type NonEmptyJsonPointerSegmentsFor<T> = Exclude<JsonPointerSegmentsFor<T>, readonly []>;
|
|
100
100
|
type IndexFieldInput<T> = (keyof T & string) | NonEmptyJsonPointerFor<T> | NonEmptyJsonPointerSegmentsFor<T> | JsonPointer;
|
|
101
101
|
type NodeIndexConfig<N extends NodeType> = Readonly<{
|
|
102
|
-
fields: readonly
|
|
102
|
+
fields: readonly [
|
|
103
|
+
IndexFieldInput<z.infer<N["schema"]>>,
|
|
104
|
+
...IndexFieldInput<z.infer<N["schema"]>>[]
|
|
105
|
+
];
|
|
103
106
|
coveringFields?: readonly IndexFieldInput<z.infer<N["schema"]>>[] | undefined;
|
|
104
107
|
unique?: boolean | undefined;
|
|
105
108
|
name?: string | undefined;
|
|
@@ -108,7 +111,10 @@ type NodeIndexConfig<N extends NodeType> = Readonly<{
|
|
|
108
111
|
}>;
|
|
109
112
|
type EdgeIndexDirection = "out" | "in" | "none";
|
|
110
113
|
type EdgeIndexConfig<E extends AnyEdgeType> = Readonly<{
|
|
111
|
-
fields: readonly
|
|
114
|
+
fields: readonly [
|
|
115
|
+
IndexFieldInput<z.infer<E["schema"]>>,
|
|
116
|
+
...IndexFieldInput<z.infer<E["schema"]>>[]
|
|
117
|
+
];
|
|
112
118
|
coveringFields?: readonly IndexFieldInput<z.infer<E["schema"]>>[] | undefined;
|
|
113
119
|
unique?: boolean | undefined;
|
|
114
120
|
name?: string | undefined;
|
|
@@ -99,7 +99,10 @@ type NonEmptyJsonPointerFor<T> = Exclude<JsonPointerFor<T>, "">;
|
|
|
99
99
|
type NonEmptyJsonPointerSegmentsFor<T> = Exclude<JsonPointerSegmentsFor<T>, readonly []>;
|
|
100
100
|
type IndexFieldInput<T> = (keyof T & string) | NonEmptyJsonPointerFor<T> | NonEmptyJsonPointerSegmentsFor<T> | JsonPointer;
|
|
101
101
|
type NodeIndexConfig<N extends NodeType> = Readonly<{
|
|
102
|
-
fields: readonly
|
|
102
|
+
fields: readonly [
|
|
103
|
+
IndexFieldInput<z.infer<N["schema"]>>,
|
|
104
|
+
...IndexFieldInput<z.infer<N["schema"]>>[]
|
|
105
|
+
];
|
|
103
106
|
coveringFields?: readonly IndexFieldInput<z.infer<N["schema"]>>[] | undefined;
|
|
104
107
|
unique?: boolean | undefined;
|
|
105
108
|
name?: string | undefined;
|
|
@@ -108,7 +111,10 @@ type NodeIndexConfig<N extends NodeType> = Readonly<{
|
|
|
108
111
|
}>;
|
|
109
112
|
type EdgeIndexDirection = "out" | "in" | "none";
|
|
110
113
|
type EdgeIndexConfig<E extends AnyEdgeType> = Readonly<{
|
|
111
|
-
fields: readonly
|
|
114
|
+
fields: readonly [
|
|
115
|
+
IndexFieldInput<z.infer<E["schema"]>>,
|
|
116
|
+
...IndexFieldInput<z.infer<E["schema"]>>[]
|
|
117
|
+
];
|
|
112
118
|
coveringFields?: readonly IndexFieldInput<z.infer<E["schema"]>>[] | undefined;
|
|
113
119
|
unique?: boolean | undefined;
|
|
114
120
|
name?: string | undefined;
|
|
@@ -593,6 +593,14 @@ type GraphBackend = Readonly<{
|
|
|
593
593
|
* Intended for import-replacement workflows. No hooks, no per-row logic.
|
|
594
594
|
*/
|
|
595
595
|
clearGraph: (graphId: string) => Promise<void>;
|
|
596
|
+
/**
|
|
597
|
+
* Creates the base TypeGraph tables if they don't already exist.
|
|
598
|
+
*
|
|
599
|
+
* Called automatically by `createStoreWithSchema()` when a fresh database
|
|
600
|
+
* is detected. Users who manage DDL themselves via `createStore()` never
|
|
601
|
+
* hit this path.
|
|
602
|
+
*/
|
|
603
|
+
bootstrapTables?: () => Promise<void>;
|
|
596
604
|
execute: <T>(query: SQL) => Promise<readonly T[]>;
|
|
597
605
|
/** Execute pre-compiled SQL text with bound parameters. Available on sync SQLite and pg backends. */
|
|
598
606
|
executeRaw?: <T>(sqlText: string, params: readonly unknown[]) => Promise<readonly T[]>;
|