import Config from "../config" ; import Service from "../service" ; import HttpClientException from "../httpClient/httpClientException" ; import ApiException from "./exception/apiException" ; import ClientInterface from "../httpClient/clientInterface" ; import { IRequest } from "../typings/requestOptions" ; abstract class Resource { protected endpoint : string ; private service : Service ; protected constructor ( service , endpoint ) { this . service = service ; this . endpoint = endpoint ; } public request ( json , requestOptions ? ) { const clientInterface = this . service . client . httpClient ; const config = this . service . client . config ; return clientInterface . request ( this . endpoint , json , config , this . service . apiKeyRequired , requestOptions ) ; } } export default Resource ;