import { Column, ColumnsResolverInput, ColumnsResolverOutput, Enum, ResolverInput, ResolverOutput, ResolverOutputWithMoved, Table } from "../../snapshotsDiffer";
import type { CommonSchema } from "../../schemaValidator";
import { PgSchema } from "../../serializer/pgSchema";
import { SQLiteSchema } from "../../serializer/sqliteSchema";
import { MySqlSchema } from "../../serializer/mysqlSchema";
import { Journal } from "../../utils";
import { GenerateConfig } from "./utils";
export type Named = {
    name: string;
};
export type NamedWithSchema = {
    name: string;
    schema: string;
};
export declare const schemasResolver: (input: ResolverInput<Table>) => Promise<ResolverOutput<Table>>;
export declare const tablesResolver: (input: ResolverInput<Table>) => Promise<ResolverOutputWithMoved<Table>>;
export declare const enumsResolver: (input: ResolverInput<Enum>) => Promise<ResolverOutputWithMoved<Enum>>;
export declare const columnsResolver: (input: ColumnsResolverInput<Column>) => Promise<ColumnsResolverOutput<Column>>;
export declare const prepareAndMigratePg: (config: GenerateConfig) => Promise<void>;
export declare const preparePgPush: (schemaPath: string | string[], snapshot: PgSchema, schemaFilter: string[]) => Promise<{
    sqlStatements: string[];
    statements: import("../../jsonStatements").JsonStatement[];
    squashedPrev: {
        tables: Record<string, {
            name: string;
            columns: Record<string, {
                isUnique?: any;
                default?: any;
                typeSchema?: string | undefined;
                uniqueName?: string | undefined;
                nullsNotDistinct?: boolean | undefined;
                name: string;
                type: string;
                primaryKey: boolean;
                notNull: boolean;
            }>;
            indexes: Record<string, string>;
            foreignKeys: Record<string, string>;
            schema: string;
            compositePrimaryKeys: Record<string, string>;
            uniqueConstraints: Record<string, string>;
        }>;
        version: "6";
        dialect: "postgresql";
        schemas: Record<string, string>;
        enums: Record<string, {
            name: string;
            values: string[];
            schema: string;
        }>;
    };
    squashedCur: {
        tables: Record<string, {
            name: string;
            columns: Record<string, {
                isUnique?: any;
                default?: any;
                typeSchema?: string | undefined;
                uniqueName?: string | undefined;
                nullsNotDistinct?: boolean | undefined;
                name: string;
                type: string;
                primaryKey: boolean;
                notNull: boolean;
            }>;
            indexes: Record<string, string>;
            foreignKeys: Record<string, string>;
            schema: string;
            compositePrimaryKeys: Record<string, string>;
            uniqueConstraints: Record<string, string>;
        }>;
        version: "6";
        dialect: "postgresql";
        schemas: Record<string, string>;
        enums: Record<string, {
            name: string;
            values: string[];
            schema: string;
        }>;
    };
}>;
export declare const prepareMySQLPush: (schemaPath: string | string[], snapshot: MySqlSchema) => Promise<{
    sqlStatements: string[];
    statements: import("../../jsonStatements").JsonStatement[];
    validatedCur: {
        internal?: {
            tables: Record<string, {
                columns: Record<string, {
                    isDefaultAnExpression?: boolean | undefined;
                } | undefined>;
            } | undefined>;
        } | undefined;
        tables: Record<string, {
            name: string;
            columns: Record<string, {
                default?: any;
                onUpdate?: any;
                autoincrement?: boolean | undefined;
                name: string;
                type: string;
                primaryKey: boolean;
                notNull: boolean;
            }>;
            indexes: Record<string, {
                using?: "btree" | "hash" | undefined;
                algorithm?: "default" | "inplace" | "copy" | undefined;
                lock?: "default" | "none" | "shared" | "exclusive" | undefined;
                name: string;
                columns: string[];
                isUnique: boolean;
            }>;
            foreignKeys: Record<string, {
                onUpdate?: string | undefined;
                onDelete?: string | undefined;
                name: string;
                tableFrom: string;
                columnsFrom: string[];
                tableTo: string;
                columnsTo: string[];
            }>;
            compositePrimaryKeys: Record<string, {
                name: string;
                columns: string[];
            }>;
            uniqueConstraints: Record<string, {
                name: string;
                columns: string[];
            }>;
        }>;
        id: string;
        prevId: string;
        version: "5";
        dialect: "mysql";
        _meta: {
            columns: Record<string, string>;
            tables: Record<string, string>;
        };
    };
    validatedPrev: {
        internal?: {
            tables: Record<string, {
                columns: Record<string, {
                    isDefaultAnExpression?: boolean | undefined;
                } | undefined>;
            } | undefined>;
        } | undefined;
        tables: Record<string, {
            name: string;
            columns: Record<string, {
                default?: any;
                onUpdate?: any;
                autoincrement?: boolean | undefined;
                name: string;
                type: string;
                primaryKey: boolean;
                notNull: boolean;
            }>;
            indexes: Record<string, {
                using?: "btree" | "hash" | undefined;
                algorithm?: "default" | "inplace" | "copy" | undefined;
                lock?: "default" | "none" | "shared" | "exclusive" | undefined;
                name: string;
                columns: string[];
                isUnique: boolean;
            }>;
            foreignKeys: Record<string, {
                onUpdate?: string | undefined;
                onDelete?: string | undefined;
                name: string;
                tableFrom: string;
                columnsFrom: string[];
                tableTo: string;
                columnsTo: string[];
            }>;
            compositePrimaryKeys: Record<string, {
                name: string;
                columns: string[];
            }>;
            uniqueConstraints: Record<string, {
                name: string;
                columns: string[];
            }>;
        }>;
        id: string;
        prevId: string;
        version: "5";
        dialect: "mysql";
        _meta: {
            columns: Record<string, string>;
            tables: Record<string, string>;
        };
    };
}>;
export declare const prepareAndMigrateMysql: (config: GenerateConfig) => Promise<void>;
export declare const prepareAndMigrateSqlite: (config: GenerateConfig) => Promise<void>;
export declare const prepareSQLitePush: (schemaPath: string | string[], snapshot: SQLiteSchema) => Promise<{
    sqlStatements: string[];
    statements: import("../../jsonStatements").JsonStatement[];
    squashedPrev: {
        enums?: any;
        tables: Record<string, {
            name: string;
            columns: Record<string, {
                default?: any;
                autoincrement?: boolean | undefined;
                name: string;
                type: string;
                primaryKey: boolean;
                notNull: boolean;
            }>;
            indexes: Record<string, string>;
            foreignKeys: Record<string, string>;
            compositePrimaryKeys: Record<string, string>;
            uniqueConstraints: Record<string, string>;
        }>;
        version: "5";
        dialect: "sqlite";
    };
    squashedCur: {
        enums?: any;
        tables: Record<string, {
            name: string;
            columns: Record<string, {
                default?: any;
                autoincrement?: boolean | undefined;
                name: string;
                type: string;
                primaryKey: boolean;
                notNull: boolean;
            }>;
            indexes: Record<string, string>;
            foreignKeys: Record<string, string>;
            compositePrimaryKeys: Record<string, string>;
            uniqueConstraints: Record<string, string>;
        }>;
        version: "5";
        dialect: "sqlite";
    };
    meta: {
        schemas: {};
        tables: {};
        columns: {};
    } | undefined;
}>;
export declare const promptColumnsConflicts: <T extends Named>(tableName: string, newColumns: T[], missingColumns: T[]) => Promise<{
    created: T[];
    renamed: {
        from: T;
        to: T;
    }[];
    deleted: T[];
}>;
export declare const promptNamedWithSchemasConflict: <T extends NamedWithSchema>(newItems: T[], missingItems: T[], entity: "table" | "enum") => Promise<{
    created: T[];
    renamed: {
        from: T;
        to: T;
    }[];
    moved: {
        name: string;
        schemaFrom: string;
        schemaTo: string;
    }[];
    deleted: T[];
}>;
export declare const promptSchemasConflict: <T extends Named>(newSchemas: T[], missingSchemas: T[]) => Promise<{
    created: T[];
    renamed: {
        from: T;
        to: T;
    }[];
    deleted: T[];
}>;
export declare const BREAKPOINT = "--> statement-breakpoint\n";
export declare const writeResult: ({ cur, sqlStatements, journal, _meta, outFolder, breakpoints, name, bundle, type, }: {
    cur: CommonSchema;
    sqlStatements: string[];
    journal: Journal;
    _meta?: any;
    outFolder: string;
    breakpoints: boolean;
    name?: string;
    bundle?: boolean;
    type?: "introspect" | "custom" | "none";
}) => void;
export declare const embeddedMigrations: (journal: Journal) => string;
export declare const prepareSnapshotFolderName: () => string;
