import { ICalendarEvent } from '../types/CalendarTypes'; import { IEventRepository, UpdateSource } from './IEventRepository'; import { IndexedDBService } from '../storage/IndexedDBService'; import { OperationQueue } from '../storage/OperationQueue'; /** * IndexedDBEventRepository * Offline-first repository using IndexedDB as single source of truth * * All CRUD operations: * - Save to IndexedDB immediately (always succeeds) * - Add to sync queue if source is 'local' * - Background SyncManager processes queue to sync with API */ export declare class IndexedDBEventRepository implements IEventRepository { private indexedDB; private queue; constructor(indexedDB: IndexedDBService, queue: OperationQueue); /** * Load all events from IndexedDB * Ensures IndexedDB is initialized and seeded on first call */ loadEvents(): Promise; /** * Create a new event * - Generates ID * - Saves to IndexedDB * - Adds to queue if local (needs sync) */ createEvent(event: Omit, source?: UpdateSource): Promise; /** * Update an existing event * - Updates in IndexedDB * - Adds to queue if local (needs sync) */ updateEvent(id: string, updates: Partial, source?: UpdateSource): Promise; /** * Delete an event * - Removes from IndexedDB * - Adds to queue if local (needs sync) */ deleteEvent(id: string, source?: UpdateSource): Promise; /** * Generate unique event ID * Format: {timestamp}-{random} */ private generateEventId; }