import type { MongoQuery } from '@ucast/mongo2js'; import type { Ability, AbilityDescriptor, AbilityID } from './type'; export declare class AbilityManager { protected items: Ability[]; constructor(input?: AbilityDescriptor[] | AbilityDescriptor); /** * Check if permission is assigned with field and condition restriction. * * @param action * @param subject * @param field */ verify(action: AbilityID | string, subject?: Record, field?: string): boolean; /** * Check if permission is assigned without field or condition restriction. * * @param action * @param withoutInverse */ has(action: AbilityID | AbilityID[] | string | string[], withoutInverse?: boolean): boolean; satisfy(predicate: MongoQuery | string, subject?: Record): boolean; getTarget(value: MongoQuery | string): string | null | undefined; matchTarget(id: string | MongoQuery, target?: string): boolean; getPower(id: string | MongoQuery, direction?: 'max' | 'min'): undefined | number; getMany(): Ability[]; getOne(predicate: MongoQuery | string, options?: { withoutInverse?: boolean; field?: string; subject?: Record; sortFn?: (a: Ability, b: Ability) => number; }): Ability | undefined; set(input: AbilityDescriptor[] | AbilityDescriptor, merge?: boolean): void; } //# sourceMappingURL=module.d.ts.map