feat(application): add EmailSyncResult DTO, Folder/AccountId to ReceivedEmailDto, rename CreateRangeAsync in IRepository, update IImapEmailService signature, add AutoMapper profiles for ReceivedEmail and EmailAttachment

This commit is contained in:
2026-08-13 16:48:22 +02:00
parent c9b7d99ecc
commit 6abe0e18f6
5 changed files with 43 additions and 14 deletions

View File

@@ -1,6 +1,5 @@
#if NET
using DigitalData.MessagingService.Application.Common.Dto;
using DigitalData.MessagingService.Application.Common.Dto.MailSearch;
using DigitalData.MessagingService.Domain.Entities;
namespace DigitalData.MessagingService.Application.Common.Interfaces;
@@ -11,19 +10,16 @@ namespace DigitalData.MessagingService.Application.Common.Interfaces;
public interface IImapEmailService
{
/// <summary>
/// Fetches emails from the specified mailbox folder.
///
/// </summary>
/// <param name="account">Account whose IMAP settings will be used.</param>
/// <param name="date"></param>
/// When <see langword="true"/> (default), fetched messages are marked as <c>\Seen</c> on the server.
/// Set to <see langword="false"/> for a non-destructive read (uses <c>BODY.PEEK</c> internally).
/// </param>
/// <param name="cancellationToken">Cancellation token.</param>
public Task SyncEmailsAsync(
EmailAccount account,
DateFilter date,
string folder = "INBOX",
CancellationToken cancel = default);
/// <param name="account"></param>
/// <param name="folder"></param>
/// <param name="cancel"></param>
/// <returns></returns>
Task<EmailSyncResult> SyncEmailsAsync(
EmailAccount account,
string folder = "INBOX",
CancellationToken cancel = default);
/// <summary>
/// Marks a message as seen (read) on the server.