@finos/legend-graph 32.3.15 → 32.3.17
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 +2 -1
- package/lib/graph/Core_HashUtils.d.ts.map +1 -1
- package/lib/graph/Core_HashUtils.js +1 -0
- package/lib/graph/Core_HashUtils.js.map +1 -1
- package/lib/graph/metamodel/pure/dataProduct/DataProduct.d.ts +7 -3
- package/lib/graph/metamodel/pure/dataProduct/DataProduct.d.ts.map +1 -1
- package/lib/graph/metamodel/pure/dataProduct/DataProduct.js +15 -6
- package/lib/graph/metamodel/pure/dataProduct/DataProduct.js.map +1 -1
- package/lib/graph-manager/AbstractPureGraphManager.d.ts +2 -0
- package/lib/graph-manager/AbstractPureGraphManager.d.ts.map +1 -1
- package/lib/graph-manager/AbstractPureGraphManager.js.map +1 -1
- package/lib/graph-manager/action/changeDetection/DataProductObserveHelper.d.ts +1 -1
- package/lib/graph-manager/action/changeDetection/DataProductObserveHelper.d.ts.map +1 -1
- package/lib/graph-manager/action/changeDetection/DataProductObserveHelper.js +9 -9
- package/lib/graph-manager/action/changeDetection/DataProductObserveHelper.js.map +1 -1
- package/lib/graph-manager/action/dev-metadata/DevMetadataResult.d.ts +36 -0
- package/lib/graph-manager/action/dev-metadata/DevMetadataResult.d.ts.map +1 -0
- package/lib/graph-manager/action/dev-metadata/DevMetadataResult.js +47 -0
- package/lib/graph-manager/action/dev-metadata/DevMetadataResult.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_PureGraphManager.d.ts +2 -0
- package/lib/graph-manager/protocol/pure/v1/V1_PureGraphManager.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_PureGraphManager.js +7 -0
- package/lib/graph-manager/protocol/pure/v1/V1_PureGraphManager.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/engine/V1_EngineServerClient.d.ts +2 -0
- package/lib/graph-manager/protocol/pure/v1/engine/V1_EngineServerClient.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/engine/V1_EngineServerClient.js +4 -0
- package/lib/graph-manager/protocol/pure/v1/engine/V1_EngineServerClient.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/engine/V1_GraphManagerEngine.d.ts +3 -0
- package/lib/graph-manager/protocol/pure/v1/engine/V1_GraphManagerEngine.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/engine/V1_RemoteEngine.d.ts +3 -0
- package/lib/graph-manager/protocol/pure/v1/engine/V1_RemoteEngine.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/engine/V1_RemoteEngine.js +7 -0
- package/lib/graph-manager/protocol/pure/v1/engine/V1_RemoteEngine.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/engine/dev-metadata/V1_DevMetadataPushRequest.d.ts +21 -0
- package/lib/graph-manager/protocol/pure/v1/engine/dev-metadata/V1_DevMetadataPushRequest.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/engine/dev-metadata/V1_DevMetadataPushRequest.js +25 -0
- package/lib/graph-manager/protocol/pure/v1/engine/dev-metadata/V1_DevMetadataPushRequest.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/model/packageableElements/dataProduct/V1_DataProduct.d.ts +8 -3
- 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 +17 -7
- package/lib/graph-manager/protocol/pure/v1/model/packageableElements/dataProduct/V1_DataProduct.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 +13 -4
- 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/V1_ElementSecondPassBuilder.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_ElementSecondPassBuilder.js +5 -5
- 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 +3 -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 +9 -1
- 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 +3 -2
- 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 +11 -8
- 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_EntitlementSerializationHelper.d.ts +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_EntitlementSerializationHelper.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_EntitlementSerializationHelper.js +3 -2
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_EntitlementSerializationHelper.js.map +1 -1
- package/lib/index.d.ts +4 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +4 -2
- package/lib/index.js.map +1 -1
- package/lib/package.json +1 -1
- package/package.json +3 -3
- package/src/graph/Core_HashUtils.ts +1 -0
- package/src/graph/metamodel/pure/dataProduct/DataProduct.ts +17 -6
- package/src/graph-manager/AbstractPureGraphManager.ts +9 -0
- package/src/graph-manager/action/changeDetection/DataProductObserveHelper.ts +13 -12
- package/src/graph-manager/action/dev-metadata/DevMetadataResult.ts +59 -0
- package/src/graph-manager/protocol/pure/v1/V1_PureGraphManager.ts +13 -0
- package/src/graph-manager/protocol/pure/v1/engine/V1_EngineServerClient.ts +18 -0
- package/src/graph-manager/protocol/pure/v1/engine/V1_GraphManagerEngine.ts +9 -0
- package/src/graph-manager/protocol/pure/v1/engine/V1_RemoteEngine.ts +16 -0
- package/src/graph-manager/protocol/pure/v1/engine/dev-metadata/V1_DevMetadataPushRequest.ts +29 -0
- package/src/graph-manager/protocol/pure/v1/model/packageableElements/dataProduct/V1_DataProduct.ts +19 -6
- package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_DataProductTransformer.ts +15 -7
- package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_ElementSecondPassBuilder.ts +8 -11
- package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_DataProductBuilder.ts +17 -0
- package/src/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DataProductSerializationHelper.ts +24 -15
- package/src/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_EntitlementSerializationHelper.ts +6 -3
- package/src/index.ts +4 -1
- package/tsconfig.json +2 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { SerializationFactory, usingModelSchema } from '@finos/legend-shared';
|
|
18
|
+
import { createModelSchema, optional, primitive } from 'serializr';
|
|
19
|
+
|
|
20
|
+
export class DevMetadataGroupId {
|
|
21
|
+
did: string | undefined;
|
|
22
|
+
|
|
23
|
+
static readonly serialization = new SerializationFactory(
|
|
24
|
+
createModelSchema(DevMetadataGroupId, {
|
|
25
|
+
did: optional(primitive()),
|
|
26
|
+
}),
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export class ProjectDetails {
|
|
31
|
+
groupId!: DevMetadataGroupId | undefined;
|
|
32
|
+
artifactId!: string;
|
|
33
|
+
version!: string;
|
|
34
|
+
|
|
35
|
+
static readonly serialization = new SerializationFactory(
|
|
36
|
+
createModelSchema(ProjectDetails, {
|
|
37
|
+
groupId: usingModelSchema(DevMetadataGroupId.serialization.schema),
|
|
38
|
+
artifactId: primitive(),
|
|
39
|
+
version: primitive(),
|
|
40
|
+
}),
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export enum DevMetadataDeploymentStatus {
|
|
45
|
+
SUCCESS = 'SUCCESS',
|
|
46
|
+
FAILURE = 'FAILURE',
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export class DevMetadataResult {
|
|
50
|
+
projectDetails!: ProjectDetails;
|
|
51
|
+
deploymentStatus!: string;
|
|
52
|
+
|
|
53
|
+
static readonly serialization = new SerializationFactory(
|
|
54
|
+
createModelSchema(DevMetadataResult, {
|
|
55
|
+
projectDetails: usingModelSchema(ProjectDetails.serialization.schema),
|
|
56
|
+
deploymentStatus: primitive(),
|
|
57
|
+
}),
|
|
58
|
+
);
|
|
59
|
+
}
|
|
@@ -370,6 +370,8 @@ import {
|
|
|
370
370
|
type V1_RawLineageModel,
|
|
371
371
|
} from './model/lineage/V1_Lineage.js';
|
|
372
372
|
import { V1_IngestDefinition } from './model/packageableElements/ingest/V1_IngestDefinition.js';
|
|
373
|
+
import type { DevMetadataResult } from '../../../action/dev-metadata/DevMetadataResult.js';
|
|
374
|
+
import { V1_DevMetadataPushRequest } from './engine/dev-metadata/V1_DevMetadataPushRequest.js';
|
|
373
375
|
|
|
374
376
|
class V1_PureModelContextDataIndex {
|
|
375
377
|
elements: V1_PackageableElement[] = [];
|
|
@@ -4275,6 +4277,17 @@ export class V1_PureGraphManager extends AbstractPureGraphManager {
|
|
|
4275
4277
|
);
|
|
4276
4278
|
return engine.getEngineServerClient().validUserAccessRole(userId);
|
|
4277
4279
|
}
|
|
4280
|
+
// --------------------------------------------- SDLC --------------------------------------------------
|
|
4281
|
+
|
|
4282
|
+
async pushToDevMetadata(
|
|
4283
|
+
did: string,
|
|
4284
|
+
projectName: string,
|
|
4285
|
+
graph: PureModel,
|
|
4286
|
+
): Promise<DevMetadataResult> {
|
|
4287
|
+
const request = new V1_DevMetadataPushRequest();
|
|
4288
|
+
request.projectText = await this.graphToPureCode(graph);
|
|
4289
|
+
return this.engine.pushToDevMetadata(did, projectName, request);
|
|
4290
|
+
}
|
|
4278
4291
|
|
|
4279
4292
|
// --------------------------------------------- Change Detection ---------------------------------------------
|
|
4280
4293
|
|
|
@@ -147,6 +147,8 @@ enum CORE_ENGINE_ACTIVITY_TRACE {
|
|
|
147
147
|
VALIDATE_FUNCTION_ACTIVATOR = 'validate function activator',
|
|
148
148
|
RENDER_FUNCTION_ACTIVATOR_ARTIFACT = 'render function activator artifact',
|
|
149
149
|
PUBLISH_FUNCTION_ACTIVATOR_TO_SANDBOX = 'publish function activator to sandbox',
|
|
150
|
+
|
|
151
|
+
PUSH_TO_DEV_MODE = 'Push to Dev Mode',
|
|
150
152
|
}
|
|
151
153
|
|
|
152
154
|
export type V1_GrammarParserBatchInputEntry = {
|
|
@@ -1220,4 +1222,20 @@ export class V1_EngineServerClient extends AbstractServerClient {
|
|
|
1220
1222
|
},
|
|
1221
1223
|
{ enableCompression: true },
|
|
1222
1224
|
);
|
|
1225
|
+
|
|
1226
|
+
// ------------------------------------------- Dev Mode -------------------------------------------
|
|
1227
|
+
_devMetadata = (): string => `${this.baseUrl}/lakehouse/sdlc/deploy/project`;
|
|
1228
|
+
|
|
1229
|
+
pushToDevMetadata = (
|
|
1230
|
+
did: string,
|
|
1231
|
+
projectName: string,
|
|
1232
|
+
request: PlainObject,
|
|
1233
|
+
): Promise<PlainObject> =>
|
|
1234
|
+
this.postWithTracing(
|
|
1235
|
+
this.getTraceData(
|
|
1236
|
+
CORE_ENGINE_ACTIVITY_TRACE.VALIDATE_SERVICE_ASSERTION_ID,
|
|
1237
|
+
),
|
|
1238
|
+
`${this._devMetadata()}/${did}/${projectName}`,
|
|
1239
|
+
request,
|
|
1240
|
+
);
|
|
1223
1241
|
}
|
|
@@ -99,6 +99,8 @@ import type {
|
|
|
99
99
|
V1_LineageInput,
|
|
100
100
|
V1_RawLineageModel,
|
|
101
101
|
} from '../model/lineage/V1_Lineage.js';
|
|
102
|
+
import type { V1_DevMetadataPushRequest } from './dev-metadata/V1_DevMetadataPushRequest.js';
|
|
103
|
+
import type { DevMetadataResult } from '../../../../action/dev-metadata/DevMetadataResult.js';
|
|
102
104
|
|
|
103
105
|
export interface V1_GraphManagerEngine {
|
|
104
106
|
config: TEMPORARY__AbstractEngineConfig;
|
|
@@ -416,4 +418,11 @@ export interface V1_GraphManagerEngine {
|
|
|
416
418
|
getAvailableRelationalDatabaseTypeConfigurations: () => Promise<
|
|
417
419
|
V1_RelationalConnectionBuilder[]
|
|
418
420
|
>;
|
|
421
|
+
|
|
422
|
+
// ------------------------------------------- Dev Mode -------------------------------------------
|
|
423
|
+
pushToDevMetadata(
|
|
424
|
+
did: string,
|
|
425
|
+
projectName: string,
|
|
426
|
+
request: V1_DevMetadataPushRequest,
|
|
427
|
+
): Promise<DevMetadataResult>;
|
|
419
428
|
}
|
|
@@ -172,6 +172,8 @@ import {
|
|
|
172
172
|
type V1_RawLineageModel,
|
|
173
173
|
V1_LineageInput,
|
|
174
174
|
} from '../model/lineage/V1_Lineage.js';
|
|
175
|
+
import { V1_DevMetadataPushRequest } from './dev-metadata/V1_DevMetadataPushRequest.js';
|
|
176
|
+
import { DevMetadataResult } from '../../../../action/dev-metadata/DevMetadataResult.js';
|
|
175
177
|
|
|
176
178
|
class V1_RemoteEngineConfig extends TEMPORARY__AbstractEngineConfig {
|
|
177
179
|
private engine: V1_RemoteEngine;
|
|
@@ -1403,4 +1405,18 @@ export class V1_RemoteEngine implements V1_GraphManagerEngine {
|
|
|
1403
1405
|
),
|
|
1404
1406
|
);
|
|
1405
1407
|
}
|
|
1408
|
+
// ------------------------------------------- Ddev Mode -------------------------------------------
|
|
1409
|
+
|
|
1410
|
+
async pushToDevMetadata(
|
|
1411
|
+
did: string,
|
|
1412
|
+
projectName: string,
|
|
1413
|
+
request: V1_DevMetadataPushRequest,
|
|
1414
|
+
): Promise<DevMetadataResult> {
|
|
1415
|
+
const result = (await this.engineServerClient.pushToDevMetadata(
|
|
1416
|
+
did,
|
|
1417
|
+
projectName,
|
|
1418
|
+
V1_DevMetadataPushRequest.serialization.toJson(request),
|
|
1419
|
+
)) as unknown as PlainObject<DevMetadataResult>;
|
|
1420
|
+
return DevMetadataResult.serialization.fromJson(result);
|
|
1421
|
+
}
|
|
1406
1422
|
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { SerializationFactory } from '@finos/legend-shared';
|
|
18
|
+
import { createModelSchema, primitive } from 'serializr';
|
|
19
|
+
|
|
20
|
+
export class V1_DevMetadataPushRequest {
|
|
21
|
+
// TODO: repalce with pmcd once backend changed are complete
|
|
22
|
+
projectText!: string;
|
|
23
|
+
|
|
24
|
+
static readonly serialization = new SerializationFactory(
|
|
25
|
+
createModelSchema(V1_DevMetadataPushRequest, {
|
|
26
|
+
projectText: primitive(),
|
|
27
|
+
}),
|
|
28
|
+
);
|
|
29
|
+
}
|
package/src/graph-manager/protocol/pure/v1/model/packageableElements/dataProduct/V1_DataProduct.ts
CHANGED
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
import {
|
|
18
18
|
hashArray,
|
|
19
|
+
uuid,
|
|
19
20
|
type Hashable,
|
|
20
21
|
type PlainObject,
|
|
21
22
|
} from '@finos/legend-shared';
|
|
@@ -146,6 +147,7 @@ export class V1_SupportInfo implements Hashable {
|
|
|
146
147
|
faqUrl: V1_DataProductLink | undefined;
|
|
147
148
|
supportUrl: V1_DataProductLink | undefined;
|
|
148
149
|
emails: V1_Email[] = [];
|
|
150
|
+
expertise: V1_Expertise[] | undefined;
|
|
149
151
|
|
|
150
152
|
get hashCode(): string {
|
|
151
153
|
return hashArray([
|
|
@@ -155,6 +157,7 @@ export class V1_SupportInfo implements Hashable {
|
|
|
155
157
|
this.faqUrl ?? '',
|
|
156
158
|
this.supportUrl ?? '',
|
|
157
159
|
hashArray(this.emails),
|
|
160
|
+
hashArray(this.expertise ?? []),
|
|
158
161
|
]);
|
|
159
162
|
}
|
|
160
163
|
}
|
|
@@ -308,6 +311,7 @@ export class V1_ExternalDataProductType extends V1_DataProductType {
|
|
|
308
311
|
}
|
|
309
312
|
|
|
310
313
|
export class V1_Expertise implements Hashable {
|
|
314
|
+
readonly uuid = uuid();
|
|
311
315
|
description: string | undefined;
|
|
312
316
|
expertIds: string[] | undefined;
|
|
313
317
|
|
|
@@ -320,11 +324,22 @@ export class V1_Expertise implements Hashable {
|
|
|
320
324
|
}
|
|
321
325
|
}
|
|
322
326
|
|
|
327
|
+
export class V1_DataProductOperationalMetadata implements Hashable {
|
|
328
|
+
coverageRegions: V1_DataProductRegion[] | undefined;
|
|
329
|
+
updateFrequency: V1_DeliveryFrequency | undefined;
|
|
330
|
+
|
|
331
|
+
get hashCode(): string {
|
|
332
|
+
return hashArray([
|
|
333
|
+
CORE_HASH_STRUCTURE.DATA_PRODUCT_OPERATIONAL_METADATA,
|
|
334
|
+
hashArray(this.coverageRegions ?? []),
|
|
335
|
+
this.updateFrequency ?? '',
|
|
336
|
+
]);
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
|
|
323
340
|
export class V1_DataProduct extends V1_PackageableElement implements Hashable {
|
|
324
341
|
title: string | undefined;
|
|
325
342
|
description: string | undefined;
|
|
326
|
-
coverageRegions: V1_DataProductRegion[] | undefined;
|
|
327
|
-
deliveryFrequency: V1_DeliveryFrequency | undefined;
|
|
328
343
|
icon: V1_DataProductIcon | undefined;
|
|
329
344
|
accessPointGroups: V1_AccessPointGroup[] = [];
|
|
330
345
|
supportInfo: V1_SupportInfo | undefined;
|
|
@@ -332,15 +347,13 @@ export class V1_DataProduct extends V1_PackageableElement implements Hashable {
|
|
|
332
347
|
stereotypes: V1_StereotypePtr[] = [];
|
|
333
348
|
taggedValues: V1_TaggedValue[] = [];
|
|
334
349
|
sampleValues: V1_EmbeddedData[] | undefined;
|
|
335
|
-
|
|
350
|
+
operationalMetadata: V1_DataProductOperationalMetadata | undefined;
|
|
336
351
|
|
|
337
352
|
override get hashCode(): string {
|
|
338
353
|
return hashArray([
|
|
339
354
|
CORE_HASH_STRUCTURE.DATA_PRODUCT,
|
|
340
355
|
this.title ?? '',
|
|
341
356
|
this.description ?? '',
|
|
342
|
-
hashArray(this.coverageRegions ?? []),
|
|
343
|
-
this.deliveryFrequency ?? '',
|
|
344
357
|
this.icon ?? '',
|
|
345
358
|
hashArray(this.accessPointGroups),
|
|
346
359
|
this.supportInfo ?? '',
|
|
@@ -348,7 +361,7 @@ export class V1_DataProduct extends V1_PackageableElement implements Hashable {
|
|
|
348
361
|
hashArray(this.stereotypes),
|
|
349
362
|
hashArray(this.taggedValues),
|
|
350
363
|
hashArray(this.sampleValues ?? []),
|
|
351
|
-
|
|
364
|
+
this.operationalMetadata ?? '',
|
|
352
365
|
]);
|
|
353
366
|
}
|
|
354
367
|
|
|
@@ -51,6 +51,7 @@ import {
|
|
|
51
51
|
V1_ExternalDataProductType,
|
|
52
52
|
V1_FunctionAccessPoint,
|
|
53
53
|
type V1_Expertise,
|
|
54
|
+
V1_DataProductOperationalMetadata,
|
|
54
55
|
} from '../../../model/packageableElements/dataProduct/V1_DataProduct.js';
|
|
55
56
|
import { V1_initPackageableElement } from './V1_CoreTransformerHelper.js';
|
|
56
57
|
import { V1_transformRawLambda } from './V1_RawValueSpecificationTransformer.js';
|
|
@@ -126,16 +127,9 @@ export const V1_transformDataProduct = (
|
|
|
126
127
|
V1_initPackageableElement(product, element);
|
|
127
128
|
product.description = element.description;
|
|
128
129
|
product.title = element.title;
|
|
129
|
-
product.deliveryFrequency = element.deliveryFrequency as
|
|
130
|
-
| V1_DeliveryFrequency
|
|
131
|
-
| undefined;
|
|
132
|
-
product.coverageRegions = element.coverageRegions as
|
|
133
|
-
| V1_DataProductRegion[]
|
|
134
|
-
| undefined;
|
|
135
130
|
product.sampleValues = element.sampleValues?.map((data) =>
|
|
136
131
|
V1_transformEmbeddedData(data, context),
|
|
137
132
|
);
|
|
138
|
-
product.expertise = element.expertise as V1_Expertise[] | undefined;
|
|
139
133
|
if (element.type instanceof InternalDataProductType) {
|
|
140
134
|
product.type = new V1_InternalDataProductType();
|
|
141
135
|
} else if (element.type instanceof ExternalDataProductType) {
|
|
@@ -150,10 +144,24 @@ export const V1_transformDataProduct = (
|
|
|
150
144
|
product.icon = transformDataProductIcon(element.icon);
|
|
151
145
|
}
|
|
152
146
|
|
|
147
|
+
if (!element.operationalMetadata) {
|
|
148
|
+
product.operationalMetadata = undefined;
|
|
149
|
+
} else {
|
|
150
|
+
const operationalMetadata = new V1_DataProductOperationalMetadata();
|
|
151
|
+
operationalMetadata.updateFrequency = element.operationalMetadata
|
|
152
|
+
.updateFrequency as V1_DeliveryFrequency | undefined;
|
|
153
|
+
operationalMetadata.coverageRegions = element.operationalMetadata
|
|
154
|
+
.coverageRegions as V1_DataProductRegion[] | undefined;
|
|
155
|
+
product.operationalMetadata = operationalMetadata;
|
|
156
|
+
}
|
|
157
|
+
|
|
153
158
|
if (!element.supportInfo) {
|
|
154
159
|
product.supportInfo = undefined;
|
|
155
160
|
} else {
|
|
156
161
|
const supportInfo = new V1_SupportInfo();
|
|
162
|
+
supportInfo.expertise = element.supportInfo.expertise as
|
|
163
|
+
| V1_Expertise[]
|
|
164
|
+
| undefined;
|
|
157
165
|
supportInfo.documentation = element.supportInfo.documentation;
|
|
158
166
|
supportInfo.website = element.supportInfo.website;
|
|
159
167
|
supportInfo.faqUrl = element.supportInfo.faqUrl;
|
|
@@ -131,8 +131,6 @@ import {
|
|
|
131
131
|
type V1_DataProduct,
|
|
132
132
|
} from '../../../model/packageableElements/dataProduct/V1_DataProduct.js';
|
|
133
133
|
import {
|
|
134
|
-
type DataProduct_DeliveryFrequency,
|
|
135
|
-
type DataProduct_Region,
|
|
136
134
|
Email,
|
|
137
135
|
ExternalDataProductType,
|
|
138
136
|
InternalDataProductType,
|
|
@@ -144,6 +142,7 @@ import {
|
|
|
144
142
|
V1_buildDataProductExpertise,
|
|
145
143
|
V1_buildDataProductIcon,
|
|
146
144
|
V1_buildDataProductLink,
|
|
145
|
+
V1_buildDataProductOperationalMetadata,
|
|
147
146
|
} from './helpers/V1_DataProductBuilder.js';
|
|
148
147
|
import type { V1_IngestDefinition } from '../../../model/packageableElements/ingest/V1_IngestDefinition.js';
|
|
149
148
|
import { IncludeStore } from '../../../../../../../graph/metamodel/pure/packageableElements/store/relational/model/IncludeStore.js';
|
|
@@ -767,6 +766,10 @@ export class V1_ElementSecondPassBuilder
|
|
|
767
766
|
supportInfo.supportUrl = protocolSupportInfo.supportUrl
|
|
768
767
|
? V1_buildDataProductLink(protocolSupportInfo.supportUrl)
|
|
769
768
|
: undefined;
|
|
769
|
+
supportInfo.expertise =
|
|
770
|
+
protocolSupportInfo.expertise?.map((expertise) =>
|
|
771
|
+
V1_buildDataProductExpertise(expertise),
|
|
772
|
+
) ?? [];
|
|
770
773
|
supportInfo.emails = protocolSupportInfo.emails.map((elementEmail) => {
|
|
771
774
|
const email = new Email(elementEmail.address, elementEmail.title);
|
|
772
775
|
return email;
|
|
@@ -783,17 +786,11 @@ export class V1_ElementSecondPassBuilder
|
|
|
783
786
|
dataProduct.sampleValues = element.sampleValues?.map((data) =>
|
|
784
787
|
V1_buildEmbeddedData(data, this.context),
|
|
785
788
|
);
|
|
786
|
-
if (element.
|
|
787
|
-
dataProduct.
|
|
788
|
-
|
|
789
|
+
if (element.operationalMetadata) {
|
|
790
|
+
dataProduct.operationalMetadata = V1_buildDataProductOperationalMetadata(
|
|
791
|
+
element.operationalMetadata,
|
|
789
792
|
);
|
|
790
793
|
}
|
|
791
|
-
dataProduct.deliveryFrequency = element.deliveryFrequency as
|
|
792
|
-
| DataProduct_DeliveryFrequency
|
|
793
|
-
| undefined;
|
|
794
|
-
dataProduct.coverageRegions = element.coverageRegions as
|
|
795
|
-
| DataProduct_Region[]
|
|
796
|
-
| undefined;
|
|
797
794
|
dataProduct.stereotypes = element.stereotypes
|
|
798
795
|
.map((stereotype) => this.context.resolveStereotype(stereotype))
|
|
799
796
|
.filter(isNonNullable);
|
|
@@ -24,10 +24,13 @@ import {
|
|
|
24
24
|
type DataProductElement,
|
|
25
25
|
type DataProductIcon,
|
|
26
26
|
AccessPointGroup,
|
|
27
|
+
type DataProduct_DeliveryFrequency,
|
|
28
|
+
type DataProduct_Region,
|
|
27
29
|
DataProductElementScope,
|
|
28
30
|
DataProductEmbeddedImageIcon,
|
|
29
31
|
DataProductLibraryIcon,
|
|
30
32
|
DataProductLink,
|
|
33
|
+
DataProductOperationalMetadata,
|
|
31
34
|
DataProductRuntimeInfo,
|
|
32
35
|
Expertise,
|
|
33
36
|
FunctionAccessPoint,
|
|
@@ -49,6 +52,7 @@ import {
|
|
|
49
52
|
V1_ModelAccessPointGroup,
|
|
50
53
|
V1_UnknownAccessPoint,
|
|
51
54
|
V1_UnknownDataProductIcon,
|
|
55
|
+
type V1_DataProductOperationalMetadata,
|
|
52
56
|
} from '../../../../model/packageableElements/dataProduct/V1_DataProduct.js';
|
|
53
57
|
import type { V1_GraphBuilderContext } from '../V1_GraphBuilderContext.js';
|
|
54
58
|
import { V1_buildRawLambdaWithResolvedPaths } from './V1_ValueSpecificationPathResolver.js';
|
|
@@ -134,6 +138,19 @@ export const V1_buildDataProductExpertise = (
|
|
|
134
138
|
return expertise;
|
|
135
139
|
};
|
|
136
140
|
|
|
141
|
+
export const V1_buildDataProductOperationalMetadata = (
|
|
142
|
+
operationalMetadata: V1_DataProductOperationalMetadata,
|
|
143
|
+
): DataProductOperationalMetadata => {
|
|
144
|
+
const metamodelOperationalMetadata = new DataProductOperationalMetadata();
|
|
145
|
+
metamodelOperationalMetadata.updateFrequency =
|
|
146
|
+
operationalMetadata.updateFrequency as
|
|
147
|
+
| DataProduct_DeliveryFrequency
|
|
148
|
+
| undefined;
|
|
149
|
+
metamodelOperationalMetadata.coverageRegions =
|
|
150
|
+
operationalMetadata.coverageRegions as DataProduct_Region[] | undefined;
|
|
151
|
+
return metamodelOperationalMetadata;
|
|
152
|
+
};
|
|
153
|
+
|
|
137
154
|
export const V1_buildAccessPointGroup = (
|
|
138
155
|
elementGroup: V1_AccessPointGroup,
|
|
139
156
|
context: V1_GraphBuilderContext,
|
|
@@ -47,6 +47,7 @@ import {
|
|
|
47
47
|
V1_DataProductTypeValue,
|
|
48
48
|
V1_Expertise,
|
|
49
49
|
V1_FunctionAccessPoint,
|
|
50
|
+
V1_DataProductOperationalMetadata,
|
|
50
51
|
} from '../../../model/packageableElements/dataProduct/V1_DataProduct.js';
|
|
51
52
|
import {
|
|
52
53
|
UnsupportedOperationError,
|
|
@@ -296,14 +297,34 @@ const V1_DataProductLinkModelSchema = createModelSchema(V1_DataProductLink, {
|
|
|
296
297
|
url: primitive(),
|
|
297
298
|
});
|
|
298
299
|
|
|
300
|
+
export const V1_ExpertiseModelSchema = createModelSchema(V1_Expertise, {
|
|
301
|
+
description: optional(primitive()),
|
|
302
|
+
expertIds: list(primitive()),
|
|
303
|
+
});
|
|
304
|
+
|
|
299
305
|
export const V1_SupportInfoModelSchema = createModelSchema(V1_SupportInfo, {
|
|
300
306
|
documentation: optional(usingModelSchema(V1_DataProductLinkModelSchema)),
|
|
301
307
|
emails: customListWithSchema(V1_EmailModelSchema),
|
|
302
308
|
faqUrl: optional(usingModelSchema(V1_DataProductLinkModelSchema)),
|
|
303
309
|
supportUrl: optional(usingModelSchema(V1_DataProductLinkModelSchema)),
|
|
310
|
+
expertise: optionalCustomListWithSchema(V1_ExpertiseModelSchema),
|
|
304
311
|
website: optional(usingModelSchema(V1_DataProductLinkModelSchema)),
|
|
305
312
|
});
|
|
306
313
|
|
|
314
|
+
export const V1_DataProductOperationalMetadataModelSchema = createModelSchema(
|
|
315
|
+
V1_DataProductOperationalMetadata,
|
|
316
|
+
{
|
|
317
|
+
coverageRegions: optionalCustomList(
|
|
318
|
+
(json) => (json as string).toLowerCase(),
|
|
319
|
+
(json) => (json as unknown as string).toUpperCase(),
|
|
320
|
+
),
|
|
321
|
+
updateFrequency: optionalCustom(
|
|
322
|
+
(json) => (json as string).toLowerCase(),
|
|
323
|
+
(json) => (json as string).toUpperCase(),
|
|
324
|
+
),
|
|
325
|
+
},
|
|
326
|
+
);
|
|
327
|
+
|
|
307
328
|
export const V1_InternalDataProductTypeModelSchema = createModelSchema(
|
|
308
329
|
V1_InternalDataProductType,
|
|
309
330
|
{
|
|
@@ -319,11 +340,6 @@ export const V1_ExternalDataProductTypeModelSchema = createModelSchema(
|
|
|
319
340
|
},
|
|
320
341
|
);
|
|
321
342
|
|
|
322
|
-
export const V1_ExpertiseModelSchema = createModelSchema(V1_Expertise, {
|
|
323
|
-
description: optional(primitive()),
|
|
324
|
-
expertIds: list(primitive()),
|
|
325
|
-
});
|
|
326
|
-
|
|
327
343
|
export const V1_deserializeDataProductType = (
|
|
328
344
|
json: Record<string, unknown>,
|
|
329
345
|
): V1_DataProductType => {
|
|
@@ -357,26 +373,19 @@ export const V1_dataProductModelSchema = (
|
|
|
357
373
|
V1_serializeAccessPointGroup,
|
|
358
374
|
V1_deserializeAccessPointGroup,
|
|
359
375
|
),
|
|
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
376
|
description: optional(primitive()),
|
|
370
377
|
sampleValues: optionalCustomList(
|
|
371
378
|
(data: V1_EmbeddedData) => V1_serializeEmbeddedDataType(data, plugins),
|
|
372
379
|
(data) => V1_deserializeEmbeddedDataType(data, plugins),
|
|
373
380
|
),
|
|
374
|
-
expertise: optionalCustomListWithSchema(V1_ExpertiseModelSchema),
|
|
375
381
|
icon: optionalCustom(
|
|
376
382
|
V1_serializeDataProductIcon,
|
|
377
383
|
V1_deserializeDataProductIcon,
|
|
378
384
|
),
|
|
379
385
|
name: primitive(),
|
|
386
|
+
operationalMetadata: optionalCustomUsingModelSchema(
|
|
387
|
+
V1_DataProductOperationalMetadataModelSchema,
|
|
388
|
+
),
|
|
380
389
|
package: primitive(),
|
|
381
390
|
type: optionalCustom(
|
|
382
391
|
V1_serializeDataProductType,
|
|
@@ -290,6 +290,9 @@ export const V1_dataContractsResponseModelSchema = (
|
|
|
290
290
|
dataContracts: optional(
|
|
291
291
|
customListWithSchema(V1_dataContractSubscriptionsModelSchema(plugins)),
|
|
292
292
|
),
|
|
293
|
+
subscriptions: optional(
|
|
294
|
+
customListWithSchema(V1_dataSubscriptionModelSchema),
|
|
295
|
+
),
|
|
293
296
|
});
|
|
294
297
|
|
|
295
298
|
export const V1_liteDataContractsResponseModelSchema = (
|
|
@@ -422,15 +425,15 @@ export const V1_TaskStatusChangeResponseModelSchema = createModelSchema(
|
|
|
422
425
|
},
|
|
423
426
|
);
|
|
424
427
|
|
|
425
|
-
export const
|
|
428
|
+
export const V1_deserializeDataContractResponse = (
|
|
426
429
|
json: PlainObject<V1_DataContractsResponse>,
|
|
427
430
|
plugins: PureProtocolProcessorPlugin[],
|
|
428
|
-
):
|
|
431
|
+
): V1_DataContractSubscriptions[] => {
|
|
429
432
|
const contracts = deserialize(
|
|
430
433
|
V1_dataContractsResponseModelSchema(plugins),
|
|
431
434
|
json,
|
|
432
435
|
);
|
|
433
|
-
return contracts.dataContracts
|
|
436
|
+
return contracts.dataContracts ?? [];
|
|
434
437
|
};
|
|
435
438
|
|
|
436
439
|
export const V1_liteDataContractsResponseModelSchemaToContracts = (
|
package/src/index.ts
CHANGED
|
@@ -169,6 +169,7 @@ export {
|
|
|
169
169
|
export { default as V1_CORE_SYSTEM_MODELS } from './graph-manager/protocol/pure/v1/V1_Core_SystemModels.json' with { type: 'json' };
|
|
170
170
|
export { V1_PureGraphManager } from './graph-manager/protocol/pure/v1/V1_PureGraphManager.js';
|
|
171
171
|
export * from './graph-manager/protocol/pure/v1/engine/artifactGeneration/V1_DataSpaceArtifacts.js';
|
|
172
|
+
export { V1_DevMetadataPushRequest } from './graph-manager/protocol/pure/v1/engine/dev-metadata/V1_DevMetadataPushRequest.js';
|
|
172
173
|
|
|
173
174
|
// V1 protocols
|
|
174
175
|
export { V1_Class } from './graph-manager/protocol/pure/v1/model/packageableElements/domain/V1_Class.js';
|
|
@@ -303,6 +304,7 @@ export {
|
|
|
303
304
|
V1_DataContract,
|
|
304
305
|
V1_DataContractApprovedUsersResponse,
|
|
305
306
|
V1_DataContractsResponse,
|
|
307
|
+
V1_DataContractSubscriptions,
|
|
306
308
|
V1_EnrichedUserApprovalStatus,
|
|
307
309
|
V1_LiteDataContract,
|
|
308
310
|
V1_LiteDataContractsResponse,
|
|
@@ -361,8 +363,8 @@ export {
|
|
|
361
363
|
V1_createContractPayloadModelSchema,
|
|
362
364
|
V1_DataContractApprovedUsersResponseModelSchema,
|
|
363
365
|
V1_dataContractsResponseModelSchema,
|
|
364
|
-
V1_dataContractsResponseModelSchemaToContracts,
|
|
365
366
|
V1_DataProductOriginType,
|
|
367
|
+
V1_deserializeDataContractResponse,
|
|
366
368
|
V1_deserializeTaskResponse,
|
|
367
369
|
V1_EntitlementsAccessPointModelSchema,
|
|
368
370
|
V1_EntitlementsDataProductDetailsModelSchema,
|
|
@@ -549,6 +551,7 @@ export * from './graph-manager/action/query/QuerySearchSpecification.js';
|
|
|
549
551
|
export * from './graph-manager/action/EngineError.js';
|
|
550
552
|
export * from './graph-manager/action/compilation/CompilationWarning.js';
|
|
551
553
|
export * from './graph-manager/action/compilation/CompilationResult.js';
|
|
554
|
+
export { DevMetadataResult } from './graph-manager/action/dev-metadata/DevMetadataResult.js';
|
|
552
555
|
export {
|
|
553
556
|
CodeCompletionResult,
|
|
554
557
|
Completion,
|
package/tsconfig.json
CHANGED
|
@@ -400,6 +400,7 @@
|
|
|
400
400
|
"./src/graph-manager/action/compilation/CompilationResult.ts",
|
|
401
401
|
"./src/graph-manager/action/compilation/CompilationWarning.ts",
|
|
402
402
|
"./src/graph-manager/action/compilation/Completion.ts",
|
|
403
|
+
"./src/graph-manager/action/dev-metadata/DevMetadataResult.ts",
|
|
403
404
|
"./src/graph-manager/action/execution/ExecutionResult.ts",
|
|
404
405
|
"./src/graph-manager/action/execution/ExecutionResultHelper.ts",
|
|
405
406
|
"./src/graph-manager/action/execution/INTERNAL__UnknownExecutionResult.ts",
|
|
@@ -459,6 +460,7 @@
|
|
|
459
460
|
"./src/graph-manager/protocol/pure/v1/engine/compilation/V1_CompileResult.ts",
|
|
460
461
|
"./src/graph-manager/protocol/pure/v1/engine/compilation/V1_CompleteCodeInput.ts",
|
|
461
462
|
"./src/graph-manager/protocol/pure/v1/engine/compilation/V1_LambdaReturnType.ts",
|
|
463
|
+
"./src/graph-manager/protocol/pure/v1/engine/dev-metadata/V1_DevMetadataPushRequest.ts",
|
|
462
464
|
"./src/graph-manager/protocol/pure/v1/engine/execution/V1_ExecuteInput.ts",
|
|
463
465
|
"./src/graph-manager/protocol/pure/v1/engine/execution/V1_ExecutionError.ts",
|
|
464
466
|
"./src/graph-manager/protocol/pure/v1/engine/execution/V1_ExecutionHelper.ts",
|