using InboxIntel.Domain.Enums; namespace InboxIntel.Application.DTOs; /// /// Row summary for search/list results. MatchHighlight is a "why this matched" body /// fragment (ts_headline) with matched terms wrapped in U+E000/U+E001 sentinels — NOT HTML; /// the client renders them as escaped <mark> elements, so untrusted email content can /// never inject markup. Null unless the search had a free-text query; optional/last so other /// DTO constructors are unaffected. /// public record EmailSummaryDto( Guid Id, string GmailMessageId, string? Subject, string? Snippet, string SenderAddress, string? SenderDisplayName, DateTimeOffset SentAtUtc, bool IsUnread, bool IsStarred, bool HasAttachments, long SizeEstimateBytes, EmailCategory Category, bool HasListUnsubscribe, bool SupportsOneClick, string? MatchHighlight = null); /// Full single-email view, including body text, for the detail pane. public record EmailDetailDto( Guid Id, string GmailMessageId, string? Subject, string? Snippet, string? BodyText, string SenderAddress, string? SenderDisplayName, DateTimeOffset SentAtUtc, bool IsUnread, bool IsStarred, bool HasAttachments, long SizeEstimateBytes, EmailCategory Category, bool HasListUnsubscribe, bool SupportsOneClick); public record SenderStatDto( Guid SenderId, string Address, string? DisplayName, string Domain, int EmailCount, int UnreadCount, long TotalSizeBytes, bool HasUnsubscribe, DateTimeOffset? LastReceivedUtc); public record AttachmentDto( Guid Id, string FileName, string? MimeType, long SizeBytes);