@nicia-ai/typegraph 0.6.0 → 0.7.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/{ast-Cq9qrnNP.d.cts → ast-Bh2NDeaK.d.cts} +1 -1
- package/dist/{ast-CG87Zr6p.d.ts → ast-COMyNeMn.d.ts} +1 -1
- package/dist/backend/postgres/index.d.cts +7 -7
- package/dist/backend/postgres/index.d.ts +7 -7
- package/dist/backend/sqlite/index.d.cts +7 -7
- package/dist/backend/sqlite/index.d.ts +7 -7
- package/dist/backend/sqlite/local.d.cts +5 -5
- package/dist/backend/sqlite/local.d.ts +5 -5
- package/dist/{chunk-K2ROKOK3.cjs → chunk-BELXZTVK.cjs} +2 -2
- package/dist/chunk-BELXZTVK.cjs.map +1 -0
- package/dist/{chunk-TGDFBLGS.js → chunk-JUZWF5NX.js} +2 -2
- package/dist/chunk-JUZWF5NX.js.map +1 -0
- package/dist/{chunk-LDM2AFKZ.cjs → chunk-PDQBCQ34.cjs} +6 -6
- package/dist/{chunk-LDM2AFKZ.cjs.map → chunk-PDQBCQ34.cjs.map} +1 -1
- package/dist/{chunk-M5SOQ7UV.js → chunk-SH237DWD.js} +3 -3
- package/dist/{chunk-M5SOQ7UV.js.map → chunk-SH237DWD.js.map} +1 -1
- package/dist/{ddl-Bcyb4DW1.d.cts → ddl-BJg93HDN.d.cts} +2 -2
- package/dist/{ddl-D7DQx8w8.d.ts → ddl-CsfWcl_B.d.ts} +2 -2
- package/dist/index.cjs +61 -61
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -10
- package/dist/index.d.ts +10 -10
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/indexes/index.d.cts +5 -5
- package/dist/indexes/index.d.ts +5 -5
- package/dist/interchange/index.cjs +6 -6
- package/dist/interchange/index.d.cts +5 -5
- package/dist/interchange/index.d.ts +5 -5
- package/dist/interchange/index.js +1 -1
- package/dist/{manager-BImRiYwz.d.cts → manager-Ba2CXGMG.d.ts} +5 -5
- package/dist/{manager-DGQ9UF18.d.ts → manager-Cu3JQN0H.d.cts} +5 -5
- package/dist/profiler/index.d.cts +7 -7
- package/dist/profiler/index.d.ts +7 -7
- package/dist/schema/index.cjs +21 -21
- package/dist/schema/index.d.cts +5 -5
- package/dist/schema/index.d.ts +5 -5
- package/dist/schema/index.js +3 -3
- package/dist/{sqlite-FWGZLwDd.d.cts → sqlite-DVca_IIy.d.cts} +1 -1
- package/dist/{sqlite-CSJ-fgIm.d.ts → sqlite-H01wIXvB.d.ts} +1 -1
- package/dist/{store-DNv1yd3n.d.cts → store-CL-QMus7.d.cts} +62 -61
- package/dist/{store-CscQUG-S.d.ts → store-DJpuUOSL.d.ts} +62 -61
- package/dist/{types-D5ggX07j.d.ts → types-1YJKodRv.d.ts} +1 -1
- package/dist/{types-BbMn2Ycv.d.cts → types-C8Ra3ROE.d.cts} +2 -2
- package/dist/{types-C2rhqkg7.d.ts → types-CC8eB0PB.d.ts} +2 -2
- package/dist/{types-DJZoHy5R.d.ts → types-COPePE8_.d.ts} +1 -1
- package/dist/{types-DEMAqkA1.d.cts → types-CVtGFpB9.d.cts} +1 -1
- package/dist/{types-DolHw9pJ.d.cts → types-DMzKq0d5.d.cts} +11 -1
- package/dist/{types-DolHw9pJ.d.ts → types-DMzKq0d5.d.ts} +11 -1
- package/dist/{types-SVDEKnU6.d.cts → types-GLkwvQvS.d.cts} +1 -1
- package/package.json +6 -1
- package/dist/chunk-K2ROKOK3.cjs.map +0 -1
- package/dist/chunk-TGDFBLGS.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { S as SqlSchema, G as GraphBackend } from './types-
|
|
2
|
-
import { K as KindRegistry, G as GraphDef, S as SchemaManagerOptions, f as SchemaValidationResult } from './manager-
|
|
3
|
-
import { S as SqlDialect, N as NodeType, A as AnyEdgeType, T as TemporalMode, E as EdgeType,
|
|
4
|
-
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-
|
|
1
|
+
import { S as SqlSchema, G as GraphBackend } from './types-GLkwvQvS.cjs';
|
|
2
|
+
import { K as KindRegistry, G as GraphDef, S as SchemaManagerOptions, f as SchemaValidationResult } from './manager-Cu3JQN0H.cjs';
|
|
3
|
+
import { S as SqlDialect, N as NodeType, A as AnyEdgeType, T as TemporalMode, E as EdgeType, d as EdgeRegistration, i as NodeRegistration, b as EdgeId, g as NodeId } from './types-DMzKq0d5.cjs';
|
|
4
|
+
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';
|
|
5
5
|
import { SQL } from 'drizzle-orm';
|
|
6
6
|
import { z } from 'zod';
|
|
7
7
|
|
|
@@ -647,13 +647,13 @@ type EdgeMeta = Readonly<{
|
|
|
647
647
|
* - `edge.role` instead of `edge.props.role`
|
|
648
648
|
* - System metadata is under `edge.meta.*`
|
|
649
649
|
*/
|
|
650
|
-
type Edge<E extends AnyEdgeType = EdgeType> = Readonly<{
|
|
651
|
-
id:
|
|
650
|
+
type Edge<E extends AnyEdgeType = EdgeType, From extends NodeType = NodeType, To extends NodeType = NodeType> = Readonly<{
|
|
651
|
+
id: EdgeId<E>;
|
|
652
652
|
kind: E["kind"];
|
|
653
|
-
fromKind:
|
|
654
|
-
fromId:
|
|
655
|
-
toKind:
|
|
656
|
-
toId:
|
|
653
|
+
fromKind: From["kind"];
|
|
654
|
+
fromId: NodeId<From>;
|
|
655
|
+
toKind: To["kind"];
|
|
656
|
+
toId: NodeId<To>;
|
|
657
657
|
meta: EdgeMeta;
|
|
658
658
|
}> & Readonly<z.infer<E["schema"]>>;
|
|
659
659
|
/**
|
|
@@ -674,7 +674,7 @@ type CreateEdgeInput<E extends AnyEdgeType = EdgeType> = Readonly<{
|
|
|
674
674
|
* Input for updating an edge.
|
|
675
675
|
*/
|
|
676
676
|
type UpdateEdgeInput<E extends AnyEdgeType = EdgeType> = Readonly<{
|
|
677
|
-
id:
|
|
677
|
+
id: EdgeId<E>;
|
|
678
678
|
props: Partial<z.infer<E["schema"]>>;
|
|
679
679
|
validTo?: string;
|
|
680
680
|
}>;
|
|
@@ -800,8 +800,8 @@ type NodeGetOrCreateByConstraintOptions = Readonly<{
|
|
|
800
800
|
/**
|
|
801
801
|
* Result of an edge getOrCreateByEndpoints operation.
|
|
802
802
|
*/
|
|
803
|
-
type EdgeGetOrCreateByEndpointsResult<E extends AnyEdgeType> = Readonly<{
|
|
804
|
-
edge: Edge<E>;
|
|
803
|
+
type EdgeGetOrCreateByEndpointsResult<E extends AnyEdgeType, From extends NodeType = NodeType, To extends NodeType = NodeType> = Readonly<{
|
|
804
|
+
edge: Edge<E, From, To>;
|
|
805
805
|
action: GetOrCreateAction;
|
|
806
806
|
}>;
|
|
807
807
|
/**
|
|
@@ -833,7 +833,7 @@ type EdgeGetOrCreateByEndpointsOptions<E extends AnyEdgeType> = Readonly<{
|
|
|
833
833
|
*
|
|
834
834
|
* Provides ergonomic CRUD operations for a single node type.
|
|
835
835
|
*/
|
|
836
|
-
type NodeCollection<N extends NodeType> = Readonly<{
|
|
836
|
+
type NodeCollection<N extends NodeType, CN extends string = string> = Readonly<{
|
|
837
837
|
/** Create a new node */
|
|
838
838
|
create: (props: z.input<N["schema"]>, options?: Readonly<{
|
|
839
839
|
id?: string;
|
|
@@ -940,14 +940,14 @@ type NodeCollection<N extends NodeType> = Readonly<{
|
|
|
940
940
|
* @param constraintName - Name of the uniqueness constraint to match on
|
|
941
941
|
* @param props - Properties to compute the constraint key from
|
|
942
942
|
*/
|
|
943
|
-
findByConstraint: (constraintName:
|
|
943
|
+
findByConstraint: (constraintName: CN, props: z.input<N["schema"]>) => Promise<Node<N> | undefined>;
|
|
944
944
|
/**
|
|
945
945
|
* Batch version of findByConstraint.
|
|
946
946
|
*
|
|
947
947
|
* Results are returned in the same order as the input items.
|
|
948
948
|
* Returns undefined for entries that don't match.
|
|
949
949
|
*/
|
|
950
|
-
bulkFindByConstraint: (constraintName:
|
|
950
|
+
bulkFindByConstraint: (constraintName: CN, items: readonly Readonly<{
|
|
951
951
|
props: z.input<N["schema"]>;
|
|
952
952
|
}>[]) => Promise<(Node<N> | undefined)[]>;
|
|
953
953
|
/**
|
|
@@ -961,28 +961,19 @@ type NodeCollection<N extends NodeType> = Readonly<{
|
|
|
961
961
|
* @param props - Full properties for create, or merge source for update
|
|
962
962
|
* @param options - Existing record behavior (default: "return")
|
|
963
963
|
*/
|
|
964
|
-
getOrCreateByConstraint: (constraintName:
|
|
964
|
+
getOrCreateByConstraint: (constraintName: CN, props: z.input<N["schema"]>, options?: NodeGetOrCreateByConstraintOptions) => Promise<NodeGetOrCreateByConstraintResult<N>>;
|
|
965
965
|
/**
|
|
966
966
|
* Batch version of getOrCreateByConstraint.
|
|
967
967
|
*
|
|
968
968
|
* Results are returned in the same order as the input items.
|
|
969
969
|
* Atomic when the backend supports transactions.
|
|
970
970
|
*/
|
|
971
|
-
bulkGetOrCreateByConstraint: (constraintName:
|
|
971
|
+
bulkGetOrCreateByConstraint: (constraintName: CN, items: readonly Readonly<{
|
|
972
972
|
props: z.input<N["schema"]>;
|
|
973
973
|
}>[], options?: NodeGetOrCreateByConstraintOptions) => Promise<NodeGetOrCreateByConstraintResult<N>[]>;
|
|
974
974
|
}>;
|
|
975
975
|
/**
|
|
976
|
-
* Reference to a node
|
|
977
|
-
*
|
|
978
|
-
* Can be either an explicit `{ kind, id }` object or a Node instance.
|
|
979
|
-
*/
|
|
980
|
-
type NodeRef = Readonly<{
|
|
981
|
-
kind: string;
|
|
982
|
-
id: string;
|
|
983
|
-
}>;
|
|
984
|
-
/**
|
|
985
|
-
* Type-safe reference to a node of a specific kind.
|
|
976
|
+
* Reference to a node of a specific kind.
|
|
986
977
|
*
|
|
987
978
|
* Accepts either:
|
|
988
979
|
* - A Node instance of the correct kind
|
|
@@ -991,7 +982,7 @@ type NodeRef = Readonly<{
|
|
|
991
982
|
* This provides compile-time checking that edge endpoints match the
|
|
992
983
|
* allowed node kinds defined in the edge registration.
|
|
993
984
|
*/
|
|
994
|
-
type
|
|
985
|
+
type NodeRef<N extends NodeType = NodeType> = Node<N> | Readonly<{
|
|
995
986
|
kind: N["kind"];
|
|
996
987
|
id: string;
|
|
997
988
|
}>;
|
|
@@ -1042,21 +1033,21 @@ type EdgeCollection<E extends AnyEdgeType, From extends NodeType = NodeType, To
|
|
|
1042
1033
|
* @param to - Target node (must be one of the allowed 'to' types)
|
|
1043
1034
|
* @param args - Edge properties (optional if schema is empty) and creation options
|
|
1044
1035
|
*/
|
|
1045
|
-
create: (from:
|
|
1036
|
+
create: (from: NodeRef<From>, to: NodeRef<To>, ...args: EdgeCreateArguments<E>) => Promise<Edge<E, From, To>>;
|
|
1046
1037
|
/** Get an edge by ID */
|
|
1047
|
-
getById: (id:
|
|
1038
|
+
getById: (id: EdgeId<E>, options?: QueryOptions) => Promise<Edge<E, From, To> | undefined>;
|
|
1048
1039
|
/** Get multiple edges by ID, preserving input order (undefined for missing) */
|
|
1049
|
-
getByIds: (ids: readonly
|
|
1040
|
+
getByIds: (ids: readonly EdgeId<E>[], options?: QueryOptions) => Promise<readonly (Edge<E, From, To> | undefined)[]>;
|
|
1050
1041
|
/** Update an edge's properties */
|
|
1051
|
-
update: (id:
|
|
1042
|
+
update: (id: EdgeId<E>, props: Partial<z.input<E["schema"]>>, options?: Readonly<{
|
|
1052
1043
|
validTo?: string;
|
|
1053
|
-
}>) => Promise<Edge<E>>;
|
|
1044
|
+
}>) => Promise<Edge<E, From, To>>;
|
|
1054
1045
|
/** Find edges from a specific node */
|
|
1055
|
-
findFrom: (from:
|
|
1046
|
+
findFrom: (from: NodeRef<From>) => Promise<Edge<E, From, To>[]>;
|
|
1056
1047
|
/** Find edges to a specific node */
|
|
1057
|
-
findTo: (to:
|
|
1048
|
+
findTo: (to: NodeRef<To>) => Promise<Edge<E, From, To>[]>;
|
|
1058
1049
|
/** Delete an edge (soft delete - sets deletedAt timestamp) */
|
|
1059
|
-
delete: (id:
|
|
1050
|
+
delete: (id: EdgeId<E>) => Promise<void>;
|
|
1060
1051
|
/**
|
|
1061
1052
|
* Permanently delete an edge from the database.
|
|
1062
1053
|
*
|
|
@@ -1066,20 +1057,20 @@ type EdgeCollection<E extends AnyEdgeType, From extends NodeType = NodeType, To
|
|
|
1066
1057
|
* **Warning:** This operation is irreversible and should be used carefully.
|
|
1067
1058
|
* Consider using soft delete (`delete()`) for most use cases.
|
|
1068
1059
|
*/
|
|
1069
|
-
hardDelete: (id:
|
|
1060
|
+
hardDelete: (id: EdgeId<E>) => Promise<void>;
|
|
1070
1061
|
/** Find edges matching endpoint and pagination criteria */
|
|
1071
1062
|
find: (options?: Readonly<{
|
|
1072
|
-
from?:
|
|
1073
|
-
to?:
|
|
1063
|
+
from?: NodeRef<From>;
|
|
1064
|
+
to?: NodeRef<To>;
|
|
1074
1065
|
limit?: number;
|
|
1075
1066
|
offset?: number;
|
|
1076
1067
|
temporalMode?: TemporalMode;
|
|
1077
1068
|
asOf?: string;
|
|
1078
|
-
}>) => Promise<Edge<E>[]>;
|
|
1069
|
+
}>) => Promise<Edge<E, From, To>[]>;
|
|
1079
1070
|
/** Count edges matching criteria */
|
|
1080
1071
|
count: (options?: Readonly<{
|
|
1081
|
-
from?:
|
|
1082
|
-
to?:
|
|
1072
|
+
from?: NodeRef<From>;
|
|
1073
|
+
to?: NodeRef<To>;
|
|
1083
1074
|
temporalMode?: TemporalMode;
|
|
1084
1075
|
asOf?: string;
|
|
1085
1076
|
}>) => Promise<number>;
|
|
@@ -1090,13 +1081,13 @@ type EdgeCollection<E extends AnyEdgeType, From extends NodeType = NodeType, To
|
|
|
1090
1081
|
* Use `bulkInsert` for the dedicated fast path that skips returning results.
|
|
1091
1082
|
*/
|
|
1092
1083
|
bulkCreate: (items: readonly Readonly<{
|
|
1093
|
-
from:
|
|
1094
|
-
to:
|
|
1084
|
+
from: NodeRef<From>;
|
|
1085
|
+
to: NodeRef<To>;
|
|
1095
1086
|
props?: z.input<E["schema"]>;
|
|
1096
1087
|
id?: string;
|
|
1097
1088
|
validFrom?: string;
|
|
1098
1089
|
validTo?: string;
|
|
1099
|
-
}>[]) => Promise<Edge<E>[]>;
|
|
1090
|
+
}>[]) => Promise<Edge<E, From, To>[]>;
|
|
1100
1091
|
/**
|
|
1101
1092
|
* Create or update multiple edges in a batch.
|
|
1102
1093
|
*
|
|
@@ -1104,13 +1095,13 @@ type EdgeCollection<E extends AnyEdgeType, From extends NodeType = NodeType, To
|
|
|
1104
1095
|
* Otherwise, creates a new edge with that ID.
|
|
1105
1096
|
*/
|
|
1106
1097
|
bulkUpsertById: (items: readonly Readonly<{
|
|
1107
|
-
id:
|
|
1108
|
-
from:
|
|
1109
|
-
to:
|
|
1098
|
+
id: EdgeId<E>;
|
|
1099
|
+
from: NodeRef<From>;
|
|
1100
|
+
to: NodeRef<To>;
|
|
1110
1101
|
props?: z.input<E["schema"]>;
|
|
1111
1102
|
validFrom?: string;
|
|
1112
1103
|
validTo?: string;
|
|
1113
|
-
}>[]) => Promise<Edge<E>[]>;
|
|
1104
|
+
}>[]) => Promise<Edge<E, From, To>[]>;
|
|
1114
1105
|
/**
|
|
1115
1106
|
* Insert multiple edges without returning results.
|
|
1116
1107
|
*
|
|
@@ -1119,8 +1110,8 @@ type EdgeCollection<E extends AnyEdgeType, From extends NodeType = NodeType, To
|
|
|
1119
1110
|
* are returned and the operation is wrapped in a transaction.
|
|
1120
1111
|
*/
|
|
1121
1112
|
bulkInsert: (items: readonly Readonly<{
|
|
1122
|
-
from:
|
|
1123
|
-
to:
|
|
1113
|
+
from: NodeRef<From>;
|
|
1114
|
+
to: NodeRef<To>;
|
|
1124
1115
|
props?: z.input<E["schema"]>;
|
|
1125
1116
|
id?: string;
|
|
1126
1117
|
validFrom?: string;
|
|
@@ -1132,7 +1123,7 @@ type EdgeCollection<E extends AnyEdgeType, From extends NodeType = NodeType, To
|
|
|
1132
1123
|
* Atomic when the backend supports transactions. Silently ignores IDs
|
|
1133
1124
|
* that don't exist.
|
|
1134
1125
|
*/
|
|
1135
|
-
bulkDelete: (ids: readonly
|
|
1126
|
+
bulkDelete: (ids: readonly EdgeId<E>[]) => Promise<void>;
|
|
1136
1127
|
/**
|
|
1137
1128
|
* Find a live edge by endpoints and optional property fields.
|
|
1138
1129
|
*
|
|
@@ -1143,7 +1134,7 @@ type EdgeCollection<E extends AnyEdgeType, From extends NodeType = NodeType, To
|
|
|
1143
1134
|
* @param to - Target node
|
|
1144
1135
|
* @param options - Match criteria (matchOn fields and property values)
|
|
1145
1136
|
*/
|
|
1146
|
-
findByEndpoints: (from:
|
|
1137
|
+
findByEndpoints: (from: NodeRef<From>, to: NodeRef<To>, options?: EdgeFindByEndpointsOptions<E>) => Promise<Edge<E, From, To> | undefined>;
|
|
1147
1138
|
/**
|
|
1148
1139
|
* Get an existing edge by endpoints and optional property fields, or create a new one.
|
|
1149
1140
|
*
|
|
@@ -1156,7 +1147,7 @@ type EdgeCollection<E extends AnyEdgeType, From extends NodeType = NodeType, To
|
|
|
1156
1147
|
* @param props - Full properties for create, or merge source for update
|
|
1157
1148
|
* @param options - Match criteria and conflict resolution
|
|
1158
1149
|
*/
|
|
1159
|
-
getOrCreateByEndpoints: (from:
|
|
1150
|
+
getOrCreateByEndpoints: (from: NodeRef<From>, to: NodeRef<To>, props: z.input<E["schema"]>, options?: EdgeGetOrCreateByEndpointsOptions<E>) => Promise<EdgeGetOrCreateByEndpointsResult<E, From, To>>;
|
|
1160
1151
|
/**
|
|
1161
1152
|
* Batch version of getOrCreateByEndpoints.
|
|
1162
1153
|
*
|
|
@@ -1164,11 +1155,21 @@ type EdgeCollection<E extends AnyEdgeType, From extends NodeType = NodeType, To
|
|
|
1164
1155
|
* Atomic when the backend supports transactions.
|
|
1165
1156
|
*/
|
|
1166
1157
|
bulkGetOrCreateByEndpoints: (items: readonly Readonly<{
|
|
1167
|
-
from:
|
|
1168
|
-
to:
|
|
1158
|
+
from: NodeRef<From>;
|
|
1159
|
+
to: NodeRef<To>;
|
|
1169
1160
|
props: z.input<E["schema"]>;
|
|
1170
|
-
}>[], options?: EdgeGetOrCreateByEndpointsOptions<E>) => Promise<EdgeGetOrCreateByEndpointsResult<E>[]>;
|
|
1161
|
+
}>[], options?: EdgeGetOrCreateByEndpointsOptions<E>) => Promise<EdgeGetOrCreateByEndpointsResult<E, From, To>[]>;
|
|
1171
1162
|
}>;
|
|
1163
|
+
/**
|
|
1164
|
+
* Extract uniqueness constraint names from a NodeRegistration.
|
|
1165
|
+
*
|
|
1166
|
+
* - Returns `never` when no uniqueness constraints are configured.
|
|
1167
|
+
* - Returns a literal union when names are inferred via `defineGraph` const params.
|
|
1168
|
+
* - Falls back to `string` when names are widened/dynamic.
|
|
1169
|
+
*/
|
|
1170
|
+
type ConstraintNames<R extends NodeRegistration> = "unique" extends keyof R ? R["unique"] extends readonly {
|
|
1171
|
+
readonly name: infer N;
|
|
1172
|
+
}[] ? N & string : string : never;
|
|
1172
1173
|
/**
|
|
1173
1174
|
* Extract the union of 'from' node types from an EdgeRegistration.
|
|
1174
1175
|
*/
|
|
@@ -1201,7 +1202,7 @@ type TypedEdgeCollection<R extends EdgeRegistration> = EdgeCollection<R["type"],
|
|
|
1201
1202
|
type TransactionContext<G extends GraphDef> = Readonly<{
|
|
1202
1203
|
/** Node collections for the transaction */
|
|
1203
1204
|
nodes: {
|
|
1204
|
-
[K in keyof G["nodes"] & string]-?: NodeCollection<G["nodes"][K]["type"]
|
|
1205
|
+
[K in keyof G["nodes"] & string]-?: NodeCollection<G["nodes"][K]["type"], ConstraintNames<G["nodes"][K]>>;
|
|
1205
1206
|
};
|
|
1206
1207
|
/** Edge collections for the transaction */
|
|
1207
1208
|
edges: {
|
|
@@ -1819,7 +1820,7 @@ declare class Store<G extends GraphDef> {
|
|
|
1819
1820
|
* ```
|
|
1820
1821
|
*/
|
|
1821
1822
|
get nodes(): {
|
|
1822
|
-
[K in keyof G["nodes"] & string]-?: NodeCollection<G["nodes"][K]["type"]
|
|
1823
|
+
[K in keyof G["nodes"] & string]-?: NodeCollection<G["nodes"][K]["type"], ConstraintNames<G["nodes"][K]>>;
|
|
1823
1824
|
};
|
|
1824
1825
|
/**
|
|
1825
1826
|
* Edge collections for ergonomic CRUD operations.
|
|
@@ -1954,4 +1955,4 @@ declare function createStore<G extends GraphDef>(graph: G, backend: GraphBackend
|
|
|
1954
1955
|
*/
|
|
1955
1956
|
declare function createStoreWithSchema<G extends GraphDef>(graph: G, backend: GraphBackend, options?: StoreOptions & SchemaManagerOptions): Promise<[Store<G>, SchemaValidationResult]>;
|
|
1956
1957
|
|
|
1957
|
-
export { embedding as $, type AliasMap as A, type
|
|
1958
|
+
export { embedding as $, type AliasMap as A, type SelectableEdge as B, type CreateQueryBuilderOptions as C, type SelectableNode as D, type EdgeAliasMap as E, type FieldAccessor as F, type GetOrCreateAction as G, type HookContext as H, type IfExistsMode as I, Store as J, type StoreHooks as K, type StoreOptions as L, type StreamOptions 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 TransactionContext as U, type TypedEdgeCollection as V, UnionableQuery as W, type UpdateEdgeInput as X, type UpdateNodeInput as Y, createStore as Z, createStoreWithSchema as _, type AggregateResult as a, exists as a0, fieldRef as a1, getEmbeddingDimensions as a2, inSubquery as a3, isEmbeddingSchema as a4, isParameterRef as a5, notExists as a6, notInSubquery as a7, param as a8, type ConstraintNames as b, type CreateEdgeInput as c, type CreateNodeInput as d, type Edge as e, type EdgeAccessor as f, type EdgeCollection as g, type EdgeFindByEndpointsOptions as h, type EdgeGetOrCreateByEndpointsOptions as i, type EdgeGetOrCreateByEndpointsResult as j, type EmbeddingSchema as k, type EmbeddingValue as l, ExecutableAggregateQuery as m, ExecutableQuery as n, type NodeAccessor as o, type NodeAlias as p, type NodeCollection as q, type NodeGetOrCreateByConstraintOptions as r, type NodeGetOrCreateByConstraintResult as s, type NodeRef as t, type PaginatedResult as u, type Predicate as v, PreparedQuery as w, type PropsAccessor as x, type QueryHookContext as y, type QueryOptions as z };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { S as SqlSchema, G as GraphBackend } from './types-
|
|
2
|
-
import { K as KindRegistry, G as GraphDef, S as SchemaManagerOptions, f as SchemaValidationResult } from './manager-
|
|
3
|
-
import { S as SqlDialect, N as NodeType, A as AnyEdgeType, T as TemporalMode, E as EdgeType,
|
|
4
|
-
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-
|
|
1
|
+
import { S as SqlSchema, G as GraphBackend } from './types-1YJKodRv.js';
|
|
2
|
+
import { K as KindRegistry, G as GraphDef, S as SchemaManagerOptions, f as SchemaValidationResult } from './manager-Ba2CXGMG.js';
|
|
3
|
+
import { S as SqlDialect, N as NodeType, A as AnyEdgeType, T as TemporalMode, E as EdgeType, d as EdgeRegistration, i as NodeRegistration, b as EdgeId, g as NodeId } from './types-DMzKq0d5.js';
|
|
4
|
+
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';
|
|
5
5
|
import { SQL } from 'drizzle-orm';
|
|
6
6
|
import { z } from 'zod';
|
|
7
7
|
|
|
@@ -647,13 +647,13 @@ type EdgeMeta = Readonly<{
|
|
|
647
647
|
* - `edge.role` instead of `edge.props.role`
|
|
648
648
|
* - System metadata is under `edge.meta.*`
|
|
649
649
|
*/
|
|
650
|
-
type Edge<E extends AnyEdgeType = EdgeType> = Readonly<{
|
|
651
|
-
id:
|
|
650
|
+
type Edge<E extends AnyEdgeType = EdgeType, From extends NodeType = NodeType, To extends NodeType = NodeType> = Readonly<{
|
|
651
|
+
id: EdgeId<E>;
|
|
652
652
|
kind: E["kind"];
|
|
653
|
-
fromKind:
|
|
654
|
-
fromId:
|
|
655
|
-
toKind:
|
|
656
|
-
toId:
|
|
653
|
+
fromKind: From["kind"];
|
|
654
|
+
fromId: NodeId<From>;
|
|
655
|
+
toKind: To["kind"];
|
|
656
|
+
toId: NodeId<To>;
|
|
657
657
|
meta: EdgeMeta;
|
|
658
658
|
}> & Readonly<z.infer<E["schema"]>>;
|
|
659
659
|
/**
|
|
@@ -674,7 +674,7 @@ type CreateEdgeInput<E extends AnyEdgeType = EdgeType> = Readonly<{
|
|
|
674
674
|
* Input for updating an edge.
|
|
675
675
|
*/
|
|
676
676
|
type UpdateEdgeInput<E extends AnyEdgeType = EdgeType> = Readonly<{
|
|
677
|
-
id:
|
|
677
|
+
id: EdgeId<E>;
|
|
678
678
|
props: Partial<z.infer<E["schema"]>>;
|
|
679
679
|
validTo?: string;
|
|
680
680
|
}>;
|
|
@@ -800,8 +800,8 @@ type NodeGetOrCreateByConstraintOptions = Readonly<{
|
|
|
800
800
|
/**
|
|
801
801
|
* Result of an edge getOrCreateByEndpoints operation.
|
|
802
802
|
*/
|
|
803
|
-
type EdgeGetOrCreateByEndpointsResult<E extends AnyEdgeType> = Readonly<{
|
|
804
|
-
edge: Edge<E>;
|
|
803
|
+
type EdgeGetOrCreateByEndpointsResult<E extends AnyEdgeType, From extends NodeType = NodeType, To extends NodeType = NodeType> = Readonly<{
|
|
804
|
+
edge: Edge<E, From, To>;
|
|
805
805
|
action: GetOrCreateAction;
|
|
806
806
|
}>;
|
|
807
807
|
/**
|
|
@@ -833,7 +833,7 @@ type EdgeGetOrCreateByEndpointsOptions<E extends AnyEdgeType> = Readonly<{
|
|
|
833
833
|
*
|
|
834
834
|
* Provides ergonomic CRUD operations for a single node type.
|
|
835
835
|
*/
|
|
836
|
-
type NodeCollection<N extends NodeType> = Readonly<{
|
|
836
|
+
type NodeCollection<N extends NodeType, CN extends string = string> = Readonly<{
|
|
837
837
|
/** Create a new node */
|
|
838
838
|
create: (props: z.input<N["schema"]>, options?: Readonly<{
|
|
839
839
|
id?: string;
|
|
@@ -940,14 +940,14 @@ type NodeCollection<N extends NodeType> = Readonly<{
|
|
|
940
940
|
* @param constraintName - Name of the uniqueness constraint to match on
|
|
941
941
|
* @param props - Properties to compute the constraint key from
|
|
942
942
|
*/
|
|
943
|
-
findByConstraint: (constraintName:
|
|
943
|
+
findByConstraint: (constraintName: CN, props: z.input<N["schema"]>) => Promise<Node<N> | undefined>;
|
|
944
944
|
/**
|
|
945
945
|
* Batch version of findByConstraint.
|
|
946
946
|
*
|
|
947
947
|
* Results are returned in the same order as the input items.
|
|
948
948
|
* Returns undefined for entries that don't match.
|
|
949
949
|
*/
|
|
950
|
-
bulkFindByConstraint: (constraintName:
|
|
950
|
+
bulkFindByConstraint: (constraintName: CN, items: readonly Readonly<{
|
|
951
951
|
props: z.input<N["schema"]>;
|
|
952
952
|
}>[]) => Promise<(Node<N> | undefined)[]>;
|
|
953
953
|
/**
|
|
@@ -961,28 +961,19 @@ type NodeCollection<N extends NodeType> = Readonly<{
|
|
|
961
961
|
* @param props - Full properties for create, or merge source for update
|
|
962
962
|
* @param options - Existing record behavior (default: "return")
|
|
963
963
|
*/
|
|
964
|
-
getOrCreateByConstraint: (constraintName:
|
|
964
|
+
getOrCreateByConstraint: (constraintName: CN, props: z.input<N["schema"]>, options?: NodeGetOrCreateByConstraintOptions) => Promise<NodeGetOrCreateByConstraintResult<N>>;
|
|
965
965
|
/**
|
|
966
966
|
* Batch version of getOrCreateByConstraint.
|
|
967
967
|
*
|
|
968
968
|
* Results are returned in the same order as the input items.
|
|
969
969
|
* Atomic when the backend supports transactions.
|
|
970
970
|
*/
|
|
971
|
-
bulkGetOrCreateByConstraint: (constraintName:
|
|
971
|
+
bulkGetOrCreateByConstraint: (constraintName: CN, items: readonly Readonly<{
|
|
972
972
|
props: z.input<N["schema"]>;
|
|
973
973
|
}>[], options?: NodeGetOrCreateByConstraintOptions) => Promise<NodeGetOrCreateByConstraintResult<N>[]>;
|
|
974
974
|
}>;
|
|
975
975
|
/**
|
|
976
|
-
* Reference to a node
|
|
977
|
-
*
|
|
978
|
-
* Can be either an explicit `{ kind, id }` object or a Node instance.
|
|
979
|
-
*/
|
|
980
|
-
type NodeRef = Readonly<{
|
|
981
|
-
kind: string;
|
|
982
|
-
id: string;
|
|
983
|
-
}>;
|
|
984
|
-
/**
|
|
985
|
-
* Type-safe reference to a node of a specific kind.
|
|
976
|
+
* Reference to a node of a specific kind.
|
|
986
977
|
*
|
|
987
978
|
* Accepts either:
|
|
988
979
|
* - A Node instance of the correct kind
|
|
@@ -991,7 +982,7 @@ type NodeRef = Readonly<{
|
|
|
991
982
|
* This provides compile-time checking that edge endpoints match the
|
|
992
983
|
* allowed node kinds defined in the edge registration.
|
|
993
984
|
*/
|
|
994
|
-
type
|
|
985
|
+
type NodeRef<N extends NodeType = NodeType> = Node<N> | Readonly<{
|
|
995
986
|
kind: N["kind"];
|
|
996
987
|
id: string;
|
|
997
988
|
}>;
|
|
@@ -1042,21 +1033,21 @@ type EdgeCollection<E extends AnyEdgeType, From extends NodeType = NodeType, To
|
|
|
1042
1033
|
* @param to - Target node (must be one of the allowed 'to' types)
|
|
1043
1034
|
* @param args - Edge properties (optional if schema is empty) and creation options
|
|
1044
1035
|
*/
|
|
1045
|
-
create: (from:
|
|
1036
|
+
create: (from: NodeRef<From>, to: NodeRef<To>, ...args: EdgeCreateArguments<E>) => Promise<Edge<E, From, To>>;
|
|
1046
1037
|
/** Get an edge by ID */
|
|
1047
|
-
getById: (id:
|
|
1038
|
+
getById: (id: EdgeId<E>, options?: QueryOptions) => Promise<Edge<E, From, To> | undefined>;
|
|
1048
1039
|
/** Get multiple edges by ID, preserving input order (undefined for missing) */
|
|
1049
|
-
getByIds: (ids: readonly
|
|
1040
|
+
getByIds: (ids: readonly EdgeId<E>[], options?: QueryOptions) => Promise<readonly (Edge<E, From, To> | undefined)[]>;
|
|
1050
1041
|
/** Update an edge's properties */
|
|
1051
|
-
update: (id:
|
|
1042
|
+
update: (id: EdgeId<E>, props: Partial<z.input<E["schema"]>>, options?: Readonly<{
|
|
1052
1043
|
validTo?: string;
|
|
1053
|
-
}>) => Promise<Edge<E>>;
|
|
1044
|
+
}>) => Promise<Edge<E, From, To>>;
|
|
1054
1045
|
/** Find edges from a specific node */
|
|
1055
|
-
findFrom: (from:
|
|
1046
|
+
findFrom: (from: NodeRef<From>) => Promise<Edge<E, From, To>[]>;
|
|
1056
1047
|
/** Find edges to a specific node */
|
|
1057
|
-
findTo: (to:
|
|
1048
|
+
findTo: (to: NodeRef<To>) => Promise<Edge<E, From, To>[]>;
|
|
1058
1049
|
/** Delete an edge (soft delete - sets deletedAt timestamp) */
|
|
1059
|
-
delete: (id:
|
|
1050
|
+
delete: (id: EdgeId<E>) => Promise<void>;
|
|
1060
1051
|
/**
|
|
1061
1052
|
* Permanently delete an edge from the database.
|
|
1062
1053
|
*
|
|
@@ -1066,20 +1057,20 @@ type EdgeCollection<E extends AnyEdgeType, From extends NodeType = NodeType, To
|
|
|
1066
1057
|
* **Warning:** This operation is irreversible and should be used carefully.
|
|
1067
1058
|
* Consider using soft delete (`delete()`) for most use cases.
|
|
1068
1059
|
*/
|
|
1069
|
-
hardDelete: (id:
|
|
1060
|
+
hardDelete: (id: EdgeId<E>) => Promise<void>;
|
|
1070
1061
|
/** Find edges matching endpoint and pagination criteria */
|
|
1071
1062
|
find: (options?: Readonly<{
|
|
1072
|
-
from?:
|
|
1073
|
-
to?:
|
|
1063
|
+
from?: NodeRef<From>;
|
|
1064
|
+
to?: NodeRef<To>;
|
|
1074
1065
|
limit?: number;
|
|
1075
1066
|
offset?: number;
|
|
1076
1067
|
temporalMode?: TemporalMode;
|
|
1077
1068
|
asOf?: string;
|
|
1078
|
-
}>) => Promise<Edge<E>[]>;
|
|
1069
|
+
}>) => Promise<Edge<E, From, To>[]>;
|
|
1079
1070
|
/** Count edges matching criteria */
|
|
1080
1071
|
count: (options?: Readonly<{
|
|
1081
|
-
from?:
|
|
1082
|
-
to?:
|
|
1072
|
+
from?: NodeRef<From>;
|
|
1073
|
+
to?: NodeRef<To>;
|
|
1083
1074
|
temporalMode?: TemporalMode;
|
|
1084
1075
|
asOf?: string;
|
|
1085
1076
|
}>) => Promise<number>;
|
|
@@ -1090,13 +1081,13 @@ type EdgeCollection<E extends AnyEdgeType, From extends NodeType = NodeType, To
|
|
|
1090
1081
|
* Use `bulkInsert` for the dedicated fast path that skips returning results.
|
|
1091
1082
|
*/
|
|
1092
1083
|
bulkCreate: (items: readonly Readonly<{
|
|
1093
|
-
from:
|
|
1094
|
-
to:
|
|
1084
|
+
from: NodeRef<From>;
|
|
1085
|
+
to: NodeRef<To>;
|
|
1095
1086
|
props?: z.input<E["schema"]>;
|
|
1096
1087
|
id?: string;
|
|
1097
1088
|
validFrom?: string;
|
|
1098
1089
|
validTo?: string;
|
|
1099
|
-
}>[]) => Promise<Edge<E>[]>;
|
|
1090
|
+
}>[]) => Promise<Edge<E, From, To>[]>;
|
|
1100
1091
|
/**
|
|
1101
1092
|
* Create or update multiple edges in a batch.
|
|
1102
1093
|
*
|
|
@@ -1104,13 +1095,13 @@ type EdgeCollection<E extends AnyEdgeType, From extends NodeType = NodeType, To
|
|
|
1104
1095
|
* Otherwise, creates a new edge with that ID.
|
|
1105
1096
|
*/
|
|
1106
1097
|
bulkUpsertById: (items: readonly Readonly<{
|
|
1107
|
-
id:
|
|
1108
|
-
from:
|
|
1109
|
-
to:
|
|
1098
|
+
id: EdgeId<E>;
|
|
1099
|
+
from: NodeRef<From>;
|
|
1100
|
+
to: NodeRef<To>;
|
|
1110
1101
|
props?: z.input<E["schema"]>;
|
|
1111
1102
|
validFrom?: string;
|
|
1112
1103
|
validTo?: string;
|
|
1113
|
-
}>[]) => Promise<Edge<E>[]>;
|
|
1104
|
+
}>[]) => Promise<Edge<E, From, To>[]>;
|
|
1114
1105
|
/**
|
|
1115
1106
|
* Insert multiple edges without returning results.
|
|
1116
1107
|
*
|
|
@@ -1119,8 +1110,8 @@ type EdgeCollection<E extends AnyEdgeType, From extends NodeType = NodeType, To
|
|
|
1119
1110
|
* are returned and the operation is wrapped in a transaction.
|
|
1120
1111
|
*/
|
|
1121
1112
|
bulkInsert: (items: readonly Readonly<{
|
|
1122
|
-
from:
|
|
1123
|
-
to:
|
|
1113
|
+
from: NodeRef<From>;
|
|
1114
|
+
to: NodeRef<To>;
|
|
1124
1115
|
props?: z.input<E["schema"]>;
|
|
1125
1116
|
id?: string;
|
|
1126
1117
|
validFrom?: string;
|
|
@@ -1132,7 +1123,7 @@ type EdgeCollection<E extends AnyEdgeType, From extends NodeType = NodeType, To
|
|
|
1132
1123
|
* Atomic when the backend supports transactions. Silently ignores IDs
|
|
1133
1124
|
* that don't exist.
|
|
1134
1125
|
*/
|
|
1135
|
-
bulkDelete: (ids: readonly
|
|
1126
|
+
bulkDelete: (ids: readonly EdgeId<E>[]) => Promise<void>;
|
|
1136
1127
|
/**
|
|
1137
1128
|
* Find a live edge by endpoints and optional property fields.
|
|
1138
1129
|
*
|
|
@@ -1143,7 +1134,7 @@ type EdgeCollection<E extends AnyEdgeType, From extends NodeType = NodeType, To
|
|
|
1143
1134
|
* @param to - Target node
|
|
1144
1135
|
* @param options - Match criteria (matchOn fields and property values)
|
|
1145
1136
|
*/
|
|
1146
|
-
findByEndpoints: (from:
|
|
1137
|
+
findByEndpoints: (from: NodeRef<From>, to: NodeRef<To>, options?: EdgeFindByEndpointsOptions<E>) => Promise<Edge<E, From, To> | undefined>;
|
|
1147
1138
|
/**
|
|
1148
1139
|
* Get an existing edge by endpoints and optional property fields, or create a new one.
|
|
1149
1140
|
*
|
|
@@ -1156,7 +1147,7 @@ type EdgeCollection<E extends AnyEdgeType, From extends NodeType = NodeType, To
|
|
|
1156
1147
|
* @param props - Full properties for create, or merge source for update
|
|
1157
1148
|
* @param options - Match criteria and conflict resolution
|
|
1158
1149
|
*/
|
|
1159
|
-
getOrCreateByEndpoints: (from:
|
|
1150
|
+
getOrCreateByEndpoints: (from: NodeRef<From>, to: NodeRef<To>, props: z.input<E["schema"]>, options?: EdgeGetOrCreateByEndpointsOptions<E>) => Promise<EdgeGetOrCreateByEndpointsResult<E, From, To>>;
|
|
1160
1151
|
/**
|
|
1161
1152
|
* Batch version of getOrCreateByEndpoints.
|
|
1162
1153
|
*
|
|
@@ -1164,11 +1155,21 @@ type EdgeCollection<E extends AnyEdgeType, From extends NodeType = NodeType, To
|
|
|
1164
1155
|
* Atomic when the backend supports transactions.
|
|
1165
1156
|
*/
|
|
1166
1157
|
bulkGetOrCreateByEndpoints: (items: readonly Readonly<{
|
|
1167
|
-
from:
|
|
1168
|
-
to:
|
|
1158
|
+
from: NodeRef<From>;
|
|
1159
|
+
to: NodeRef<To>;
|
|
1169
1160
|
props: z.input<E["schema"]>;
|
|
1170
|
-
}>[], options?: EdgeGetOrCreateByEndpointsOptions<E>) => Promise<EdgeGetOrCreateByEndpointsResult<E>[]>;
|
|
1161
|
+
}>[], options?: EdgeGetOrCreateByEndpointsOptions<E>) => Promise<EdgeGetOrCreateByEndpointsResult<E, From, To>[]>;
|
|
1171
1162
|
}>;
|
|
1163
|
+
/**
|
|
1164
|
+
* Extract uniqueness constraint names from a NodeRegistration.
|
|
1165
|
+
*
|
|
1166
|
+
* - Returns `never` when no uniqueness constraints are configured.
|
|
1167
|
+
* - Returns a literal union when names are inferred via `defineGraph` const params.
|
|
1168
|
+
* - Falls back to `string` when names are widened/dynamic.
|
|
1169
|
+
*/
|
|
1170
|
+
type ConstraintNames<R extends NodeRegistration> = "unique" extends keyof R ? R["unique"] extends readonly {
|
|
1171
|
+
readonly name: infer N;
|
|
1172
|
+
}[] ? N & string : string : never;
|
|
1172
1173
|
/**
|
|
1173
1174
|
* Extract the union of 'from' node types from an EdgeRegistration.
|
|
1174
1175
|
*/
|
|
@@ -1201,7 +1202,7 @@ type TypedEdgeCollection<R extends EdgeRegistration> = EdgeCollection<R["type"],
|
|
|
1201
1202
|
type TransactionContext<G extends GraphDef> = Readonly<{
|
|
1202
1203
|
/** Node collections for the transaction */
|
|
1203
1204
|
nodes: {
|
|
1204
|
-
[K in keyof G["nodes"] & string]-?: NodeCollection<G["nodes"][K]["type"]
|
|
1205
|
+
[K in keyof G["nodes"] & string]-?: NodeCollection<G["nodes"][K]["type"], ConstraintNames<G["nodes"][K]>>;
|
|
1205
1206
|
};
|
|
1206
1207
|
/** Edge collections for the transaction */
|
|
1207
1208
|
edges: {
|
|
@@ -1819,7 +1820,7 @@ declare class Store<G extends GraphDef> {
|
|
|
1819
1820
|
* ```
|
|
1820
1821
|
*/
|
|
1821
1822
|
get nodes(): {
|
|
1822
|
-
[K in keyof G["nodes"] & string]-?: NodeCollection<G["nodes"][K]["type"]
|
|
1823
|
+
[K in keyof G["nodes"] & string]-?: NodeCollection<G["nodes"][K]["type"], ConstraintNames<G["nodes"][K]>>;
|
|
1823
1824
|
};
|
|
1824
1825
|
/**
|
|
1825
1826
|
* Edge collections for ergonomic CRUD operations.
|
|
@@ -1954,4 +1955,4 @@ declare function createStore<G extends GraphDef>(graph: G, backend: GraphBackend
|
|
|
1954
1955
|
*/
|
|
1955
1956
|
declare function createStoreWithSchema<G extends GraphDef>(graph: G, backend: GraphBackend, options?: StoreOptions & SchemaManagerOptions): Promise<[Store<G>, SchemaValidationResult]>;
|
|
1956
1957
|
|
|
1957
|
-
export { embedding as $, type AliasMap as A, type
|
|
1958
|
+
export { embedding as $, type AliasMap as A, type SelectableEdge as B, type CreateQueryBuilderOptions as C, type SelectableNode as D, type EdgeAliasMap as E, type FieldAccessor as F, type GetOrCreateAction as G, type HookContext as H, type IfExistsMode as I, Store as J, type StoreHooks as K, type StoreOptions as L, type StreamOptions 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 TransactionContext as U, type TypedEdgeCollection as V, UnionableQuery as W, type UpdateEdgeInput as X, type UpdateNodeInput as Y, createStore as Z, createStoreWithSchema as _, type AggregateResult as a, exists as a0, fieldRef as a1, getEmbeddingDimensions as a2, inSubquery as a3, isEmbeddingSchema as a4, isParameterRef as a5, notExists as a6, notInSubquery as a7, param as a8, type ConstraintNames as b, type CreateEdgeInput as c, type CreateNodeInput as d, type Edge as e, type EdgeAccessor as f, type EdgeCollection as g, type EdgeFindByEndpointsOptions as h, type EdgeGetOrCreateByEndpointsOptions as i, type EdgeGetOrCreateByEndpointsResult as j, type EmbeddingSchema as k, type EmbeddingValue as l, ExecutableAggregateQuery as m, ExecutableQuery as n, type NodeAccessor as o, type NodeAlias as p, type NodeCollection as q, type NodeGetOrCreateByConstraintOptions as r, type NodeGetOrCreateByConstraintResult as s, type NodeRef as t, type PaginatedResult as u, type Predicate as v, PreparedQuery as w, type PropsAccessor as x, type QueryHookContext as y, type QueryOptions as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SQL } from 'drizzle-orm';
|
|
2
|
-
import { N as NodeType, E as EdgeType,
|
|
2
|
+
import { N as NodeType, E as EdgeType, j as UniquenessScope, a as Collation, D as DeleteBehavior, C as Cardinality, f as EndpointExistence, T as TemporalMode, S as SqlDialect } from './types-DMzKq0d5.js';
|
|
3
3
|
|
|
4
4
|
/** Brand key for MetaEdge */
|
|
5
5
|
declare const META_EDGE_BRAND: "__metaEdge";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { A as AnyEdgeType, E as EdgeType, N as NodeType } from './types-
|
|
3
|
-
import { J as JsonPointer, V as ValueType, b as JsonPointerFor, f as JsonPointerSegmentsFor } from './ast-
|
|
2
|
+
import { A as AnyEdgeType, E as EdgeType, N as NodeType } from './types-DMzKq0d5.cjs';
|
|
3
|
+
import { J as JsonPointer, V as ValueType, b as JsonPointerFor, f as JsonPointerSegmentsFor } from './ast-Bh2NDeaK.cjs';
|
|
4
4
|
|
|
5
5
|
type IndexScope =
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { A as AnyEdgeType, E as EdgeType, N as NodeType } from './types-
|
|
3
|
-
import { J as JsonPointer, V as ValueType, b as JsonPointerFor, f as JsonPointerSegmentsFor } from './ast-
|
|
2
|
+
import { A as AnyEdgeType, E as EdgeType, N as NodeType } from './types-DMzKq0d5.js';
|
|
3
|
+
import { J as JsonPointer, V as ValueType, b as JsonPointerFor, f as JsonPointerSegmentsFor } from './ast-COMyNeMn.js';
|
|
4
4
|
|
|
5
5
|
type IndexScope =
|
|
6
6
|
/**
|