import { BasicAttributesModel } from '../model/basic-attributes.model';
import { ContextBlock } from '../model/rules.model';
import { DatabaseAdapter, DatabaseBasicOptions, DatabaseChangesOptions, DatabaseUpdateOptions, DatabaseWriteOptions } from '../adapters/database.adapter';
import { UpdateRuleRequestModel } from '../model/update-rule-request.model';
import { DeleteModel } from '../model/delete-model';
import { QueryModel } from '../model/query-model';
import { SecurityController } from './security.controller';
import { ChangesModel } from '../model/changes.model';
import { ChangeStream } from 'mongodb';
import { ChangesDocModel } from "../model/changes-doc.model";
import { BFastDatabaseOptions } from "../bfast-database.option";
export declare class DatabaseController {
    constructor();
    handleDomainValidation(domain: string): Promise<any>;
    init(database: DatabaseAdapter, options: BFastDatabaseOptions): Promise<any>;
    writeOne<T extends BasicAttributesModel>(domain: string, data: T, database: DatabaseAdapter, security: SecurityController, context: ContextBlock, options: DatabaseWriteOptions, configs: BFastDatabaseOptions): Promise<T>;
    writeMany<T extends BasicAttributesModel>(domain: string, data: T[], database: DatabaseAdapter, security: SecurityController, context: ContextBlock, options: DatabaseWriteOptions, configs: BFastDatabaseOptions): Promise<any[]>;
    updateOne(domain: string, updateModel: UpdateRuleRequestModel, database: DatabaseAdapter, security: SecurityController, context: ContextBlock, options: DatabaseUpdateOptions, configs: BFastDatabaseOptions): Promise<any>;
    private altUpdateModel;
    updateMany(domain: string, updateModel: UpdateRuleRequestModel, database: DatabaseAdapter, security: SecurityController, context: ContextBlock, options: DatabaseUpdateOptions, configs: BFastDatabaseOptions): Promise<any[]>;
    delete(domain: string, deleteModel: DeleteModel<any>, database: DatabaseAdapter, security: SecurityController, context: ContextBlock, options: DatabaseBasicOptions, configs: BFastDatabaseOptions): Promise<any>;
    bulk<S>(database: DatabaseAdapter, operations: (session: S) => Promise<any>): Promise<any>;
    changes(domain: string, pipeline: any[], database: DatabaseAdapter, security: SecurityController, listener: (doc: ChangesDocModel) => void, options?: DatabaseChangesOptions): Promise<ChangeStream>;
    query(domain: string, queryModel: QueryModel<any>, database: DatabaseAdapter, security: SecurityController, context: ContextBlock, options: DatabaseWriteOptions, configs: BFastDatabaseOptions): Promise<any>;
    addUpdateMetadata(data: any, context?: ContextBlock): any;
    validDomain(domain: string): boolean;
    addCreateMetadata<T extends BasicAttributesModel>(data: T, security: SecurityController, context: ContextBlock): T;
    getReturnFields<T extends BasicAttributesModel>(data: T): any;
    getReturnFields4Db<T extends BasicAttributesModel>(data: T): any;
    sanitizeWithOperator4Db<T extends BasicAttributesModel>(data: T): T;
    sanitize4Db<T extends BasicAttributesModel>(data: T): T;
    sanitize4User<T extends BasicAttributesModel>(data: T, returnFields: string[], hashes: string[], onlyCids: boolean, security: SecurityController): T;
    publishChanges(domain: string, change: ChangesModel): void;
}
