@finos/legend-graph 32.3.10 → 32.3.12

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.
Files changed (47) hide show
  1. package/lib/graph/metamodel/pure/dataProduct/DataProduct.d.ts +2 -0
  2. package/lib/graph/metamodel/pure/dataProduct/DataProduct.d.ts.map +1 -1
  3. package/lib/graph/metamodel/pure/dataProduct/DataProduct.js +2 -0
  4. package/lib/graph/metamodel/pure/dataProduct/DataProduct.js.map +1 -1
  5. package/lib/graph-manager/protocol/pure/v1/lakehouse/deploy/V1_DataProductArtifact.d.ts +2 -0
  6. package/lib/graph-manager/protocol/pure/v1/lakehouse/deploy/V1_DataProductArtifact.d.ts.map +1 -1
  7. package/lib/graph-manager/protocol/pure/v1/lakehouse/deploy/V1_DataProductArtifact.js +4 -1
  8. package/lib/graph-manager/protocol/pure/v1/lakehouse/deploy/V1_DataProductArtifact.js.map +1 -1
  9. package/lib/graph-manager/protocol/pure/v1/lakehouse/entitlements/V1_ConsumerEntitlements.d.ts +3 -0
  10. package/lib/graph-manager/protocol/pure/v1/lakehouse/entitlements/V1_ConsumerEntitlements.d.ts.map +1 -1
  11. package/lib/graph-manager/protocol/pure/v1/lakehouse/entitlements/V1_ConsumerEntitlements.js +3 -0
  12. package/lib/graph-manager/protocol/pure/v1/lakehouse/entitlements/V1_ConsumerEntitlements.js.map +1 -1
  13. package/lib/graph-manager/protocol/pure/v1/model/packageableElements/dataProduct/V1_DataProduct.d.ts +2 -0
  14. package/lib/graph-manager/protocol/pure/v1/model/packageableElements/dataProduct/V1_DataProduct.d.ts.map +1 -1
  15. package/lib/graph-manager/protocol/pure/v1/model/packageableElements/dataProduct/V1_DataProduct.js +2 -0
  16. package/lib/graph-manager/protocol/pure/v1/model/packageableElements/dataProduct/V1_DataProduct.js.map +1 -1
  17. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_DataProductTransformer.d.ts.map +1 -1
  18. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_DataProductTransformer.js +2 -0
  19. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_DataProductTransformer.js.map +1 -1
  20. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_ElementSecondPassBuilder.d.ts.map +1 -1
  21. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_ElementSecondPassBuilder.js +1 -0
  22. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_ElementSecondPassBuilder.js.map +1 -1
  23. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/V1_PackageableElementSerialization.js +2 -2
  24. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/V1_PackageableElementSerialization.js.map +1 -1
  25. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DataProductSerializationHelper.d.ts +18 -16
  26. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DataProductSerializationHelper.d.ts.map +1 -1
  27. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DataProductSerializationHelper.js +3 -1
  28. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DataProductSerializationHelper.js.map +1 -1
  29. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_EntitlementSerializationHelper.d.ts.map +1 -1
  30. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_EntitlementSerializationHelper.js +3 -0
  31. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_EntitlementSerializationHelper.js.map +1 -1
  32. package/lib/index.d.ts +2 -2
  33. package/lib/index.d.ts.map +1 -1
  34. package/lib/index.js +2 -2
  35. package/lib/index.js.map +1 -1
  36. package/lib/package.json +1 -1
  37. package/package.json +1 -1
  38. package/src/graph/metamodel/pure/dataProduct/DataProduct.ts +3 -0
  39. package/src/graph-manager/protocol/pure/v1/lakehouse/deploy/V1_DataProductArtifact.ts +10 -0
  40. package/src/graph-manager/protocol/pure/v1/lakehouse/entitlements/V1_ConsumerEntitlements.ts +3 -0
  41. package/src/graph-manager/protocol/pure/v1/model/packageableElements/dataProduct/V1_DataProduct.ts +3 -0
  42. package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_DataProductTransformer.ts +4 -0
  43. package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_ElementSecondPassBuilder.ts +3 -0
  44. package/src/graph-manager/protocol/pure/v1/transformation/pureProtocol/V1_PackageableElementSerialization.ts +2 -2
  45. package/src/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DataProductSerializationHelper.ts +46 -32
  46. package/src/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_EntitlementSerializationHelper.ts +3 -0
  47. package/src/index.ts +2 -0
@@ -60,6 +60,7 @@ import {
60
60
  V1_transformTaggedValue,
61
61
  } from './V1_DomainTransformer.js';
62
62
  import { V1_PackageableElementPointer } from '../../../model/packageableElements/V1_PackageableElement.js';
63
+ import { V1_transformEmbeddedData } from './V1_DataElementTransformer.js';
63
64
 
64
65
  const transformAccessPoint = (
65
66
  ap: AccessPoint,
@@ -131,6 +132,9 @@ export const V1_transformDataProduct = (
131
132
  product.coverageRegions = element.coverageRegions as
132
133
  | V1_DataProductRegion[]
133
134
  | undefined;
135
+ product.sampleValues = element.sampleValues?.map((data) =>
136
+ V1_transformEmbeddedData(data, context),
137
+ );
134
138
  product.expertise = element.expertise as V1_Expertise[] | undefined;
135
139
  if (element.type instanceof InternalDataProductType) {
136
140
  product.type = new V1_InternalDataProductType();
@@ -780,6 +780,9 @@ export class V1_ElementSecondPassBuilder
780
780
  dataProductType.link = element.type.link;
781
781
  dataProduct.type = dataProductType;
782
782
  }
783
+ dataProduct.sampleValues = element.sampleValues?.map((data) =>
784
+ V1_buildEmbeddedData(data, this.context),
785
+ );
783
786
  if (element.expertise) {
784
787
  dataProduct.expertise = element.expertise.map((expertise) =>
785
788
  V1_buildDataProductExpertise(expertise),
@@ -257,7 +257,7 @@ class V1_PackageableElementSerializer
257
257
  visit_DataProduct(
258
258
  element: V1_DataProduct,
259
259
  ): PlainObject<V1_PackageableElement> {
260
- return serialize(V1_dataProductModelSchema, element);
260
+ return serialize(V1_dataProductModelSchema(this.plugins), element);
261
261
  }
262
262
 
263
263
  visit_Mapping(element: V1_Mapping): PlainObject<V1_PackageableElement> {
@@ -394,7 +394,7 @@ export const V1_deserializePackageableElement = (
394
394
  case V1_MEM_SQL_TYPE:
395
395
  return deserialize(V1_MemSQLModelSchema(plugins), json);
396
396
  case V1_DATA_PRODUCT_ELEMENT_PROTOCOL_TYPE:
397
- return deserialize(V1_dataProductModelSchema, json);
397
+ return deserialize(V1_dataProductModelSchema(plugins), json);
398
398
  case V1_INGEST_DEFINITION_TYPE:
399
399
  return V1_createIngestDef(name, packagePath, json);
400
400
  default: {
@@ -21,6 +21,7 @@ import {
21
21
  optional,
22
22
  primitive,
23
23
  serialize,
24
+ type ModelSchema,
24
25
  } from 'serializr';
25
26
  import {
26
27
  type V1_AccessPoint,
@@ -66,6 +67,12 @@ import {
66
67
  V1_taggedValueModelSchema,
67
68
  } from './V1_CoreSerializationHelper.js';
68
69
  import { V1_MappingIncludeDataProduct } from '../../../model/packageableElements/dataProduct/V1_MappingIncludeDataProduct.js';
70
+ import {
71
+ V1_deserializeEmbeddedDataType,
72
+ V1_serializeEmbeddedDataType,
73
+ } from './V1_DataElementSerializationHelper.js';
74
+ import type { PureProtocolProcessorPlugin } from '../../../../PureProtocolProcessorPlugin.js';
75
+ import type { V1_EmbeddedData } from '../../../model/data/V1_EmbeddedData.js';
69
76
 
70
77
  export enum V1_AccessPointType {
71
78
  LAKEHOUSE = 'lakehouseAccessPoint',
@@ -341,38 +348,45 @@ export const V1_serializeDataProductType = (
341
348
  throw new Error(`Unknown V1_DataProductType instance: ${value}`);
342
349
  };
343
350
 
344
- export const V1_dataProductModelSchema = createModelSchema(V1_DataProduct, {
345
- _type: usingConstantValueSchema(V1_DATA_PRODUCT_ELEMENT_PROTOCOL_TYPE),
346
- accessPointGroups: customList(
347
- V1_serializeAccessPointGroup,
348
- V1_deserializeAccessPointGroup,
349
- ),
350
- coverageRegions: optionalCustomList(
351
- (json) => (json as string).toLowerCase(),
352
- (json) => (json as unknown as string).toUpperCase(),
353
- ),
354
-
355
- deliveryFrequency: optionalCustom(
356
- (json) => (json as string).toLowerCase(),
357
- (json) => (json as string).toUpperCase(),
358
- ),
359
- description: optional(primitive()),
360
- expertise: optionalCustomListWithSchema(V1_ExpertiseModelSchema),
361
- icon: optionalCustom(
362
- V1_serializeDataProductIcon,
363
- V1_deserializeDataProductIcon,
364
- ),
365
- name: primitive(),
366
- package: primitive(),
367
- type: optionalCustom(
368
- V1_serializeDataProductType,
369
- V1_deserializeDataProductType,
370
- ),
371
- stereotypes: customListWithSchema(V1_stereotypePtrModelSchema),
372
- supportInfo: optionalCustomUsingModelSchema(V1_SupportInfoModelSchema),
373
- taggedValues: customListWithSchema(V1_taggedValueModelSchema),
374
- title: optional(primitive()),
375
- });
351
+ export const V1_dataProductModelSchema = (
352
+ plugins: PureProtocolProcessorPlugin[],
353
+ ): ModelSchema<V1_DataProduct> =>
354
+ createModelSchema(V1_DataProduct, {
355
+ _type: usingConstantValueSchema(V1_DATA_PRODUCT_ELEMENT_PROTOCOL_TYPE),
356
+ accessPointGroups: customList(
357
+ V1_serializeAccessPointGroup,
358
+ V1_deserializeAccessPointGroup,
359
+ ),
360
+ coverageRegions: optionalCustomList(
361
+ (json) => (json as string).toLowerCase(),
362
+ (json) => (json as unknown as string).toUpperCase(),
363
+ ),
364
+
365
+ deliveryFrequency: optionalCustom(
366
+ (json) => (json as string).toLowerCase(),
367
+ (json) => (json as string).toUpperCase(),
368
+ ),
369
+ description: optional(primitive()),
370
+ sampleValues: optionalCustomList(
371
+ (data: V1_EmbeddedData) => V1_serializeEmbeddedDataType(data, plugins),
372
+ (data) => V1_deserializeEmbeddedDataType(data, plugins),
373
+ ),
374
+ expertise: optionalCustomListWithSchema(V1_ExpertiseModelSchema),
375
+ icon: optionalCustom(
376
+ V1_serializeDataProductIcon,
377
+ V1_deserializeDataProductIcon,
378
+ ),
379
+ name: primitive(),
380
+ package: primitive(),
381
+ type: optionalCustom(
382
+ V1_serializeDataProductType,
383
+ V1_deserializeDataProductType,
384
+ ),
385
+ stereotypes: customListWithSchema(V1_stereotypePtrModelSchema),
386
+ supportInfo: optionalCustomUsingModelSchema(V1_SupportInfoModelSchema),
387
+ taggedValues: customListWithSchema(V1_taggedValueModelSchema),
388
+ title: optional(primitive()),
389
+ });
376
390
 
377
391
  export const V1_MAPPING_INCLUDE_DATAPRODUCT_TYPE = 'mappingIncludeDataProduct';
378
392
 
@@ -366,6 +366,9 @@ export const V1_contractUserEventRecordModelSchema = createModelSchema(
366
366
  V1_deserializeContractUserEventPayload,
367
367
  ),
368
368
  type: primitive(),
369
+ effectiveFrom: primitive(),
370
+ effectiveTo: primitive(),
371
+ isEscalated: primitive(),
369
372
  },
370
373
  );
371
374
  export const V1_taskMetadataModelSchema = createModelSchema(V1_TaskMetadata, {
package/src/index.ts CHANGED
@@ -777,6 +777,7 @@ export {
777
777
  } from './graph/metamodel/pure/data/EmbeddedData.js';
778
778
  export {
779
779
  V1_EmbeddedData,
780
+ V1_RelationElement,
780
781
  V1_DataElementReference,
781
782
  V1_ExternalFormatData,
782
783
  type V1_EmbeddedDataVisitor,
@@ -794,6 +795,7 @@ export {
794
795
  observe_DataElementReference,
795
796
  observe_RelationElement,
796
797
  observe_RelationRowTestData,
798
+ observe_RelationElementsData,
797
799
  } from './graph-manager/action/changeDetection/DSL_Data_ObserverHelper.js';
798
800
  export { V1_transformExternalFormatData } from './graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_DataElementTransformer.js';
799
801
  export { V1_externalFormatDataModelSchema } from './graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DataElementSerializationHelper.js';