UNPKG

@varia-bly/variably-sdk

Version:

Official JavaScript/TypeScript SDK for Variably feature flags, experimentation, LLM experiments with React hooks, and real-time dynamic configurations

41 lines 1.06 kB
/** * Real-time Feature Gate synchronization helper * Manages WebSocket subscriptions and cache invalidation */ import { CacheManager } from './cache'; import { Logger } from './logger'; import { VariablyConfig } from './types'; export declare class RealTimeGateSync { private subscriptionClient; private cache; private logger; private config; private baseUrl; private apiKey; constructor(config: VariablyConfig, cache: CacheManager, logger: Logger); /** * Initialize and start real-time subscriptions */ start(): Promise<void>; /** * Stop real-time subscriptions */ stop(): void; /** * Check if real-time sync is active */ isActive(): boolean; /** * Get connection state */ getConnectionState(): string; /** * Handle Feature Gate update from subscription */ private handleGateUpdate; /** * Invalidate cache entries for a specific gate */ private invalidateGateCache; } //# sourceMappingURL=realtime-gate-sync.d.ts.map