@finos/legend-graph 32.5.2 → 32.6.0

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 (94) 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 +10 -0
  6. package/lib/graph/metamodel/pure/dataProduct/DataProduct.d.ts.map +1 -1
  7. package/lib/graph/metamodel/pure/dataProduct/DataProduct.js +16 -0
  8. package/lib/graph/metamodel/pure/dataProduct/DataProduct.js.map +1 -1
  9. package/lib/graph/metamodel/pure/packageableElements/ingest/IngestDefinition.d.ts +11 -2
  10. package/lib/graph/metamodel/pure/packageableElements/ingest/IngestDefinition.d.ts.map +1 -1
  11. package/lib/graph/metamodel/pure/packageableElements/ingest/IngestDefinition.js +17 -0
  12. package/lib/graph/metamodel/pure/packageableElements/ingest/IngestDefinition.js.map +1 -1
  13. package/lib/graph-manager/AbstractPureGraphManager.d.ts +1 -0
  14. package/lib/graph-manager/AbstractPureGraphManager.d.ts.map +1 -1
  15. package/lib/graph-manager/AbstractPureGraphManager.js.map +1 -1
  16. package/lib/graph-manager/action/analytics/data-product/DataProductAnalysis.d.ts +4 -4
  17. package/lib/graph-manager/action/analytics/data-product/DataProductAnalysis.d.ts.map +1 -1
  18. package/lib/graph-manager/action/analytics/data-product/DataProductAnalysis.js.map +1 -1
  19. package/lib/graph-manager/action/changeDetection/DataProductObserveHelper.d.ts +4 -1
  20. package/lib/graph-manager/action/changeDetection/DataProductObserveHelper.d.ts.map +1 -1
  21. package/lib/graph-manager/action/changeDetection/DataProductObserveHelper.js +25 -1
  22. package/lib/graph-manager/action/changeDetection/DataProductObserveHelper.js.map +1 -1
  23. package/lib/graph-manager/action/query/Query.d.ts +2 -0
  24. package/lib/graph-manager/action/query/Query.d.ts.map +1 -1
  25. package/lib/graph-manager/action/query/Query.js +2 -0
  26. package/lib/graph-manager/action/query/Query.js.map +1 -1
  27. package/lib/graph-manager/protocol/pure/v1/V1_PureGraphManager.d.ts +9 -0
  28. package/lib/graph-manager/protocol/pure/v1/V1_PureGraphManager.d.ts.map +1 -1
  29. package/lib/graph-manager/protocol/pure/v1/V1_PureGraphManager.js +90 -25
  30. package/lib/graph-manager/protocol/pure/v1/V1_PureGraphManager.js.map +1 -1
  31. package/lib/graph-manager/protocol/pure/v1/engine/V1_EngineHelper.d.ts.map +1 -1
  32. package/lib/graph-manager/protocol/pure/v1/engine/V1_EngineHelper.js +3 -0
  33. package/lib/graph-manager/protocol/pure/v1/engine/V1_EngineHelper.js.map +1 -1
  34. package/lib/graph-manager/protocol/pure/v1/engine/V1_EngineServerClient.d.ts +1 -0
  35. package/lib/graph-manager/protocol/pure/v1/engine/V1_EngineServerClient.d.ts.map +1 -1
  36. package/lib/graph-manager/protocol/pure/v1/engine/V1_EngineServerClient.js +2 -0
  37. package/lib/graph-manager/protocol/pure/v1/engine/V1_EngineServerClient.js.map +1 -1
  38. package/lib/graph-manager/protocol/pure/v1/engine/V1_GraphManagerEngine.d.ts +1 -0
  39. package/lib/graph-manager/protocol/pure/v1/engine/V1_GraphManagerEngine.d.ts.map +1 -1
  40. package/lib/graph-manager/protocol/pure/v1/engine/V1_RemoteEngine.d.ts +1 -0
  41. package/lib/graph-manager/protocol/pure/v1/engine/V1_RemoteEngine.d.ts.map +1 -1
  42. package/lib/graph-manager/protocol/pure/v1/engine/V1_RemoteEngine.js +3 -0
  43. package/lib/graph-manager/protocol/pure/v1/engine/V1_RemoteEngine.js.map +1 -1
  44. package/lib/graph-manager/protocol/pure/v1/engine/query/V1_Query.d.ts +2 -1
  45. package/lib/graph-manager/protocol/pure/v1/engine/query/V1_Query.d.ts.map +1 -1
  46. package/lib/graph-manager/protocol/pure/v1/engine/query/V1_Query.js +3 -1
  47. package/lib/graph-manager/protocol/pure/v1/engine/query/V1_Query.js.map +1 -1
  48. package/lib/graph-manager/protocol/pure/v1/lakehouse/entitlements/V1_CoreEntitlements.d.ts +6 -10
  49. package/lib/graph-manager/protocol/pure/v1/lakehouse/entitlements/V1_CoreEntitlements.d.ts.map +1 -1
  50. package/lib/graph-manager/protocol/pure/v1/lakehouse/entitlements/V1_CoreEntitlements.js +11 -8
  51. package/lib/graph-manager/protocol/pure/v1/lakehouse/entitlements/V1_CoreEntitlements.js.map +1 -1
  52. package/lib/graph-manager/protocol/pure/v1/model/packageableElements/dataProduct/V1_DataProduct.d.ts +13 -2
  53. package/lib/graph-manager/protocol/pure/v1/model/packageableElements/dataProduct/V1_DataProduct.d.ts.map +1 -1
  54. package/lib/graph-manager/protocol/pure/v1/model/packageableElements/dataProduct/V1_DataProduct.js +19 -2
  55. package/lib/graph-manager/protocol/pure/v1/model/packageableElements/dataProduct/V1_DataProduct.js.map +1 -1
  56. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_DataProductTransformer.d.ts.map +1 -1
  57. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_DataProductTransformer.js +22 -2
  58. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_DataProductTransformer.js.map +1 -1
  59. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_ElementSecondPassBuilder.d.ts.map +1 -1
  60. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_ElementSecondPassBuilder.js +4 -1
  61. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_ElementSecondPassBuilder.js.map +1 -1
  62. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_DataProductBuilder.d.ts +3 -2
  63. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_DataProductBuilder.d.ts.map +1 -1
  64. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_DataProductBuilder.js +22 -2
  65. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_DataProductBuilder.js.map +1 -1
  66. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DataProductSerializationHelper.d.ts.map +1 -1
  67. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DataProductSerializationHelper.js +21 -1
  68. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DataProductSerializationHelper.js.map +1 -1
  69. package/lib/index.d.ts +2 -2
  70. package/lib/index.d.ts.map +1 -1
  71. package/lib/index.js +2 -2
  72. package/lib/index.js.map +1 -1
  73. package/lib/package.json +1 -1
  74. package/package.json +1 -1
  75. package/src/graph/Core_HashUtils.ts +2 -0
  76. package/src/graph/metamodel/pure/dataProduct/DataProduct.ts +22 -0
  77. package/src/graph/metamodel/pure/packageableElements/ingest/IngestDefinition.ts +20 -2
  78. package/src/graph-manager/AbstractPureGraphManager.ts +4 -0
  79. package/src/graph-manager/action/analytics/data-product/DataProductAnalysis.ts +11 -4
  80. package/src/graph-manager/action/changeDetection/DataProductObserveHelper.ts +31 -0
  81. package/src/graph-manager/action/query/Query.ts +2 -0
  82. package/src/graph-manager/protocol/pure/v1/V1_PureGraphManager.ts +219 -32
  83. package/src/graph-manager/protocol/pure/v1/engine/V1_EngineHelper.ts +3 -0
  84. package/src/graph-manager/protocol/pure/v1/engine/V1_EngineServerClient.ts +12 -0
  85. package/src/graph-manager/protocol/pure/v1/engine/V1_GraphManagerEngine.ts +5 -0
  86. package/src/graph-manager/protocol/pure/v1/engine/V1_RemoteEngine.ts +10 -0
  87. package/src/graph-manager/protocol/pure/v1/engine/query/V1_Query.ts +3 -1
  88. package/src/graph-manager/protocol/pure/v1/lakehouse/entitlements/V1_CoreEntitlements.ts +19 -11
  89. package/src/graph-manager/protocol/pure/v1/model/packageableElements/dataProduct/V1_DataProduct.ts +25 -4
  90. package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_DataProductTransformer.ts +24 -0
  91. package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_ElementSecondPassBuilder.ts +4 -0
  92. package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_DataProductBuilder.ts +30 -0
  93. package/src/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DataProductSerializationHelper.ts +34 -0
  94. package/src/index.ts +5 -0
@@ -144,6 +144,7 @@ import {
144
144
  V1_buildDataProductLink,
145
145
  V1_buildDataProductOperationalMetadata,
146
146
  V1_buildNativeModelAccess,
147
+ V1_buildDataProductOwner,
147
148
  } from './helpers/V1_DataProductBuilder.js';
148
149
  import type { V1_IngestDefinition } from '../../../model/packageableElements/ingest/V1_IngestDefinition.js';
149
150
  import { IncludeStore } from '../../../../../../../graph/metamodel/pure/packageableElements/store/relational/model/IncludeStore.js';
@@ -808,5 +809,8 @@ export class V1_ElementSecondPassBuilder
808
809
  dataProduct.taggedValues = element.taggedValues
809
810
  .map((taggedValue) => V1_buildTaggedValue(taggedValue, this.context))
810
811
  .filter(isNonNullable);
812
+ if (element.owner) {
813
+ dataProduct.owner = V1_buildDataProductOwner(element.owner);
814
+ }
811
815
  }
812
816
  }
@@ -43,7 +43,10 @@ import {
43
43
  InLineSampleQuery,
44
44
  DataProductDiagram,
45
45
  NativeModelExecutionContext,
46
+ type DataProductOwner,
47
+ AppDirOwner,
46
48
  } from '../../../../../../../../graph/metamodel/pure/dataProduct/DataProduct.js';
49
+ import { AppDirNode } from '../../../../../../../../graph/metamodel/pure/packageableElements/ingest/IngestDefinition.js';
47
50
  import {
48
51
  type V1_AccessPoint,
49
52
  type V1_AccessPointGroup,
@@ -63,6 +66,8 @@ import {
63
66
  V1_PackageableElementSampleQuery,
64
67
  V1_InLineSampleQuery,
65
68
  type V1_NativeModelExecutionContext,
69
+ V1_AppDirOwner,
70
+ type V1_DataProductOwner,
66
71
  } from '../../../../model/packageableElements/dataProduct/V1_DataProduct.js';
67
72
  import type { V1_GraphBuilderContext } from '../V1_GraphBuilderContext.js';
68
73
  import { V1_buildRawLambdaWithResolvedPaths } from './V1_ValueSpecificationPathResolver.js';
@@ -390,3 +395,28 @@ export const V1_buildNativeModelAccess = (
390
395
 
391
396
  return metamodelNativeModelAccess;
392
397
  };
398
+
399
+ export const V1_buildDataProductOwner = (
400
+ v1Owner: V1_DataProductOwner,
401
+ ): DataProductOwner => {
402
+ if (v1Owner instanceof V1_AppDirOwner) {
403
+ const owner = new AppDirOwner();
404
+ if (v1Owner.production) {
405
+ const production = new AppDirNode();
406
+ production.appDirId = v1Owner.production.appDirId;
407
+ production.level = v1Owner.production.level;
408
+ owner.production = production;
409
+ }
410
+ if (v1Owner.prodParallel) {
411
+ const prodParallel = new AppDirNode();
412
+ prodParallel.appDirId = v1Owner.prodParallel.appDirId;
413
+ prodParallel.level = v1Owner.prodParallel.level;
414
+ owner.prodParallel = prodParallel;
415
+ }
416
+ return owner;
417
+ }
418
+ throw new UnsupportedOperationError(
419
+ `Unsupported data product owner type`,
420
+ v1Owner,
421
+ );
422
+ };
@@ -53,6 +53,9 @@ import {
53
53
  V1_PackageableElementSampleQuery,
54
54
  V1_InLineSampleQuery,
55
55
  V1_NativeModelExecutionContext,
56
+ V1_AppDirOwner,
57
+ V1_DataProductOwnerType,
58
+ type V1_DataProductOwner,
56
59
  } from '../../../model/packageableElements/dataProduct/V1_DataProduct.js';
57
60
  import {
58
61
  UnsupportedOperationError,
@@ -78,6 +81,7 @@ import {
78
81
  V1_serializeEmbeddedDataType,
79
82
  } from './V1_DataElementSerializationHelper.js';
80
83
  import type { PureProtocolProcessorPlugin } from '../../../../PureProtocolProcessorPlugin.js';
84
+ import { V1_AppDirNodeModelSchema } from './lakehouse/V1_CoreEntitlementsSerializationHelper.js';
81
85
  import type { V1_EmbeddedData } from '../../../model/data/V1_EmbeddedData.js';
82
86
 
83
87
  export enum V1_AccessPointType {
@@ -458,6 +462,32 @@ export const V1_serializeDataProductType = (
458
462
  throw new Error(`Unknown V1_DataProductType instance: ${value}`);
459
463
  };
460
464
 
465
+ // ---------------------------------------- Owner -----------------------------------------
466
+
467
+ const V1_AppDirOwnerModelSchema = createModelSchema(V1_AppDirOwner, {
468
+ _type: usingConstantValueSchema(V1_DataProductOwnerType.APP_DIR),
469
+ prodParallel: optionalCustomUsingModelSchema(V1_AppDirNodeModelSchema),
470
+ production: optionalCustomUsingModelSchema(V1_AppDirNodeModelSchema),
471
+ });
472
+
473
+ const V1_deserializeDataProductOwner = (
474
+ json: PlainObject<V1_DataProductOwner>,
475
+ ): V1_DataProductOwner => {
476
+ if (json._type === V1_DataProductOwnerType.APP_DIR) {
477
+ return deserialize(V1_AppDirOwnerModelSchema, json);
478
+ }
479
+ throw new Error(`Unknown V1_DataProductOwner type: ${json._type}`);
480
+ };
481
+
482
+ const V1_serializeDataProductOwner = (
483
+ value: V1_DataProductOwner,
484
+ ): PlainObject<V1_DataProductOwner> => {
485
+ if (value instanceof V1_AppDirOwner) {
486
+ return serialize(V1_AppDirOwnerModelSchema, value);
487
+ }
488
+ throw new Error(`Unknown V1_DataProductOwner instance`);
489
+ };
490
+
461
491
  export const V1_dataProductModelSchema = (
462
492
  plugins: PureProtocolProcessorPlugin[],
463
493
  ): ModelSchema<V1_DataProduct> =>
@@ -484,6 +514,10 @@ export const V1_dataProductModelSchema = (
484
514
  operationalMetadata: optionalCustomUsingModelSchema(
485
515
  V1_DataProductOperationalMetadataModelSchema,
486
516
  ),
517
+ owner: optionalCustom(
518
+ V1_serializeDataProductOwner,
519
+ V1_deserializeDataProductOwner,
520
+ ),
487
521
  package: primitive(),
488
522
  type: optionalCustom(
489
523
  V1_serializeDataProductType,
package/src/index.ts CHANGED
@@ -212,6 +212,9 @@ export {
212
212
  V1_ExternalDataProductType,
213
213
  V1_SupportInfo,
214
214
  V1_UnknownDataProductIcon,
215
+ V1_DataProductOwner,
216
+ V1_AppDirOwner,
217
+ V1_DataProductOwnerType,
215
218
  } from './graph-manager/protocol/pure/v1/model/packageableElements/dataProduct/V1_DataProduct.js';
216
219
  export {
217
220
  V1_ExecuteInput,
@@ -747,6 +750,8 @@ export {
747
750
  NativeModelExecutionContext,
748
751
  DataProductAccessType,
749
752
  DataProductOperationalMetadata,
753
+ DataProductOwner,
754
+ AppDirOwner,
750
755
  } from './graph/metamodel/pure/dataProduct/DataProduct.js';
751
756
  export * from './graph-manager/action/changeDetection/DataProductObserveHelper.js';
752
757