Calendar/wwwroot/js/repositories/MockEventRepository.d.ts

34 lines
1.3 KiB
TypeScript
Raw Permalink Normal View History

2026-02-03 00:02:25 +01:00
import { ICalendarEvent } from '../types/CalendarTypes';
import { IEventRepository, UpdateSource } from './IEventRepository';
/**
* MockEventRepository - Loads event data from local JSON file (LEGACY)
*
* This repository implementation fetches mock event data from a static JSON file.
* DEPRECATED: Use IndexedDBEventRepository for offline-first functionality.
*
* Data Source: data/mock-events.json
*
* NOTE: Create/Update/Delete operations are not supported - throws errors.
* This is intentional to encourage migration to IndexedDBEventRepository.
*/
export declare class MockEventRepository implements IEventRepository {
private readonly dataUrl;
loadEvents(): Promise<ICalendarEvent[]>;
/**
* NOT SUPPORTED - MockEventRepository is read-only
* Use IndexedDBEventRepository instead
*/
createEvent(event: Omit<ICalendarEvent, 'id'>, source?: UpdateSource): Promise<ICalendarEvent>;
/**
* NOT SUPPORTED - MockEventRepository is read-only
* Use IndexedDBEventRepository instead
*/
updateEvent(id: string, updates: Partial<ICalendarEvent>, source?: UpdateSource): Promise<ICalendarEvent>;
/**
* NOT SUPPORTED - MockEventRepository is read-only
* Use IndexedDBEventRepository instead
*/
deleteEvent(id: string, source?: UpdateSource): Promise<void>;
private processCalendarData;
}