diff --git a/webapp/packages/core-connections/src/locales/en.ts b/webapp/packages/core-connections/src/locales/en.ts index dad249176e..d52f4dfea9 100644 --- a/webapp/packages/core-connections/src/locales/en.ts +++ b/webapp/packages/core-connections/src/locales/en.ts @@ -58,6 +58,8 @@ export default [ ['connections_network_handler_ssh_tunnel_port', 'Port'], ['connections_network_handler_ssh_tunnel_user', 'User'], ['connections_network_handler_ssh_tunnel_password', 'Password'], + ['connections_network_handler_ssh_tunnel_auth_type', 'Authentication method'], + ['connections_network_handler_ssh_tunnel_private_key', 'Private key'], ['connections_driver_search_placeholder', 'Type driver name...'], ['connections_not_found', 'No database connections were found'], diff --git a/webapp/packages/core-connections/src/locales/it.ts b/webapp/packages/core-connections/src/locales/it.ts index 026b44b8fd..8aa99ccb5e 100644 --- a/webapp/packages/core-connections/src/locales/it.ts +++ b/webapp/packages/core-connections/src/locales/it.ts @@ -60,6 +60,8 @@ export default [ ['connections_network_handler_ssh_tunnel_port', 'Porta'], ['connections_network_handler_ssh_tunnel_user', 'Utente'], ['connections_network_handler_ssh_tunnel_password', 'Password'], + ['connections_network_handler_ssh_tunnel_auth_type', 'Authentication method'], + ['connections_network_handler_ssh_tunnel_private_key', 'Private key'], ['connections_driver_search_placeholder', 'Digita il nome del driver...'], ['connections_not_found', 'Nessuna connessione al database trovata'], diff --git a/webapp/packages/core-connections/src/locales/ru.ts b/webapp/packages/core-connections/src/locales/ru.ts index 2b3ba45c10..3d9c1e616f 100644 --- a/webapp/packages/core-connections/src/locales/ru.ts +++ b/webapp/packages/core-connections/src/locales/ru.ts @@ -55,6 +55,8 @@ export default [ ['connections_network_handler_ssh_tunnel_port', 'Порт'], ['connections_network_handler_ssh_tunnel_user', 'Пользователь'], ['connections_network_handler_ssh_tunnel_password', 'Пароль'], + ['connections_network_handler_ssh_tunnel_auth_type', 'Метод аутентификации'], + ['connections_network_handler_ssh_tunnel_private_key', 'Приватный ключ'], ['connections_driver_search_placeholder', 'Введите название драйвера...'], ['connections_not_found', 'Подключения к базам данных не найдены'], diff --git a/webapp/packages/core-connections/src/locales/zh.ts b/webapp/packages/core-connections/src/locales/zh.ts index 6dac937016..16a3f5f046 100644 --- a/webapp/packages/core-connections/src/locales/zh.ts +++ b/webapp/packages/core-connections/src/locales/zh.ts @@ -1,65 +1,67 @@ export default [ - ['connections_administration_item', '连接管理'], - ['connections_administration_connection_create', '添加数据库'], - ['connections_administration_search_database_tip', '在此处输入您的主机,例如“localhost host1.myhost.com 192.168.0.1”然后按 Enter'], - ['connections_administration_new_connection', '新连接'], - ['connections_administration_connection_create_error', '创建连接失败'], - ['connections_administration_connection_save_error', '保存链接失败'], - ['connections_administration_connection_access_empty', '没有可用用户和角色'], - ['connections_administration_configuration_wizard_step_title', '数据库连接'], - ['connections_administration_configuration_wizard_step_description', '添加数据库连接'], - ['connections_administration_configuration_wizard_title', '添加数据库连接'], - ['connections_administration_configuration_wizard_message', '您可以在此处手动创建数据库连接或使用数据库服务器搜索。您可以跳过此步骤并稍后配置连接。'], - ['connections_administration_connection_no_information', '没有可用信息'], - ['connections_administration_delete_confirmation', "您将删除这些连接:"], - ['connections_administration_tools_add_tooltip', '添加新连接'], - ['connections_administration_tools_refresh_tooltip', '刷新连接列表'], - ['connections_administration_tools_delete_tooltip', '删除选中的连接'], - ['connections_administration_tools_refresh_success', '连接列表已刷新'], - ['connections_administration_tools_refresh_fail', '连接列表刷新失败'], - ['connections_database_authentication', '数据库认证'], - ['connections_connection_edit_not_own_deny', '此连接由管理员创建。它无法更新。'], - ['connections_connection_connect', '连接'], - ['connections_connection_create_custom', '自定义'], - ['connections_connection_create_search_database', '搜索'], - ['connections_connection_edit_save_credentials', '保存凭据'], - ['connections_connection_credentials_provisioning', '认证凭据'], - ['connections_connection_credentials_provisioning_description', '您却要填写或确认凭据以测试此连接。'], - ['connections_connection_edit_authentication', '认证'], - ['connections_connection_edit_settings', '设置'], - ['connections_connection_edit_access', '权限'], - ['connections_connection_edit_access_load_failed', '无法获取连接访问权限'], - ['connections_connection_edit_access_role', '角色'], - ['connections_connection_edit_search', '搜索'], - ['connections_connection_edit_search_hosts', '主机名称'], - ['connections_connection_address', '地址'], - ['connections_connection_name', '连接名称'], - ['connections_connection_access_user_or_role_name', '用户或角色名称'], - ['connections_connection_access_filter_placeholder', '搜索用户或角色名称'], - ['connections_connection_access_admin_info', '管理员查看所有连接。'], - ['connections_connection_description', '描述'], - ['connections_connection_driver', '驱动'], - ['connections_connection_host', '主机'], - ['connections_connection_port', '端口'], - ['connections_connection_template', '模板'], - ['connections_connection_test', '测试连接'], - ['connections_connection_test_fail', '连接测试失败'], - ['connections_connection_create_fail', '无法创建连接'], - ['connections_connection_save_fail', '无法保存连接'], - ['connections_network_handler_test', '测试隧道'], - ['connections_network_handler_test_fail', '隧道测试失败'], - ['connections_network_handler_test_success', '隧道测试成功'], - ['connections_network_handler_default_title', '网络处理程序'], - ['connections_network_handler_default_user', '用户'], - ['connections_network_handler_default_password', '密码'], - ['connections_network_handler_ssh_tunnel_title', 'SSH隧道'], - ['connections_network_handler_ssh_tunnel_enable', '使用SSH隧道'], - ['connections_network_handler_ssh_tunnel_host', '主机'], - ['connections_network_handler_ssh_tunnel_port', '端口'], - ['connections_network_handler_ssh_tunnel_user', '用户'], - ['connections_network_handler_ssh_tunnel_password', '密码'], - ['connections_driver_search_placeholder', '输入驱动名称...'], - ['connections_not_found', '未找到数据库连接'], + ['connections_administration_item', '连接管理'], + ['connections_administration_connection_create', '添加数据库'], + ['connections_administration_search_database_tip', '在此处输入您的主机,例如“localhost host1.myhost.com 192.168.0.1”然后按 Enter'], + ['connections_administration_new_connection', '新连接'], + ['connections_administration_connection_create_error', '创建连接失败'], + ['connections_administration_connection_save_error', '保存链接失败'], + ['connections_administration_connection_access_empty', '没有可用用户和角色'], + ['connections_administration_configuration_wizard_step_title', '数据库连接'], + ['connections_administration_configuration_wizard_step_description', '添加数据库连接'], + ['connections_administration_configuration_wizard_title', '添加数据库连接'], + ['connections_administration_configuration_wizard_message', '您可以在此处手动创建数据库连接或使用数据库服务器搜索。您可以跳过此步骤并稍后配置连接。'], + ['connections_administration_connection_no_information', '没有可用信息'], + ['connections_administration_delete_confirmation', "您将删除这些连接:"], + ['connections_administration_tools_add_tooltip', '添加新连接'], + ['connections_administration_tools_refresh_tooltip', '刷新连接列表'], + ['connections_administration_tools_delete_tooltip', '删除选中的连接'], + ['connections_administration_tools_refresh_success', '连接列表已刷新'], + ['connections_administration_tools_refresh_fail', '连接列表刷新失败'], + ['connections_database_authentication', '数据库认证'], + ['connections_connection_edit_not_own_deny', '此连接由管理员创建。它无法更新。'], + ['connections_connection_connect', '连接'], + ['connections_connection_create_custom', '自定义'], + ['connections_connection_create_search_database', '搜索'], + ['connections_connection_edit_save_credentials', '保存凭据'], + ['connections_connection_credentials_provisioning', '认证凭据'], + ['connections_connection_credentials_provisioning_description', '您却要填写或确认凭据以测试此连接。'], + ['connections_connection_edit_authentication', '认证'], + ['connections_connection_edit_settings', '设置'], + ['connections_connection_edit_access', '权限'], + ['connections_connection_edit_access_load_failed', '无法获取连接访问权限'], + ['connections_connection_edit_access_role', '角色'], + ['connections_connection_edit_search', '搜索'], + ['connections_connection_edit_search_hosts', '主机名称'], + ['connections_connection_address', '地址'], + ['connections_connection_name', '连接名称'], + ['connections_connection_access_user_or_role_name', '用户或角色名称'], + ['connections_connection_access_filter_placeholder', '搜索用户或角色名称'], + ['connections_connection_access_admin_info', '管理员查看所有连接。'], + ['connections_connection_description', '描述'], + ['connections_connection_driver', '驱动'], + ['connections_connection_host', '主机'], + ['connections_connection_port', '端口'], + ['connections_connection_template', '模板'], + ['connections_connection_test', '测试连接'], + ['connections_connection_test_fail', '连接测试失败'], + ['connections_connection_create_fail', '无法创建连接'], + ['connections_connection_save_fail', '无法保存连接'], + ['connections_network_handler_test', '测试隧道'], + ['connections_network_handler_test_fail', '隧道测试失败'], + ['connections_network_handler_test_success', '隧道测试成功'], + ['connections_network_handler_default_title', '网络处理程序'], + ['connections_network_handler_default_user', '用户'], + ['connections_network_handler_default_password', '密码'], + ['connections_network_handler_ssh_tunnel_title', 'SSH隧道'], + ['connections_network_handler_ssh_tunnel_enable', '使用SSH隧道'], + ['connections_network_handler_ssh_tunnel_host', '主机'], + ['connections_network_handler_ssh_tunnel_port', '端口'], + ['connections_network_handler_ssh_tunnel_user', '用户'], + ['connections_network_handler_ssh_tunnel_password', '密码'], + ['connections_network_handler_ssh_tunnel_auth_type', 'Authentication method'], + ['connections_network_handler_ssh_tunnel_private_key', 'Private key'], + ['connections_driver_search_placeholder', '输入驱动名称...'], + ['connections_not_found', '未找到数据库连接'], - ['cloud_connections_access_placeholder', '云连接对所有用户可见。可以在“AWS管理控制台”中配置访问管理。'], - ]; + ['cloud_connections_access_placeholder', '云连接对所有用户可见。可以在“AWS管理控制台”中配置访问管理。'], +]; diff --git a/webapp/packages/core-sdk/src/queries/fragments/DatabaseConnection.gql b/webapp/packages/core-sdk/src/queries/fragments/DatabaseConnection.gql index 280d9647ca..2d77d9b263 100644 --- a/webapp/packages/core-sdk/src/queries/fragments/DatabaseConnection.gql +++ b/webapp/packages/core-sdk/src/queries/fragments/DatabaseConnection.gql @@ -38,8 +38,10 @@ fragment DatabaseConnection on ConnectionInfo { networkHandlersConfig { id enabled + authType userName @include(if: $customIncludeNetworkHandlerCredentials) password @include(if: $customIncludeNetworkHandlerCredentials) + key @include(if: $customIncludeNetworkHandlerCredentials) savePassword properties @include(if: $customIncludeNetworkHandlerCredentials) } diff --git a/webapp/packages/core-sdk/src/sdk.ts b/webapp/packages/core-sdk/src/sdk.ts index 455748f4fd..7154f182f3 100644 --- a/webapp/packages/core-sdk/src/sdk.ts +++ b/webapp/packages/core-sdk/src/sdk.ts @@ -570,9 +570,17 @@ export interface NetworkEndpointInfo { serverVersion?: Maybe; } +export enum NetworkHandlerAuthType { + Agent = 'AGENT', + Password = 'PASSWORD', + PublicKey = 'PUBLIC_KEY' +} + export interface NetworkHandlerConfig { + authType: NetworkHandlerAuthType; enabled: Scalars['Boolean']; id: Scalars['ID']; + key?: Maybe; password?: Maybe; properties: Scalars['Object']; savePassword: Scalars['Boolean']; @@ -580,8 +588,10 @@ export interface NetworkHandlerConfig { } export interface NetworkHandlerConfigInput { + authType?: InputMaybe; enabled?: InputMaybe; id: Scalars['ID']; + key?: InputMaybe; password?: InputMaybe; properties?: InputMaybe; savePassword?: InputMaybe; @@ -1544,7 +1554,7 @@ export type CreateConnectionConfigurationQueryVariables = Exact<{ }>; -export type CreateConnectionConfigurationQuery = { connection: { id: string; name: string; description?: string; driverId: string; template: boolean; connected: boolean; provided: boolean; useUrl: boolean; readOnly: boolean; saveCredentials: boolean; folder?: string; nodePath?: string; host?: string; port?: string; databaseName?: string; url?: string; properties?: any; providerProperties: any; features: Array; supportedDataFormats: Array; authNeeded: boolean; authModel?: string; origin?: { type: string; subType?: string; displayName: string; icon?: string; details?: Array<{ id?: string; displayName?: string; description?: string; category?: string; dataType?: string; defaultValue?: any; validValues?: Array; value?: any; length: ObjectPropertyLength; features: Array; order: number }> }; authProperties?: Array<{ id?: string; displayName?: string; description?: string; category?: string; dataType?: string; value?: any; validValues?: Array; defaultValue?: any; length: ObjectPropertyLength; features: Array; order: number }>; networkHandlersConfig: Array<{ id: string; enabled: boolean; userName?: string; password?: string; savePassword: boolean; properties?: any }>; navigatorSettings: { showSystemObjects: boolean; showUtilityObjects: boolean; showOnlyEntities: boolean; mergeEntities: boolean; hideFolders: boolean; hideSchemas: boolean; hideVirtualModel: boolean } } }; +export type CreateConnectionConfigurationQuery = { connection: { id: string; name: string; description?: string; driverId: string; template: boolean; connected: boolean; provided: boolean; useUrl: boolean; readOnly: boolean; saveCredentials: boolean; folder?: string; nodePath?: string; host?: string; port?: string; databaseName?: string; url?: string; properties?: any; providerProperties: any; features: Array; supportedDataFormats: Array; authNeeded: boolean; authModel?: string; origin?: { type: string; subType?: string; displayName: string; icon?: string; details?: Array<{ id?: string; displayName?: string; description?: string; category?: string; dataType?: string; defaultValue?: any; validValues?: Array; value?: any; length: ObjectPropertyLength; features: Array; order: number }> }; authProperties?: Array<{ id?: string; displayName?: string; description?: string; category?: string; dataType?: string; value?: any; validValues?: Array; defaultValue?: any; length: ObjectPropertyLength; features: Array; order: number }>; networkHandlersConfig: Array<{ id: string; enabled: boolean; authType: NetworkHandlerAuthType; userName?: string; password?: string; key?: string; savePassword: boolean; properties?: any }>; navigatorSettings: { showSystemObjects: boolean; showUtilityObjects: boolean; showOnlyEntities: boolean; mergeEntities: boolean; hideFolders: boolean; hideSchemas: boolean; hideVirtualModel: boolean } } }; export type CreateConnectionConfigurationFromNodeQueryVariables = Exact<{ nodePath: Scalars['String']; @@ -1556,7 +1566,7 @@ export type CreateConnectionConfigurationFromNodeQueryVariables = Exact<{ }>; -export type CreateConnectionConfigurationFromNodeQuery = { connection: { id: string; name: string; description?: string; driverId: string; template: boolean; connected: boolean; provided: boolean; useUrl: boolean; readOnly: boolean; saveCredentials: boolean; folder?: string; nodePath?: string; host?: string; port?: string; databaseName?: string; url?: string; properties?: any; providerProperties: any; features: Array; supportedDataFormats: Array; authNeeded: boolean; authModel?: string; origin?: { type: string; subType?: string; displayName: string; icon?: string; details?: Array<{ id?: string; displayName?: string; description?: string; category?: string; dataType?: string; defaultValue?: any; validValues?: Array; value?: any; length: ObjectPropertyLength; features: Array; order: number }> }; authProperties?: Array<{ id?: string; displayName?: string; description?: string; category?: string; dataType?: string; value?: any; validValues?: Array; defaultValue?: any; length: ObjectPropertyLength; features: Array; order: number }>; networkHandlersConfig: Array<{ id: string; enabled: boolean; userName?: string; password?: string; savePassword: boolean; properties?: any }>; navigatorSettings: { showSystemObjects: boolean; showUtilityObjects: boolean; showOnlyEntities: boolean; mergeEntities: boolean; hideFolders: boolean; hideSchemas: boolean; hideVirtualModel: boolean } } }; +export type CreateConnectionConfigurationFromNodeQuery = { connection: { id: string; name: string; description?: string; driverId: string; template: boolean; connected: boolean; provided: boolean; useUrl: boolean; readOnly: boolean; saveCredentials: boolean; folder?: string; nodePath?: string; host?: string; port?: string; databaseName?: string; url?: string; properties?: any; providerProperties: any; features: Array; supportedDataFormats: Array; authNeeded: boolean; authModel?: string; origin?: { type: string; subType?: string; displayName: string; icon?: string; details?: Array<{ id?: string; displayName?: string; description?: string; category?: string; dataType?: string; defaultValue?: any; validValues?: Array; value?: any; length: ObjectPropertyLength; features: Array; order: number }> }; authProperties?: Array<{ id?: string; displayName?: string; description?: string; category?: string; dataType?: string; value?: any; validValues?: Array; defaultValue?: any; length: ObjectPropertyLength; features: Array; order: number }>; networkHandlersConfig: Array<{ id: string; enabled: boolean; authType: NetworkHandlerAuthType; userName?: string; password?: string; key?: string; savePassword: boolean; properties?: any }>; navigatorSettings: { showSystemObjects: boolean; showUtilityObjects: boolean; showOnlyEntities: boolean; mergeEntities: boolean; hideFolders: boolean; hideSchemas: boolean; hideVirtualModel: boolean } } }; export type DeleteConnectionConfigurationQueryVariables = Exact<{ id: Scalars['ID']; @@ -1581,7 +1591,7 @@ export type GetConnectionsQueryVariables = Exact<{ }>; -export type GetConnectionsQuery = { connections: Array<{ id: string; name: string; description?: string; driverId: string; template: boolean; connected: boolean; provided: boolean; useUrl: boolean; readOnly: boolean; saveCredentials: boolean; folder?: string; nodePath?: string; host?: string; port?: string; databaseName?: string; url?: string; properties?: any; providerProperties: any; features: Array; supportedDataFormats: Array; authNeeded: boolean; authModel?: string; origin?: { type: string; subType?: string; displayName: string; icon?: string; details?: Array<{ id?: string; displayName?: string; description?: string; category?: string; dataType?: string; defaultValue?: any; validValues?: Array; value?: any; length: ObjectPropertyLength; features: Array; order: number }> }; authProperties?: Array<{ id?: string; displayName?: string; description?: string; category?: string; dataType?: string; value?: any; validValues?: Array; defaultValue?: any; length: ObjectPropertyLength; features: Array; order: number }>; networkHandlersConfig: Array<{ id: string; enabled: boolean; userName?: string; password?: string; savePassword: boolean; properties?: any }>; navigatorSettings: { showSystemObjects: boolean; showUtilityObjects: boolean; showOnlyEntities: boolean; mergeEntities: boolean; hideFolders: boolean; hideSchemas: boolean; hideVirtualModel: boolean } }> }; +export type GetConnectionsQuery = { connections: Array<{ id: string; name: string; description?: string; driverId: string; template: boolean; connected: boolean; provided: boolean; useUrl: boolean; readOnly: boolean; saveCredentials: boolean; folder?: string; nodePath?: string; host?: string; port?: string; databaseName?: string; url?: string; properties?: any; providerProperties: any; features: Array; supportedDataFormats: Array; authNeeded: boolean; authModel?: string; origin?: { type: string; subType?: string; displayName: string; icon?: string; details?: Array<{ id?: string; displayName?: string; description?: string; category?: string; dataType?: string; defaultValue?: any; validValues?: Array; value?: any; length: ObjectPropertyLength; features: Array; order: number }> }; authProperties?: Array<{ id?: string; displayName?: string; description?: string; category?: string; dataType?: string; value?: any; validValues?: Array; defaultValue?: any; length: ObjectPropertyLength; features: Array; order: number }>; networkHandlersConfig: Array<{ id: string; enabled: boolean; authType: NetworkHandlerAuthType; userName?: string; password?: string; key?: string; savePassword: boolean; properties?: any }>; navigatorSettings: { showSystemObjects: boolean; showUtilityObjects: boolean; showOnlyEntities: boolean; mergeEntities: boolean; hideFolders: boolean; hideSchemas: boolean; hideVirtualModel: boolean } }> }; export type GetSubjectConnectionAccessQueryVariables = Exact<{ subjectId?: InputMaybe; @@ -1623,7 +1633,7 @@ export type UpdateConnectionConfigurationQueryVariables = Exact<{ }>; -export type UpdateConnectionConfigurationQuery = { connection: { id: string; name: string; description?: string; driverId: string; template: boolean; connected: boolean; provided: boolean; useUrl: boolean; readOnly: boolean; saveCredentials: boolean; folder?: string; nodePath?: string; host?: string; port?: string; databaseName?: string; url?: string; properties?: any; providerProperties: any; features: Array; supportedDataFormats: Array; authNeeded: boolean; authModel?: string; origin?: { type: string; subType?: string; displayName: string; icon?: string; details?: Array<{ id?: string; displayName?: string; description?: string; category?: string; dataType?: string; defaultValue?: any; validValues?: Array; value?: any; length: ObjectPropertyLength; features: Array; order: number }> }; authProperties?: Array<{ id?: string; displayName?: string; description?: string; category?: string; dataType?: string; value?: any; validValues?: Array; defaultValue?: any; length: ObjectPropertyLength; features: Array; order: number }>; networkHandlersConfig: Array<{ id: string; enabled: boolean; userName?: string; password?: string; savePassword: boolean; properties?: any }>; navigatorSettings: { showSystemObjects: boolean; showUtilityObjects: boolean; showOnlyEntities: boolean; mergeEntities: boolean; hideFolders: boolean; hideSchemas: boolean; hideVirtualModel: boolean } } }; +export type UpdateConnectionConfigurationQuery = { connection: { id: string; name: string; description?: string; driverId: string; template: boolean; connected: boolean; provided: boolean; useUrl: boolean; readOnly: boolean; saveCredentials: boolean; folder?: string; nodePath?: string; host?: string; port?: string; databaseName?: string; url?: string; properties?: any; providerProperties: any; features: Array; supportedDataFormats: Array; authNeeded: boolean; authModel?: string; origin?: { type: string; subType?: string; displayName: string; icon?: string; details?: Array<{ id?: string; displayName?: string; description?: string; category?: string; dataType?: string; defaultValue?: any; validValues?: Array; value?: any; length: ObjectPropertyLength; features: Array; order: number }> }; authProperties?: Array<{ id?: string; displayName?: string; description?: string; category?: string; dataType?: string; value?: any; validValues?: Array; defaultValue?: any; length: ObjectPropertyLength; features: Array; order: number }>; networkHandlersConfig: Array<{ id: string; enabled: boolean; authType: NetworkHandlerAuthType; userName?: string; password?: string; key?: string; savePassword: boolean; properties?: any }>; navigatorSettings: { showSystemObjects: boolean; showUtilityObjects: boolean; showOnlyEntities: boolean; mergeEntities: boolean; hideFolders: boolean; hideSchemas: boolean; hideVirtualModel: boolean } } }; export type CloseConnectionMutationVariables = Exact<{ id: Scalars['ID']; @@ -1634,7 +1644,7 @@ export type CloseConnectionMutationVariables = Exact<{ }>; -export type CloseConnectionMutation = { connection: { id: string; name: string; description?: string; driverId: string; template: boolean; connected: boolean; provided: boolean; useUrl: boolean; readOnly: boolean; saveCredentials: boolean; folder?: string; nodePath?: string; host?: string; port?: string; databaseName?: string; url?: string; properties?: any; providerProperties: any; features: Array; supportedDataFormats: Array; authNeeded: boolean; authModel?: string; origin?: { type: string; subType?: string; displayName: string; icon?: string; details?: Array<{ id?: string; displayName?: string; description?: string; category?: string; dataType?: string; defaultValue?: any; validValues?: Array; value?: any; length: ObjectPropertyLength; features: Array; order: number }> }; authProperties?: Array<{ id?: string; displayName?: string; description?: string; category?: string; dataType?: string; value?: any; validValues?: Array; defaultValue?: any; length: ObjectPropertyLength; features: Array; order: number }>; networkHandlersConfig: Array<{ id: string; enabled: boolean; userName?: string; password?: string; savePassword: boolean; properties?: any }>; navigatorSettings: { showSystemObjects: boolean; showUtilityObjects: boolean; showOnlyEntities: boolean; mergeEntities: boolean; hideFolders: boolean; hideSchemas: boolean; hideVirtualModel: boolean } } }; +export type CloseConnectionMutation = { connection: { id: string; name: string; description?: string; driverId: string; template: boolean; connected: boolean; provided: boolean; useUrl: boolean; readOnly: boolean; saveCredentials: boolean; folder?: string; nodePath?: string; host?: string; port?: string; databaseName?: string; url?: string; properties?: any; providerProperties: any; features: Array; supportedDataFormats: Array; authNeeded: boolean; authModel?: string; origin?: { type: string; subType?: string; displayName: string; icon?: string; details?: Array<{ id?: string; displayName?: string; description?: string; category?: string; dataType?: string; defaultValue?: any; validValues?: Array; value?: any; length: ObjectPropertyLength; features: Array; order: number }> }; authProperties?: Array<{ id?: string; displayName?: string; description?: string; category?: string; dataType?: string; value?: any; validValues?: Array; defaultValue?: any; length: ObjectPropertyLength; features: Array; order: number }>; networkHandlersConfig: Array<{ id: string; enabled: boolean; authType: NetworkHandlerAuthType; userName?: string; password?: string; key?: string; savePassword: boolean; properties?: any }>; navigatorSettings: { showSystemObjects: boolean; showUtilityObjects: boolean; showOnlyEntities: boolean; mergeEntities: boolean; hideFolders: boolean; hideSchemas: boolean; hideVirtualModel: boolean } } }; export type CreateConnectionMutationVariables = Exact<{ config: ConnectionConfig; @@ -1645,7 +1655,7 @@ export type CreateConnectionMutationVariables = Exact<{ }>; -export type CreateConnectionMutation = { connection: { id: string; name: string; description?: string; driverId: string; template: boolean; connected: boolean; provided: boolean; useUrl: boolean; readOnly: boolean; saveCredentials: boolean; folder?: string; nodePath?: string; host?: string; port?: string; databaseName?: string; url?: string; properties?: any; providerProperties: any; features: Array; supportedDataFormats: Array; authNeeded: boolean; authModel?: string; origin?: { type: string; subType?: string; displayName: string; icon?: string; details?: Array<{ id?: string; displayName?: string; description?: string; category?: string; dataType?: string; defaultValue?: any; validValues?: Array; value?: any; length: ObjectPropertyLength; features: Array; order: number }> }; authProperties?: Array<{ id?: string; displayName?: string; description?: string; category?: string; dataType?: string; value?: any; validValues?: Array; defaultValue?: any; length: ObjectPropertyLength; features: Array; order: number }>; networkHandlersConfig: Array<{ id: string; enabled: boolean; userName?: string; password?: string; savePassword: boolean; properties?: any }>; navigatorSettings: { showSystemObjects: boolean; showUtilityObjects: boolean; showOnlyEntities: boolean; mergeEntities: boolean; hideFolders: boolean; hideSchemas: boolean; hideVirtualModel: boolean } } }; +export type CreateConnectionMutation = { connection: { id: string; name: string; description?: string; driverId: string; template: boolean; connected: boolean; provided: boolean; useUrl: boolean; readOnly: boolean; saveCredentials: boolean; folder?: string; nodePath?: string; host?: string; port?: string; databaseName?: string; url?: string; properties?: any; providerProperties: any; features: Array; supportedDataFormats: Array; authNeeded: boolean; authModel?: string; origin?: { type: string; subType?: string; displayName: string; icon?: string; details?: Array<{ id?: string; displayName?: string; description?: string; category?: string; dataType?: string; defaultValue?: any; validValues?: Array; value?: any; length: ObjectPropertyLength; features: Array; order: number }> }; authProperties?: Array<{ id?: string; displayName?: string; description?: string; category?: string; dataType?: string; value?: any; validValues?: Array; defaultValue?: any; length: ObjectPropertyLength; features: Array; order: number }>; networkHandlersConfig: Array<{ id: string; enabled: boolean; authType: NetworkHandlerAuthType; userName?: string; password?: string; key?: string; savePassword: boolean; properties?: any }>; navigatorSettings: { showSystemObjects: boolean; showUtilityObjects: boolean; showOnlyEntities: boolean; mergeEntities: boolean; hideFolders: boolean; hideSchemas: boolean; hideVirtualModel: boolean } } }; export type CreateConnectionFromNodeMutationVariables = Exact<{ nodePath: Scalars['String']; @@ -1657,7 +1667,7 @@ export type CreateConnectionFromNodeMutationVariables = Exact<{ }>; -export type CreateConnectionFromNodeMutation = { connection: { id: string; name: string; description?: string; driverId: string; template: boolean; connected: boolean; provided: boolean; useUrl: boolean; readOnly: boolean; saveCredentials: boolean; folder?: string; nodePath?: string; host?: string; port?: string; databaseName?: string; url?: string; properties?: any; providerProperties: any; features: Array; supportedDataFormats: Array; authNeeded: boolean; authModel?: string; origin?: { type: string; subType?: string; displayName: string; icon?: string; details?: Array<{ id?: string; displayName?: string; description?: string; category?: string; dataType?: string; defaultValue?: any; validValues?: Array; value?: any; length: ObjectPropertyLength; features: Array; order: number }> }; authProperties?: Array<{ id?: string; displayName?: string; description?: string; category?: string; dataType?: string; value?: any; validValues?: Array; defaultValue?: any; length: ObjectPropertyLength; features: Array; order: number }>; networkHandlersConfig: Array<{ id: string; enabled: boolean; userName?: string; password?: string; savePassword: boolean; properties?: any }>; navigatorSettings: { showSystemObjects: boolean; showUtilityObjects: boolean; showOnlyEntities: boolean; mergeEntities: boolean; hideFolders: boolean; hideSchemas: boolean; hideVirtualModel: boolean } } }; +export type CreateConnectionFromNodeMutation = { connection: { id: string; name: string; description?: string; driverId: string; template: boolean; connected: boolean; provided: boolean; useUrl: boolean; readOnly: boolean; saveCredentials: boolean; folder?: string; nodePath?: string; host?: string; port?: string; databaseName?: string; url?: string; properties?: any; providerProperties: any; features: Array; supportedDataFormats: Array; authNeeded: boolean; authModel?: string; origin?: { type: string; subType?: string; displayName: string; icon?: string; details?: Array<{ id?: string; displayName?: string; description?: string; category?: string; dataType?: string; defaultValue?: any; validValues?: Array; value?: any; length: ObjectPropertyLength; features: Array; order: number }> }; authProperties?: Array<{ id?: string; displayName?: string; description?: string; category?: string; dataType?: string; value?: any; validValues?: Array; defaultValue?: any; length: ObjectPropertyLength; features: Array; order: number }>; networkHandlersConfig: Array<{ id: string; enabled: boolean; authType: NetworkHandlerAuthType; userName?: string; password?: string; key?: string; savePassword: boolean; properties?: any }>; navigatorSettings: { showSystemObjects: boolean; showUtilityObjects: boolean; showOnlyEntities: boolean; mergeEntities: boolean; hideFolders: boolean; hideSchemas: boolean; hideVirtualModel: boolean } } }; export type CreateConnectionFromTemplateMutationVariables = Exact<{ templateId: Scalars['ID']; @@ -1669,7 +1679,7 @@ export type CreateConnectionFromTemplateMutationVariables = Exact<{ }>; -export type CreateConnectionFromTemplateMutation = { connection: { id: string; name: string; description?: string; driverId: string; template: boolean; connected: boolean; provided: boolean; useUrl: boolean; readOnly: boolean; saveCredentials: boolean; folder?: string; nodePath?: string; host?: string; port?: string; databaseName?: string; url?: string; properties?: any; providerProperties: any; features: Array; supportedDataFormats: Array; authNeeded: boolean; authModel?: string; origin?: { type: string; subType?: string; displayName: string; icon?: string; details?: Array<{ id?: string; displayName?: string; description?: string; category?: string; dataType?: string; defaultValue?: any; validValues?: Array; value?: any; length: ObjectPropertyLength; features: Array; order: number }> }; authProperties?: Array<{ id?: string; displayName?: string; description?: string; category?: string; dataType?: string; value?: any; validValues?: Array; defaultValue?: any; length: ObjectPropertyLength; features: Array; order: number }>; networkHandlersConfig: Array<{ id: string; enabled: boolean; userName?: string; password?: string; savePassword: boolean; properties?: any }>; navigatorSettings: { showSystemObjects: boolean; showUtilityObjects: boolean; showOnlyEntities: boolean; mergeEntities: boolean; hideFolders: boolean; hideSchemas: boolean; hideVirtualModel: boolean } } }; +export type CreateConnectionFromTemplateMutation = { connection: { id: string; name: string; description?: string; driverId: string; template: boolean; connected: boolean; provided: boolean; useUrl: boolean; readOnly: boolean; saveCredentials: boolean; folder?: string; nodePath?: string; host?: string; port?: string; databaseName?: string; url?: string; properties?: any; providerProperties: any; features: Array; supportedDataFormats: Array; authNeeded: boolean; authModel?: string; origin?: { type: string; subType?: string; displayName: string; icon?: string; details?: Array<{ id?: string; displayName?: string; description?: string; category?: string; dataType?: string; defaultValue?: any; validValues?: Array; value?: any; length: ObjectPropertyLength; features: Array; order: number }> }; authProperties?: Array<{ id?: string; displayName?: string; description?: string; category?: string; dataType?: string; value?: any; validValues?: Array; defaultValue?: any; length: ObjectPropertyLength; features: Array; order: number }>; networkHandlersConfig: Array<{ id: string; enabled: boolean; authType: NetworkHandlerAuthType; userName?: string; password?: string; key?: string; savePassword: boolean; properties?: any }>; navigatorSettings: { showSystemObjects: boolean; showUtilityObjects: boolean; showOnlyEntities: boolean; mergeEntities: boolean; hideFolders: boolean; hideSchemas: boolean; hideVirtualModel: boolean } } }; export type DeleteConnectionMutationVariables = Exact<{ id: Scalars['ID']; @@ -1736,7 +1746,7 @@ export type GetTemplateConnectionsQueryVariables = Exact<{ }>; -export type GetTemplateConnectionsQuery = { connections: Array<{ id: string; name: string; description?: string; driverId: string; template: boolean; connected: boolean; provided: boolean; useUrl: boolean; readOnly: boolean; saveCredentials: boolean; folder?: string; nodePath?: string; host?: string; port?: string; databaseName?: string; url?: string; properties?: any; providerProperties: any; features: Array; supportedDataFormats: Array; authNeeded: boolean; authModel?: string; origin?: { type: string; subType?: string; displayName: string; icon?: string; details?: Array<{ id?: string; displayName?: string; description?: string; category?: string; dataType?: string; defaultValue?: any; validValues?: Array; value?: any; length: ObjectPropertyLength; features: Array; order: number }> }; authProperties?: Array<{ id?: string; displayName?: string; description?: string; category?: string; dataType?: string; value?: any; validValues?: Array; defaultValue?: any; length: ObjectPropertyLength; features: Array; order: number }>; networkHandlersConfig: Array<{ id: string; enabled: boolean; userName?: string; password?: string; savePassword: boolean; properties?: any }>; navigatorSettings: { showSystemObjects: boolean; showUtilityObjects: boolean; showOnlyEntities: boolean; mergeEntities: boolean; hideFolders: boolean; hideSchemas: boolean; hideVirtualModel: boolean } }> }; +export type GetTemplateConnectionsQuery = { connections: Array<{ id: string; name: string; description?: string; driverId: string; template: boolean; connected: boolean; provided: boolean; useUrl: boolean; readOnly: boolean; saveCredentials: boolean; folder?: string; nodePath?: string; host?: string; port?: string; databaseName?: string; url?: string; properties?: any; providerProperties: any; features: Array; supportedDataFormats: Array; authNeeded: boolean; authModel?: string; origin?: { type: string; subType?: string; displayName: string; icon?: string; details?: Array<{ id?: string; displayName?: string; description?: string; category?: string; dataType?: string; defaultValue?: any; validValues?: Array; value?: any; length: ObjectPropertyLength; features: Array; order: number }> }; authProperties?: Array<{ id?: string; displayName?: string; description?: string; category?: string; dataType?: string; value?: any; validValues?: Array; defaultValue?: any; length: ObjectPropertyLength; features: Array; order: number }>; networkHandlersConfig: Array<{ id: string; enabled: boolean; authType: NetworkHandlerAuthType; userName?: string; password?: string; key?: string; savePassword: boolean; properties?: any }>; navigatorSettings: { showSystemObjects: boolean; showUtilityObjects: boolean; showOnlyEntities: boolean; mergeEntities: boolean; hideFolders: boolean; hideSchemas: boolean; hideVirtualModel: boolean } }> }; export type GetUserConnectionsQueryVariables = Exact<{ id?: InputMaybe; @@ -1747,7 +1757,7 @@ export type GetUserConnectionsQueryVariables = Exact<{ }>; -export type GetUserConnectionsQuery = { connections: Array<{ id: string; name: string; description?: string; driverId: string; template: boolean; connected: boolean; provided: boolean; useUrl: boolean; readOnly: boolean; saveCredentials: boolean; folder?: string; nodePath?: string; host?: string; port?: string; databaseName?: string; url?: string; properties?: any; providerProperties: any; features: Array; supportedDataFormats: Array; authNeeded: boolean; authModel?: string; origin?: { type: string; subType?: string; displayName: string; icon?: string; details?: Array<{ id?: string; displayName?: string; description?: string; category?: string; dataType?: string; defaultValue?: any; validValues?: Array; value?: any; length: ObjectPropertyLength; features: Array; order: number }> }; authProperties?: Array<{ id?: string; displayName?: string; description?: string; category?: string; dataType?: string; value?: any; validValues?: Array; defaultValue?: any; length: ObjectPropertyLength; features: Array; order: number }>; networkHandlersConfig: Array<{ id: string; enabled: boolean; userName?: string; password?: string; savePassword: boolean; properties?: any }>; navigatorSettings: { showSystemObjects: boolean; showUtilityObjects: boolean; showOnlyEntities: boolean; mergeEntities: boolean; hideFolders: boolean; hideSchemas: boolean; hideVirtualModel: boolean } }> }; +export type GetUserConnectionsQuery = { connections: Array<{ id: string; name: string; description?: string; driverId: string; template: boolean; connected: boolean; provided: boolean; useUrl: boolean; readOnly: boolean; saveCredentials: boolean; folder?: string; nodePath?: string; host?: string; port?: string; databaseName?: string; url?: string; properties?: any; providerProperties: any; features: Array; supportedDataFormats: Array; authNeeded: boolean; authModel?: string; origin?: { type: string; subType?: string; displayName: string; icon?: string; details?: Array<{ id?: string; displayName?: string; description?: string; category?: string; dataType?: string; defaultValue?: any; validValues?: Array; value?: any; length: ObjectPropertyLength; features: Array; order: number }> }; authProperties?: Array<{ id?: string; displayName?: string; description?: string; category?: string; dataType?: string; value?: any; validValues?: Array; defaultValue?: any; length: ObjectPropertyLength; features: Array; order: number }>; networkHandlersConfig: Array<{ id: string; enabled: boolean; authType: NetworkHandlerAuthType; userName?: string; password?: string; key?: string; savePassword: boolean; properties?: any }>; navigatorSettings: { showSystemObjects: boolean; showUtilityObjects: boolean; showOnlyEntities: boolean; mergeEntities: boolean; hideFolders: boolean; hideSchemas: boolean; hideVirtualModel: boolean } }> }; export type InitConnectionMutationVariables = Exact<{ id: Scalars['ID']; @@ -1761,7 +1771,7 @@ export type InitConnectionMutationVariables = Exact<{ }>; -export type InitConnectionMutation = { connection: { id: string; name: string; description?: string; driverId: string; template: boolean; connected: boolean; provided: boolean; useUrl: boolean; readOnly: boolean; saveCredentials: boolean; folder?: string; nodePath?: string; host?: string; port?: string; databaseName?: string; url?: string; properties?: any; providerProperties: any; features: Array; supportedDataFormats: Array; authNeeded: boolean; authModel?: string; origin?: { type: string; subType?: string; displayName: string; icon?: string; details?: Array<{ id?: string; displayName?: string; description?: string; category?: string; dataType?: string; defaultValue?: any; validValues?: Array; value?: any; length: ObjectPropertyLength; features: Array; order: number }> }; authProperties?: Array<{ id?: string; displayName?: string; description?: string; category?: string; dataType?: string; value?: any; validValues?: Array; defaultValue?: any; length: ObjectPropertyLength; features: Array; order: number }>; networkHandlersConfig: Array<{ id: string; enabled: boolean; userName?: string; password?: string; savePassword: boolean; properties?: any }>; navigatorSettings: { showSystemObjects: boolean; showUtilityObjects: boolean; showOnlyEntities: boolean; mergeEntities: boolean; hideFolders: boolean; hideSchemas: boolean; hideVirtualModel: boolean } } }; +export type InitConnectionMutation = { connection: { id: string; name: string; description?: string; driverId: string; template: boolean; connected: boolean; provided: boolean; useUrl: boolean; readOnly: boolean; saveCredentials: boolean; folder?: string; nodePath?: string; host?: string; port?: string; databaseName?: string; url?: string; properties?: any; providerProperties: any; features: Array; supportedDataFormats: Array; authNeeded: boolean; authModel?: string; origin?: { type: string; subType?: string; displayName: string; icon?: string; details?: Array<{ id?: string; displayName?: string; description?: string; category?: string; dataType?: string; defaultValue?: any; validValues?: Array; value?: any; length: ObjectPropertyLength; features: Array; order: number }> }; authProperties?: Array<{ id?: string; displayName?: string; description?: string; category?: string; dataType?: string; value?: any; validValues?: Array; defaultValue?: any; length: ObjectPropertyLength; features: Array; order: number }>; networkHandlersConfig: Array<{ id: string; enabled: boolean; authType: NetworkHandlerAuthType; userName?: string; password?: string; key?: string; savePassword: boolean; properties?: any }>; navigatorSettings: { showSystemObjects: boolean; showUtilityObjects: boolean; showOnlyEntities: boolean; mergeEntities: boolean; hideFolders: boolean; hideSchemas: boolean; hideVirtualModel: boolean } } }; export type RefreshSessionConnectionsMutationVariables = Exact<{ [key: string]: never }>; @@ -1778,7 +1788,7 @@ export type SetConnectionNavigatorSettingsMutationVariables = Exact<{ }>; -export type SetConnectionNavigatorSettingsMutation = { connection: { id: string; name: string; description?: string; driverId: string; template: boolean; connected: boolean; provided: boolean; useUrl: boolean; readOnly: boolean; saveCredentials: boolean; folder?: string; nodePath?: string; host?: string; port?: string; databaseName?: string; url?: string; properties?: any; providerProperties: any; features: Array; supportedDataFormats: Array; authNeeded: boolean; authModel?: string; origin?: { type: string; subType?: string; displayName: string; icon?: string; details?: Array<{ id?: string; displayName?: string; description?: string; category?: string; dataType?: string; defaultValue?: any; validValues?: Array; value?: any; length: ObjectPropertyLength; features: Array; order: number }> }; authProperties?: Array<{ id?: string; displayName?: string; description?: string; category?: string; dataType?: string; value?: any; validValues?: Array; defaultValue?: any; length: ObjectPropertyLength; features: Array; order: number }>; networkHandlersConfig: Array<{ id: string; enabled: boolean; userName?: string; password?: string; savePassword: boolean; properties?: any }>; navigatorSettings: { showSystemObjects: boolean; showUtilityObjects: boolean; showOnlyEntities: boolean; mergeEntities: boolean; hideFolders: boolean; hideSchemas: boolean; hideVirtualModel: boolean } } }; +export type SetConnectionNavigatorSettingsMutation = { connection: { id: string; name: string; description?: string; driverId: string; template: boolean; connected: boolean; provided: boolean; useUrl: boolean; readOnly: boolean; saveCredentials: boolean; folder?: string; nodePath?: string; host?: string; port?: string; databaseName?: string; url?: string; properties?: any; providerProperties: any; features: Array; supportedDataFormats: Array; authNeeded: boolean; authModel?: string; origin?: { type: string; subType?: string; displayName: string; icon?: string; details?: Array<{ id?: string; displayName?: string; description?: string; category?: string; dataType?: string; defaultValue?: any; validValues?: Array; value?: any; length: ObjectPropertyLength; features: Array; order: number }> }; authProperties?: Array<{ id?: string; displayName?: string; description?: string; category?: string; dataType?: string; value?: any; validValues?: Array; defaultValue?: any; length: ObjectPropertyLength; features: Array; order: number }>; networkHandlersConfig: Array<{ id: string; enabled: boolean; authType: NetworkHandlerAuthType; userName?: string; password?: string; key?: string; savePassword: boolean; properties?: any }>; navigatorSettings: { showSystemObjects: boolean; showUtilityObjects: boolean; showOnlyEntities: boolean; mergeEntities: boolean; hideFolders: boolean; hideSchemas: boolean; hideVirtualModel: boolean } } }; export type TestConnectionMutationVariables = Exact<{ config: ConnectionConfig; @@ -1803,7 +1813,7 @@ export type UpdateConnectionMutationVariables = Exact<{ }>; -export type UpdateConnectionMutation = { connection: { id: string; name: string; description?: string; driverId: string; template: boolean; connected: boolean; provided: boolean; useUrl: boolean; readOnly: boolean; saveCredentials: boolean; folder?: string; nodePath?: string; host?: string; port?: string; databaseName?: string; url?: string; properties?: any; providerProperties: any; features: Array; supportedDataFormats: Array; authNeeded: boolean; authModel?: string; origin?: { type: string; subType?: string; displayName: string; icon?: string; details?: Array<{ id?: string; displayName?: string; description?: string; category?: string; dataType?: string; defaultValue?: any; validValues?: Array; value?: any; length: ObjectPropertyLength; features: Array; order: number }> }; authProperties?: Array<{ id?: string; displayName?: string; description?: string; category?: string; dataType?: string; value?: any; validValues?: Array; defaultValue?: any; length: ObjectPropertyLength; features: Array; order: number }>; networkHandlersConfig: Array<{ id: string; enabled: boolean; userName?: string; password?: string; savePassword: boolean; properties?: any }>; navigatorSettings: { showSystemObjects: boolean; showUtilityObjects: boolean; showOnlyEntities: boolean; mergeEntities: boolean; hideFolders: boolean; hideSchemas: boolean; hideVirtualModel: boolean } } }; +export type UpdateConnectionMutation = { connection: { id: string; name: string; description?: string; driverId: string; template: boolean; connected: boolean; provided: boolean; useUrl: boolean; readOnly: boolean; saveCredentials: boolean; folder?: string; nodePath?: string; host?: string; port?: string; databaseName?: string; url?: string; properties?: any; providerProperties: any; features: Array; supportedDataFormats: Array; authNeeded: boolean; authModel?: string; origin?: { type: string; subType?: string; displayName: string; icon?: string; details?: Array<{ id?: string; displayName?: string; description?: string; category?: string; dataType?: string; defaultValue?: any; validValues?: Array; value?: any; length: ObjectPropertyLength; features: Array; order: number }> }; authProperties?: Array<{ id?: string; displayName?: string; description?: string; category?: string; dataType?: string; value?: any; validValues?: Array; defaultValue?: any; length: ObjectPropertyLength; features: Array; order: number }>; networkHandlersConfig: Array<{ id: string; enabled: boolean; authType: NetworkHandlerAuthType; userName?: string; password?: string; key?: string; savePassword: boolean; properties?: any }>; navigatorSettings: { showSystemObjects: boolean; showUtilityObjects: boolean; showOnlyEntities: boolean; mergeEntities: boolean; hideFolders: boolean; hideSchemas: boolean; hideVirtualModel: boolean } } }; export type ExportDataFromContainerQueryVariables = Exact<{ connectionId: Scalars['ID']; @@ -1866,7 +1876,7 @@ export type AuthProviderConfigurationParametersFragment = { id?: string; display export type AuthTokenFragment = { authProvider: string; authConfiguration?: string; loginTime: any; message?: string; origin: { type: string; subType?: string; displayName: string; icon?: string; details?: Array<{ id?: string; displayName?: string; description?: string; category?: string; dataType?: string; defaultValue?: any; validValues?: Array; value?: any; length: ObjectPropertyLength; features: Array; order: number }> } }; -export type DatabaseConnectionFragment = { id: string; name: string; description?: string; driverId: string; template: boolean; connected: boolean; provided: boolean; useUrl: boolean; readOnly: boolean; saveCredentials: boolean; folder?: string; nodePath?: string; host?: string; port?: string; databaseName?: string; url?: string; properties?: any; providerProperties: any; features: Array; supportedDataFormats: Array; authNeeded: boolean; authModel?: string; origin?: { type: string; subType?: string; displayName: string; icon?: string; details?: Array<{ id?: string; displayName?: string; description?: string; category?: string; dataType?: string; defaultValue?: any; validValues?: Array; value?: any; length: ObjectPropertyLength; features: Array; order: number }> }; authProperties?: Array<{ id?: string; displayName?: string; description?: string; category?: string; dataType?: string; value?: any; validValues?: Array; defaultValue?: any; length: ObjectPropertyLength; features: Array; order: number }>; networkHandlersConfig: Array<{ id: string; enabled: boolean; userName?: string; password?: string; savePassword: boolean; properties?: any }>; navigatorSettings: { showSystemObjects: boolean; showUtilityObjects: boolean; showOnlyEntities: boolean; mergeEntities: boolean; hideFolders: boolean; hideSchemas: boolean; hideVirtualModel: boolean } }; +export type DatabaseConnectionFragment = { id: string; name: string; description?: string; driverId: string; template: boolean; connected: boolean; provided: boolean; useUrl: boolean; readOnly: boolean; saveCredentials: boolean; folder?: string; nodePath?: string; host?: string; port?: string; databaseName?: string; url?: string; properties?: any; providerProperties: any; features: Array; supportedDataFormats: Array; authNeeded: boolean; authModel?: string; origin?: { type: string; subType?: string; displayName: string; icon?: string; details?: Array<{ id?: string; displayName?: string; description?: string; category?: string; dataType?: string; defaultValue?: any; validValues?: Array; value?: any; length: ObjectPropertyLength; features: Array; order: number }> }; authProperties?: Array<{ id?: string; displayName?: string; description?: string; category?: string; dataType?: string; value?: any; validValues?: Array; defaultValue?: any; length: ObjectPropertyLength; features: Array; order: number }>; networkHandlersConfig: Array<{ id: string; enabled: boolean; authType: NetworkHandlerAuthType; userName?: string; password?: string; key?: string; savePassword: boolean; properties?: any }>; navigatorSettings: { showSystemObjects: boolean; showUtilityObjects: boolean; showOnlyEntities: boolean; mergeEntities: boolean; hideFolders: boolean; hideSchemas: boolean; hideVirtualModel: boolean } }; export type DatabaseDriverFragment = { id: string; name?: string; icon?: string; description?: string; defaultPort?: string; defaultDatabase?: string; defaultServer?: string; defaultUser?: string; sampleURL?: string; embedded?: boolean; anonymousAccess?: boolean; promotedScore?: number; defaultAuthModel: string; applicableNetworkHandlers: Array; driverParameters?: any; providerProperties?: Array<{ id?: string; displayName?: string; description?: string; category?: string; dataType?: string; defaultValue?: any; validValues?: Array; length: ObjectPropertyLength; features: Array; order: number }>; driverProperties?: Array<{ id?: string; displayName?: string; description?: string; category?: string; dataType?: string; defaultValue?: any; validValues?: Array }> }; @@ -2276,8 +2286,10 @@ export const DatabaseConnectionFragmentDoc = ` networkHandlersConfig { id enabled + authType userName @include(if: $customIncludeNetworkHandlerCredentials) password @include(if: $customIncludeNetworkHandlerCredentials) + key @include(if: $customIncludeNetworkHandlerCredentials) savePassword properties @include(if: $customIncludeNetworkHandlerCredentials) } diff --git a/webapp/packages/plugin-connections/src/ConnectionForm/SSH/ConnectionSSHTabService.ts b/webapp/packages/plugin-connections/src/ConnectionForm/SSH/ConnectionSSHTabService.ts index 000327c0e1..25403cc423 100644 --- a/webapp/packages/plugin-connections/src/ConnectionForm/SSH/ConnectionSSHTabService.ts +++ b/webapp/packages/plugin-connections/src/ConnectionForm/SSH/ConnectionSSHTabService.ts @@ -9,7 +9,7 @@ import { DatabaseConnection, DBDriverResource, SSH_TUNNEL_ID } from '@cloudbeaver/core-connections'; import { Bootstrap, injectable } from '@cloudbeaver/core-di'; import type { IExecutionContextProvider } from '@cloudbeaver/core-executor'; -import type { NetworkHandlerConfigInput } from '@cloudbeaver/core-sdk'; +import { NetworkHandlerAuthType, NetworkHandlerConfigInput } from '@cloudbeaver/core-sdk'; import { connectionFormConfigureContext } from '../connectionFormConfigureContext'; import { ConnectionFormService } from '../ConnectionFormService'; @@ -81,11 +81,12 @@ export class ConnectionSSHTabService extends Bootstrap { state.config.networkHandlersConfig.push({ id: SSH_TUNNEL_ID, enabled: false, + authType: NetworkHandlerAuthType.Password, password: '', savePassword: true, userName: '', + key: '', ...initialConfig, - properties: { port: 22, host: '', @@ -122,9 +123,12 @@ export class ConnectionSSHTabService extends Bootstrap { if (!handler.userName?.length) { validation.error("Field SSH 'User' can't be empty"); } - if (!handler.password?.length) { + if (handler.authType === NetworkHandlerAuthType.Password && !handler.password?.length) { validation.error("Field SSH 'Password' can't be empty"); } + if (handler.authType === NetworkHandlerAuthType.PublicKey && !handler.key?.length) { + validation.error("Field SSH 'Private key' can't be empty"); + } } if (!handler.properties?.host?.length) { diff --git a/webapp/packages/plugin-connections/src/ConnectionForm/SSH/SSH.tsx b/webapp/packages/plugin-connections/src/ConnectionForm/SSH/SSH.tsx index 5ae1241cfa..2e38e44835 100644 --- a/webapp/packages/plugin-connections/src/ConnectionForm/SSH/SSH.tsx +++ b/webapp/packages/plugin-connections/src/ConnectionForm/SSH/SSH.tsx @@ -8,17 +8,22 @@ import { observer } from 'mobx-react-lite'; import { useState } from 'react'; -import styled from 'reshadow'; -import { css } from 'reshadow'; +import styled, { css } from 'reshadow'; import { useAdministrationSettings } from '@cloudbeaver/core-administration'; -import { Group, SubmittingForm, useMapResource, Button, ColoredContainer, InputField, FieldCheckbox, BASE_CONTAINERS_STYLES, Switch, GroupItem, Container } from '@cloudbeaver/core-blocks'; +import { + Group, SubmittingForm, useMapResource, Button, ColoredContainer, InputField, + FieldCheckbox, BASE_CONTAINERS_STYLES, Switch, GroupItem, Container, Textarea, UploadArea, Combobox +} from '@cloudbeaver/core-blocks'; import type { TabContainerPanelComponent } from '@cloudbeaver/core-blocks'; import { NetworkHandlerResource, SSH_TUNNEL_ID } from '@cloudbeaver/core-connections'; import { useTranslate } from '@cloudbeaver/core-localization'; +import { NetworkHandlerAuthType } from '@cloudbeaver/core-sdk'; import { useStyles } from '@cloudbeaver/core-theming'; +import { getTextFileReadingProcess } from '@cloudbeaver/core-utils'; import type { IConnectionFormProps } from '../IConnectionFormProps'; +import { authTypes } from './AuthTypes'; const SSH_STYLES = css` SubmittingForm { @@ -66,6 +71,7 @@ export const SSH: TabContainerPanelComponent = observer(fu const translate = useTranslate(); const disabled = formDisabled || loading; const enabled = state.enabled || false; + const keyAuth = state.authType === NetworkHandlerAuthType.PublicKey; const passwordFilled = (initialConfig?.password === null && state.password !== '') || (state.password?.length || 0) > 0; let passwordHint = ''; @@ -73,6 +79,21 @@ export const SSH: TabContainerPanelComponent = observer(fu passwordHint = '••••••'; } + const handleKeyUpload = async (event: React.ChangeEvent) => { + const file = event.target.files?.[0]; + + if (!file) { + throw new Error('File is not found'); + } + + const process = getTextFileReadingProcess(file); + const key = await process.promise; + + if (key) { + state.key = key; + } + }; + return styled(styles)( @@ -85,6 +106,17 @@ export const SSH: TabContainerPanelComponent = observer(fu > {translate('connections_network_handler_ssh_tunnel_enable')} + value.key} + valueSelector={value => value.label} + disabled={disabled || readonly || !enabled} + tiny + > + {translate('connections_network_handler_ssh_tunnel_auth_type')} + = observer(fu = observer(fu mod='surface' tiny > - {translate('connections_network_handler_ssh_tunnel_password')} + {keyAuth ? 'Passphrase' : translate('connections_network_handler_ssh_tunnel_password')} + {keyAuth && ( + <> + + + + + + + + )} {credentialsSavingEnabled && ( = observer(fu