package com.banesco.common.application.usecase;

import com.banesco.common.domain.model.*;

import java.util.List;

public interface HttpClientUseCase {

    <T> T execute(HttpRequest request);

    <T, R> Either<T, R> executeEither(HttpRequest request);

    <T, R> Either<List<T>, R> executeEitherList(HttpRequest request);

    <T> ApiResponse<T> executeApiResponse(HttpRequest request);

    <T> ApiResponse<List<T>> executeApiResponseList(HttpRequest request);

    <T> ApiPrivateResponse<Either<T, ApiPrivateError>> executeApiPrivateResponse(HttpRequest request);

    <T> ApiPrivateResponse<Either<List<T>, ApiPrivateError>> executeApiPrivateResponseList(HttpRequest request);
}