using ERPCore.Dtos.Auth;
using ERPCore.Services.Auth;

namespace ERPCore.Services.Interfaces;

/// <summary>UserManager proxy business logic (API_REFERENCE.md §3), fronting AuthHex.</summary>
public interface IAuthUserService
{
    Task<AuthSessionResult> RegisterAsync(RegisterRequest request, CancellationToken ct = default);
    Task<AuthSessionResult> LoginAsync(LoginRequest request, CancellationToken ct = default);
    Task<OtpAuthSessionResult> VerifyOtpForLoginAsync(VerifyOtpForLoginRequest request, CancellationToken ct = default);
    Task<AuthSessionResult> RefreshTokenAsync(string refreshToken, RefreshTokenRequest request, CancellationToken ct = default);
    Task<GetUserDetailsResponse> GetUserDetailsAsync(Guid userId, CancellationToken ct = default);
    Task<List<SessionDto>> GetUserSessionsAsync(string bearerToken, CancellationToken ct = default);
    Task ChangeUserStatusAsync(ChangeUserStatusRequest request, string bearerToken, CancellationToken ct = default);
    Task LockUserAccountAsync(LockUserAccountRequest request, string bearerToken, CancellationToken ct = default);
    Task ChangeUserPasswordAsync(ChangeUserPasswordRequest request, string bearerToken, CancellationToken ct = default);
    Task<VerifyPasswordResponse> VerifyPasswordAsync(VerifyPasswordRequest request, string bearerToken, CancellationToken ct = default);
    Task LogoutUserAsync(LogoutRequest request, CancellationToken ct = default);
    Task<UserSummaryDto?> UpdateUserAsync(UpdateUserRequest request, string bearerToken, CancellationToken ct = default);
    Task<TwoFaSetupResponse> InitiateTwoFaSetupAsync(string bearerToken, CancellationToken ct = default);
    Task<CompleteTwoFaSetupResponse> CompleteTwoFaSetupAsync(CompleteTwoFaSetupRequest request, string bearerToken, CancellationToken ct = default);
    Task VerifyTwoFaAsync(VerifyTwoFaRequest request, string bearerToken, CancellationToken ct = default);
    Task DisableTwoFaAsync(DisableTwoFaRequest request, string bearerToken, CancellationToken ct = default);
    Task<TwoFaStatusResponse> GetTwoFaStatusAsync(string bearerToken, CancellationToken ct = default);
}
