/** * Redis Feature Flag Provider * * Redis-based provider implementation supporting distributed caching and storage. * This will be moved to @plyaz/core when the package structure is finalized. * * @fileoverview Redis provider implementation for feature flags * @version 1.0.0 */ import type { FeatureFlag, FeatureFlagRule, FeatureFlagConfig, FeatureFlagValue, CreateFlagRequest } from '@plyaz/types'; import { FeatureFlagProvider } from '../provider'; /** * Redis-based feature flag provider supporting distributed caching and storage. * * @class RedisFeatureFlagProvider * @extends {FeatureFlagProvider} * * @example * ```typescript * const provider = new RedisFeatureFlagProvider({ * provider: 'redis', * redisConfig: { * url: 'redis://localhost:6379', * keyPrefix: 'feature_flags', * }, * isCacheEnabled: true, * cacheTtl: 300, * }, FEATURES); * * await provider.initialize(); * const isEnabled = await provider.isEnabled('AUTH_GOOGLE'); * ``` */ export declare class RedisFeatureFlagProvider extends FeatureFlagProvider { /** * Creates a new Redis feature flag provider. * * @param config - Provider configuration with Redis settings * @param features - Record of feature flag keys to their default values */ constructor(config: FeatureFlagConfig, features: Record); /** * Fetches flags and rules from Redis storage. * * @protected * @returns Promise resolving to flags and rules from Redis */ protected fetchData(): Promise<{ flags: FeatureFlag[]; rules: FeatureFlagRule[]; }>; /** * Validates the Redis provider configuration. * * @private * @throws Error if configuration is invalid */ private validateConfig; /** * Validates Redis URL format. * * @private * @param url - URL to validate * @returns True if valid Redis URL */ private isValidRedisUrl; /** * Gets Redis provider information. * * @returns Redis provider status information */ getRedisInfo(): { url?: string; keyPrefix?: string; isImplemented: boolean; requiredImplementation: string[]; recommendedPatterns: string[]; }; createFlag(_data: CreateFlagRequest): Promise>; updateFlag(_key: FeatureFlagKey, _data: Partial>): Promise>; deleteFlag(_key: FeatureFlagKey): Promise; getRules(_key: FeatureFlagKey): Promise[]>; getAllRules(): Promise[]>; } //# sourceMappingURL=redis.d.ts.map