Recalculate recurrences when a new event added.

This commit is contained in:
Burak Kaan Köse
2025-12-30 08:51:50 +01:00
parent 0519bf86b3
commit 72e43e4b7a
3 changed files with 91 additions and 7 deletions
@@ -25,6 +25,14 @@ public interface ICalendarService
/// <param name="period">The time period to query events for.</param>
/// <returns>List of calendar items including regular events and recurring event occurrences.</returns>
Task<List<CalendarItem>> GetCalendarEventsAsync(IAccountCalendar calendar, ITimePeriod period);
/// <summary>
/// Expands a recurring calendar item to check if any of its occurrences fall within the given periods.
/// </summary>
/// <param name="calendarItem">The calendar item to expand (can be recurring or non-recurring).</param>
/// <param name="periods">The list of periods to check against.</param>
/// <returns>List of calendar items (either the original item or expanded recurrence instances) that fall within the periods.</returns>
Task<List<CalendarItem>> GetExpandedRecurringEventsForPeriodsAsync(CalendarItem calendarItem, IEnumerable<ITimePeriod> periods);
Task<CalendarItem> GetCalendarItemAsync(Guid accountCalendarId, string remoteEventId);
Task UpdateCalendarDeltaSynchronizationToken(Guid calendarId, string deltaToken);