import { EntitlementValue } from '../models'; /** * Utility class for type-safe entitlement checking */ export declare class EntitlementChecker { private entitlements; constructor(entitlements: EntitlementValue[]); /** * Find an entitlement by code */ private findEntitlement; /** * Check if a BOOLEAN feature is enabled * @returns true if feature exists and is enabled, false otherwise */ hasFeature(code: string): boolean; /** * Get a NUMERIC limit value * @returns The numeric limit, or null if not found */ getLimit(code: string): number | null; /** * Get an ENUM value * @returns The enum string value, or null if not found */ getEnumValue(code: string): string | null; /** * Check if current usage is within a NUMERIC limit * @param code Entitlement code * @param currentUsage Current usage value * @returns true if within limit, false if exceeded or unlimited (-1) */ isWithinLimit(code: string, currentUsage: number): boolean; /** * Get remaining quota for a NUMERIC limit * @param code Entitlement code * @param used Currently used amount * @returns Remaining quota, or -1 for unlimited, or null if not found */ getRemainingQuota(code: string, used: number): number | null; /** * Get usage progress as a percentage (0-100) * @param code Entitlement code * @param used Currently used amount * @returns Progress percentage, or null if not found, or -1 for unlimited */ getProgress(code: string, used: number): number | null; /** * Check if approaching limit (default threshold: 90%) * @param code Entitlement code * @param used Currently used amount * @param threshold Warning threshold (0-1), default 0.9 * @returns true if approaching or at limit */ isApproachingLimit(code: string, used: number, threshold?: number): boolean; /** * Generic access check supporting all entitlement types * @param code Entitlement code * @param requiredValue Optional value to check against (for NUMERIC/ENUM) * @returns true if access is granted */ checkAccess(code: string, requiredValue?: any): boolean; /** * Get formatted display value for an entitlement * @param code Entitlement code * @returns Formatted string for display */ getDisplayValue(code: string): string | null; /** * Get all active features (BOOLEAN entitlements that are true) * @returns Array of feature codes */ getActiveFeatures(): string[]; /** * Get all limits (NUMERIC entitlements) * @returns Map of code to limit value */ getLimits(): Record; }