import { AnyMongoAbility } from '@casl/ability';
import { JSONPatch } from 'jsonref';
export declare function addConstraint(query: any, constraint: any): any;
export declare function escapeMongoKey(key: string): string;
export declare const unescapeMongoKey: (key: string) => string;
export declare function escapeMongoObject(val: any): any;
export declare function unescapeMongoObject(val: any): any;
export declare function patchToMongo(patch: JSONPatch, escape?: boolean): {
    query?: any;
    doc?: any;
};
export declare function toMongoQuery<T extends AnyMongoAbility>(ability: T, subjectType: Parameters<T['rulesFor']>[1], action: Parameters<T['rulesFor']>[0]): any;
