@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.
Files changed (53) hide show
  1. package/dist/{ast-Cq9qrnNP.d.cts → ast-Bh2NDeaK.d.cts} +1 -1
  2. package/dist/{ast-CG87Zr6p.d.ts → ast-COMyNeMn.d.ts} +1 -1
  3. package/dist/backend/postgres/index.d.cts +7 -7
  4. package/dist/backend/postgres/index.d.ts +7 -7
  5. package/dist/backend/sqlite/index.d.cts +7 -7
  6. package/dist/backend/sqlite/index.d.ts +7 -7
  7. package/dist/backend/sqlite/local.d.cts +5 -5
  8. package/dist/backend/sqlite/local.d.ts +5 -5
  9. package/dist/{chunk-K2ROKOK3.cjs → chunk-BELXZTVK.cjs} +2 -2
  10. package/dist/chunk-BELXZTVK.cjs.map +1 -0
  11. package/dist/{chunk-TGDFBLGS.js → chunk-JUZWF5NX.js} +2 -2
  12. package/dist/chunk-JUZWF5NX.js.map +1 -0
  13. package/dist/{chunk-LDM2AFKZ.cjs → chunk-PDQBCQ34.cjs} +6 -6
  14. package/dist/{chunk-LDM2AFKZ.cjs.map → chunk-PDQBCQ34.cjs.map} +1 -1
  15. package/dist/{chunk-M5SOQ7UV.js → chunk-SH237DWD.js} +3 -3
  16. package/dist/{chunk-M5SOQ7UV.js.map → chunk-SH237DWD.js.map} +1 -1
  17. package/dist/{ddl-Bcyb4DW1.d.cts → ddl-BJg93HDN.d.cts} +2 -2
  18. package/dist/{ddl-D7DQx8w8.d.ts → ddl-CsfWcl_B.d.ts} +2 -2
  19. package/dist/index.cjs +61 -61
  20. package/dist/index.cjs.map +1 -1
  21. package/dist/index.d.cts +10 -10
  22. package/dist/index.d.ts +10 -10
  23. package/dist/index.js +4 -4
  24. package/dist/index.js.map +1 -1
  25. package/dist/indexes/index.d.cts +5 -5
  26. package/dist/indexes/index.d.ts +5 -5
  27. package/dist/interchange/index.cjs +6 -6
  28. package/dist/interchange/index.d.cts +5 -5
  29. package/dist/interchange/index.d.ts +5 -5
  30. package/dist/interchange/index.js +1 -1
  31. package/dist/{manager-BImRiYwz.d.cts → manager-Ba2CXGMG.d.ts} +5 -5
  32. package/dist/{manager-DGQ9UF18.d.ts → manager-Cu3JQN0H.d.cts} +5 -5
  33. package/dist/profiler/index.d.cts +7 -7
  34. package/dist/profiler/index.d.ts +7 -7
  35. package/dist/schema/index.cjs +21 -21
  36. package/dist/schema/index.d.cts +5 -5
  37. package/dist/schema/index.d.ts +5 -5
  38. package/dist/schema/index.js +3 -3
  39. package/dist/{sqlite-FWGZLwDd.d.cts → sqlite-DVca_IIy.d.cts} +1 -1
  40. package/dist/{sqlite-CSJ-fgIm.d.ts → sqlite-H01wIXvB.d.ts} +1 -1
  41. package/dist/{store-DNv1yd3n.d.cts → store-CL-QMus7.d.cts} +62 -61
  42. package/dist/{store-CscQUG-S.d.ts → store-DJpuUOSL.d.ts} +62 -61
  43. package/dist/{types-D5ggX07j.d.ts → types-1YJKodRv.d.ts} +1 -1
  44. package/dist/{types-BbMn2Ycv.d.cts → types-C8Ra3ROE.d.cts} +2 -2
  45. package/dist/{types-C2rhqkg7.d.ts → types-CC8eB0PB.d.ts} +2 -2
  46. package/dist/{types-DJZoHy5R.d.ts → types-COPePE8_.d.ts} +1 -1
  47. package/dist/{types-DEMAqkA1.d.cts → types-CVtGFpB9.d.cts} +1 -1
  48. package/dist/{types-DolHw9pJ.d.cts → types-DMzKq0d5.d.cts} +11 -1
  49. package/dist/{types-DolHw9pJ.d.ts → types-DMzKq0d5.d.ts} +11 -1
  50. package/dist/{types-SVDEKnU6.d.cts → types-GLkwvQvS.d.cts} +1 -1
  51. package/package.json +6 -1
  52. package/dist/chunk-K2ROKOK3.cjs.map +0 -1
  53. package/dist/chunk-TGDFBLGS.js.map +0 -1
@@ -1,7 +1,7 @@
1
- import { S as SqlSchema, G as GraphBackend } from './types-SVDEKnU6.cjs';
2
- import { K as KindRegistry, G as GraphDef, S as SchemaManagerOptions, f as SchemaValidationResult } from './manager-BImRiYwz.cjs';
3
- import { S as SqlDialect, N as NodeType, A as AnyEdgeType, T as TemporalMode, E as EdgeType, c as EdgeRegistration, f as NodeId } from './types-DolHw9pJ.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-Cq9qrnNP.cjs';
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: string;
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: string;
654
- fromId: string;
655
- toKind: string;
656
- toId: string;
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: string;
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: string, props: z.input<N["schema"]>) => Promise<Node<N> | undefined>;
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: string, items: readonly Readonly<{
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: string, props: z.input<N["schema"]>, options?: NodeGetOrCreateByConstraintOptions) => Promise<NodeGetOrCreateByConstraintResult<N>>;
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: string, items: readonly Readonly<{
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 endpoint (kind and id).
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 TypedNodeRef<N extends NodeType> = Node<N> | Readonly<{
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: TypedNodeRef<From>, to: TypedNodeRef<To>, ...args: EdgeCreateArguments<E>) => Promise<Edge<E>>;
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: string, options?: QueryOptions) => Promise<Edge<E> | undefined>;
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 string[], options?: QueryOptions) => Promise<readonly (Edge<E> | undefined)[]>;
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: string, props: Partial<z.input<E["schema"]>>, options?: Readonly<{
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: TypedNodeRef<From>) => Promise<Edge<E>[]>;
1046
+ findFrom: (from: NodeRef<From>) => Promise<Edge<E, From, To>[]>;
1056
1047
  /** Find edges to a specific node */
1057
- findTo: (to: TypedNodeRef<To>) => Promise<Edge<E>[]>;
1048
+ findTo: (to: NodeRef<To>) => Promise<Edge<E, From, To>[]>;
1058
1049
  /** Delete an edge (soft delete - sets deletedAt timestamp) */
1059
- delete: (id: string) => Promise<void>;
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: string) => Promise<void>;
1060
+ hardDelete: (id: EdgeId<E>) => Promise<void>;
1070
1061
  /** Find edges matching endpoint and pagination criteria */
1071
1062
  find: (options?: Readonly<{
1072
- from?: TypedNodeRef<From>;
1073
- to?: TypedNodeRef<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?: TypedNodeRef<From>;
1082
- to?: TypedNodeRef<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: TypedNodeRef<From>;
1094
- to: TypedNodeRef<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: string;
1108
- from: TypedNodeRef<From>;
1109
- to: TypedNodeRef<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: TypedNodeRef<From>;
1123
- to: TypedNodeRef<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 string[]) => Promise<void>;
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: TypedNodeRef<From>, to: TypedNodeRef<To>, options?: EdgeFindByEndpointsOptions<E>) => Promise<Edge<E> | undefined>;
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: TypedNodeRef<From>, to: TypedNodeRef<To>, props: z.input<E["schema"]>, options?: EdgeGetOrCreateByEndpointsOptions<E>) => Promise<EdgeGetOrCreateByEndpointsResult<E>>;
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: TypedNodeRef<From>;
1168
- to: TypedNodeRef<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 SelectableNode as B, type CreateQueryBuilderOptions as C, Store as D, type EdgeAliasMap as E, type FieldAccessor as F, type GetOrCreateAction as G, type HookContext as H, type IfExistsMode as I, type StoreHooks as J, type StoreOptions as K, type StreamOptions as L, type TransactionContext 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 TypedEdgeCollection as U, type TypedNodeRef 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 CreateEdgeInput as b, type CreateNodeInput as c, type Edge as d, type EdgeAccessor as e, type EdgeCollection as f, type EdgeFindByEndpointsOptions as g, type EdgeGetOrCreateByEndpointsOptions as h, type EdgeGetOrCreateByEndpointsResult as i, type EmbeddingSchema as j, type EmbeddingValue as k, ExecutableAggregateQuery as l, ExecutableQuery as m, type NodeAccessor as n, type NodeAlias as o, type NodeCollection as p, type NodeGetOrCreateByConstraintOptions as q, type NodeGetOrCreateByConstraintResult as r, type NodeRef as s, type PaginatedResult as t, type Predicate as u, PreparedQuery as v, type PropsAccessor as w, type QueryHookContext as x, type QueryOptions as y, type SelectableEdge as z };
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-D5ggX07j.js';
2
- import { K as KindRegistry, G as GraphDef, S as SchemaManagerOptions, f as SchemaValidationResult } from './manager-DGQ9UF18.js';
3
- import { S as SqlDialect, N as NodeType, A as AnyEdgeType, T as TemporalMode, E as EdgeType, c as EdgeRegistration, f as NodeId } from './types-DolHw9pJ.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-CG87Zr6p.js';
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: string;
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: string;
654
- fromId: string;
655
- toKind: string;
656
- toId: string;
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: string;
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: string, props: z.input<N["schema"]>) => Promise<Node<N> | undefined>;
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: string, items: readonly Readonly<{
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: string, props: z.input<N["schema"]>, options?: NodeGetOrCreateByConstraintOptions) => Promise<NodeGetOrCreateByConstraintResult<N>>;
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: string, items: readonly Readonly<{
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 endpoint (kind and id).
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 TypedNodeRef<N extends NodeType> = Node<N> | Readonly<{
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: TypedNodeRef<From>, to: TypedNodeRef<To>, ...args: EdgeCreateArguments<E>) => Promise<Edge<E>>;
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: string, options?: QueryOptions) => Promise<Edge<E> | undefined>;
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 string[], options?: QueryOptions) => Promise<readonly (Edge<E> | undefined)[]>;
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: string, props: Partial<z.input<E["schema"]>>, options?: Readonly<{
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: TypedNodeRef<From>) => Promise<Edge<E>[]>;
1046
+ findFrom: (from: NodeRef<From>) => Promise<Edge<E, From, To>[]>;
1056
1047
  /** Find edges to a specific node */
1057
- findTo: (to: TypedNodeRef<To>) => Promise<Edge<E>[]>;
1048
+ findTo: (to: NodeRef<To>) => Promise<Edge<E, From, To>[]>;
1058
1049
  /** Delete an edge (soft delete - sets deletedAt timestamp) */
1059
- delete: (id: string) => Promise<void>;
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: string) => Promise<void>;
1060
+ hardDelete: (id: EdgeId<E>) => Promise<void>;
1070
1061
  /** Find edges matching endpoint and pagination criteria */
1071
1062
  find: (options?: Readonly<{
1072
- from?: TypedNodeRef<From>;
1073
- to?: TypedNodeRef<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?: TypedNodeRef<From>;
1082
- to?: TypedNodeRef<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: TypedNodeRef<From>;
1094
- to: TypedNodeRef<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: string;
1108
- from: TypedNodeRef<From>;
1109
- to: TypedNodeRef<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: TypedNodeRef<From>;
1123
- to: TypedNodeRef<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 string[]) => Promise<void>;
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: TypedNodeRef<From>, to: TypedNodeRef<To>, options?: EdgeFindByEndpointsOptions<E>) => Promise<Edge<E> | undefined>;
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: TypedNodeRef<From>, to: TypedNodeRef<To>, props: z.input<E["schema"]>, options?: EdgeGetOrCreateByEndpointsOptions<E>) => Promise<EdgeGetOrCreateByEndpointsResult<E>>;
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: TypedNodeRef<From>;
1168
- to: TypedNodeRef<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 SelectableNode as B, type CreateQueryBuilderOptions as C, Store as D, type EdgeAliasMap as E, type FieldAccessor as F, type GetOrCreateAction as G, type HookContext as H, type IfExistsMode as I, type StoreHooks as J, type StoreOptions as K, type StreamOptions as L, type TransactionContext 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 TypedEdgeCollection as U, type TypedNodeRef 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 CreateEdgeInput as b, type CreateNodeInput as c, type Edge as d, type EdgeAccessor as e, type EdgeCollection as f, type EdgeFindByEndpointsOptions as g, type EdgeGetOrCreateByEndpointsOptions as h, type EdgeGetOrCreateByEndpointsResult as i, type EmbeddingSchema as j, type EmbeddingValue as k, ExecutableAggregateQuery as l, ExecutableQuery as m, type NodeAccessor as n, type NodeAlias as o, type NodeCollection as p, type NodeGetOrCreateByConstraintOptions as q, type NodeGetOrCreateByConstraintResult as r, type NodeRef as s, type PaginatedResult as t, type Predicate as u, PreparedQuery as v, type PropsAccessor as w, type QueryHookContext as x, type QueryOptions as y, type SelectableEdge as z };
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, i as UniquenessScope, a as Collation, D as DeleteBehavior, C as Cardinality, e as EndpointExistence, T as TemporalMode, S as SqlDialect } from './types-DolHw9pJ.js';
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-DolHw9pJ.cjs';
3
- import { J as JsonPointer, V as ValueType, b as JsonPointerFor, f as JsonPointerSegmentsFor } from './ast-Cq9qrnNP.cjs';
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-DolHw9pJ.js';
3
- import { J as JsonPointer, V as ValueType, b as JsonPointerFor, f as JsonPointerSegmentsFor } from './ast-CG87Zr6p.js';
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
  /**
@@ -1,4 +1,4 @@
1
- import { J as JsonPointer } from './ast-CG87Zr6p.js';
1
+ import { J as JsonPointer } from './ast-COMyNeMn.js';
2
2
 
3
3
  /**
4
4
  * QueryProfiler types.
@@ -1,4 +1,4 @@
1
- import { J as JsonPointer } from './ast-Cq9qrnNP.cjs';
1
+ import { J as JsonPointer } from './ast-Bh2NDeaK.cjs';
2
2
 
3
3
  /**
4
4
  * QueryProfiler types.