using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using MimeKit; using Wino.Core.Domain.Entities.Shared; using Wino.Core.Domain.Models.Contacts; namespace Wino.Core.Domain.Interfaces; public interface IContactService { Task> GetAddressInformationAsync(string queryText); Task GetAddressInformationByAddressAsync(string address); Task> GetContactsByAddressesAsync(IEnumerable addresses); Task SaveAddressInformationAsync(MimeMessage message); Task SaveAddressInformationAsync(IEnumerable contacts); Task CreateNewContactAsync(string address, string displayName); // Paged contact queries for ContactsPage Task> GetAllContactsAsync(); Task> SearchContactsAsync(string searchQuery); Task GetContactsPageAsync(int offset, int pageSize, string searchQuery = null, bool excludeRootContacts = false); Task UpdateContactAsync(AccountContact contact); Task DeleteContactAsync(string address); Task DeleteContactsAsync(IEnumerable addresses); // Group / distribution list support Task> GetGroupsAsync(); Task CreateGroupAsync(string name, string description = null); Task DeleteGroupAsync(Guid groupId); Task> GetGroupMembersAsync(Guid groupId); Task AddGroupMemberAsync(Guid groupId, string memberAddress); Task RemoveGroupMemberAsync(Guid groupId, string memberAddress); /// /// Expands a contact group to the individual entries of its members. /// Returns an empty list if the group does not exist or has no members. /// Task> ExpandGroupAsync(Guid groupId); }