ce-storefront 0.13.2 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (330) hide show
  1. package/README.md +35 -28
  2. package/docs/sdks/catalog/README.md +7 -5
  3. package/esm/funcs/authGenerateOtp.d.ts +3 -2
  4. package/esm/funcs/authGenerateOtp.d.ts.map +1 -1
  5. package/esm/funcs/authGenerateOtp.js +1 -1
  6. package/esm/funcs/authGenerateOtp.js.map +1 -1
  7. package/esm/funcs/authGetAnonymousToken.d.ts +3 -2
  8. package/esm/funcs/authGetAnonymousToken.d.ts.map +1 -1
  9. package/esm/funcs/authGetAnonymousToken.js +1 -1
  10. package/esm/funcs/authGetAnonymousToken.js.map +1 -1
  11. package/esm/funcs/authGetUserDetail.d.ts +3 -2
  12. package/esm/funcs/authGetUserDetail.d.ts.map +1 -1
  13. package/esm/funcs/authGetUserDetail.js +1 -1
  14. package/esm/funcs/authGetUserDetail.js.map +1 -1
  15. package/esm/funcs/authLoginWithEmail.d.ts +3 -2
  16. package/esm/funcs/authLoginWithEmail.d.ts.map +1 -1
  17. package/esm/funcs/authLoginWithEmail.js +1 -1
  18. package/esm/funcs/authLoginWithEmail.js.map +1 -1
  19. package/esm/funcs/authLoginWithPhone.d.ts +3 -2
  20. package/esm/funcs/authLoginWithPhone.d.ts.map +1 -1
  21. package/esm/funcs/authLoginWithPhone.js +1 -1
  22. package/esm/funcs/authLoginWithPhone.js.map +1 -1
  23. package/esm/funcs/authLoginWithWhatsapp.d.ts +3 -2
  24. package/esm/funcs/authLoginWithWhatsapp.d.ts.map +1 -1
  25. package/esm/funcs/authLoginWithWhatsapp.js +1 -1
  26. package/esm/funcs/authLoginWithWhatsapp.js.map +1 -1
  27. package/esm/funcs/authLogout.d.ts +3 -2
  28. package/esm/funcs/authLogout.d.ts.map +1 -1
  29. package/esm/funcs/authLogout.js +1 -1
  30. package/esm/funcs/authLogout.js.map +1 -1
  31. package/esm/funcs/authRefreshToken.d.ts +3 -2
  32. package/esm/funcs/authRefreshToken.d.ts.map +1 -1
  33. package/esm/funcs/authRefreshToken.js +1 -1
  34. package/esm/funcs/authRefreshToken.js.map +1 -1
  35. package/esm/funcs/authUpdateUser.d.ts +3 -2
  36. package/esm/funcs/authUpdateUser.d.ts.map +1 -1
  37. package/esm/funcs/authUpdateUser.js +1 -1
  38. package/esm/funcs/authUpdateUser.js.map +1 -1
  39. package/esm/funcs/authVerifyOtp.d.ts +3 -2
  40. package/esm/funcs/authVerifyOtp.d.ts.map +1 -1
  41. package/esm/funcs/authVerifyOtp.js +1 -1
  42. package/esm/funcs/authVerifyOtp.js.map +1 -1
  43. package/esm/funcs/cartsAddShippingMethod.d.ts +3 -2
  44. package/esm/funcs/cartsAddShippingMethod.d.ts.map +1 -1
  45. package/esm/funcs/cartsAddShippingMethod.js +1 -1
  46. package/esm/funcs/cartsAddShippingMethod.js.map +1 -1
  47. package/esm/funcs/cartsApplyCoupon.d.ts +3 -2
  48. package/esm/funcs/cartsApplyCoupon.d.ts.map +1 -1
  49. package/esm/funcs/cartsApplyCoupon.js +1 -1
  50. package/esm/funcs/cartsApplyCoupon.js.map +1 -1
  51. package/esm/funcs/cartsCreateCart.d.ts +3 -2
  52. package/esm/funcs/cartsCreateCart.d.ts.map +1 -1
  53. package/esm/funcs/cartsCreateCart.js +1 -1
  54. package/esm/funcs/cartsCreateCart.js.map +1 -1
  55. package/esm/funcs/cartsCreateCartAddress.d.ts +3 -2
  56. package/esm/funcs/cartsCreateCartAddress.d.ts.map +1 -1
  57. package/esm/funcs/cartsCreateCartAddress.js +1 -1
  58. package/esm/funcs/cartsCreateCartAddress.js.map +1 -1
  59. package/esm/funcs/cartsDeleteCart.d.ts +3 -2
  60. package/esm/funcs/cartsDeleteCart.d.ts.map +1 -1
  61. package/esm/funcs/cartsDeleteCart.js +1 -1
  62. package/esm/funcs/cartsDeleteCart.js.map +1 -1
  63. package/esm/funcs/cartsGetCart.d.ts +3 -2
  64. package/esm/funcs/cartsGetCart.d.ts.map +1 -1
  65. package/esm/funcs/cartsGetCart.js +1 -1
  66. package/esm/funcs/cartsGetCart.js.map +1 -1
  67. package/esm/funcs/cartsGetUserCart.d.ts +3 -2
  68. package/esm/funcs/cartsGetUserCart.d.ts.map +1 -1
  69. package/esm/funcs/cartsGetUserCart.js +1 -1
  70. package/esm/funcs/cartsGetUserCart.js.map +1 -1
  71. package/esm/funcs/cartsRedeemLoyaltyPoints.d.ts +3 -2
  72. package/esm/funcs/cartsRedeemLoyaltyPoints.d.ts.map +1 -1
  73. package/esm/funcs/cartsRedeemLoyaltyPoints.js +1 -1
  74. package/esm/funcs/cartsRedeemLoyaltyPoints.js.map +1 -1
  75. package/esm/funcs/cartsRemoveCoupon.d.ts +3 -2
  76. package/esm/funcs/cartsRemoveCoupon.d.ts.map +1 -1
  77. package/esm/funcs/cartsRemoveCoupon.js +1 -1
  78. package/esm/funcs/cartsRemoveCoupon.js.map +1 -1
  79. package/esm/funcs/cartsRemoveLoyaltyPoints.d.ts +3 -2
  80. package/esm/funcs/cartsRemoveLoyaltyPoints.d.ts.map +1 -1
  81. package/esm/funcs/cartsRemoveLoyaltyPoints.js +1 -1
  82. package/esm/funcs/cartsRemoveLoyaltyPoints.js.map +1 -1
  83. package/esm/funcs/cartsRemoveUserCart.d.ts +3 -2
  84. package/esm/funcs/cartsRemoveUserCart.d.ts.map +1 -1
  85. package/esm/funcs/cartsRemoveUserCart.js +1 -1
  86. package/esm/funcs/cartsRemoveUserCart.js.map +1 -1
  87. package/esm/funcs/cartsUpdateCart.d.ts +3 -2
  88. package/esm/funcs/cartsUpdateCart.d.ts.map +1 -1
  89. package/esm/funcs/cartsUpdateCart.js +1 -1
  90. package/esm/funcs/cartsUpdateCart.js.map +1 -1
  91. package/esm/funcs/catalogGetProductDetail.d.ts +4 -3
  92. package/esm/funcs/catalogGetProductDetail.d.ts.map +1 -1
  93. package/esm/funcs/catalogGetProductDetail.js +4 -7
  94. package/esm/funcs/catalogGetProductDetail.js.map +1 -1
  95. package/esm/funcs/catalogGetVariantDetail.d.ts +3 -2
  96. package/esm/funcs/catalogGetVariantDetail.d.ts.map +1 -1
  97. package/esm/funcs/catalogGetVariantDetail.js +1 -1
  98. package/esm/funcs/catalogGetVariantDetail.js.map +1 -1
  99. package/esm/funcs/catalogListCategories.d.ts +3 -2
  100. package/esm/funcs/catalogListCategories.d.ts.map +1 -1
  101. package/esm/funcs/catalogListCategories.js +2 -1
  102. package/esm/funcs/catalogListCategories.js.map +1 -1
  103. package/esm/funcs/catalogListCrosssellProducts.d.ts +3 -2
  104. package/esm/funcs/catalogListCrosssellProducts.d.ts.map +1 -1
  105. package/esm/funcs/catalogListCrosssellProducts.js +1 -1
  106. package/esm/funcs/catalogListCrosssellProducts.js.map +1 -1
  107. package/esm/funcs/catalogListProductReviews.d.ts +3 -2
  108. package/esm/funcs/catalogListProductReviews.d.ts.map +1 -1
  109. package/esm/funcs/catalogListProductReviews.js +1 -1
  110. package/esm/funcs/catalogListProductReviews.js.map +1 -1
  111. package/esm/funcs/catalogListProductVariants.d.ts +3 -2
  112. package/esm/funcs/catalogListProductVariants.d.ts.map +1 -1
  113. package/esm/funcs/catalogListProductVariants.js +1 -1
  114. package/esm/funcs/catalogListProductVariants.js.map +1 -1
  115. package/esm/funcs/catalogListProducts.d.ts +3 -2
  116. package/esm/funcs/catalogListProducts.d.ts.map +1 -1
  117. package/esm/funcs/catalogListProducts.js +2 -1
  118. package/esm/funcs/catalogListProducts.js.map +1 -1
  119. package/esm/funcs/catalogListSimilarProducts.d.ts +3 -2
  120. package/esm/funcs/catalogListSimilarProducts.d.ts.map +1 -1
  121. package/esm/funcs/catalogListSimilarProducts.js +1 -1
  122. package/esm/funcs/catalogListSimilarProducts.js.map +1 -1
  123. package/esm/funcs/catalogListSkus.d.ts +3 -2
  124. package/esm/funcs/catalogListSkus.d.ts.map +1 -1
  125. package/esm/funcs/catalogListSkus.js +1 -1
  126. package/esm/funcs/catalogListSkus.js.map +1 -1
  127. package/esm/funcs/catalogListUpsellProducts.d.ts +3 -2
  128. package/esm/funcs/catalogListUpsellProducts.d.ts.map +1 -1
  129. package/esm/funcs/catalogListUpsellProducts.js +1 -1
  130. package/esm/funcs/catalogListUpsellProducts.js.map +1 -1
  131. package/esm/funcs/catalogSearchProducts.d.ts +3 -2
  132. package/esm/funcs/catalogSearchProducts.d.ts.map +1 -1
  133. package/esm/funcs/catalogSearchProducts.js +1 -1
  134. package/esm/funcs/catalogSearchProducts.js.map +1 -1
  135. package/esm/funcs/commonListCountryPincodes.d.ts +3 -2
  136. package/esm/funcs/commonListCountryPincodes.d.ts.map +1 -1
  137. package/esm/funcs/commonListCountryPincodes.js +1 -1
  138. package/esm/funcs/commonListCountryPincodes.js.map +1 -1
  139. package/esm/funcs/customersCreateAddress.d.ts +3 -2
  140. package/esm/funcs/customersCreateAddress.d.ts.map +1 -1
  141. package/esm/funcs/customersCreateAddress.js +1 -1
  142. package/esm/funcs/customersCreateAddress.js.map +1 -1
  143. package/esm/funcs/customersDeleteAddress.d.ts +3 -2
  144. package/esm/funcs/customersDeleteAddress.d.ts.map +1 -1
  145. package/esm/funcs/customersDeleteAddress.js +1 -1
  146. package/esm/funcs/customersDeleteAddress.js.map +1 -1
  147. package/esm/funcs/customersGetAddressDetail.d.ts +3 -2
  148. package/esm/funcs/customersGetAddressDetail.d.ts.map +1 -1
  149. package/esm/funcs/customersGetAddressDetail.js +1 -1
  150. package/esm/funcs/customersGetAddressDetail.js.map +1 -1
  151. package/esm/funcs/customersGetLoyaltyDetails.d.ts +3 -2
  152. package/esm/funcs/customersGetLoyaltyDetails.d.ts.map +1 -1
  153. package/esm/funcs/customersGetLoyaltyDetails.js +1 -1
  154. package/esm/funcs/customersGetLoyaltyDetails.js.map +1 -1
  155. package/esm/funcs/customersListAddresses.d.ts +3 -2
  156. package/esm/funcs/customersListAddresses.d.ts.map +1 -1
  157. package/esm/funcs/customersListAddresses.js +1 -1
  158. package/esm/funcs/customersListAddresses.js.map +1 -1
  159. package/esm/funcs/customersListUserReviews.d.ts +3 -2
  160. package/esm/funcs/customersListUserReviews.d.ts.map +1 -1
  161. package/esm/funcs/customersListUserReviews.js +1 -1
  162. package/esm/funcs/customersListUserReviews.js.map +1 -1
  163. package/esm/funcs/customersUpdateAddressDetail.d.ts +3 -2
  164. package/esm/funcs/customersUpdateAddressDetail.d.ts.map +1 -1
  165. package/esm/funcs/customersUpdateAddressDetail.js +1 -1
  166. package/esm/funcs/customersUpdateAddressDetail.js.map +1 -1
  167. package/esm/funcs/ordersCancelOrder.d.ts +3 -2
  168. package/esm/funcs/ordersCancelOrder.d.ts.map +1 -1
  169. package/esm/funcs/ordersCancelOrder.js +1 -1
  170. package/esm/funcs/ordersCancelOrder.js.map +1 -1
  171. package/esm/funcs/ordersCreateOrder.d.ts +3 -2
  172. package/esm/funcs/ordersCreateOrder.d.ts.map +1 -1
  173. package/esm/funcs/ordersCreateOrder.js +1 -1
  174. package/esm/funcs/ordersCreateOrder.js.map +1 -1
  175. package/esm/funcs/ordersGetOrderDetail.d.ts +3 -2
  176. package/esm/funcs/ordersGetOrderDetail.d.ts.map +1 -1
  177. package/esm/funcs/ordersGetOrderDetail.js +1 -1
  178. package/esm/funcs/ordersGetOrderDetail.js.map +1 -1
  179. package/esm/funcs/ordersGetPaymentStatus.d.ts +3 -2
  180. package/esm/funcs/ordersGetPaymentStatus.d.ts.map +1 -1
  181. package/esm/funcs/ordersGetPaymentStatus.js +1 -1
  182. package/esm/funcs/ordersGetPaymentStatus.js.map +1 -1
  183. package/esm/funcs/ordersListOrderShipments.d.ts +3 -2
  184. package/esm/funcs/ordersListOrderShipments.d.ts.map +1 -1
  185. package/esm/funcs/ordersListOrderShipments.js +1 -1
  186. package/esm/funcs/ordersListOrderShipments.js.map +1 -1
  187. package/esm/funcs/ordersListOrders.d.ts +3 -2
  188. package/esm/funcs/ordersListOrders.d.ts.map +1 -1
  189. package/esm/funcs/ordersListOrders.js +1 -1
  190. package/esm/funcs/ordersListOrders.js.map +1 -1
  191. package/esm/funcs/ordersRetryOrderPayment.d.ts +3 -2
  192. package/esm/funcs/ordersRetryOrderPayment.d.ts.map +1 -1
  193. package/esm/funcs/ordersRetryOrderPayment.js +1 -1
  194. package/esm/funcs/ordersRetryOrderPayment.js.map +1 -1
  195. package/esm/funcs/shippingShippingMethods.d.ts +3 -2
  196. package/esm/funcs/shippingShippingMethods.d.ts.map +1 -1
  197. package/esm/funcs/shippingShippingMethods.js +1 -1
  198. package/esm/funcs/shippingShippingMethods.js.map +1 -1
  199. package/esm/lib/config.d.ts +3 -3
  200. package/esm/lib/config.js +3 -3
  201. package/esm/lib/matchers.d.ts +3 -10
  202. package/esm/lib/matchers.d.ts.map +1 -1
  203. package/esm/lib/matchers.js +33 -30
  204. package/esm/lib/matchers.js.map +1 -1
  205. package/esm/models/components/product.d.ts +3 -0
  206. package/esm/models/components/product.d.ts.map +1 -1
  207. package/esm/models/components/product.js +3 -0
  208. package/esm/models/components/product.js.map +1 -1
  209. package/esm/models/components/productdetail.d.ts +3 -0
  210. package/esm/models/components/productdetail.d.ts.map +1 -1
  211. package/esm/models/components/productdetail.js +3 -0
  212. package/esm/models/components/productdetail.js.map +1 -1
  213. package/esm/models/components/productreview.d.ts +1 -10
  214. package/esm/models/components/productreview.d.ts.map +1 -1
  215. package/esm/models/components/productreview.js +2 -5
  216. package/esm/models/components/productreview.js.map +1 -1
  217. package/esm/models/errors/badrequest.d.ts +7 -2
  218. package/esm/models/errors/badrequest.d.ts.map +1 -1
  219. package/esm/models/errors/badrequest.js +12 -4
  220. package/esm/models/errors/badrequest.js.map +1 -1
  221. package/esm/models/errors/ceerror.d.ts +8 -18
  222. package/esm/models/errors/ceerror.d.ts.map +1 -1
  223. package/esm/models/errors/ceerror.js +17 -10
  224. package/esm/models/errors/ceerror.js.map +1 -1
  225. package/esm/models/errors/cestorefronterror.d.ts +19 -0
  226. package/esm/models/errors/cestorefronterror.d.ts.map +1 -0
  227. package/esm/models/errors/cestorefronterror.js +16 -0
  228. package/esm/models/errors/cestorefronterror.js.map +1 -0
  229. package/esm/models/errors/index.d.ts +1 -0
  230. package/esm/models/errors/index.d.ts.map +1 -1
  231. package/esm/models/errors/index.js +1 -0
  232. package/esm/models/errors/index.js.map +1 -1
  233. package/esm/models/errors/notfound.d.ts +7 -2
  234. package/esm/models/errors/notfound.d.ts.map +1 -1
  235. package/esm/models/errors/notfound.js +12 -4
  236. package/esm/models/errors/notfound.js.map +1 -1
  237. package/esm/models/errors/responsevalidationerror.d.ts +26 -0
  238. package/esm/models/errors/responsevalidationerror.d.ts.map +1 -0
  239. package/esm/models/errors/responsevalidationerror.js +29 -0
  240. package/esm/models/errors/responsevalidationerror.js.map +1 -0
  241. package/esm/models/errors/sdkvalidationerror.d.ts +1 -0
  242. package/esm/models/errors/sdkvalidationerror.d.ts.map +1 -1
  243. package/esm/models/errors/sdkvalidationerror.js +14 -0
  244. package/esm/models/errors/sdkvalidationerror.js.map +1 -1
  245. package/esm/models/errors/unauthorized.d.ts +7 -2
  246. package/esm/models/errors/unauthorized.d.ts.map +1 -1
  247. package/esm/models/errors/unauthorized.js +12 -4
  248. package/esm/models/errors/unauthorized.js.map +1 -1
  249. package/esm/models/operations/getproductdetail.d.ts +3 -3
  250. package/esm/models/operations/getproductdetail.d.ts.map +1 -1
  251. package/esm/models/operations/getproductdetail.js +4 -4
  252. package/esm/models/operations/getproductdetail.js.map +1 -1
  253. package/esm/models/operations/listcategories.d.ts +6 -1
  254. package/esm/models/operations/listcategories.d.ts.map +1 -1
  255. package/esm/models/operations/listcategories.js +4 -0
  256. package/esm/models/operations/listcategories.js.map +1 -1
  257. package/esm/models/operations/listproducts.d.ts +6 -1
  258. package/esm/models/operations/listproducts.d.ts.map +1 -1
  259. package/esm/models/operations/listproducts.js +4 -0
  260. package/esm/models/operations/listproducts.js.map +1 -1
  261. package/esm/sdk/catalog.d.ts +1 -1
  262. package/esm/sdk/catalog.js +1 -1
  263. package/jsr.json +1 -1
  264. package/package.json +1 -1
  265. package/src/funcs/authGenerateOtp.ts +21 -17
  266. package/src/funcs/authGetAnonymousToken.ts +21 -17
  267. package/src/funcs/authGetUserDetail.ts +21 -17
  268. package/src/funcs/authLoginWithEmail.ts +21 -17
  269. package/src/funcs/authLoginWithPhone.ts +21 -17
  270. package/src/funcs/authLoginWithWhatsapp.ts +21 -17
  271. package/src/funcs/authLogout.ts +21 -17
  272. package/src/funcs/authRefreshToken.ts +21 -17
  273. package/src/funcs/authUpdateUser.ts +21 -17
  274. package/src/funcs/authVerifyOtp.ts +21 -17
  275. package/src/funcs/cartsAddShippingMethod.ts +21 -17
  276. package/src/funcs/cartsApplyCoupon.ts +21 -17
  277. package/src/funcs/cartsCreateCart.ts +21 -17
  278. package/src/funcs/cartsCreateCartAddress.ts +21 -17
  279. package/src/funcs/cartsDeleteCart.ts +21 -17
  280. package/src/funcs/cartsGetCart.ts +21 -17
  281. package/src/funcs/cartsGetUserCart.ts +21 -17
  282. package/src/funcs/cartsRedeemLoyaltyPoints.ts +21 -17
  283. package/src/funcs/cartsRemoveCoupon.ts +21 -17
  284. package/src/funcs/cartsRemoveLoyaltyPoints.ts +21 -17
  285. package/src/funcs/cartsRemoveUserCart.ts +21 -17
  286. package/src/funcs/cartsUpdateCart.ts +21 -17
  287. package/src/funcs/catalogGetProductDetail.ts +28 -23
  288. package/src/funcs/catalogGetVariantDetail.ts +21 -17
  289. package/src/funcs/catalogListCategories.ts +22 -17
  290. package/src/funcs/catalogListCrosssellProducts.ts +21 -17
  291. package/src/funcs/catalogListProductReviews.ts +21 -17
  292. package/src/funcs/catalogListProductVariants.ts +21 -17
  293. package/src/funcs/catalogListProducts.ts +22 -17
  294. package/src/funcs/catalogListSimilarProducts.ts +21 -17
  295. package/src/funcs/catalogListSkus.ts +21 -17
  296. package/src/funcs/catalogListUpsellProducts.ts +21 -17
  297. package/src/funcs/catalogSearchProducts.ts +21 -17
  298. package/src/funcs/commonListCountryPincodes.ts +21 -17
  299. package/src/funcs/customersCreateAddress.ts +21 -17
  300. package/src/funcs/customersDeleteAddress.ts +21 -17
  301. package/src/funcs/customersGetAddressDetail.ts +21 -17
  302. package/src/funcs/customersGetLoyaltyDetails.ts +21 -17
  303. package/src/funcs/customersListAddresses.ts +21 -17
  304. package/src/funcs/customersListUserReviews.ts +21 -17
  305. package/src/funcs/customersUpdateAddressDetail.ts +21 -17
  306. package/src/funcs/ordersCancelOrder.ts +21 -17
  307. package/src/funcs/ordersCreateOrder.ts +21 -17
  308. package/src/funcs/ordersGetOrderDetail.ts +21 -17
  309. package/src/funcs/ordersGetPaymentStatus.ts +21 -17
  310. package/src/funcs/ordersListOrderShipments.ts +21 -17
  311. package/src/funcs/ordersListOrders.ts +21 -17
  312. package/src/funcs/ordersRetryOrderPayment.ts +21 -17
  313. package/src/funcs/shippingShippingMethods.ts +21 -17
  314. package/src/lib/config.ts +3 -3
  315. package/src/lib/matchers.ts +44 -41
  316. package/src/models/components/product.ts +10 -0
  317. package/src/models/components/productdetail.ts +10 -0
  318. package/src/models/components/productreview.ts +3 -6
  319. package/src/models/errors/badrequest.ts +15 -5
  320. package/src/models/errors/ceerror.ts +23 -31
  321. package/src/models/errors/cestorefronterror.ts +35 -0
  322. package/src/models/errors/index.ts +1 -0
  323. package/src/models/errors/notfound.ts +15 -5
  324. package/src/models/errors/responsevalidationerror.ts +50 -0
  325. package/src/models/errors/sdkvalidationerror.ts +12 -0
  326. package/src/models/errors/unauthorized.ts +15 -5
  327. package/src/models/operations/getproductdetail.ts +7 -7
  328. package/src/models/operations/listcategories.ts +10 -1
  329. package/src/models/operations/listproducts.ts +10 -1
  330. package/src/sdk/catalog.ts +1 -1
@@ -10,7 +10,7 @@ import { safeParse } from "../lib/schemas.js";
10
10
  import { RequestOptions } from "../lib/sdks.js";
11
11
  import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
12
12
  import { pathToFunc } from "../lib/url.js";
13
- import { CeError } from "../models/errors/ceerror.js";
13
+ import { CeStorefrontError } from "../models/errors/cestorefronterror.js";
14
14
  import {
15
15
  ConnectionError,
16
16
  InvalidRequestError,
@@ -19,6 +19,7 @@ import {
19
19
  UnexpectedClientError,
20
20
  } from "../models/errors/httpclienterrors.js";
21
21
  import * as errors from "../models/errors/index.js";
22
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
22
23
  import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
23
24
  import * as operations from "../models/operations/index.js";
24
25
  import { APICall, APIPromise } from "../types/async.js";
@@ -40,13 +41,14 @@ export function ordersRetryOrderPayment(
40
41
  | errors.BadRequest
41
42
  | errors.Unauthorized
42
43
  | errors.NotFound
43
- | CeError
44
- | SDKValidationError
45
- | UnexpectedClientError
46
- | InvalidRequestError
44
+ | CeStorefrontError
45
+ | ResponseValidationError
46
+ | ConnectionError
47
47
  | RequestAbortedError
48
48
  | RequestTimeoutError
49
- | ConnectionError
49
+ | InvalidRequestError
50
+ | UnexpectedClientError
51
+ | SDKValidationError
50
52
  >
51
53
  > {
52
54
  return new APIPromise($do(
@@ -67,13 +69,14 @@ async function $do(
67
69
  | errors.BadRequest
68
70
  | errors.Unauthorized
69
71
  | errors.NotFound
70
- | CeError
71
- | SDKValidationError
72
- | UnexpectedClientError
73
- | InvalidRequestError
72
+ | CeStorefrontError
73
+ | ResponseValidationError
74
+ | ConnectionError
74
75
  | RequestAbortedError
75
76
  | RequestTimeoutError
76
- | ConnectionError
77
+ | InvalidRequestError
78
+ | UnexpectedClientError
79
+ | SDKValidationError
77
80
  >,
78
81
  APICall,
79
82
  ]
@@ -157,13 +160,14 @@ async function $do(
157
160
  | errors.BadRequest
158
161
  | errors.Unauthorized
159
162
  | errors.NotFound
160
- | CeError
161
- | SDKValidationError
162
- | UnexpectedClientError
163
- | InvalidRequestError
163
+ | CeStorefrontError
164
+ | ResponseValidationError
165
+ | ConnectionError
164
166
  | RequestAbortedError
165
167
  | RequestTimeoutError
166
- | ConnectionError
168
+ | InvalidRequestError
169
+ | UnexpectedClientError
170
+ | SDKValidationError
167
171
  >(
168
172
  M.json(200, operations.RetryOrderPaymentResponseBody$inboundSchema),
169
173
  M.jsonErr(400, errors.BadRequest$inboundSchema),
@@ -171,7 +175,7 @@ async function $do(
171
175
  M.jsonErr(404, errors.NotFound$inboundSchema),
172
176
  M.fail("4XX"),
173
177
  M.fail("5XX"),
174
- )(response, { extraFields: responseFields });
178
+ )(response, req, { extraFields: responseFields });
175
179
  if (!result.ok) {
176
180
  return [result, { status: "complete", request: req, response }];
177
181
  }
@@ -11,7 +11,7 @@ import { RequestOptions } from "../lib/sdks.js";
11
11
  import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
12
12
  import { pathToFunc } from "../lib/url.js";
13
13
  import * as components from "../models/components/index.js";
14
- import { CeError } from "../models/errors/ceerror.js";
14
+ import { CeStorefrontError } from "../models/errors/cestorefronterror.js";
15
15
  import {
16
16
  ConnectionError,
17
17
  InvalidRequestError,
@@ -20,6 +20,7 @@ import {
20
20
  UnexpectedClientError,
21
21
  } from "../models/errors/httpclienterrors.js";
22
22
  import * as errors from "../models/errors/index.js";
23
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
23
24
  import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
24
25
  import * as operations from "../models/operations/index.js";
25
26
  import { APICall, APIPromise } from "../types/async.js";
@@ -41,13 +42,14 @@ export function shippingShippingMethods(
41
42
  | errors.BadRequest
42
43
  | errors.Unauthorized
43
44
  | errors.NotFound
44
- | CeError
45
- | SDKValidationError
46
- | UnexpectedClientError
47
- | InvalidRequestError
45
+ | CeStorefrontError
46
+ | ResponseValidationError
47
+ | ConnectionError
48
48
  | RequestAbortedError
49
49
  | RequestTimeoutError
50
- | ConnectionError
50
+ | InvalidRequestError
51
+ | UnexpectedClientError
52
+ | SDKValidationError
51
53
  >
52
54
  > {
53
55
  return new APIPromise($do(
@@ -68,13 +70,14 @@ async function $do(
68
70
  | errors.BadRequest
69
71
  | errors.Unauthorized
70
72
  | errors.NotFound
71
- | CeError
72
- | SDKValidationError
73
- | UnexpectedClientError
74
- | InvalidRequestError
73
+ | CeStorefrontError
74
+ | ResponseValidationError
75
+ | ConnectionError
75
76
  | RequestAbortedError
76
77
  | RequestTimeoutError
77
- | ConnectionError
78
+ | InvalidRequestError
79
+ | UnexpectedClientError
80
+ | SDKValidationError
78
81
  >,
79
82
  APICall,
80
83
  ]
@@ -152,13 +155,14 @@ async function $do(
152
155
  | errors.BadRequest
153
156
  | errors.Unauthorized
154
157
  | errors.NotFound
155
- | CeError
156
- | SDKValidationError
157
- | UnexpectedClientError
158
- | InvalidRequestError
158
+ | CeStorefrontError
159
+ | ResponseValidationError
160
+ | ConnectionError
159
161
  | RequestAbortedError
160
162
  | RequestTimeoutError
161
- | ConnectionError
163
+ | InvalidRequestError
164
+ | UnexpectedClientError
165
+ | SDKValidationError
162
166
  >(
163
167
  M.json(200, operations.GetShippingMethodsResponseBody$inboundSchema),
164
168
  M.jsonErr(400, errors.BadRequest$inboundSchema),
@@ -166,7 +170,7 @@ async function $do(
166
170
  M.jsonErr(404, errors.NotFound$inboundSchema),
167
171
  M.fail("4XX"),
168
172
  M.fail("5XX"),
169
- )(response, { extraFields: responseFields });
173
+ )(response, req, { extraFields: responseFields });
170
174
  if (!result.ok) {
171
175
  return [result, { status: "complete", request: req, response }];
172
176
  }
package/src/lib/config.ts CHANGED
@@ -80,7 +80,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
80
80
  export const SDK_METADATA = {
81
81
  language: "typescript",
82
82
  openapiDocVersion: "1.0",
83
- sdkVersion: "0.13.2",
84
- genVersion: "2.620.2",
85
- userAgent: "speakeasy-sdk/typescript 0.13.2 2.620.2 1.0 ce-storefront",
83
+ sdkVersion: "0.14.0",
84
+ genVersion: "2.623.0",
85
+ userAgent: "speakeasy-sdk/typescript 0.14.0 2.623.0 1.0 ce-storefront",
86
86
  } as const;
@@ -3,11 +3,10 @@
3
3
  */
4
4
 
5
5
  import { CeError } from "../models/errors/ceerror.js";
6
- import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
7
- import { Result } from "../types/fp.js";
6
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
7
+ import { ERR, OK, Result } from "../types/fp.js";
8
8
  import { matchResponse, matchStatusCode, StatusCodePredicate } from "./http.js";
9
9
  import { isPlainObject } from "./is-plain-object.js";
10
- import { safeParse } from "./schemas.js";
11
10
 
12
11
  export type Encoding =
13
12
  | "jsonl"
@@ -176,17 +175,19 @@ export type MatchedError<Matchers> = Matchers extends Matcher<any, infer E>[]
176
175
  : never;
177
176
  export type MatchFunc<T, E> = (
178
177
  response: Response,
178
+ request: Request,
179
179
  options?: { resultKey?: string; extraFields?: Record<string, unknown> },
180
180
  ) => Promise<[result: Result<T, E>, raw: unknown]>;
181
181
 
182
182
  export function match<T, E>(
183
183
  ...matchers: Array<Matcher<T, E>>
184
- ): MatchFunc<T, E | CeError | SDKValidationError> {
184
+ ): MatchFunc<T, E | CeError | ResponseValidationError> {
185
185
  return async function matchFunc(
186
186
  response: Response,
187
+ request: Request,
187
188
  options?: { resultKey?: string; extraFields?: Record<string, unknown> },
188
189
  ): Promise<
189
- [result: Result<T, E | CeError | SDKValidationError>, raw: unknown]
190
+ [result: Result<T, E | CeError | ResponseValidationError>, raw: unknown]
190
191
  > {
191
192
  let raw: unknown;
192
193
  let matcher: Matcher<T, E> | undefined;
@@ -205,21 +206,22 @@ export function match<T, E>(
205
206
  }
206
207
 
207
208
  if (!matcher) {
208
- const responseBody = await response.text();
209
209
  return [{
210
210
  ok: false,
211
- error: new CeError(
212
- "Unexpected API response status or content-type",
211
+ error: new CeError("Unexpected Status or Content-Type", {
213
212
  response,
214
- responseBody,
215
- ),
216
- }, responseBody];
213
+ request,
214
+ body: await response.text().catch(() => ""),
215
+ }),
216
+ }, raw];
217
217
  }
218
218
 
219
219
  const encoding = matcher.enc;
220
+ let body = "";
220
221
  switch (encoding) {
221
222
  case "json":
222
- raw = await response.json();
223
+ body = await response.text();
224
+ raw = JSON.parse(body);
223
225
  break;
224
226
  case "jsonl":
225
227
  raw = response.body;
@@ -231,16 +233,19 @@ export function match<T, E>(
231
233
  raw = response.body;
232
234
  break;
233
235
  case "text":
234
- raw = await response.text();
236
+ body = await response.text();
237
+ raw = body;
235
238
  break;
236
239
  case "sse":
237
240
  raw = response.body;
238
241
  break;
239
242
  case "nil":
240
- raw = await discardResponseBody(response);
243
+ body = await response.text();
244
+ raw = undefined;
241
245
  break;
242
246
  case "fail":
243
- raw = await response.text();
247
+ body = await response.text();
248
+ raw = body;
244
249
  break;
245
250
  default:
246
251
  encoding satisfies never;
@@ -250,11 +255,7 @@ export function match<T, E>(
250
255
  if (matcher.enc === "fail") {
251
256
  return [{
252
257
  ok: false,
253
- error: new CeError(
254
- "API error occurred",
255
- response,
256
- typeof raw === "string" ? raw : "",
257
- ),
258
+ error: new CeError("API error occurred", { request, response, body }),
258
259
  }, raw];
259
260
  }
260
261
 
@@ -266,6 +267,9 @@ export function match<T, E>(
266
267
  ...options?.extraFields,
267
268
  ...(matcher.hdrs ? { Headers: unpackHeaders(response.headers) } : null),
268
269
  ...(isPlainObject(raw) ? raw : null),
270
+ request$: request,
271
+ response$: response,
272
+ body$: body,
269
273
  };
270
274
  } else if (resultKey) {
271
275
  data = {
@@ -284,18 +288,20 @@ export function match<T, E>(
284
288
  }
285
289
 
286
290
  if ("err" in matcher) {
287
- const result = safeParse(
291
+ const result = safeParseResponse(
288
292
  data,
289
293
  (v: unknown) => matcher.schema.parse(v),
290
294
  "Response validation failed",
295
+ { request, response, body },
291
296
  );
292
297
  return [result.ok ? { ok: false, error: result.value } : result, raw];
293
298
  } else {
294
299
  return [
295
- safeParse(
300
+ safeParseResponse(
296
301
  data,
297
302
  (v: unknown) => matcher.schema.parse(v),
298
303
  "Response validation failed",
304
+ { request, response, body },
299
305
  ),
300
306
  raw,
301
307
  ];
@@ -318,25 +324,22 @@ export function unpackHeaders(headers: Headers): Record<string, string[]> {
318
324
  return out;
319
325
  }
320
326
 
321
- /**
322
- * Discards the response body to free up resources.
323
- *
324
- * To learn why this is need, see the undici docs:
325
- * https://undici.nodejs.org/#/?id=garbage-collection
326
- */
327
- export async function discardResponseBody(res: Response) {
328
- const reader = res.body?.getReader();
329
- if (reader == null) {
330
- return;
331
- }
332
-
327
+ function safeParseResponse<Inp, Out>(
328
+ rawValue: Inp,
329
+ fn: (value: Inp) => Out,
330
+ errorMessage: string,
331
+ httpMeta: { response: Response; request: Request; body: string },
332
+ ): Result<Out, ResponseValidationError> {
333
333
  try {
334
- let done = false;
335
- while (!done) {
336
- const res = await reader.read();
337
- done = res.done;
338
- }
339
- } finally {
340
- reader.releaseLock();
334
+ return OK(fn(rawValue));
335
+ } catch (err) {
336
+ return ERR(
337
+ new ResponseValidationError(errorMessage, {
338
+ cause: err,
339
+ rawValue,
340
+ rawMessage: errorMessage,
341
+ ...httpMeta,
342
+ }),
343
+ );
341
344
  }
342
345
  }
@@ -8,6 +8,12 @@ import { safeParse } from "../../lib/schemas.js";
8
8
  import { ClosedEnum } from "../../types/enums.js";
9
9
  import { Result as SafeParseResult } from "../../types/fp.js";
10
10
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+ import {
12
+ Category,
13
+ Category$inboundSchema,
14
+ Category$Outbound,
15
+ Category$outboundSchema,
16
+ } from "./category.js";
11
17
  import {
12
18
  ProductAttribute,
13
19
  ProductAttribute$inboundSchema,
@@ -101,6 +107,7 @@ export type Product = {
101
107
  hasVariant: boolean;
102
108
  tags: Array<string> | null;
103
109
  categoryIds: Array<string>;
110
+ categories: Array<Category>;
104
111
  reviewsRatingSum: number;
105
112
  reviewsCount: number;
106
113
  attributes: Array<ProductAttribute>;
@@ -153,6 +160,7 @@ export const Product$inboundSchema: z.ZodType<Product, z.ZodTypeDef, unknown> =
153
160
  has_variant: z.boolean(),
154
161
  tags: z.nullable(z.array(z.string())),
155
162
  category_ids: z.array(z.string()),
163
+ categories: z.array(Category$inboundSchema),
156
164
  reviews_rating_sum: z.number(),
157
165
  reviews_count: z.number().int(),
158
166
  attributes: z.array(ProductAttribute$inboundSchema),
@@ -197,6 +205,7 @@ export type Product$Outbound = {
197
205
  has_variant: boolean;
198
206
  tags: Array<string> | null;
199
207
  category_ids: Array<string>;
208
+ categories: Array<Category$Outbound>;
200
209
  reviews_rating_sum: number;
201
210
  reviews_count: number;
202
211
  attributes: Array<ProductAttribute$Outbound>;
@@ -230,6 +239,7 @@ export const Product$outboundSchema: z.ZodType<
230
239
  hasVariant: z.boolean(),
231
240
  tags: z.nullable(z.array(z.string())),
232
241
  categoryIds: z.array(z.string()),
242
+ categories: z.array(Category$outboundSchema),
233
243
  reviewsRatingSum: z.number(),
234
244
  reviewsCount: z.number().int(),
235
245
  attributes: z.array(ProductAttribute$outboundSchema),
@@ -8,6 +8,12 @@ import { safeParse } from "../../lib/schemas.js";
8
8
  import { ClosedEnum } from "../../types/enums.js";
9
9
  import { Result as SafeParseResult } from "../../types/fp.js";
10
10
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+ import {
12
+ Category,
13
+ Category$inboundSchema,
14
+ Category$Outbound,
15
+ Category$outboundSchema,
16
+ } from "./category.js";
11
17
  import {
12
18
  ProductAttribute,
13
19
  ProductAttribute$inboundSchema,
@@ -121,6 +127,7 @@ export type ProductDetail = {
121
127
  hasVariant: boolean;
122
128
  tags: Array<string> | null;
123
129
  categoryIds: Array<string>;
130
+ categories: Array<Category>;
124
131
  reviewsRatingSum: number;
125
132
  reviewsCount: number;
126
133
  attributes: Array<ProductAttribute>;
@@ -192,6 +199,7 @@ export const ProductDetail$inboundSchema: z.ZodType<
192
199
  has_variant: z.boolean(),
193
200
  tags: z.nullable(z.array(z.string())),
194
201
  category_ids: z.array(z.string()),
202
+ categories: z.array(Category$inboundSchema),
195
203
  reviews_rating_sum: z.number(),
196
204
  reviews_count: z.number().int(),
197
205
  attributes: z.array(ProductAttribute$inboundSchema),
@@ -247,6 +255,7 @@ export type ProductDetail$Outbound = {
247
255
  has_variant: boolean;
248
256
  tags: Array<string> | null;
249
257
  category_ids: Array<string>;
258
+ categories: Array<Category$Outbound>;
250
259
  reviews_rating_sum: number;
251
260
  reviews_count: number;
252
261
  attributes: Array<ProductAttribute$Outbound>;
@@ -288,6 +297,7 @@ export const ProductDetail$outboundSchema: z.ZodType<
288
297
  hasVariant: z.boolean(),
289
298
  tags: z.nullable(z.array(z.string())),
290
299
  categoryIds: z.array(z.string()),
300
+ categories: z.array(Category$outboundSchema),
291
301
  reviewsRatingSum: z.number(),
292
302
  reviewsCount: z.number().int(),
293
303
  attributes: z.array(ProductAttribute$outboundSchema),
@@ -14,9 +14,6 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
14
14
  */
15
15
  export const Status = {
16
16
  Approved: "approved",
17
- Rejected: "rejected",
18
- Archived: "archived",
19
- Pending: "pending",
20
17
  } as const;
21
18
  /**
22
19
  * Reviews with approved status will be displayed.
@@ -303,7 +300,7 @@ export const ProductReview$inboundSchema: z.ZodType<
303
300
  review_text: z.string().optional(),
304
301
  name: z.string().optional(),
305
302
  email: z.string().optional(),
306
- status: Status$inboundSchema.default("pending"),
303
+ status: Status$inboundSchema.optional(),
307
304
  is_featured: z.boolean().default(false),
308
305
  tags: z.array(z.string()).optional(),
309
306
  review_date: z.string().datetime({ offset: true }).transform(v => new Date(v))
@@ -330,7 +327,7 @@ export type ProductReview$Outbound = {
330
327
  review_text?: string | undefined;
331
328
  name?: string | undefined;
332
329
  email?: string | undefined;
333
- status: string;
330
+ status?: string | undefined;
334
331
  is_featured: boolean;
335
332
  tags?: Array<string> | undefined;
336
333
  review_date?: string | undefined;
@@ -350,7 +347,7 @@ export const ProductReview$outboundSchema: z.ZodType<
350
347
  reviewText: z.string().optional(),
351
348
  name: z.string().optional(),
352
349
  email: z.string().optional(),
353
- status: Status$outboundSchema.default("pending"),
350
+ status: Status$outboundSchema.optional(),
354
351
  isFeatured: z.boolean().default(false),
355
352
  tags: z.array(z.string()).optional(),
356
353
  reviewDate: z.date().transform(v => v.toISOString()).optional(),
@@ -5,6 +5,7 @@
5
5
  import * as z from "zod";
6
6
  import { safeParse } from "../../lib/schemas.js";
7
7
  import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { CeStorefrontError } from "./cestorefronterror.js";
8
9
  import { SDKValidationError } from "./sdkvalidationerror.js";
9
10
 
10
11
  export type ErrorT = {
@@ -24,7 +25,7 @@ export type BadRequestData = {
24
25
  /**
25
26
  * Bad request
26
27
  */
27
- export class BadRequest extends Error {
28
+ export class BadRequest extends CeStorefrontError {
28
29
  success: boolean;
29
30
  code: string;
30
31
  error?: ErrorT | undefined;
@@ -32,11 +33,13 @@ export class BadRequest extends Error {
32
33
  /** The original data that was passed to this error instance. */
33
34
  data$: BadRequestData;
34
35
 
35
- constructor(err: BadRequestData) {
36
+ constructor(
37
+ err: BadRequestData,
38
+ httpMeta: { response: Response; request: Request; body: string },
39
+ ) {
36
40
  const message = err.message || "API error occurred";
37
- super(message);
41
+ super(message, httpMeta);
38
42
  this.data$ = err;
39
-
40
43
  this.success = err.success;
41
44
  this.code = err.code;
42
45
  if (err.error != null) this.error = err.error;
@@ -102,9 +105,16 @@ export const BadRequest$inboundSchema: z.ZodType<
102
105
  success: z.boolean(),
103
106
  code: z.string(),
104
107
  error: z.lazy(() => ErrorT$inboundSchema).optional(),
108
+ request$: z.instanceof(Request),
109
+ response$: z.instanceof(Response),
110
+ body$: z.string(),
105
111
  })
106
112
  .transform((v) => {
107
- return new BadRequest(v);
113
+ return new BadRequest(v, {
114
+ request: v.request$,
115
+ response: v.response$,
116
+ body: v.body$,
117
+ });
108
118
  });
109
119
 
110
120
  /** @internal */
@@ -2,41 +2,33 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
4
 
5
- export class CeError extends Error {
6
- /**
7
- * HTTP status code
8
- */
9
- public readonly statusCode: number;
10
- /**
11
- * HTTP content type
12
- */
13
- public readonly contentType: string;
14
- /**
15
- * HTTP body
16
- */
17
- public readonly body: string;
18
- /**
19
- * Raw response
20
- */
21
- public readonly rawResponse: Response;
5
+ import { CeStorefrontError } from "./cestorefronterror.js";
22
6
 
7
+ /** The fallback error class if no more specific error class is matched */
8
+ export class CeError extends CeStorefrontError {
23
9
  constructor(
24
10
  message: string,
25
- rawResponse: Response,
26
- body: string = "",
11
+ httpMeta: {
12
+ response: Response;
13
+ request: Request;
14
+ body: string;
15
+ },
27
16
  ) {
28
- const statusCode = rawResponse.status;
29
- const contentType = rawResponse.headers.get("content-type") || "";
30
- const bodyString = body.length > 0 ? `\n${body}` : "";
31
- super(
32
- `${message}: Status ${statusCode} Content-Type ${contentType} Body ${bodyString}`,
33
- );
34
-
35
- this.body = body;
36
- this.rawResponse = rawResponse;
37
- this.statusCode = statusCode;
38
- this.contentType = contentType;
39
-
17
+ if (message) {
18
+ message += `: `;
19
+ }
20
+ message += `Status ${httpMeta.response.status}`;
21
+ const contentType = httpMeta.response.headers.get("content-type") || `""`;
22
+ if (contentType !== "application/json") {
23
+ message += ` Content-Type ${
24
+ contentType.includes(" ") ? `"${contentType}"` : contentType
25
+ }`;
26
+ }
27
+ const body = httpMeta.body || `""`;
28
+ message += body.length > 100 ? "\n" : " ";
29
+ message += `Body ${body}`;
30
+ message = message.trim();
31
+ super(message, httpMeta);
40
32
  this.name = "CeError";
41
33
  }
42
34
  }
@@ -0,0 +1,35 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ /** The base class for all HTTP error responses */
6
+ export class CeStorefrontError extends Error {
7
+ /** HTTP status code */
8
+ public readonly statusCode: number;
9
+ /** HTTP body */
10
+ public readonly body: string;
11
+ /** HTTP headers */
12
+ public readonly headers: Headers;
13
+ /** HTTP content type */
14
+ public readonly contentType: string;
15
+ /** Raw response */
16
+ public readonly rawResponse: Response;
17
+
18
+ constructor(
19
+ message: string,
20
+ httpMeta: {
21
+ response: Response;
22
+ request: Request;
23
+ body: string;
24
+ },
25
+ ) {
26
+ super(message);
27
+ this.statusCode = httpMeta.response.status;
28
+ this.body = httpMeta.body;
29
+ this.headers = httpMeta.response.headers;
30
+ this.contentType = httpMeta.response.headers.get("content-type") || "";
31
+ this.rawResponse = httpMeta.response;
32
+
33
+ this.name = "CeStorefrontError";
34
+ }
35
+ }
@@ -6,5 +6,6 @@ export * from "./badrequest.js";
6
6
  export * from "./ceerror.js";
7
7
  export * from "./httpclienterrors.js";
8
8
  export * from "./notfound.js";
9
+ export * from "./responsevalidationerror.js";
9
10
  export * from "./sdkvalidationerror.js";
10
11
  export * from "./unauthorized.js";