import { Databases } from './databases';
import type { DatabaseAdapter } from '.';
import type { DatabaseDomainInterface } from './interfaces';
import type { model as BaseModel } from './models';
import type { DatabaseSettingsType } from './types';
import type { DomainHandlerFunctionArgs, DomainReadyFunctionArgs } from '@palmares/core';
declare global {
    var $PDatabases: Databases | undefined;
    var $PCachedDatabaseDomains: DatabaseDomainInterface[] | undefined;
}
export declare function loadDatabases(databaseDomains?: DatabaseDomainInterface[]): readonly [Databases, DatabaseDomainInterface[] | undefined];
declare const databaseDomainModifier: {
    new (): {
        load: (settings: unknown) => void | Promise<void> | ((args: DomainReadyFunctionArgs<unknown, any>) => void | Promise<void>) | Promise<(args: DomainReadyFunctionArgs<unknown, any>) => void | Promise<void>>;
        ready: (args: DomainReadyFunctionArgs<unknown, any>) => void | Promise<void>;
        close: (() => void | Promise<void>) | undefined;
        commands: import("@palmares/core").DefaultCommandType | undefined;
        instances?: import("@palmares/core").Domain<any>[];
        name: string;
        path: string;
        isLoaded: boolean;
        modifiers: {
            getModels: (engineInstance: DatabaseAdapter<any>) => Promise<Record<string, ReturnType<typeof BaseModel>> | ReturnType<typeof BaseModel>[]> | Record<string, ReturnType<typeof BaseModel>> | ReturnType<typeof BaseModel>[];
            getMigrations: () => Promise<any> | any;
        };
        __isReady: boolean;
        __isClosed: boolean;
    };
    toJSON: () => {
        name: string;
        path: string;
    };
    $$type: string;
    __instance: import("@palmares/core").Domain<any>;
} & (new () => {
    load: (settings: unknown) => void | Promise<void> | ((args: DomainReadyFunctionArgs<unknown, any>) => void | Promise<void>) | Promise<(args: DomainReadyFunctionArgs<unknown, any>) => void | Promise<void>>;
    ready: (args: DomainReadyFunctionArgs<unknown, any>) => void | Promise<void>;
    close: (() => void | Promise<void>) | undefined;
    commands: import("@palmares/core").DefaultCommandType | undefined;
    instances?: import("@palmares/core").Domain<any>[];
    name: string;
    path: string;
    isLoaded: boolean;
    modifiers: {
        getModels: (engineInstance: DatabaseAdapter<any>) => Promise<Record<string, ReturnType<typeof BaseModel>> | ReturnType<typeof BaseModel>[]> | Record<string, ReturnType<typeof BaseModel>> | ReturnType<typeof BaseModel>[];
        getMigrations: () => Promise<any> | any;
    };
    __isReady: boolean;
    __isClosed: boolean;
});
export { databaseDomainModifier };
export declare const databasesDomain: {
    new (): {
        load: (_: DatabaseSettingsType) => Promise<(options: DomainReadyFunctionArgs<DatabaseSettingsType, any>) => Promise<void>>;
        ready: (options: DomainReadyFunctionArgs<DatabaseSettingsType, any>) => Promise<void>;
        close: (() => void | Promise<void>) | undefined;
        commands: {
            readonly makemigrations: {
                readonly description: "Create the migrations automatically based on your created models";
                readonly positionalArgs: undefined;
                readonly keywordArgs: {
                    readonly empty: {
                        readonly description: "Creates an empty migration";
                        readonly hasFlag: true;
                        readonly type: "string";
                        readonly canBeMultiple: true;
                    };
                };
                readonly handler: (options: DomainHandlerFunctionArgs) => Promise<void>;
            };
            readonly migrate: {
                readonly description: "Run the pending migrations on your database";
                readonly positionalArgs: undefined;
                readonly keywordArgs: undefined;
                readonly handler: (options: DomainHandlerFunctionArgs) => Promise<void>;
            };
            readonly "load-models": {
                readonly description: "Load the databases. For some engines, it will just create the models locally";
                readonly positionalArgs: undefined;
                readonly keywordArgs: undefined;
                readonly handler: (options: DomainHandlerFunctionArgs) => Promise<void>;
            };
        } | undefined;
        instances?: import("@palmares/core").Domain<any>[];
        name: string;
        path: string;
        isLoaded: boolean;
        modifiers: unknown;
        __isReady: boolean;
        __isClosed: boolean;
    };
    toJSON: () => {
        name: string;
        path: string;
    };
    $$type: string;
    __instance: import("@palmares/core").Domain<any>;
} & (new () => {
    load: (_: DatabaseSettingsType) => Promise<(options: DomainReadyFunctionArgs<DatabaseSettingsType, any>) => Promise<void>>;
    ready: (options: DomainReadyFunctionArgs<DatabaseSettingsType, any>) => Promise<void>;
    close: (() => void | Promise<void>) | undefined;
    commands: {
        readonly makemigrations: {
            readonly description: "Create the migrations automatically based on your created models";
            readonly positionalArgs: undefined;
            readonly keywordArgs: {
                readonly empty: {
                    readonly description: "Creates an empty migration";
                    readonly hasFlag: true;
                    readonly type: "string";
                    readonly canBeMultiple: true;
                };
            };
            readonly handler: (options: DomainHandlerFunctionArgs) => Promise<void>;
        };
        readonly migrate: {
            readonly description: "Run the pending migrations on your database";
            readonly positionalArgs: undefined;
            readonly keywordArgs: undefined;
            readonly handler: (options: DomainHandlerFunctionArgs) => Promise<void>;
        };
        readonly "load-models": {
            readonly description: "Load the databases. For some engines, it will just create the models locally";
            readonly positionalArgs: undefined;
            readonly keywordArgs: undefined;
            readonly handler: (options: DomainHandlerFunctionArgs) => Promise<void>;
        };
    } | undefined;
    instances?: import("@palmares/core").Domain<any>[];
    name: string;
    path: string;
    isLoaded: boolean;
    modifiers: unknown;
    __isReady: boolean;
    __isClosed: boolean;
} & {
    modifiers: [{
        new (): {
            load: (settings: unknown) => void | Promise<void> | ((args: DomainReadyFunctionArgs<unknown, any>) => void | Promise<void>) | Promise<(args: DomainReadyFunctionArgs<unknown, any>) => void | Promise<void>>;
            ready: (args: DomainReadyFunctionArgs<unknown, any>) => void | Promise<void>;
            close: (() => void | Promise<void>) | undefined;
            commands: import("@palmares/core").DefaultCommandType | undefined;
            instances?: import("@palmares/core").Domain<any>[];
            name: string;
            path: string;
            isLoaded: boolean;
            modifiers: {
                getModels: (engineInstance: DatabaseAdapter<any>) => Promise<Record<string, ReturnType<typeof BaseModel>> | ReturnType<typeof BaseModel>[]> | Record<string, ReturnType<typeof BaseModel>> | ReturnType<typeof BaseModel>[];
                getMigrations: () => Promise<any> | any;
            };
            __isReady: boolean;
            __isClosed: boolean;
        };
        toJSON: () => {
            name: string;
            path: string;
        };
        $$type: string;
        __instance: import("@palmares/core").Domain<any>;
    } & (new () => {
        load: (settings: unknown) => void | Promise<void> | ((args: DomainReadyFunctionArgs<unknown, any>) => void | Promise<void>) | Promise<(args: DomainReadyFunctionArgs<unknown, any>) => void | Promise<void>>;
        ready: (args: DomainReadyFunctionArgs<unknown, any>) => void | Promise<void>;
        close: (() => void | Promise<void>) | undefined;
        commands: import("@palmares/core").DefaultCommandType | undefined;
        instances?: import("@palmares/core").Domain<any>[];
        name: string;
        path: string;
        isLoaded: boolean;
        modifiers: {
            getModels: (engineInstance: DatabaseAdapter<any>) => Promise<Record<string, ReturnType<typeof BaseModel>> | ReturnType<typeof BaseModel>[]> | Record<string, ReturnType<typeof BaseModel>> | ReturnType<typeof BaseModel>[];
            getMigrations: () => Promise<any> | any;
        };
        __isReady: boolean;
        __isClosed: boolean;
    })];
    commands: {
        readonly makemigrations: {
            readonly description: "Create the migrations automatically based on your created models";
            readonly positionalArgs: undefined;
            readonly keywordArgs: {
                readonly empty: {
                    readonly description: "Creates an empty migration";
                    readonly hasFlag: true;
                    readonly type: "string";
                    readonly canBeMultiple: true;
                };
            };
            readonly handler: (options: DomainHandlerFunctionArgs) => Promise<void>;
        };
        readonly migrate: {
            readonly description: "Run the pending migrations on your database";
            readonly positionalArgs: undefined;
            readonly keywordArgs: undefined;
            readonly handler: (options: DomainHandlerFunctionArgs) => Promise<void>;
        };
        readonly "load-models": {
            readonly description: "Load the databases. For some engines, it will just create the models locally";
            readonly positionalArgs: undefined;
            readonly keywordArgs: undefined;
            readonly handler: (options: DomainHandlerFunctionArgs) => Promise<void>;
        };
    };
    load: (_: DatabaseSettingsType) => Promise<(options: DomainReadyFunctionArgs<DatabaseSettingsType, any>) => Promise<void>>;
    ready: (options: DomainReadyFunctionArgs<DatabaseSettingsType, any>) => Promise<void>;
    close: () => Promise<void>;
    getMigrations: () => Promise<import("./migrations/types").MigrationFileType[]>;
    getModels: (engineInstance: DatabaseAdapter<any>) => Promise<any>;
});
//# sourceMappingURL=domain.d.ts.map