WIP on master
This commit is contained in:
parent
b6ab1ff50e
commit
80aaab46f2
25 changed files with 6291 additions and 927 deletions
20
src/repositories/IEventRepository.ts
Normal file
20
src/repositories/IEventRepository.ts
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
import { CalendarEvent } from '../types/CalendarTypes';
|
||||
|
||||
/**
|
||||
* IEventRepository - Interface for event data loading
|
||||
*
|
||||
* Abstracts the data source for calendar events, allowing easy switching
|
||||
* between mock data, REST API, GraphQL, or other data sources.
|
||||
*
|
||||
* Implementations:
|
||||
* - MockEventRepository: Loads from local JSON file
|
||||
* - ApiEventRepository: (Future) Loads from backend API
|
||||
*/
|
||||
export interface IEventRepository {
|
||||
/**
|
||||
* Load all calendar events from the data source
|
||||
* @returns Promise resolving to array of CalendarEvent objects
|
||||
* @throws Error if loading fails
|
||||
*/
|
||||
loadEvents(): Promise<CalendarEvent[]>;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue