@cohesivesystems/relations 0.1.0-alpha.12 → 0.1.0-alpha.129

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.
@@ -1,9 +1,386 @@
1
1
  /* <auto-generated/> */
2
2
 
3
+ export type GraphDeltaKind = 'Unspecified' | 'Overlay' | 'Version';
4
+
5
+ export const graphDeltaKinds = {
6
+ unspecified: 'Unspecified',
7
+ overlay: 'Overlay',
8
+ version: 'Version',
9
+ } as const satisfies Record<string, GraphDeltaKind>;
10
+
11
+ export const graphDeltaKindLabels: Record<GraphDeltaKind, string> = {
12
+ Unspecified: 'Unspecified',
13
+ Overlay: 'Overlay',
14
+ Version: 'Version',
15
+ };
16
+
3
17
  export type GraphId = string;
4
18
 
19
+ export type GraphDeltaOperation = {
20
+ readonly $operation: 'addShape';
21
+ } & AddShapeOperation | {
22
+ readonly $operation: 'removeShape';
23
+ } & RemoveShapeOperation | {
24
+ readonly $operation: 'replaceShape';
25
+ } & ReplaceShapeOperation | {
26
+ readonly $operation: 'setGraphAnnotation';
27
+ } & SetGraphAnnotationOperation | {
28
+ readonly $operation: 'removeGraphAnnotation';
29
+ } & RemoveGraphAnnotationOperation | {
30
+ readonly $operation: 'addNamedType';
31
+ } & AddNamedTypeOperation | {
32
+ readonly $operation: 'removeNamedType';
33
+ } & RemoveNamedTypeOperation | {
34
+ readonly $operation: 'replaceNamedType';
35
+ } & ReplaceNamedTypeOperation | {
36
+ readonly $operation: 'addShapeField';
37
+ } & AddShapeFieldOperation | {
38
+ readonly $operation: 'removeShapeField';
39
+ } & RemoveShapeFieldOperation | {
40
+ readonly $operation: 'replaceShapeField';
41
+ } & ReplaceShapeFieldOperation | {
42
+ readonly $operation: 'addTypeField';
43
+ } & AddTypeFieldOperation | {
44
+ readonly $operation: 'removeTypeField';
45
+ } & RemoveTypeFieldOperation | {
46
+ readonly $operation: 'replaceTypeField';
47
+ } & ReplaceTypeFieldOperation | {
48
+ readonly $operation: 'setFieldType';
49
+ } & SetFieldTypeOperation | {
50
+ readonly $operation: 'setFieldPresence';
51
+ } & SetFieldPresenceOperation | {
52
+ readonly $operation: 'setFieldCardinality';
53
+ } & SetFieldCardinalityOperation | {
54
+ readonly $operation: 'setFieldNullability';
55
+ } & SetFieldNullabilityOperation | {
56
+ readonly $operation: 'addFieldConstraint';
57
+ } & AddFieldConstraintOperation | {
58
+ readonly $operation: 'removeFieldConstraint';
59
+ } & RemoveFieldConstraintOperation | {
60
+ readonly $operation: 'setShapeAnnotation';
61
+ } & SetShapeAnnotationOperation | {
62
+ readonly $operation: 'removeShapeAnnotation';
63
+ } & RemoveShapeAnnotationOperation | {
64
+ readonly $operation: 'setTypeAnnotation';
65
+ } & SetTypeAnnotationOperation | {
66
+ readonly $operation: 'removeTypeAnnotation';
67
+ } & RemoveTypeAnnotationOperation | {
68
+ readonly $operation: 'setFieldAnnotation';
69
+ } & SetFieldAnnotationOperation | {
70
+ readonly $operation: 'removeFieldAnnotation';
71
+ } & RemoveFieldAnnotationOperation | {
72
+ readonly $operation: 'restrictAllowedValues';
73
+ } & RestrictAllowedValuesOperation | {
74
+ readonly $operation: 'extendAllowedValues';
75
+ } & ExtendAllowedValuesOperation | {
76
+ readonly $operation: 'addEnumValue';
77
+ } & AddEnumValueOperation | {
78
+ readonly $operation: 'removeEnumValue';
79
+ } & RemoveEnumValueOperation;
80
+
81
+ export interface AddShapeOperation {
82
+ shape: Shape;
83
+ ordinal?: number | null;
84
+ note?: string | null;
85
+ }
86
+
87
+ export interface RemoveShapeOperation {
88
+ note?: string | null;
89
+ shapeId: ShapeId;
90
+ }
91
+
92
+ export interface ReplaceShapeOperation {
93
+ note?: string | null;
94
+ shape: Shape;
95
+ }
96
+
97
+ export interface SetGraphAnnotationOperation {
98
+ note?: string | null;
99
+ key: AnnotationKey;
100
+ value: AnnotationValue;
101
+ }
102
+
103
+ export interface RemoveGraphAnnotationOperation {
104
+ note?: string | null;
105
+ key: AnnotationKey;
106
+ }
107
+
108
+ export interface AddNamedTypeOperation {
109
+ type: TypeDefinition;
110
+ ordinal?: number | null;
111
+ note?: string | null;
112
+ }
113
+
114
+ export interface RemoveNamedTypeOperation {
115
+ note?: string | null;
116
+ typeId: TypeId;
117
+ }
118
+
119
+ export interface ReplaceNamedTypeOperation {
120
+ note?: string | null;
121
+ type: TypeDefinition;
122
+ }
123
+
124
+ export interface AddShapeFieldOperation {
125
+ shapeId: ShapeId;
126
+ field: FieldDefinition;
127
+ ordinal?: number | null;
128
+ note?: string | null;
129
+ }
130
+
131
+ export interface RemoveShapeFieldOperation {
132
+ note?: string | null;
133
+ shapeId: ShapeId;
134
+ fieldName: FieldName;
135
+ replacementPath?: string | null;
136
+ }
137
+
138
+ export interface ReplaceShapeFieldOperation {
139
+ note?: string | null;
140
+ shapeId: ShapeId;
141
+ field: FieldDefinition;
142
+ }
143
+
144
+ export interface AddTypeFieldOperation {
145
+ typeId: TypeId;
146
+ field: StructuralField;
147
+ ordinal?: number | null;
148
+ note?: string | null;
149
+ }
150
+
151
+ export interface RemoveTypeFieldOperation {
152
+ note?: string | null;
153
+ typeId: TypeId;
154
+ fieldName: FieldName;
155
+ replacementPath?: string | null;
156
+ }
157
+
158
+ export interface ReplaceTypeFieldOperation {
159
+ note?: string | null;
160
+ typeId: TypeId;
161
+ field: StructuralField;
162
+ }
163
+
164
+ export interface SetFieldTypeOperation {
165
+ note?: string | null;
166
+ target: GraphFieldPath;
167
+ type: TypeRef;
168
+ }
169
+
170
+ export interface SetFieldPresenceOperation {
171
+ note?: string | null;
172
+ target: GraphFieldPath;
173
+ presence: FieldPresence;
174
+ }
175
+
176
+ export interface SetFieldCardinalityOperation {
177
+ note?: string | null;
178
+ target: GraphFieldPath;
179
+ cardinality: FieldCardinality;
180
+ }
181
+
182
+ export interface SetFieldNullabilityOperation {
183
+ note?: string | null;
184
+ target: GraphFieldPath;
185
+ nullability: FieldNullability;
186
+ }
187
+
188
+ export interface AddFieldConstraintOperation {
189
+ target: GraphFieldPath;
190
+ constraint: ShapeConstraint;
191
+ note?: string | null;
192
+ }
193
+
194
+ export interface RemoveFieldConstraintOperation {
195
+ note?: string | null;
196
+ target: GraphFieldPath;
197
+ constraint: ShapeConstraint;
198
+ }
199
+
200
+ export interface SetShapeAnnotationOperation {
201
+ note?: string | null;
202
+ shapeId: ShapeId;
203
+ key: AnnotationKey;
204
+ value: AnnotationValue;
205
+ }
206
+
207
+ export interface RemoveShapeAnnotationOperation {
208
+ note?: string | null;
209
+ shapeId: ShapeId;
210
+ key: AnnotationKey;
211
+ }
212
+
213
+ export interface SetTypeAnnotationOperation {
214
+ note?: string | null;
215
+ typeId: TypeId;
216
+ key: AnnotationKey;
217
+ value: AnnotationValue;
218
+ }
219
+
220
+ export interface RemoveTypeAnnotationOperation {
221
+ note?: string | null;
222
+ typeId: TypeId;
223
+ key: AnnotationKey;
224
+ }
225
+
226
+ export interface SetFieldAnnotationOperation {
227
+ note?: string | null;
228
+ target: GraphFieldPath;
229
+ key: AnnotationKey;
230
+ value: AnnotationValue;
231
+ }
232
+
233
+ export interface RemoveFieldAnnotationOperation {
234
+ note?: string | null;
235
+ target: GraphFieldPath;
236
+ key: AnnotationKey;
237
+ }
238
+
239
+ export interface RestrictAllowedValuesOperation {
240
+ note?: string | null;
241
+ target: GraphFieldPath;
242
+ values: string[];
243
+ }
244
+
245
+ export interface ExtendAllowedValuesOperation {
246
+ target: GraphFieldPath;
247
+ values: string[];
248
+ note?: string | null;
249
+ }
250
+
251
+ export interface AddEnumValueOperation {
252
+ typeId: TypeId;
253
+ value: EnumValue;
254
+ note?: string | null;
255
+ }
256
+
257
+ export interface RemoveEnumValueOperation {
258
+ note?: string | null;
259
+ typeId: TypeId;
260
+ valueName: string;
261
+ }
262
+
263
+ export type AnnotationKey = string;
264
+
265
+ export type AnnotationValue = unknown;
266
+
5
267
  export type ShapeId = string;
6
268
 
269
+ export interface ShapeGraphDocumentMetadata {
270
+ origin: DocumentOrigin;
271
+ name?: string | null;
272
+ description?: string | null;
273
+ sourceUri?: string | null;
274
+ createdAtUtc?: string | null;
275
+ updatedAtUtc?: string | null;
276
+ annotations: Record<string, AnnotationValue>;
277
+ }
278
+
279
+ export interface ShapeGraph {
280
+ id: GraphId;
281
+ shapes: Shape[];
282
+ namedTypes: TypeDefinition[];
283
+ annotations: Record<string, AnnotationValue>;
284
+ diagnostics: GraphDiagnostic[];
285
+ hasErrors: boolean;
286
+ }
287
+
288
+ export type TypeRef = {
289
+ readonly $type: 'named';
290
+ } & NamedTypeRef | {
291
+ readonly $type: 'opaque';
292
+ } & OpaqueRuntimeTypeRef | {
293
+ readonly $type: 'scalar';
294
+ } & ScalarTypeRef | {
295
+ readonly $type: 'enum';
296
+ } & EnumTypeRef | {
297
+ readonly $type: 'entityRef';
298
+ } & EntityReferenceTypeRef | {
299
+ readonly $type: 'array';
300
+ } & ArrayTypeRef | {
301
+ readonly $type: 'object';
302
+ } & ObjectTypeRef | {
303
+ readonly $type: 'quantity';
304
+ } & QuantityTypeRef | {
305
+ readonly $type: 'json';
306
+ } & JsonTypeRef;
307
+
308
+ export interface NamedTypeRef {
309
+ typeId: TypeId;
310
+ }
311
+
312
+ export interface OpaqueRuntimeTypeRef {
313
+ runtimeType: string;
314
+ inferenceDiagnostic?: TypeInferenceDiagnostic | null;
315
+ }
316
+
317
+ export interface ScalarTypeRef {
318
+ kind: ScalarTypeKind;
319
+ format: PrimitiveFormat;
320
+ }
321
+
322
+ export interface EnumTypeRef {
323
+ name: string;
324
+ members: string[];
325
+ }
326
+
327
+ export interface EntityReferenceTypeRef {
328
+ entity: EntityTypeName;
329
+ }
330
+
331
+ export interface ArrayTypeRef {
332
+ elementType: TypeRef;
333
+ }
334
+
335
+ export interface ObjectTypeRef {
336
+ fields: ObjectFieldTypeDef[];
337
+ }
338
+
339
+ export interface QuantityTypeRef {
340
+ quantity: string;
341
+ baseKind: ScalarTypeKind;
342
+ }
343
+
344
+ export interface JsonTypeRef {
345
+ kind: JsonTypeKind;
346
+ }
347
+
348
+ export type FieldCardinality = 'Single' | 'Many';
349
+
350
+ export const fieldCardinalities = {
351
+ single: 'Single',
352
+ many: 'Many',
353
+ } as const satisfies Record<string, FieldCardinality>;
354
+
355
+ export const fieldCardinalityLabels: Record<FieldCardinality, string> = {
356
+ Single: 'Single',
357
+ Many: 'Many',
358
+ };
359
+
360
+ export type FieldPresence = 'Required' | 'Optional';
361
+
362
+ export const fieldPresences = {
363
+ required: 'Required',
364
+ optional: 'Optional',
365
+ } as const satisfies Record<string, FieldPresence>;
366
+
367
+ export const fieldPresenceLabels: Record<FieldPresence, string> = {
368
+ Required: 'Required',
369
+ Optional: 'Optional',
370
+ };
371
+
372
+ export type FieldNullability = 'NonNullable' | 'Nullable';
373
+
374
+ export const fieldNullabilities = {
375
+ nonNullable: 'NonNullable',
376
+ nullable: 'Nullable',
377
+ } as const satisfies Record<string, FieldNullability>;
378
+
379
+ export const fieldNullabilityLabels: Record<FieldNullability, string> = {
380
+ NonNullable: 'NonNullable',
381
+ Nullable: 'Nullable',
382
+ };
383
+
7
384
  export type RelationQueryExplainStage = {
8
385
  readonly $stage: 'staticCompilation';
9
386
  } & RelationQueryStaticCompilationExplainStage | {
@@ -431,6 +808,270 @@ export interface RelationshipCatalogDocumentMetadata {
431
808
  annotations: Record<string, AnnotationValue>;
432
809
  }
433
810
 
811
+ export interface Shape {
812
+ id: ShapeId;
813
+ fields: FieldDefinition[];
814
+ constraints: ShapeConstraint[];
815
+ annotations: Record<string, AnnotationValue>;
816
+ role?: string | null;
817
+ entityType?: EntityTypeName | null;
818
+ }
819
+
820
+ export type TypeDefinition = {
821
+ readonly $typeDef: 'structural';
822
+ } & Structural | {
823
+ readonly $typeDef: 'enum';
824
+ } & Enum | {
825
+ readonly $typeDef: 'union';
826
+ } & Union;
827
+
828
+ export interface Structural {
829
+ id: TypeId;
830
+ name: string;
831
+ fields: StructuralField[];
832
+ constraints: ShapeConstraint[];
833
+ annotations: Record<string, AnnotationValue>;
834
+ }
835
+
836
+ export interface Enum {
837
+ id: TypeId;
838
+ name: string;
839
+ underlying: PrimitiveType;
840
+ values: EnumValue[];
841
+ annotations: Record<string, AnnotationValue>;
842
+ }
843
+
844
+ export interface Union {
845
+ id: TypeId;
846
+ name: string;
847
+ discriminator: UnionDiscriminator;
848
+ cases: UnionCase[];
849
+ annotations: Record<string, AnnotationValue>;
850
+ }
851
+
852
+ export type TypeId = string;
853
+
854
+ export interface FieldDefinition {
855
+ name: FieldName;
856
+ type: TypeRef;
857
+ cardinality: FieldCardinality;
858
+ presence: FieldPresence;
859
+ role: FieldRole;
860
+ nullability: FieldNullability;
861
+ mutability: FieldMutability;
862
+ compute?: ComputeDefinition | null;
863
+ constraints: ShapeConstraint[];
864
+ annotations: Record<string, AnnotationValue>;
865
+ }
866
+
867
+ export type FieldName = string;
868
+
869
+ export interface StructuralField {
870
+ name: FieldName;
871
+ type: TypeRef;
872
+ cardinality: FieldCardinality;
873
+ presence: FieldPresence;
874
+ nullability: FieldNullability;
875
+ role: FieldRole;
876
+ constraints: ShapeConstraint[];
877
+ annotations: Record<string, AnnotationValue>;
878
+ }
879
+
880
+ export interface GraphFieldPath {
881
+ shapeId?: ShapeId | null;
882
+ typeId?: TypeId | null;
883
+ path: FieldPath;
884
+ }
885
+
886
+ export type ShapeConstraint = {
887
+ readonly $constraint: 'required';
888
+ } & RequiredConstraint | {
889
+ readonly $constraint: 'minLength';
890
+ } & MinLengthConstraint | {
891
+ readonly $constraint: 'maxLength';
892
+ } & MaxLengthConstraint | {
893
+ readonly $constraint: 'range';
894
+ } & RangeConstraint | {
895
+ readonly $constraint: 'regex';
896
+ } & RegexConstraint | {
897
+ readonly $constraint: 'allowedValues';
898
+ } & AllowedValuesConstraint | {
899
+ readonly $constraint: 'occurrence';
900
+ } & OccurrenceConstraint;
901
+
902
+ export interface RequiredConstraint {
903
+ field?: FieldPath | null;
904
+ message?: string | null;
905
+ }
906
+
907
+ export interface MinLengthConstraint {
908
+ value: number;
909
+ field?: FieldPath | null;
910
+ message?: string | null;
911
+ }
912
+
913
+ export interface MaxLengthConstraint {
914
+ value: number;
915
+ field?: FieldPath | null;
916
+ message?: string | null;
917
+ }
918
+
919
+ export interface RangeConstraint {
920
+ minimum?: number | null;
921
+ maximum?: number | null;
922
+ field?: FieldPath | null;
923
+ message?: string | null;
924
+ }
925
+
926
+ export interface RegexConstraint {
927
+ pattern: string;
928
+ field?: FieldPath | null;
929
+ message?: string | null;
930
+ }
931
+
932
+ export interface AllowedValuesConstraint {
933
+ values: string[];
934
+ field?: FieldPath | null;
935
+ message?: string | null;
936
+ }
937
+
938
+ export interface OccurrenceConstraint {
939
+ minimum?: number | null;
940
+ maximum?: number | null;
941
+ field?: FieldPath | null;
942
+ message?: string | null;
943
+ }
944
+
945
+ export interface EnumValue {
946
+ name: string;
947
+ value?: string | null;
948
+ label?: string | null;
949
+ description?: string | null;
950
+ }
951
+
952
+ export type DocumentOrigin = 'Unknown' | 'User' | 'System' | 'Imported' | 'Generated' | 'Compiled' | 'Extracted';
953
+
954
+ export const documentOrigins = {
955
+ unknown: 'Unknown',
956
+ user: 'User',
957
+ system: 'System',
958
+ imported: 'Imported',
959
+ generated: 'Generated',
960
+ compiled: 'Compiled',
961
+ extracted: 'Extracted',
962
+ } as const satisfies Record<string, DocumentOrigin>;
963
+
964
+ export const documentOriginLabels: Record<DocumentOrigin, string> = {
965
+ Unknown: 'Unknown',
966
+ User: 'User',
967
+ System: 'System',
968
+ Imported: 'Imported',
969
+ Generated: 'Generated',
970
+ Compiled: 'Compiled',
971
+ Extracted: 'Extracted',
972
+ };
973
+
974
+ export interface GraphDiagnostic {
975
+ id: DiagnosticId;
976
+ severity: DiagnosticSeverity;
977
+ message: string;
978
+ shapeId?: ShapeId | null;
979
+ fieldIdentity?: string | null;
980
+ typeId?: TypeId | null;
981
+ }
982
+
983
+ export interface TypeInferenceDiagnostic {
984
+ reason: string;
985
+ message?: string | null;
986
+ }
987
+
988
+ export type ScalarTypeKind = 'Bool' | 'Int32' | 'Int64' | 'Decimal' | 'String' | 'Guid' | 'Date' | 'DateTime' | 'Instant' | 'Bytes';
989
+
990
+ export const scalarTypeKinds = {
991
+ bool: 'Bool',
992
+ int32: 'Int32',
993
+ int64: 'Int64',
994
+ decimal: 'Decimal',
995
+ string: 'String',
996
+ guid: 'Guid',
997
+ date: 'Date',
998
+ dateTime: 'DateTime',
999
+ instant: 'Instant',
1000
+ bytes: 'Bytes',
1001
+ } as const satisfies Record<string, ScalarTypeKind>;
1002
+
1003
+ export const scalarTypeKindLabels: Record<ScalarTypeKind, string> = {
1004
+ Bool: 'Bool',
1005
+ Int32: 'Int32',
1006
+ Int64: 'Int64',
1007
+ Decimal: 'Decimal',
1008
+ String: 'String',
1009
+ Guid: 'Guid',
1010
+ Date: 'Date',
1011
+ DateTime: 'DateTime',
1012
+ Instant: 'Instant',
1013
+ Bytes: 'Bytes',
1014
+ };
1015
+
1016
+ export type PrimitiveFormat = 'None' | 'Uuid' | 'IsoDate' | 'IsoDateTime' | 'IsoInstant' | 'CurrencyCode' | 'CountryCode' | 'Email' | 'Uri' | 'Base64';
1017
+
1018
+ export const primitiveFormats = {
1019
+ none: 'None',
1020
+ uuid: 'Uuid',
1021
+ isoDate: 'IsoDate',
1022
+ isoDateTime: 'IsoDateTime',
1023
+ isoInstant: 'IsoInstant',
1024
+ currencyCode: 'CurrencyCode',
1025
+ countryCode: 'CountryCode',
1026
+ email: 'Email',
1027
+ uri: 'Uri',
1028
+ base64: 'Base64',
1029
+ } as const satisfies Record<string, PrimitiveFormat>;
1030
+
1031
+ export const primitiveFormatLabels: Record<PrimitiveFormat, string> = {
1032
+ None: 'None',
1033
+ Uuid: 'Uuid',
1034
+ IsoDate: 'IsoDate',
1035
+ IsoDateTime: 'IsoDateTime',
1036
+ IsoInstant: 'IsoInstant',
1037
+ CurrencyCode: 'CurrencyCode',
1038
+ CountryCode: 'CountryCode',
1039
+ Email: 'Email',
1040
+ Uri: 'Uri',
1041
+ Base64: 'Base64',
1042
+ };
1043
+
1044
+ export type EntityTypeName = string;
1045
+
1046
+ export interface ObjectFieldTypeDef {
1047
+ name: string;
1048
+ type: TypeRef;
1049
+ cardinality: FieldCardinality;
1050
+ presence: FieldPresence;
1051
+ nullability: FieldNullability;
1052
+ annotations: Record<string, AnnotationValue>;
1053
+ }
1054
+
1055
+ export type JsonTypeKind = 'Any' | 'Object' | 'Array' | 'String' | 'Number' | 'Boolean';
1056
+
1057
+ export const jsonTypeKinds = {
1058
+ any: 'Any',
1059
+ object: 'Object',
1060
+ array: 'Array',
1061
+ string: 'String',
1062
+ number: 'Number',
1063
+ boolean: 'Boolean',
1064
+ } as const satisfies Record<string, JsonTypeKind>;
1065
+
1066
+ export const jsonTypeKindLabels: Record<JsonTypeKind, string> = {
1067
+ Any: 'Any',
1068
+ Object: 'Object',
1069
+ Array: 'Array',
1070
+ String: 'String',
1071
+ Number: 'Number',
1072
+ Boolean: 'Boolean',
1073
+ };
1074
+
434
1075
  export type RelationQueryExplainStageStatus = 'Complete' | 'Unavailable' | 'Invalid' | 'Incomplete' | 'Failed';
435
1076
 
436
1077
  export const relationQueryExplainStageStatuses = {
@@ -1140,32 +1781,6 @@ export interface InvariantDefinition {
1140
1781
  message?: string | null;
1141
1782
  }
1142
1783
 
1143
- export type DocumentOrigin = 'Unknown' | 'User' | 'System' | 'Imported' | 'Generated' | 'Compiled' | 'Extracted';
1144
-
1145
- export const documentOrigins = {
1146
- unknown: 'Unknown',
1147
- user: 'User',
1148
- system: 'System',
1149
- imported: 'Imported',
1150
- generated: 'Generated',
1151
- compiled: 'Compiled',
1152
- extracted: 'Extracted',
1153
- } as const satisfies Record<string, DocumentOrigin>;
1154
-
1155
- export const documentOriginLabels: Record<DocumentOrigin, string> = {
1156
- Unknown: 'Unknown',
1157
- User: 'User',
1158
- System: 'System',
1159
- Imported: 'Imported',
1160
- Generated: 'Generated',
1161
- Compiled: 'Compiled',
1162
- Extracted: 'Extracted',
1163
- };
1164
-
1165
- export type AnnotationKey = string;
1166
-
1167
- export type AnnotationValue = unknown;
1168
-
1169
1784
  export interface RelationDraftProducerArtifactReference {
1170
1785
  kind: string;
1171
1786
  value: string;
@@ -1180,42 +1795,119 @@ export interface RelationDraftConventionDecision {
1180
1795
  target: FieldPath;
1181
1796
  }
1182
1797
 
1183
- export interface RelationOutputDefinition {
1184
- node: QueryNodeId;
1185
- shape: QualifiedShapeId;
1186
- mode: RelationOutputMode;
1187
- key?: Expr | null;
1798
+ export interface RelationOutputDefinition {
1799
+ node: QueryNodeId;
1800
+ shape: QualifiedShapeId;
1801
+ mode: RelationOutputMode;
1802
+ key?: Expr | null;
1803
+ }
1804
+
1805
+ export type QueryId = string;
1806
+
1807
+ export type QueryName = string;
1808
+
1809
+ export type QueryResultDefinition = {
1810
+ readonly $result: 'rows';
1811
+ } & RowsQueryResultDefinition | {
1812
+ readonly $result: 'aggregation';
1813
+ } & AggregationQueryResultDefinition;
1814
+
1815
+ export interface RowsQueryResultDefinition {
1816
+ id: QueryResultId;
1817
+ input: QueryNodeId;
1818
+ }
1819
+
1820
+ export interface AggregationQueryResultDefinition {
1821
+ id: QueryResultId;
1822
+ input: QueryNodeId;
1823
+ }
1824
+
1825
+ export interface RelationshipDefinition {
1826
+ id: RelationshipId;
1827
+ sourceShape: QualifiedShapeId;
1828
+ sourceReference: FieldPath;
1829
+ targetShape: QualifiedShapeId;
1830
+ targetKey: RelationshipTargetKey;
1831
+ sourceReferenceUniqueness: SourceReferenceUniqueness;
1832
+ }
1833
+
1834
+ export type PrimitiveType = 'Bool' | 'Int32' | 'Int64' | 'Decimal' | 'String' | 'Guid' | 'Date' | 'DateTime' | 'Instant' | 'Bytes';
1835
+
1836
+ export const primitiveTypes = {
1837
+ bool: 'Bool',
1838
+ int32: 'Int32',
1839
+ int64: 'Int64',
1840
+ decimal: 'Decimal',
1841
+ string: 'String',
1842
+ guid: 'Guid',
1843
+ date: 'Date',
1844
+ dateTime: 'DateTime',
1845
+ instant: 'Instant',
1846
+ bytes: 'Bytes',
1847
+ } as const satisfies Record<string, PrimitiveType>;
1848
+
1849
+ export const primitiveTypeLabels: Record<PrimitiveType, string> = {
1850
+ Bool: 'Bool',
1851
+ Int32: 'Int32',
1852
+ Int64: 'Int64',
1853
+ Decimal: 'Decimal',
1854
+ String: 'String',
1855
+ Guid: 'Guid',
1856
+ Date: 'Date',
1857
+ DateTime: 'DateTime',
1858
+ Instant: 'Instant',
1859
+ Bytes: 'Bytes',
1860
+ };
1861
+
1862
+ export interface UnionDiscriminator {
1863
+ fieldName: string;
1864
+ type: PrimitiveType;
1865
+ }
1866
+
1867
+ export interface UnionCase {
1868
+ name: string;
1869
+ type: TypeRef;
1870
+ discriminatorValue: string;
1188
1871
  }
1189
1872
 
1190
- export type QueryId = string;
1873
+ export type FieldRole = 'Data' | 'Identity' | 'Reference' | 'Computed' | 'Metadata';
1191
1874
 
1192
- export type QueryName = string;
1875
+ export const fieldRoles = {
1876
+ data: 'Data',
1877
+ identity: 'Identity',
1878
+ reference: 'Reference',
1879
+ computed: 'Computed',
1880
+ metadata: 'Metadata',
1881
+ } as const satisfies Record<string, FieldRole>;
1193
1882
 
1194
- export type QueryResultDefinition = {
1195
- readonly $result: 'rows';
1196
- } & RowsQueryResultDefinition | {
1197
- readonly $result: 'aggregation';
1198
- } & AggregationQueryResultDefinition;
1883
+ export const fieldRoleLabels: Record<FieldRole, string> = {
1884
+ Data: 'Data',
1885
+ Identity: 'Identity',
1886
+ Reference: 'Reference',
1887
+ Computed: 'Computed',
1888
+ Metadata: 'Metadata',
1889
+ };
1199
1890
 
1200
- export interface RowsQueryResultDefinition {
1201
- id: QueryResultId;
1202
- input: QueryNodeId;
1203
- }
1891
+ export type FieldMutability = 'Mutable' | 'WriteOnce' | 'Computed';
1204
1892
 
1205
- export interface AggregationQueryResultDefinition {
1206
- id: QueryResultId;
1207
- input: QueryNodeId;
1208
- }
1893
+ export const fieldMutabilities = {
1894
+ mutable: 'Mutable',
1895
+ writeOnce: 'WriteOnce',
1896
+ computed: 'Computed',
1897
+ } as const satisfies Record<string, FieldMutability>;
1209
1898
 
1210
- export interface RelationshipDefinition {
1211
- id: RelationshipId;
1212
- sourceShape: QualifiedShapeId;
1213
- sourceReference: FieldPath;
1214
- targetShape: QualifiedShapeId;
1215
- targetKey: RelationshipTargetKey;
1216
- sourceReferenceUniqueness: SourceReferenceUniqueness;
1899
+ export const fieldMutabilityLabels: Record<FieldMutability, string> = {
1900
+ Mutable: 'Mutable',
1901
+ WriteOnce: 'WriteOnce',
1902
+ Computed: 'Computed',
1903
+ };
1904
+
1905
+ export interface ComputeDefinition {
1906
+ expression: Expr;
1217
1907
  }
1218
1908
 
1909
+ export type DiagnosticId = string;
1910
+
1219
1911
  export interface RelationQueryLogicalPlan {
1220
1912
  nodes: RelationQueryLogicalPlanNode[];
1221
1913
  retainedNodes: QueryNodeId[];
@@ -1387,7 +2079,7 @@ export const relationQueryBoundAssessmentStatusLabels: Record<RelationQueryBound
1387
2079
  Blocked: 'Blocked',
1388
2080
  };
1389
2081
 
1390
- export type RelationQueryLogicalCapabilityKind = 'Source' | 'Filter' | 'RelationshipTraversal' | 'ForwardRelationshipTraversal' | 'InverseRelationshipTraversal' | 'AtMostOneRelationshipTraversal' | 'ManyRelationshipTraversal' | 'RequiredRelationshipTraversal' | 'OptionalRelationshipTraversal' | 'Join' | 'InnerJoin' | 'LeftOuterJoin' | 'RightOuterJoin' | 'FullOuterJoin' | 'TemporalJoin' | 'ExpandCollection' | 'Projection' | 'ProjectionAssignment' | 'DistinctRows' | 'DistinctKeys' | 'Aggregation' | 'AggregateGrouping' | 'AggregateFilter' | 'CountAggregate' | 'SumAggregate' | 'MinimumAggregate' | 'MaximumAggregate' | 'AnyAggregate' | 'AllAggregate' | 'Ordering' | 'AscendingOrdering' | 'DescendingOrdering' | 'NullsFirst' | 'NullsLast' | 'StableTieOrdering' | 'OffsetPaging' | 'KeysetPaging' | 'OnePerRootRelationOutput' | 'ZeroOrOnePerRootRelationOutput' | 'ManyPerRootRelationOutput' | 'SetRelationOutput' | 'RelationOutputIdentity' | 'RelationInvariant' | 'QueryRowsResult' | 'QueryAggregationResult' | 'AlwaysPresentBinding' | 'MayBeAbsentBinding' | 'AverageAggregate';
2082
+ export type RelationQueryLogicalCapabilityKind = 'Source' | 'Filter' | 'RelationshipTraversal' | 'ForwardRelationshipTraversal' | 'InverseRelationshipTraversal' | 'AtMostOneRelationshipTraversal' | 'ManyRelationshipTraversal' | 'RequiredRelationshipTraversal' | 'OptionalRelationshipTraversal' | 'Join' | 'InnerJoin' | 'LeftOuterJoin' | 'RightOuterJoin' | 'FullOuterJoin' | 'TemporalJoin' | 'ExpandCollection' | 'Projection' | 'ProjectionAssignment' | 'DistinctRows' | 'DistinctKeys' | 'Aggregation' | 'AggregateGrouping' | 'AggregateFilter' | 'CountAggregate' | 'SumAggregate' | 'MinimumAggregate' | 'MaximumAggregate' | 'AnyAggregate' | 'AllAggregate' | 'Ordering' | 'AscendingOrdering' | 'DescendingOrdering' | 'NullsFirst' | 'NullsLast' | 'StableTieOrdering' | 'OffsetPaging' | 'KeysetPaging' | 'OnePerRootRelationOutput' | 'ZeroOrOnePerRootRelationOutput' | 'ManyPerRootRelationOutput' | 'SetRelationOutput' | 'RelationOutputIdentity' | 'RelationInvariant' | 'QueryRowsResult' | 'QueryAggregationResult' | 'AlwaysPresentBinding' | 'MayBeAbsentBinding' | 'AverageAggregate' | 'SelectRepresentative';
1391
2083
 
1392
2084
  export const relationQueryLogicalCapabilityKinds = {
1393
2085
  source: 'Source',
@@ -1438,6 +2130,7 @@ export const relationQueryLogicalCapabilityKinds = {
1438
2130
  alwaysPresentBinding: 'AlwaysPresentBinding',
1439
2131
  mayBeAbsentBinding: 'MayBeAbsentBinding',
1440
2132
  averageAggregate: 'AverageAggregate',
2133
+ selectRepresentative: 'SelectRepresentative',
1441
2134
  } as const satisfies Record<string, RelationQueryLogicalCapabilityKind>;
1442
2135
 
1443
2136
  export const relationQueryLogicalCapabilityKindLabels: Record<RelationQueryLogicalCapabilityKind, string> = {
@@ -1489,6 +2182,7 @@ export const relationQueryLogicalCapabilityKindLabels: Record<RelationQueryLogic
1489
2182
  AlwaysPresentBinding: 'AlwaysPresentBinding',
1490
2183
  MayBeAbsentBinding: 'MayBeAbsentBinding',
1491
2184
  AverageAggregate: 'AverageAggregate',
2185
+ SelectRepresentative: 'SelectRepresentative',
1492
2186
  };
1493
2187
 
1494
2188
  export interface ExprCapabilityId {
@@ -1742,6 +2436,8 @@ export type LogicalQueryNode = {
1742
2436
  } & ProjectQueryNode | {
1743
2437
  readonly $node: 'distinct';
1744
2438
  } & DistinctQueryNode | {
2439
+ readonly $node: 'selectRepresentative';
2440
+ } & SelectRepresentativeQueryNode | {
1745
2441
  readonly $node: 'aggregate';
1746
2442
  } & AggregateQueryNode | {
1747
2443
  readonly $node: 'order';
@@ -1794,6 +2490,7 @@ export interface ExpandCollectionQueryNode {
1794
2490
  collection: Expr;
1795
2491
  itemBinding: ValueBindingId;
1796
2492
  itemType: TypeRef;
2493
+ itemShape?: QualifiedShapeId | null;
1797
2494
  id: QueryNodeId;
1798
2495
  }
1799
2496
 
@@ -1811,6 +2508,13 @@ export interface DistinctQueryNode {
1811
2508
  id: QueryNodeId;
1812
2509
  }
1813
2510
 
2511
+ export interface SelectRepresentativeQueryNode {
2512
+ id: QueryNodeId;
2513
+ input: QueryNodeId;
2514
+ keys: Expr[];
2515
+ orderings: QueryOrdering[];
2516
+ }
2517
+
1814
2518
  export interface AggregateQueryNode {
1815
2519
  input: QueryNodeId;
1816
2520
  resultBinding: ValueBindingId;
@@ -1889,66 +2593,6 @@ export const binaryOperatorLabels: Record<BinaryOperator, string> = {
1889
2593
  Div: 'Div',
1890
2594
  };
1891
2595
 
1892
- export type TypeRef = {
1893
- readonly $type: 'named';
1894
- } & NamedTypeRef | {
1895
- readonly $type: 'opaque';
1896
- } & OpaqueRuntimeTypeRef | {
1897
- readonly $type: 'scalar';
1898
- } & ScalarTypeRef | {
1899
- readonly $type: 'enum';
1900
- } & EnumTypeRef | {
1901
- readonly $type: 'entityRef';
1902
- } & EntityReferenceTypeRef | {
1903
- readonly $type: 'array';
1904
- } & ArrayTypeRef | {
1905
- readonly $type: 'object';
1906
- } & ObjectTypeRef | {
1907
- readonly $type: 'quantity';
1908
- } & QuantityTypeRef | {
1909
- readonly $type: 'json';
1910
- } & JsonTypeRef;
1911
-
1912
- export interface NamedTypeRef {
1913
- typeId: TypeId;
1914
- }
1915
-
1916
- export interface OpaqueRuntimeTypeRef {
1917
- runtimeType: string;
1918
- inferenceDiagnostic?: TypeInferenceDiagnostic | null;
1919
- }
1920
-
1921
- export interface ScalarTypeRef {
1922
- kind: ScalarTypeKind;
1923
- format: PrimitiveFormat;
1924
- }
1925
-
1926
- export interface EnumTypeRef {
1927
- name: string;
1928
- members: string[];
1929
- }
1930
-
1931
- export interface EntityReferenceTypeRef {
1932
- entity: EntityTypeName;
1933
- }
1934
-
1935
- export interface ArrayTypeRef {
1936
- elementType: TypeRef;
1937
- }
1938
-
1939
- export interface ObjectTypeRef {
1940
- fields: ObjectFieldTypeDef[];
1941
- }
1942
-
1943
- export interface QuantityTypeRef {
1944
- quantity: string;
1945
- baseKind: ScalarTypeKind;
1946
- }
1947
-
1948
- export interface JsonTypeRef {
1949
- kind: JsonTypeKind;
1950
- }
1951
-
1952
2596
  export type AggregateOperator = 'Count' | 'Sum' | 'Min' | 'Max' | 'Any' | 'All' | 'Average';
1953
2597
 
1954
2598
  export const aggregateOperators = {
@@ -2252,6 +2896,12 @@ export interface ProjectionAssignment {
2252
2896
  value: Expr;
2253
2897
  }
2254
2898
 
2899
+ export interface QueryOrdering {
2900
+ key: Expr;
2901
+ direction: QuerySortDirection;
2902
+ nullPlacement: QueryNullPlacement;
2903
+ }
2904
+
2255
2905
  export interface QueryGrouping {
2256
2906
  id: QueryAssignmentId;
2257
2907
  target: FieldPath;
@@ -2266,12 +2916,6 @@ export interface QueryAggregateAssignment {
2266
2916
  filter?: Expr | null;
2267
2917
  }
2268
2918
 
2269
- export interface QueryOrdering {
2270
- key: Expr;
2271
- direction: QuerySortDirection;
2272
- nullPlacement: QueryNullPlacement;
2273
- }
2274
-
2275
2919
  export type QueryPageDefinition = {
2276
2920
  readonly $page: 'offset';
2277
2921
  } & OffsetPageDefinition | {
@@ -2290,18 +2934,6 @@ export interface KeysetPageDefinition {
2290
2934
 
2291
2935
  export type QueryParameterId = string;
2292
2936
 
2293
- export type FieldPresence = 'Required' | 'Optional';
2294
-
2295
- export const fieldPresences = {
2296
- required: 'Required',
2297
- optional: 'Optional',
2298
- } as const satisfies Record<string, FieldPresence>;
2299
-
2300
- export const fieldPresenceLabels: Record<FieldPresence, string> = {
2301
- Required: 'Required',
2302
- Optional: 'Optional',
2303
- };
2304
-
2305
2937
  export type QueryParameterDefaultKind = 'None' | 'Value';
2306
2938
 
2307
2939
  export const queryParameterDefaultKinds = {
@@ -2343,100 +2975,6 @@ export interface AmbiguousRelationDraftAssignmentResolution {
2343
2975
  candidateIds: RelationDraftCandidateId[];
2344
2976
  }
2345
2977
 
2346
- export type TypeId = string;
2347
-
2348
- export interface TypeInferenceDiagnostic {
2349
- reason: string;
2350
- message?: string | null;
2351
- }
2352
-
2353
- export type ScalarTypeKind = 'Bool' | 'Int32' | 'Int64' | 'Decimal' | 'String' | 'Guid' | 'Date' | 'DateTime' | 'Instant' | 'Bytes';
2354
-
2355
- export const scalarTypeKinds = {
2356
- bool: 'Bool',
2357
- int32: 'Int32',
2358
- int64: 'Int64',
2359
- decimal: 'Decimal',
2360
- string: 'String',
2361
- guid: 'Guid',
2362
- date: 'Date',
2363
- dateTime: 'DateTime',
2364
- instant: 'Instant',
2365
- bytes: 'Bytes',
2366
- } as const satisfies Record<string, ScalarTypeKind>;
2367
-
2368
- export const scalarTypeKindLabels: Record<ScalarTypeKind, string> = {
2369
- Bool: 'Bool',
2370
- Int32: 'Int32',
2371
- Int64: 'Int64',
2372
- Decimal: 'Decimal',
2373
- String: 'String',
2374
- Guid: 'Guid',
2375
- Date: 'Date',
2376
- DateTime: 'DateTime',
2377
- Instant: 'Instant',
2378
- Bytes: 'Bytes',
2379
- };
2380
-
2381
- export type PrimitiveFormat = 'None' | 'Uuid' | 'IsoDate' | 'IsoDateTime' | 'IsoInstant' | 'CurrencyCode' | 'CountryCode' | 'Email' | 'Uri' | 'Base64';
2382
-
2383
- export const primitiveFormats = {
2384
- none: 'None',
2385
- uuid: 'Uuid',
2386
- isoDate: 'IsoDate',
2387
- isoDateTime: 'IsoDateTime',
2388
- isoInstant: 'IsoInstant',
2389
- currencyCode: 'CurrencyCode',
2390
- countryCode: 'CountryCode',
2391
- email: 'Email',
2392
- uri: 'Uri',
2393
- base64: 'Base64',
2394
- } as const satisfies Record<string, PrimitiveFormat>;
2395
-
2396
- export const primitiveFormatLabels: Record<PrimitiveFormat, string> = {
2397
- None: 'None',
2398
- Uuid: 'Uuid',
2399
- IsoDate: 'IsoDate',
2400
- IsoDateTime: 'IsoDateTime',
2401
- IsoInstant: 'IsoInstant',
2402
- CurrencyCode: 'CurrencyCode',
2403
- CountryCode: 'CountryCode',
2404
- Email: 'Email',
2405
- Uri: 'Uri',
2406
- Base64: 'Base64',
2407
- };
2408
-
2409
- export type EntityTypeName = string;
2410
-
2411
- export interface ObjectFieldTypeDef {
2412
- name: string;
2413
- type: TypeRef;
2414
- cardinality: FieldCardinality;
2415
- presence: FieldPresence;
2416
- nullability: FieldNullability;
2417
- annotations: Record<string, AnnotationValue>;
2418
- }
2419
-
2420
- export type JsonTypeKind = 'Any' | 'Object' | 'Array' | 'String' | 'Number' | 'Boolean';
2421
-
2422
- export const jsonTypeKinds = {
2423
- any: 'Any',
2424
- object: 'Object',
2425
- array: 'Array',
2426
- string: 'String',
2427
- number: 'Number',
2428
- boolean: 'Boolean',
2429
- } as const satisfies Record<string, JsonTypeKind>;
2430
-
2431
- export const jsonTypeKindLabels: Record<JsonTypeKind, string> = {
2432
- Any: 'Any',
2433
- Object: 'Object',
2434
- Array: 'Array',
2435
- String: 'String',
2436
- Number: 'Number',
2437
- Boolean: 'Boolean',
2438
- };
2439
-
2440
2978
  export interface RelationQueryLogicalPlanInput {
2441
2979
  canonicalInput: QueryNodeId;
2442
2980
  effectiveInput: QueryNodeId;
@@ -2489,7 +3027,7 @@ export const relationQueryRealizationTraceStepKindLabels: Record<RelationQueryRe
2489
3027
  Terminal: 'Terminal',
2490
3028
  };
2491
3029
 
2492
- export type RelationQueryExpressionSiteKind = 'FilterPredicate' | 'JoinPredicate' | 'ExpandCollection' | 'ProjectionAssignmentValue' | 'DistinctKey' | 'AggregateGroupingKey' | 'AggregateAssignmentValue' | 'AggregateAssignmentFilter' | 'OrderKey' | 'KeysetBoundary' | 'RelationOutputKey' | 'RelationInvariant' | 'TemporalJoinCorrelation' | 'TemporalJoinPoint' | 'TemporalJoinIntervalLowerBound' | 'TemporalJoinIntervalUpperBound';
3030
+ export type RelationQueryExpressionSiteKind = 'FilterPredicate' | 'JoinPredicate' | 'ExpandCollection' | 'ProjectionAssignmentValue' | 'DistinctKey' | 'AggregateGroupingKey' | 'AggregateAssignmentValue' | 'AggregateAssignmentFilter' | 'OrderKey' | 'KeysetBoundary' | 'RelationOutputKey' | 'RelationInvariant' | 'TemporalJoinCorrelation' | 'TemporalJoinPoint' | 'TemporalJoinIntervalLowerBound' | 'TemporalJoinIntervalUpperBound' | 'RepresentativeKey';
2493
3031
 
2494
3032
  export const relationQueryExpressionSiteKinds = {
2495
3033
  filterPredicate: 'FilterPredicate',
@@ -2508,6 +3046,7 @@ export const relationQueryExpressionSiteKinds = {
2508
3046
  temporalJoinPoint: 'TemporalJoinPoint',
2509
3047
  temporalJoinIntervalLowerBound: 'TemporalJoinIntervalLowerBound',
2510
3048
  temporalJoinIntervalUpperBound: 'TemporalJoinIntervalUpperBound',
3049
+ representativeKey: 'RepresentativeKey',
2511
3050
  } as const satisfies Record<string, RelationQueryExpressionSiteKind>;
2512
3051
 
2513
3052
  export const relationQueryExpressionSiteKindLabels: Record<RelationQueryExpressionSiteKind, string> = {
@@ -2527,6 +3066,7 @@ export const relationQueryExpressionSiteKindLabels: Record<RelationQueryExpressi
2527
3066
  TemporalJoinPoint: 'TemporalJoinPoint',
2528
3067
  TemporalJoinIntervalLowerBound: 'TemporalJoinIntervalLowerBound',
2529
3068
  TemporalJoinIntervalUpperBound: 'TemporalJoinIntervalUpperBound',
3069
+ RepresentativeKey: 'RepresentativeKey',
2530
3070
  };
2531
3071
 
2532
3072
  export type ExprSiteId = string;
@@ -2586,30 +3126,6 @@ export const relationDraftUnresolvedReasonLabels: Record<RelationDraftUnresolved
2586
3126
  MultipleCandidates: 'MultipleCandidates',
2587
3127
  };
2588
3128
 
2589
- export type FieldCardinality = 'Single' | 'Many';
2590
-
2591
- export const fieldCardinalities = {
2592
- single: 'Single',
2593
- many: 'Many',
2594
- } as const satisfies Record<string, FieldCardinality>;
2595
-
2596
- export const fieldCardinalityLabels: Record<FieldCardinality, string> = {
2597
- Single: 'Single',
2598
- Many: 'Many',
2599
- };
2600
-
2601
- export type FieldNullability = 'NonNullable' | 'Nullable';
2602
-
2603
- export const fieldNullabilities = {
2604
- nonNullable: 'NonNullable',
2605
- nullable: 'Nullable',
2606
- } as const satisfies Record<string, FieldNullability>;
2607
-
2608
- export const fieldNullabilityLabels: Record<FieldNullability, string> = {
2609
- NonNullable: 'NonNullable',
2610
- Nullable: 'Nullable',
2611
- };
2612
-
2613
3129
  export interface RelationQueryLogicalBypass {
2614
3130
  kind: RelationQueryLogicalBypassKind;
2615
3131
  node: QueryNodeId;
@@ -2700,11 +3216,36 @@ export const temporalNullBoundBehaviorLabels: Record<TemporalNullBoundBehavior,
2700
3216
  Unbounded: 'Unbounded',
2701
3217
  };
2702
3218
 
3219
+ export interface GraphDelta {
3220
+ id: string;
3221
+ kind: GraphDeltaKind;
3222
+ sourceGraphId?: GraphId | null;
3223
+ targetGraphId?: GraphId | null;
3224
+ sourceVersion?: string | null;
3225
+ targetVersion?: string | null;
3226
+ operations: GraphDeltaOperation[];
3227
+ annotations: Record<string, AnnotationValue>;
3228
+ }
3229
+
2703
3230
  export interface QualifiedShapeId {
2704
3231
  graphId: GraphId;
2705
3232
  shapeId: ShapeId;
2706
3233
  }
2707
3234
 
3235
+ export interface ShapeGraphDocument {
3236
+ schemaVersion: string;
3237
+ metadata: ShapeGraphDocumentMetadata;
3238
+ graph: ShapeGraph;
3239
+ }
3240
+
3241
+ export interface ValueContract {
3242
+ type?: TypeRef | null;
3243
+ shape?: QualifiedShapeId | null;
3244
+ cardinality: FieldCardinality;
3245
+ presence: FieldPresence;
3246
+ nullability: FieldNullability;
3247
+ }
3248
+
2708
3249
  export interface RelationQueryExplainArtifact {
2709
3250
  schemaVersion: string;
2710
3251
  stages: RelationQueryExplainStage[];