using ERPCore.Dtos.Common;
using ERPCore.Dtos.Users;

namespace ERPCore.Services.Interfaces;

/// <summary>
/// Admin-facing user management: list/create/reassign-role against the local
/// shadow `User` table, orchestrating account creation in AuthHex too (see
/// <see cref="CreateUserRequest"/>).
/// </summary>
public interface IUserManagementService
{
    Task<PagedResponse<ManagedUserDto>> ListAsync(PageQuery query, CancellationToken ct = default);
    Task<ManagedUserDto?> GetAsync(int userId, CancellationToken ct = default);
    Task<ManagedUserDto> CreateAsync(CreateUserRequest request, CancellationToken ct = default);
    Task<ManagedUserDto> UpdateRoleAsync(int userId, UpdateUserRoleRequest request, CancellationToken ct = default);

    /// <summary>AuthHex UserType options for the create-user form's select.</summary>
    Task<List<UserTypeOptionDto>> ListUserTypesAsync(CancellationToken ct = default);
}
