import { AxiosRequestConfig } from 'axios'; import { BaseApiClient } from './BaseApiClient'; import { authedRequest, publicRequest } from './utils'; export class ApiClient extends BaseApiClient { protected readonly apiBasePath: string; constructor(options: { apiBasePath: string }) { super(); this.apiBasePath = options.apiBasePath; } public authedRequest = ( endpoint: string, token: string, options: AxiosRequestConfig = {}, shouldParseJSON = true, ): Promise => authedRequest( this.apiBasePath, endpoint, token, options, shouldParseJSON, ); public publicRequest = ( endpoint: string, options: AxiosRequestConfig = {}, shouldParseJSON = true, ): Promise => publicRequest(this.apiBasePath, endpoint, options, shouldParseJSON); }