namespace SpaceGame.Api.Auth.Contracts;

public sealed class RegisterRequest
{
    public string Email { get; set; } = string.Empty;
    public string Password { get; set; } = string.Empty;
}

public sealed class LoginRequest
{
    public string Email { get; set; } = string.Empty;
    public string Password { get; set; } = string.Empty;
}

public sealed class RefreshTokenRequest
{
    public string RefreshToken { get; set; } = string.Empty;
}

public sealed class ForgotPasswordRequest
{
    public string Email { get; set; } = string.Empty;
}

public sealed class ResetPasswordRequest
{
    public string Token { get; set; } = string.Empty;
    public string NewPassword { get; set; } = string.Empty;
}

public sealed record AuthSessionResponse(
  Guid UserId,
  string Email,
  IReadOnlyList<string> Roles,
  string AccessToken,
  DateTimeOffset AccessTokenExpiresAtUtc,
  string RefreshToken,
  DateTimeOffset RefreshTokenExpiresAtUtc);

public sealed record RegisterResponse(
  Guid UserId,
  string Email,
  bool RequiresLogin);

public sealed record ForgotPasswordResponse(
  bool Accepted,
  string? ResetToken = null);
