@finos/legend-graph 32.1.47 → 32.1.49

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 (59) hide show
  1. package/lib/graph/Core_HashUtils.d.ts +2 -0
  2. package/lib/graph/Core_HashUtils.d.ts.map +1 -1
  3. package/lib/graph/Core_HashUtils.js +2 -0
  4. package/lib/graph/Core_HashUtils.js.map +1 -1
  5. package/lib/graph/metamodel/pure/dataProduct/DataProduct.d.ts +15 -0
  6. package/lib/graph/metamodel/pure/dataProduct/DataProduct.d.ts.map +1 -1
  7. package/lib/graph/metamodel/pure/dataProduct/DataProduct.js +30 -0
  8. package/lib/graph/metamodel/pure/dataProduct/DataProduct.js.map +1 -1
  9. package/lib/graph-manager/action/EngineError.d.ts +1 -0
  10. package/lib/graph-manager/action/EngineError.d.ts.map +1 -1
  11. package/lib/graph-manager/action/EngineError.js +1 -0
  12. package/lib/graph-manager/action/EngineError.js.map +1 -1
  13. package/lib/graph-manager/action/changeDetection/DataProductObserveHelper.d.ts +3 -1
  14. package/lib/graph-manager/action/changeDetection/DataProductObserveHelper.d.ts.map +1 -1
  15. package/lib/graph-manager/action/changeDetection/DataProductObserveHelper.js +22 -0
  16. package/lib/graph-manager/action/changeDetection/DataProductObserveHelper.js.map +1 -1
  17. package/lib/graph-manager/protocol/pure/v1/engine/V1_EngineError.d.ts +1 -0
  18. package/lib/graph-manager/protocol/pure/v1/engine/V1_EngineError.d.ts.map +1 -1
  19. package/lib/graph-manager/protocol/pure/v1/engine/V1_EngineError.js +2 -0
  20. package/lib/graph-manager/protocol/pure/v1/engine/V1_EngineError.js.map +1 -1
  21. package/lib/graph-manager/protocol/pure/v1/engine/V1_EngineHelper.d.ts.map +1 -1
  22. package/lib/graph-manager/protocol/pure/v1/engine/V1_EngineHelper.js +2 -0
  23. package/lib/graph-manager/protocol/pure/v1/engine/V1_EngineHelper.js.map +1 -1
  24. package/lib/graph-manager/protocol/pure/v1/lakehouse/ingest/V1_LakehouseIngestEnvironment.d.ts +8 -2
  25. package/lib/graph-manager/protocol/pure/v1/lakehouse/ingest/V1_LakehouseIngestEnvironment.d.ts.map +1 -1
  26. package/lib/graph-manager/protocol/pure/v1/lakehouse/ingest/V1_LakehouseIngestEnvironment.js +8 -2
  27. package/lib/graph-manager/protocol/pure/v1/lakehouse/ingest/V1_LakehouseIngestEnvironment.js.map +1 -1
  28. package/lib/graph-manager/protocol/pure/v1/model/packageableElements/dataProduct/V1_DataProduct.d.ts +14 -0
  29. package/lib/graph-manager/protocol/pure/v1/model/packageableElements/dataProduct/V1_DataProduct.d.ts.map +1 -1
  30. package/lib/graph-manager/protocol/pure/v1/model/packageableElements/dataProduct/V1_DataProduct.js +26 -0
  31. package/lib/graph-manager/protocol/pure/v1/model/packageableElements/dataProduct/V1_DataProduct.js.map +1 -1
  32. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_DataProductTransformer.d.ts.map +1 -1
  33. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_DataProductTransformer.js +18 -1
  34. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_DataProductTransformer.js.map +1 -1
  35. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_ElementSecondPassBuilder.d.ts.map +1 -1
  36. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_ElementSecondPassBuilder.js +16 -1
  37. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_ElementSecondPassBuilder.js.map +1 -1
  38. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DataProductSerializationHelper.d.ts +3 -1
  39. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DataProductSerializationHelper.d.ts.map +1 -1
  40. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DataProductSerializationHelper.js +14 -2
  41. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DataProductSerializationHelper.js.map +1 -1
  42. package/lib/index.d.ts +2 -2
  43. package/lib/index.d.ts.map +1 -1
  44. package/lib/index.js +2 -2
  45. package/lib/index.js.map +1 -1
  46. package/lib/package.json +1 -1
  47. package/package.json +3 -3
  48. package/src/graph/Core_HashUtils.ts +2 -0
  49. package/src/graph/metamodel/pure/dataProduct/DataProduct.ts +35 -0
  50. package/src/graph-manager/action/EngineError.ts +1 -0
  51. package/src/graph-manager/action/changeDetection/DataProductObserveHelper.ts +28 -0
  52. package/src/graph-manager/protocol/pure/v1/engine/V1_EngineError.ts +2 -0
  53. package/src/graph-manager/protocol/pure/v1/engine/V1_EngineHelper.ts +2 -0
  54. package/src/graph-manager/protocol/pure/v1/lakehouse/ingest/V1_LakehouseIngestEnvironment.ts +12 -3
  55. package/src/graph-manager/protocol/pure/v1/model/packageableElements/dataProduct/V1_DataProduct.ts +30 -0
  56. package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_DataProductTransformer.ts +18 -0
  57. package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_ElementSecondPassBuilder.ts +19 -1
  58. package/src/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DataProductSerializationHelper.ts +17 -0
  59. package/src/index.ts +4 -0
@@ -20,6 +20,7 @@ import { makeObservable, observable } from 'mobx';
20
20
 
21
21
  export class EngineError extends ApplicationError {
22
22
  sourceInformation?: SourceInformation | undefined;
23
+ trace?: string | undefined;
23
24
  }
24
25
 
25
26
  export class ParserError extends EngineError {}
@@ -17,6 +17,8 @@
17
17
  import { makeObservable, observable, override } from 'mobx';
18
18
  import {
19
19
  LakehouseAccessPoint,
20
+ type Email,
21
+ type SupportInfo,
20
22
  type AccessPoint,
21
23
  type AccessPointGroup,
22
24
  type DataProduct,
@@ -41,6 +43,28 @@ export const observe_AccessPoint = skipObserved(
41
43
  },
42
44
  );
43
45
 
46
+ export const observe_Email = skipObserved((metamodel: Email): Email => {
47
+ makeObservable(metamodel, {
48
+ title: observable,
49
+ address: observable,
50
+ });
51
+ return metamodel;
52
+ });
53
+
54
+ export const observe_SupportInfo = skipObserved(
55
+ (metamodel: SupportInfo): SupportInfo => {
56
+ makeObservable(metamodel, {
57
+ documentationUrl: observable,
58
+ website: observable,
59
+ faqUrl: observable,
60
+ supportUrl: observable,
61
+ emails: observable,
62
+ });
63
+ metamodel.emails.forEach(observe_Email);
64
+ return metamodel;
65
+ },
66
+ );
67
+
44
68
  export const observe_AccessPointGroup = skipObserved(
45
69
  (metamodel: AccessPointGroup): AccessPointGroup => {
46
70
  makeObservable(metamodel, {
@@ -62,8 +86,12 @@ export const observe_DataProduct = skipObserved(
62
86
  _elementHashCode: override,
63
87
  title: observable,
64
88
  description: observable,
89
+ supportInfo: observable,
65
90
  });
66
91
 
92
+ if (metamodel.supportInfo) {
93
+ observe_SupportInfo(metamodel.supportInfo);
94
+ }
67
95
  metamodel.accessPointGroups.forEach(observe_AccessPointGroup);
68
96
  return metamodel;
69
97
  },
@@ -28,6 +28,7 @@ export class V1_EngineError {
28
28
  message = '';
29
29
  errorType?: V1_EngineErrorType | undefined;
30
30
  sourceInformation?: V1_SourceInformation | undefined;
31
+ trace?: string | undefined;
31
32
 
32
33
  static readonly serialization = new SerializationFactory(
33
34
  createModelSchema(V1_EngineError, {
@@ -36,6 +37,7 @@ export class V1_EngineError {
36
37
  sourceInformation: usingModelSchema(
37
38
  V1_sourceInformationSerialization.schema,
38
39
  ),
40
+ trace: optional(primitive()),
39
41
  }),
40
42
  );
41
43
  }
@@ -599,6 +599,7 @@ export const V1_buildCompilationError = (
599
599
  metamodel.sourceInformation = protocol.sourceInformation
600
600
  ? V1_buildSourceInformation(protocol.sourceInformation)
601
601
  : undefined;
602
+ metamodel.trace = protocol.trace;
602
603
  return metamodel;
603
604
  };
604
605
 
@@ -607,6 +608,7 @@ export const V1_buildParserError = (protocol: V1_ParserError): ParserError => {
607
608
  metamodel.sourceInformation = protocol.sourceInformation
608
609
  ? V1_buildSourceInformation(protocol.sourceInformation)
609
610
  : undefined;
611
+ metamodel.trace = protocol.trace;
610
612
  return metamodel;
611
613
  };
612
614
 
@@ -26,20 +26,29 @@ export enum V1_IngestEnvironmentClassification {
26
26
  DEV = 'dev',
27
27
  }
28
28
 
29
- export abstract class V1_IngestEnvironment {}
30
-
31
- export class V1_AWSSnowflakeIngestEnvironment extends V1_IngestEnvironment {
29
+ export abstract class V1_IngestEnvironment {
32
30
  urn!: string;
33
31
  version!: string;
34
32
  environmentClassification!: V1_IngestEnvironmentClassification;
33
+ cftServiceAccountDeploymentId!: number;
35
34
  producers: AppDirNode[] = [];
35
+ }
36
+
37
+ export abstract class V1_AWSIngestEnvironment extends V1_IngestEnvironment {
36
38
  awsRegion!: string;
37
39
  awsAccountId!: string;
38
40
  ingestStepFunctionsAvtivityArn!: string;
39
41
  ingestStateMachineArn!: string;
40
42
  ingestSystemAccount!: string;
43
+ }
44
+
45
+ export class V1_AWSSnowflakeIngestEnvironment extends V1_AWSIngestEnvironment {
41
46
  snowflakeAccount!: string;
42
47
  snowflakeHost!: string;
43
48
  s3StagingBucketName!: string;
44
49
  storageIntegrationName!: string;
45
50
  }
51
+
52
+ export class V1_GCPIngestEnvironment extends V1_IngestEnvironment {
53
+ gcsStagingBucketName!: string;
54
+ }
@@ -90,12 +90,41 @@ export class V1_AccessPointGroup implements Hashable {
90
90
  }
91
91
  }
92
92
 
93
+ export class V1_Email implements Hashable {
94
+ title!: string;
95
+ address!: string;
96
+
97
+ get hashCode(): string {
98
+ return hashArray([CORE_HASH_STRUCTURE.EMAIL, this.title, this.address]);
99
+ }
100
+ }
101
+
102
+ export class V1_SupportInfo implements Hashable {
103
+ documentationUrl: string | undefined;
104
+ website: string | undefined;
105
+ faqUrl: string | undefined;
106
+ supportUrl: string | undefined;
107
+ emails: V1_Email[] = [];
108
+
109
+ get hashCode(): string {
110
+ return hashArray([
111
+ CORE_HASH_STRUCTURE.SUPPORT_INFO,
112
+ this.documentationUrl ?? '',
113
+ this.website ?? '',
114
+ this.faqUrl ?? '',
115
+ this.supportUrl ?? '',
116
+ hashArray(this.emails),
117
+ ]);
118
+ }
119
+ }
120
+
93
121
  export class V1_DataProduct extends V1_PackageableElement implements Hashable {
94
122
  title: string | undefined;
95
123
  description: string | undefined;
96
124
  accessPointGroups: V1_AccessPointGroup[] = [];
97
125
  icon: string | undefined;
98
126
  imageUrl: string | undefined;
127
+ supportInfo: V1_SupportInfo | undefined;
99
128
 
100
129
  override get hashCode(): string {
101
130
  return hashArray([
@@ -105,6 +134,7 @@ export class V1_DataProduct extends V1_PackageableElement implements Hashable {
105
134
  this.description ?? '',
106
135
  this.icon ?? '',
107
136
  this.imageUrl ?? '',
137
+ this.supportInfo ?? '',
108
138
  ]);
109
139
  }
110
140
 
@@ -25,7 +25,9 @@ import {
25
25
  type V1_AccessPoint,
26
26
  V1_AccessPointGroup,
27
27
  V1_DataProduct,
28
+ V1_Email,
28
29
  V1_LakehouseAccessPoint,
30
+ V1_SupportInfo,
29
31
  V1_UnknownAccessPoint,
30
32
  } from '../../../model/packageableElements/dataProduct/V1_DataProduct.js';
31
33
  import { V1_initPackageableElement } from './V1_CoreTransformerHelper.js';
@@ -61,6 +63,22 @@ export const V1_transformDataProduct = (
61
63
  V1_initPackageableElement(product, element);
62
64
  product.description = element.description;
63
65
  product.title = element.title;
66
+ if (!element.supportInfo) {
67
+ product.supportInfo = undefined;
68
+ } else {
69
+ const supportInfo = new V1_SupportInfo();
70
+ supportInfo.documentationUrl = element.supportInfo.documentationUrl;
71
+ supportInfo.website = element.supportInfo.website;
72
+ supportInfo.faqUrl = element.supportInfo.faqUrl;
73
+ supportInfo.supportUrl = element.supportInfo.supportUrl;
74
+ supportInfo.emails = element.supportInfo.emails.map((metamodelEmail) => {
75
+ const email = new V1_Email();
76
+ email.title = metamodelEmail.title;
77
+ email.address = metamodelEmail.address;
78
+ return email;
79
+ });
80
+ product.supportInfo = supportInfo;
81
+ }
64
82
  product.accessPointGroups = element.accessPointGroups.map(
65
83
  (metamodelGroup) => {
66
84
  const group = new V1_AccessPointGroup();
@@ -118,7 +118,11 @@ import {
118
118
  import type { V1_INTERNAL__UnknownElement } from '../../../model/packageableElements/V1_INTERNAL__UnknownElement.js';
119
119
  import type { V1_HostedService } from '../../../model/packageableElements/function/V1_HostedService.js';
120
120
  import { type V1_DataProduct } from '../../../model/packageableElements/dataProduct/V1_DataProduct.js';
121
- import { AccessPointGroup } from '../../../../../../../graph/metamodel/pure/dataProduct/DataProduct.js';
121
+ import {
122
+ AccessPointGroup,
123
+ Email,
124
+ SupportInfo,
125
+ } from '../../../../../../../graph/metamodel/pure/dataProduct/DataProduct.js';
122
126
  import { V1_buildAccessPoint } from './helpers/V1_DataProductBuilder.js';
123
127
  import type { V1_IngestDefinition } from '../../../model/packageableElements/ingest/V1_IngestDefinition.js';
124
128
 
@@ -700,5 +704,19 @@ export class V1_ElementSecondPassBuilder
700
704
  return group;
701
705
  },
702
706
  );
707
+ if (!element.supportInfo) {
708
+ dataProduct.supportInfo = undefined;
709
+ } else {
710
+ const supportInfo = new SupportInfo();
711
+ supportInfo.documentationUrl = element.supportInfo.documentationUrl;
712
+ supportInfo.website = element.supportInfo.website;
713
+ supportInfo.faqUrl = element.supportInfo.faqUrl;
714
+ supportInfo.supportUrl = element.supportInfo.supportUrl;
715
+ supportInfo.emails = element.supportInfo.emails.map((elementEmail) => {
716
+ const email = new Email(elementEmail.address, elementEmail.title);
717
+ return email;
718
+ });
719
+ dataProduct.supportInfo = supportInfo;
720
+ }
703
721
  }
704
722
  }
@@ -27,6 +27,8 @@ import {
27
27
  V1_AccessPointGroup,
28
28
  V1_DATA_PRODUCT_ELEMENT_PROTOCOL_TYPE,
29
29
  V1_DataProduct,
30
+ V1_Email,
31
+ V1_SupportInfo,
30
32
  V1_LakehouseAccessPoint,
31
33
  V1_UnknownAccessPoint,
32
34
  } from '../../../model/packageableElements/dataProduct/V1_DataProduct.js';
@@ -37,6 +39,7 @@ import {
37
39
  customList,
38
40
  type PlainObject,
39
41
  customListWithSchema,
42
+ optionalCustomUsingModelSchema,
40
43
  } from '@finos/legend-shared';
41
44
  import { V1_rawLambdaModelSchema } from './V1_RawValueSpecificationSerializationHelper.js';
42
45
 
@@ -98,6 +101,19 @@ export const V1_AccessPointGroupModelSchema = createModelSchema(
98
101
  },
99
102
  );
100
103
 
104
+ export const V1_EmailModelSchema = createModelSchema(V1_Email, {
105
+ title: primitive(),
106
+ address: primitive(),
107
+ });
108
+
109
+ export const V1_SupportInfoModelSchema = createModelSchema(V1_SupportInfo, {
110
+ documentationUrl: optional(primitive()),
111
+ website: optional(primitive()),
112
+ faqUrl: optional(primitive()),
113
+ supportUrl: optional(primitive()),
114
+ emails: customListWithSchema(V1_EmailModelSchema),
115
+ });
116
+
101
117
  export const V1_dataProductModelSchema = createModelSchema(V1_DataProduct, {
102
118
  _type: usingConstantValueSchema(V1_DATA_PRODUCT_ELEMENT_PROTOCOL_TYPE),
103
119
  name: primitive(),
@@ -127,4 +143,5 @@ export const V1_dataProductModelSchema = createModelSchema(V1_DataProduct, {
127
143
  },
128
144
  ),
129
145
  imageUrl: optional(primitive()),
146
+ supportInfo: optionalCustomUsingModelSchema(V1_SupportInfoModelSchema),
130
147
  });
package/src/index.ts CHANGED
@@ -179,6 +179,8 @@ export { V1_ExternalFormatModelGenerationInput } from './graph-manager/protocol/
179
179
  export { V1_GenerateSchemaInput } from './graph-manager/protocol/pure/v1/engine/externalFormat/V1_GenerateSchemaInput.js';
180
180
  export {
181
181
  V1_DataProduct,
182
+ V1_SupportInfo,
183
+ V1_Email,
182
184
  V1_LakehouseAccessPoint,
183
185
  V1_AccessPoint,
184
186
  V1_AccessPointGroup,
@@ -660,6 +662,8 @@ export * from './graph-manager/action/changeDetection/DSL_FunctionActivatorObser
660
662
 
661
663
  export {
662
664
  DataProduct,
665
+ SupportInfo,
666
+ Email,
663
667
  LakehouseAccessPoint,
664
668
  LakehouseTargetEnv,
665
669
  AccessPointGroup,