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

40 lines
1.1 KiB
TypeScript
Raw Permalink Normal View History

2026-02-03 00:02:25 +01:00
import { ICalendarEvent } from '../types/CalendarTypes';
import { Configuration } from '../configurations/CalendarConfig';
/**
* ApiEventRepository
* Handles communication with backend API
*
* Used by SyncManager to send queued operations to the server
* NOT used directly by EventManager (which uses IndexedDBEventRepository)
*
* Future enhancements:
* - SignalR real-time updates
* - Conflict resolution
* - Batch operations
*/
export declare class ApiEventRepository {
private apiEndpoint;
constructor(config: Configuration);
/**
* Send create operation to API
*/
sendCreate(event: ICalendarEvent): Promise<ICalendarEvent>;
/**
* Send update operation to API
*/
sendUpdate(id: string, updates: Partial<ICalendarEvent>): Promise<ICalendarEvent>;
/**
* Send delete operation to API
*/
sendDelete(id: string): Promise<void>;
/**
* Fetch all events from API
*/
fetchAll(): Promise<ICalendarEvent[]>;
/**
* Initialize SignalR connection
* Placeholder for future implementation
*/
initializeSignalR(): Promise<void>;
}