using System; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using Itenso.TimePeriod; using Wino.Core.Domain.Entities.Calendar; using Wino.Core.Domain.Models.Calendar; namespace Wino.Core.Domain.Interfaces; public interface ICalendarService { Task> GetAccountCalendarsAsync(Guid accountId); Task GetAccountCalendarAsync(Guid accountCalendarId); Task DeleteCalendarItemAsync(Guid calendarItemId); Task DeleteCalendarItemAsync(string calendarRemoteEventId, Guid calendarId); Task DeleteAccountCalendarAsync(AccountCalendar accountCalendar); Task InsertAccountCalendarAsync(AccountCalendar accountCalendar); Task UpdateAccountCalendarAsync(AccountCalendar accountCalendar); Task CreateNewCalendarItemAsync(CalendarItem calendarItem, List attendees); /// /// Retrieves calendar events for a given calendar within the specified time period. /// /// The calendar to retrieve events from. /// The time period to query events for. /// List of calendar items that fall within the requested period. Task> GetCalendarEventsAsync(IAccountCalendar calendar, ITimePeriod period); Task GetCalendarItemAsync(Guid accountCalendarId, string remoteEventId); Task UpdateCalendarDeltaSynchronizationToken(Guid calendarId, string deltaToken); /// /// Returns the correct calendar item based on the target details. /// /// Target details. Task GetCalendarItemTargetAsync(CalendarItemTarget targetDetails); Task GetCalendarItemAsync(Guid id); Task> GetAttendeesAsync(Guid calendarEventTrackingId); Task> ManageEventAttendeesAsync(Guid calendarItemId, List allAttendees); Task UpdateCalendarItemAsync(CalendarItem calendarItem, List attendees); Task> GetRemindersAsync(Guid calendarItemId); Task SaveRemindersAsync(Guid calendarItemId, List reminders); /// /// Checks due reminder windows and returns reminder notifications that should trigger now. /// Task> CheckAndNotifyAsync(DateTime lastCheckLocal, DateTime nowLocal, ISet sentReminderKeys, CancellationToken cancellationToken = default); /// /// Gets predefined reminder options in minutes (1 Hour, 30 Min, 15 Min, 5 Min, 1 Min). /// int[] GetPredefinedReminderMinutes(); #region Attachments /// /// Gets all attachments for a calendar event. /// Task> GetAttachmentsAsync(Guid calendarItemId); /// /// Inserts or updates calendar attachments. /// Task InsertOrReplaceAttachmentsAsync(List attachments); /// /// Marks an attachment as downloaded and updates its local file path. /// Task MarkAttachmentDownloadedAsync(Guid attachmentId, string localFilePath); /// /// Deletes all attachments for a calendar item. /// Task DeleteAttachmentsAsync(Guid calendarItemId); #endregion }