import { ModelCtor, Repository, Sequelize, SequelizeOptions } from "sequelize-typescript";
import { Credentials } from "./manager";
import Context from "../context/context";
import { Transaction } from "sequelize";
export interface ConnectionConfig {
    models: Array<ModelCtor>;
    credentials: Credentials;
    options: Partial<SequelizeOptions>;
    databaseName: string;
    schema: string;
    releaseFn?: () => void;
}
export declare class Connection {
    instance: Sequelize;
    repositories: Map<string, Repository<never>>;
    releaseFn: undefined | (() => void);
    constructor(config: ConnectionConfig);
    getRepository<T>(model: ModelCtor): Promise<Repository<T>>;
    release(): void;
    close(): void;
    newTransaction: () => Promise<Transaction>;
    transactionalScope: (ctx: Context, scope: (ctx: Context) => Promise<unknown>) => Promise<unknown>;
    private migrate;
}
