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 { ChangeStream } from 'mongodb';
export declare class DatabaseController {
    private readonly database;
    private readonly security;
    constructor(database: DatabaseAdapter, security: SecurityController);
    handleDomainValidation(domain: string): Promise<any>;
    init(mandatory?: boolean): Promise<any>;
    addIndexes(domain: string, indexes: any[]): Promise<any>;
    removeIndexes(domain: string): Promise<boolean>;
    listIndexes(domain: string): Promise<any[]>;
    writeOne<T extends BasicAttributesModel>(domain: string, data: T, context: ContextBlock, options?: DatabaseWriteOptions): Promise<T>;
    update(domain: string, updateModel: UpdateRuleRequestModel, context: ContextBlock, options?: DatabaseUpdateOptions): Promise<any>;
    delete(domain: string, deleteModel: DeleteModel<any>, context: ContextBlock, options?: DatabaseBasicOptions): Promise<any>;
    transaction<S>(operations: (session: S) => Promise<any>): Promise<any>;
    aggregate(domain: string, pipelines: any[], hashes: string[], context: ContextBlock, options?: DatabaseWriteOptions): Promise<any>;
    changes(domain: string, pipeline: any[], listener: (doc: any) => void, options?: DatabaseChangesOptions): Promise<ChangeStream>;
    query(domain: string, queryModel: QueryModel<any>, context: ContextBlock, options?: DatabaseWriteOptions): Promise<any>;
    writeMany<T extends BasicAttributesModel>(domain: string, data: T[], context: ContextBlock, options?: DatabaseWriteOptions): Promise<any[]>;
    addUpdateMetadata<T extends BasicAttributesModel>(data: T, context?: ContextBlock): T;
    validDomain(domain: string): boolean;
    addCreateMetadata<T extends BasicAttributesModel>(data: T, 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[]): T;
}
