@cohesivesystems/relations 0.1.0-alpha.4 → 0.1.0-alpha.6
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 +1805 -268
- package/dist/generated/relations.shapes.generated.d.ts.map +1 -1
- package/dist/generated/relations.shapes.generated.js +992 -176
- package/dist/generated/relations.shapes.generated.js.map +1 -1
- package/dist/wire-contract.typecheck.d.ts +246 -0
- package/dist/wire-contract.typecheck.d.ts.map +1 -0
- package/dist/wire-contract.typecheck.js +2 -0
- package/dist/wire-contract.typecheck.js.map +1 -0
- package/package.json +1 -1
- package/src/generated/relations.shapes.generated.ts +2556 -340
- package/src/wire-contract.typecheck.ts +291 -0
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
RelationQueryBoundRealizationReport,
|
|
3
|
+
RelationQueryCompilationRequestReference,
|
|
4
|
+
RelationQueryExplainArtifact,
|
|
5
|
+
RelationQueryExplainStage,
|
|
6
|
+
RelationDraftDocument,
|
|
7
|
+
RelationQueryRealizationReport,
|
|
8
|
+
RelationQueryTargetCapabilityProfile,
|
|
9
|
+
RelationshipCatalogDocument,
|
|
10
|
+
} from './generated/relations.shapes.generated'
|
|
11
|
+
|
|
12
|
+
type AssertAssignable<TExpected, TActual extends TExpected> = TActual
|
|
13
|
+
|
|
14
|
+
export type _RelationshipCatalogWireContractCheck = AssertAssignable<
|
|
15
|
+
RelationshipCatalogDocument,
|
|
16
|
+
{
|
|
17
|
+
schemaVersion: 'relationship-catalog/v1'
|
|
18
|
+
catalog: {
|
|
19
|
+
relationships: [
|
|
20
|
+
{
|
|
21
|
+
id: 'relationship:v1:sha256:example'
|
|
22
|
+
sourceShape: {
|
|
23
|
+
graphId: 'domain/v1'
|
|
24
|
+
shapeId: 'Load'
|
|
25
|
+
}
|
|
26
|
+
sourceReference: {
|
|
27
|
+
segments: [
|
|
28
|
+
{
|
|
29
|
+
kind: 'Field'
|
|
30
|
+
segment: 'CustomerId'
|
|
31
|
+
},
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
targetShape: {
|
|
35
|
+
graphId: 'domain/v1'
|
|
36
|
+
shapeId: 'Customer'
|
|
37
|
+
}
|
|
38
|
+
targetKey: {
|
|
39
|
+
$targetKey: 'observationIdentity'
|
|
40
|
+
}
|
|
41
|
+
sourceReferenceUniqueness: 'NotGuaranteed'
|
|
42
|
+
},
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
catalogFingerprint: {
|
|
46
|
+
algorithm: 'sha256'
|
|
47
|
+
canonicalization: 'relationship-catalog/v1-c14n/v2'
|
|
48
|
+
value: 'example'
|
|
49
|
+
}
|
|
50
|
+
metadata: {
|
|
51
|
+
origin: 'Generated'
|
|
52
|
+
producer: 'ari'
|
|
53
|
+
annotations: {
|
|
54
|
+
evidence: {
|
|
55
|
+
confidence: 0.98
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
>
|
|
61
|
+
|
|
62
|
+
export type _RelationDraftWireContractCheck = AssertAssignable<
|
|
63
|
+
RelationDraftDocument,
|
|
64
|
+
{
|
|
65
|
+
schemaVersion: 'relation-draft/v1'
|
|
66
|
+
draft: {
|
|
67
|
+
id: 'draft:load-search'
|
|
68
|
+
relationId: 'relation:load-search'
|
|
69
|
+
name: 'Load search projection'
|
|
70
|
+
input: {
|
|
71
|
+
nodes: [
|
|
72
|
+
{
|
|
73
|
+
$node: 'source'
|
|
74
|
+
id: 'load-source'
|
|
75
|
+
binding: 'load'
|
|
76
|
+
shape: {
|
|
77
|
+
graphId: 'domain/v1'
|
|
78
|
+
shapeId: 'Load'
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
]
|
|
82
|
+
parameters: []
|
|
83
|
+
}
|
|
84
|
+
rootBinding: 'load'
|
|
85
|
+
projection: {
|
|
86
|
+
id: 'load-search-project'
|
|
87
|
+
input: 'load-source'
|
|
88
|
+
resultBinding: 'loadSearch'
|
|
89
|
+
resultShape: {
|
|
90
|
+
graphId: 'search/v1'
|
|
91
|
+
shapeId: 'LoadSearchDto'
|
|
92
|
+
}
|
|
93
|
+
assignments: [
|
|
94
|
+
{
|
|
95
|
+
id: 'slot:customerName'
|
|
96
|
+
target: {
|
|
97
|
+
segments: [{ kind: 'Field'; segment: 'CustomerName' }]
|
|
98
|
+
}
|
|
99
|
+
candidates: []
|
|
100
|
+
resolution: {
|
|
101
|
+
$resolution: 'unresolved'
|
|
102
|
+
reasons: ['NoCandidate']
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
]
|
|
106
|
+
}
|
|
107
|
+
outputMode: 'OnePerRoot'
|
|
108
|
+
invariants: []
|
|
109
|
+
}
|
|
110
|
+
draftFingerprint: {
|
|
111
|
+
algorithm: 'sha256'
|
|
112
|
+
canonicalization: 'relation-draft/v1-c14n/v2'
|
|
113
|
+
value: 'example'
|
|
114
|
+
}
|
|
115
|
+
metadata: {
|
|
116
|
+
origin: 'Generated'
|
|
117
|
+
producer: 'ari'
|
|
118
|
+
annotations: {}
|
|
119
|
+
producerArtifacts: [
|
|
120
|
+
{
|
|
121
|
+
kind: 'ari/relation-proposal'
|
|
122
|
+
value: 'proposal-42'
|
|
123
|
+
},
|
|
124
|
+
]
|
|
125
|
+
conventionDecisions: []
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
>
|
|
129
|
+
|
|
130
|
+
export type _RelationQueryTargetCapabilityProfileWireContractCheck = AssertAssignable<
|
|
131
|
+
RelationQueryTargetCapabilityProfile,
|
|
132
|
+
{
|
|
133
|
+
target: 'cohesive.relations.in-memory'
|
|
134
|
+
id: 'cohesive.relations.in-memory/realization-v1'
|
|
135
|
+
supportedDefinitionSchemaVersions: ['relation-query/v1']
|
|
136
|
+
supportedCompilerProfiles: ['relation-query-static-compiler/v1']
|
|
137
|
+
capabilities: [
|
|
138
|
+
{
|
|
139
|
+
id: 'in-memory/filter'
|
|
140
|
+
capability: {
|
|
141
|
+
$capability: 'logical'
|
|
142
|
+
kind: 'Filter'
|
|
143
|
+
}
|
|
144
|
+
operatingBoundaries: ['boundary/max-input-rows']
|
|
145
|
+
},
|
|
146
|
+
]
|
|
147
|
+
operatingBoundaries: [
|
|
148
|
+
{
|
|
149
|
+
id: 'boundary/max-input-rows'
|
|
150
|
+
kind: 'MaximumInputRows'
|
|
151
|
+
limit: '9007199254740993'
|
|
152
|
+
},
|
|
153
|
+
]
|
|
154
|
+
}
|
|
155
|
+
>
|
|
156
|
+
|
|
157
|
+
export type _RelationQueryStaticFactWideIntegerWireContractCheck = AssertAssignable<
|
|
158
|
+
RelationQueryRealizationReport['requirements'][number]['staticFacts'][number],
|
|
159
|
+
{
|
|
160
|
+
kind: 'PageSize'
|
|
161
|
+
value: '9007199254740993'
|
|
162
|
+
}
|
|
163
|
+
>
|
|
164
|
+
|
|
165
|
+
export type _RelationQueryBoundaryValidationWideIntegerWireContractCheck = AssertAssignable<
|
|
166
|
+
Extract<
|
|
167
|
+
RelationQueryRealizationReport['decisions'][number],
|
|
168
|
+
{ readonly $decision: 'constrained' }
|
|
169
|
+
>['boundaryValidations'][number],
|
|
170
|
+
{
|
|
171
|
+
boundary: 'boundary/max-page-size'
|
|
172
|
+
kind: 'StaticPlanFact'
|
|
173
|
+
measuredValue: '9007199254740993'
|
|
174
|
+
}
|
|
175
|
+
>
|
|
176
|
+
|
|
177
|
+
export type _RelationQueryInvalidProfileUnknownEnumWireContractCheck = AssertAssignable<
|
|
178
|
+
RelationQueryTargetCapabilityProfile,
|
|
179
|
+
{
|
|
180
|
+
target: 'target/test'
|
|
181
|
+
id: 'target/test/v1'
|
|
182
|
+
supportedDefinitionSchemaVersions: ['relation-query/v1']
|
|
183
|
+
supportedCompilerProfiles: ['relation-query-static-compiler/v1']
|
|
184
|
+
capabilities: [
|
|
185
|
+
{
|
|
186
|
+
id: 'evidence/unknown-logical'
|
|
187
|
+
capability: {
|
|
188
|
+
$capability: 'logical'
|
|
189
|
+
kind: 2147483647
|
|
190
|
+
}
|
|
191
|
+
operatingBoundaries: []
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
id: 'evidence/unknown-expression-requirement-kind'
|
|
195
|
+
capability: {
|
|
196
|
+
$capability: 'expression'
|
|
197
|
+
capability: { value: 'expression/unknown-requirement-kind' }
|
|
198
|
+
requirementKind: 2147483647
|
|
199
|
+
}
|
|
200
|
+
operatingBoundaries: []
|
|
201
|
+
},
|
|
202
|
+
]
|
|
203
|
+
operatingBoundaries: [
|
|
204
|
+
{
|
|
205
|
+
id: 'boundary/unknown-kind'
|
|
206
|
+
kind: 2147483647
|
|
207
|
+
},
|
|
208
|
+
]
|
|
209
|
+
}
|
|
210
|
+
>
|
|
211
|
+
|
|
212
|
+
export type _RelationQueryUnavailableDecisionWireContractCheck = AssertAssignable<
|
|
213
|
+
RelationQueryRealizationReport['decisions'][number],
|
|
214
|
+
{
|
|
215
|
+
$decision: 'unavailable'
|
|
216
|
+
requirement: 'requirement/temporal/interval-overlap'
|
|
217
|
+
reason: 'CapabilityNotAdvertised'
|
|
218
|
+
missingCapabilities: [
|
|
219
|
+
{
|
|
220
|
+
$capability: 'temporal'
|
|
221
|
+
capability: 'IntervalOverlap'
|
|
222
|
+
},
|
|
223
|
+
]
|
|
224
|
+
}
|
|
225
|
+
>
|
|
226
|
+
|
|
227
|
+
export type _RelationQueryRequirementOriginWireContractCheck = AssertAssignable<
|
|
228
|
+
NonNullable<RelationQueryRealizationReport['requirements'][number]['origin']>,
|
|
229
|
+
{
|
|
230
|
+
node: 'temporal-join'
|
|
231
|
+
binding: 'customer-version'
|
|
232
|
+
semanticSite: 'temporal-join/correlation'
|
|
233
|
+
expressionPath: '$.left'
|
|
234
|
+
fieldPath: {
|
|
235
|
+
segments: [{ kind: 'Field'; segment: 'CustomerId' }]
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
>
|
|
239
|
+
|
|
240
|
+
export type _RelationQueryStaticCompilationExplainStageWireContractCheck = AssertAssignable<
|
|
241
|
+
RelationQueryExplainStage,
|
|
242
|
+
{
|
|
243
|
+
$stage: 'staticCompilation'
|
|
244
|
+
status: 'Invalid'
|
|
245
|
+
request: RelationQueryCompilationRequestReference
|
|
246
|
+
plan: null
|
|
247
|
+
diagnostics: []
|
|
248
|
+
}
|
|
249
|
+
>
|
|
250
|
+
|
|
251
|
+
export type _RelationQueryBoundRealizationExplainStageWireContractCheck = AssertAssignable<
|
|
252
|
+
RelationQueryExplainStage,
|
|
253
|
+
{
|
|
254
|
+
$stage: 'boundRealization'
|
|
255
|
+
status: 'Unavailable'
|
|
256
|
+
report: RelationQueryBoundRealizationReport
|
|
257
|
+
}
|
|
258
|
+
>
|
|
259
|
+
|
|
260
|
+
export type _RelationQueryCapabilitySummaryWireContractCheck = AssertAssignable<
|
|
261
|
+
NonNullable<RelationQueryExplainArtifact['capabilitySummary']>,
|
|
262
|
+
{
|
|
263
|
+
target: 'cohesive.relations.in-memory'
|
|
264
|
+
targetProfile: 'cohesive.relations.in-memory/realization-v1'
|
|
265
|
+
policy: 'policy/default'
|
|
266
|
+
profileFeasibility: {
|
|
267
|
+
algorithm: 'sha256'
|
|
268
|
+
canonicalization: 'relation-query-realization-report/v1-c14n/v1'
|
|
269
|
+
value: 'profile-example'
|
|
270
|
+
}
|
|
271
|
+
boundRealization: {
|
|
272
|
+
algorithm: 'sha256'
|
|
273
|
+
canonicalization: 'relation-query-bound-realization/v1-c14n/v1'
|
|
274
|
+
value: 'bound-example'
|
|
275
|
+
}
|
|
276
|
+
operatingBoundaries: ['boundary/max-input-rows']
|
|
277
|
+
entries: [
|
|
278
|
+
{
|
|
279
|
+
capability: {
|
|
280
|
+
$capability: 'logical'
|
|
281
|
+
kind: 'Filter'
|
|
282
|
+
}
|
|
283
|
+
requirements: ['requirement/filter']
|
|
284
|
+
missingForRequirements: []
|
|
285
|
+
capabilityEvidence: ['evidence/filter']
|
|
286
|
+
operatingBoundaries: ['boundary/max-input-rows']
|
|
287
|
+
contextEvidence: ['context/filter']
|
|
288
|
+
},
|
|
289
|
+
]
|
|
290
|
+
}
|
|
291
|
+
>
|