{"version":3,"sources":["api/estore/discount/order-discount-api.ts"],"names":["checkStandardApiError","OrderDiscountApi","getOrderDiscounts","response","await","fetch","console","error","msg","json"],"mappings":"OAASA,qBAAuF,KAA1D,iEAGzBC,iBACFC,0BACH,IAAMC,EAAWC,MAAMC,MAAM,sCAAsC,EAEnE,OAAKD,MAAMJ,sBAAsBG,EAAU,CAAA,EAAM,IAAWG,QAAQC,MAAMC,CAAG,CAAE,CAAC,EAInEL,EAASM,KAAI,EAHf,IAIf,C,QATSR,gB","file":"order-discount-api.js","sourcesContent":["import { checkStandardApiError } from \"../../../../components-shared/api/base/error-handling.js\";\r\nimport { IOrderDiscount } from \"./interfaces/order-discount.js\";\r\n\r\nexport class OrderDiscountApi{\r\n    public async getOrderDiscounts(){\r\n        const response = await fetch(`/api/estore/discount/order-discounts`);\r\n\r\n        if (!await checkStandardApiError(response, true, (msg) => { console.error(msg) })){\r\n            return null;\r\n        }\r\n        \r\n        return await response.json() as IOrderDiscount[];\r\n    }\r\n}"]}