{"version":3,"sources":["webpack:///./node_modules/@abaco/assets-module/src/modules/assets-module/api/TraceabilityApi.ts"],"names":["TraceabilityApi","http","rootPath","this","cancelTokenSource","get","res","data","version","lotId"],"mappings":"uMASqBA,G,+BAMjB,WAAYC,EAAkBC,GAAgB,uBAC1CC,KAAKF,KAAOA,EACZE,KAAKD,SAAWA,EAChBC,KAAKC,kBAAoB,K,sHAItB,oHACeD,KAAKF,KAAKI,IAAV,UAAiBF,KAAKD,SAAtB,8BADf,cACGI,EADH,yBAEIA,EAAIC,KAAKC,SAFb,gD,oJAKA,WAA2BC,GAA3B,uGACeN,KAAKF,KAAKI,IAAV,UAAiBF,KAAKD,SAAtB,2CAAiEO,EAAjE,+BADf,cACGH,EADH,yBAEIA,EAAIC,MAFR,gD,kJAKA,WAAwBE,GAAxB,uGACeN,KAAKF,KAAKI,IAAV,UAAiBF,KAAKD,SAAtB,2CAAiEO,EAAjE,2BADf,cACGH,EADH,yBAEIA,EAAIC,MAFR,gD","file":"js/chunk-2d207b80.11bfd6f7.js","sourcesContent":["import { HTTPClient, propsToDate, propsToDatePaged } from '@abaco/web-common/src/HTTP';\nimport { PagedResults, PagingParams } from '@abaco/web-common/src/Paging';\nimport { DateHelper } from '@abaco/web-components/src/components/DateUtils';\nimport axios, { CancelTokenSource } from \"axios\";\nimport { Warehouse, WarehouseOut, WarehouseType, StockedItem, StockedItemOut, StockedItemLoadOut, WarehouseUpdateOut } from '../models/Warehouse';\nimport { UnitOfMeasure, UnitOfMeaseureFamily } from '../models/UnitsOfMeasure';\nimport { parseDeclaredArea } from './utils';\nimport { Traceability } from '../models/Traceability';\n\nexport default class TraceabilityApi {\n\n private http: HTTPClient;\n private rootPath: string;\n private cancelTokenSource: CancelTokenSource | null;\n\n constructor(http: HTTPClient, rootPath: string) {\n this.http = http;\n this.rootPath = rootPath;\n this.cancelTokenSource = null;\n }\n\n\n public async getTraceabilitySetting(): Promise {\n const res = await this.http.get(`${this.rootPath}/v1/traceability/settings`);\n return res.data.version;\n }\n\n public async downloadTraceability(lotId: string): Promise {\n const res = await this.http.get(`${this.rootPath}/v1/traceability/production_lot/${lotId}/xml?traceability_tree=all`);\n return res.data;\n }\n\n public async getTraceabilities(lotId: string): Promise {\n const res = await this.http.get(`${this.rootPath}/v1/traceability/production_lot/${lotId}?traceability_tree=all`);\n return res.data;\n }\n\n}\n"],"sourceRoot":""}