Files
Inboxintel/src/InboxIntel.Application/DTOs/CleanupDtos.cs
T
2026-06-30 15:53:32 +02:00

39 lines
1.1 KiB
C#

using InboxIntel.Domain.Enums;
namespace InboxIntel.Application.DTOs;
/// <summary>Request to run a bulk cleanup action over a set of emails or a query.</summary>
public record CleanupRequestDto(
CleanupActionType Action,
IReadOnlyList<Guid>? EmailIds,
string? Query,
string? LabelId,
bool Confirmed);
/// <summary>
/// Preview of what a cleanup action would affect. Per the safety rules, no
/// destructive action runs until the user confirms this preview.
/// </summary>
public record CleanupPreviewDto(
CleanupActionType Action,
int AffectedCount,
long AffectedSizeBytes,
IReadOnlyList<EmailSummaryDto> Sample);
public record CleanupResultDto(
CleanupActionType Action,
int SucceededCount,
int FailedCount,
IReadOnlyList<string> Errors);
public record UnsubscribeItemDto(
Guid Id,
string SenderAddress,
string Domain,
UnsubscribeMethod Method,
UnsubscribeStatus Status,
int EmailCount,
string? UnsubscribeTarget);
public record UnsubscribeRequestDto(IReadOnlyList<Guid> ItemIds, bool Confirmed);