import { DatabaseAdapter, DatabaseBasicOptions, DatabaseUpdateOptions, DatabaseWriteOptions } from '../adapters/database.adapter';
import { ChangeStream, ChangeStreamDocument } from 'mongodb';
import { BasicAttributesModel } from '../model/basic-attributes.model';
import { ContextBlock } from '../model/rules.model';
import { QueryModel } from '../model/query-model';
import { UpdateRuleRequestModel } from '../model/update-rule-request.model';
import { DeleteModel } from '../model/delete-model';
import { BFastDatabaseOptions } from '../bfast-database.option';
export declare class DatabaseFactory implements DatabaseAdapter {
    private mongoClient;
    constructor(configAdapter: BFastDatabaseOptions);
    writeMany<T extends BasicAttributesModel, V>(domain: string, data: T[], context: ContextBlock, options?: DatabaseWriteOptions): Promise<V>;
    writeOne<T extends BasicAttributesModel>(domain: string, data: T, context: ContextBlock, options?: DatabaseWriteOptions): Promise<any>;
    private connection;
    init(): Promise<any>;
    createIndexes(domain: string, indexes: any[]): Promise<any>;
    dropIndexes(domain: string): Promise<boolean>;
    listIndexes(domain: string): Promise<any[]>;
    findOne<T extends BasicAttributesModel>(domain: string, queryModel: QueryModel<T>, context: ContextBlock, options?: DatabaseWriteOptions): Promise<any>;
    query<T extends BasicAttributesModel>(domain: string, queryModel: QueryModel<T>, context: ContextBlock, options?: DatabaseWriteOptions): Promise<any>;
    update<T extends BasicAttributesModel, V>(domain: string, updateModel: UpdateRuleRequestModel, context: ContextBlock, options?: DatabaseUpdateOptions): Promise<V>;
    deleteOne<T extends BasicAttributesModel, V>(domain: string, deleteModel: DeleteModel<T>, context: ContextBlock, options?: DatabaseBasicOptions): Promise<V>;
    transaction<V>(operations: (session: any) => Promise<any>): Promise<any>;
    aggregate(domain: string, pipelines: any[], context: ContextBlock, options?: DatabaseWriteOptions): Promise<any>;
    changes(domain: string, pipeline: any[], listener: (doc: ChangeStreamDocument) => void, resumeToken?: any): Promise<ChangeStream>;
}
