export declare enum PermissionRuleType {
    ALL_OF = "ALL_OF",
    NONE_OF = "NONE_OF",
    SOME_OF = "SOME_OF"
}
export type RulePermission = string | PermissionValidator;
export type PermissionRule = {
    type: PermissionRuleType;
    permissions: RulePermission[];
    errorMessage: string;
};
export declare class PermissionError extends Error {
    rule: PermissionRule;
    permissions: RulePermission[];
    constructor(message: string, rule: PermissionRule, permissions: RulePermission[]);
}
export type PermissionValidationResults = {
    valid: boolean;
    errorMessage: string;
    errors: PermissionError[];
};
export declare class PermissionValidator {
    readonly rules: PermissionRule[];
    static create(): PermissionValidator;
    addRule(...rule: PermissionRule[]): this;
    extend(...validators: PermissionValidator[]): this;
    allOf(permissions: RulePermission[], errorMessage?: string): this;
    noneOf(permissions: RulePermission[], errorMessage?: string): this;
    someOf(permissions: RulePermission[], errorMessage?: string): this;
    private validateRule;
    private hasPermission;
    validate(permissions?: string[]): boolean;
    safeValidate(permissions?: string[]): PermissionValidationResults;
}
//# sourceMappingURL=permission-validator.d.ts.map