import { AxiosResponse } from 'axios'; import * as deepmerge from 'deepmerge'; import { AbstractFacade, IFacadeConfig, IFacadeInterceptors } from 'platform-common/dist/client'; // full path to work in the browser import { IVendorAudit } from '../interface'; export class VendorAuditFacade extends AbstractFacade { constructor(config?: IFacadeConfig, interceptors: IFacadeInterceptors = {}) { super( deepmerge.all([ { axiosConfig: { baseURL: process.env.GOPARROT_PLATFORM_SERVICE_VENDOR_V2 as string, }, }, config || {}, ]), interceptors, ); } /** * @return {Promise>} * @throws {AxiosError} */ async list(orderNumber: string): Promise> { return this.client.get(`/api/v2/audits/${orderNumber}`); } }