import type { SessionStore } from '../session-store.interface.js'; import type { Session } from '../../types/session.js'; export interface ReplicationEvents { 'session:created': (session: Session) => void; 'session:updated': (session: Session) => void; 'session:deleted': (sessionId: string) => void; 'session:touched': (sessionId: string) => void; 'sync:started': () => void; 'sync:completed': (stats: SyncStats) => void; 'sync:failed': (error: Error) => void; 'replica:connected': (replicaId: string) => void; 'replica:disconnected': (replicaId: string) => void; 'replica:error': (replicaId: string, error: Error) => void; } export interface SyncStats { startTime: number; endTime: number; duration: number; syncedSessions: number; failedSessions: number; skippedSessions: number; conflicts: number; errors: Array<{ sessionId: string; error: string; }>; } export interface ReplicationConfig { mode: 'master-slave' | 'master-master' | 'active-passive'; syncInterval: number; batchSize: number; conflictResolution: 'last-write-wins' | 'oldest-wins' | 'manual'; syncDeletions: boolean; syncExpired: boolean; maxRetries: number; retryDelay: number; } export interface ReplicaInfo { id: string; store: SessionStore; isActive: boolean; lastSync: Date | null; syncErrors: number; config: Partial; } export type ReplicationOperation = 'create' | 'update' | 'delete' | 'touch'; export interface ReplicationMetricsData { operationType: ReplicationOperation; replicaId: string; sessionId?: string; success: boolean; duration: number; error?: string; } export interface HealthCheckResult { available: boolean; error?: string; } export interface ReplicaHealthStatus { id: string; available: boolean; lastSync: Date | null; syncErrors: number; error?: string; } export interface SyncBatchResult { processed: number; succeeded: number; failed: number; conflicts: number; errors: Array<{ sessionId: string; error: string; }>; } export declare const DEFAULT_REPLICATION_CONFIG: ReplicationConfig; //# sourceMappingURL=types.d.ts.map