Calendar Sync Repository
Component Detail
Data Layer
low complexity
backend
0
Dependencies
3
Dependents
5
Entities
0
Integrations
Description
Data access layer responsible for persisting and retrieving calendar synchronization preferences from the database. Stores per-user iCal token, enabled state, and event type filter configuration in the settings table.
calendar-sync-repository
Responsibilities
- Persist calendar sync preferences (enabled flag, event type filters) to settings table
- Store and retrieve per-user iCal authentication tokens
- Query activities and events for iCal feed generation with privacy filter
- Update last sync timestamp for status display
Interfaces
getSyncPreferences(userId: string)
saveSyncPreferences(userId: string, prefs: CalendarSyncPreferences)
getICalToken(userId: string)
saveICalToken(userId: string, token: string)
revokeICalToken(userId: string)
getActivitiesForFeed(userId: string, filters: CalendarFilter[])
getEventsForFeed(userId: string, filters: CalendarFilter[])
getRemindersForFeed(userId: string)
Relationships
Dependents (3)
Components that depend on this component
Related Data Entities (5)
Data entities managed by this component