import type { IDialect, DialectType, ConnectionConfig, EntitySchema } from './types.js';
/**
 * Read the database configuration from environment variables.
 *
 * Required env vars:
 *   DB_DIALECT  = mongodb | sqlite | postgres | mysql | mariadb | oracle | mssql | cockroachdb | db2 | hana | hsqldb | spanner | sybase
 *   SGBD_URI    = connection string
 *
 * Throws if DB_DIALECT or SGBD_URI is missing.
 */
export declare function getConfigFromEnv(): ConnectionConfig;
/**
 * Initialize and connect the dialect.
 * Returns a singleton — subsequent calls return the same instance.
 */
export declare function getDialect(config?: ConnectionConfig): Promise<IDialect>;
/**
 * Get the current dialect type without connecting.
 */
export declare function getCurrentDialectType(): DialectType;
/**
 * Disconnect the current dialect and reset the singleton.
 */
export declare function disconnectDialect(): Promise<void>;
/**
 * Test the connection with a given config without changing the active dialect.
 * Used by the setup wizard to validate before committing.
 */
export declare function testConnection(config: ConnectionConfig): Promise<{
    ok: boolean;
    error?: string;
}>;
/**
 * Simplified high-level API: connect to a database and optionally register schemas.
 * Returns the connected dialect instance.
 *
 * Example:
 *   const dialect = await createConnection({
 *     dialect: 'sqlite',
 *     uri: './my.db',
 *     schemaStrategy: 'update',
 *   }, [ContactSchema, OrderSchema]);
 */
export declare function createConnection(config: ConnectionConfig, schemas?: EntitySchema[]): Promise<IDialect>;
