using System; using System.Collections.Generic; using System.Threading.Tasks; using Wino.Core.Domain.Entities; using Wino.Core.Domain.Enums; 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> GetUnreadUpdateFoldersAsync(Guid accountId); Task SetSpecialFolderAsync(Guid folderId, SpecialFolderType type); Task GetSpecialFolderByAccountIdAsync(Guid accountId, SpecialFolderType type); Task GetCurrentItemCountForFolder(Guid folderId); Task GetFolderNotificationBadgeAsync(Guid folderId); Task ChangeStickyStatusAsync(Guid folderId, bool isSticky); Task UpdateCustomServerMailListAsync(Guid accountId, List folders); Task UpdateSystemFolderConfigurationAsync(Guid accountId, SystemFolderConfiguration configuration); Task ChangeFolderSynchronizationStateAsync(Guid folderId, bool isSynchronizationEnabled); Task ChangeFolderShowUnreadCountStateAsync(Guid folderId, bool showUnreadCount); Task> GetSynchronizationFoldersAsync(SynchronizationOptions 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); // v2 /// /// Performs bulk update for the given folders. /// Used in Gmail. /// /// Account that folders belong to. /// Folders to update. Task BulkUpdateFolderStructureAsync(Guid accountId, List allFolders); /// /// Updates Folder's delta synchronization identifier. /// Only used in Outlook since it does per-folder sync. /// /// Folder id /// New synchronization identifier. /// New identifier if success. Task UpdateFolderDeltaSynchronizationIdentifierAsync(Guid folderId, string synchronizationIdentifier); /// /// 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); Task TestAsync(); } }