import { ConfigureAPI } from "../baseWellsClient"; import { rethrowAsHttpError } from "../errorHandlingUtils"; import { WellSourceItems, WellSourcesFilterRequest } from "src"; export class WellSourcesAPI extends ConfigureAPI { public list = async ( filter: WellSourcesFilterRequest ): Promise => { const path = this.getPath("/wellsources/list"); return await this.client .asyncPost(path, { data: filter }) .then((response) => response.data) .catch((err) => { throw rethrowAsHttpError(err); }); }; }