@cohesivesystems/relations 0.1.0-alpha.7 → 0.1.0-alpha.84

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.
@@ -4,6 +4,102 @@ export type GraphId = string;
4
4
 
5
5
  export type ShapeId = string;
6
6
 
7
+ export type TypeRef = {
8
+ readonly $type: 'named';
9
+ } & NamedTypeRef | {
10
+ readonly $type: 'opaque';
11
+ } & OpaqueRuntimeTypeRef | {
12
+ readonly $type: 'scalar';
13
+ } & ScalarTypeRef | {
14
+ readonly $type: 'enum';
15
+ } & EnumTypeRef | {
16
+ readonly $type: 'entityRef';
17
+ } & EntityReferenceTypeRef | {
18
+ readonly $type: 'array';
19
+ } & ArrayTypeRef | {
20
+ readonly $type: 'object';
21
+ } & ObjectTypeRef | {
22
+ readonly $type: 'quantity';
23
+ } & QuantityTypeRef | {
24
+ readonly $type: 'json';
25
+ } & JsonTypeRef;
26
+
27
+ export interface NamedTypeRef {
28
+ typeId: TypeId;
29
+ }
30
+
31
+ export interface OpaqueRuntimeTypeRef {
32
+ runtimeType: string;
33
+ inferenceDiagnostic?: TypeInferenceDiagnostic | null;
34
+ }
35
+
36
+ export interface ScalarTypeRef {
37
+ kind: ScalarTypeKind;
38
+ format: PrimitiveFormat;
39
+ }
40
+
41
+ export interface EnumTypeRef {
42
+ name: string;
43
+ members: string[];
44
+ }
45
+
46
+ export interface EntityReferenceTypeRef {
47
+ entity: EntityTypeName;
48
+ }
49
+
50
+ export interface ArrayTypeRef {
51
+ elementType: TypeRef;
52
+ }
53
+
54
+ export interface ObjectTypeRef {
55
+ fields: ObjectFieldTypeDef[];
56
+ }
57
+
58
+ export interface QuantityTypeRef {
59
+ quantity: string;
60
+ baseKind: ScalarTypeKind;
61
+ }
62
+
63
+ export interface JsonTypeRef {
64
+ kind: JsonTypeKind;
65
+ }
66
+
67
+ export type FieldCardinality = 'Single' | 'Many';
68
+
69
+ export const fieldCardinalities = {
70
+ single: 'Single',
71
+ many: 'Many',
72
+ } as const satisfies Record<string, FieldCardinality>;
73
+
74
+ export const fieldCardinalityLabels: Record<FieldCardinality, string> = {
75
+ Single: 'Single',
76
+ Many: 'Many',
77
+ };
78
+
79
+ export type FieldPresence = 'Required' | 'Optional';
80
+
81
+ export const fieldPresences = {
82
+ required: 'Required',
83
+ optional: 'Optional',
84
+ } as const satisfies Record<string, FieldPresence>;
85
+
86
+ export const fieldPresenceLabels: Record<FieldPresence, string> = {
87
+ Required: 'Required',
88
+ Optional: 'Optional',
89
+ };
90
+
91
+ export type FieldNullability = 'NonNullable' | 'Nullable';
92
+
93
+ export const fieldNullabilities = {
94
+ nonNullable: 'NonNullable',
95
+ nullable: 'Nullable',
96
+ } as const satisfies Record<string, FieldNullability>;
97
+
98
+ export const fieldNullabilityLabels: Record<FieldNullability, string> = {
99
+ NonNullable: 'NonNullable',
100
+ Nullable: 'Nullable',
101
+ };
102
+
7
103
  export type RelationQueryExplainStage = {
8
104
  readonly $stage: 'staticCompilation';
9
105
  } & RelationQueryStaticCompilationExplainStage | {
@@ -431,6 +527,100 @@ export interface RelationshipCatalogDocumentMetadata {
431
527
  annotations: Record<string, AnnotationValue>;
432
528
  }
433
529
 
530
+ export type TypeId = string;
531
+
532
+ export interface TypeInferenceDiagnostic {
533
+ reason: string;
534
+ message?: string | null;
535
+ }
536
+
537
+ export type ScalarTypeKind = 'Bool' | 'Int32' | 'Int64' | 'Decimal' | 'String' | 'Guid' | 'Date' | 'DateTime' | 'Instant' | 'Bytes';
538
+
539
+ export const scalarTypeKinds = {
540
+ bool: 'Bool',
541
+ int32: 'Int32',
542
+ int64: 'Int64',
543
+ decimal: 'Decimal',
544
+ string: 'String',
545
+ guid: 'Guid',
546
+ date: 'Date',
547
+ dateTime: 'DateTime',
548
+ instant: 'Instant',
549
+ bytes: 'Bytes',
550
+ } as const satisfies Record<string, ScalarTypeKind>;
551
+
552
+ export const scalarTypeKindLabels: Record<ScalarTypeKind, string> = {
553
+ Bool: 'Bool',
554
+ Int32: 'Int32',
555
+ Int64: 'Int64',
556
+ Decimal: 'Decimal',
557
+ String: 'String',
558
+ Guid: 'Guid',
559
+ Date: 'Date',
560
+ DateTime: 'DateTime',
561
+ Instant: 'Instant',
562
+ Bytes: 'Bytes',
563
+ };
564
+
565
+ export type PrimitiveFormat = 'None' | 'Uuid' | 'IsoDate' | 'IsoDateTime' | 'IsoInstant' | 'CurrencyCode' | 'CountryCode' | 'Email' | 'Uri' | 'Base64';
566
+
567
+ export const primitiveFormats = {
568
+ none: 'None',
569
+ uuid: 'Uuid',
570
+ isoDate: 'IsoDate',
571
+ isoDateTime: 'IsoDateTime',
572
+ isoInstant: 'IsoInstant',
573
+ currencyCode: 'CurrencyCode',
574
+ countryCode: 'CountryCode',
575
+ email: 'Email',
576
+ uri: 'Uri',
577
+ base64: 'Base64',
578
+ } as const satisfies Record<string, PrimitiveFormat>;
579
+
580
+ export const primitiveFormatLabels: Record<PrimitiveFormat, string> = {
581
+ None: 'None',
582
+ Uuid: 'Uuid',
583
+ IsoDate: 'IsoDate',
584
+ IsoDateTime: 'IsoDateTime',
585
+ IsoInstant: 'IsoInstant',
586
+ CurrencyCode: 'CurrencyCode',
587
+ CountryCode: 'CountryCode',
588
+ Email: 'Email',
589
+ Uri: 'Uri',
590
+ Base64: 'Base64',
591
+ };
592
+
593
+ export type EntityTypeName = string;
594
+
595
+ export interface ObjectFieldTypeDef {
596
+ name: string;
597
+ type: TypeRef;
598
+ cardinality: FieldCardinality;
599
+ presence: FieldPresence;
600
+ nullability: FieldNullability;
601
+ annotations: Record<string, AnnotationValue>;
602
+ }
603
+
604
+ export type JsonTypeKind = 'Any' | 'Object' | 'Array' | 'String' | 'Number' | 'Boolean';
605
+
606
+ export const jsonTypeKinds = {
607
+ any: 'Any',
608
+ object: 'Object',
609
+ array: 'Array',
610
+ string: 'String',
611
+ number: 'Number',
612
+ boolean: 'Boolean',
613
+ } as const satisfies Record<string, JsonTypeKind>;
614
+
615
+ export const jsonTypeKindLabels: Record<JsonTypeKind, string> = {
616
+ Any: 'Any',
617
+ Object: 'Object',
618
+ Array: 'Array',
619
+ String: 'String',
620
+ Number: 'Number',
621
+ Boolean: 'Boolean',
622
+ };
623
+
434
624
  export type RelationQueryExplainStageStatus = 'Complete' | 'Unavailable' | 'Invalid' | 'Incomplete' | 'Failed';
435
625
 
436
626
  export const relationQueryExplainStageStatuses = {
@@ -1387,7 +1577,7 @@ export const relationQueryBoundAssessmentStatusLabels: Record<RelationQueryBound
1387
1577
  Blocked: 'Blocked',
1388
1578
  };
1389
1579
 
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';
1580
+ 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
1581
 
1392
1582
  export const relationQueryLogicalCapabilityKinds = {
1393
1583
  source: 'Source',
@@ -1438,6 +1628,7 @@ export const relationQueryLogicalCapabilityKinds = {
1438
1628
  alwaysPresentBinding: 'AlwaysPresentBinding',
1439
1629
  mayBeAbsentBinding: 'MayBeAbsentBinding',
1440
1630
  averageAggregate: 'AverageAggregate',
1631
+ selectRepresentative: 'SelectRepresentative',
1441
1632
  } as const satisfies Record<string, RelationQueryLogicalCapabilityKind>;
1442
1633
 
1443
1634
  export const relationQueryLogicalCapabilityKindLabels: Record<RelationQueryLogicalCapabilityKind, string> = {
@@ -1489,6 +1680,7 @@ export const relationQueryLogicalCapabilityKindLabels: Record<RelationQueryLogic
1489
1680
  AlwaysPresentBinding: 'AlwaysPresentBinding',
1490
1681
  MayBeAbsentBinding: 'MayBeAbsentBinding',
1491
1682
  AverageAggregate: 'AverageAggregate',
1683
+ SelectRepresentative: 'SelectRepresentative',
1492
1684
  };
1493
1685
 
1494
1686
  export interface ExprCapabilityId {
@@ -1742,6 +1934,8 @@ export type LogicalQueryNode = {
1742
1934
  } & ProjectQueryNode | {
1743
1935
  readonly $node: 'distinct';
1744
1936
  } & DistinctQueryNode | {
1937
+ readonly $node: 'selectRepresentative';
1938
+ } & SelectRepresentativeQueryNode | {
1745
1939
  readonly $node: 'aggregate';
1746
1940
  } & AggregateQueryNode | {
1747
1941
  readonly $node: 'order';
@@ -1794,6 +1988,7 @@ export interface ExpandCollectionQueryNode {
1794
1988
  collection: Expr;
1795
1989
  itemBinding: ValueBindingId;
1796
1990
  itemType: TypeRef;
1991
+ itemShape?: QualifiedShapeId | null;
1797
1992
  id: QueryNodeId;
1798
1993
  }
1799
1994
 
@@ -1811,6 +2006,13 @@ export interface DistinctQueryNode {
1811
2006
  id: QueryNodeId;
1812
2007
  }
1813
2008
 
2009
+ export interface SelectRepresentativeQueryNode {
2010
+ id: QueryNodeId;
2011
+ input: QueryNodeId;
2012
+ keys: Expr[];
2013
+ orderings: QueryOrdering[];
2014
+ }
2015
+
1814
2016
  export interface AggregateQueryNode {
1815
2017
  input: QueryNodeId;
1816
2018
  resultBinding: ValueBindingId;
@@ -1889,66 +2091,6 @@ export const binaryOperatorLabels: Record<BinaryOperator, string> = {
1889
2091
  Div: 'Div',
1890
2092
  };
1891
2093
 
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
2094
  export type AggregateOperator = 'Count' | 'Sum' | 'Min' | 'Max' | 'Any' | 'All' | 'Average';
1953
2095
 
1954
2096
  export const aggregateOperators = {
@@ -2252,6 +2394,12 @@ export interface ProjectionAssignment {
2252
2394
  value: Expr;
2253
2395
  }
2254
2396
 
2397
+ export interface QueryOrdering {
2398
+ key: Expr;
2399
+ direction: QuerySortDirection;
2400
+ nullPlacement: QueryNullPlacement;
2401
+ }
2402
+
2255
2403
  export interface QueryGrouping {
2256
2404
  id: QueryAssignmentId;
2257
2405
  target: FieldPath;
@@ -2266,12 +2414,6 @@ export interface QueryAggregateAssignment {
2266
2414
  filter?: Expr | null;
2267
2415
  }
2268
2416
 
2269
- export interface QueryOrdering {
2270
- key: Expr;
2271
- direction: QuerySortDirection;
2272
- nullPlacement: QueryNullPlacement;
2273
- }
2274
-
2275
2417
  export type QueryPageDefinition = {
2276
2418
  readonly $page: 'offset';
2277
2419
  } & OffsetPageDefinition | {
@@ -2290,18 +2432,6 @@ export interface KeysetPageDefinition {
2290
2432
 
2291
2433
  export type QueryParameterId = string;
2292
2434
 
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
2435
  export type QueryParameterDefaultKind = 'None' | 'Value';
2306
2436
 
2307
2437
  export const queryParameterDefaultKinds = {
@@ -2343,100 +2473,6 @@ export interface AmbiguousRelationDraftAssignmentResolution {
2343
2473
  candidateIds: RelationDraftCandidateId[];
2344
2474
  }
2345
2475
 
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
2476
  export interface RelationQueryLogicalPlanInput {
2441
2477
  canonicalInput: QueryNodeId;
2442
2478
  effectiveInput: QueryNodeId;
@@ -2489,7 +2525,7 @@ export const relationQueryRealizationTraceStepKindLabels: Record<RelationQueryRe
2489
2525
  Terminal: 'Terminal',
2490
2526
  };
2491
2527
 
2492
- export type RelationQueryExpressionSiteKind = 'FilterPredicate' | 'JoinPredicate' | 'ExpandCollection' | 'ProjectionAssignmentValue' | 'DistinctKey' | 'AggregateGroupingKey' | 'AggregateAssignmentValue' | 'AggregateAssignmentFilter' | 'OrderKey' | 'KeysetBoundary' | 'RelationOutputKey' | 'RelationInvariant' | 'TemporalJoinCorrelation' | 'TemporalJoinPoint' | 'TemporalJoinIntervalLowerBound' | 'TemporalJoinIntervalUpperBound';
2528
+ export type RelationQueryExpressionSiteKind = 'FilterPredicate' | 'JoinPredicate' | 'ExpandCollection' | 'ProjectionAssignmentValue' | 'DistinctKey' | 'AggregateGroupingKey' | 'AggregateAssignmentValue' | 'AggregateAssignmentFilter' | 'OrderKey' | 'KeysetBoundary' | 'RelationOutputKey' | 'RelationInvariant' | 'TemporalJoinCorrelation' | 'TemporalJoinPoint' | 'TemporalJoinIntervalLowerBound' | 'TemporalJoinIntervalUpperBound' | 'RepresentativeKey';
2493
2529
 
2494
2530
  export const relationQueryExpressionSiteKinds = {
2495
2531
  filterPredicate: 'FilterPredicate',
@@ -2508,6 +2544,7 @@ export const relationQueryExpressionSiteKinds = {
2508
2544
  temporalJoinPoint: 'TemporalJoinPoint',
2509
2545
  temporalJoinIntervalLowerBound: 'TemporalJoinIntervalLowerBound',
2510
2546
  temporalJoinIntervalUpperBound: 'TemporalJoinIntervalUpperBound',
2547
+ representativeKey: 'RepresentativeKey',
2511
2548
  } as const satisfies Record<string, RelationQueryExpressionSiteKind>;
2512
2549
 
2513
2550
  export const relationQueryExpressionSiteKindLabels: Record<RelationQueryExpressionSiteKind, string> = {
@@ -2527,6 +2564,7 @@ export const relationQueryExpressionSiteKindLabels: Record<RelationQueryExpressi
2527
2564
  TemporalJoinPoint: 'TemporalJoinPoint',
2528
2565
  TemporalJoinIntervalLowerBound: 'TemporalJoinIntervalLowerBound',
2529
2566
  TemporalJoinIntervalUpperBound: 'TemporalJoinIntervalUpperBound',
2567
+ RepresentativeKey: 'RepresentativeKey',
2530
2568
  };
2531
2569
 
2532
2570
  export type ExprSiteId = string;
@@ -2586,30 +2624,6 @@ export const relationDraftUnresolvedReasonLabels: Record<RelationDraftUnresolved
2586
2624
  MultipleCandidates: 'MultipleCandidates',
2587
2625
  };
2588
2626
 
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
2627
  export interface RelationQueryLogicalBypass {
2614
2628
  kind: RelationQueryLogicalBypassKind;
2615
2629
  node: QueryNodeId;
@@ -2705,6 +2719,14 @@ export interface QualifiedShapeId {
2705
2719
  shapeId: ShapeId;
2706
2720
  }
2707
2721
 
2722
+ export interface ValueContract {
2723
+ type?: TypeRef | null;
2724
+ shape?: QualifiedShapeId | null;
2725
+ cardinality: FieldCardinality;
2726
+ presence: FieldPresence;
2727
+ nullability: FieldNullability;
2728
+ }
2729
+
2708
2730
  export interface RelationQueryExplainArtifact {
2709
2731
  schemaVersion: string;
2710
2732
  stages: RelationQueryExplainStage[];