import { Hono } from "hono";
import type { PostgresCredentials } from "../cli/validations/pg";
import type { MysqlCredentials } from "../cli/validations/mysql";
import type { SqliteCredentials } from "../cli/validations/sqlite";
import { AnyPgTable } from "drizzle-orm/pg-core";
import { Relations } from "drizzle-orm";
import { AnyMySqlTable } from "drizzle-orm/mysql-core";
import { AnySQLiteTable } from "drizzle-orm/sqlite-core";
type CustomDefault = {
    schema: string;
    table: string;
    column: string;
    func: () => unknown;
};
export type Setup = {
    dialect: "postgresql" | "mysql" | "sqlite";
    proxy: (params: ProxyParams) => Promise<any[] | any>;
    customDefaults: CustomDefault[];
};
export type ProxyParams = {
    sql: string;
    params: any[];
    mode: "array" | "object";
    method: "values" | "get" | "all" | "run" | "execute";
};
export declare const preparePgSchema: (path: string | string[]) => Promise<{
    schema: Record<string, Record<string, AnyPgTable>>;
    relations: Record<string, Relations<string, Record<string, import("drizzle-orm").Relation<string>>>>;
}>;
export declare const prepareMySqlSchema: (path: string | string[]) => Promise<{
    schema: Record<string, Record<string, AnyMySqlTable>>;
    relations: Record<string, Relations<string, Record<string, import("drizzle-orm").Relation<string>>>>;
}>;
export declare const prepareSQLiteSchema: (path: string | string[]) => Promise<{
    schema: Record<string, Record<string, AnySQLiteTable>>;
    relations: Record<string, Relations<string, Record<string, import("drizzle-orm").Relation<string>>>>;
}>;
export declare const drizzleForPostgres: (credentials: PostgresCredentials, pgSchema: Record<string, Record<string, AnyPgTable>>, relations: Record<string, Relations>) => Promise<Setup>;
export declare const drizzleForMySQL: (credentials: MysqlCredentials, mysqlSchema: Record<string, Record<string, AnyMySqlTable>>, relations: Record<string, Relations>) => Promise<Setup>;
export declare const drizzleForSQLite: (credentials: SqliteCredentials, sqliteSchema: Record<string, Record<string, AnySQLiteTable>>, relations: Record<string, Relations>) => Promise<Setup>;
export type Server = {
    start: (params: {
        host: string;
        port: number;
        key?: string;
        cert?: string;
        cb: (err: Error | null, address: string) => void;
    }) => void;
};
export declare const prepareServer: ({ dialect, proxy, customDefaults }: Setup, app?: Hono) => Promise<Server>;
export {};
