import { App, RootModuleDefinition } from '@deepkit/app';
import { ClassType } from '@deepkit/core';
import { FrameworkConfig, FrameworkModule, RpcServer } from '@deepkit/framework';
import { HttpListener } from '@deepkit/http';
import { BaseDatabase } from '../database';
import { HealthModule } from '../health/health.module';
import { HttpWorkflowListener, HttpWorkflowListenerOptions } from '../http';
import { HttpCorsOptions } from '../http/cors';
import { MailService, WorkerService } from '../services';
import { ProviderInvokeCommand } from '../services/cli/invoke';
import { BaseAppConfig } from './config';
import { ShutdownListener } from './shutdown';
export interface CreateAppOptions<C extends BaseAppConfig> extends RootModuleDefinition {
    config: ClassType<C>;
    defaultConfig?: Partial<C>;
    db?: ClassType<BaseDatabase>;
    frameworkConfig?: Partial<FrameworkConfig>;
    cors?: (config: C) => HttpCorsOptions | HttpCorsOptions[];
    enableWorker?: boolean;
    enableDkRpc?: boolean;
}
export declare function createApp<T extends CreateAppOptions<any>>(options: T): App<Omit<T, "config" | "db" | "defaultConfig" | "frameworkConfig" | "cors"> & {
    config: ClassType<any>;
    controllers: (typeof ProviderInvokeCommand | (never[] | NonNullable<T["controllers"]>)[number])[];
    imports: (FrameworkModule | HealthModule | (never[] | NonNullable<T["imports"]>)[number])[];
    providers: (ClassType<BaseDatabase<import("@deepkit/orm").DatabaseAdapter>> | typeof HttpWorkflowListenerOptions | typeof MailService | typeof WorkerService | typeof HttpListener | (never[] | NonNullable<T["providers"]>)[number] | {
        provide: typeof RpcServer;
        useValue: {
            start: () => void;
        };
    })[];
    listeners: (typeof HttpWorkflowListener | typeof ShutdownListener | (never[] | NonNullable<T["listeners"]>)[number])[];
}>;
export declare const AutoStart: () => ClassDecorator;
export declare type __ΩCreateAppOptions = any[];
//# sourceMappingURL=base.d.ts.map