{"version":3,"sources":["webpack:///./node_modules/@abaco/treatment-register-module/src/modules/treatment-register-module/api/UnitsOfMeasureApi.ts"],"names":["UnitOfMeasureApi","http","rootPath","this","measure_family_name","get","params","offset","count","res","data","records"],"mappings":"uMAGqBA,G,+BAKjB,WAAYC,EAAkBC,GAAgB,uBAC1CC,KAAKF,KAAOA,EACZE,KAAKD,SAAWA,E,gHAGb,WAAuBE,GAAvB,uGACeD,KAAKF,KAAKI,IAAV,UAAiBF,KAAKD,SAAtB,qDAA2EE,GAAuB,CAChHE,OAAQ,CACJC,OAAQ,EACRC,MAAO,OAJZ,cACGC,EADH,yBAOIA,EAAIC,KAAKC,SAPb,gD,mJAUA,oHACeR,KAAKF,KAAKI,IAAV,UAAiBF,KAAKD,SAAtB,wDADf,cACGO,EADH,yBAEIA,EAAIC,MAFR,gD,iJAKA,oHACeP,KAAKF,KAAKI,IAAV,UAAiBF,KAAKD,SAAtB,4EAA0G,CACxHI,OAAQ,CACJA,OAAQ,EACRE,MAAO,OAJZ,cACGC,EADH,yBAQIA,EAAIC,KAAKC,SARb,gD,8IAWA,WAAqBP,GAArB,uGACeD,KAAKF,KAAKI,IAAV,UAAiBF,KAAKD,SAAtB,4DAAkFE,GAAuB,CACvHE,OAAQ,CACJC,OAAQ,EACRC,MAAO,OAJZ,cACGC,EADH,yBAQIA,EAAIC,KAAKC,SARb,gD","file":"js/chunk-2d21f2b8.586166bd.js","sourcesContent":["import { HTTPClient } from '@abaco/web-common/src/HTTP';\nimport { UnitConversion, UnitOfMeasure } from '../models/UnitsOfMeasure';\n\nexport default class UnitOfMeasureApi {\n\n private http: HTTPClient;\n private rootPath: string;\n\n constructor(http: HTTPClient, rootPath: string) {\n this.http = http;\n this.rootPath = rootPath\n }\n\n public async getWarehouseUoms(measure_family_name: string): Promise {\n const res = await this.http.get(`${this.rootPath}/v1/warehouse/dictionary/units_of_measure/${measure_family_name}`, {\n params: {\n offset: 0,\n count: 300,\n }\n });\n return res.data.records;\n }\n\n public async getUnitConversions(): Promise {\n const res = await this.http.get(`${this.rootPath}/v1/services/decodes/transcode/STOCK/conversion_map`);\n return res.data;\n }\n\n public async getIrrigationUoms(): Promise {\n const res = await this.http.get(`${this.rootPath}/v1/services/decodes/transcode/IRRIGA/dictionary_units_of_measure/IRRIGA`, {\n params: {\n params: 0,\n count: 300\n }\n })\n\n return res.data.records;\n }\n\n public async getDecodesUoms(measure_family_name: string): Promise {\n const res = await this.http.get(`${this.rootPath}/v1/services/decodes/dictionary_units_of_measure/${measure_family_name}`, {\n params: {\n offset: 0,\n count: 300,\n }\n });\n\n return res.data.records;\n }\n}\n"],"sourceRoot":""}