/** * Handler configuration types */ /** * Base configuration for all handlers */ /** * Memory handler specific configuration */ export interface MemoryRepositoryConfig { enabled?: boolean; priority?: number; options?: { /** Maximum number of translations to cache */ maxSize?: number; /** TTL for cache entries in milliseconds */ ttl?: number; [key: string]: unknown; }; } export interface StorageRepositoryConfig { enabled?: boolean; priority?: number; options?: { prefix?: string; persistent?: boolean; ttl?: number; priority?: number; [key: string]: unknown; }; } export interface PreloadNamespaces { locale: string; namespace: string; eager?: boolean; } /** * Project-level config served by the dashboard for an integration key — * the SDK half of config sync (docs/20-named-key-autokey-map.md, companion * track). Flat contract; the server may grow optional fields. */ export interface ProjectConfig { /** The project's source language */ defaultLocale: string; /** Enabled target languages, dashboard-driven */ languages: string[]; } /** * Missing translation sync configuration */ export interface SyncMissingConfig { /** Enable automatic syncing of missing translations */ enabled: boolean; /** Debounce delay in milliseconds before syncing (default: 500) */ debounceMs?: number; /** Maximum batch size before forcing immediate flush (default: 50) */ batchSize?: number; } /** * Network Repository endpoint configuration * Supports placeholder syntax: :key, :locale, :namespace */ export interface NetworkEndpoints { /** GET single translation - default: '/api/integrations/translations/:key' */ getTranslation?: string; /** GET namespace translations - default: '/api/integrations/translations/:locale/:namespace' */ getNamespace?: string; /** GET project config (dashboard languages) - default: '/api/integrations/project-config' */ getProjectConfig?: string; /** PUT single translation - default: '/api/integrations/sync/:key' */ setTranslation?: string; /** PUT namespace translations - default: '/api/integrations/sync/:locale/:namespace' */ setNamespace?: string; /** POST batch translations - default: '/api/integrations/sync/batch' */ setBatch?: string; /** DELETE single translation - default: '/api/integrations/sync/:key' */ removeTranslation?: string; /** DELETE all translations - default: '/translations' */ clearTranslations?: string; } /** * Network Repository specific configuration */ export interface NetworkRepositoryConfig { enabled?: boolean; priority?: number; options?: { baseUrl: string; timeout?: number; retries?: number; retryDelay?: number; headers?: Record; apiKey?: string; /** TTL (ms) for the 404/423 negative cache — repeats of a known miss or * locked namespace are answered locally until it expires. A 423 * Retry-After header from the server overrides it. Default: 60 000. */ negativeCacheTtlMs?: number; endpoints?: NetworkEndpoints; preloadNamespaces?: Array; syncMissing?: SyncMissingConfig; [key: string]: unknown; }; } //# sourceMappingURL=repository.config.d.ts.map