using System; using System.Collections.Generic; using System.Threading.Tasks; using Wino.Core.Domain.Entities.Mail; using Wino.Core.Domain.Entities.Shared; using Wino.Core.Domain.Enums; using Wino.Core.Domain.Models.Accounts; using Wino.Core.Domain.Models.Folders; using Wino.Core.Domain.Models.MailItem; using Wino.Core.Domain.Models.Synchronization; namespace Wino.Core.Domain.Interfaces { public interface IFolderService { Task GetFolderStructureForAccountAsync(Guid accountId, bool includeHiddenFolders); Task GetFolderAsync(Guid folderId); Task GetFolderAsync(Guid accountId, string remoteFolderId); Task> GetFoldersAsync(Guid accountId); Task GetSpecialFolderByAccountIdAsync(Guid accountId, SpecialFolderType type); Task GetCurrentItemCountForFolder(Guid folderId); Task GetFolderNotificationBadgeAsync(Guid folderId); Task ChangeStickyStatusAsync(Guid folderId, bool isSticky); Task UpdateSystemFolderConfigurationAsync(Guid accountId, SystemFolderConfiguration configuration); Task ChangeFolderSynchronizationStateAsync(Guid folderId, bool isSynchronizationEnabled); Task ChangeFolderShowUnreadCountStateAsync(Guid folderId, bool showUnreadCount); Task> GetSynchronizationFoldersAsync(MailSynchronizationOptions options); /// /// Returns the folder - mail mapping for the given mail copy ids. /// Task> GetMailFolderPairMetadatasAsync(IEnumerable mailCopyIds); /// /// Returns the folder - mail mapping for the given mail copy id. /// Task> GetMailFolderPairMetadatasAsync(string mailCopyId); /// /// Deletes the folder for the given account by remote folder id. /// /// Account to remove from. /// Remote folder id. /// Task DeleteFolderAsync(Guid accountId, string remoteFolderId); /// /// Adds a new folder. /// /// Folder to add. Task InsertFolderAsync(MailItemFolder folder); /// /// Returns the known uids for the given folder. /// Only used for IMAP /// /// Folder to get uIds for Task> GetKnownUidsForFolderAsync(Guid folderId); /// /// Checks if Inbox special folder exists for an account. /// /// Account id to check for. /// True if Inbox exists, False if not. Task IsInboxAvailableForAccountAsync(Guid accountId); /// /// Updates folder's LastSynchronizedDate to now. /// /// Folder to update. Task UpdateFolderLastSyncDateAsync(Guid folderId); /// /// Updates the given folder. /// /// Folder to update. Task UpdateFolderAsync(MailItemFolder folder); /// /// Returns the active folder menu items for the given account for UI. /// /// Account to get folder menu items for. Task> GetAccountFoldersForDisplayAsync(IAccountMenuItem accountMenuItem); /// /// Returns a list of unread item counts for the given account ids. /// Every folder that is marked as show unread badge is included. /// /// Account ids to get unread folder counts for. Task> GetUnreadItemCountResultsAsync(IEnumerable accountIds); } }