export interface ID1Database {
    prepare(sql: string): {
        bind(...values: unknown[]): {
            all<T = unknown>(): Promise<{
                results?: T[];
                success: boolean;
                error?: string;
            }>;
            first<T = unknown>(): Promise<T | null>;
            run(): Promise<{
                success: boolean;
                error?: string;
            }>;
        };
    };
}
export type DatabaseConfig = {
    d1?: ID1Database;
    driver: 'sqlite' | 'postgresql' | 'mysql' | 'sqlserver' | 'd1';
    database?: string;
    host?: string;
    port?: number;
    username?: string;
    password?: string;
    synchronize?: boolean;
    logging?: boolean;
    readHosts?: string[];
};
export type QueryResult = {
    rows: Record<string, unknown>[];
    rowCount: number;
};
export interface IDatabaseAdapter {
    connect(): Promise<void>;
    disconnect(): Promise<void>;
    query(sql: string, parameters: unknown[]): Promise<QueryResult>;
    queryOne(sql: string, parameters: unknown[]): Promise<Record<string, unknown> | null>;
    ping(): Promise<void>;
    transaction<T>(callback: (adapter: IDatabaseAdapter) => Promise<T>): Promise<T>;
    rawQuery<T = unknown>(sql: string, parameters?: unknown[]): Promise<T[]>;
    getType(): string;
    isConnected(): boolean;
    getPlaceholder(index: number): string;
}
export declare const D1Adapter: Readonly<{
    create: (config: DatabaseConfig) => IDatabaseAdapter;
}>;
export default D1Adapter;
/**
 * Package version and build metadata
 * Available at runtime for debugging and health checks
 */
export declare const _ZINTRUST_DB_D1_VERSION = "0.1.15";
export declare const _ZINTRUST_DB_D1_BUILD_DATE = "__BUILD_DATE__";
//# sourceMappingURL=index.d.ts.map