import { ModelCtor, SequelizeOptions } from 'sequelize-typescript';
import { Dialect } from 'sequelize/types/sequelize';
import Context from '../context/context';
import { Connection } from './connection';
export declare const DEFAULT_SCHEMA = "public";
export declare const DEFAULT_TTL_SECONDS = 2;
export interface Config {
    secretRegion: string;
    usernameEnv: string;
    passwordEnv: string;
    hostEnv: string;
    portEnv: string;
    compositeSecrets: Array<string | undefined>;
    sequelizeOptions: Partial<SequelizeOptions>;
    schemaPolicy: (databaseName: string) => string;
    modelsPolicy: (databaseName: string) => Array<ModelCtor>;
    cachePolicy: (databaseName: string) => 'persistent' | 'never' | number;
    customConfiguration: (databaseName: string) => Partial<SequelizeOptions>;
}
export interface Credentials {
    username: string;
    password: string;
    port: string;
    host: string;
    engine: Dialect;
}
export declare class ConnectionManager {
    private credentials;
    private config;
    private cache;
    constructor(config: Config);
    static Initialize(ctx: Context, config: Config): Promise<ConnectionManager>;
    static instance(): ConnectionManager;
    static defaultConfig: () => Config;
    getCredentials: () => Credentials;
    private retreieveSecret;
    getConnection(ctx: Context, database: string): Promise<Connection>;
    borrowing<T>(ctx: Context, database: string, scope: (connection: Connection) => Promise<T>): Promise<T>;
}
