namespace EnvelopeGenerator.ReceiverUI.Web.Client.Api.Models;
///
/// Mirrors EnvelopeGenerator.API.Models.ReceiverAuthResponse.
/// The Status string determines which fields are relevant.
/// Possible values:
/// requires_access_code, requires_tfa, show_document,
/// already_signed, rejected, not_found, expired, error.
///
public class ReceiverAuthResponse
{
public string Status { get; set; } = string.Empty;
public string? Title { get; set; }
public string? Message { get; set; }
public string? SenderEmail { get; set; }
public string? ReceiverName { get; set; }
public bool TfaEnabled { get; set; }
public bool HasPhoneNumber { get; set; }
public bool ReadOnly { get; set; }
/// "sms" or "authenticator" when Status == "requires_tfa".
public string? TfaType { get; set; }
public DateTime? TfaExpiration { get; set; }
public string? ErrorMessage { get; set; }
}
public class AccessCodeRequest
{
public string AccessCode { get; set; } = string.Empty;
public bool PreferSms { get; set; }
}
public class TfaCodeRequest
{
public string Code { get; set; } = string.Empty;
/// "sms" or "authenticator".
public string Type { get; set; } = "authenticator";
}
///
/// Status strings returned by .
///
public static class ReceiverAuthStatus
{
public const string RequiresAccessCode = "requires_access_code";
public const string RequiresTfa = "requires_tfa";
public const string ShowDocument = "show_document";
public const string AlreadySigned = "already_signed";
public const string Rejected = "rejected";
public const string NotFound = "not_found";
public const string Expired = "expired";
public const string Error = "error";
}