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';
export declare abstract class DatabaseAdapter {
    abstract init(): Promise<any>;
    abstract writeOne<T extends BasicAttributesModel>(domain: string, data: T, context: ContextBlock, options?: DatabaseWriteOptions): Promise<any>;
    abstract writeMany<T extends BasicAttributesModel, V>(domain: string, data: T[], context: ContextBlock, options?: DatabaseWriteOptions): Promise<V>;
    abstract update<T extends BasicAttributesModel, V>(domain: string, updateModel: UpdateRuleRequestModel, context: ContextBlock, options?: DatabaseUpdateOptions): Promise<V>;
    abstract deleteOne<T extends BasicAttributesModel, V>(domain: string, deleteModel: DeleteModel<T>, context: ContextBlock, options?: DatabaseBasicOptions): Promise<V>;
    abstract findOne<T extends BasicAttributesModel>(domain: string, queryModel: QueryModel<T>, context: ContextBlock, options?: DatabaseWriteOptions): Promise<any>;
    abstract query<T extends BasicAttributesModel>(domain: string, queryModel: QueryModel<T>, context: ContextBlock, options?: DatabaseWriteOptions): Promise<any>;
    abstract changes(domain: string, pipeline: object[], listener: (doc: any) => void, resumeToken: string): Promise<any>;
    abstract transaction(operations: (session: any) => Promise<any>): Promise<any>;
    abstract createIndexes(domain: string, indexes: any[]): Promise<any>;
    abstract dropIndexes(domain: string): Promise<boolean>;
    abstract listIndexes(domain: string): Promise<any>;
    abstract aggregate(domain: string, pipelines: object[], context: ContextBlock, options?: DatabaseWriteOptions): Promise<any[]>;
}
export interface DatabaseWriteOptions extends DatabaseBasicOptions {
    indexes?: {
        field?: string;
        unique?: boolean;
        collation?: {
            locale: string;
            strength: number;
        };
        expireAfterSeconds?: number;
    }[];
}
export interface DatabaseChangesOptions extends DatabaseWriteOptions {
    resumeToken?: string;
}
export interface DatabaseUpdateOptions extends DatabaseBasicOptions {
    indexes?: {
        field?: string;
        unique?: boolean;
        collation?: {
            locale: string;
            strength: number;
        };
        expireAfterSeconds?: number;
    }[];
    dbOptions?: {
        [key: string]: any;
    };
}
export interface DatabaseBasicOptions {
    bypassDomainVerification: boolean;
    transaction?: any;
}
