/**
 * Rule Evaluator
 *
 * Evaluates policy rules and determines enforcement actions.
 * Supports all rule types: MFA, approval, block, rate-limit, encryption, audit, etc.
 *
 * @packageDocumentation
 */
import type { PolicyRule, PolicyContext, RuleEvaluationResult, CustomRule } from './types.js';
/**
 * Rate limiter interface
 */
export interface RateLimiter {
    check(key: string, limit: number, window: number): Promise<{
        allowed: boolean;
        remaining: number;
        resetAt: number;
    }>;
    increment(key: string, window: number): Promise<void>;
}
/**
 * Geo location provider interface
 */
export interface GeoLocationProvider {
    lookup(ip: string): Promise<{
        country?: string;
        region?: string;
        city?: string;
    } | null>;
}
/**
 * Custom rule handler type
 */
export type CustomRuleHandler = (rule: CustomRule, context: PolicyContext) => Promise<RuleEvaluationResult>;
/**
 * Rule evaluator options
 */
export interface RuleEvaluatorOptions {
    /** Rate limiter implementation */
    rateLimiter?: RateLimiter;
    /** Geo location provider */
    geoLocationProvider?: GeoLocationProvider;
    /** Custom rule handlers */
    customHandlers?: Map<string, CustomRuleHandler>;
    /** Default MFA timeout in seconds */
    defaultMfaTimeout?: number;
    /** Default approval timeout in seconds */
    defaultApprovalTimeout?: number;
    /** Default session idle timeout in seconds */
    defaultSessionIdleTimeout?: number;
}
/**
 * RuleEvaluator class
 */
export declare class RuleEvaluator {
    private rateLimiter?;
    private geoLocationProvider?;
    private customHandlers;
    private defaultMfaTimeout;
    private defaultApprovalTimeout;
    private defaultSessionIdleTimeout;
    constructor(options?: RuleEvaluatorOptions);
    /**
     * Evaluate a rule against the context
     */
    evaluate(rule: PolicyRule, context: PolicyContext): Promise<RuleEvaluationResult>;
    /**
     * Evaluate all rules and return results
     */
    evaluateAll(rules: PolicyRule[], context: PolicyContext): Promise<RuleEvaluationResult[]>;
    /**
     * Evaluate MFA requirement
     */
    private evaluateMFA;
    /**
     * Evaluate approval requirement
     */
    private evaluateApproval;
    /**
     * Evaluate block access rule
     */
    private evaluateBlockAccess;
    /**
     * Evaluate rate limit rule
     */
    private evaluateRateLimit;
    /**
     * Evaluate encryption requirement
     */
    private evaluateEncryption;
    /**
     * Evaluate audit log rule
     */
    private evaluateAuditLog;
    /**
     * Evaluate step-up authentication rule
     */
    private evaluateStepUpAuth;
    /**
     * Evaluate data masking rule
     */
    private evaluateDataMasking;
    /**
     * Evaluate session timeout rule
     */
    private evaluateSessionTimeout;
    /**
     * Evaluate geo restriction rule
     */
    private evaluateGeoRestriction;
    /**
     * Evaluate custom rule
     */
    private evaluateCustom;
    /**
     * Get nested value from object using dot notation
     */
    private getNestedValue;
    /**
     * Register a custom rule handler
     */
    registerCustomHandler(name: string, handler: CustomRuleHandler): void;
    /**
     * Unregister a custom rule handler
     */
    unregisterCustomHandler(name: string): boolean;
    /**
     * Set rate limiter
     */
    setRateLimiter(rateLimiter: RateLimiter): void;
    /**
     * Set geo location provider
     */
    setGeoLocationProvider(provider: GeoLocationProvider): void;
}
/**
 * Create a rule evaluator instance
 */
export declare function createRuleEvaluator(options?: RuleEvaluatorOptions): RuleEvaluator;
//# sourceMappingURL=rule-evaluator.d.ts.map