@finos/legend-studio
Version:
92 lines • 3.93 kB
TypeScript
/**
* Copyright (c) 2020-present, Goldman Sachs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import type { EditorStore } from '../../../EditorStore.js';
import { ElementEditorState } from './../ElementEditorState.js';
import { DatabaseBuilderState } from './DatabaseBuilderState.js';
import { type PackageableElement, type Connection, type ValidationIssue, PackageableConnection, JsonModelConnection, FlatDataConnection, RelationalDatabaseConnection } from '@finos/legend-graph';
export declare abstract class ConnectionValueState {
editorStore: EditorStore;
connection: Connection;
constructor(editorStore: EditorStore, connection: Connection);
abstract label(): string;
}
export declare enum RELATIONAL_DATABASE_TAB_TYPE {
GENERAL = "GENERAL",
STORE = "STORE"
}
export declare enum CORE_DATASOURCE_SPEC_TYPE {
STATIC = "STATIC",
H2_LOCAL = "H2_LOCAL",
H2_EMBEDDED = "H2_EMBEDDED",
DATABRICKS = "DATABRICKS",
SNOWFLAKE = "SNOWFLAKE",
REDSHIFT = "REDSHIFT",
BIGQUERY = "BIGQUERY"
}
export declare enum CORE_AUTHENTICATION_STRATEGY_TYPE {
DELEGATED_KERBEROS = "DELEGATED_KERBEROS",
H2_DEFAULT = "H2_DEFAULT",
SNOWFLAKE_PUBLIC = "SNOWFLAKE_PUBLIC",
GCP_APPLICATION_DEFAULT_CREDENTIALS = "GCP_APPLICATION_DEFAULT_CREDENTIALS",
API_TOKEN = "API_TOKEN",
OAUTH = "OAUTH",
USERNAME_PASSWORD = "USERNAME_PASSWORD",
GCP_WORKLOAD_IDENTITY_FEDERATION = "GCP_WORKLOAD_IDENTITY_FEDERATION"
}
export declare class RelationalDatabaseConnectionValueState extends ConnectionValueState {
connection: RelationalDatabaseConnection;
selectedTab: RELATIONAL_DATABASE_TAB_TYPE;
databaseBuilderState: DatabaseBuilderState;
constructor(editorStore: EditorStore, connection: RelationalDatabaseConnection);
get storeValidationResult(): ValidationIssue | undefined;
setSelectedTab(val: RELATIONAL_DATABASE_TAB_TYPE): void;
label(): string;
get selectedDatasourceSpec(): string;
changeDatasourceSpec(type: string): void;
get selectedAuth(): string;
changeAuthenticationStrategy(type: string): void;
}
export declare class JsonModelConnectionValueState extends ConnectionValueState {
connection: JsonModelConnection;
constructor(editorStore: EditorStore, connection: JsonModelConnection);
label(): string;
}
export declare class FlatDataConnectionValueState extends ConnectionValueState {
connection: FlatDataConnection;
constructor(editorStore: EditorStore, connection: FlatDataConnection);
label(): string;
}
export declare class UnsupportedConnectionValueState extends ConnectionValueState {
label(): string;
}
export declare class ConnectionEditorState {
/**
* NOTE: used to force component remount on state change
*/
readonly uuid: string;
editorStore: EditorStore;
connection: Connection;
connectionValueState: ConnectionValueState;
constructor(editorStore: EditorStore, connection: Connection);
buildConnectionValueEditorState(): ConnectionValueState;
}
export declare class PackageableConnectionEditorState extends ElementEditorState {
connectionState: ConnectionEditorState;
constructor(editorStore: EditorStore, element: PackageableElement);
get connection(): PackageableConnection;
reprocess(newElement: PackageableElement, editorStore: EditorStore): ElementEditorState;
}
//# sourceMappingURL=ConnectionEditorState.d.ts.map