@finos/legend-graph 32.3.29 → 32.3.31
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/BasicModel.d.ts +1 -1
- package/lib/graph/BasicModel.d.ts.map +1 -1
- package/lib/graph/BasicModel.js +2 -2
- package/lib/graph/BasicModel.js.map +1 -1
- package/lib/graph/DependencyManager.d.ts +3 -1
- package/lib/graph/DependencyManager.d.ts.map +1 -1
- package/lib/graph/DependencyManager.js +3 -0
- package/lib/graph/DependencyManager.js.map +1 -1
- package/lib/graph/PureModel.d.ts +1 -0
- package/lib/graph/PureModel.d.ts.map +1 -1
- package/lib/graph/PureModel.js +9 -0
- package/lib/graph/PureModel.js.map +1 -1
- package/lib/graph/metamodel/pure/dataProduct/DataProduct.d.ts +5 -1
- package/lib/graph/metamodel/pure/dataProduct/DataProduct.d.ts.map +1 -1
- package/lib/graph/metamodel/pure/dataProduct/DataProduct.js +2 -2
- package/lib/graph/metamodel/pure/dataProduct/DataProduct.js.map +1 -1
- package/lib/graph/metamodel/pure/packageableElements/function/test/FunctionTest.d.ts.map +1 -1
- package/lib/graph/metamodel/pure/packageableElements/function/test/FunctionTest.js +1 -0
- package/lib/graph/metamodel/pure/packageableElements/function/test/FunctionTest.js.map +1 -1
- package/lib/graph-manager/action/changeDetection/GraphObserverHelper.js +1 -1
- package/lib/graph-manager/action/changeDetection/GraphObserverHelper.js.map +1 -1
- package/lib/graph-manager/action/query/Query.d.ts +8 -0
- package/lib/graph-manager/action/query/Query.d.ts.map +1 -1
- package/lib/graph-manager/action/query/Query.js +8 -0
- package/lib/graph-manager/action/query/Query.js.map +1 -1
- package/lib/graph-manager/helpers/DataProductHelper.d.ts +25 -0
- package/lib/graph-manager/helpers/DataProductHelper.d.ts.map +1 -0
- package/lib/graph-manager/helpers/DataProductHelper.js +73 -0
- package/lib/graph-manager/helpers/DataProductHelper.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/engine/V1_EngineHelper.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/engine/V1_EngineHelper.js +9 -2
- package/lib/graph-manager/protocol/pure/v1/engine/V1_EngineHelper.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/engine/query/V1_Query.d.ts +8 -1
- package/lib/graph-manager/protocol/pure/v1/engine/query/V1_Query.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/engine/query/V1_Query.js +19 -0
- package/lib/graph-manager/protocol/pure/v1/engine/query/V1_Query.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/model/packageableElements/function/test/V1_FunctionTest.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/model/packageableElements/function/test/V1_FunctionTest.js +1 -0
- package/lib/graph-manager/protocol/pure/v1/model/packageableElements/function/test/V1_FunctionTest.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_DataProductTransformer.js +1 -1
- 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/to/helpers/V1_DataProductBuilder.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_DataProductBuilder.js +1 -2
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_DataProductBuilder.js.map +1 -1
- package/lib/index.d.ts +3 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +3 -2
- package/lib/index.js.map +1 -1
- package/lib/package.json +1 -1
- package/package.json +2 -2
- package/src/graph/BasicModel.ts +2 -2
- package/src/graph/DependencyManager.ts +5 -0
- package/src/graph/PureModel.ts +9 -0
- package/src/graph/metamodel/pure/dataProduct/DataProduct.ts +8 -3
- package/src/graph/metamodel/pure/packageableElements/function/test/FunctionTest.ts +1 -0
- package/src/graph-manager/action/changeDetection/GraphObserverHelper.ts +1 -1
- package/src/graph-manager/action/query/Query.ts +11 -0
- package/src/graph-manager/helpers/DataProductHelper.ts +113 -0
- package/src/graph-manager/protocol/pure/v1/engine/V1_EngineHelper.ts +8 -0
- package/src/graph-manager/protocol/pure/v1/engine/query/V1_Query.ts +31 -0
- package/src/graph-manager/protocol/pure/v1/model/packageableElements/function/test/V1_FunctionTest.ts +1 -0
- package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_DataProductTransformer.ts +1 -1
- package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_DataProductBuilder.ts +6 -2
- package/src/index.ts +4 -2
- package/tsconfig.json +1 -0
|
@@ -32,6 +32,7 @@ import {
|
|
|
32
32
|
type QueryExecutionContextInfo,
|
|
33
33
|
QueryExplicitExecutionContextInfo,
|
|
34
34
|
QueryDataSpaceExecutionContextInfo,
|
|
35
|
+
QueryDataProductExecutionContext,
|
|
35
36
|
} from '../../../../../graph-manager/action/query/Query.js';
|
|
36
37
|
import {
|
|
37
38
|
type V1_LightQuery,
|
|
@@ -40,6 +41,7 @@ import {
|
|
|
40
41
|
V1_QueryExplicitExecutionContext,
|
|
41
42
|
V1_QueryDataSpaceExecutionContext,
|
|
42
43
|
type V1_QueryExecutionContext,
|
|
44
|
+
V1_QueryDataProductExecutionContext,
|
|
43
45
|
} from './query/V1_Query.js';
|
|
44
46
|
import type { PureModel } from '../../../../../graph/PureModel.js';
|
|
45
47
|
import { DEPRECATED__ServiceTestResult } from '../../../../../graph-manager/action/service/DEPRECATED__ServiceTestResult.js';
|
|
@@ -124,6 +126,7 @@ export const V1_buildLightQuery = (
|
|
|
124
126
|
`Query 'artifactId' field is missing`,
|
|
125
127
|
);
|
|
126
128
|
metamodel.owner = protocol.owner;
|
|
129
|
+
metamodel.description = protocol.description;
|
|
127
130
|
metamodel.lastUpdatedAt = protocol.lastUpdatedAt;
|
|
128
131
|
metamodel.createdAt = protocol.createdAt;
|
|
129
132
|
metamodel.lastOpenAt = protocol.lastOpenAt;
|
|
@@ -337,6 +340,11 @@ export const V1_transformQueryExecutionContext = (
|
|
|
337
340
|
protocol.dataSpacePath = execContext.dataSpacePath;
|
|
338
341
|
protocol.executionKey = execContext.executionKey;
|
|
339
342
|
return protocol;
|
|
343
|
+
} else if (execContext instanceof QueryDataProductExecutionContext) {
|
|
344
|
+
const protocol = new V1_QueryDataProductExecutionContext();
|
|
345
|
+
protocol.dataProductPath = execContext.dataProductPath;
|
|
346
|
+
protocol.executionKey = execContext.executionKey;
|
|
347
|
+
return protocol;
|
|
340
348
|
}
|
|
341
349
|
throw new UnsupportedOperationError('Unsupported query execution context');
|
|
342
350
|
};
|
|
@@ -65,6 +65,7 @@ export class V1_QueryExecutionContext {}
|
|
|
65
65
|
export enum V1_QueryExecutionContextType {
|
|
66
66
|
QUERY_EXPLICIT_EXECUTION_CONTEXT = 'explicitExecutionContext',
|
|
67
67
|
QUERY_DATASAPCE_EXECUTION_CONTEXT = 'dataSpaceExecutionContext',
|
|
68
|
+
QUERY_DATAPRODUCT_EXECUTION_CONTEXT = 'dataProductExecutionContext',
|
|
68
69
|
}
|
|
69
70
|
|
|
70
71
|
export class V1_QueryExplicitExecutionContext extends V1_QueryExecutionContext {
|
|
@@ -103,6 +104,24 @@ export class V1_QueryDataSpaceExecutionContext extends V1_QueryExecutionContext
|
|
|
103
104
|
);
|
|
104
105
|
}
|
|
105
106
|
|
|
107
|
+
export class V1_QueryDataProductExecutionContext extends V1_QueryExecutionContext {
|
|
108
|
+
dataProductPath!: string;
|
|
109
|
+
executionKey: string | undefined;
|
|
110
|
+
|
|
111
|
+
static readonly serialization = new SerializationFactory(
|
|
112
|
+
createModelSchema(V1_QueryDataProductExecutionContext, {
|
|
113
|
+
_type: usingConstantValueSchema(
|
|
114
|
+
V1_QueryExecutionContextType.QUERY_DATAPRODUCT_EXECUTION_CONTEXT,
|
|
115
|
+
),
|
|
116
|
+
dataProductPath: primitive(),
|
|
117
|
+
executionKey: optional(primitive()),
|
|
118
|
+
}),
|
|
119
|
+
{
|
|
120
|
+
deserializeNullAsUndefined: true,
|
|
121
|
+
},
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
|
|
106
125
|
export const V1_deserializeQueryExecutionContext = (
|
|
107
126
|
json: PlainObject<V1_QueryExecutionContext>,
|
|
108
127
|
): V1_QueryExecutionContext => {
|
|
@@ -117,6 +136,11 @@ export const V1_deserializeQueryExecutionContext = (
|
|
|
117
136
|
V1_QueryDataSpaceExecutionContext.serialization.schema,
|
|
118
137
|
json,
|
|
119
138
|
);
|
|
139
|
+
case V1_QueryExecutionContextType.QUERY_DATAPRODUCT_EXECUTION_CONTEXT:
|
|
140
|
+
return deserialize(
|
|
141
|
+
V1_QueryDataProductExecutionContext.serialization.schema,
|
|
142
|
+
json,
|
|
143
|
+
);
|
|
120
144
|
default: {
|
|
121
145
|
throw new UnsupportedOperationError(
|
|
122
146
|
`Can't deserialize authentication strategy of type '${json._type}': no compatible deserializer available from plugins`,
|
|
@@ -138,6 +162,11 @@ export const V1_serializeQueryExecutionContext = (
|
|
|
138
162
|
V1_QueryDataSpaceExecutionContext.serialization.schema,
|
|
139
163
|
protocol,
|
|
140
164
|
);
|
|
165
|
+
} else if (protocol instanceof V1_QueryDataProductExecutionContext) {
|
|
166
|
+
return serialize(
|
|
167
|
+
V1_QueryDataProductExecutionContext.serialization.schema,
|
|
168
|
+
protocol,
|
|
169
|
+
);
|
|
141
170
|
}
|
|
142
171
|
throw new UnsupportedOperationError(
|
|
143
172
|
`Can't serialize authentication strategy: no compatible serializer available from plugins`,
|
|
@@ -217,6 +246,7 @@ export class V1_LightQuery {
|
|
|
217
246
|
artifactId!: string;
|
|
218
247
|
versionId!: string;
|
|
219
248
|
originalVersionId?: string | undefined;
|
|
249
|
+
description?: string | undefined;
|
|
220
250
|
lastUpdatedAt?: number | undefined;
|
|
221
251
|
createdAt?: number | undefined;
|
|
222
252
|
lastOpenAt?: number | undefined;
|
|
@@ -231,6 +261,7 @@ export class V1_LightQuery {
|
|
|
231
261
|
lastOpenAt: optional(primitive()),
|
|
232
262
|
name: primitive(),
|
|
233
263
|
owner: optional(primitive()),
|
|
264
|
+
description: optional(primitive()),
|
|
234
265
|
versionId: primitive(),
|
|
235
266
|
originalVersionId: optional(primitive()),
|
|
236
267
|
}),
|
|
@@ -167,7 +167,7 @@ export const V1_transformDataProduct = (
|
|
|
167
167
|
);
|
|
168
168
|
}
|
|
169
169
|
nativeModelAccess.defaultExecutionContext =
|
|
170
|
-
metamodelNativeModelAccess.defaultExecutionContext;
|
|
170
|
+
metamodelNativeModelAccess.defaultExecutionContext.key;
|
|
171
171
|
nativeModelAccess.nativeModelExecutionContexts =
|
|
172
172
|
metamodelNativeModelAccess.nativeModelExecutionContexts.map(
|
|
173
173
|
(executionContext) => {
|
|
@@ -310,12 +310,16 @@ export const V1_buildNativeModelAccess = (
|
|
|
310
310
|
context: V1_GraphBuilderContext,
|
|
311
311
|
): NativeModelAccess => {
|
|
312
312
|
const metamodelNativeModelAccess = new NativeModelAccess();
|
|
313
|
-
metamodelNativeModelAccess.defaultExecutionContext =
|
|
314
|
-
nativeModelAccess.defaultExecutionContext;
|
|
315
313
|
metamodelNativeModelAccess.nativeModelExecutionContexts =
|
|
316
314
|
nativeModelAccess.nativeModelExecutionContexts.map((executionContext) =>
|
|
317
315
|
V1_buildNativeModelExecutionContext(executionContext, context),
|
|
318
316
|
);
|
|
317
|
+
metamodelNativeModelAccess.defaultExecutionContext = guaranteeNonNullable(
|
|
318
|
+
metamodelNativeModelAccess.nativeModelExecutionContexts.find(
|
|
319
|
+
(e) => e.key === nativeModelAccess.defaultExecutionContext,
|
|
320
|
+
),
|
|
321
|
+
`Default execution context ${nativeModelAccess.defaultExecutionContext} not found among native model execution contexts`,
|
|
322
|
+
);
|
|
319
323
|
if (nativeModelAccess.sampleQueries) {
|
|
320
324
|
metamodelNativeModelAccess.sampleQueries =
|
|
321
325
|
nativeModelAccess.sampleQueries.map((sampleQuery) =>
|
package/src/index.ts
CHANGED
|
@@ -399,6 +399,7 @@ export {
|
|
|
399
399
|
} from './graph-manager/protocol/pure/v1/lakehouse/subscriptions/V1_ConsumerSubscriptions.js';
|
|
400
400
|
export {
|
|
401
401
|
V1_DataProductArtifact,
|
|
402
|
+
V1_NativeModelExecutionContextInfo,
|
|
402
403
|
V1_AccessPointImplementation,
|
|
403
404
|
V1_AccessPointGroupInfo,
|
|
404
405
|
V1_SampleQueryInfo,
|
|
@@ -781,8 +782,6 @@ export {
|
|
|
781
782
|
SupportInfo,
|
|
782
783
|
ModelAccessPointGroup,
|
|
783
784
|
InLineSampleQuery,
|
|
784
|
-
NativeModelAccess,
|
|
785
|
-
NativeModelExecutionContext,
|
|
786
785
|
PackageableElementSampleQuery,
|
|
787
786
|
SampleQuery,
|
|
788
787
|
DataProductRuntimeInfo,
|
|
@@ -794,6 +793,8 @@ export {
|
|
|
794
793
|
Expertise,
|
|
795
794
|
ExternalDataProductType,
|
|
796
795
|
type DataProductElement,
|
|
796
|
+
NativeModelAccess,
|
|
797
|
+
NativeModelExecutionContext,
|
|
797
798
|
DataProductOperationalMetadata,
|
|
798
799
|
} from './graph/metamodel/pure/dataProduct/DataProduct.js';
|
|
799
800
|
export * from './graph-manager/action/changeDetection/DataProductObserveHelper.js';
|
|
@@ -972,6 +973,7 @@ export {
|
|
|
972
973
|
DatasetEntitlementAccessApprovedReport,
|
|
973
974
|
DatasetEntitlementUnsupportedReport,
|
|
974
975
|
} from './graph-manager/action/analytics/StoreEntitlementAnalysis.js';
|
|
976
|
+
export * from './graph-manager/helpers/DataProductHelper.js';
|
|
975
977
|
export {
|
|
976
978
|
FunctionAnalysisInfo,
|
|
977
979
|
FunctionAnalysisParameterInfo,
|
package/tsconfig.json
CHANGED
|
@@ -435,6 +435,7 @@
|
|
|
435
435
|
"./src/graph-manager/extensions/Testable_PureGraphManagerPlugin_Extension.ts",
|
|
436
436
|
"./src/graph-manager/helpers/DSL_Data_GraphManagerHelper.ts",
|
|
437
437
|
"./src/graph-manager/helpers/DSL_ExternalFormat_GraphManagerHelper.ts",
|
|
438
|
+
"./src/graph-manager/helpers/DataProductHelper.ts",
|
|
438
439
|
"./src/graph-manager/helpers/ValueSpecificationGraphManagerHelper.ts",
|
|
439
440
|
"./src/graph-manager/protocol/pure/PureGraphManagerBuilder.ts",
|
|
440
441
|
"./src/graph-manager/protocol/pure/PureProtocolProcessorPlugin.ts",
|