using OnlineSalesAutoCrop.CoreAPI.Models.Requests.Integrations;
using OnlineSalesAutoCrop.CoreAPI.Models.Responses.Integrations;
using System.Threading.Tasks;

namespace OnlineSalesAutoCrop.CoreAPI.Services.Contracts.Auth;

public interface IRefreshTokenService
{
    Task<RefreshTokenResponse?> GetByTokenHashAsync(string tokenHash);
    Task<bool> AddAsync(InsertRefreshTokenRequest refreshToken);
    Task<bool> RevokeAsync(RevokedRefreshTokenRequest token);
    Task<bool> RevokeAllForUserAsync(int userId);
    Task<GenerateRefreshTokenResponse> GenerateRefreshToken(GenerateRefreshTokenRequest request);
}
