39 lines
1.1 KiB
TypeScript
39 lines
1.1 KiB
TypeScript
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>;
|
|
}
|