Files
DigitalData.MessagingService/src/core/DigitalData.MessagingService.Application/EmailReceiving/Queries/ReadEmailQueryResponse.cs
TekH 6c698c95be Refactor ReadEmailQuery to return structured response
Updated ReadEmailQuery to return a new response type,
ReadEmailQueryResponse, which includes both email data
and metadata (e.g., LastSync). Added the Account property
to ReadEmailQuery for specifying the email account.

Refactored ReadEmailQueryHandler to:
- Use IImapEmailService to fetch LastSync metadata.
- Return ReadEmailQueryResponse instead of a collection
  of ReceivedEmailDto.

Introduced ReadEmailQueryResponse class to encapsulate
LastSync and Emails properties.

Updated EmailController to handle the new response
structure, ensuring compatibility with the updated
ReadEmailQuery and its handler.
2026-08-17 01:13:14 +02:00

17 lines
420 B
C#

#if NET
using DigitalData.MessagingService.Application.Common.Dto;
namespace DigitalData.MessagingService.Application.EmailReceiving.Queries;
/// <summary>
///
/// </summary>
/// <param name="Emails"></param>
/// <param name="LastSync"></param>
public class ReadEmailQueryResponse
{
public DateTime? LastSync { get; init; } = null;
public IEnumerable<ReceivedEmailDto> Emails { get; init; } = [];
}
#endif