import { CacheKey, ControlOptions, Policy, PropType, TimeOptions } from '../types'; import { Grant } from './grant.class'; export declare class Permission { readonly granted: boolean; readonly grant: Grant; constructor(granted: boolean, grant: Grant); get policies(): Policy[]; has(cKey: CacheKey): boolean; scopes(prop: PropType, cKey?: CacheKey): Scope[]; subjects(cKey?: CacheKey): Sub[]; time(options?: TimeOptions, cKey?: CacheKey): boolean; location(ip: string, cKey?: CacheKey): boolean; field(data: any, cKey?: CacheKey | ((data: any) => CacheKey | Promise>)): Promise; filter(data: any, cKey?: CacheKey | ((data: any) => CacheKey | Promise>)): Promise; static build(granted: boolean, policies: Policy[], options?: ControlOptions): Permission; }