@nicia-ai/typegraph 0.55.0 → 0.56.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/CHANGELOG.md +14 -0
- package/dist/backend/index.cjs +86 -86
- package/dist/backend/index.js +7 -7
- package/dist/backend/postgres/index.cjs +22 -22
- package/dist/backend/postgres/index.js +8 -8
- package/dist/backend/postgres/pglite-store.cjs +1 -1
- package/dist/backend/postgres/pglite-store.d.cts +2 -2
- package/dist/backend/postgres/pglite-store.d.ts +2 -2
- package/dist/backend/postgres/pglite-store.js +1 -1
- package/dist/backend/postgres/pglite.cjs +10 -10
- package/dist/backend/postgres/pglite.js +9 -9
- package/dist/backend/sqlite/index.cjs +21 -21
- package/dist/backend/sqlite/index.js +8 -8
- package/dist/backend/sqlite/libsql.cjs +12 -12
- package/dist/backend/sqlite/libsql.js +8 -8
- package/dist/backend/sqlite/local-store.cjs +1 -1
- package/dist/backend/sqlite/local-store.d.cts +2 -2
- package/dist/backend/sqlite/local-store.d.ts +2 -2
- package/dist/backend/sqlite/local-store.js +1 -1
- package/dist/backend/sqlite/local.cjs +10 -10
- package/dist/backend/sqlite/local.js +9 -9
- package/dist/{chunk-S5WG5AFG.cjs → chunk-2XUAUSMI.cjs} +12 -12
- package/dist/{chunk-S5WG5AFG.cjs.map → chunk-2XUAUSMI.cjs.map} +1 -1
- package/dist/{chunk-MTE255N3.cjs → chunk-36XLQHZA.cjs} +4 -4
- package/dist/{chunk-MTE255N3.cjs.map → chunk-36XLQHZA.cjs.map} +1 -1
- package/dist/{chunk-FWSGKOBN.js → chunk-6LTRZOUU.js} +6 -6
- package/dist/{chunk-FWSGKOBN.js.map → chunk-6LTRZOUU.js.map} +1 -1
- package/dist/{chunk-YVKPUSHS.js → chunk-75KH6Y2W.js} +16 -7
- package/dist/chunk-75KH6Y2W.js.map +1 -0
- package/dist/{chunk-MJXEO7YA.js → chunk-762VPGHN.js} +5 -5
- package/dist/{chunk-MJXEO7YA.js.map → chunk-762VPGHN.js.map} +1 -1
- package/dist/{chunk-GGDTMBNA.cjs → chunk-7CCVR2QF.cjs} +54 -54
- package/dist/{chunk-GGDTMBNA.cjs.map → chunk-7CCVR2QF.cjs.map} +1 -1
- package/dist/{chunk-7EOJO6QB.js → chunk-7MHENVRG.js} +3 -3
- package/dist/{chunk-7EOJO6QB.js.map → chunk-7MHENVRG.js.map} +1 -1
- package/dist/{chunk-7B3DSFX3.cjs → chunk-AUTRK6WM.cjs} +4 -4
- package/dist/{chunk-7B3DSFX3.cjs.map → chunk-AUTRK6WM.cjs.map} +1 -1
- package/dist/{chunk-SIQ4BFL5.js → chunk-AZP5CCHL.js} +4 -4
- package/dist/{chunk-SIQ4BFL5.js.map → chunk-AZP5CCHL.js.map} +1 -1
- package/dist/{chunk-WTW7RWAG.cjs → chunk-BYUIOM4L.cjs} +6 -6
- package/dist/{chunk-WTW7RWAG.cjs.map → chunk-BYUIOM4L.cjs.map} +1 -1
- package/dist/{chunk-74FNI3PT.js → chunk-C3TJU4KQ.js} +6 -6
- package/dist/chunk-C3TJU4KQ.js.map +1 -0
- package/dist/{chunk-7V2R4MH6.js → chunk-CEQOTZGB.js} +5 -5
- package/dist/{chunk-7V2R4MH6.js.map → chunk-CEQOTZGB.js.map} +1 -1
- package/dist/{chunk-TKFQLKH2.cjs → chunk-CYKHSH5O.cjs} +36 -36
- package/dist/{chunk-TKFQLKH2.cjs.map → chunk-CYKHSH5O.cjs.map} +1 -1
- package/dist/{chunk-D5TCKAQT.cjs → chunk-DGIA64DM.cjs} +4 -4
- package/dist/{chunk-D5TCKAQT.cjs.map → chunk-DGIA64DM.cjs.map} +1 -1
- package/dist/{chunk-FFR3YUY2.js → chunk-E4QYEWVH.js} +5 -5
- package/dist/{chunk-FFR3YUY2.js.map → chunk-E4QYEWVH.js.map} +1 -1
- package/dist/{chunk-467YITD4.cjs → chunk-ETU5IILQ.cjs} +13 -13
- package/dist/{chunk-467YITD4.cjs.map → chunk-ETU5IILQ.cjs.map} +1 -1
- package/dist/{chunk-HW3IX2RF.js → chunk-EWRLWI7W.js} +4 -4
- package/dist/{chunk-HW3IX2RF.js.map → chunk-EWRLWI7W.js.map} +1 -1
- package/dist/{chunk-KZ6OHFDV.js → chunk-F2S5JWCT.js} +3 -3
- package/dist/{chunk-KZ6OHFDV.js.map → chunk-F2S5JWCT.js.map} +1 -1
- package/dist/{chunk-45WPPI64.js → chunk-FMCPKMQI.js} +3 -3
- package/dist/{chunk-45WPPI64.js.map → chunk-FMCPKMQI.js.map} +1 -1
- package/dist/{chunk-QM6IQW7B.js → chunk-ILHVYKXJ.js} +7 -7
- package/dist/{chunk-QM6IQW7B.js.map → chunk-ILHVYKXJ.js.map} +1 -1
- package/dist/{chunk-ECYEWFEH.cjs → chunk-J34FSPSC.cjs} +16 -6
- package/dist/chunk-J34FSPSC.cjs.map +1 -0
- package/dist/{chunk-GFYCLCGU.cjs → chunk-KM3CLHDB.cjs} +9 -9
- package/dist/{chunk-GFYCLCGU.cjs.map → chunk-KM3CLHDB.cjs.map} +1 -1
- package/dist/{chunk-SLNH62T3.js → chunk-KQYUKOGX.js} +3 -3
- package/dist/{chunk-SLNH62T3.js.map → chunk-KQYUKOGX.js.map} +1 -1
- package/dist/{chunk-7I2PYI4U.cjs → chunk-KR3N6Y7O.cjs} +67 -67
- package/dist/{chunk-7I2PYI4U.cjs.map → chunk-KR3N6Y7O.cjs.map} +1 -1
- package/dist/{chunk-HZCOCNIX.cjs → chunk-L2REUAJB.cjs} +24 -24
- package/dist/{chunk-HZCOCNIX.cjs.map → chunk-L2REUAJB.cjs.map} +1 -1
- package/dist/{chunk-VU65FXEG.js → chunk-LFXBFPI2.js} +66 -29
- package/dist/chunk-LFXBFPI2.js.map +1 -0
- package/dist/{chunk-NXRSR6QG.js → chunk-MHM6OGZR.js} +9 -9
- package/dist/{chunk-NXRSR6QG.js.map → chunk-MHM6OGZR.js.map} +1 -1
- package/dist/{chunk-FCUSVSYX.js → chunk-MRGWM5LE.js} +10 -10
- package/dist/{chunk-FCUSVSYX.js.map → chunk-MRGWM5LE.js.map} +1 -1
- package/dist/{chunk-WXGMDROJ.js → chunk-QDNEXTON.js} +7 -7
- package/dist/{chunk-WXGMDROJ.js.map → chunk-QDNEXTON.js.map} +1 -1
- package/dist/{chunk-VYU5H4FO.js → chunk-RXA2D3UR.js} +3 -3
- package/dist/{chunk-VYU5H4FO.js.map → chunk-RXA2D3UR.js.map} +1 -1
- package/dist/{chunk-XODNY4QI.js → chunk-TIBSLFHR.js} +6 -6
- package/dist/{chunk-XODNY4QI.js.map → chunk-TIBSLFHR.js.map} +1 -1
- package/dist/{chunk-KZG7HQSN.cjs → chunk-UVMSWO6X.cjs} +173 -173
- package/dist/{chunk-KZG7HQSN.cjs.map → chunk-UVMSWO6X.cjs.map} +1 -1
- package/dist/{chunk-ORPT5EQW.cjs → chunk-UZ6CJUC5.cjs} +27 -27
- package/dist/chunk-UZ6CJUC5.cjs.map +1 -0
- package/dist/{chunk-GNF3PHEQ.cjs → chunk-VF2IMMZT.cjs} +17 -17
- package/dist/{chunk-GNF3PHEQ.cjs.map → chunk-VF2IMMZT.cjs.map} +1 -1
- package/dist/{chunk-PGZV3E3I.cjs → chunk-VXEHEPC4.cjs} +4 -4
- package/dist/{chunk-PGZV3E3I.cjs.map → chunk-VXEHEPC4.cjs.map} +1 -1
- package/dist/{chunk-OJ47LMOB.cjs → chunk-WIUHN6SZ.cjs} +669 -628
- package/dist/chunk-WIUHN6SZ.cjs.map +1 -0
- package/dist/{chunk-HNW5IDB3.js → chunk-WIZB5U6N.js} +7 -7
- package/dist/{chunk-HNW5IDB3.js.map → chunk-WIZB5U6N.js.map} +1 -1
- package/dist/{chunk-IDQZI6GL.js → chunk-XH75W3O5.js} +3 -3
- package/dist/{chunk-IDQZI6GL.js.map → chunk-XH75W3O5.js.map} +1 -1
- package/dist/{chunk-T7LSSV7J.cjs → chunk-XXEFDJHY.cjs} +45 -45
- package/dist/{chunk-T7LSSV7J.cjs.map → chunk-XXEFDJHY.cjs.map} +1 -1
- package/dist/{chunk-GORCU2GR.cjs → chunk-Z4NU4MYB.cjs} +123 -123
- package/dist/{chunk-GORCU2GR.cjs.map → chunk-Z4NU4MYB.cjs.map} +1 -1
- package/dist/{chunk-KFC3OUV4.cjs → chunk-ZHK3HEZ2.cjs} +130 -130
- package/dist/{chunk-KFC3OUV4.cjs.map → chunk-ZHK3HEZ2.cjs.map} +1 -1
- package/dist/{chunk-FYMYLZGX.cjs → chunk-ZXXGMQC3.cjs} +10 -10
- package/dist/{chunk-FYMYLZGX.cjs.map → chunk-ZXXGMQC3.cjs.map} +1 -1
- package/dist/graph-merge/index.cjs +577 -99
- package/dist/graph-merge/index.cjs.map +1 -1
- package/dist/graph-merge/index.d.cts +108 -4
- package/dist/graph-merge/index.d.ts +108 -4
- package/dist/graph-merge/index.js +495 -21
- package/dist/graph-merge/index.js.map +1 -1
- package/dist/{graph-templates-qraW63Ry.d.ts → graph-templates-BSA9VU_O.d.ts} +1 -1
- package/dist/{graph-templates--hp2U4kn.d.cts → graph-templates-Cg7DpEOF.d.cts} +1 -1
- package/dist/index.cjs +95 -95
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +16 -16
- package/dist/interchange/index.cjs +33 -33
- package/dist/interchange/index.d.cts +1 -1
- package/dist/interchange/index.d.ts +1 -1
- package/dist/interchange/index.js +10 -10
- package/dist/{local-store-impl-HXBO3VF4.js → local-store-impl-77DCLAAY.js} +18 -18
- package/dist/{local-store-impl-HXBO3VF4.js.map → local-store-impl-77DCLAAY.js.map} +1 -1
- package/dist/{local-store-impl-CUQKHHOZ.cjs → local-store-impl-NJCWM3KR.cjs} +22 -22
- package/dist/{local-store-impl-CUQKHHOZ.cjs.map → local-store-impl-NJCWM3KR.cjs.map} +1 -1
- package/dist/{pglite-store-impl-BD3AVOUH.js → pglite-store-impl-3VFSYLAJ.js} +18 -18
- package/dist/{pglite-store-impl-BD3AVOUH.js.map → pglite-store-impl-3VFSYLAJ.js.map} +1 -1
- package/dist/{pglite-store-impl-C3MQ72LT.cjs → pglite-store-impl-LHLJ3GBQ.cjs} +22 -22
- package/dist/{pglite-store-impl-C3MQ72LT.cjs.map → pglite-store-impl-LHLJ3GBQ.cjs.map} +1 -1
- package/dist/profiler/index.d.cts +1 -1
- package/dist/profiler/index.d.ts +1 -1
- package/dist/provenance/index.cjs +21 -21
- package/dist/provenance/index.d.cts +1 -1
- package/dist/provenance/index.d.ts +1 -1
- package/dist/provenance/index.js +5 -5
- package/dist/schema/index.cjs +36 -36
- package/dist/schema/index.d.cts +3 -3
- package/dist/schema/index.d.ts +3 -3
- package/dist/schema/index.js +6 -6
- package/dist/{store-stw2AEB4.d.ts → store-CQ3uzXla.d.ts} +58 -27
- package/dist/{store-DTEkUQ0k.d.cts → store-DbHAgVMH.d.cts} +58 -27
- package/package.json +1 -1
- package/dist/chunk-74FNI3PT.js.map +0 -1
- package/dist/chunk-ECYEWFEH.cjs.map +0 -1
- package/dist/chunk-OJ47LMOB.cjs.map +0 -1
- package/dist/chunk-ORPT5EQW.cjs.map +0 -1
- package/dist/chunk-VU65FXEG.js.map +0 -1
- package/dist/chunk-YVKPUSHS.js.map +0 -1
|
@@ -550,6 +550,14 @@ type DynamicSelectableEdge = Readonly<{
|
|
|
550
550
|
meta: SelectableEdgeMeta;
|
|
551
551
|
}> & Readonly<Record<string, unknown>>;
|
|
552
552
|
|
|
553
|
+
/**
|
|
554
|
+
* Reads node kinds without an inferred conditional that stays deferred for
|
|
555
|
+
* arrays of generic node types. Non-array values contribute never.
|
|
556
|
+
*/
|
|
557
|
+
type ArrayNodeKinds<T> = T[number & keyof T]["kind" & keyof T[number & keyof T]] & string;
|
|
558
|
+
/** Projects each declaration separately so mixed arrays/maps retain all kinds. */
|
|
559
|
+
type EdgeTargetKinds<T> = T extends unknown ? ArrayNodeKinds<T> | ArrayNodeKinds<T[keyof T]> : never;
|
|
560
|
+
|
|
553
561
|
/**
|
|
554
562
|
* Shared type definitions for the query builder.
|
|
555
563
|
*
|
|
@@ -584,17 +592,11 @@ type BatchResults<Queries extends readonly BatchableQuery<unknown>[]> = {
|
|
|
584
592
|
-readonly [K in keyof Queries]: Queries[K] extends BatchableQuery<infer R> ? readonly R[] : never;
|
|
585
593
|
};
|
|
586
594
|
/**
|
|
587
|
-
* Extracts the
|
|
588
|
-
*
|
|
589
|
-
*
|
|
590
|
-
* For "in" direction: returns the names of node kinds in the edge's "from" array.
|
|
591
|
-
*
|
|
592
|
-
* @example
|
|
593
|
-
* // Given: worksAt: { from: [Person], to: [Company, Organization] }
|
|
594
|
-
* // ValidEdgeTargets<G, "worksAt", "out"> = "Company" | "Organization"
|
|
595
|
-
* // ValidEdgeTargets<G, "worksAt", "in"> = "Person"
|
|
595
|
+
* Extracts the declared target kinds for an edge traversal.
|
|
596
|
+
* Outgoing traversals use the full range of an array or source-dependent map;
|
|
597
|
+
* incoming traversals use the source array.
|
|
596
598
|
*/
|
|
597
|
-
type ValidEdgeTargets<G extends GraphDef, EK extends keyof G["edges"] & string, Dir extends TraversalDirection$1> = G["edges"][EK] extends EdgeRegistration ? Dir extends "out" ? G["edges"][EK]["to"]
|
|
599
|
+
type ValidEdgeTargets<G extends GraphDef, EK extends keyof G["edges"] & string, Dir extends TraversalDirection$1> = G["edges"][EK] extends EdgeRegistration ? Dir extends "out" ? ArrayNodeKinds<G["edges"][EK]["to"]> | EdgeTargetKinds<G["edges"][EK]["to"]> : G["edges"][EK]["from"][number]["kind"] : never;
|
|
598
600
|
/**
|
|
599
601
|
* A node alias with its associated type.
|
|
600
602
|
*/
|
|
@@ -1855,6 +1857,8 @@ declare const EDGE_TEMPORAL_READ_NAMES: readonly ["getById", "getByIds", "find",
|
|
|
1855
1857
|
declare const EDGE_BATCH_READ_NAMES: readonly ["batchFindFrom", "batchFindTo", "batchFindByEndpoints"];
|
|
1856
1858
|
/** Edge write method names: never available on a read-only StoreView. */
|
|
1857
1859
|
declare const EDGE_WRITE_NAMES: readonly ["create", "update", "delete", "hardDelete", "bulkCreate", "bulkUpsertById", "bulkInsert", "bulkDelete", "getOrCreateByEndpoints", "bulkGetOrCreateByEndpoints"];
|
|
1860
|
+
/** Identity facade read method names: available on a read-only StoreView. */
|
|
1861
|
+
declare const IDENTITY_READ_NAMES: readonly ["representativeOf", "membersOf", "nodesOf", "areSame", "areDifferent", "assertionsOf"];
|
|
1858
1862
|
/** Recorded-time collection point reads that reconstruct safely by id. */
|
|
1859
1863
|
declare const RECORDED_POINT_READ_NAMES: readonly ["getById", "getByIds"];
|
|
1860
1864
|
|
|
@@ -2878,8 +2882,8 @@ type EdgeBulkCreateItem<Pairs extends EdgeEndpointPairTypes, Schema extends z.Zo
|
|
|
2878
2882
|
validFrom?: string | null;
|
|
2879
2883
|
validTo?: string;
|
|
2880
2884
|
}> : never;
|
|
2881
|
-
type EdgeBulkUpsertItem<E extends AnyEdgeType, Pairs extends EdgeEndpointPairTypes
|
|
2882
|
-
id:
|
|
2885
|
+
type EdgeBulkUpsertItem<E extends AnyEdgeType, Pairs extends EdgeEndpointPairTypes, Id extends string = EdgeId<E>> = Pairs extends EdgeEndpointPairTypes ? Readonly<{
|
|
2886
|
+
id: Id;
|
|
2883
2887
|
from: NodeRef<Pairs["from"]>;
|
|
2884
2888
|
to: NodeRef<Pairs["to"]>;
|
|
2885
2889
|
props?: z.input<E["schema"]>;
|
|
@@ -2917,10 +2921,15 @@ type EdgeGetOrCreateByEndpointsArguments<E extends AnyEdgeType, Pairs extends Ed
|
|
|
2917
2921
|
props: z.input<E["schema"]>,
|
|
2918
2922
|
options?: EdgeGetOrCreateByEndpointsOptions<E>
|
|
2919
2923
|
] : never;
|
|
2924
|
+
/**
|
|
2925
|
+
* Typed edge operations. InputId controls accepted ID arguments only; returned
|
|
2926
|
+
* edges retain their schema-derived ID brand. Prefer DynamicEdgeCollection<E>
|
|
2927
|
+
* for runtime endpoint dispatch instead of spelling its parameters manually.
|
|
2928
|
+
*/
|
|
2920
2929
|
type EdgeCollection<E extends AnyEdgeType, From extends NodeType = NodeType, To extends NodeType = NodeType, Pairs extends EdgeEndpointPairTypes = {
|
|
2921
2930
|
from: From;
|
|
2922
2931
|
to: To;
|
|
2923
|
-
}
|
|
2932
|
+
}, InputId extends string = EdgeId<E>> = Readonly<{
|
|
2924
2933
|
/**
|
|
2925
2934
|
* Create a new edge.
|
|
2926
2935
|
*
|
|
@@ -2936,14 +2945,14 @@ type EdgeCollection<E extends AnyEdgeType, From extends NodeType = NodeType, To
|
|
|
2936
2945
|
*/
|
|
2937
2946
|
create: (...args: EdgeCreateArgumentsTuple<E, Pairs>) => Promise<Edge<E, From, To>>;
|
|
2938
2947
|
/** Get an edge by ID */
|
|
2939
|
-
getById: (id:
|
|
2948
|
+
getById: (id: InputId, options?: QueryOptions) => Promise<Edge<E, From, To> | undefined>;
|
|
2940
2949
|
/** Get multiple edges by ID, preserving input order (undefined for missing) */
|
|
2941
|
-
getByIds: (ids: readonly
|
|
2950
|
+
getByIds: (ids: readonly InputId[], options?: QueryOptions) => Promise<readonly (Edge<E, From, To> | undefined)[]>;
|
|
2942
2951
|
/**
|
|
2943
2952
|
* Update an edge's properties and optionally set or clear its validity end.
|
|
2944
2953
|
* Reopening a `oneActive` edge rechecks cardinality before the write.
|
|
2945
2954
|
*/
|
|
2946
|
-
update: (id:
|
|
2955
|
+
update: (id: InputId, props: Partial<z.input<E["schema"]>>, options?: ValidityEndMutation) => Promise<Edge<E, From, To>>;
|
|
2947
2956
|
/**
|
|
2948
2957
|
* Find edges from a specific node.
|
|
2949
2958
|
*
|
|
@@ -3023,7 +3032,7 @@ type EdgeCollection<E extends AnyEdgeType, From extends NodeType = NodeType, To
|
|
|
3023
3032
|
*/
|
|
3024
3033
|
batchFindByEndpoints: (...args: EdgeFindByEndpointsArguments<E, Pairs>) => BatchableQuery<Edge<E, From, To>>;
|
|
3025
3034
|
/** Delete an edge (soft delete - sets deletedAt timestamp) */
|
|
3026
|
-
delete: (id:
|
|
3035
|
+
delete: (id: InputId) => Promise<void>;
|
|
3027
3036
|
/**
|
|
3028
3037
|
* Permanently delete an edge from the database.
|
|
3029
3038
|
*
|
|
@@ -3033,7 +3042,7 @@ type EdgeCollection<E extends AnyEdgeType, From extends NodeType = NodeType, To
|
|
|
3033
3042
|
* **Warning:** This operation is irreversible and should be used carefully.
|
|
3034
3043
|
* Consider using soft delete (`delete()`) for most use cases.
|
|
3035
3044
|
*/
|
|
3036
|
-
hardDelete: (id:
|
|
3045
|
+
hardDelete: (id: InputId) => Promise<void>;
|
|
3037
3046
|
/** Find edges matching endpoint and pagination criteria */
|
|
3038
3047
|
find: (filter?: Readonly<{
|
|
3039
3048
|
from?: NodeRef<From>;
|
|
@@ -3099,7 +3108,7 @@ type EdgeCollection<E extends AnyEdgeType, From extends NodeType = NodeType, To
|
|
|
3099
3108
|
* than silent, and the workaround is to split the handoff across two batches
|
|
3100
3109
|
* (free the slot, then claim it) or to apply those items individually.
|
|
3101
3110
|
*/
|
|
3102
|
-
bulkUpsertById: (items: readonly EdgeBulkUpsertItem<E, Pairs>[]) => Promise<Edge<E, From, To>[]>;
|
|
3111
|
+
bulkUpsertById: (items: readonly EdgeBulkUpsertItem<E, Pairs, InputId>[]) => Promise<Edge<E, From, To>[]>;
|
|
3103
3112
|
/**
|
|
3104
3113
|
* Insert multiple edges without returning results.
|
|
3105
3114
|
*
|
|
@@ -3126,7 +3135,7 @@ type EdgeCollection<E extends AnyEdgeType, From extends NodeType = NodeType, To
|
|
|
3126
3135
|
* because the whole batch is one transaction, that refusal rolls back
|
|
3127
3136
|
* every delete already applied for an earlier id in the same batch.
|
|
3128
3137
|
*/
|
|
3129
|
-
bulkDelete: (ids: readonly
|
|
3138
|
+
bulkDelete: (ids: readonly InputId[]) => Promise<void>;
|
|
3130
3139
|
/**
|
|
3131
3140
|
* Find an edge by endpoints and optional property fields.
|
|
3132
3141
|
*
|
|
@@ -3411,6 +3420,10 @@ type TransactionCollections<G extends GraphDef> = Readonly<{
|
|
|
3411
3420
|
[TRANSACTION_RUNTIME]: TransactionRuntime;
|
|
3412
3421
|
nodes: GraphNodeCollections<G>;
|
|
3413
3422
|
edges: GraphEdgeCollections<G>;
|
|
3423
|
+
/** Runtime endpoint validation with the selected edge's property schema retained. */
|
|
3424
|
+
getEdgeCollection: EdgeCollectionLookup<G>;
|
|
3425
|
+
/** Like getEdgeCollection, throwing KindNotFoundError when absent. */
|
|
3426
|
+
getEdgeCollectionOrThrow: RequiredEdgeCollectionLookup<G>;
|
|
3414
3427
|
/** Read-only backend projection bound to the same graph transaction. */
|
|
3415
3428
|
backend: TransactionReadBackend;
|
|
3416
3429
|
/**
|
|
@@ -3532,11 +3545,22 @@ type DynamicNodeCollection<K extends string = string> = WidenBrandedIds<NodeColl
|
|
|
3532
3545
|
* the dynamic path typically receives IDs from edge metadata, snapshots,
|
|
3533
3546
|
* or external input where the brand is not available.
|
|
3534
3547
|
*/
|
|
3535
|
-
type DynamicEdgeCollection =
|
|
3548
|
+
type DynamicEdgeCollection<E extends AnyEdgeType = AnyEdgeType> = Omit<EdgeCollection<E, NodeType, NodeType, {
|
|
3549
|
+
from: NodeType;
|
|
3550
|
+
to: NodeType;
|
|
3551
|
+
}, string>, "create"> & Readonly<{
|
|
3552
|
+
/** Create with runtime-validated endpoints and schema-typed properties. */
|
|
3553
|
+
create: (from: NodeRef, to: NodeRef, ...args: EdgeCreateArguments<E>) => Promise<Edge<E>>;
|
|
3554
|
+
}>;
|
|
3555
|
+
/** Runtime endpoint reads at a view's pinned coordinate; no writes or temporal overrides. */
|
|
3556
|
+
type DynamicStoreViewEdgeCollection<E extends AnyEdgeType = AnyEdgeType> = Omit<StoreViewEdgeCollection<E>, "getById" | "getByIds"> & Readonly<{
|
|
3557
|
+
getById: (id: string) => Promise<Edge<E> | undefined>;
|
|
3558
|
+
getByIds: (ids: readonly string[]) => Promise<readonly (Edge<E> | undefined)[]>;
|
|
3559
|
+
}>;
|
|
3536
3560
|
/** A node collection narrowed by Store-issued runtime-kind evidence. */
|
|
3537
3561
|
type RuntimeNodeCollection<T extends RuntimeNodeKind> = WidenBrandedIds<NodeCollection<RuntimeNodeTypeFor<T>, string>>;
|
|
3538
3562
|
/** An edge collection narrowed by Store-issued runtime-kind evidence. */
|
|
3539
|
-
type RuntimeEdgeCollection<T extends RuntimeEdgeKind> =
|
|
3563
|
+
type RuntimeEdgeCollection<T extends RuntimeEdgeKind> = DynamicEdgeCollection<RuntimeEdgeTypeFor<T>>;
|
|
3540
3564
|
/** One kind-grouped source input for a token-validated heterogeneous read. */
|
|
3541
3565
|
type RuntimeBulkEdgeSourceGroup<T extends RuntimeNodeKind> = T extends RuntimeNodeKind ? Readonly<{
|
|
3542
3566
|
kind: T;
|
|
@@ -5688,6 +5712,9 @@ declare abstract class CoordinatePinnedView<G extends GraphDef> {
|
|
|
5688
5712
|
declare class StoreViewImplementation<G extends GraphDef> extends CoordinatePinnedView<G> {
|
|
5689
5713
|
#private;
|
|
5690
5714
|
constructor(store: Store<G>, coordinate: StoreViewCoordinate | ReadCoordinate);
|
|
5715
|
+
/** Dynamic endpoint reads remain bound to this view's coordinate. */
|
|
5716
|
+
getEdgeCollection<K extends EdgeKinds<G>>(kind: K): DynamicStoreViewEdgeCollection<G["edges"][K]["type"]> | undefined;
|
|
5717
|
+
getEdgeCollection(kind: string): DynamicStoreViewEdgeCollection | undefined;
|
|
5691
5718
|
/** Adds a recorded-time pin, returning the narrow reconstructing view. */
|
|
5692
5719
|
asOfRecorded(recordedAsOf: RecordedInstant): RecordedStoreView<G>;
|
|
5693
5720
|
/** Read-only node collections pinned to this view's coordinate. */
|
|
@@ -5854,9 +5881,13 @@ interface RequiredNodeCollectionLookup {
|
|
|
5854
5881
|
<T extends RuntimeNodeKind>(token: T): RuntimeNodeCollection<T>;
|
|
5855
5882
|
<const K extends string>(kind: K): DynamicNodeCollection<K>;
|
|
5856
5883
|
}
|
|
5857
|
-
|
|
5858
|
-
|
|
5884
|
+
interface EdgeCollectionLookup<G extends GraphDef = GraphDef> {
|
|
5885
|
+
<K extends EdgeKinds<G>>(kind: K): DynamicEdgeCollection<G["edges"][K]["type"]> | undefined;
|
|
5886
|
+
(kind: string): DynamicEdgeCollection | undefined;
|
|
5887
|
+
}
|
|
5888
|
+
interface RequiredEdgeCollectionLookup<G extends GraphDef = GraphDef> {
|
|
5859
5889
|
<T extends RuntimeEdgeKind>(token: T): RuntimeEdgeCollection<T>;
|
|
5890
|
+
<K extends EdgeKinds<G>>(kind: K): DynamicEdgeCollection<G["edges"][K]["type"]>;
|
|
5860
5891
|
(kind: string): DynamicEdgeCollection;
|
|
5861
5892
|
}
|
|
5862
5893
|
type StoreCore<G extends GraphDef> = Readonly<{
|
|
@@ -5877,8 +5908,8 @@ type StoreCore<G extends GraphDef> = Readonly<{
|
|
|
5877
5908
|
runtimeEdgeKind: <const K extends string, const D extends ExtensionEdgeDef>(kind: K, definition: D) => RuntimeEdgeKind<K, ExtensionObjectSchema<ExtensionEdgeProperties<D>>>;
|
|
5878
5909
|
getNodeCollection: NodeCollectionLookup;
|
|
5879
5910
|
getNodeCollectionOrThrow: RequiredNodeCollectionLookup;
|
|
5880
|
-
getEdgeCollection: EdgeCollectionLookup
|
|
5881
|
-
getEdgeCollectionOrThrow: RequiredEdgeCollectionLookup
|
|
5911
|
+
getEdgeCollection: EdgeCollectionLookup<G>;
|
|
5912
|
+
getEdgeCollectionOrThrow: RequiredEdgeCollectionLookup<G>;
|
|
5882
5913
|
getNodePropsSchema: (kind: string) => z.ZodObject<z.ZodRawShape> | undefined;
|
|
5883
5914
|
getNodePropsSchemaOrThrow: (kind: string) => z.ZodObject<z.ZodRawShape>;
|
|
5884
5915
|
getEdgePropsSchema: (kind: string) => z.ZodObject<z.ZodRawShape> | undefined;
|
|
@@ -6214,4 +6245,4 @@ declare function createVerifiedAdapterStore<G extends GraphDef, TNativeTransacti
|
|
|
6214
6245
|
SchemaValidationResult
|
|
6215
6246
|
]>;
|
|
6216
6247
|
|
|
6217
|
-
export { type AnyNode as $, migrateSchema as A, parseSerializedSchema as B, requiresMigration as C, rollbackSchema as D, type AliasMap as E, type EdgeAliasMap as F, type RecursiveAliasMap as G, type HistoryStoreOptions as H, type IdentityAssertion as I, QueryBuilder as J, KindRegistry as K, type LiveStoreOptions as L, type MigrateSchemaOptions as M, type EmptyRecursiveAliasMap as N, type AdapterHistoryStore as O, type AdapterHistoryTransactionContext as P, type QueryCoordinateState as Q, type RecordedReadStoreOptions as R, type StoreOptions as S, TraversalBuilder as T, type UnboundLiveStoreOptions as U, type AdapterRecordedReadStore as V, type AdapterStore as W, type AdapterTransactionContext as X, type AggregateResult as Y, type AlgorithmCyclePolicy as Z, type AnyEdge as _, type SchemaManagerOptions as a, type
|
|
6248
|
+
export { type AnyNode as $, migrateSchema as A, parseSerializedSchema as B, requiresMigration as C, rollbackSchema as D, type AliasMap as E, type EdgeAliasMap as F, type RecursiveAliasMap as G, type HistoryStoreOptions as H, type IdentityAssertion as I, QueryBuilder as J, KindRegistry as K, type LiveStoreOptions as L, type MigrateSchemaOptions as M, type EmptyRecursiveAliasMap as N, type AdapterHistoryStore as O, type AdapterHistoryTransactionContext as P, type QueryCoordinateState as Q, type RecordedReadStoreOptions as R, type StoreOptions as S, TraversalBuilder as T, type UnboundLiveStoreOptions as U, type AdapterRecordedReadStore as V, type AdapterStore as W, type AdapterTransactionContext as X, type AggregateResult as Y, type AlgorithmCyclePolicy as Z, type AnyEdge as _, type SchemaManagerOptions as a, type HybridVectorOptions as a$, type BaseStoreOptions as a0, type BaseTraversalOptions as a1, type BatchResults as a2, type BatchableQuery as a3, type BulkEdgeSourceGroup as a4, type BulkFindEdgesFromParams as a5, type BulkFindEdgesFromResult as a6, type BulkFindRuntimeEdgesFromParams as a7, type BulkFindRuntimeEdgesFromResult as a8, type BulkOperationHookContext as a9, type EdgeBulkFindOptions as aA, type EdgeCollection as aB, type EdgeCollectionLookup as aC, type EdgeFindByEndpointsOptions as aD, type EdgeGetOrCreateByEndpointsOptions as aE, type EdgeGetOrCreateByEndpointsResult as aF, type EdgeIntrospection as aG, type EdgeTemporalReads as aH, type EdgeWrites as aI, type EmptyAliasMap as aJ, type EmptyEdgeAliasMap as aK, ExecutableAggregateQuery as aL, ExecutableQuery as aM, type FieldAccessor as aN, type FulltextSearchHit as aO, type FulltextSearchOptions as aP, type GetOrCreateAction as aQ, type GraphAlgorithms as aR, type GraphEdgeCollections as aS, type GraphEdgeForKinds as aT, type GraphNodeCollections as aU, type GraphNodeReference as aV, type HistoryStoreBackend as aW, type HookContext as aX, type HybridFulltextOptions as aY, type HybridSearchHit as aZ, type HybridSearchOptions as a_, type ClaimOwner as aa, type ClaimTarget as ab, type CompareAndSetAbsent as ac, type CompareAndSetExpected as ad, type ConstraintFenceViolation as ae, type ConstraintNames as af, type CreateEdgeInput as ag, type CreateNodeInput as ah, type DegreeOptions as ai, type DynamicEdgeAccessor as aj, type DynamicEdgeCollection as ak, type DynamicEdgeType as al, type DynamicFieldBuilder as am, type DynamicNode as an, type DynamicNodeAccessor as ao, type DynamicNodeCollection as ap, type DynamicNodeKind as aq, type DynamicNodeReference as ar, type DynamicNodeType as as, type DynamicSelectableEdge as at, type DynamicSelectableNode as au, type DynamicStoreViewEdgeCollection as av, type Edge as aw, type EdgeAccessor as ax, type EdgeBatchReads as ay, type EdgeBulkFindEndpointOptions as az, type Store as b, type RequiredEdgeCollectionLookup as b$, type IdentityAssertionWriteFacade as b0, type IdentityNodeReference as b1, type IdentityTraversalOption as b2, type IdentityValidityWindow as b3, type IfExistsMode as b4, type InitialQueryBuilder as b5, type KindIntrospection as b6, type KindPopulationStatistics as b7, type LabelPropagationMembership as b8, type LabelPropagationOptions as b9, type PaginatedResult as bA, type PathNode as bB, type PersonalizedPageRankOptions as bC, type PersonalizedPageRankSeed as bD, type Predicate as bE, PreparedQuery as bF, type PropertyPopulationStatistics as bG, type PropsAccessor as bH, type QueryHookContext as bI, type QueryOptions as bJ, type ReachableNode as bK, type ReachableOptions as bL, type RebuildContributionOptions as bM, type RebuildFulltextOptions as bN, type RebuildFulltextResult as bO, type ReclaimedVectorFieldEntry as bP, type RecordedScanOptions as bQ, type RecordedScanPage as bR, RecordedStoreView as bS, type RecordedStoreViewEdgeCollection as bT, type RecordedStoreViewEdgeCollections as bU, type RecordedStoreViewNodeCollection as bV, type RecordedStoreViewNodeCollections as bW, type RecursiveTraversalOptions as bX, type ReembedFunction as bY, type ReembedVectorFieldOptions as bZ, type ReembedVectorFieldResult as b_, type MaterializeRemovalsEntry as ba, type MaterializeRemovalsOptions as bb, type MaterializeRemovalsResult as bc, type MeasurableAdapterHistoryTransactionContext as bd, type MeasurableAdapterTransactionContext as be, type MeasurableTransactionContext as bf, type NeighborsOptions as bg, type NoRecordedCoordinate as bh, type Node as bi, type NodeAccessor as bj, type NodeAlias as bk, type NodeBulkFindByIndexOptions as bl, type NodeCollection as bm, type NodeCollectionLookup as bn, type NodeCurrentReads as bo, type NodeGetOrCreateByConstraintOptions as bp, type NodeGetOrCreateByConstraintResult as bq, type NodeIdentifier as br, type NodeRef as bs, type NodeTemporalReads as bt, type NodeWrites as bu, type OntologyIntrospection as bv, type OperationHookContext as bw, type PageRankOptions as bx, type PageRankScore as by, type PaginateOptions as bz, type HistoryStore as c, UnionableQuery as c$, type RequiredNodeCollectionLookup as c0, type RuntimeBulkEdgeSourceGroup as c1, type RuntimeEdgeCollection as c2, type RuntimeEdgeFor as c3, type RuntimeEdgeKind as c4, type RuntimeEdgeTypeFor as c5, type RuntimeNodeCollection as c6, type RuntimeNodeKind as c7, type RuntimeNodeReferenceFor as c8, type RuntimeNodeTypeFor as c9, type StoreViewGraphAlgorithms as cA, type StoreViewLabelPropagationOptions as cB, type StoreViewNeighborsOptions as cC, type StoreViewNodeCollection as cD, type StoreViewNodeCollections as cE, type StoreViewPageRankOptions as cF, type StoreViewPersonalizedPageRankOptions as cG, type StoreViewReachableOptions as cH, type StoreViewShortestPathOptions as cI, type StoreViewSubgraphOptions as cJ, type StoreViewWeaklyConnectedComponentsOptions as cK, type StoreViewWeightedShortestPathOptions as cL, type StreamOptions as cM, type SubgraphEdgeResult as cN, type SubgraphNodeResult as cO, type SubgraphOptions as cP, type SubgraphResult as cQ, type SubsetEdge as cR, type SubsetNode as cS, type TemporalAlgorithmOptions as cT, type TransactionContext as cU, type TransactionOutcome as cV, type TransactionReceipt as cW, type TraversalDirection as cX, type TypedEdgeCollection as cY, type TypedRecordedStoreViewEdgeCollection as cZ, type TypedStoreViewEdgeCollection as c_, type SchemaIntrospection as ca, type ScopedMeasure as cb, type SearchScopeOptions as cc, type SelectContext as cd, type SelectableEdge as ce, type SelectableNode as cf, type ShortestPathOptions as cg, type ShortestPathResult as ch, type SqlAvailability as ci, StoreAnalysisCursorStaleError as cj, type StoreAnalysisCursorStaleErrorDetails as ck, type StoreAnalysisSchemaCoordinate as cl, type StoreDescription as cm, type StoreHooks as cn, type StorePopulationStatistics as co, type StoreProjection as cp, type StoreRef as cq, StoreSearch as cr, type StoreValidationFailure as cs, type StoreValidationPage as ct, StoreView as cu, type StoreViewCanReachOptions as cv, type StoreViewCoordinate as cw, type StoreViewDegreeOptions as cx, type StoreViewEdgeCollection as cy, type StoreViewEdgeCollections as cz, type RecordedReadStore as d, type UniqueIntrospection as d0, type UpdateEdgeInput as d1, type UpdateNodeInput as d2, type ValidateStoreOptions as d3, type ValidityEndMutation as d4, type VectorSearchHit as d5, type VectorSearchOptions as d6, type WeaklyConnectedComponentMembership as d7, type WeaklyConnectedComponentsOptions as d8, type WeightedShortestPathOptions as d9, type WeightedShortestPathResult as da, asIdentityAssertionId as db, compareAndSetAbsent as dc, createAdapterStore as dd, createAdapterStoreWithSchema as de, createQueryBuilder as df, createStore as dg, createStoreWithSchema as dh, createVerifiedAdapterStore as di, createVerifiedStore as dj, defineSubgraphProject as dk, exists as dl, fieldRef as dm, inSubquery as dn, isParameterRef as dp, notExists as dq, notInSubquery as dr, param as ds, EDGE_TEMPORAL_READ_NAMES as dt, IDENTITY_READ_NAMES as du, type IdentityAssertionId as e, type IdentityAssertionResult as f, type IdentityFacade as g, type IdentityNode as h, type IdentityNodeRefInput as i, type IdentityPair as j, type IdentityReadFacade as k, type IdentityRelation as l, type IdentityWriteSummary as m, type ReconciledSchema as n, type MigrationHookContext as o, type SchemaValidationResult as p, applyDeprecatedKinds as q, assertSchemaCurrent as r, ensureSchema as s, getActiveSchema as t, getCommittedSchemaVersion as u, getSchemaChanges as v, initializeSchema as w, isSchemaInitialized as x, loadActiveSchemaWithBootstrap as y, loadAndMergeGraphExtensionDocument as z };
|
|
@@ -550,6 +550,14 @@ type DynamicSelectableEdge = Readonly<{
|
|
|
550
550
|
meta: SelectableEdgeMeta;
|
|
551
551
|
}> & Readonly<Record<string, unknown>>;
|
|
552
552
|
|
|
553
|
+
/**
|
|
554
|
+
* Reads node kinds without an inferred conditional that stays deferred for
|
|
555
|
+
* arrays of generic node types. Non-array values contribute never.
|
|
556
|
+
*/
|
|
557
|
+
type ArrayNodeKinds<T> = T[number & keyof T]["kind" & keyof T[number & keyof T]] & string;
|
|
558
|
+
/** Projects each declaration separately so mixed arrays/maps retain all kinds. */
|
|
559
|
+
type EdgeTargetKinds<T> = T extends unknown ? ArrayNodeKinds<T> | ArrayNodeKinds<T[keyof T]> : never;
|
|
560
|
+
|
|
553
561
|
/**
|
|
554
562
|
* Shared type definitions for the query builder.
|
|
555
563
|
*
|
|
@@ -584,17 +592,11 @@ type BatchResults<Queries extends readonly BatchableQuery<unknown>[]> = {
|
|
|
584
592
|
-readonly [K in keyof Queries]: Queries[K] extends BatchableQuery<infer R> ? readonly R[] : never;
|
|
585
593
|
};
|
|
586
594
|
/**
|
|
587
|
-
* Extracts the
|
|
588
|
-
*
|
|
589
|
-
*
|
|
590
|
-
* For "in" direction: returns the names of node kinds in the edge's "from" array.
|
|
591
|
-
*
|
|
592
|
-
* @example
|
|
593
|
-
* // Given: worksAt: { from: [Person], to: [Company, Organization] }
|
|
594
|
-
* // ValidEdgeTargets<G, "worksAt", "out"> = "Company" | "Organization"
|
|
595
|
-
* // ValidEdgeTargets<G, "worksAt", "in"> = "Person"
|
|
595
|
+
* Extracts the declared target kinds for an edge traversal.
|
|
596
|
+
* Outgoing traversals use the full range of an array or source-dependent map;
|
|
597
|
+
* incoming traversals use the source array.
|
|
596
598
|
*/
|
|
597
|
-
type ValidEdgeTargets<G extends GraphDef, EK extends keyof G["edges"] & string, Dir extends TraversalDirection$1> = G["edges"][EK] extends EdgeRegistration ? Dir extends "out" ? G["edges"][EK]["to"]
|
|
599
|
+
type ValidEdgeTargets<G extends GraphDef, EK extends keyof G["edges"] & string, Dir extends TraversalDirection$1> = G["edges"][EK] extends EdgeRegistration ? Dir extends "out" ? ArrayNodeKinds<G["edges"][EK]["to"]> | EdgeTargetKinds<G["edges"][EK]["to"]> : G["edges"][EK]["from"][number]["kind"] : never;
|
|
598
600
|
/**
|
|
599
601
|
* A node alias with its associated type.
|
|
600
602
|
*/
|
|
@@ -1855,6 +1857,8 @@ declare const EDGE_TEMPORAL_READ_NAMES: readonly ["getById", "getByIds", "find",
|
|
|
1855
1857
|
declare const EDGE_BATCH_READ_NAMES: readonly ["batchFindFrom", "batchFindTo", "batchFindByEndpoints"];
|
|
1856
1858
|
/** Edge write method names: never available on a read-only StoreView. */
|
|
1857
1859
|
declare const EDGE_WRITE_NAMES: readonly ["create", "update", "delete", "hardDelete", "bulkCreate", "bulkUpsertById", "bulkInsert", "bulkDelete", "getOrCreateByEndpoints", "bulkGetOrCreateByEndpoints"];
|
|
1860
|
+
/** Identity facade read method names: available on a read-only StoreView. */
|
|
1861
|
+
declare const IDENTITY_READ_NAMES: readonly ["representativeOf", "membersOf", "nodesOf", "areSame", "areDifferent", "assertionsOf"];
|
|
1858
1862
|
/** Recorded-time collection point reads that reconstruct safely by id. */
|
|
1859
1863
|
declare const RECORDED_POINT_READ_NAMES: readonly ["getById", "getByIds"];
|
|
1860
1864
|
|
|
@@ -2878,8 +2882,8 @@ type EdgeBulkCreateItem<Pairs extends EdgeEndpointPairTypes, Schema extends z.Zo
|
|
|
2878
2882
|
validFrom?: string | null;
|
|
2879
2883
|
validTo?: string;
|
|
2880
2884
|
}> : never;
|
|
2881
|
-
type EdgeBulkUpsertItem<E extends AnyEdgeType, Pairs extends EdgeEndpointPairTypes
|
|
2882
|
-
id:
|
|
2885
|
+
type EdgeBulkUpsertItem<E extends AnyEdgeType, Pairs extends EdgeEndpointPairTypes, Id extends string = EdgeId<E>> = Pairs extends EdgeEndpointPairTypes ? Readonly<{
|
|
2886
|
+
id: Id;
|
|
2883
2887
|
from: NodeRef<Pairs["from"]>;
|
|
2884
2888
|
to: NodeRef<Pairs["to"]>;
|
|
2885
2889
|
props?: z.input<E["schema"]>;
|
|
@@ -2917,10 +2921,15 @@ type EdgeGetOrCreateByEndpointsArguments<E extends AnyEdgeType, Pairs extends Ed
|
|
|
2917
2921
|
props: z.input<E["schema"]>,
|
|
2918
2922
|
options?: EdgeGetOrCreateByEndpointsOptions<E>
|
|
2919
2923
|
] : never;
|
|
2924
|
+
/**
|
|
2925
|
+
* Typed edge operations. InputId controls accepted ID arguments only; returned
|
|
2926
|
+
* edges retain their schema-derived ID brand. Prefer DynamicEdgeCollection<E>
|
|
2927
|
+
* for runtime endpoint dispatch instead of spelling its parameters manually.
|
|
2928
|
+
*/
|
|
2920
2929
|
type EdgeCollection<E extends AnyEdgeType, From extends NodeType = NodeType, To extends NodeType = NodeType, Pairs extends EdgeEndpointPairTypes = {
|
|
2921
2930
|
from: From;
|
|
2922
2931
|
to: To;
|
|
2923
|
-
}
|
|
2932
|
+
}, InputId extends string = EdgeId<E>> = Readonly<{
|
|
2924
2933
|
/**
|
|
2925
2934
|
* Create a new edge.
|
|
2926
2935
|
*
|
|
@@ -2936,14 +2945,14 @@ type EdgeCollection<E extends AnyEdgeType, From extends NodeType = NodeType, To
|
|
|
2936
2945
|
*/
|
|
2937
2946
|
create: (...args: EdgeCreateArgumentsTuple<E, Pairs>) => Promise<Edge<E, From, To>>;
|
|
2938
2947
|
/** Get an edge by ID */
|
|
2939
|
-
getById: (id:
|
|
2948
|
+
getById: (id: InputId, options?: QueryOptions) => Promise<Edge<E, From, To> | undefined>;
|
|
2940
2949
|
/** Get multiple edges by ID, preserving input order (undefined for missing) */
|
|
2941
|
-
getByIds: (ids: readonly
|
|
2950
|
+
getByIds: (ids: readonly InputId[], options?: QueryOptions) => Promise<readonly (Edge<E, From, To> | undefined)[]>;
|
|
2942
2951
|
/**
|
|
2943
2952
|
* Update an edge's properties and optionally set or clear its validity end.
|
|
2944
2953
|
* Reopening a `oneActive` edge rechecks cardinality before the write.
|
|
2945
2954
|
*/
|
|
2946
|
-
update: (id:
|
|
2955
|
+
update: (id: InputId, props: Partial<z.input<E["schema"]>>, options?: ValidityEndMutation) => Promise<Edge<E, From, To>>;
|
|
2947
2956
|
/**
|
|
2948
2957
|
* Find edges from a specific node.
|
|
2949
2958
|
*
|
|
@@ -3023,7 +3032,7 @@ type EdgeCollection<E extends AnyEdgeType, From extends NodeType = NodeType, To
|
|
|
3023
3032
|
*/
|
|
3024
3033
|
batchFindByEndpoints: (...args: EdgeFindByEndpointsArguments<E, Pairs>) => BatchableQuery<Edge<E, From, To>>;
|
|
3025
3034
|
/** Delete an edge (soft delete - sets deletedAt timestamp) */
|
|
3026
|
-
delete: (id:
|
|
3035
|
+
delete: (id: InputId) => Promise<void>;
|
|
3027
3036
|
/**
|
|
3028
3037
|
* Permanently delete an edge from the database.
|
|
3029
3038
|
*
|
|
@@ -3033,7 +3042,7 @@ type EdgeCollection<E extends AnyEdgeType, From extends NodeType = NodeType, To
|
|
|
3033
3042
|
* **Warning:** This operation is irreversible and should be used carefully.
|
|
3034
3043
|
* Consider using soft delete (`delete()`) for most use cases.
|
|
3035
3044
|
*/
|
|
3036
|
-
hardDelete: (id:
|
|
3045
|
+
hardDelete: (id: InputId) => Promise<void>;
|
|
3037
3046
|
/** Find edges matching endpoint and pagination criteria */
|
|
3038
3047
|
find: (filter?: Readonly<{
|
|
3039
3048
|
from?: NodeRef<From>;
|
|
@@ -3099,7 +3108,7 @@ type EdgeCollection<E extends AnyEdgeType, From extends NodeType = NodeType, To
|
|
|
3099
3108
|
* than silent, and the workaround is to split the handoff across two batches
|
|
3100
3109
|
* (free the slot, then claim it) or to apply those items individually.
|
|
3101
3110
|
*/
|
|
3102
|
-
bulkUpsertById: (items: readonly EdgeBulkUpsertItem<E, Pairs>[]) => Promise<Edge<E, From, To>[]>;
|
|
3111
|
+
bulkUpsertById: (items: readonly EdgeBulkUpsertItem<E, Pairs, InputId>[]) => Promise<Edge<E, From, To>[]>;
|
|
3103
3112
|
/**
|
|
3104
3113
|
* Insert multiple edges without returning results.
|
|
3105
3114
|
*
|
|
@@ -3126,7 +3135,7 @@ type EdgeCollection<E extends AnyEdgeType, From extends NodeType = NodeType, To
|
|
|
3126
3135
|
* because the whole batch is one transaction, that refusal rolls back
|
|
3127
3136
|
* every delete already applied for an earlier id in the same batch.
|
|
3128
3137
|
*/
|
|
3129
|
-
bulkDelete: (ids: readonly
|
|
3138
|
+
bulkDelete: (ids: readonly InputId[]) => Promise<void>;
|
|
3130
3139
|
/**
|
|
3131
3140
|
* Find an edge by endpoints and optional property fields.
|
|
3132
3141
|
*
|
|
@@ -3411,6 +3420,10 @@ type TransactionCollections<G extends GraphDef> = Readonly<{
|
|
|
3411
3420
|
[TRANSACTION_RUNTIME]: TransactionRuntime;
|
|
3412
3421
|
nodes: GraphNodeCollections<G>;
|
|
3413
3422
|
edges: GraphEdgeCollections<G>;
|
|
3423
|
+
/** Runtime endpoint validation with the selected edge's property schema retained. */
|
|
3424
|
+
getEdgeCollection: EdgeCollectionLookup<G>;
|
|
3425
|
+
/** Like getEdgeCollection, throwing KindNotFoundError when absent. */
|
|
3426
|
+
getEdgeCollectionOrThrow: RequiredEdgeCollectionLookup<G>;
|
|
3414
3427
|
/** Read-only backend projection bound to the same graph transaction. */
|
|
3415
3428
|
backend: TransactionReadBackend;
|
|
3416
3429
|
/**
|
|
@@ -3532,11 +3545,22 @@ type DynamicNodeCollection<K extends string = string> = WidenBrandedIds<NodeColl
|
|
|
3532
3545
|
* the dynamic path typically receives IDs from edge metadata, snapshots,
|
|
3533
3546
|
* or external input where the brand is not available.
|
|
3534
3547
|
*/
|
|
3535
|
-
type DynamicEdgeCollection =
|
|
3548
|
+
type DynamicEdgeCollection<E extends AnyEdgeType = AnyEdgeType> = Omit<EdgeCollection<E, NodeType, NodeType, {
|
|
3549
|
+
from: NodeType;
|
|
3550
|
+
to: NodeType;
|
|
3551
|
+
}, string>, "create"> & Readonly<{
|
|
3552
|
+
/** Create with runtime-validated endpoints and schema-typed properties. */
|
|
3553
|
+
create: (from: NodeRef, to: NodeRef, ...args: EdgeCreateArguments<E>) => Promise<Edge<E>>;
|
|
3554
|
+
}>;
|
|
3555
|
+
/** Runtime endpoint reads at a view's pinned coordinate; no writes or temporal overrides. */
|
|
3556
|
+
type DynamicStoreViewEdgeCollection<E extends AnyEdgeType = AnyEdgeType> = Omit<StoreViewEdgeCollection<E>, "getById" | "getByIds"> & Readonly<{
|
|
3557
|
+
getById: (id: string) => Promise<Edge<E> | undefined>;
|
|
3558
|
+
getByIds: (ids: readonly string[]) => Promise<readonly (Edge<E> | undefined)[]>;
|
|
3559
|
+
}>;
|
|
3536
3560
|
/** A node collection narrowed by Store-issued runtime-kind evidence. */
|
|
3537
3561
|
type RuntimeNodeCollection<T extends RuntimeNodeKind> = WidenBrandedIds<NodeCollection<RuntimeNodeTypeFor<T>, string>>;
|
|
3538
3562
|
/** An edge collection narrowed by Store-issued runtime-kind evidence. */
|
|
3539
|
-
type RuntimeEdgeCollection<T extends RuntimeEdgeKind> =
|
|
3563
|
+
type RuntimeEdgeCollection<T extends RuntimeEdgeKind> = DynamicEdgeCollection<RuntimeEdgeTypeFor<T>>;
|
|
3540
3564
|
/** One kind-grouped source input for a token-validated heterogeneous read. */
|
|
3541
3565
|
type RuntimeBulkEdgeSourceGroup<T extends RuntimeNodeKind> = T extends RuntimeNodeKind ? Readonly<{
|
|
3542
3566
|
kind: T;
|
|
@@ -5688,6 +5712,9 @@ declare abstract class CoordinatePinnedView<G extends GraphDef> {
|
|
|
5688
5712
|
declare class StoreViewImplementation<G extends GraphDef> extends CoordinatePinnedView<G> {
|
|
5689
5713
|
#private;
|
|
5690
5714
|
constructor(store: Store<G>, coordinate: StoreViewCoordinate | ReadCoordinate);
|
|
5715
|
+
/** Dynamic endpoint reads remain bound to this view's coordinate. */
|
|
5716
|
+
getEdgeCollection<K extends EdgeKinds<G>>(kind: K): DynamicStoreViewEdgeCollection<G["edges"][K]["type"]> | undefined;
|
|
5717
|
+
getEdgeCollection(kind: string): DynamicStoreViewEdgeCollection | undefined;
|
|
5691
5718
|
/** Adds a recorded-time pin, returning the narrow reconstructing view. */
|
|
5692
5719
|
asOfRecorded(recordedAsOf: RecordedInstant): RecordedStoreView<G>;
|
|
5693
5720
|
/** Read-only node collections pinned to this view's coordinate. */
|
|
@@ -5854,9 +5881,13 @@ interface RequiredNodeCollectionLookup {
|
|
|
5854
5881
|
<T extends RuntimeNodeKind>(token: T): RuntimeNodeCollection<T>;
|
|
5855
5882
|
<const K extends string>(kind: K): DynamicNodeCollection<K>;
|
|
5856
5883
|
}
|
|
5857
|
-
|
|
5858
|
-
|
|
5884
|
+
interface EdgeCollectionLookup<G extends GraphDef = GraphDef> {
|
|
5885
|
+
<K extends EdgeKinds<G>>(kind: K): DynamicEdgeCollection<G["edges"][K]["type"]> | undefined;
|
|
5886
|
+
(kind: string): DynamicEdgeCollection | undefined;
|
|
5887
|
+
}
|
|
5888
|
+
interface RequiredEdgeCollectionLookup<G extends GraphDef = GraphDef> {
|
|
5859
5889
|
<T extends RuntimeEdgeKind>(token: T): RuntimeEdgeCollection<T>;
|
|
5890
|
+
<K extends EdgeKinds<G>>(kind: K): DynamicEdgeCollection<G["edges"][K]["type"]>;
|
|
5860
5891
|
(kind: string): DynamicEdgeCollection;
|
|
5861
5892
|
}
|
|
5862
5893
|
type StoreCore<G extends GraphDef> = Readonly<{
|
|
@@ -5877,8 +5908,8 @@ type StoreCore<G extends GraphDef> = Readonly<{
|
|
|
5877
5908
|
runtimeEdgeKind: <const K extends string, const D extends ExtensionEdgeDef>(kind: K, definition: D) => RuntimeEdgeKind<K, ExtensionObjectSchema<ExtensionEdgeProperties<D>>>;
|
|
5878
5909
|
getNodeCollection: NodeCollectionLookup;
|
|
5879
5910
|
getNodeCollectionOrThrow: RequiredNodeCollectionLookup;
|
|
5880
|
-
getEdgeCollection: EdgeCollectionLookup
|
|
5881
|
-
getEdgeCollectionOrThrow: RequiredEdgeCollectionLookup
|
|
5911
|
+
getEdgeCollection: EdgeCollectionLookup<G>;
|
|
5912
|
+
getEdgeCollectionOrThrow: RequiredEdgeCollectionLookup<G>;
|
|
5882
5913
|
getNodePropsSchema: (kind: string) => z.ZodObject<z.ZodRawShape> | undefined;
|
|
5883
5914
|
getNodePropsSchemaOrThrow: (kind: string) => z.ZodObject<z.ZodRawShape>;
|
|
5884
5915
|
getEdgePropsSchema: (kind: string) => z.ZodObject<z.ZodRawShape> | undefined;
|
|
@@ -6214,4 +6245,4 @@ declare function createVerifiedAdapterStore<G extends GraphDef, TNativeTransacti
|
|
|
6214
6245
|
SchemaValidationResult
|
|
6215
6246
|
]>;
|
|
6216
6247
|
|
|
6217
|
-
export { type AnyNode as $, migrateSchema as A, parseSerializedSchema as B, requiresMigration as C, rollbackSchema as D, type AliasMap as E, type EdgeAliasMap as F, type RecursiveAliasMap as G, type HistoryStoreOptions as H, type IdentityAssertion as I, QueryBuilder as J, KindRegistry as K, type LiveStoreOptions as L, type MigrateSchemaOptions as M, type EmptyRecursiveAliasMap as N, type AdapterHistoryStore as O, type AdapterHistoryTransactionContext as P, type QueryCoordinateState as Q, type RecordedReadStoreOptions as R, type StoreOptions as S, TraversalBuilder as T, type UnboundLiveStoreOptions as U, type AdapterRecordedReadStore as V, type AdapterStore as W, type AdapterTransactionContext as X, type AggregateResult as Y, type AlgorithmCyclePolicy as Z, type AnyEdge as _, type SchemaManagerOptions as a, type
|
|
6248
|
+
export { type AnyNode as $, migrateSchema as A, parseSerializedSchema as B, requiresMigration as C, rollbackSchema as D, type AliasMap as E, type EdgeAliasMap as F, type RecursiveAliasMap as G, type HistoryStoreOptions as H, type IdentityAssertion as I, QueryBuilder as J, KindRegistry as K, type LiveStoreOptions as L, type MigrateSchemaOptions as M, type EmptyRecursiveAliasMap as N, type AdapterHistoryStore as O, type AdapterHistoryTransactionContext as P, type QueryCoordinateState as Q, type RecordedReadStoreOptions as R, type StoreOptions as S, TraversalBuilder as T, type UnboundLiveStoreOptions as U, type AdapterRecordedReadStore as V, type AdapterStore as W, type AdapterTransactionContext as X, type AggregateResult as Y, type AlgorithmCyclePolicy as Z, type AnyEdge as _, type SchemaManagerOptions as a, type HybridVectorOptions as a$, type BaseStoreOptions as a0, type BaseTraversalOptions as a1, type BatchResults as a2, type BatchableQuery as a3, type BulkEdgeSourceGroup as a4, type BulkFindEdgesFromParams as a5, type BulkFindEdgesFromResult as a6, type BulkFindRuntimeEdgesFromParams as a7, type BulkFindRuntimeEdgesFromResult as a8, type BulkOperationHookContext as a9, type EdgeBulkFindOptions as aA, type EdgeCollection as aB, type EdgeCollectionLookup as aC, type EdgeFindByEndpointsOptions as aD, type EdgeGetOrCreateByEndpointsOptions as aE, type EdgeGetOrCreateByEndpointsResult as aF, type EdgeIntrospection as aG, type EdgeTemporalReads as aH, type EdgeWrites as aI, type EmptyAliasMap as aJ, type EmptyEdgeAliasMap as aK, ExecutableAggregateQuery as aL, ExecutableQuery as aM, type FieldAccessor as aN, type FulltextSearchHit as aO, type FulltextSearchOptions as aP, type GetOrCreateAction as aQ, type GraphAlgorithms as aR, type GraphEdgeCollections as aS, type GraphEdgeForKinds as aT, type GraphNodeCollections as aU, type GraphNodeReference as aV, type HistoryStoreBackend as aW, type HookContext as aX, type HybridFulltextOptions as aY, type HybridSearchHit as aZ, type HybridSearchOptions as a_, type ClaimOwner as aa, type ClaimTarget as ab, type CompareAndSetAbsent as ac, type CompareAndSetExpected as ad, type ConstraintFenceViolation as ae, type ConstraintNames as af, type CreateEdgeInput as ag, type CreateNodeInput as ah, type DegreeOptions as ai, type DynamicEdgeAccessor as aj, type DynamicEdgeCollection as ak, type DynamicEdgeType as al, type DynamicFieldBuilder as am, type DynamicNode as an, type DynamicNodeAccessor as ao, type DynamicNodeCollection as ap, type DynamicNodeKind as aq, type DynamicNodeReference as ar, type DynamicNodeType as as, type DynamicSelectableEdge as at, type DynamicSelectableNode as au, type DynamicStoreViewEdgeCollection as av, type Edge as aw, type EdgeAccessor as ax, type EdgeBatchReads as ay, type EdgeBulkFindEndpointOptions as az, type Store as b, type RequiredEdgeCollectionLookup as b$, type IdentityAssertionWriteFacade as b0, type IdentityNodeReference as b1, type IdentityTraversalOption as b2, type IdentityValidityWindow as b3, type IfExistsMode as b4, type InitialQueryBuilder as b5, type KindIntrospection as b6, type KindPopulationStatistics as b7, type LabelPropagationMembership as b8, type LabelPropagationOptions as b9, type PaginatedResult as bA, type PathNode as bB, type PersonalizedPageRankOptions as bC, type PersonalizedPageRankSeed as bD, type Predicate as bE, PreparedQuery as bF, type PropertyPopulationStatistics as bG, type PropsAccessor as bH, type QueryHookContext as bI, type QueryOptions as bJ, type ReachableNode as bK, type ReachableOptions as bL, type RebuildContributionOptions as bM, type RebuildFulltextOptions as bN, type RebuildFulltextResult as bO, type ReclaimedVectorFieldEntry as bP, type RecordedScanOptions as bQ, type RecordedScanPage as bR, RecordedStoreView as bS, type RecordedStoreViewEdgeCollection as bT, type RecordedStoreViewEdgeCollections as bU, type RecordedStoreViewNodeCollection as bV, type RecordedStoreViewNodeCollections as bW, type RecursiveTraversalOptions as bX, type ReembedFunction as bY, type ReembedVectorFieldOptions as bZ, type ReembedVectorFieldResult as b_, type MaterializeRemovalsEntry as ba, type MaterializeRemovalsOptions as bb, type MaterializeRemovalsResult as bc, type MeasurableAdapterHistoryTransactionContext as bd, type MeasurableAdapterTransactionContext as be, type MeasurableTransactionContext as bf, type NeighborsOptions as bg, type NoRecordedCoordinate as bh, type Node as bi, type NodeAccessor as bj, type NodeAlias as bk, type NodeBulkFindByIndexOptions as bl, type NodeCollection as bm, type NodeCollectionLookup as bn, type NodeCurrentReads as bo, type NodeGetOrCreateByConstraintOptions as bp, type NodeGetOrCreateByConstraintResult as bq, type NodeIdentifier as br, type NodeRef as bs, type NodeTemporalReads as bt, type NodeWrites as bu, type OntologyIntrospection as bv, type OperationHookContext as bw, type PageRankOptions as bx, type PageRankScore as by, type PaginateOptions as bz, type HistoryStore as c, UnionableQuery as c$, type RequiredNodeCollectionLookup as c0, type RuntimeBulkEdgeSourceGroup as c1, type RuntimeEdgeCollection as c2, type RuntimeEdgeFor as c3, type RuntimeEdgeKind as c4, type RuntimeEdgeTypeFor as c5, type RuntimeNodeCollection as c6, type RuntimeNodeKind as c7, type RuntimeNodeReferenceFor as c8, type RuntimeNodeTypeFor as c9, type StoreViewGraphAlgorithms as cA, type StoreViewLabelPropagationOptions as cB, type StoreViewNeighborsOptions as cC, type StoreViewNodeCollection as cD, type StoreViewNodeCollections as cE, type StoreViewPageRankOptions as cF, type StoreViewPersonalizedPageRankOptions as cG, type StoreViewReachableOptions as cH, type StoreViewShortestPathOptions as cI, type StoreViewSubgraphOptions as cJ, type StoreViewWeaklyConnectedComponentsOptions as cK, type StoreViewWeightedShortestPathOptions as cL, type StreamOptions as cM, type SubgraphEdgeResult as cN, type SubgraphNodeResult as cO, type SubgraphOptions as cP, type SubgraphResult as cQ, type SubsetEdge as cR, type SubsetNode as cS, type TemporalAlgorithmOptions as cT, type TransactionContext as cU, type TransactionOutcome as cV, type TransactionReceipt as cW, type TraversalDirection as cX, type TypedEdgeCollection as cY, type TypedRecordedStoreViewEdgeCollection as cZ, type TypedStoreViewEdgeCollection as c_, type SchemaIntrospection as ca, type ScopedMeasure as cb, type SearchScopeOptions as cc, type SelectContext as cd, type SelectableEdge as ce, type SelectableNode as cf, type ShortestPathOptions as cg, type ShortestPathResult as ch, type SqlAvailability as ci, StoreAnalysisCursorStaleError as cj, type StoreAnalysisCursorStaleErrorDetails as ck, type StoreAnalysisSchemaCoordinate as cl, type StoreDescription as cm, type StoreHooks as cn, type StorePopulationStatistics as co, type StoreProjection as cp, type StoreRef as cq, StoreSearch as cr, type StoreValidationFailure as cs, type StoreValidationPage as ct, StoreView as cu, type StoreViewCanReachOptions as cv, type StoreViewCoordinate as cw, type StoreViewDegreeOptions as cx, type StoreViewEdgeCollection as cy, type StoreViewEdgeCollections as cz, type RecordedReadStore as d, type UniqueIntrospection as d0, type UpdateEdgeInput as d1, type UpdateNodeInput as d2, type ValidateStoreOptions as d3, type ValidityEndMutation as d4, type VectorSearchHit as d5, type VectorSearchOptions as d6, type WeaklyConnectedComponentMembership as d7, type WeaklyConnectedComponentsOptions as d8, type WeightedShortestPathOptions as d9, type WeightedShortestPathResult as da, asIdentityAssertionId as db, compareAndSetAbsent as dc, createAdapterStore as dd, createAdapterStoreWithSchema as de, createQueryBuilder as df, createStore as dg, createStoreWithSchema as dh, createVerifiedAdapterStore as di, createVerifiedStore as dj, defineSubgraphProject as dk, exists as dl, fieldRef as dm, inSubquery as dn, isParameterRef as dp, notExists as dq, notInSubquery as dr, param as ds, EDGE_TEMPORAL_READ_NAMES as dt, IDENTITY_READ_NAMES as du, type IdentityAssertionId as e, type IdentityAssertionResult as f, type IdentityFacade as g, type IdentityNode as h, type IdentityNodeRefInput as i, type IdentityPair as j, type IdentityReadFacade as k, type IdentityRelation as l, type IdentityWriteSummary as m, type ReconciledSchema as n, type MigrationHookContext as o, type SchemaValidationResult as p, applyDeprecatedKinds as q, assertSchemaCurrent as r, ensureSchema as s, getActiveSchema as t, getCommittedSchemaVersion as u, getSchemaChanges as v, initializeSchema as w, isSchemaInitialized as x, loadActiveSchemaWithBootstrap as y, loadAndMergeGraphExtensionDocument as z };
|