using CashLineERP.Contracts.Identity;

namespace CashLineERP.Application.Identity;

public interface IAdminUserService
{
    IReadOnlyCollection<AdminUserResponse> GetUsers(string? userTypeCode = null, bool includeInactive = true);

    AdminUserResponse? GetUser(long userId);

    AdminFunctionConfigurationResponse GetFunctionConfiguration();

    IReadOnlyCollection<AdminRoleFunctionOptionResponse> GetRoleFunctionOptions(string? userTypeCode = null);

    AdminFunctionConfigurationResponse UpdateFunctionGovernance(UpdateAdminFunctionGovernanceRequest request, long actorUserId);

    bool AnyFunctionEnabled(IReadOnlyCollection<string> functionCodes);

    IReadOnlyCollection<AdminUserReportRowResponse> GetUserAdministrationReportRows(string? userTypeCode = null, string? roleCode = null);

    string ExportUserAdministrationReportExcel(long actorUserId, string? userTypeCode = null, string? roleCode = null);

    byte[] ExportUserAdministrationReportPdf(long actorUserId, string? userTypeCode = null, string? roleCode = null);

    AdminUserResponse CreateUser(CreateAdminManagedUserRequest request, long actorUserId);

    AdminUserResponse ReplaceRoles(long userId, UpdateAdminManagedUserRolesRequest request, long actorUserId);

    AdminUserResponse SuspendUser(long userId, AdminUserLifecycleActionRequest request, long actorUserId);

    AdminUserResponse HoldUser(long userId, AdminUserLifecycleActionRequest request, long actorUserId);

    AdminUserResponse ReinstateUser(long userId, AdminUserLifecycleActionRequest request, long actorUserId);

    AdminUserResponse RevokeUser(long userId, AdminUserLifecycleActionRequest request, long actorUserId);

    AdminUserResponse DeleteUser(long userId, AdminUserLifecycleActionRequest request, long actorUserId);
}
