using MediatR;

namespace WhatsAppService.API.Application.Commands;

/// <summary>
/// EN: Command to process an incoming WhatsApp message from webhook.
/// VI: Command để xử lý tin nhắn WhatsApp đến từ webhook.
/// </summary>
public record ProcessIncomingMessageCommand(
    string PhoneNumberId,
    string SenderWaId,
    string MessageId,
    string MessageType,
    string? TextBody,
    string? MediaId,
    string? MediaMimeType,
    object? Interactive,
    DateTime Timestamp
) : IRequest<ProcessIncomingMessageResult>;

/// <summary>
/// EN: Result of processing incoming message.
/// VI: Kết quả xử lý tin nhắn đến.
/// </summary>
public record ProcessIncomingMessageResult(
    bool Success,
    Guid? ConversationId,
    Guid? MessageId,
    bool IsNewConversation,
    string? Error);
