@cohesivesystems/relations 0.1.0-alpha.14 → 0.1.0-alpha.140
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generated/relations.shapes.generated.d.ts +599 -140
- package/dist/generated/relations.shapes.generated.d.ts.map +1 -1
- package/dist/generated/relations.shapes.generated.js +166 -104
- package/dist/generated/relations.shapes.generated.js.map +1 -1
- package/package.json +1 -1
- package/src/generated/relations.shapes.generated.ts +807 -246
|
@@ -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 | {
|
|
@@ -388,6 +765,7 @@ export interface QueryDefinition {
|
|
|
388
765
|
id: QueryId;
|
|
389
766
|
name: QueryName;
|
|
390
767
|
results: QueryResultDefinition[];
|
|
768
|
+
assembly?: NestedQueryResultAssembly | null;
|
|
391
769
|
body: LogicalQueryDefinition;
|
|
392
770
|
}
|
|
393
771
|
|
|
@@ -431,6 +809,270 @@ export interface RelationshipCatalogDocumentMetadata {
|
|
|
431
809
|
annotations: Record<string, AnnotationValue>;
|
|
432
810
|
}
|
|
433
811
|
|
|
812
|
+
export interface Shape {
|
|
813
|
+
id: ShapeId;
|
|
814
|
+
fields: FieldDefinition[];
|
|
815
|
+
constraints: ShapeConstraint[];
|
|
816
|
+
annotations: Record<string, AnnotationValue>;
|
|
817
|
+
role?: string | null;
|
|
818
|
+
entityType?: EntityTypeName | null;
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
export type TypeDefinition = {
|
|
822
|
+
readonly $typeDef: 'structural';
|
|
823
|
+
} & Structural | {
|
|
824
|
+
readonly $typeDef: 'enum';
|
|
825
|
+
} & Enum | {
|
|
826
|
+
readonly $typeDef: 'union';
|
|
827
|
+
} & Union;
|
|
828
|
+
|
|
829
|
+
export interface Structural {
|
|
830
|
+
id: TypeId;
|
|
831
|
+
name: string;
|
|
832
|
+
fields: StructuralField[];
|
|
833
|
+
constraints: ShapeConstraint[];
|
|
834
|
+
annotations: Record<string, AnnotationValue>;
|
|
835
|
+
}
|
|
836
|
+
|
|
837
|
+
export interface Enum {
|
|
838
|
+
id: TypeId;
|
|
839
|
+
name: string;
|
|
840
|
+
underlying: PrimitiveType;
|
|
841
|
+
values: EnumValue[];
|
|
842
|
+
annotations: Record<string, AnnotationValue>;
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
export interface Union {
|
|
846
|
+
id: TypeId;
|
|
847
|
+
name: string;
|
|
848
|
+
discriminator: UnionDiscriminator;
|
|
849
|
+
cases: UnionCase[];
|
|
850
|
+
annotations: Record<string, AnnotationValue>;
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
export type TypeId = string;
|
|
854
|
+
|
|
855
|
+
export interface FieldDefinition {
|
|
856
|
+
name: FieldName;
|
|
857
|
+
type: TypeRef;
|
|
858
|
+
cardinality: FieldCardinality;
|
|
859
|
+
presence: FieldPresence;
|
|
860
|
+
role: FieldRole;
|
|
861
|
+
nullability: FieldNullability;
|
|
862
|
+
mutability: FieldMutability;
|
|
863
|
+
compute?: ComputeDefinition | null;
|
|
864
|
+
constraints: ShapeConstraint[];
|
|
865
|
+
annotations: Record<string, AnnotationValue>;
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
export type FieldName = string;
|
|
869
|
+
|
|
870
|
+
export interface StructuralField {
|
|
871
|
+
name: FieldName;
|
|
872
|
+
type: TypeRef;
|
|
873
|
+
cardinality: FieldCardinality;
|
|
874
|
+
presence: FieldPresence;
|
|
875
|
+
nullability: FieldNullability;
|
|
876
|
+
role: FieldRole;
|
|
877
|
+
constraints: ShapeConstraint[];
|
|
878
|
+
annotations: Record<string, AnnotationValue>;
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
export interface GraphFieldPath {
|
|
882
|
+
shapeId?: ShapeId | null;
|
|
883
|
+
typeId?: TypeId | null;
|
|
884
|
+
path: FieldPath;
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
export type ShapeConstraint = {
|
|
888
|
+
readonly $constraint: 'required';
|
|
889
|
+
} & RequiredConstraint | {
|
|
890
|
+
readonly $constraint: 'minLength';
|
|
891
|
+
} & MinLengthConstraint | {
|
|
892
|
+
readonly $constraint: 'maxLength';
|
|
893
|
+
} & MaxLengthConstraint | {
|
|
894
|
+
readonly $constraint: 'range';
|
|
895
|
+
} & RangeConstraint | {
|
|
896
|
+
readonly $constraint: 'regex';
|
|
897
|
+
} & RegexConstraint | {
|
|
898
|
+
readonly $constraint: 'allowedValues';
|
|
899
|
+
} & AllowedValuesConstraint | {
|
|
900
|
+
readonly $constraint: 'occurrence';
|
|
901
|
+
} & OccurrenceConstraint;
|
|
902
|
+
|
|
903
|
+
export interface RequiredConstraint {
|
|
904
|
+
field?: FieldPath | null;
|
|
905
|
+
message?: string | null;
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
export interface MinLengthConstraint {
|
|
909
|
+
value: number;
|
|
910
|
+
field?: FieldPath | null;
|
|
911
|
+
message?: string | null;
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
export interface MaxLengthConstraint {
|
|
915
|
+
value: number;
|
|
916
|
+
field?: FieldPath | null;
|
|
917
|
+
message?: string | null;
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
export interface RangeConstraint {
|
|
921
|
+
minimum?: number | null;
|
|
922
|
+
maximum?: number | null;
|
|
923
|
+
field?: FieldPath | null;
|
|
924
|
+
message?: string | null;
|
|
925
|
+
}
|
|
926
|
+
|
|
927
|
+
export interface RegexConstraint {
|
|
928
|
+
pattern: string;
|
|
929
|
+
field?: FieldPath | null;
|
|
930
|
+
message?: string | null;
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
export interface AllowedValuesConstraint {
|
|
934
|
+
values: string[];
|
|
935
|
+
field?: FieldPath | null;
|
|
936
|
+
message?: string | null;
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
export interface OccurrenceConstraint {
|
|
940
|
+
minimum?: number | null;
|
|
941
|
+
maximum?: number | null;
|
|
942
|
+
field?: FieldPath | null;
|
|
943
|
+
message?: string | null;
|
|
944
|
+
}
|
|
945
|
+
|
|
946
|
+
export interface EnumValue {
|
|
947
|
+
name: string;
|
|
948
|
+
value?: string | null;
|
|
949
|
+
label?: string | null;
|
|
950
|
+
description?: string | null;
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
export type DocumentOrigin = 'Unknown' | 'User' | 'System' | 'Imported' | 'Generated' | 'Compiled' | 'Extracted';
|
|
954
|
+
|
|
955
|
+
export const documentOrigins = {
|
|
956
|
+
unknown: 'Unknown',
|
|
957
|
+
user: 'User',
|
|
958
|
+
system: 'System',
|
|
959
|
+
imported: 'Imported',
|
|
960
|
+
generated: 'Generated',
|
|
961
|
+
compiled: 'Compiled',
|
|
962
|
+
extracted: 'Extracted',
|
|
963
|
+
} as const satisfies Record<string, DocumentOrigin>;
|
|
964
|
+
|
|
965
|
+
export const documentOriginLabels: Record<DocumentOrigin, string> = {
|
|
966
|
+
Unknown: 'Unknown',
|
|
967
|
+
User: 'User',
|
|
968
|
+
System: 'System',
|
|
969
|
+
Imported: 'Imported',
|
|
970
|
+
Generated: 'Generated',
|
|
971
|
+
Compiled: 'Compiled',
|
|
972
|
+
Extracted: 'Extracted',
|
|
973
|
+
};
|
|
974
|
+
|
|
975
|
+
export interface GraphDiagnostic {
|
|
976
|
+
id: DiagnosticId;
|
|
977
|
+
severity: DiagnosticSeverity;
|
|
978
|
+
message: string;
|
|
979
|
+
shapeId?: ShapeId | null;
|
|
980
|
+
fieldIdentity?: string | null;
|
|
981
|
+
typeId?: TypeId | null;
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
export interface TypeInferenceDiagnostic {
|
|
985
|
+
reason: string;
|
|
986
|
+
message?: string | null;
|
|
987
|
+
}
|
|
988
|
+
|
|
989
|
+
export type ScalarTypeKind = 'Bool' | 'Int32' | 'Int64' | 'Decimal' | 'String' | 'Guid' | 'Date' | 'DateTime' | 'Instant' | 'Bytes';
|
|
990
|
+
|
|
991
|
+
export const scalarTypeKinds = {
|
|
992
|
+
bool: 'Bool',
|
|
993
|
+
int32: 'Int32',
|
|
994
|
+
int64: 'Int64',
|
|
995
|
+
decimal: 'Decimal',
|
|
996
|
+
string: 'String',
|
|
997
|
+
guid: 'Guid',
|
|
998
|
+
date: 'Date',
|
|
999
|
+
dateTime: 'DateTime',
|
|
1000
|
+
instant: 'Instant',
|
|
1001
|
+
bytes: 'Bytes',
|
|
1002
|
+
} as const satisfies Record<string, ScalarTypeKind>;
|
|
1003
|
+
|
|
1004
|
+
export const scalarTypeKindLabels: Record<ScalarTypeKind, string> = {
|
|
1005
|
+
Bool: 'Bool',
|
|
1006
|
+
Int32: 'Int32',
|
|
1007
|
+
Int64: 'Int64',
|
|
1008
|
+
Decimal: 'Decimal',
|
|
1009
|
+
String: 'String',
|
|
1010
|
+
Guid: 'Guid',
|
|
1011
|
+
Date: 'Date',
|
|
1012
|
+
DateTime: 'DateTime',
|
|
1013
|
+
Instant: 'Instant',
|
|
1014
|
+
Bytes: 'Bytes',
|
|
1015
|
+
};
|
|
1016
|
+
|
|
1017
|
+
export type PrimitiveFormat = 'None' | 'Uuid' | 'IsoDate' | 'IsoDateTime' | 'IsoInstant' | 'CurrencyCode' | 'CountryCode' | 'Email' | 'Uri' | 'Base64';
|
|
1018
|
+
|
|
1019
|
+
export const primitiveFormats = {
|
|
1020
|
+
none: 'None',
|
|
1021
|
+
uuid: 'Uuid',
|
|
1022
|
+
isoDate: 'IsoDate',
|
|
1023
|
+
isoDateTime: 'IsoDateTime',
|
|
1024
|
+
isoInstant: 'IsoInstant',
|
|
1025
|
+
currencyCode: 'CurrencyCode',
|
|
1026
|
+
countryCode: 'CountryCode',
|
|
1027
|
+
email: 'Email',
|
|
1028
|
+
uri: 'Uri',
|
|
1029
|
+
base64: 'Base64',
|
|
1030
|
+
} as const satisfies Record<string, PrimitiveFormat>;
|
|
1031
|
+
|
|
1032
|
+
export const primitiveFormatLabels: Record<PrimitiveFormat, string> = {
|
|
1033
|
+
None: 'None',
|
|
1034
|
+
Uuid: 'Uuid',
|
|
1035
|
+
IsoDate: 'IsoDate',
|
|
1036
|
+
IsoDateTime: 'IsoDateTime',
|
|
1037
|
+
IsoInstant: 'IsoInstant',
|
|
1038
|
+
CurrencyCode: 'CurrencyCode',
|
|
1039
|
+
CountryCode: 'CountryCode',
|
|
1040
|
+
Email: 'Email',
|
|
1041
|
+
Uri: 'Uri',
|
|
1042
|
+
Base64: 'Base64',
|
|
1043
|
+
};
|
|
1044
|
+
|
|
1045
|
+
export type EntityTypeName = string;
|
|
1046
|
+
|
|
1047
|
+
export interface ObjectFieldTypeDef {
|
|
1048
|
+
name: string;
|
|
1049
|
+
type: TypeRef;
|
|
1050
|
+
cardinality: FieldCardinality;
|
|
1051
|
+
presence: FieldPresence;
|
|
1052
|
+
nullability: FieldNullability;
|
|
1053
|
+
annotations: Record<string, AnnotationValue>;
|
|
1054
|
+
}
|
|
1055
|
+
|
|
1056
|
+
export type JsonTypeKind = 'Any' | 'Object' | 'Array' | 'String' | 'Number' | 'Boolean';
|
|
1057
|
+
|
|
1058
|
+
export const jsonTypeKinds = {
|
|
1059
|
+
any: 'Any',
|
|
1060
|
+
object: 'Object',
|
|
1061
|
+
array: 'Array',
|
|
1062
|
+
string: 'String',
|
|
1063
|
+
number: 'Number',
|
|
1064
|
+
boolean: 'Boolean',
|
|
1065
|
+
} as const satisfies Record<string, JsonTypeKind>;
|
|
1066
|
+
|
|
1067
|
+
export const jsonTypeKindLabels: Record<JsonTypeKind, string> = {
|
|
1068
|
+
Any: 'Any',
|
|
1069
|
+
Object: 'Object',
|
|
1070
|
+
Array: 'Array',
|
|
1071
|
+
String: 'String',
|
|
1072
|
+
Number: 'Number',
|
|
1073
|
+
Boolean: 'Boolean',
|
|
1074
|
+
};
|
|
1075
|
+
|
|
434
1076
|
export type RelationQueryExplainStageStatus = 'Complete' | 'Unavailable' | 'Invalid' | 'Incomplete' | 'Failed';
|
|
435
1077
|
|
|
436
1078
|
export const relationQueryExplainStageStatuses = {
|
|
@@ -1140,32 +1782,6 @@ export interface InvariantDefinition {
|
|
|
1140
1782
|
message?: string | null;
|
|
1141
1783
|
}
|
|
1142
1784
|
|
|
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
1785
|
export interface RelationDraftProducerArtifactReference {
|
|
1170
1786
|
kind: string;
|
|
1171
1787
|
value: string;
|
|
@@ -1187,35 +1803,120 @@ export interface RelationOutputDefinition {
|
|
|
1187
1803
|
key?: Expr | null;
|
|
1188
1804
|
}
|
|
1189
1805
|
|
|
1190
|
-
export type QueryId = string;
|
|
1806
|
+
export type QueryId = string;
|
|
1807
|
+
|
|
1808
|
+
export type QueryName = string;
|
|
1809
|
+
|
|
1810
|
+
export type QueryResultDefinition = {
|
|
1811
|
+
readonly $result: 'rows';
|
|
1812
|
+
} & RowsQueryResultDefinition | {
|
|
1813
|
+
readonly $result: 'aggregation';
|
|
1814
|
+
} & AggregationQueryResultDefinition;
|
|
1815
|
+
|
|
1816
|
+
export interface RowsQueryResultDefinition {
|
|
1817
|
+
id: QueryResultId;
|
|
1818
|
+
input: QueryNodeId;
|
|
1819
|
+
}
|
|
1820
|
+
|
|
1821
|
+
export interface AggregationQueryResultDefinition {
|
|
1822
|
+
id: QueryResultId;
|
|
1823
|
+
input: QueryNodeId;
|
|
1824
|
+
}
|
|
1825
|
+
|
|
1826
|
+
export interface NestedQueryResultAssembly {
|
|
1827
|
+
result: QueryResultId;
|
|
1828
|
+
shape: QualifiedShapeId;
|
|
1829
|
+
identity: FieldPath;
|
|
1830
|
+
fields: QueryResultFieldMapping[];
|
|
1831
|
+
collections: QueryResultCollectionAssembly[];
|
|
1832
|
+
}
|
|
1833
|
+
|
|
1834
|
+
export interface RelationshipDefinition {
|
|
1835
|
+
id: RelationshipId;
|
|
1836
|
+
sourceShape: QualifiedShapeId;
|
|
1837
|
+
sourceReference: FieldPath;
|
|
1838
|
+
targetShape: QualifiedShapeId;
|
|
1839
|
+
targetKey: RelationshipTargetKey;
|
|
1840
|
+
sourceReferenceUniqueness: SourceReferenceUniqueness;
|
|
1841
|
+
}
|
|
1842
|
+
|
|
1843
|
+
export type PrimitiveType = 'Bool' | 'Int32' | 'Int64' | 'Decimal' | 'String' | 'Guid' | 'Date' | 'DateTime' | 'Instant' | 'Bytes';
|
|
1844
|
+
|
|
1845
|
+
export const primitiveTypes = {
|
|
1846
|
+
bool: 'Bool',
|
|
1847
|
+
int32: 'Int32',
|
|
1848
|
+
int64: 'Int64',
|
|
1849
|
+
decimal: 'Decimal',
|
|
1850
|
+
string: 'String',
|
|
1851
|
+
guid: 'Guid',
|
|
1852
|
+
date: 'Date',
|
|
1853
|
+
dateTime: 'DateTime',
|
|
1854
|
+
instant: 'Instant',
|
|
1855
|
+
bytes: 'Bytes',
|
|
1856
|
+
} as const satisfies Record<string, PrimitiveType>;
|
|
1857
|
+
|
|
1858
|
+
export const primitiveTypeLabels: Record<PrimitiveType, string> = {
|
|
1859
|
+
Bool: 'Bool',
|
|
1860
|
+
Int32: 'Int32',
|
|
1861
|
+
Int64: 'Int64',
|
|
1862
|
+
Decimal: 'Decimal',
|
|
1863
|
+
String: 'String',
|
|
1864
|
+
Guid: 'Guid',
|
|
1865
|
+
Date: 'Date',
|
|
1866
|
+
DateTime: 'DateTime',
|
|
1867
|
+
Instant: 'Instant',
|
|
1868
|
+
Bytes: 'Bytes',
|
|
1869
|
+
};
|
|
1870
|
+
|
|
1871
|
+
export interface UnionDiscriminator {
|
|
1872
|
+
fieldName: string;
|
|
1873
|
+
type: PrimitiveType;
|
|
1874
|
+
}
|
|
1875
|
+
|
|
1876
|
+
export interface UnionCase {
|
|
1877
|
+
name: string;
|
|
1878
|
+
type: TypeRef;
|
|
1879
|
+
discriminatorValue: string;
|
|
1880
|
+
}
|
|
1881
|
+
|
|
1882
|
+
export type FieldRole = 'Data' | 'Identity' | 'Reference' | 'Computed' | 'Metadata';
|
|
1191
1883
|
|
|
1192
|
-
export
|
|
1884
|
+
export const fieldRoles = {
|
|
1885
|
+
data: 'Data',
|
|
1886
|
+
identity: 'Identity',
|
|
1887
|
+
reference: 'Reference',
|
|
1888
|
+
computed: 'Computed',
|
|
1889
|
+
metadata: 'Metadata',
|
|
1890
|
+
} as const satisfies Record<string, FieldRole>;
|
|
1193
1891
|
|
|
1194
|
-
export
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1892
|
+
export const fieldRoleLabels: Record<FieldRole, string> = {
|
|
1893
|
+
Data: 'Data',
|
|
1894
|
+
Identity: 'Identity',
|
|
1895
|
+
Reference: 'Reference',
|
|
1896
|
+
Computed: 'Computed',
|
|
1897
|
+
Metadata: 'Metadata',
|
|
1898
|
+
};
|
|
1199
1899
|
|
|
1200
|
-
export
|
|
1201
|
-
id: QueryResultId;
|
|
1202
|
-
input: QueryNodeId;
|
|
1203
|
-
}
|
|
1900
|
+
export type FieldMutability = 'Mutable' | 'WriteOnce' | 'Computed';
|
|
1204
1901
|
|
|
1205
|
-
export
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1902
|
+
export const fieldMutabilities = {
|
|
1903
|
+
mutable: 'Mutable',
|
|
1904
|
+
writeOnce: 'WriteOnce',
|
|
1905
|
+
computed: 'Computed',
|
|
1906
|
+
} as const satisfies Record<string, FieldMutability>;
|
|
1209
1907
|
|
|
1210
|
-
export
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1908
|
+
export const fieldMutabilityLabels: Record<FieldMutability, string> = {
|
|
1909
|
+
Mutable: 'Mutable',
|
|
1910
|
+
WriteOnce: 'WriteOnce',
|
|
1911
|
+
Computed: 'Computed',
|
|
1912
|
+
};
|
|
1913
|
+
|
|
1914
|
+
export interface ComputeDefinition {
|
|
1915
|
+
expression: Expr;
|
|
1217
1916
|
}
|
|
1218
1917
|
|
|
1918
|
+
export type DiagnosticId = string;
|
|
1919
|
+
|
|
1219
1920
|
export interface RelationQueryLogicalPlan {
|
|
1220
1921
|
nodes: RelationQueryLogicalPlanNode[];
|
|
1221
1922
|
retainedNodes: QueryNodeId[];
|
|
@@ -1387,7 +2088,7 @@ export const relationQueryBoundAssessmentStatusLabels: Record<RelationQueryBound
|
|
|
1387
2088
|
Blocked: 'Blocked',
|
|
1388
2089
|
};
|
|
1389
2090
|
|
|
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';
|
|
2091
|
+
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
2092
|
|
|
1392
2093
|
export const relationQueryLogicalCapabilityKinds = {
|
|
1393
2094
|
source: 'Source',
|
|
@@ -1438,6 +2139,7 @@ export const relationQueryLogicalCapabilityKinds = {
|
|
|
1438
2139
|
alwaysPresentBinding: 'AlwaysPresentBinding',
|
|
1439
2140
|
mayBeAbsentBinding: 'MayBeAbsentBinding',
|
|
1440
2141
|
averageAggregate: 'AverageAggregate',
|
|
2142
|
+
selectRepresentative: 'SelectRepresentative',
|
|
1441
2143
|
} as const satisfies Record<string, RelationQueryLogicalCapabilityKind>;
|
|
1442
2144
|
|
|
1443
2145
|
export const relationQueryLogicalCapabilityKindLabels: Record<RelationQueryLogicalCapabilityKind, string> = {
|
|
@@ -1489,6 +2191,7 @@ export const relationQueryLogicalCapabilityKindLabels: Record<RelationQueryLogic
|
|
|
1489
2191
|
AlwaysPresentBinding: 'AlwaysPresentBinding',
|
|
1490
2192
|
MayBeAbsentBinding: 'MayBeAbsentBinding',
|
|
1491
2193
|
AverageAggregate: 'AverageAggregate',
|
|
2194
|
+
SelectRepresentative: 'SelectRepresentative',
|
|
1492
2195
|
};
|
|
1493
2196
|
|
|
1494
2197
|
export interface ExprCapabilityId {
|
|
@@ -1742,6 +2445,8 @@ export type LogicalQueryNode = {
|
|
|
1742
2445
|
} & ProjectQueryNode | {
|
|
1743
2446
|
readonly $node: 'distinct';
|
|
1744
2447
|
} & DistinctQueryNode | {
|
|
2448
|
+
readonly $node: 'selectRepresentative';
|
|
2449
|
+
} & SelectRepresentativeQueryNode | {
|
|
1745
2450
|
readonly $node: 'aggregate';
|
|
1746
2451
|
} & AggregateQueryNode | {
|
|
1747
2452
|
readonly $node: 'order';
|
|
@@ -1794,6 +2499,7 @@ export interface ExpandCollectionQueryNode {
|
|
|
1794
2499
|
collection: Expr;
|
|
1795
2500
|
itemBinding: ValueBindingId;
|
|
1796
2501
|
itemType: TypeRef;
|
|
2502
|
+
itemShape?: QualifiedShapeId | null;
|
|
1797
2503
|
id: QueryNodeId;
|
|
1798
2504
|
}
|
|
1799
2505
|
|
|
@@ -1811,6 +2517,13 @@ export interface DistinctQueryNode {
|
|
|
1811
2517
|
id: QueryNodeId;
|
|
1812
2518
|
}
|
|
1813
2519
|
|
|
2520
|
+
export interface SelectRepresentativeQueryNode {
|
|
2521
|
+
id: QueryNodeId;
|
|
2522
|
+
input: QueryNodeId;
|
|
2523
|
+
keys: Expr[];
|
|
2524
|
+
orderings: QueryOrdering[];
|
|
2525
|
+
}
|
|
2526
|
+
|
|
1814
2527
|
export interface AggregateQueryNode {
|
|
1815
2528
|
input: QueryNodeId;
|
|
1816
2529
|
resultBinding: ValueBindingId;
|
|
@@ -1889,66 +2602,6 @@ export const binaryOperatorLabels: Record<BinaryOperator, string> = {
|
|
|
1889
2602
|
Div: 'Div',
|
|
1890
2603
|
};
|
|
1891
2604
|
|
|
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
2605
|
export type AggregateOperator = 'Count' | 'Sum' | 'Min' | 'Max' | 'Any' | 'All' | 'Average';
|
|
1953
2606
|
|
|
1954
2607
|
export const aggregateOperators = {
|
|
@@ -1979,6 +2632,17 @@ export type RelationDraftCandidateId = string;
|
|
|
1979
2632
|
|
|
1980
2633
|
export type QueryResultId = string;
|
|
1981
2634
|
|
|
2635
|
+
export interface QueryResultFieldMapping {
|
|
2636
|
+
source: FieldPath;
|
|
2637
|
+
target: FieldPath;
|
|
2638
|
+
}
|
|
2639
|
+
|
|
2640
|
+
export interface QueryResultCollectionAssembly {
|
|
2641
|
+
target: FieldPath;
|
|
2642
|
+
identity: FieldPath;
|
|
2643
|
+
fields: QueryResultFieldMapping[];
|
|
2644
|
+
}
|
|
2645
|
+
|
|
1982
2646
|
export type RelationshipId = string;
|
|
1983
2647
|
|
|
1984
2648
|
export type RelationshipTargetKey = {
|
|
@@ -2252,6 +2916,12 @@ export interface ProjectionAssignment {
|
|
|
2252
2916
|
value: Expr;
|
|
2253
2917
|
}
|
|
2254
2918
|
|
|
2919
|
+
export interface QueryOrdering {
|
|
2920
|
+
key: Expr;
|
|
2921
|
+
direction: QuerySortDirection;
|
|
2922
|
+
nullPlacement: QueryNullPlacement;
|
|
2923
|
+
}
|
|
2924
|
+
|
|
2255
2925
|
export interface QueryGrouping {
|
|
2256
2926
|
id: QueryAssignmentId;
|
|
2257
2927
|
target: FieldPath;
|
|
@@ -2266,12 +2936,6 @@ export interface QueryAggregateAssignment {
|
|
|
2266
2936
|
filter?: Expr | null;
|
|
2267
2937
|
}
|
|
2268
2938
|
|
|
2269
|
-
export interface QueryOrdering {
|
|
2270
|
-
key: Expr;
|
|
2271
|
-
direction: QuerySortDirection;
|
|
2272
|
-
nullPlacement: QueryNullPlacement;
|
|
2273
|
-
}
|
|
2274
|
-
|
|
2275
2939
|
export type QueryPageDefinition = {
|
|
2276
2940
|
readonly $page: 'offset';
|
|
2277
2941
|
} & OffsetPageDefinition | {
|
|
@@ -2290,18 +2954,6 @@ export interface KeysetPageDefinition {
|
|
|
2290
2954
|
|
|
2291
2955
|
export type QueryParameterId = string;
|
|
2292
2956
|
|
|
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
2957
|
export type QueryParameterDefaultKind = 'None' | 'Value';
|
|
2306
2958
|
|
|
2307
2959
|
export const queryParameterDefaultKinds = {
|
|
@@ -2343,100 +2995,6 @@ export interface AmbiguousRelationDraftAssignmentResolution {
|
|
|
2343
2995
|
candidateIds: RelationDraftCandidateId[];
|
|
2344
2996
|
}
|
|
2345
2997
|
|
|
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
2998
|
export interface RelationQueryLogicalPlanInput {
|
|
2441
2999
|
canonicalInput: QueryNodeId;
|
|
2442
3000
|
effectiveInput: QueryNodeId;
|
|
@@ -2489,7 +3047,7 @@ export const relationQueryRealizationTraceStepKindLabels: Record<RelationQueryRe
|
|
|
2489
3047
|
Terminal: 'Terminal',
|
|
2490
3048
|
};
|
|
2491
3049
|
|
|
2492
|
-
export type RelationQueryExpressionSiteKind = 'FilterPredicate' | 'JoinPredicate' | 'ExpandCollection' | 'ProjectionAssignmentValue' | 'DistinctKey' | 'AggregateGroupingKey' | 'AggregateAssignmentValue' | 'AggregateAssignmentFilter' | 'OrderKey' | 'KeysetBoundary' | 'RelationOutputKey' | 'RelationInvariant' | 'TemporalJoinCorrelation' | 'TemporalJoinPoint' | 'TemporalJoinIntervalLowerBound' | 'TemporalJoinIntervalUpperBound';
|
|
3050
|
+
export type RelationQueryExpressionSiteKind = 'FilterPredicate' | 'JoinPredicate' | 'ExpandCollection' | 'ProjectionAssignmentValue' | 'DistinctKey' | 'AggregateGroupingKey' | 'AggregateAssignmentValue' | 'AggregateAssignmentFilter' | 'OrderKey' | 'KeysetBoundary' | 'RelationOutputKey' | 'RelationInvariant' | 'TemporalJoinCorrelation' | 'TemporalJoinPoint' | 'TemporalJoinIntervalLowerBound' | 'TemporalJoinIntervalUpperBound' | 'RepresentativeKey';
|
|
2493
3051
|
|
|
2494
3052
|
export const relationQueryExpressionSiteKinds = {
|
|
2495
3053
|
filterPredicate: 'FilterPredicate',
|
|
@@ -2508,6 +3066,7 @@ export const relationQueryExpressionSiteKinds = {
|
|
|
2508
3066
|
temporalJoinPoint: 'TemporalJoinPoint',
|
|
2509
3067
|
temporalJoinIntervalLowerBound: 'TemporalJoinIntervalLowerBound',
|
|
2510
3068
|
temporalJoinIntervalUpperBound: 'TemporalJoinIntervalUpperBound',
|
|
3069
|
+
representativeKey: 'RepresentativeKey',
|
|
2511
3070
|
} as const satisfies Record<string, RelationQueryExpressionSiteKind>;
|
|
2512
3071
|
|
|
2513
3072
|
export const relationQueryExpressionSiteKindLabels: Record<RelationQueryExpressionSiteKind, string> = {
|
|
@@ -2527,6 +3086,7 @@ export const relationQueryExpressionSiteKindLabels: Record<RelationQueryExpressi
|
|
|
2527
3086
|
TemporalJoinPoint: 'TemporalJoinPoint',
|
|
2528
3087
|
TemporalJoinIntervalLowerBound: 'TemporalJoinIntervalLowerBound',
|
|
2529
3088
|
TemporalJoinIntervalUpperBound: 'TemporalJoinIntervalUpperBound',
|
|
3089
|
+
RepresentativeKey: 'RepresentativeKey',
|
|
2530
3090
|
};
|
|
2531
3091
|
|
|
2532
3092
|
export type ExprSiteId = string;
|
|
@@ -2586,30 +3146,6 @@ export const relationDraftUnresolvedReasonLabels: Record<RelationDraftUnresolved
|
|
|
2586
3146
|
MultipleCandidates: 'MultipleCandidates',
|
|
2587
3147
|
};
|
|
2588
3148
|
|
|
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
3149
|
export interface RelationQueryLogicalBypass {
|
|
2614
3150
|
kind: RelationQueryLogicalBypassKind;
|
|
2615
3151
|
node: QueryNodeId;
|
|
@@ -2700,11 +3236,36 @@ export const temporalNullBoundBehaviorLabels: Record<TemporalNullBoundBehavior,
|
|
|
2700
3236
|
Unbounded: 'Unbounded',
|
|
2701
3237
|
};
|
|
2702
3238
|
|
|
3239
|
+
export interface GraphDelta {
|
|
3240
|
+
id: string;
|
|
3241
|
+
kind: GraphDeltaKind;
|
|
3242
|
+
sourceGraphId?: GraphId | null;
|
|
3243
|
+
targetGraphId?: GraphId | null;
|
|
3244
|
+
sourceVersion?: string | null;
|
|
3245
|
+
targetVersion?: string | null;
|
|
3246
|
+
operations: GraphDeltaOperation[];
|
|
3247
|
+
annotations: Record<string, AnnotationValue>;
|
|
3248
|
+
}
|
|
3249
|
+
|
|
2703
3250
|
export interface QualifiedShapeId {
|
|
2704
3251
|
graphId: GraphId;
|
|
2705
3252
|
shapeId: ShapeId;
|
|
2706
3253
|
}
|
|
2707
3254
|
|
|
3255
|
+
export interface ShapeGraphDocument {
|
|
3256
|
+
schemaVersion: string;
|
|
3257
|
+
metadata: ShapeGraphDocumentMetadata;
|
|
3258
|
+
graph: ShapeGraph;
|
|
3259
|
+
}
|
|
3260
|
+
|
|
3261
|
+
export interface ValueContract {
|
|
3262
|
+
type?: TypeRef | null;
|
|
3263
|
+
shape?: QualifiedShapeId | null;
|
|
3264
|
+
cardinality: FieldCardinality;
|
|
3265
|
+
presence: FieldPresence;
|
|
3266
|
+
nullability: FieldNullability;
|
|
3267
|
+
}
|
|
3268
|
+
|
|
2708
3269
|
export interface RelationQueryExplainArtifact {
|
|
2709
3270
|
schemaVersion: string;
|
|
2710
3271
|
stages: RelationQueryExplainStage[];
|