@finos/legend-application-studio 28.18.148 → 28.19.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.
- package/lib/application/LegendIngestionConfiguration.d.ts +1 -5
- package/lib/application/LegendIngestionConfiguration.d.ts.map +1 -1
- package/lib/application/LegendIngestionConfiguration.js +1 -8
- package/lib/application/LegendIngestionConfiguration.js.map +1 -1
- package/lib/components/ElementIconUtils.d.ts.map +1 -1
- package/lib/components/ElementIconUtils.js +3 -1
- package/lib/components/ElementIconUtils.js.map +1 -1
- package/lib/components/editor/editor-group/EditorGroup.d.ts +2 -0
- package/lib/components/editor/editor-group/EditorGroup.d.ts.map +1 -1
- package/lib/components/editor/editor-group/EditorGroup.js +6 -0
- package/lib/components/editor/editor-group/EditorGroup.js.map +1 -1
- package/lib/components/editor/editor-group/dataProduct/DataPoductEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/dataProduct/DataPoductEditor.js +140 -26
- package/lib/components/editor/editor-group/dataProduct/DataPoductEditor.js.map +1 -1
- package/lib/components/editor/editor-group/function-activator/FunctionEditor.d.ts +1 -0
- package/lib/components/editor/editor-group/function-activator/FunctionEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/function-activator/FunctionEditor.js +21 -3
- package/lib/components/editor/editor-group/function-activator/FunctionEditor.js.map +1 -1
- package/lib/{stores/ingestion/AdhocDataProductDeployResponse.js → components/editor/editor-group/function-activator/MemSQLFunctionActivatorEditor.d.ts} +3 -8
- package/lib/components/editor/editor-group/function-activator/MemSQLFunctionActivatorEditor.d.ts.map +1 -0
- package/lib/components/editor/editor-group/function-activator/MemSQLFunctionActivatorEditor.js +89 -0
- package/lib/components/editor/editor-group/function-activator/MemSQLFunctionActivatorEditor.js.map +1 -0
- package/lib/components/editor/editor-group/ingest-editor/IngestDefinitionEditor.js +1 -1
- package/lib/components/editor/editor-group/ingest-editor/IngestDefinitionEditor.js.map +1 -1
- package/lib/components/editor/editor-group/service-editor/ServiceExecutionQueryEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/service-editor/ServiceExecutionQueryEditor.js +1 -2
- package/lib/components/editor/editor-group/service-editor/ServiceExecutionQueryEditor.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -1
- package/lib/package.json +2 -1
- package/lib/stores/editor/EditorGraphState.d.ts.map +1 -1
- package/lib/stores/editor/EditorGraphState.js +4 -1
- package/lib/stores/editor/EditorGraphState.js.map +1 -1
- package/lib/stores/editor/EditorStore.d.ts +2 -2
- package/lib/stores/editor/EditorStore.d.ts.map +1 -1
- package/lib/stores/editor/EditorStore.js +2 -2
- package/lib/stores/editor/EditorStore.js.map +1 -1
- package/lib/stores/editor/EditorTabManagerState.d.ts.map +1 -1
- package/lib/stores/editor/EditorTabManagerState.js +5 -1
- package/lib/stores/editor/EditorTabManagerState.js.map +1 -1
- package/lib/stores/editor/data-cube/LegendStudioDataCubeHelper.d.ts +2 -2
- package/lib/stores/editor/data-cube/LegendStudioDataCubeHelper.d.ts.map +1 -1
- package/lib/stores/editor/data-cube/LegendStudioDataCubeHelper.js +4 -3
- package/lib/stores/editor/data-cube/LegendStudioDataCubeHelper.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/FunctionActivatorState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/FunctionActivatorState.js +14 -1
- package/lib/stores/editor/editor-state/element-editor-state/FunctionActivatorState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/FunctionEditorState.d.ts +3 -0
- package/lib/stores/editor/editor-state/element-editor-state/FunctionEditorState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/FunctionEditorState.js +24 -1
- package/lib/stores/editor/editor-state/element-editor-state/FunctionEditorState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.d.ts +9 -4
- package/lib/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.js +23 -4
- package/lib/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/function-activator/HostedServiceFunctionActivatorEditorState.js +3 -3
- package/lib/stores/editor/editor-state/element-editor-state/function-activator/HostedServiceFunctionActivatorEditorState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/function-activator/MemSQLFunctionActivatorEditorState.d.ts +33 -0
- package/lib/stores/editor/editor-state/element-editor-state/function-activator/MemSQLFunctionActivatorEditorState.d.ts.map +1 -0
- package/lib/stores/editor/editor-state/element-editor-state/function-activator/MemSQLFunctionActivatorEditorState.js +86 -0
- package/lib/stores/editor/editor-state/element-editor-state/function-activator/MemSQLFunctionActivatorEditorState.js.map +1 -0
- package/lib/stores/editor/editor-state/element-editor-state/function-activator/SnowflakeAppFunctionActivatorEditorState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/function-activator/SnowflakeAppFunctionActivatorEditorState.js +28 -2
- package/lib/stores/editor/editor-state/element-editor-state/function-activator/SnowflakeAppFunctionActivatorEditorState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/ingest/IngestDefinitionEditorState.d.ts +2 -3
- package/lib/stores/editor/editor-state/element-editor-state/ingest/IngestDefinitionEditorState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/ingest/IngestDefinitionEditorState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/service/ServiceExecutionState.d.ts +4 -1
- package/lib/stores/editor/editor-state/element-editor-state/service/ServiceExecutionState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/service/ServiceExecutionState.js +24 -1
- package/lib/stores/editor/editor-state/element-editor-state/service/ServiceExecutionState.js.map +1 -1
- package/lib/stores/editor/utils/ModelClassifierUtils.d.ts +1 -0
- package/lib/stores/editor/utils/ModelClassifierUtils.d.ts.map +1 -1
- package/lib/stores/editor/utils/ModelClassifierUtils.js +1 -0
- package/lib/stores/editor/utils/ModelClassifierUtils.js.map +1 -1
- package/lib/stores/graph-modifier/DSL_DataProduct_GraphModifierHelper.d.ts +3 -2
- package/lib/stores/graph-modifier/DSL_DataProduct_GraphModifierHelper.d.ts.map +1 -1
- package/lib/stores/graph-modifier/DSL_DataProduct_GraphModifierHelper.js +7 -4
- package/lib/stores/graph-modifier/DSL_DataProduct_GraphModifierHelper.js.map +1 -1
- package/package.json +9 -8
- package/src/application/LegendIngestionConfiguration.ts +1 -12
- package/src/components/ElementIconUtils.tsx +3 -0
- package/src/components/editor/editor-group/EditorGroup.tsx +10 -0
- package/src/components/editor/editor-group/dataProduct/DataPoductEditor.tsx +375 -65
- package/src/components/editor/editor-group/function-activator/FunctionEditor.tsx +40 -2
- package/src/components/editor/editor-group/function-activator/MemSQLFunctionActivatorEditor.tsx +269 -0
- package/src/components/editor/editor-group/ingest-editor/IngestDefinitionEditor.tsx +1 -1
- package/src/components/editor/editor-group/service-editor/ServiceExecutionQueryEditor.tsx +1 -2
- package/src/index.ts +2 -0
- package/src/stores/editor/EditorGraphState.ts +3 -0
- package/src/stores/editor/EditorStore.ts +7 -5
- package/src/stores/editor/EditorTabManagerState.ts +4 -0
- package/src/stores/editor/data-cube/LegendStudioDataCubeHelper.ts +14 -2
- package/src/stores/editor/editor-state/element-editor-state/FunctionActivatorState.ts +15 -0
- package/src/stores/editor/editor-state/element-editor-state/FunctionEditorState.ts +50 -0
- package/src/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.ts +31 -5
- package/src/stores/editor/editor-state/element-editor-state/function-activator/HostedServiceFunctionActivatorEditorState.ts +3 -3
- package/src/stores/editor/editor-state/element-editor-state/function-activator/MemSQLFunctionActivatorEditorState.ts +130 -0
- package/src/stores/editor/editor-state/element-editor-state/function-activator/SnowflakeAppFunctionActivatorEditorState.ts +38 -7
- package/src/stores/editor/editor-state/element-editor-state/ingest/IngestDefinitionEditorState.ts +3 -3
- package/src/stores/editor/editor-state/element-editor-state/service/ServiceExecutionState.ts +51 -0
- package/src/stores/editor/utils/ModelClassifierUtils.ts +1 -0
- package/src/stores/graph-modifier/DSL_DataProduct_GraphModifierHelper.ts +10 -4
- package/tsconfig.json +2 -5
- package/lib/stores/ingestion/AdhocDataProductDeployResponse.d.ts +0 -21
- package/lib/stores/ingestion/AdhocDataProductDeployResponse.d.ts.map +0 -1
- package/lib/stores/ingestion/AdhocDataProductDeployResponse.js.map +0 -1
- package/lib/stores/ingestion/IngestDeploymentServerClient.d.ts +0 -35
- package/lib/stores/ingestion/IngestDeploymentServerClient.d.ts.map +0 -1
- package/lib/stores/ingestion/IngestDeploymentServerClient.js +0 -58
- package/lib/stores/ingestion/IngestDeploymentServerClient.js.map +0 -1
- package/lib/stores/ingestion/IngestDiscoveryServerClient.d.ts +0 -26
- package/lib/stores/ingestion/IngestDiscoveryServerClient.d.ts.map +0 -1
- package/lib/stores/ingestion/IngestDiscoveryServerClient.js +0 -35
- package/lib/stores/ingestion/IngestDiscoveryServerClient.js.map +0 -1
- package/lib/stores/ingestion/IngestionDeploymentResponse.d.ts +0 -41
- package/lib/stores/ingestion/IngestionDeploymentResponse.d.ts.map +0 -1
- package/lib/stores/ingestion/IngestionDeploymentResponse.js +0 -56
- package/lib/stores/ingestion/IngestionDeploymentResponse.js.map +0 -1
- package/lib/stores/ingestion/IngestionManager.d.ts +0 -38
- package/lib/stores/ingestion/IngestionManager.d.ts.map +0 -1
- package/lib/stores/ingestion/IngestionManager.js +0 -111
- package/lib/stores/ingestion/IngestionManager.js.map +0 -1
- package/src/stores/ingestion/AdhocDataProductDeployResponse.ts +0 -29
- package/src/stores/ingestion/IngestDeploymentServerClient.ts +0 -112
- package/src/stores/ingestion/IngestDiscoveryServerClient.ts +0 -52
- package/src/stores/ingestion/IngestionDeploymentResponse.ts +0 -74
- package/src/stores/ingestion/IngestionManager.ts +0 -219
@@ -1,26 +0,0 @@
|
|
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
|
-
import { AbstractServerClient, type PlainObject } from '@finos/legend-shared';
|
17
|
-
import type { IngestDeploymentServerConfig } from '../../application/LegendIngestionConfiguration.js';
|
18
|
-
export declare class IngestDiscoveryServerClient extends AbstractServerClient {
|
19
|
-
constructor(url: string);
|
20
|
-
private _ingest;
|
21
|
-
private _env;
|
22
|
-
private _token;
|
23
|
-
discover(token?: string | undefined): Promise<PlainObject<IngestDeploymentServerConfig[]>>;
|
24
|
-
findProducerServer(id: number, level: string, token?: string | undefined): Promise<PlainObject<IngestDeploymentServerConfig>>;
|
25
|
-
}
|
26
|
-
//# sourceMappingURL=IngestDiscoveryServerClient.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"IngestDiscoveryServerClient.d.ts","sourceRoot":"","sources":["../../../src/stores/ingestion/IngestDiscoveryServerClient.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,oBAAoB,EAAE,KAAK,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC9E,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,mDAAmD,CAAC;AAEtG,qBAAa,2BAA4B,SAAQ,oBAAoB;gBACvD,GAAG,EAAE,MAAM;IAKvB,OAAO,CAAC,OAAO,CAC6C;IAE5D,OAAO,CAAC,IAAI,CAAiE;IAE7E,OAAO,CAAC,MAAM,CAEX;IAEH,QAAQ,CACN,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,GACzB,OAAO,CAAC,WAAW,CAAC,4BAA4B,EAAE,CAAC,CAAC;IAIvD,kBAAkB,CAChB,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,MAAM,EACb,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,GACzB,OAAO,CAAC,WAAW,CAAC,4BAA4B,CAAC,CAAC;CAOtD"}
|
@@ -1,35 +0,0 @@
|
|
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
|
-
import { AbstractServerClient } from '@finos/legend-shared';
|
17
|
-
export class IngestDiscoveryServerClient extends AbstractServerClient {
|
18
|
-
constructor(url) {
|
19
|
-
super({
|
20
|
-
baseUrl: url,
|
21
|
-
});
|
22
|
-
}
|
23
|
-
_ingest = () => `${this.baseUrl}/ingest/discovery/environments/producers`;
|
24
|
-
_env = () => `${this.baseUrl}/ingest/discovery/environments`;
|
25
|
-
_token = (token) => ({
|
26
|
-
Authorization: `Bearer ${token}`,
|
27
|
-
});
|
28
|
-
discover(token) {
|
29
|
-
return this.get(`${this._env()}`, {}, this._token(token));
|
30
|
-
}
|
31
|
-
findProducerServer(id, level, token) {
|
32
|
-
return this.get(`${this._ingest()}/${id}/${level}/search`, {}, this._token(token));
|
33
|
-
}
|
34
|
-
}
|
35
|
-
//# sourceMappingURL=IngestDiscoveryServerClient.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"IngestDiscoveryServerClient.js","sourceRoot":"","sources":["../../../src/stores/ingestion/IngestDiscoveryServerClient.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,oBAAoB,EAAoB,MAAM,sBAAsB,CAAC;AAG9E,MAAM,OAAO,2BAA4B,SAAQ,oBAAoB;IACnE,YAAY,GAAW;QACrB,KAAK,CAAC;YACJ,OAAO,EAAE,GAAG;SACb,CAAC,CAAC;IACL,CAAC;IACO,OAAO,GAAG,GAAW,EAAE,CAC7B,GAAG,IAAI,CAAC,OAAO,0CAA0C,CAAC;IAEpD,IAAI,GAAG,GAAW,EAAE,CAAC,GAAG,IAAI,CAAC,OAAO,gCAAgC,CAAC;IAErE,MAAM,GAAG,CAAC,KAAc,EAAE,EAAE,CAAC,CAAC;QACpC,aAAa,EAAE,UAAU,KAAK,EAAE;KACjC,CAAC,CAAC;IAEH,QAAQ,CACN,KAA0B;QAE1B,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IAC5D,CAAC;IAED,kBAAkB,CAChB,EAAU,EACV,KAAa,EACb,KAA0B;QAE1B,OAAO,IAAI,CAAC,GAAG,CACb,GAAG,IAAI,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,KAAK,SAAS,EACzC,EAAE,EACF,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CACnB,CAAC;IACJ,CAAC;CACF"}
|
@@ -1,41 +0,0 @@
|
|
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
|
-
import { SerializationFactory, type PlainObject } from '@finos/legend-shared';
|
17
|
-
export declare enum IngestDefinitionValidationResponseStatus {
|
18
|
-
NOT_CHECKED = "NOT_CHECKED",
|
19
|
-
SUCCESS = "SUCCESS",
|
20
|
-
FAILURE = "FAILURE"
|
21
|
-
}
|
22
|
-
export declare class IngestDefinitionValidationOutput {
|
23
|
-
status: IngestDefinitionValidationResponseStatus;
|
24
|
-
}
|
25
|
-
export declare class IngestDefinitionValidationResponse {
|
26
|
-
status: IngestDefinitionValidationResponseStatus;
|
27
|
-
content: PlainObject;
|
28
|
-
static readonly serialization: SerializationFactory<IngestDefinitionValidationResponse>;
|
29
|
-
}
|
30
|
-
export declare const createIngestDefinitionValidationResponse: (json: PlainObject<IngestDefinitionValidationResponse>) => IngestDefinitionValidationResponse;
|
31
|
-
export declare class IngestDefinitionDeploymentResponse {
|
32
|
-
ingestDefinitionUrn: string;
|
33
|
-
write_location: PlainObject | undefined;
|
34
|
-
static readonly serialization: SerializationFactory<IngestDefinitionDeploymentResponse>;
|
35
|
-
}
|
36
|
-
export declare class ValidateAndDeploymentResponse {
|
37
|
-
validationResponse: IngestDefinitionValidationResponse;
|
38
|
-
deploymentResponse: IngestDefinitionDeploymentResponse | undefined;
|
39
|
-
constructor(validationResponse: IngestDefinitionValidationResponse, deploymentResponse: IngestDefinitionDeploymentResponse | undefined);
|
40
|
-
}
|
41
|
-
//# sourceMappingURL=IngestionDeploymentResponse.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"IngestionDeploymentResponse.d.ts","sourceRoot":"","sources":["../../../src/stores/ingestion/IngestionDeploymentResponse.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,oBAAoB,EAAE,KAAK,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAG9E,oBAAY,wCAAwC;IAClD,WAAW,gBAAgB;IAC3B,OAAO,YAAY;IACnB,OAAO,YAAY;CACpB;AAED,qBAAa,gCAAgC;IAC3C,MAAM,EAAG,wCAAwC,CAAC;CACnD;AAED,qBAAa,kCAAkC;IAC7C,MAAM,EAAG,wCAAwC,CAAC;IAClD,OAAO,EAAG,WAAW,CAAC;IAEtB,MAAM,CAAC,QAAQ,CAAC,aAAa,2DAI3B;CACH;AAED,eAAO,MAAM,wCAAwC,GACnD,MAAM,WAAW,CAAC,kCAAkC,CAAC,KACpD,kCAOF,CAAC;AAEF,qBAAa,kCAAkC;IAC7C,mBAAmB,EAAG,MAAM,CAAC;IAC7B,cAAc,EAAE,WAAW,GAAG,SAAS,CAAC;IAExC,MAAM,CAAC,QAAQ,CAAC,aAAa,2DAI3B;CACH;AAED,qBAAa,6BAA6B;IACxC,kBAAkB,EAAE,kCAAkC,CAAC;IACvD,kBAAkB,EAAE,kCAAkC,GAAG,SAAS,CAAC;gBAGjE,kBAAkB,EAAE,kCAAkC,EACtD,kBAAkB,EAAE,kCAAkC,GAAG,SAAS;CAKrE"}
|
@@ -1,56 +0,0 @@
|
|
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
|
-
import { SerializationFactory } from '@finos/legend-shared';
|
17
|
-
import { createModelSchema, primitive } from 'serializr';
|
18
|
-
export var IngestDefinitionValidationResponseStatus;
|
19
|
-
(function (IngestDefinitionValidationResponseStatus) {
|
20
|
-
IngestDefinitionValidationResponseStatus["NOT_CHECKED"] = "NOT_CHECKED";
|
21
|
-
IngestDefinitionValidationResponseStatus["SUCCESS"] = "SUCCESS";
|
22
|
-
IngestDefinitionValidationResponseStatus["FAILURE"] = "FAILURE";
|
23
|
-
})(IngestDefinitionValidationResponseStatus || (IngestDefinitionValidationResponseStatus = {}));
|
24
|
-
export class IngestDefinitionValidationOutput {
|
25
|
-
status;
|
26
|
-
}
|
27
|
-
export class IngestDefinitionValidationResponse {
|
28
|
-
status;
|
29
|
-
content;
|
30
|
-
static serialization = new SerializationFactory(createModelSchema(IngestDefinitionValidationResponse, {
|
31
|
-
status: primitive(),
|
32
|
-
}));
|
33
|
-
}
|
34
|
-
export const createIngestDefinitionValidationResponse = (json) => {
|
35
|
-
const ingestDefinitionValidationResponse = new IngestDefinitionValidationResponse();
|
36
|
-
ingestDefinitionValidationResponse.status =
|
37
|
-
json.status;
|
38
|
-
ingestDefinitionValidationResponse.content = json;
|
39
|
-
return ingestDefinitionValidationResponse;
|
40
|
-
};
|
41
|
-
export class IngestDefinitionDeploymentResponse {
|
42
|
-
ingestDefinitionUrn;
|
43
|
-
write_location;
|
44
|
-
static serialization = new SerializationFactory(createModelSchema(IngestDefinitionDeploymentResponse, {
|
45
|
-
ingestDefinitionUrn: primitive(),
|
46
|
-
}));
|
47
|
-
}
|
48
|
-
export class ValidateAndDeploymentResponse {
|
49
|
-
validationResponse;
|
50
|
-
deploymentResponse;
|
51
|
-
constructor(validationResponse, deploymentResponse) {
|
52
|
-
this.validationResponse = validationResponse;
|
53
|
-
this.deploymentResponse = deploymentResponse;
|
54
|
-
}
|
55
|
-
}
|
56
|
-
//# sourceMappingURL=IngestionDeploymentResponse.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"IngestionDeploymentResponse.js","sourceRoot":"","sources":["../../../src/stores/ingestion/IngestionDeploymentResponse.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,oBAAoB,EAAoB,MAAM,sBAAsB,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEzD,MAAM,CAAN,IAAY,wCAIX;AAJD,WAAY,wCAAwC;IAClD,uEAA2B,CAAA;IAC3B,+DAAmB,CAAA;IACnB,+DAAmB,CAAA;AACrB,CAAC,EAJW,wCAAwC,KAAxC,wCAAwC,QAInD;AAED,MAAM,OAAO,gCAAgC;IAC3C,MAAM,CAA4C;CACnD;AAED,MAAM,OAAO,kCAAkC;IAC7C,MAAM,CAA4C;IAClD,OAAO,CAAe;IAEtB,MAAM,CAAU,aAAa,GAAG,IAAI,oBAAoB,CACtD,iBAAiB,CAAC,kCAAkC,EAAE;QACpD,MAAM,EAAE,SAAS,EAAE;KACpB,CAAC,CACH,CAAC;;AAGJ,MAAM,CAAC,MAAM,wCAAwC,GAAG,CACtD,IAAqD,EACjB,EAAE;IACtC,MAAM,kCAAkC,GACtC,IAAI,kCAAkC,EAAE,CAAC;IAC3C,kCAAkC,CAAC,MAAM;QACvC,IAAI,CAAC,MAAkD,CAAC;IAC1D,kCAAkC,CAAC,OAAO,GAAG,IAAI,CAAC;IAClD,OAAO,kCAAkC,CAAC;AAC5C,CAAC,CAAC;AAEF,MAAM,OAAO,kCAAkC;IAC7C,mBAAmB,CAAU;IAC7B,cAAc,CAA0B;IAExC,MAAM,CAAU,aAAa,GAAG,IAAI,oBAAoB,CACtD,iBAAiB,CAAC,kCAAkC,EAAE;QACpD,mBAAmB,EAAE,SAAS,EAAE;KACjC,CAAC,CACH,CAAC;;AAGJ,MAAM,OAAO,6BAA6B;IACxC,kBAAkB,CAAqC;IACvD,kBAAkB,CAAiD;IAEnE,YACE,kBAAsD,EACtD,kBAAkE;QAElE,IAAI,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;QAC7C,IAAI,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;IAC/C,CAAC;CACF"}
|
@@ -1,38 +0,0 @@
|
|
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
|
-
import type { AppDirNode } from '@finos/legend-graph';
|
17
|
-
import type { GenericLegendApplicationStore } from '@finos/legend-application';
|
18
|
-
import { ValidateAndDeploymentResponse } from './IngestionDeploymentResponse.js';
|
19
|
-
import { type LegendIngestionConfiguration } from '../../application/LegendIngestionConfiguration.js';
|
20
|
-
import { type AdhocDataProductDeployResponse } from './AdhocDataProductDeployResponse.js';
|
21
|
-
export declare class IngestionManager {
|
22
|
-
private readonly applicationStore;
|
23
|
-
private ingestDiscoveryServerClient;
|
24
|
-
private ingestDeploymentServerClient;
|
25
|
-
private _currentAppID;
|
26
|
-
private _currentLevel;
|
27
|
-
private useDefaultServer;
|
28
|
-
constructor(config: LegendIngestionConfiguration, applicationStore: GenericLegendApplicationStore);
|
29
|
-
isCurrentAppDirNode(appDirNode: AppDirNode): boolean;
|
30
|
-
setCurrentAppDirNode(appDirNode: AppDirNode): void;
|
31
|
-
deploy(ingestDefinition: string, appDirNode: AppDirNode, messageCallBack: (message: string) => void, token: string | undefined): Promise<ValidateAndDeploymentResponse>;
|
32
|
-
deployDataProduct(grammarText: string, appDirNode: AppDirNode, messageCallBack: (message: string) => void, token: string | undefined): Promise<AdhocDataProductDeployResponse>;
|
33
|
-
private _validate;
|
34
|
-
private _deploy;
|
35
|
-
private _fetchDeployLocations;
|
36
|
-
private identifyIngestDeploymentServer;
|
37
|
-
}
|
38
|
-
//# sourceMappingURL=IngestionManager.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"IngestionManager.d.ts","sourceRoot":"","sources":["../../../src/stores/ingestion/IngestionManager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAGtD,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,2BAA2B,CAAC;AAM/E,OAAO,EAIL,6BAA6B,EAE9B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAEL,KAAK,4BAA4B,EAClC,MAAM,mDAAmD,CAAC;AAC3D,OAAO,EAEL,KAAK,8BAA8B,EACpC,MAAM,qCAAqC,CAAC;AAE7C,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAgC;IACjE,OAAO,CAAC,2BAA2B,CAA8B;IACjE,OAAO,CAAC,4BAA4B,CAA+B;IACnE,OAAO,CAAC,aAAa,CAAqB;IAC1C,OAAO,CAAC,aAAa,CAAqB;IAC1C,OAAO,CAAC,gBAAgB,CAAS;gBAG/B,MAAM,EAAE,4BAA4B,EACpC,gBAAgB,EAAE,6BAA6B;IAkBjD,mBAAmB,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO;IAOpD,oBAAoB,CAAC,UAAU,EAAE,UAAU,GAAG,IAAI;IAK5C,MAAM,CACV,gBAAgB,EAAE,MAAM,EACxB,UAAU,EAAE,UAAU,EACtB,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,EAC1C,KAAK,EAAE,MAAM,GAAG,SAAS,GACxB,OAAO,CAAC,6BAA6B,CAAC;IAyCnC,iBAAiB,CACrB,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,UAAU,EACtB,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,EAC1C,KAAK,EAAE,MAAM,GAAG,SAAS,GACxB,OAAO,CAAC,8BAA8B,CAAC;YAgB5B,SAAS;YAyBT,OAAO;YAgBP,qBAAqB;YAWrB,8BAA8B;CAkB7C"}
|
@@ -1,111 +0,0 @@
|
|
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
|
-
import { IngestDeploymentServerClient } from './IngestDeploymentServerClient.js';
|
17
|
-
import { IngestDiscoveryServerClient } from './IngestDiscoveryServerClient.js';
|
18
|
-
import { NetworkClientError, assertErrorThrown, } from '@finos/legend-shared';
|
19
|
-
import { IngestDefinitionDeploymentResponse, IngestDefinitionValidationResponseStatus, ValidateAndDeploymentResponse, createIngestDefinitionValidationResponse, } from './IngestionDeploymentResponse.js';
|
20
|
-
import { IngestDeploymentServerConfig, } from '../../application/LegendIngestionConfiguration.js';
|
21
|
-
import { createAdhocDataProductDeployResponse, } from './AdhocDataProductDeployResponse.js';
|
22
|
-
export class IngestionManager {
|
23
|
-
applicationStore;
|
24
|
-
ingestDiscoveryServerClient;
|
25
|
-
ingestDeploymentServerClient;
|
26
|
-
_currentAppID;
|
27
|
-
_currentLevel;
|
28
|
-
useDefaultServer = false;
|
29
|
-
constructor(config, applicationStore) {
|
30
|
-
this.ingestDiscoveryServerClient = new IngestDiscoveryServerClient(config.discoveryUrl);
|
31
|
-
this.ingestDiscoveryServerClient.setTracerService(applicationStore.tracerService);
|
32
|
-
this.ingestDeploymentServerClient = new IngestDeploymentServerClient(config.deployment.defaultServer);
|
33
|
-
this.ingestDeploymentServerClient.setTracerService(applicationStore.tracerService);
|
34
|
-
this.useDefaultServer = Boolean(config.deployment.useDefaultServer);
|
35
|
-
this.applicationStore = applicationStore;
|
36
|
-
}
|
37
|
-
isCurrentAppDirNode(appDirNode) {
|
38
|
-
return (this._currentAppID === appDirNode.appDirId &&
|
39
|
-
this._currentLevel === appDirNode.level);
|
40
|
-
}
|
41
|
-
setCurrentAppDirNode(appDirNode) {
|
42
|
-
this._currentAppID = appDirNode.appDirId;
|
43
|
-
this._currentLevel = appDirNode.level;
|
44
|
-
}
|
45
|
-
async deploy(ingestDefinition, appDirNode, messageCallBack, token) {
|
46
|
-
messageCallBack(`Discovering associated ingest environment for DID ${appDirNode.appDirId}...`);
|
47
|
-
await this.identifyIngestDeploymentServer(appDirNode, token);
|
48
|
-
messageCallBack(`Validating ingest with server ${this.ingestDeploymentServerClient.baseUrl ?? ''} for realm ${this.ingestDeploymentServerClient.environmentClassification}...`);
|
49
|
-
const validateResonse = await this._validate(ingestDefinition, undefined, token);
|
50
|
-
const fullResponse = new ValidateAndDeploymentResponse(validateResonse, undefined);
|
51
|
-
if (validateResonse.status !==
|
52
|
-
IngestDefinitionValidationResponseStatus.SUCCESS) {
|
53
|
-
return fullResponse;
|
54
|
-
}
|
55
|
-
messageCallBack(`Validation Success. Deploying ingest with server ${this.ingestDeploymentServerClient.baseUrl ?? ''} for realm ${this.ingestDeploymentServerClient.environmentClassification}...`);
|
56
|
-
const deployResponse = await this._deploy(ingestDefinition, undefined, token);
|
57
|
-
try {
|
58
|
-
messageCallBack(`Deployment Success. Fetching write location...`);
|
59
|
-
await this._fetchDeployLocations(deployResponse, token);
|
60
|
-
}
|
61
|
-
catch (error) {
|
62
|
-
assertErrorThrown(error);
|
63
|
-
}
|
64
|
-
return fullResponse;
|
65
|
-
}
|
66
|
-
async deployDataProduct(grammarText, appDirNode, messageCallBack, token) {
|
67
|
-
messageCallBack(`Discovering associated data product environment for DID ${appDirNode.appDirId}...`);
|
68
|
-
await this.identifyIngestDeploymentServer(appDirNode, token);
|
69
|
-
messageCallBack(`Deploying data product with server ${this.ingestDeploymentServerClient.baseUrl ?? ''} for realm ${this.ingestDeploymentServerClient.environmentClassification}...`);
|
70
|
-
const deployResponse = await this.ingestDeploymentServerClient.deployDataProduct(grammarText, token);
|
71
|
-
return createAdhocDataProductDeployResponse(deployResponse);
|
72
|
-
}
|
73
|
-
async _validate(ingestDefinition, appDirNode, token) {
|
74
|
-
if (appDirNode) {
|
75
|
-
await this.identifyIngestDeploymentServer(appDirNode, token);
|
76
|
-
}
|
77
|
-
try {
|
78
|
-
const response = await this.ingestDeploymentServerClient.validate(ingestDefinition, token);
|
79
|
-
return createIngestDefinitionValidationResponse(response);
|
80
|
-
}
|
81
|
-
catch (error) {
|
82
|
-
assertErrorThrown(error);
|
83
|
-
if (error instanceof NetworkClientError) {
|
84
|
-
return createIngestDefinitionValidationResponse(error.payload);
|
85
|
-
}
|
86
|
-
throw error;
|
87
|
-
}
|
88
|
-
}
|
89
|
-
async _deploy(ingestDefinition, appDirNode, token) {
|
90
|
-
if (appDirNode) {
|
91
|
-
await this.identifyIngestDeploymentServer(appDirNode, token);
|
92
|
-
}
|
93
|
-
// validate
|
94
|
-
const response = (await this.ingestDeploymentServerClient.deploy(ingestDefinition, token));
|
95
|
-
return IngestDefinitionDeploymentResponse.serialization.fromJson(response);
|
96
|
-
}
|
97
|
-
async _fetchDeployLocations(depploymentResponse, token) {
|
98
|
-
const response = (await this.ingestDeploymentServerClient.write_location(depploymentResponse.ingestDefinitionUrn, token));
|
99
|
-
depploymentResponse.write_location = response;
|
100
|
-
}
|
101
|
-
async identifyIngestDeploymentServer(appDirNode, token) {
|
102
|
-
// we do not change if current appDirNode is the same as the one we are trying to set
|
103
|
-
if (this.useDefaultServer || this.isCurrentAppDirNode(appDirNode)) {
|
104
|
-
return;
|
105
|
-
}
|
106
|
-
const serverConfig = IngestDeploymentServerConfig.serialization.fromJson(await this.ingestDiscoveryServerClient.findProducerServer(appDirNode.appDirId, appDirNode.level, token));
|
107
|
-
this.ingestDeploymentServerClient.changeServer(serverConfig);
|
108
|
-
this.setCurrentAppDirNode(appDirNode);
|
109
|
-
}
|
110
|
-
}
|
111
|
-
//# sourceMappingURL=IngestionManager.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"IngestionManager.js","sourceRoot":"","sources":["../../../src/stores/ingestion/IngestionManager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AACjF,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAE/E,OAAO,EACL,kBAAkB,EAElB,iBAAiB,GAClB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAEL,kCAAkC,EAClC,wCAAwC,EACxC,6BAA6B,EAC7B,wCAAwC,GACzC,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,4BAA4B,GAE7B,MAAM,mDAAmD,CAAC;AAC3D,OAAO,EACL,oCAAoC,GAErC,MAAM,qCAAqC,CAAC;AAE7C,MAAM,OAAO,gBAAgB;IACV,gBAAgB,CAAgC;IACzD,2BAA2B,CAA8B;IACzD,4BAA4B,CAA+B;IAC3D,aAAa,CAAqB;IAClC,aAAa,CAAqB;IAClC,gBAAgB,GAAG,KAAK,CAAC;IAEjC,YACE,MAAoC,EACpC,g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AI,IAAI,CAAC,mBAAmB,CAAC,UAAU,CAAC,EAAE,CAAC;YAClE,OAAO;QACT,CAAC;QACD,MAAM,YAAY,GAAG,4BAA4B,CAAC,aAAa,CAAC,QAAQ,CACtE,MAAM,IAAI,CAAC,2BAA2B,CAAC,kBAAkB,CACvD,UAAU,CAAC,QAAQ,EACnB,UAAU,CAAC,KAAK,EAChB,KAAK,CACN,CACF,CAAC;QACF,IAAI,CAAC,4BAA4B,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC;QAC7D,IAAI,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC;IACxC,CAAC;CACF"}
|
@@ -1,29 +0,0 @@
|
|
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 type { PlainObject } from '@finos/legend-shared';
|
18
|
-
|
19
|
-
export class AdhocDataProductDeployResponse {
|
20
|
-
content!: PlainObject;
|
21
|
-
}
|
22
|
-
|
23
|
-
export const createAdhocDataProductDeployResponse = (
|
24
|
-
json: PlainObject<AdhocDataProductDeployResponse>,
|
25
|
-
): AdhocDataProductDeployResponse => {
|
26
|
-
const response = new AdhocDataProductDeployResponse();
|
27
|
-
response.content = json;
|
28
|
-
return response;
|
29
|
-
};
|
@@ -1,112 +0,0 @@
|
|
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 {
|
18
|
-
AbstractServerClient,
|
19
|
-
ContentType,
|
20
|
-
HttpHeader,
|
21
|
-
type PlainObject,
|
22
|
-
} from '@finos/legend-shared';
|
23
|
-
import { makeObservable, observable } from 'mobx';
|
24
|
-
import type {
|
25
|
-
IngestDefinitionDeploymentResponse,
|
26
|
-
IngestDefinitionValidationResponse,
|
27
|
-
} from './IngestionDeploymentResponse.js';
|
28
|
-
import type { IngestDeploymentServerConfig } from '../../application/LegendIngestionConfiguration.js';
|
29
|
-
import type { AdhocDataProductDeployResponse } from './AdhocDataProductDeployResponse.js';
|
30
|
-
|
31
|
-
export class IngestDeploymentServerClient extends AbstractServerClient {
|
32
|
-
environmentClassification: string;
|
33
|
-
|
34
|
-
private DATA_PRODUCT_URL = 'data-product';
|
35
|
-
constructor(config: IngestDeploymentServerConfig) {
|
36
|
-
super({
|
37
|
-
baseUrl: config.ingestServerUrl,
|
38
|
-
});
|
39
|
-
this.environmentClassification = config.environmentClassification;
|
40
|
-
makeObservable(this, {
|
41
|
-
environmentClassification: observable,
|
42
|
-
baseUrl: observable,
|
43
|
-
});
|
44
|
-
}
|
45
|
-
|
46
|
-
private _token = (token?: string) => ({
|
47
|
-
Authorization: `Bearer ${token}`,
|
48
|
-
});
|
49
|
-
|
50
|
-
private _tokenWithTextPlain = (token?: string) => ({
|
51
|
-
[HttpHeader.CONTENT_TYPE]: ContentType.TEXT_PLAIN,
|
52
|
-
Authorization: `Bearer ${token}`,
|
53
|
-
});
|
54
|
-
|
55
|
-
private _dataProduct = (): string =>
|
56
|
-
`${this.baseUrl}/${this.DATA_PRODUCT_URL}/api/entitlements/sdlc/deploy/definitions`;
|
57
|
-
|
58
|
-
private _ingestDefinitions = (): string =>
|
59
|
-
`${this.baseUrl}/api/ingest/sdlc/deploy/definitions`;
|
60
|
-
|
61
|
-
private _ingest = (): string => `${this.baseUrl}/api/ingest`;
|
62
|
-
|
63
|
-
changeServer(serverConfig: IngestDeploymentServerConfig): void {
|
64
|
-
this.baseUrl = serverConfig.ingestServerUrl;
|
65
|
-
this.environmentClassification = serverConfig.environmentClassification;
|
66
|
-
}
|
67
|
-
|
68
|
-
validate(
|
69
|
-
validateGrammar: string,
|
70
|
-
token: string | undefined,
|
71
|
-
): Promise<PlainObject<IngestDefinitionValidationResponse>> {
|
72
|
-
return this.post(
|
73
|
-
`${this._ingestDefinitions()}/validate`,
|
74
|
-
validateGrammar,
|
75
|
-
undefined,
|
76
|
-
this._tokenWithTextPlain(token),
|
77
|
-
);
|
78
|
-
}
|
79
|
-
|
80
|
-
deploy(
|
81
|
-
deployGrammar: string,
|
82
|
-
token: string | undefined,
|
83
|
-
): Promise<IngestDefinitionDeploymentResponse> {
|
84
|
-
return this.post(
|
85
|
-
`${this._ingestDefinitions()}`,
|
86
|
-
deployGrammar,
|
87
|
-
undefined,
|
88
|
-
this._tokenWithTextPlain(token),
|
89
|
-
);
|
90
|
-
}
|
91
|
-
|
92
|
-
write_location(urn: string, token: string | undefined): Promise<PlainObject> {
|
93
|
-
return this.post(
|
94
|
-
`${this._ingest()}/${encodeURIComponent(urn)}/write-location`,
|
95
|
-
undefined,
|
96
|
-
undefined,
|
97
|
-
this._token(token),
|
98
|
-
);
|
99
|
-
}
|
100
|
-
|
101
|
-
deployDataProduct(
|
102
|
-
fullGrammar: string,
|
103
|
-
token: string | undefined,
|
104
|
-
): Promise<PlainObject<AdhocDataProductDeployResponse>> {
|
105
|
-
return this.post(
|
106
|
-
`${this._dataProduct()}`,
|
107
|
-
fullGrammar,
|
108
|
-
undefined,
|
109
|
-
this._token(token),
|
110
|
-
);
|
111
|
-
}
|
112
|
-
}
|
@@ -1,52 +0,0 @@
|
|
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 { AbstractServerClient, type PlainObject } from '@finos/legend-shared';
|
18
|
-
import type { IngestDeploymentServerConfig } from '../../application/LegendIngestionConfiguration.js';
|
19
|
-
|
20
|
-
export class IngestDiscoveryServerClient extends AbstractServerClient {
|
21
|
-
constructor(url: string) {
|
22
|
-
super({
|
23
|
-
baseUrl: url,
|
24
|
-
});
|
25
|
-
}
|
26
|
-
private _ingest = (): string =>
|
27
|
-
`${this.baseUrl}/ingest/discovery/environments/producers`;
|
28
|
-
|
29
|
-
private _env = (): string => `${this.baseUrl}/ingest/discovery/environments`;
|
30
|
-
|
31
|
-
private _token = (token?: string) => ({
|
32
|
-
Authorization: `Bearer ${token}`,
|
33
|
-
});
|
34
|
-
|
35
|
-
discover(
|
36
|
-
token?: string | undefined,
|
37
|
-
): Promise<PlainObject<IngestDeploymentServerConfig[]>> {
|
38
|
-
return this.get(`${this._env()}`, {}, this._token(token));
|
39
|
-
}
|
40
|
-
|
41
|
-
findProducerServer(
|
42
|
-
id: number,
|
43
|
-
level: string,
|
44
|
-
token?: string | undefined,
|
45
|
-
): Promise<PlainObject<IngestDeploymentServerConfig>> {
|
46
|
-
return this.get(
|
47
|
-
`${this._ingest()}/${id}/${level}/search`,
|
48
|
-
{},
|
49
|
-
this._token(token),
|
50
|
-
);
|
51
|
-
}
|
52
|
-
}
|
@@ -1,74 +0,0 @@
|
|
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, type PlainObject } from '@finos/legend-shared';
|
18
|
-
import { createModelSchema, primitive } from 'serializr';
|
19
|
-
|
20
|
-
export enum IngestDefinitionValidationResponseStatus {
|
21
|
-
NOT_CHECKED = 'NOT_CHECKED',
|
22
|
-
SUCCESS = 'SUCCESS',
|
23
|
-
FAILURE = 'FAILURE',
|
24
|
-
}
|
25
|
-
|
26
|
-
export class IngestDefinitionValidationOutput {
|
27
|
-
status!: IngestDefinitionValidationResponseStatus;
|
28
|
-
}
|
29
|
-
|
30
|
-
export class IngestDefinitionValidationResponse {
|
31
|
-
status!: IngestDefinitionValidationResponseStatus;
|
32
|
-
content!: PlainObject;
|
33
|
-
|
34
|
-
static readonly serialization = new SerializationFactory(
|
35
|
-
createModelSchema(IngestDefinitionValidationResponse, {
|
36
|
-
status: primitive(),
|
37
|
-
}),
|
38
|
-
);
|
39
|
-
}
|
40
|
-
|
41
|
-
export const createIngestDefinitionValidationResponse = (
|
42
|
-
json: PlainObject<IngestDefinitionValidationResponse>,
|
43
|
-
): IngestDefinitionValidationResponse => {
|
44
|
-
const ingestDefinitionValidationResponse =
|
45
|
-
new IngestDefinitionValidationResponse();
|
46
|
-
ingestDefinitionValidationResponse.status =
|
47
|
-
json.status as IngestDefinitionValidationResponseStatus;
|
48
|
-
ingestDefinitionValidationResponse.content = json;
|
49
|
-
return ingestDefinitionValidationResponse;
|
50
|
-
};
|
51
|
-
|
52
|
-
export class IngestDefinitionDeploymentResponse {
|
53
|
-
ingestDefinitionUrn!: string;
|
54
|
-
write_location: PlainObject | undefined;
|
55
|
-
|
56
|
-
static readonly serialization = new SerializationFactory(
|
57
|
-
createModelSchema(IngestDefinitionDeploymentResponse, {
|
58
|
-
ingestDefinitionUrn: primitive(),
|
59
|
-
}),
|
60
|
-
);
|
61
|
-
}
|
62
|
-
|
63
|
-
export class ValidateAndDeploymentResponse {
|
64
|
-
validationResponse: IngestDefinitionValidationResponse;
|
65
|
-
deploymentResponse: IngestDefinitionDeploymentResponse | undefined;
|
66
|
-
|
67
|
-
constructor(
|
68
|
-
validationResponse: IngestDefinitionValidationResponse,
|
69
|
-
deploymentResponse: IngestDefinitionDeploymentResponse | undefined,
|
70
|
-
) {
|
71
|
-
this.validationResponse = validationResponse;
|
72
|
-
this.deploymentResponse = deploymentResponse;
|
73
|
-
}
|
74
|
-
}
|