import { EnumObject, InitModelOf, ObjectModel, ObjectOrModel, SomeRequired } from '../index'; export declare class Permission implements PermissionModel { self: Permission; model: PermissionModel; initModel: SomeRequired; id: string; level: PermissionLevel; constructor(); static Level: { UNDEFINED: number; NONE: number; ALL: number; }; init(model: InitModelOf): void; /** * Check if the given {@link Permission} is implied. * Quick implies is executed synchronously while non-quick implies is executed asynchronously. */ implies(permission: Permission, quick: true): boolean; implies(permission: Permission, quick?: false): JQuery.Promise; implies(permission: Permission, quick?: boolean): boolean | JQuery.Promise; matches(permission: Permission): boolean; /** * Precondition: `matches(permission)` */ protected _evalPermissionQuick(permission: Permission): boolean; /** * Precondition: `matches(permission)` */ protected _evalPermission(permission: Permission): JQuery.Promise; /** * @returns a {@link Permission} with the given `id`. */ static quick(id: string): Permission; /** * Ensures that the given `permission` is of type {@link Permission}. If a model is provided, a new {@link Permission} will be created. */ static ensure(permission: ObjectOrModel): T; } export interface PermissionModel extends ObjectModel { /** * The identifier of the {@link Permission}. */ id?: string; /** * The level of the {@link Permission}. */ level?: PermissionLevel; } export type PermissionLevel = EnumObject; //# sourceMappingURL=Permission.d.ts.map