9bbab5d32a
CI / backend (push) Successful in 50s
CI / frontend (push) Successful in 14s
Deploy Staging / deploy (push) Successful in 29s
Security / secrets (push) Successful in 4s
Security / dependencies (push) Successful in 55s
CI / backend (pull_request) Successful in 47s
CI / frontend (pull_request) Successful in 12s
Security / secrets (pull_request) Successful in 3s
Security / dependencies (pull_request) Successful in 54s
60 lines
1.6 KiB
C#
60 lines
1.6 KiB
C#
using InboxIntel.Domain.Enums;
|
|
|
|
namespace InboxIntel.Application.DTOs;
|
|
|
|
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,
|
|
// "Why this matched": a ts_headline fragment of the body 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.
|
|
string? MatchHighlight = null);
|
|
|
|
/// <summary>Full single-email view, including body text, for the detail pane.</summary>
|
|
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);
|