using MediatR;

namespace MktXService.API.Application.Commands;

/// <summary>
/// EN: Command to connect a Twitter account via OAuth.
/// VI: Command để kết nối tài khoản Twitter qua OAuth.
/// </summary>
public record ConnectTwitterAccountCommand(
    Guid MerchantId,
    string TwitterUserId,
    string Username,
    string OAuthToken,
    string OAuthTokenSecret,
    string? DisplayName = null,
    string? ProfileImageUrl = null
) : IRequest<ConnectTwitterAccountResult>;

public record ConnectTwitterAccountResult(
    bool Success,
    Guid? AccountId,
    string? Error);

/// <summary>
/// EN: Command to disconnect a Twitter account.
/// VI: Command để ngắt kết nối tài khoản Twitter.
/// </summary>
public record DisconnectTwitterAccountCommand(
    Guid AccountId,
    string? Reason = null
) : IRequest<bool>;

/// <summary>
/// EN: Command to refresh OAuth tokens for a Twitter account.
/// VI: Command để làm mới OAuth tokens cho tài khoản Twitter.
/// </summary>
public record RefreshTwitterAccountTokensCommand(
    Guid AccountId,
    string NewOAuthToken,
    string NewOAuthTokenSecret
) : IRequest<bool>;
