/** * Queue for batching and syncing missing translations to the backend * Uses debouncing (500ms default) and batching (50 items default) */ import type { EventEmitter } from '../base/event-emitter.js'; import type { IAsyncRepository } from '../interfaces/repository.interface.js'; export interface MissingTranslationItem { key: string; fallbackValue: string; styles?: Record; locale: string; namespace: string; } export interface MissingTranslationQueueConfig { enabled: boolean; debounceMs: number; batchSize: number; } export declare class MissingTranslationQueue { private queue; private debounceTimer; private repository; private config; private eventEmitter; private recentlySynced; constructor(repository: IAsyncRepository, config: MissingTranslationQueueConfig, eventEmitter?: EventEmitter); /** * Add a missing translation to the queue * Triggers debounce timer or immediate flush if batch size reached */ add(item: MissingTranslationItem): void; /** * Flush the queue - send all queued items to the backend * Fire-and-forget pattern (async but not awaited) */ flush(): void; /** * Send batch to backend via repository * Uses repository's retry logic from makeRequest() */ private syncBatch; /** * Fallback: sync items individually in parallel */ private syncIndividually; /** * Get current queue size (for debugging) */ getQueueSize(): number; /** * Get queue stats (for debugging) */ getStats(): { queueSize: number; enabled: boolean; debounceMs: number; batchSize: number; }; /** * Cleanup - clear timer and queue */ destroy(): void; } //# sourceMappingURL=missing-translation-queue.d.ts.map