{"version":3,"sources":["api/estore/discount/order-discount-api.ts"],"names":["checkStandardApiError","OrderDiscountApi","getOrderDiscounts","response","fetch","console","error","msg","json"],"mappings":"OAASA,0BAA6B,iEAGzBC,iBACFC,0BACH,MAAMC,QAAiBC,MAAM,wCAE7B,aAAWJ,sBAAsBG,GAAU,EAAM,IAAWE,QAAQC,MAAMC,KAI7DJ,EAASK,OAHX,aALNP","file":"order-discount-api.js","sourcesContent":["import { checkStandardApiError } from \"../../../../components-shared/api/base/error-handling.js\";\nimport { IOrderDiscount } from \"./interfaces/order-discount.js\";\n\nexport class OrderDiscountApi{\n public async getOrderDiscounts(){\n const response = await fetch(`/api/estore/discount/order-discounts`);\n\n if (!await checkStandardApiError(response, true, (msg) => { console.error(msg) })){\n return null;\n }\n \n return await response.json() as IOrderDiscount[];\n }\n}"]}