namespace Features.Auth.Dtos; /// Payload returned to the client after a successful login or token refresh. public record LoginPayload( Guid UserAccountId, string Username, string RefreshToken, string AccessToken ); /// Payload returned to the client after a successful registration. public record RegistrationPayload( Guid UserAccountId, string Username, string RefreshToken, string AccessToken); /// Payload returned to the client after a user account's email has been confirmed. public record ConfirmationPayload(Guid UserAccountId, DateTime ConfirmedDate); /// Request body for changing the authenticated user's username. /// /// The desired username; must be 3-64 characters and contain only letters, numbers, dots, /// underscores, and hyphens. /// public record UpdateUsernameRequest(string NewUsername); /// Payload returned to the client after a username change. public record UpdateUsernamePayload(Guid UserAccountId, string Username); /// Request body for changing the authenticated user's email address. /// The new email address; up to 128 characters and must be a valid email format. public record UpdateEmailRequest(string NewEmail); /// /// Payload returned to the client after an email change. The new address is unconfirmed until the /// user completes the confirmation flow again. /// public record UpdateEmailPayload(Guid UserAccountId, string Email, bool EmailConfirmed); /// Request body for updating the authenticated user's profile fields. /// The user's first name; up to 128 characters. /// The user's last name; up to 128 characters. /// The user's date of birth; the user must be at least 19 years old. public record UpdateProfileRequest(string FirstName, string LastName, DateTime DateOfBirth); /// Payload returned to the client after a profile update. public record UpdateProfilePayload( Guid UserAccountId, string FirstName, string LastName, DateTime DateOfBirth ); /// Request body for changing the authenticated user's password. /// The user's current plaintext password, verified before the change is applied. /// /// The desired new plaintext password; must be at least 8 characters and contain an uppercase letter, a /// lowercase letter, a number, and a special character. /// public record UpdatePasswordRequest(string CurrentPassword, string NewPassword); /// Payload returned to the client after a password change. public record UpdatePasswordPayload(Guid UserAccountId, DateTime ChangedAt);