namespace Health.Application.Auth;

public sealed record AuthResult(int Code, object? Data, string? Message = null);
public sealed record RegisterCommand(string Phone, string SmsCode, string Name, Guid DoctorId);
public sealed record AppleLoginCommand(string IdentityToken, string? AuthorizationCode, string? Name);

public interface IAuthService
{
    Task<AuthResult> SendCodeAsync(string phone, bool revealDevelopmentCode, CancellationToken ct);
    Task<AuthResult> RegisterAsync(RegisterCommand command, CancellationToken ct);
    Task<AuthResult> LoginAsync(string phone, string smsCode, CancellationToken ct);
    Task<AuthResult> AppleLoginAsync(AppleLoginCommand command, CancellationToken ct);
    Task<AuthResult> RefreshAsync(string refreshToken, CancellationToken ct);
    Task LogoutAsync(string refreshToken, CancellationToken ct);
}
