@finos/legend-graph 32.3.22 → 32.3.23
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/lib/graph/Core_HashUtils.d.ts +5 -0
- package/lib/graph/Core_HashUtils.d.ts.map +1 -1
- package/lib/graph/Core_HashUtils.js +5 -0
- package/lib/graph/Core_HashUtils.js.map +1 -1
- package/lib/graph/metamodel/pure/dataProduct/DataProduct.d.ts +30 -0
- package/lib/graph/metamodel/pure/dataProduct/DataProduct.d.ts.map +1 -1
- package/lib/graph/metamodel/pure/dataProduct/DataProduct.js +76 -1
- package/lib/graph/metamodel/pure/dataProduct/DataProduct.js.map +1 -1
- package/lib/graph/metamodel/pure/packageableElements/service/Service.d.ts +1 -0
- package/lib/graph/metamodel/pure/packageableElements/service/Service.d.ts.map +1 -1
- package/lib/graph/metamodel/pure/packageableElements/service/Service.js +2 -0
- package/lib/graph/metamodel/pure/packageableElements/service/Service.js.map +1 -1
- package/lib/graph-manager/action/changeDetection/DSL_Service_ObserverHelper.d.ts.map +1 -1
- package/lib/graph-manager/action/changeDetection/DSL_Service_ObserverHelper.js +1 -0
- package/lib/graph-manager/action/changeDetection/DSL_Service_ObserverHelper.js.map +1 -1
- package/lib/graph-manager/action/validation/DSL_Service_ValidationHelper.d.ts +1 -0
- package/lib/graph-manager/action/validation/DSL_Service_ValidationHelper.d.ts.map +1 -1
- package/lib/graph-manager/action/validation/DSL_Service_ValidationHelper.js +14 -0
- package/lib/graph-manager/action/validation/DSL_Service_ValidationHelper.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/lakehouse/deploy/V1_DataProductArtifact.d.ts +89 -0
- package/lib/graph-manager/protocol/pure/v1/lakehouse/deploy/V1_DataProductArtifact.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/lakehouse/deploy/V1_DataProductArtifact.js +195 -2
- package/lib/graph-manager/protocol/pure/v1/lakehouse/deploy/V1_DataProductArtifact.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/model/packageableElements/dataProduct/V1_DataProduct.d.ts +30 -0
- package/lib/graph-manager/protocol/pure/v1/model/packageableElements/dataProduct/V1_DataProduct.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/model/packageableElements/dataProduct/V1_DataProduct.js +67 -0
- package/lib/graph-manager/protocol/pure/v1/model/packageableElements/dataProduct/V1_DataProduct.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/model/packageableElements/service/V1_Service.d.ts +1 -0
- package/lib/graph-manager/protocol/pure/v1/model/packageableElements/service/V1_Service.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/model/packageableElements/service/V1_Service.js +2 -0
- package/lib/graph-manager/protocol/pure/v1/model/packageableElements/service/V1_Service.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_DataProductTransformer.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_DataProductTransformer.js +74 -2
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_DataProductTransformer.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_ServiceTransformer.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_ServiceTransformer.js +1 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_ServiceTransformer.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_ElementSecondPassBuilder.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_ElementSecondPassBuilder.js +5 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_ElementSecondPassBuilder.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_DataProductBuilder.d.ts +5 -2
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_DataProductBuilder.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_DataProductBuilder.js +93 -3
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_DataProductBuilder.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DataProductSerializationHelper.d.ts +10 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DataProductSerializationHelper.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DataProductSerializationHelper.js +53 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DataProductSerializationHelper.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_ServiceSerializationHelper.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_ServiceSerializationHelper.js +1 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_ServiceSerializationHelper.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/package.json +1 -1
- package/package.json +1 -1
- package/src/graph/Core_HashUtils.ts +5 -0
- package/src/graph/metamodel/pure/dataProduct/DataProduct.ts +89 -1
- package/src/graph/metamodel/pure/packageableElements/service/Service.ts +2 -0
- package/src/graph-manager/action/changeDetection/DSL_Service_ObserverHelper.ts +1 -0
- package/src/graph-manager/action/validation/DSL_Service_ValidationHelper.ts +19 -0
- package/src/graph-manager/protocol/pure/v1/lakehouse/deploy/V1_DataProductArtifact.ts +294 -0
- package/src/graph-manager/protocol/pure/v1/model/packageableElements/dataProduct/V1_DataProduct.ts +77 -0
- package/src/graph-manager/protocol/pure/v1/model/packageableElements/service/V1_Service.ts +2 -0
- package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_DataProductTransformer.ts +105 -0
- package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_ServiceTransformer.ts +1 -0
- package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_ElementSecondPassBuilder.ts +8 -0
- package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_DataProductBuilder.ts +161 -1
- package/src/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DataProductSerializationHelper.ts +92 -0
- package/src/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_ServiceSerializationHelper.ts +1 -0
- package/src/index.ts +8 -0
|
@@ -15,6 +15,9 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import {
|
|
18
|
+
deserializeMap,
|
|
19
|
+
optionalCustomList,
|
|
20
|
+
optionalCustomUsingModelSchema,
|
|
18
21
|
SerializationFactory,
|
|
19
22
|
UnsupportedOperationError,
|
|
20
23
|
usingConstantValueSchema,
|
|
@@ -26,9 +29,11 @@ import {
|
|
|
26
29
|
custom,
|
|
27
30
|
deserialize,
|
|
28
31
|
list,
|
|
32
|
+
object,
|
|
29
33
|
optional,
|
|
30
34
|
primitive,
|
|
31
35
|
serialize,
|
|
36
|
+
SKIP,
|
|
32
37
|
} from 'serializr';
|
|
33
38
|
import type { V1_GenericType } from '../../model/packageableElements/type/V1_GenericType.js';
|
|
34
39
|
import {
|
|
@@ -37,6 +42,10 @@ import {
|
|
|
37
42
|
} from '../../transformation/pureProtocol/serializationHelpers/V1_TypeSerializationHelper.js';
|
|
38
43
|
import type { V1_RelationElement } from '../../model/data/V1_EmbeddedData.js';
|
|
39
44
|
import { V1_relationElementModelSchema } from '../../transformation/pureProtocol/serializationHelpers/V1_DataElementSerializationHelper.js';
|
|
45
|
+
import { V1_pureModelContextDataPropSchema } from '../../transformation/pureProtocol/V1_PureProtocolSerialization.js';
|
|
46
|
+
import type { V1_PureModelContextData } from '../../model/context/V1_PureModelContextData.js';
|
|
47
|
+
import type { V1_Multiplicity } from '../../model/packageableElements/domain/V1_Multiplicity.js';
|
|
48
|
+
import { V1_multiplicityModelSchema } from '../../transformation/pureProtocol/serializationHelpers/V1_CoreSerializationHelper.js';
|
|
40
49
|
|
|
41
50
|
export enum V1_DataProductTypeEnum {
|
|
42
51
|
INTERNAL = 'internalDataProductType',
|
|
@@ -48,6 +57,11 @@ export enum V1_ResourceBuilderType {
|
|
|
48
57
|
FUNCTION_ACCESS_POINT = 'functionAccessPoint',
|
|
49
58
|
}
|
|
50
59
|
|
|
60
|
+
export enum V1_SampleQueryType {
|
|
61
|
+
IN_LINE_SAMPLE_QUERY = 'inLineSampleQuery',
|
|
62
|
+
PACKAGEABLE_ELEMENT_SAMPLE_QUERY = 'packageableElementSampleQuery',
|
|
63
|
+
}
|
|
64
|
+
|
|
51
65
|
export enum V1_DatabaseDDLImplementationType {
|
|
52
66
|
VIEW = 'VIEW',
|
|
53
67
|
TABLE = 'TABLE',
|
|
@@ -211,6 +225,282 @@ export class V1_AccessPointImplementation {
|
|
|
211
225
|
);
|
|
212
226
|
}
|
|
213
227
|
|
|
228
|
+
export class V1_DatasetSpecification {
|
|
229
|
+
name!: string;
|
|
230
|
+
type!: string;
|
|
231
|
+
|
|
232
|
+
static readonly serialization = new SerializationFactory(
|
|
233
|
+
createModelSchema(V1_DatasetSpecification, {
|
|
234
|
+
name: primitive(),
|
|
235
|
+
type: primitive(),
|
|
236
|
+
}),
|
|
237
|
+
);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
export class V1_RuntimeGenerationInfo {
|
|
241
|
+
path!: string;
|
|
242
|
+
storePath?: string;
|
|
243
|
+
connectionType?: string;
|
|
244
|
+
|
|
245
|
+
static readonly serialization = new SerializationFactory(
|
|
246
|
+
createModelSchema(V1_RuntimeGenerationInfo, {
|
|
247
|
+
path: primitive(),
|
|
248
|
+
storePath: optional(primitive()),
|
|
249
|
+
connectionType: optional(primitive()),
|
|
250
|
+
}),
|
|
251
|
+
);
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
export class V1_DiagramInfo {
|
|
255
|
+
title!: string;
|
|
256
|
+
description?: string;
|
|
257
|
+
diagram!: string;
|
|
258
|
+
|
|
259
|
+
static readonly serialization = new SerializationFactory(
|
|
260
|
+
createModelSchema(V1_DiagramInfo, {
|
|
261
|
+
title: primitive(),
|
|
262
|
+
description: optional(primitive()),
|
|
263
|
+
diagram: primitive(),
|
|
264
|
+
}),
|
|
265
|
+
);
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
export class V1_MappingGenerationInfo {
|
|
269
|
+
path!: string;
|
|
270
|
+
model!: V1_PureModelContextData;
|
|
271
|
+
|
|
272
|
+
static readonly serialization = new SerializationFactory(
|
|
273
|
+
createModelSchema(V1_MappingGenerationInfo, {
|
|
274
|
+
path: primitive(),
|
|
275
|
+
model: V1_pureModelContextDataPropSchema,
|
|
276
|
+
}),
|
|
277
|
+
);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
export class V1_NativeModelExecutionContextInfo {
|
|
281
|
+
key!: string;
|
|
282
|
+
mapping!: string;
|
|
283
|
+
runtime?: V1_RuntimeGenerationInfo | undefined;
|
|
284
|
+
datasets: V1_DatasetSpecification[] = [];
|
|
285
|
+
|
|
286
|
+
static readonly serialization = new SerializationFactory(
|
|
287
|
+
createModelSchema(V1_NativeModelExecutionContextInfo, {
|
|
288
|
+
key: primitive(),
|
|
289
|
+
mapping: primitive(),
|
|
290
|
+
runtime: optionalCustomUsingModelSchema(
|
|
291
|
+
V1_RuntimeGenerationInfo.serialization.schema,
|
|
292
|
+
),
|
|
293
|
+
datasets: list(
|
|
294
|
+
usingModelSchema(V1_DatasetSpecification.serialization.schema),
|
|
295
|
+
),
|
|
296
|
+
}),
|
|
297
|
+
);
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
export abstract class V1_SampleQueryInfo {
|
|
301
|
+
id!: string;
|
|
302
|
+
title!: string;
|
|
303
|
+
description?: string;
|
|
304
|
+
executionContextKey!: string;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
export class V1_InLineSampleQueryInfo extends V1_SampleQueryInfo {
|
|
308
|
+
queryGrammar!: string;
|
|
309
|
+
|
|
310
|
+
static readonly serialization = new SerializationFactory(
|
|
311
|
+
createModelSchema(V1_InLineSampleQueryInfo, {
|
|
312
|
+
_type: usingConstantValueSchema(V1_SampleQueryType.IN_LINE_SAMPLE_QUERY),
|
|
313
|
+
id: primitive(),
|
|
314
|
+
title: primitive(),
|
|
315
|
+
description: optional(primitive()),
|
|
316
|
+
queryGrammar: primitive(),
|
|
317
|
+
executionContextKey: primitive(),
|
|
318
|
+
}),
|
|
319
|
+
);
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
export class V1_PackageableElementSampleQueryInfo extends V1_SampleQueryInfo {
|
|
323
|
+
queryPath!: string;
|
|
324
|
+
|
|
325
|
+
static readonly serialization = new SerializationFactory(
|
|
326
|
+
createModelSchema(V1_PackageableElementSampleQueryInfo, {
|
|
327
|
+
_type: usingConstantValueSchema(
|
|
328
|
+
V1_SampleQueryType.PACKAGEABLE_ELEMENT_SAMPLE_QUERY,
|
|
329
|
+
),
|
|
330
|
+
id: primitive(),
|
|
331
|
+
title: primitive(),
|
|
332
|
+
description: optional(primitive()),
|
|
333
|
+
queryPath: primitive(),
|
|
334
|
+
executionContextKey: primitive(),
|
|
335
|
+
}),
|
|
336
|
+
);
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
const V1_deserializeSampleQuery = (
|
|
340
|
+
json: PlainObject<V1_SampleQueryInfo>,
|
|
341
|
+
): V1_SampleQueryInfo => {
|
|
342
|
+
switch (json._type) {
|
|
343
|
+
case V1_SampleQueryType.IN_LINE_SAMPLE_QUERY:
|
|
344
|
+
return deserialize(V1_InLineSampleQueryInfo.serialization.schema, json);
|
|
345
|
+
case V1_SampleQueryType.PACKAGEABLE_ELEMENT_SAMPLE_QUERY:
|
|
346
|
+
return deserialize(
|
|
347
|
+
V1_PackageableElementSampleQueryInfo.serialization.schema,
|
|
348
|
+
json,
|
|
349
|
+
);
|
|
350
|
+
default:
|
|
351
|
+
throw new UnsupportedOperationError(
|
|
352
|
+
`Can't deserialize data product sample query of type '${json._type}'`,
|
|
353
|
+
);
|
|
354
|
+
}
|
|
355
|
+
};
|
|
356
|
+
|
|
357
|
+
export class V1_NativeModelAccessInfo {
|
|
358
|
+
diagrams: V1_DiagramInfo[] = [];
|
|
359
|
+
model!: V1_PureModelContextData;
|
|
360
|
+
elements: string[] = [];
|
|
361
|
+
defaultExecutionContext!: string;
|
|
362
|
+
elementDocs: V1_ModelDocumentationEntry[] = [];
|
|
363
|
+
mappingGenerations!: Map<string, V1_MappingGenerationInfo>;
|
|
364
|
+
nativeModelExecutionContexts!: V1_NativeModelExecutionContextInfo[];
|
|
365
|
+
sampleQueries?: V1_SampleQueryInfo[] | undefined;
|
|
366
|
+
|
|
367
|
+
static readonly serialization = new SerializationFactory(
|
|
368
|
+
createModelSchema(V1_NativeModelAccessInfo, {
|
|
369
|
+
diagrams: list(usingModelSchema(V1_DiagramInfo.serialization.schema)),
|
|
370
|
+
model: V1_pureModelContextDataPropSchema,
|
|
371
|
+
elements: list(primitive()),
|
|
372
|
+
elementDocs: list(
|
|
373
|
+
custom(() => SKIP, V1_deserializeModelDocumentationEntry),
|
|
374
|
+
),
|
|
375
|
+
defaultExecutionContext: primitive(),
|
|
376
|
+
nativeModelExecutionContexts: list(
|
|
377
|
+
usingModelSchema(
|
|
378
|
+
V1_NativeModelExecutionContextInfo.serialization.schema,
|
|
379
|
+
),
|
|
380
|
+
),
|
|
381
|
+
sampleQueries: optionalCustomList(
|
|
382
|
+
() => SKIP as never,
|
|
383
|
+
(val: PlainObject<V1_SampleQueryInfo>) =>
|
|
384
|
+
V1_deserializeSampleQuery(val),
|
|
385
|
+
),
|
|
386
|
+
mappingGenerations: custom(
|
|
387
|
+
() => SKIP,
|
|
388
|
+
(val) =>
|
|
389
|
+
deserializeMap(val, (_val) =>
|
|
390
|
+
deserialize(V1_MappingGenerationInfo.serialization.schema, _val),
|
|
391
|
+
),
|
|
392
|
+
),
|
|
393
|
+
}),
|
|
394
|
+
);
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
export class V1_BasicDocumentationEntry {
|
|
398
|
+
name!: string;
|
|
399
|
+
docs: string[] = [];
|
|
400
|
+
|
|
401
|
+
static readonly serialization = new SerializationFactory(
|
|
402
|
+
createModelSchema(V1_BasicDocumentationEntry, {
|
|
403
|
+
docs: list(primitive()),
|
|
404
|
+
name: primitive(),
|
|
405
|
+
}),
|
|
406
|
+
);
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
export class V1_PropertyDocumentationEntry extends V1_BasicDocumentationEntry {
|
|
410
|
+
milestoning?: string | undefined;
|
|
411
|
+
type?: string | undefined;
|
|
412
|
+
multiplicity!: V1_Multiplicity;
|
|
413
|
+
|
|
414
|
+
static override readonly serialization = new SerializationFactory(
|
|
415
|
+
createModelSchema(V1_PropertyDocumentationEntry, {
|
|
416
|
+
docs: list(primitive()),
|
|
417
|
+
milestoning: optional(primitive()),
|
|
418
|
+
multiplicity: usingModelSchema(V1_multiplicityModelSchema),
|
|
419
|
+
name: primitive(),
|
|
420
|
+
type: optional(primitive()),
|
|
421
|
+
}),
|
|
422
|
+
);
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
export class V1_ModelDocumentationEntry extends V1_BasicDocumentationEntry {
|
|
426
|
+
path!: string;
|
|
427
|
+
|
|
428
|
+
static override readonly serialization = new SerializationFactory(
|
|
429
|
+
createModelSchema(V1_ModelDocumentationEntry, {
|
|
430
|
+
docs: list(primitive()),
|
|
431
|
+
name: primitive(),
|
|
432
|
+
path: primitive(),
|
|
433
|
+
}),
|
|
434
|
+
);
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
export class V1_ClassDocumentationEntry extends V1_ModelDocumentationEntry {
|
|
438
|
+
properties: V1_PropertyDocumentationEntry[] = [];
|
|
439
|
+
milestoning?: string | undefined;
|
|
440
|
+
|
|
441
|
+
static override readonly serialization = new SerializationFactory(
|
|
442
|
+
createModelSchema(V1_ClassDocumentationEntry, {
|
|
443
|
+
docs: list(primitive()),
|
|
444
|
+
milestoning: optional(primitive()),
|
|
445
|
+
name: primitive(),
|
|
446
|
+
path: primitive(),
|
|
447
|
+
properties: list(object(V1_PropertyDocumentationEntry)),
|
|
448
|
+
}),
|
|
449
|
+
);
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
export class V1_EnumerationDocumentationEntry extends V1_ModelDocumentationEntry {
|
|
453
|
+
enumValues: V1_BasicDocumentationEntry[] = [];
|
|
454
|
+
|
|
455
|
+
static override readonly serialization = new SerializationFactory(
|
|
456
|
+
createModelSchema(V1_EnumerationDocumentationEntry, {
|
|
457
|
+
enumValues: list(object(V1_BasicDocumentationEntry)),
|
|
458
|
+
docs: list(primitive()),
|
|
459
|
+
name: primitive(),
|
|
460
|
+
path: primitive(),
|
|
461
|
+
}),
|
|
462
|
+
);
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
export class V1_AssociationDocumentationEntry extends V1_ModelDocumentationEntry {
|
|
466
|
+
properties: V1_PropertyDocumentationEntry[] = [];
|
|
467
|
+
|
|
468
|
+
static override readonly serialization = new SerializationFactory(
|
|
469
|
+
createModelSchema(V1_AssociationDocumentationEntry, {
|
|
470
|
+
docs: list(primitive()),
|
|
471
|
+
name: primitive(),
|
|
472
|
+
path: primitive(),
|
|
473
|
+
properties: list(object(V1_PropertyDocumentationEntry)),
|
|
474
|
+
}),
|
|
475
|
+
);
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
enum V1_ModelDocumentationEntryType {
|
|
479
|
+
MODEL = 'model',
|
|
480
|
+
CLASS = 'class',
|
|
481
|
+
ENUMERATION = 'enumeration',
|
|
482
|
+
ASSOCIATION = 'association',
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
function V1_deserializeModelDocumentationEntry(
|
|
486
|
+
json: PlainObject<V1_ModelDocumentationEntry>,
|
|
487
|
+
): V1_ModelDocumentationEntry {
|
|
488
|
+
switch (json._type) {
|
|
489
|
+
case V1_ModelDocumentationEntryType.MODEL:
|
|
490
|
+
return V1_ModelDocumentationEntry.serialization.fromJson(json);
|
|
491
|
+
case V1_ModelDocumentationEntryType.CLASS:
|
|
492
|
+
return V1_ClassDocumentationEntry.serialization.fromJson(json);
|
|
493
|
+
case V1_ModelDocumentationEntryType.ENUMERATION:
|
|
494
|
+
return V1_EnumerationDocumentationEntry.serialization.fromJson(json);
|
|
495
|
+
case V1_ModelDocumentationEntryType.ASSOCIATION:
|
|
496
|
+
return V1_AssociationDocumentationEntry.serialization.fromJson(json);
|
|
497
|
+
default:
|
|
498
|
+
throw new UnsupportedOperationError(
|
|
499
|
+
`Can't deserialize model documentation entry of type '${json._type}'`,
|
|
500
|
+
);
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
|
|
214
504
|
export class V1_AccessPointGroupInfo {
|
|
215
505
|
id!: string;
|
|
216
506
|
description: string | undefined;
|
|
@@ -230,6 +520,7 @@ export class V1_AccessPointGroupInfo {
|
|
|
230
520
|
export class V1_DataProductArtifact {
|
|
231
521
|
dataProduct!: V1_DataProductInfo;
|
|
232
522
|
accessPointGroups: V1_AccessPointGroupInfo[] = [];
|
|
523
|
+
nativeModelAccess?: V1_NativeModelAccessInfo | undefined;
|
|
233
524
|
|
|
234
525
|
static readonly serialization = new SerializationFactory(
|
|
235
526
|
createModelSchema(V1_DataProductArtifact, {
|
|
@@ -237,6 +528,9 @@ export class V1_DataProductArtifact {
|
|
|
237
528
|
accessPointGroups: list(
|
|
238
529
|
usingModelSchema(V1_AccessPointGroupInfo.serialization.schema),
|
|
239
530
|
),
|
|
531
|
+
nativeModelAccess: optionalCustomUsingModelSchema(
|
|
532
|
+
V1_NativeModelAccessInfo.serialization.schema,
|
|
533
|
+
),
|
|
240
534
|
}),
|
|
241
535
|
);
|
|
242
536
|
}
|
package/src/graph-manager/protocol/pure/v1/model/packageableElements/dataProduct/V1_DataProduct.ts
CHANGED
|
@@ -220,6 +220,81 @@ export class V1_ModelAccessPointGroup extends V1_AccessPointGroup {
|
|
|
220
220
|
}
|
|
221
221
|
}
|
|
222
222
|
|
|
223
|
+
export class V1_NativeModelExecutionContext {
|
|
224
|
+
key!: string;
|
|
225
|
+
mapping!: V1_PackageableElementPointer;
|
|
226
|
+
runtime: V1_PackageableElementPointer | undefined;
|
|
227
|
+
|
|
228
|
+
get hashCode(): string {
|
|
229
|
+
return hashArray([
|
|
230
|
+
CORE_HASH_STRUCTURE.DATA_PRODUCT_NATIVE_MODEL_ACCESS,
|
|
231
|
+
this.mapping.path,
|
|
232
|
+
this.runtime?.path ?? '',
|
|
233
|
+
this.key,
|
|
234
|
+
]);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
export class V1_NativeModelAccess {
|
|
239
|
+
featuredElements: V1_ElementScope[] | undefined;
|
|
240
|
+
nativeModelExecutionContexts!: V1_NativeModelExecutionContext[];
|
|
241
|
+
defaultExecutionContext!: string;
|
|
242
|
+
diagrams: V1_DataProductDiagram[] | undefined;
|
|
243
|
+
sampleQueries: V1_SampleQuery[] | undefined;
|
|
244
|
+
|
|
245
|
+
get hashCode(): string {
|
|
246
|
+
return hashArray([
|
|
247
|
+
CORE_HASH_STRUCTURE.DATA_PRODUCT_NATIVE_MODEL_ACCESS,
|
|
248
|
+
hashArray(this.nativeModelExecutionContexts),
|
|
249
|
+
hashArray(this.featuredElements ?? []),
|
|
250
|
+
hashArray(this.diagrams ?? []),
|
|
251
|
+
hashArray(this.sampleQueries ?? []),
|
|
252
|
+
this.defaultExecutionContext,
|
|
253
|
+
]);
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
export abstract class V1_SampleQuery {
|
|
258
|
+
id!: string;
|
|
259
|
+
title!: string;
|
|
260
|
+
description: string | undefined;
|
|
261
|
+
executionContextKey: string | undefined;
|
|
262
|
+
|
|
263
|
+
get hashCode(): string {
|
|
264
|
+
return hashArray([
|
|
265
|
+
CORE_HASH_STRUCTURE.DATA_PRODUCT_SAMPLE_QUERY,
|
|
266
|
+
this.id,
|
|
267
|
+
this.title,
|
|
268
|
+
this.description ?? '',
|
|
269
|
+
this.executionContextKey ?? '',
|
|
270
|
+
]);
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
export class V1_InLineSampleQuery extends V1_SampleQuery {
|
|
275
|
+
query!: V1_RawLambda;
|
|
276
|
+
|
|
277
|
+
override get hashCode(): string {
|
|
278
|
+
return hashArray([
|
|
279
|
+
CORE_HASH_STRUCTURE.DATA_PRODUCT_INLINE_SAMPLE_QUERY,
|
|
280
|
+
super.hashCode,
|
|
281
|
+
this.query,
|
|
282
|
+
]);
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
export class V1_PackageableElementSampleQuery extends V1_SampleQuery {
|
|
287
|
+
query!: V1_PackageableElementPointer;
|
|
288
|
+
|
|
289
|
+
override get hashCode(): string {
|
|
290
|
+
return hashArray([
|
|
291
|
+
CORE_HASH_STRUCTURE.DATA_PRODUCT_PACKAGEABLE_ELEMENT_SAMPLE_QUERY,
|
|
292
|
+
super.hashCode,
|
|
293
|
+
this.query.path,
|
|
294
|
+
]);
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
|
|
223
298
|
export enum V1_DeliveryFrequency {
|
|
224
299
|
DAILY = 'DAILY',
|
|
225
300
|
WEEKLY = 'WEEKLY',
|
|
@@ -337,6 +412,7 @@ export class V1_DataProduct extends V1_PackageableElement implements Hashable {
|
|
|
337
412
|
description: string | undefined;
|
|
338
413
|
icon: V1_DataProductIcon | undefined;
|
|
339
414
|
accessPointGroups: V1_AccessPointGroup[] = [];
|
|
415
|
+
nativeModelAccess: V1_NativeModelAccess | undefined;
|
|
340
416
|
supportInfo: V1_SupportInfo | undefined;
|
|
341
417
|
type: V1_DataProductType | undefined;
|
|
342
418
|
stereotypes: V1_StereotypePtr[] = [];
|
|
@@ -351,6 +427,7 @@ export class V1_DataProduct extends V1_PackageableElement implements Hashable {
|
|
|
351
427
|
this.description ?? '',
|
|
352
428
|
this.icon ?? '',
|
|
353
429
|
hashArray(this.accessPointGroups),
|
|
430
|
+
this.nativeModelAccess ?? '',
|
|
354
431
|
this.supportInfo ?? '',
|
|
355
432
|
this.type ?? '',
|
|
356
433
|
hashArray(this.stereotypes),
|
|
@@ -35,6 +35,7 @@ export class V1_Service extends V1_PackageableElement implements Hashable {
|
|
|
35
35
|
owners: string[] = [];
|
|
36
36
|
ownership?: V1_ServiceOwnership | undefined;
|
|
37
37
|
documentation!: string;
|
|
38
|
+
mcpServer?: string | undefined;
|
|
38
39
|
autoActivateUpdates = true;
|
|
39
40
|
execution!: V1_ServiceExecution;
|
|
40
41
|
test?: V1_DEPRECATED__ServiceTest | undefined;
|
|
@@ -54,6 +55,7 @@ export class V1_Service extends V1_PackageableElement implements Hashable {
|
|
|
54
55
|
this.autoActivateUpdates.toString(),
|
|
55
56
|
this.execution,
|
|
56
57
|
this.test ?? '',
|
|
58
|
+
this.mcpServer ?? '',
|
|
57
59
|
hashArray(this.testSuites),
|
|
58
60
|
hashArray(this.postValidations),
|
|
59
61
|
hashArray(this.taggedValues),
|
|
@@ -28,6 +28,8 @@ import {
|
|
|
28
28
|
UnknownAccessPoint,
|
|
29
29
|
UnknownDataProductIcon,
|
|
30
30
|
FunctionAccessPoint,
|
|
31
|
+
PackageableElementSampleQuery,
|
|
32
|
+
InLineSampleQuery,
|
|
31
33
|
} from '../../../../../../../graph/metamodel/pure/dataProduct/DataProduct.js';
|
|
32
34
|
import {
|
|
33
35
|
type V1_AccessPoint,
|
|
@@ -51,6 +53,10 @@ import {
|
|
|
51
53
|
V1_FunctionAccessPoint,
|
|
52
54
|
type V1_Expertise,
|
|
53
55
|
V1_DataProductOperationalMetadata,
|
|
56
|
+
V1_NativeModelAccess,
|
|
57
|
+
V1_PackageableElementSampleQuery,
|
|
58
|
+
V1_InLineSampleQuery,
|
|
59
|
+
V1_NativeModelExecutionContext,
|
|
54
60
|
} from '../../../model/packageableElements/dataProduct/V1_DataProduct.js';
|
|
55
61
|
import { V1_initPackageableElement } from './V1_CoreTransformerHelper.js';
|
|
56
62
|
import { V1_transformRawLambda } from './V1_RawValueSpecificationTransformer.js';
|
|
@@ -61,6 +67,8 @@ import {
|
|
|
61
67
|
} from './V1_DomainTransformer.js';
|
|
62
68
|
import { V1_PackageableElementPointer } from '../../../model/packageableElements/V1_PackageableElement.js';
|
|
63
69
|
import { V1_transformEmbeddedData } from './V1_DataElementTransformer.js';
|
|
70
|
+
import { ConcreteFunctionDefinition } from '../../../../../../../graph/metamodel/pure/packageableElements/function/ConcreteFunctionDefinition.js';
|
|
71
|
+
import { generateFunctionPrettyName } from '../../../../../../../graph/helpers/PureLanguageHelper.js';
|
|
64
72
|
|
|
65
73
|
const transformAccessPoint = (
|
|
66
74
|
ap: AccessPoint,
|
|
@@ -137,6 +145,103 @@ export const V1_transformDataProduct = (
|
|
|
137
145
|
product.type = dataProductType;
|
|
138
146
|
}
|
|
139
147
|
|
|
148
|
+
if (element.nativeModelAccess) {
|
|
149
|
+
const nativeModelAccess = new V1_NativeModelAccess();
|
|
150
|
+
const metamodelNativeModelAccess = element.nativeModelAccess;
|
|
151
|
+
if (metamodelNativeModelAccess.diagrams.length === 0) {
|
|
152
|
+
nativeModelAccess.diagrams = undefined;
|
|
153
|
+
} else {
|
|
154
|
+
nativeModelAccess.diagrams = metamodelNativeModelAccess.diagrams.map(
|
|
155
|
+
(diagram) => {
|
|
156
|
+
const v1Diagram = new V1_DataProductDiagram();
|
|
157
|
+
v1Diagram.title = diagram.title;
|
|
158
|
+
v1Diagram.description = diagram.description;
|
|
159
|
+
v1Diagram.diagram = new V1_PackageableElementPointer(
|
|
160
|
+
undefined,
|
|
161
|
+
diagram.diagram.path,
|
|
162
|
+
);
|
|
163
|
+
return v1Diagram;
|
|
164
|
+
},
|
|
165
|
+
);
|
|
166
|
+
}
|
|
167
|
+
nativeModelAccess.defaultExecutionContext =
|
|
168
|
+
metamodelNativeModelAccess.defaultExecutionContext;
|
|
169
|
+
nativeModelAccess.nativeModelExecutionContexts =
|
|
170
|
+
metamodelNativeModelAccess.nativeModelExecutionContexts.map(
|
|
171
|
+
(executionContext) => {
|
|
172
|
+
const v1ExecutionContext = new V1_NativeModelExecutionContext();
|
|
173
|
+
v1ExecutionContext.key = executionContext.key;
|
|
174
|
+
v1ExecutionContext.mapping = new V1_PackageableElementPointer(
|
|
175
|
+
undefined,
|
|
176
|
+
executionContext.mapping.valueForSerialization ?? '',
|
|
177
|
+
);
|
|
178
|
+
if (executionContext.runtime) {
|
|
179
|
+
v1ExecutionContext.runtime = new V1_PackageableElementPointer(
|
|
180
|
+
undefined,
|
|
181
|
+
executionContext.runtime.valueForSerialization ?? '',
|
|
182
|
+
);
|
|
183
|
+
}
|
|
184
|
+
return v1ExecutionContext;
|
|
185
|
+
},
|
|
186
|
+
);
|
|
187
|
+
nativeModelAccess.featuredElements =
|
|
188
|
+
metamodelNativeModelAccess.featuredElements.map((metatamodelScope) => {
|
|
189
|
+
const scope = new V1_ElementScope();
|
|
190
|
+
scope.exclude = metatamodelScope.exclude;
|
|
191
|
+
scope.element = new V1_PackageableElementPointer(
|
|
192
|
+
undefined,
|
|
193
|
+
metatamodelScope.element.valueForSerialization ?? '',
|
|
194
|
+
);
|
|
195
|
+
return scope;
|
|
196
|
+
});
|
|
197
|
+
nativeModelAccess.sampleQueries =
|
|
198
|
+
metamodelNativeModelAccess.sampleQueries.map((metamodelSampleQuery) => {
|
|
199
|
+
if (metamodelSampleQuery instanceof PackageableElementSampleQuery) {
|
|
200
|
+
const sampleQuery = new V1_PackageableElementSampleQuery();
|
|
201
|
+
sampleQuery.id = metamodelSampleQuery.id;
|
|
202
|
+
sampleQuery.title = metamodelSampleQuery.title;
|
|
203
|
+
sampleQuery.description = metamodelSampleQuery.description;
|
|
204
|
+
sampleQuery.executionContextKey =
|
|
205
|
+
metamodelSampleQuery.executionContextKey;
|
|
206
|
+
if (
|
|
207
|
+
metamodelSampleQuery.query.value instanceof
|
|
208
|
+
ConcreteFunctionDefinition
|
|
209
|
+
) {
|
|
210
|
+
sampleQuery.query = new V1_PackageableElementPointer(
|
|
211
|
+
undefined,
|
|
212
|
+
generateFunctionPrettyName(metamodelSampleQuery.query.value, {
|
|
213
|
+
fullPath: true,
|
|
214
|
+
spacing: false,
|
|
215
|
+
notIncludeParamName: true,
|
|
216
|
+
}),
|
|
217
|
+
);
|
|
218
|
+
} else {
|
|
219
|
+
sampleQuery.query = new V1_PackageableElementPointer(
|
|
220
|
+
undefined,
|
|
221
|
+
metamodelSampleQuery.query.valueForSerialization ?? '',
|
|
222
|
+
);
|
|
223
|
+
}
|
|
224
|
+
return sampleQuery;
|
|
225
|
+
} else if (metamodelSampleQuery instanceof InLineSampleQuery) {
|
|
226
|
+
const sampleQuery = new V1_InLineSampleQuery();
|
|
227
|
+
sampleQuery.id = metamodelSampleQuery.id;
|
|
228
|
+
sampleQuery.title = metamodelSampleQuery.title;
|
|
229
|
+
sampleQuery.description = metamodelSampleQuery.description;
|
|
230
|
+
sampleQuery.executionContextKey =
|
|
231
|
+
metamodelSampleQuery.executionContextKey;
|
|
232
|
+
sampleQuery.query = V1_transformRawLambda(
|
|
233
|
+
metamodelSampleQuery.query,
|
|
234
|
+
context,
|
|
235
|
+
);
|
|
236
|
+
return sampleQuery;
|
|
237
|
+
}
|
|
238
|
+
throw new UnsupportedOperationError(
|
|
239
|
+
`Unable to transform data product sample query`,
|
|
240
|
+
);
|
|
241
|
+
});
|
|
242
|
+
product.nativeModelAccess = nativeModelAccess;
|
|
243
|
+
}
|
|
244
|
+
|
|
140
245
|
if (!element.icon) {
|
|
141
246
|
product.icon = undefined;
|
|
142
247
|
} else {
|
package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_ServiceTransformer.ts
CHANGED
|
@@ -332,6 +332,7 @@ export const V1_transformService = (
|
|
|
332
332
|
service.stereotypes = element.stereotypes.map(V1_transformStereotype);
|
|
333
333
|
service.taggedValues = element.taggedValues.map(V1_transformTaggedValue);
|
|
334
334
|
service.autoActivateUpdates = element.autoActivateUpdates;
|
|
335
|
+
service.mcpServer = element.mcpServer;
|
|
335
336
|
service.documentation = element.documentation;
|
|
336
337
|
service.execution = transformServiceExecution(element.execution, context);
|
|
337
338
|
if (element.ownership) {
|
|
@@ -143,6 +143,7 @@ import {
|
|
|
143
143
|
V1_buildDataProductIcon,
|
|
144
144
|
V1_buildDataProductLink,
|
|
145
145
|
V1_buildDataProductOperationalMetadata,
|
|
146
|
+
V1_buildNativeModelAccess,
|
|
146
147
|
} from './helpers/V1_DataProductBuilder.js';
|
|
147
148
|
import type { V1_IngestDefinition } from '../../../model/packageableElements/ingest/V1_IngestDefinition.js';
|
|
148
149
|
import { IncludeStore } from '../../../../../../../graph/metamodel/pure/packageableElements/store/relational/model/IncludeStore.js';
|
|
@@ -619,6 +620,7 @@ export class V1_ElementSecondPassBuilder
|
|
|
619
620
|
service.owners = element.owners.slice();
|
|
620
621
|
service.documentation = element.documentation;
|
|
621
622
|
service.autoActivateUpdates = element.autoActivateUpdates;
|
|
623
|
+
service.mcpServer = element.mcpServer;
|
|
622
624
|
if (element.ownership) {
|
|
623
625
|
service.ownership = V1_buildServiceOwnership(element.ownership, service);
|
|
624
626
|
}
|
|
@@ -751,6 +753,12 @@ export class V1_ElementSecondPassBuilder
|
|
|
751
753
|
dataProduct.accessPointGroups = element.accessPointGroups.map((gr) =>
|
|
752
754
|
V1_buildAccessPointGroup(gr, this.context),
|
|
753
755
|
);
|
|
756
|
+
if (element.nativeModelAccess) {
|
|
757
|
+
dataProduct.nativeModelAccess = V1_buildNativeModelAccess(
|
|
758
|
+
element.nativeModelAccess,
|
|
759
|
+
this.context,
|
|
760
|
+
);
|
|
761
|
+
}
|
|
754
762
|
const protocolSupportInfo = element.supportInfo;
|
|
755
763
|
if (protocolSupportInfo) {
|
|
756
764
|
const supportInfo = new SupportInfo();
|