import { ILogicRule, IOptions, IRule, IRuleConstructorOptions, IRuleFunction, IRuleResult, ShieldRule } from './types'; export declare class Rule> implements IRule { readonly name: string; private func; constructor(name: string, func: IRuleFunction, _constructorOptions: IRuleConstructorOptions); resolve(ctx: TContext, type: string, path: string, input: { [name: string]: any; }, rawInput: unknown, options: IOptions): Promise>; /** * * Compares a given rule with the current one * and checks whether their functions are equal. * */ equals(rule: Rule): boolean; private executeRule; } export declare class LogicRule> implements ILogicRule { private rules; constructor(rules: ShieldRule[]); /** * By default logic rule resolves to false. */ resolve(_ctx: TContext, _type: string, _path: string, _input: { [name: string]: any; }, _rawInput: unknown, _options: IOptions): Promise>; /** * Evaluates all the rules. */ evaluate(ctx: TContext, type: string, path: string, input: { [name: string]: any; }, rawInput: unknown, options: IOptions): Promise[]>; /** * Returns rules in a logic rule. */ getRules(): ShieldRule[]; } export declare class RuleOr> extends LogicRule { constructor(rules: ShieldRule[]); /** * Makes sure that at least one of them has evaluated to true. */ resolve(ctx: TContext, type: string, path: string, input: { [name: string]: any; }, rawInput: unknown, options: IOptions): Promise>; } export declare class RuleAnd> extends LogicRule { constructor(rules: ShieldRule[]); /** * Makes sure that all of them have resolved to true. */ resolve(ctx: TContext, type: string, path: string, input: { [name: string]: any; }, rawInput: unknown, options: IOptions): Promise>; } export declare class RuleChain> extends LogicRule { constructor(rules: ShieldRule[]); /** * Makes sure that all of them have resolved to true. */ resolve(ctx: TContext, type: string, path: string, input: { [name: string]: any; }, rawInput: unknown, options: IOptions): Promise; /** * Evaluates all the rules. */ evaluate(ctx: TContext, type: string, path: string, input: { [name: string]: any; }, rawInput: unknown, options: IOptions): Promise; } export declare class RuleRace> extends LogicRule { constructor(rules: ShieldRule[]); /** * Makes sure that at least one of them resolved to true. */ resolve(ctx: TContext, type: string, path: string, input: { [name: string]: any; }, rawInput: unknown, options: IOptions): Promise; /** * Evaluates all the rules. */ evaluate(ctx: TContext, type: string, path: string, input: { [name: string]: any; }, rawInput: unknown, options: IOptions): Promise; } export declare class RuleNot> extends LogicRule { error?: Error; constructor(rule: ShieldRule, error?: Error); /** * * Negates the result. * */ resolve(ctx: TContext, type: string, path: string, input: { [name: string]: any; }, rawInput: unknown, options: IOptions): Promise; } export declare class RuleTrue> extends LogicRule { constructor(); /** * * Always true. * */ resolve(): Promise; } export declare class RuleFalse> extends LogicRule { constructor(); /** * * Always false. * */ resolve(): Promise; }