namespace Knot.Contracts.Auth.Domain;

public interface IUserRepository
{
    Task<UserContract?> GetByIdAsync(Guid id, CancellationToken cancellationToken = default);
    Task<List<UserContract>> GetByIdsAsync(IEnumerable<Guid> ids, CancellationToken cancellationToken = default);
    Task<UserContract?> GetByUsernameAsync(string username, CancellationToken cancellationToken = default);
    Task<bool> IsUsernameUniqueAsync(string username, CancellationToken cancellationToken = default);
    Task<List<UserContract>> SearchUsersAsync(string query, CancellationToken cancellationToken = default);
    Task<bool> IsBannedAsync(Guid userId, CancellationToken cancellationToken = default);
    Task<UserContract?> GetByRefreshTokenAsync(string refreshToken, CancellationToken cancellationToken = default);
    Task UpdateAsync(UserContract user, CancellationToken cancellationToken = default);
    void Add(UserContract user);
    Task RemoveAsync(UserContract user, CancellationToken cancellationToken = default);
    void Update(UserContract user);
}
