@finos/legend-graph 30.0.1 → 30.0.3
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-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/TEMPORARY__AbstractEngineConfig.d.ts +4 -0
- package/lib/graph-manager/action/TEMPORARY__AbstractEngineConfig.d.ts.map +1 -1
- package/lib/graph-manager/action/TEMPORARY__AbstractEngineConfig.js +12 -0
- package/lib/graph-manager/action/TEMPORARY__AbstractEngineConfig.js.map +1 -1
- package/lib/graph-manager/action/query/Query.d.ts +5 -0
- package/lib/graph-manager/action/query/Query.d.ts.map +1 -1
- package/lib/graph-manager/action/query/Query.js +5 -0
- package/lib/graph-manager/action/query/Query.js.map +1 -1
- 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 +22 -0
- package/lib/graph-manager/protocol/pure/v1/V1_PureGraphManager.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/engine/V1_Engine.d.ts +6 -1
- package/lib/graph-manager/protocol/pure/v1/engine/V1_Engine.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/engine/V1_Engine.js +27 -5
- package/lib/graph-manager/protocol/pure/v1/engine/V1_Engine.js.map +1 -1
- 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 +14 -2
- package/lib/graph-manager/protocol/pure/v1/engine/V1_EngineHelper.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/engine/V1_EngineServerClient.d.ts +29 -10
- 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 +41 -21
- package/lib/graph-manager/protocol/pure/v1/engine/V1_EngineServerClient.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/engine/query/V1_Query.d.ts +6 -0
- 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 +13 -0
- package/lib/graph-manager/protocol/pure/v1/engine/query/V1_Query.js.map +1 -1
- package/lib/package.json +1 -1
- package/package.json +3 -3
- package/src/graph-manager/AbstractPureGraphManager.ts +10 -0
- package/src/graph-manager/action/TEMPORARY__AbstractEngineConfig.ts +14 -0
- package/src/graph-manager/action/query/Query.ts +7 -0
- package/src/graph-manager/protocol/pure/v1/V1_PureGraphManager.ts +37 -0
- package/src/graph-manager/protocol/pure/v1/engine/V1_Engine.ts +49 -5
- package/src/graph-manager/protocol/pure/v1/engine/V1_EngineHelper.ts +28 -1
- package/src/graph-manager/protocol/pure/v1/engine/V1_EngineServerClient.ts +151 -53
- package/src/graph-manager/protocol/pure/v1/engine/query/V1_Query.ts +19 -0
|
@@ -16,6 +16,17 @@
|
|
|
16
16
|
import { SerializationFactory, usingModelSchema } from '@finos/legend-shared';
|
|
17
17
|
import { createModelSchema, list, optional, primitive } from 'serializr';
|
|
18
18
|
import { V1_stereotypePtrModelSchema, V1_taggedValueModelSchema, } from '../../transformation/pureProtocol/serializationHelpers/V1_DomainSerializationHelper.js';
|
|
19
|
+
class V1_QueryParameterValue {
|
|
20
|
+
name;
|
|
21
|
+
content;
|
|
22
|
+
static serialization = new SerializationFactory(createModelSchema(V1_QueryParameterValue, {
|
|
23
|
+
name: primitive(),
|
|
24
|
+
content: primitive(),
|
|
25
|
+
}), {
|
|
26
|
+
deserializeNullAsUndefined: true,
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
export { V1_QueryParameterValue };
|
|
19
30
|
class V1_Query {
|
|
20
31
|
name;
|
|
21
32
|
id;
|
|
@@ -28,11 +39,13 @@ class V1_Query {
|
|
|
28
39
|
owner;
|
|
29
40
|
taggedValues;
|
|
30
41
|
stereotypes;
|
|
42
|
+
defaultParameterValues;
|
|
31
43
|
lastUpdatedAt;
|
|
32
44
|
static serialization = new SerializationFactory(createModelSchema(V1_Query, {
|
|
33
45
|
artifactId: primitive(),
|
|
34
46
|
content: primitive(),
|
|
35
47
|
id: primitive(),
|
|
48
|
+
defaultParameterValues: optional(list(usingModelSchema(V1_QueryParameterValue.serialization.schema))),
|
|
36
49
|
groupId: primitive(),
|
|
37
50
|
lastUpdatedAt: optional(primitive()),
|
|
38
51
|
mapping: primitive(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"V1_Query.js","sourceRoot":"","sources":["../../../../../../../src/graph-manager/protocol/pure/v1/engine/query/V1_Query.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAGzE,OAAO,EACL,2BAA2B,EAC3B,yBAAyB,GAC1B,MAAM,wFAAwF,CAAC;AAEhG,MAAa,QAAQ;IACnB,IAAI,CAAU;IACd,EAAE,CAAU;IACZ,OAAO,CAAU;IACjB,UAAU,CAAU;IACpB,SAAS,CAAU;IACnB,OAAO,CAAU;IACjB,OAAO,CAAU;IACjB,OAAO,CAAU;IACjB,KAAK,CAAsB;IAC3B,YAAY,CAAgC;IAC5C,WAAW,CAAkC;IAC7C,aAAa,CAAsB;IAEnC,MAAM,CAAU,aAAa,GAAG,IAAI,oBAAoB,CACtD,iBAAiB,CAAC,QAAQ,EAAE;QAC1B,UAAU,EAAE,SAAS,EAAE;QACvB,OAAO,EAAE,SAAS,EAAE;QACpB,EAAE,EAAE,SAAS,EAAE;QACf,OAAO,EAAE,SAAS,EAAE;QACpB,aAAa,EAAE,QAAQ,CAAC,SAAS,EAAE,CAAC;QACpC,OAAO,EAAE,SAAS,EAAE;QACpB,IAAI,EAAE,SAAS,EAAE;QACjB,KAAK,EAAE,QAAQ,CAAC,SAAS,EAAE,CAAC;QAC5B,OAAO,EAAE,SAAS,EAAE;QACpB,WAAW,EAAE,QAAQ,CACnB,IAAI,CAAC,gBAAgB,CAAC,2BAA2B,CAAC,CAAC,CACpD;QACD,YAAY,EAAE,QAAQ,CAAC,IAAI,CAAC,gBAAgB,CAAC,yBAAyB,CAAC,CAAC,CAAC;QACzE,SAAS,EAAE,SAAS,EAAE;KACvB,CAAC,EACF;QACE,0BAA0B,EAAE,IAAI;KACjC,CACF,CAAC;;
|
|
1
|
+
{"version":3,"file":"V1_Query.js","sourceRoot":"","sources":["../../../../../../../src/graph-manager/protocol/pure/v1/engine/query/V1_Query.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAGzE,OAAO,EACL,2BAA2B,EAC3B,yBAAyB,GAC1B,MAAM,wFAAwF,CAAC;AAEhG,MAAa,sBAAsB;IACjC,IAAI,CAAU;IACd,OAAO,CAAU;IAEjB,MAAM,CAAU,aAAa,GAAG,IAAI,oBAAoB,CACtD,iBAAiB,CAAC,sBAAsB,EAAE;QACxC,IAAI,EAAE,SAAS,EAAE;QACjB,OAAO,EAAE,SAAS,EAAE;KACrB,CAAC,EACF;QACE,0BAA0B,EAAE,IAAI;KACjC,CACF,CAAC;;SAZS,sBAAsB;AAenC,MAAa,QAAQ;IACnB,IAAI,CAAU;IACd,EAAE,CAAU;IACZ,OAAO,CAAU;IACjB,UAAU,CAAU;IACpB,SAAS,CAAU;IACnB,OAAO,CAAU;IACjB,OAAO,CAAU;IACjB,OAAO,CAAU;IACjB,KAAK,CAAsB;IAC3B,YAAY,CAAgC;IAC5C,WAAW,CAAkC;IAC7C,sBAAsB,CAAwC;IAC9D,aAAa,CAAsB;IAEnC,MAAM,CAAU,aAAa,GAAG,IAAI,oBAAoB,CACtD,iBAAiB,CAAC,QAAQ,EAAE;QAC1B,UAAU,EAAE,SAAS,EAAE;QACvB,OAAO,EAAE,SAAS,EAAE;QACpB,EAAE,EAAE,SAAS,EAAE;QACf,sBAAsB,EAAE,QAAQ,CAC9B,IAAI,CAAC,gBAAgB,CAAC,sBAAsB,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CACpE;QACD,OAAO,EAAE,SAAS,EAAE;QACpB,aAAa,EAAE,QAAQ,CAAC,SAAS,EAAE,CAAC;QACpC,OAAO,EAAE,SAAS,EAAE;QACpB,IAAI,EAAE,SAAS,EAAE;QACjB,KAAK,EAAE,QAAQ,CAAC,SAAS,EAAE,CAAC;QAC5B,OAAO,EAAE,SAAS,EAAE;QACpB,WAAW,EAAE,QAAQ,CACnB,IAAI,CAAC,gBAAgB,CAAC,2BAA2B,CAAC,CAAC,CACpD;QACD,YAAY,EAAE,QAAQ,CAAC,IAAI,CAAC,gBAAgB,CAAC,yBAAyB,CAAC,CAAC,CAAC;QACzE,SAAS,EAAE,SAAS,EAAE;KACvB,CAAC,EACF;QACE,0BAA0B,EAAE,IAAI;KACjC,CACF,CAAC;;SAtCS,QAAQ;AAyCrB,MAAa,aAAa;IACxB,IAAI,CAAU;IACd,EAAE,CAAU;IACZ,OAAO,CAAU;IACjB,KAAK,CAAsB;IAC3B,UAAU,CAAU;IACpB,SAAS,CAAU;IACnB,aAAa,CAAsB;IAEnC,MAAM,CAAU,aAAa,GAAG,IAAI,oBAAoB,CACtD,iBAAiB,CAAC,QAAQ,EAAE;QAC1B,UAAU,EAAE,SAAS,EAAE;QACvB,EAAE,EAAE,SAAS,EAAE;QACf,OAAO,EAAE,SAAS,EAAE;QACpB,aAAa,EAAE,QAAQ,CAAC,SAAS,EAAE,CAAC;QACpC,IAAI,EAAE,SAAS,EAAE;QACjB,KAAK,EAAE,QAAQ,CAAC,SAAS,EAAE,CAAC;QAC5B,SAAS,EAAE,SAAS,EAAE;KACvB,CAAC,EACF;QACE,0BAA0B,EAAE,IAAI;KACjC,CACF,CAAC;;SAtBS,aAAa"}
|
package/lib/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@finos/legend-graph",
|
|
3
|
-
"version": "30.0.
|
|
3
|
+
"version": "30.0.3",
|
|
4
4
|
"description": "Legend graph and graph manager",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"legend",
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"test:watch": "jest --watch"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@finos/legend-shared": "10.0.
|
|
44
|
-
"@finos/legend-storage": "3.0.
|
|
43
|
+
"@finos/legend-shared": "10.0.10",
|
|
44
|
+
"@finos/legend-storage": "3.0.60",
|
|
45
45
|
"mobx": "6.9.0",
|
|
46
46
|
"serializr": "3.0.2"
|
|
47
47
|
},
|
|
@@ -317,6 +317,16 @@ export abstract class AbstractPureGraphManager {
|
|
|
317
317
|
pretty?: boolean,
|
|
318
318
|
): Promise<Map<string, string>>;
|
|
319
319
|
|
|
320
|
+
abstract valueSpecificationsToPureCode(
|
|
321
|
+
lambdas: Map<string, ValueSpecification>,
|
|
322
|
+
pretty?: boolean,
|
|
323
|
+
): Promise<Map<string, string>>;
|
|
324
|
+
|
|
325
|
+
abstract pureCodeToValueSpecifications(
|
|
326
|
+
lambdas: Map<string, string>,
|
|
327
|
+
graph: PureModel,
|
|
328
|
+
): Promise<Map<string, ValueSpecification>>;
|
|
329
|
+
|
|
320
330
|
// TODO: consider moving these to relational plugin when we complete modularization
|
|
321
331
|
abstract pureCodeToRelationalOperationElement(
|
|
322
332
|
operation: string,
|
|
@@ -27,21 +27,27 @@ export class TEMPORARY__AbstractEngineConfig {
|
|
|
27
27
|
tabSize = DEFAULT_TAB_SIZE;
|
|
28
28
|
currentUserId?: string | undefined;
|
|
29
29
|
baseUrl?: string | undefined;
|
|
30
|
+
baseUrlForServiceRegistration?: string | undefined;
|
|
30
31
|
useClientRequestPayloadCompression = false;
|
|
31
32
|
useBase64ForAdhocConnectionDataUrls = false;
|
|
33
|
+
enableDebuggingPayload = false;
|
|
32
34
|
|
|
33
35
|
constructor() {
|
|
34
36
|
makeObservable(this, {
|
|
35
37
|
env: observable,
|
|
36
38
|
currentUserId: observable,
|
|
37
39
|
baseUrl: observable,
|
|
40
|
+
baseUrlForServiceRegistration: observable,
|
|
38
41
|
useClientRequestPayloadCompression: observable,
|
|
39
42
|
useBase64ForAdhocConnectionDataUrls: observable,
|
|
43
|
+
enableDebuggingPayload: observable,
|
|
40
44
|
setEnv: action,
|
|
41
45
|
setCurrentUserId: action,
|
|
42
46
|
setBaseUrl: action,
|
|
47
|
+
setBaseUrlForServiceRegistration: action,
|
|
43
48
|
setUseClientRequestPayloadCompression: action,
|
|
44
49
|
setUseBase64ForAdhocConnectionDataUrls: action,
|
|
50
|
+
setEnableDebuggingPayload: action,
|
|
45
51
|
});
|
|
46
52
|
}
|
|
47
53
|
|
|
@@ -61,6 +67,10 @@ export class TEMPORARY__AbstractEngineConfig {
|
|
|
61
67
|
this.baseUrl = val;
|
|
62
68
|
}
|
|
63
69
|
|
|
70
|
+
setBaseUrlForServiceRegistration(val: string | undefined): void {
|
|
71
|
+
this.baseUrlForServiceRegistration = val;
|
|
72
|
+
}
|
|
73
|
+
|
|
64
74
|
setUseClientRequestPayloadCompression(val: boolean): void {
|
|
65
75
|
this.useClientRequestPayloadCompression = val;
|
|
66
76
|
}
|
|
@@ -68,4 +78,8 @@ export class TEMPORARY__AbstractEngineConfig {
|
|
|
68
78
|
setUseBase64ForAdhocConnectionDataUrls(val: boolean): void {
|
|
69
79
|
this.useBase64ForAdhocConnectionDataUrls = val;
|
|
70
80
|
}
|
|
81
|
+
|
|
82
|
+
setEnableDebuggingPayload(val: boolean): void {
|
|
83
|
+
this.enableDebuggingPayload = val;
|
|
84
|
+
}
|
|
71
85
|
}
|
|
@@ -29,6 +29,11 @@ export class QueryStereotype {
|
|
|
29
29
|
stereotype!: string;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
+
export class QueryParameterValue {
|
|
33
|
+
name!: string;
|
|
34
|
+
content!: string;
|
|
35
|
+
}
|
|
36
|
+
|
|
32
37
|
export class Query {
|
|
33
38
|
name!: string;
|
|
34
39
|
id!: string;
|
|
@@ -45,6 +50,8 @@ export class Query {
|
|
|
45
50
|
// because we don't process them
|
|
46
51
|
taggedValues?: QueryTaggedValue[] | undefined;
|
|
47
52
|
stereotypes?: QueryStereotype[] | undefined;
|
|
53
|
+
defaultParameterValues?: QueryParameterValue[] | undefined;
|
|
54
|
+
|
|
48
55
|
// Store query in text to be more compact and stable
|
|
49
56
|
content!: string;
|
|
50
57
|
|
|
@@ -313,6 +313,8 @@ import type { RelationalDatabaseConnection } from '../../../../STO_Relational_Ex
|
|
|
313
313
|
import { V1_RawSQLExecuteInput } from './engine/execution/V1_RawSQLExecuteInput.js';
|
|
314
314
|
import type { SubtypeInfo } from '../../../action/protocol/ProtocolInfo.js';
|
|
315
315
|
import { V1_INTERNAL__UnknownStore } from './model/packageableElements/store/V1_INTERNAL__UnknownStore.js';
|
|
316
|
+
import type { V1_ValueSpecification } from './model/valueSpecification/V1_ValueSpecification.js';
|
|
317
|
+
import type { V1_GrammarParserBatchInputEntry } from './engine/V1_EngineServerClient.js';
|
|
316
318
|
|
|
317
319
|
class V1_PureModelContextDataIndex {
|
|
318
320
|
elements: V1_PackageableElement[] = [];
|
|
@@ -1815,6 +1817,41 @@ export class V1_PureGraphManager extends AbstractPureGraphManager {
|
|
|
1815
1817
|
);
|
|
1816
1818
|
}
|
|
1817
1819
|
|
|
1820
|
+
override valueSpecificationsToPureCode(
|
|
1821
|
+
lambdas: Map<string, ValueSpecification>,
|
|
1822
|
+
pretty?: boolean | undefined,
|
|
1823
|
+
): Promise<Map<string, string>> {
|
|
1824
|
+
const input: Record<string, PlainObject<V1_ValueSpecification>> = {};
|
|
1825
|
+
lambdas.forEach((val, key) => {
|
|
1826
|
+
input[key] = this.serializeValueSpecification(val);
|
|
1827
|
+
});
|
|
1828
|
+
return this.engine.transformValueSpecsToCode(input, Boolean(pretty));
|
|
1829
|
+
}
|
|
1830
|
+
|
|
1831
|
+
async pureCodeToValueSpecifications(
|
|
1832
|
+
lambdas: Map<string, string>,
|
|
1833
|
+
graph: PureModel,
|
|
1834
|
+
): Promise<Map<string, ValueSpecification>> {
|
|
1835
|
+
const pureCodeToValueSpecInput: Record<
|
|
1836
|
+
string,
|
|
1837
|
+
V1_GrammarParserBatchInputEntry
|
|
1838
|
+
> = {};
|
|
1839
|
+
Array.from(lambdas.entries()).forEach(([k, content]) => {
|
|
1840
|
+
pureCodeToValueSpecInput[k] = {
|
|
1841
|
+
value: content,
|
|
1842
|
+
returnSourceInformation: false,
|
|
1843
|
+
};
|
|
1844
|
+
});
|
|
1845
|
+
const specs = await this.engine.transformCodeToValueSpeces(
|
|
1846
|
+
pureCodeToValueSpecInput,
|
|
1847
|
+
);
|
|
1848
|
+
const result = new Map<string, ValueSpecification>();
|
|
1849
|
+
Array.from(specs.entries()).forEach(([k, v]) => {
|
|
1850
|
+
result.set(k, this.buildValueSpecification(v, graph));
|
|
1851
|
+
});
|
|
1852
|
+
return result;
|
|
1853
|
+
}
|
|
1854
|
+
|
|
1818
1855
|
pureCodeToRelationalOperationElement(
|
|
1819
1856
|
operation: string,
|
|
1820
1857
|
operationId: string,
|
|
@@ -35,7 +35,10 @@ import {
|
|
|
35
35
|
type GenerationConfigurationDescription,
|
|
36
36
|
} from '../../../../../graph-manager/action/generation/GenerationConfigurationDescription.js';
|
|
37
37
|
import { TEMPORARY__AbstractEngineConfig } from '../../../../../graph-manager/action/TEMPORARY__AbstractEngineConfig.js';
|
|
38
|
-
import {
|
|
38
|
+
import {
|
|
39
|
+
V1_EngineServerClient,
|
|
40
|
+
type V1_GrammarParserBatchInputEntry,
|
|
41
|
+
} from './V1_EngineServerClient.js';
|
|
39
42
|
import { V1_PureModelContextData } from '../model/context/V1_PureModelContextData.js';
|
|
40
43
|
import {
|
|
41
44
|
type V1_LambdaReturnTypeResult,
|
|
@@ -127,6 +130,7 @@ import {
|
|
|
127
130
|
V1_serializeRawSQLExecuteInput,
|
|
128
131
|
type V1_RawSQLExecuteInput,
|
|
129
132
|
} from './execution/V1_RawSQLExecuteInput.js';
|
|
133
|
+
import type { V1_ValueSpecification } from '../model/valueSpecification/V1_ValueSpecification.js';
|
|
130
134
|
|
|
131
135
|
class V1_EngineConfig extends TEMPORARY__AbstractEngineConfig {
|
|
132
136
|
private engine: V1_Engine;
|
|
@@ -146,11 +150,21 @@ class V1_EngineConfig extends TEMPORARY__AbstractEngineConfig {
|
|
|
146
150
|
this.engine.getEngineServerClient().setBaseUrl(val);
|
|
147
151
|
}
|
|
148
152
|
|
|
153
|
+
override setBaseUrlForServiceRegistration(val: string | undefined): void {
|
|
154
|
+
super.setBaseUrlForServiceRegistration(val);
|
|
155
|
+
this.engine.getEngineServerClient().setBaseUrlForServiceRegistration(val);
|
|
156
|
+
}
|
|
157
|
+
|
|
149
158
|
override setUseClientRequestPayloadCompression(val: boolean): void {
|
|
150
159
|
super.setUseClientRequestPayloadCompression(val);
|
|
151
160
|
this.engine.getEngineServerClient().setCompression(val);
|
|
152
161
|
}
|
|
153
162
|
|
|
163
|
+
override setEnableDebuggingPayload(val: boolean): void {
|
|
164
|
+
super.setEnableDebuggingPayload(val);
|
|
165
|
+
this.engine.getEngineServerClient().setDebugPayload(val);
|
|
166
|
+
}
|
|
167
|
+
|
|
154
168
|
constructor(engine: V1_Engine) {
|
|
155
169
|
super();
|
|
156
170
|
this.engine = engine;
|
|
@@ -366,6 +380,36 @@ export class V1_Engine {
|
|
|
366
380
|
);
|
|
367
381
|
}
|
|
368
382
|
|
|
383
|
+
async transformValueSpecsToCode(
|
|
384
|
+
input: Record<string, PlainObject<V1_ValueSpecification>>,
|
|
385
|
+
pretty: boolean,
|
|
386
|
+
): Promise<Map<string, string>> {
|
|
387
|
+
return deserializeMap(
|
|
388
|
+
await this.engineServerClient.JSONToGrammar_valueSpecification_batch(
|
|
389
|
+
input,
|
|
390
|
+
pretty ? V1_RenderStyle.PRETTY : V1_RenderStyle.STANDARD,
|
|
391
|
+
),
|
|
392
|
+
(v) => v,
|
|
393
|
+
);
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
async transformCodeToValueSpeces(
|
|
397
|
+
input: Record<string, V1_GrammarParserBatchInputEntry>,
|
|
398
|
+
): Promise<Map<string, PlainObject>> {
|
|
399
|
+
const batchResults =
|
|
400
|
+
await this.engineServerClient.grammarToJSON_valueSpecification_batch(
|
|
401
|
+
input,
|
|
402
|
+
);
|
|
403
|
+
const finalResults = new Map<string, PlainObject>();
|
|
404
|
+
const results = batchResults.result;
|
|
405
|
+
if (results) {
|
|
406
|
+
Object.entries(results).forEach(([k, v]) => {
|
|
407
|
+
finalResults.set(k, v);
|
|
408
|
+
});
|
|
409
|
+
}
|
|
410
|
+
return finalResults;
|
|
411
|
+
}
|
|
412
|
+
|
|
369
413
|
async transformLambdaToCode(
|
|
370
414
|
lambda: RawLambda,
|
|
371
415
|
pretty: boolean,
|
|
@@ -748,7 +792,7 @@ export class V1_Engine {
|
|
|
748
792
|
// ------------------------------------------- Service -------------------------------------------
|
|
749
793
|
|
|
750
794
|
async getServerServiceInfo(): Promise<V1_ServiceConfigurationInfo> {
|
|
751
|
-
return (await this.engineServerClient.
|
|
795
|
+
return (await this.engineServerClient.TEMPORARY__getServerServiceInfo()) as unknown as V1_ServiceConfigurationInfo;
|
|
752
796
|
}
|
|
753
797
|
|
|
754
798
|
async registerService(
|
|
@@ -759,7 +803,7 @@ export class V1_Engine {
|
|
|
759
803
|
TEMPORARY__useGenerateLineage: boolean,
|
|
760
804
|
): Promise<V1_ServiceRegistrationResult> {
|
|
761
805
|
return V1_ServiceRegistrationResult.serialization.fromJson(
|
|
762
|
-
await this.engineServerClient.
|
|
806
|
+
await this.engineServerClient.INTERNAL__registerService(
|
|
763
807
|
V1_serializePureModelContext(input),
|
|
764
808
|
server,
|
|
765
809
|
executionMode,
|
|
@@ -774,7 +818,7 @@ export class V1_Engine {
|
|
|
774
818
|
serviceId: string,
|
|
775
819
|
): Promise<V1_ServiceStorage> {
|
|
776
820
|
return V1_ServiceStorage.serialization.fromJson(
|
|
777
|
-
await this.engineServerClient.
|
|
821
|
+
await this.engineServerClient.TEMPORARY__getServiceVersionInfo(
|
|
778
822
|
serviceUrl,
|
|
779
823
|
serviceId,
|
|
780
824
|
),
|
|
@@ -785,7 +829,7 @@ export class V1_Engine {
|
|
|
785
829
|
serviceUrl: string,
|
|
786
830
|
generationId: string,
|
|
787
831
|
): Promise<void> {
|
|
788
|
-
await this.engineServerClient.
|
|
832
|
+
await this.engineServerClient.TEMPORARY__activateGenerationId(
|
|
789
833
|
serviceUrl,
|
|
790
834
|
generationId,
|
|
791
835
|
);
|
|
@@ -22,10 +22,15 @@ import {
|
|
|
22
22
|
import {
|
|
23
23
|
LightQuery,
|
|
24
24
|
Query,
|
|
25
|
+
QueryParameterValue,
|
|
25
26
|
QueryStereotype,
|
|
26
27
|
QueryTaggedValue,
|
|
27
28
|
} from '../../../../../graph-manager/action/query/Query.js';
|
|
28
|
-
import {
|
|
29
|
+
import {
|
|
30
|
+
type V1_LightQuery,
|
|
31
|
+
V1_Query,
|
|
32
|
+
V1_QueryParameterValue,
|
|
33
|
+
} from './query/V1_Query.js';
|
|
29
34
|
import type { PureModel } from '../../../../../graph/PureModel.js';
|
|
30
35
|
import { PackageableElementExplicitReference } from '../../../../../graph/metamodel/pure/packageableElements/PackageableElementReference.js';
|
|
31
36
|
import { DEPRECATED__ServiceTestResult } from '../../../../../graph-manager/action/service/DEPRECATED__ServiceTestResult.js';
|
|
@@ -179,6 +184,20 @@ export const V1_buildQuery = (
|
|
|
179
184
|
);
|
|
180
185
|
return stereotype;
|
|
181
186
|
});
|
|
187
|
+
metamodel.defaultParameterValues = protocol.defaultParameterValues?.map(
|
|
188
|
+
(v) => {
|
|
189
|
+
const paramValue = new QueryParameterValue();
|
|
190
|
+
paramValue.name = guaranteeNonEmptyString(
|
|
191
|
+
v.name,
|
|
192
|
+
`Query Parameter 'name' field is missing or empty`,
|
|
193
|
+
);
|
|
194
|
+
paramValue.content = guaranteeNonEmptyString(
|
|
195
|
+
v.content,
|
|
196
|
+
`Query Parameter ${v.name} 'content' field is missing or empty`,
|
|
197
|
+
);
|
|
198
|
+
return paramValue;
|
|
199
|
+
},
|
|
200
|
+
);
|
|
182
201
|
|
|
183
202
|
return metamodel;
|
|
184
203
|
};
|
|
@@ -203,6 +222,14 @@ export const V1_transformQuery = (metamodel: Query): V1_Query => {
|
|
|
203
222
|
taggedValue.value = _taggedValue.value;
|
|
204
223
|
return taggedValue;
|
|
205
224
|
});
|
|
225
|
+
protocol.defaultParameterValues = metamodel.defaultParameterValues?.map(
|
|
226
|
+
(_defaultParams) => {
|
|
227
|
+
const vDefault = new V1_QueryParameterValue();
|
|
228
|
+
vDefault.name = _defaultParams.name;
|
|
229
|
+
vDefault.content = _defaultParams.content;
|
|
230
|
+
return vDefault;
|
|
231
|
+
},
|
|
232
|
+
);
|
|
206
233
|
protocol.stereotypes = metamodel.stereotypes?.map((_stereotype) => {
|
|
207
234
|
const stereotype = new V1_StereotypePtr();
|
|
208
235
|
stereotype.profile = _stereotype.profile;
|