namespace OpenWarehouse.auth.api.Common.AuthTokenRepo;

public interface IAuthTokenRepo
{
    public Task<bool> IsTokenLockAsync(string? token);
    public bool IsTokenLock(string? token);
    
    public Task<int> LockTokenAsync(string? token);
    public Task<int> LockAllUserTokenAsync(ApplicationUser user);
    public int LockToken(string token);
    
    public Task<int> AddTokenToRepAsync(string token, string creator, DateTime exp, DateTime? created);
    
    public Task<int> AddTokenToRepAsync(string token, ApplicationUser? creator, DateTime? exp, DateTime? created);

    public Task<int> DeleteAllUserTokenAsync(ApplicationUser user);

    public Task<string?> GetLastUserToken(ApplicationUser? user);

    public Task<int> DeleteInactiveToken();

    public Task<string?> CreateJwtToken(ApplicationUser user, DateTime? expires, List<Claim> claims);

    public Task<string?> RegenerateJwtToken(string? token, DateTime? expires);

    public Task<bool> TokenIsLock(string? token, string? guid);
}