using GerbilManagerWebAPI.Models;
namespace GerbilManagerWebAPI.Dtos
{
public record RequestDto(
Guid Id,
string GmailMessageId,
string? ThreadId,
string FromAddress,
string? FromName,
string? Subject,
string? BodyText,
DateTimeOffset ReceivedAt,
RequestStatus Status,
Guid? AssignedContactId,
string? DraftReply,
DateTimeOffset? AnsweredAt);
/// Triage update: change status and/or assign a contact.
public record RequestTriageInput(RequestStatus? Status, Guid? AssignedContactId);
/// Mail settings read shape — the App Password is NEVER returned (only HasAppPassword).
public record MailSettingsDto(
string? GmailAddress,
int PollIntervalMinutes,
string Folder,
bool BackgroundPollEnabled,
bool HasAppPassword);
/// Body of the (edited) reply to send for POST /api/requests/{id}/send.
public record SendReplyInput(string Body);
/// Mail settings write shape. AppPassword is write-only; null/omitted leaves it unchanged,
/// empty string clears it.
public record MailSettingsInput(
string? GmailAddress,
string? AppPassword,
int? PollIntervalMinutes,
string? Folder,
bool? BackgroundPollEnabled);
}