ce-storefront 0.11.0 → 0.11.2

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 (443) hide show
  1. package/README.md +28 -18
  2. package/docs/sdks/carts/README.md +69 -44
  3. package/docs/sdks/catalog/README.md +59 -40
  4. package/docs/sdks/customers/README.md +31 -20
  5. package/docs/sdks/orders/README.md +32 -20
  6. package/docs/sdks/shipping/README.md +5 -4
  7. package/esm/funcs/authGenerateOtp.js +2 -2
  8. package/esm/funcs/authGenerateOtp.js.map +1 -1
  9. package/esm/funcs/authGetAnonymousToken.js +2 -2
  10. package/esm/funcs/authGetAnonymousToken.js.map +1 -1
  11. package/esm/funcs/authGetUserDetail.js +2 -2
  12. package/esm/funcs/authGetUserDetail.js.map +1 -1
  13. package/esm/funcs/authLoginWithEmail.js +2 -2
  14. package/esm/funcs/authLoginWithEmail.js.map +1 -1
  15. package/esm/funcs/authLoginWithPhone.js +2 -2
  16. package/esm/funcs/authLoginWithPhone.js.map +1 -1
  17. package/esm/funcs/authLoginWithWhatsapp.js +2 -2
  18. package/esm/funcs/authLoginWithWhatsapp.js.map +1 -1
  19. package/esm/funcs/authLogout.js +2 -2
  20. package/esm/funcs/authLogout.js.map +1 -1
  21. package/esm/funcs/authRefreshToken.js +2 -2
  22. package/esm/funcs/authRefreshToken.js.map +1 -1
  23. package/esm/funcs/authUpdateUser.js +2 -2
  24. package/esm/funcs/authUpdateUser.js.map +1 -1
  25. package/esm/funcs/authVerifyOtp.js +2 -2
  26. package/esm/funcs/authVerifyOtp.js.map +1 -1
  27. package/esm/funcs/cartsAddShippingMethod.d.ts +2 -1
  28. package/esm/funcs/cartsAddShippingMethod.d.ts.map +1 -1
  29. package/esm/funcs/cartsAddShippingMethod.js +6 -2
  30. package/esm/funcs/cartsAddShippingMethod.js.map +1 -1
  31. package/esm/funcs/cartsApplyCoupon.d.ts +2 -1
  32. package/esm/funcs/cartsApplyCoupon.d.ts.map +1 -1
  33. package/esm/funcs/cartsApplyCoupon.js +6 -2
  34. package/esm/funcs/cartsApplyCoupon.js.map +1 -1
  35. package/esm/funcs/cartsCreateCart.js +2 -2
  36. package/esm/funcs/cartsCreateCart.js.map +1 -1
  37. package/esm/funcs/cartsCreateCartAddress.d.ts +2 -1
  38. package/esm/funcs/cartsCreateCartAddress.d.ts.map +1 -1
  39. package/esm/funcs/cartsCreateCartAddress.js +6 -2
  40. package/esm/funcs/cartsCreateCartAddress.js.map +1 -1
  41. package/esm/funcs/cartsDeleteCart.d.ts +2 -1
  42. package/esm/funcs/cartsDeleteCart.d.ts.map +1 -1
  43. package/esm/funcs/cartsDeleteCart.js +6 -2
  44. package/esm/funcs/cartsDeleteCart.js.map +1 -1
  45. package/esm/funcs/cartsGetCart.d.ts +2 -1
  46. package/esm/funcs/cartsGetCart.d.ts.map +1 -1
  47. package/esm/funcs/cartsGetCart.js +6 -2
  48. package/esm/funcs/cartsGetCart.js.map +1 -1
  49. package/esm/funcs/cartsGetUserCart.d.ts +2 -1
  50. package/esm/funcs/cartsGetUserCart.d.ts.map +1 -1
  51. package/esm/funcs/cartsGetUserCart.js +6 -2
  52. package/esm/funcs/cartsGetUserCart.js.map +1 -1
  53. package/esm/funcs/cartsRedeemLoyaltyPoints.d.ts +2 -1
  54. package/esm/funcs/cartsRedeemLoyaltyPoints.d.ts.map +1 -1
  55. package/esm/funcs/cartsRedeemLoyaltyPoints.js +6 -2
  56. package/esm/funcs/cartsRedeemLoyaltyPoints.js.map +1 -1
  57. package/esm/funcs/cartsRemoveCoupon.d.ts +2 -1
  58. package/esm/funcs/cartsRemoveCoupon.d.ts.map +1 -1
  59. package/esm/funcs/cartsRemoveCoupon.js +6 -2
  60. package/esm/funcs/cartsRemoveCoupon.js.map +1 -1
  61. package/esm/funcs/cartsRemoveLoyaltyPoints.d.ts +2 -1
  62. package/esm/funcs/cartsRemoveLoyaltyPoints.d.ts.map +1 -1
  63. package/esm/funcs/cartsRemoveLoyaltyPoints.js +6 -2
  64. package/esm/funcs/cartsRemoveLoyaltyPoints.js.map +1 -1
  65. package/esm/funcs/cartsRemoveUserCart.d.ts +2 -1
  66. package/esm/funcs/cartsRemoveUserCart.d.ts.map +1 -1
  67. package/esm/funcs/cartsRemoveUserCart.js +6 -2
  68. package/esm/funcs/cartsRemoveUserCart.js.map +1 -1
  69. package/esm/funcs/cartsUpdateCart.d.ts +2 -1
  70. package/esm/funcs/cartsUpdateCart.d.ts.map +1 -1
  71. package/esm/funcs/cartsUpdateCart.js +6 -2
  72. package/esm/funcs/cartsUpdateCart.js.map +1 -1
  73. package/esm/funcs/catalogGetProductDetail.d.ts +2 -1
  74. package/esm/funcs/catalogGetProductDetail.d.ts.map +1 -1
  75. package/esm/funcs/catalogGetProductDetail.js +6 -2
  76. package/esm/funcs/catalogGetProductDetail.js.map +1 -1
  77. package/esm/funcs/catalogGetVariantDetail.d.ts +2 -1
  78. package/esm/funcs/catalogGetVariantDetail.d.ts.map +1 -1
  79. package/esm/funcs/catalogGetVariantDetail.js +6 -2
  80. package/esm/funcs/catalogGetVariantDetail.js.map +1 -1
  81. package/esm/funcs/catalogListCategories.js +2 -2
  82. package/esm/funcs/catalogListCategories.js.map +1 -1
  83. package/esm/funcs/catalogListCrosssellProducts.d.ts +2 -1
  84. package/esm/funcs/catalogListCrosssellProducts.d.ts.map +1 -1
  85. package/esm/funcs/catalogListCrosssellProducts.js +6 -2
  86. package/esm/funcs/catalogListCrosssellProducts.js.map +1 -1
  87. package/esm/funcs/catalogListProductReviews.d.ts +2 -1
  88. package/esm/funcs/catalogListProductReviews.d.ts.map +1 -1
  89. package/esm/funcs/catalogListProductReviews.js +6 -2
  90. package/esm/funcs/catalogListProductReviews.js.map +1 -1
  91. package/esm/funcs/catalogListProductVariants.d.ts +2 -1
  92. package/esm/funcs/catalogListProductVariants.d.ts.map +1 -1
  93. package/esm/funcs/catalogListProductVariants.js +6 -2
  94. package/esm/funcs/catalogListProductVariants.js.map +1 -1
  95. package/esm/funcs/catalogListProducts.d.ts +2 -1
  96. package/esm/funcs/catalogListProducts.d.ts.map +1 -1
  97. package/esm/funcs/catalogListProducts.js +6 -2
  98. package/esm/funcs/catalogListProducts.js.map +1 -1
  99. package/esm/funcs/catalogListSimilarProducts.d.ts +2 -1
  100. package/esm/funcs/catalogListSimilarProducts.d.ts.map +1 -1
  101. package/esm/funcs/catalogListSimilarProducts.js +6 -2
  102. package/esm/funcs/catalogListSimilarProducts.js.map +1 -1
  103. package/esm/funcs/catalogListSkus.d.ts +2 -1
  104. package/esm/funcs/catalogListSkus.d.ts.map +1 -1
  105. package/esm/funcs/catalogListSkus.js +6 -2
  106. package/esm/funcs/catalogListSkus.js.map +1 -1
  107. package/esm/funcs/catalogListUpsellProducts.d.ts +2 -1
  108. package/esm/funcs/catalogListUpsellProducts.d.ts.map +1 -1
  109. package/esm/funcs/catalogListUpsellProducts.js +6 -2
  110. package/esm/funcs/catalogListUpsellProducts.js.map +1 -1
  111. package/esm/funcs/catalogSearchProducts.d.ts +2 -1
  112. package/esm/funcs/catalogSearchProducts.d.ts.map +1 -1
  113. package/esm/funcs/catalogSearchProducts.js +6 -2
  114. package/esm/funcs/catalogSearchProducts.js.map +1 -1
  115. package/esm/funcs/commonListCountryPincodes.js +2 -2
  116. package/esm/funcs/commonListCountryPincodes.js.map +1 -1
  117. package/esm/funcs/customersCreateAddress.d.ts +2 -1
  118. package/esm/funcs/customersCreateAddress.d.ts.map +1 -1
  119. package/esm/funcs/customersCreateAddress.js +6 -2
  120. package/esm/funcs/customersCreateAddress.js.map +1 -1
  121. package/esm/funcs/customersDeleteAddress.d.ts +2 -1
  122. package/esm/funcs/customersDeleteAddress.d.ts.map +1 -1
  123. package/esm/funcs/customersDeleteAddress.js +6 -2
  124. package/esm/funcs/customersDeleteAddress.js.map +1 -1
  125. package/esm/funcs/customersGetAddressDetail.d.ts +2 -1
  126. package/esm/funcs/customersGetAddressDetail.d.ts.map +1 -1
  127. package/esm/funcs/customersGetAddressDetail.js +6 -2
  128. package/esm/funcs/customersGetAddressDetail.js.map +1 -1
  129. package/esm/funcs/customersGetLoyaltyDetails.d.ts +2 -1
  130. package/esm/funcs/customersGetLoyaltyDetails.d.ts.map +1 -1
  131. package/esm/funcs/customersGetLoyaltyDetails.js +6 -2
  132. package/esm/funcs/customersGetLoyaltyDetails.js.map +1 -1
  133. package/esm/funcs/customersListAddresses.js +2 -2
  134. package/esm/funcs/customersListAddresses.js.map +1 -1
  135. package/esm/funcs/customersListUserReviews.js +2 -2
  136. package/esm/funcs/customersListUserReviews.js.map +1 -1
  137. package/esm/funcs/customersUpdateAddressDetail.d.ts +2 -1
  138. package/esm/funcs/customersUpdateAddressDetail.d.ts.map +1 -1
  139. package/esm/funcs/customersUpdateAddressDetail.js +6 -2
  140. package/esm/funcs/customersUpdateAddressDetail.js.map +1 -1
  141. package/esm/funcs/ordersCancelOrder.d.ts +2 -1
  142. package/esm/funcs/ordersCancelOrder.d.ts.map +1 -1
  143. package/esm/funcs/ordersCancelOrder.js +6 -2
  144. package/esm/funcs/ordersCancelOrder.js.map +1 -1
  145. package/esm/funcs/ordersCreateOrder.d.ts +2 -1
  146. package/esm/funcs/ordersCreateOrder.d.ts.map +1 -1
  147. package/esm/funcs/ordersCreateOrder.js +6 -2
  148. package/esm/funcs/ordersCreateOrder.js.map +1 -1
  149. package/esm/funcs/ordersGetOrderDetail.d.ts +2 -1
  150. package/esm/funcs/ordersGetOrderDetail.d.ts.map +1 -1
  151. package/esm/funcs/ordersGetOrderDetail.js +6 -2
  152. package/esm/funcs/ordersGetOrderDetail.js.map +1 -1
  153. package/esm/funcs/ordersGetPaymentStatus.js +2 -2
  154. package/esm/funcs/ordersGetPaymentStatus.js.map +1 -1
  155. package/esm/funcs/ordersListOrderShipments.d.ts +2 -1
  156. package/esm/funcs/ordersListOrderShipments.d.ts.map +1 -1
  157. package/esm/funcs/ordersListOrderShipments.js +6 -2
  158. package/esm/funcs/ordersListOrderShipments.js.map +1 -1
  159. package/esm/funcs/ordersListOrders.d.ts +1 -1
  160. package/esm/funcs/ordersListOrders.d.ts.map +1 -1
  161. package/esm/funcs/ordersListOrders.js +2 -2
  162. package/esm/funcs/ordersListOrders.js.map +1 -1
  163. package/esm/funcs/ordersRetryOrderPayment.d.ts +2 -1
  164. package/esm/funcs/ordersRetryOrderPayment.d.ts.map +1 -1
  165. package/esm/funcs/ordersRetryOrderPayment.js +6 -2
  166. package/esm/funcs/ordersRetryOrderPayment.js.map +1 -1
  167. package/esm/funcs/shippingCheckDeliveryAvailability.d.ts +2 -1
  168. package/esm/funcs/shippingCheckDeliveryAvailability.d.ts.map +1 -1
  169. package/esm/funcs/shippingCheckDeliveryAvailability.js +6 -2
  170. package/esm/funcs/shippingCheckDeliveryAvailability.js.map +1 -1
  171. package/esm/funcs/shippingCheckServiceability.js +2 -2
  172. package/esm/funcs/shippingCheckServiceability.js.map +1 -1
  173. package/esm/lib/config.d.ts +3 -3
  174. package/esm/lib/config.js +3 -3
  175. package/esm/models/components/cart.d.ts +9 -6
  176. package/esm/models/components/cart.d.ts.map +1 -1
  177. package/esm/models/components/cart.js +12 -12
  178. package/esm/models/components/cart.js.map +1 -1
  179. package/esm/models/components/cartitem.d.ts +12 -2
  180. package/esm/models/components/cartitem.d.ts.map +1 -1
  181. package/esm/models/components/cartitem.js +12 -4
  182. package/esm/models/components/cartitem.js.map +1 -1
  183. package/esm/models/components/index.d.ts +0 -3
  184. package/esm/models/components/index.d.ts.map +1 -1
  185. package/esm/models/components/index.js +0 -3
  186. package/esm/models/components/index.js.map +1 -1
  187. package/esm/models/{components → errors}/badrequest.d.ts +13 -4
  188. package/esm/models/errors/badrequest.d.ts.map +1 -0
  189. package/esm/models/{components → errors}/badrequest.js +26 -8
  190. package/esm/models/errors/badrequest.js.map +1 -0
  191. package/esm/models/errors/index.d.ts +3 -0
  192. package/esm/models/errors/index.d.ts.map +1 -1
  193. package/esm/models/errors/index.js +3 -0
  194. package/esm/models/errors/index.js.map +1 -1
  195. package/esm/models/{components → errors}/notfound.d.ts +11 -5
  196. package/esm/models/errors/notfound.d.ts.map +1 -0
  197. package/esm/models/{components → errors}/notfound.js +24 -9
  198. package/esm/models/errors/notfound.js.map +1 -0
  199. package/esm/models/{components → errors}/unauthorized.d.ts +13 -7
  200. package/esm/models/errors/unauthorized.d.ts.map +1 -0
  201. package/esm/models/{components → errors}/unauthorized.js +24 -9
  202. package/esm/models/errors/unauthorized.js.map +1 -0
  203. package/esm/models/operations/applycoupon.d.ts +0 -21
  204. package/esm/models/operations/applycoupon.d.ts.map +1 -1
  205. package/esm/models/operations/applycoupon.js +0 -29
  206. package/esm/models/operations/applycoupon.js.map +1 -1
  207. package/esm/models/operations/cancelorder.d.ts +0 -21
  208. package/esm/models/operations/cancelorder.d.ts.map +1 -1
  209. package/esm/models/operations/cancelorder.js +0 -29
  210. package/esm/models/operations/cancelorder.js.map +1 -1
  211. package/esm/models/operations/checkdeliveryavailability.d.ts +0 -22
  212. package/esm/models/operations/checkdeliveryavailability.d.ts.map +1 -1
  213. package/esm/models/operations/checkdeliveryavailability.js +0 -28
  214. package/esm/models/operations/checkdeliveryavailability.js.map +1 -1
  215. package/esm/models/operations/createaddress.d.ts +0 -21
  216. package/esm/models/operations/createaddress.d.ts.map +1 -1
  217. package/esm/models/operations/createaddress.js +0 -29
  218. package/esm/models/operations/createaddress.js.map +1 -1
  219. package/esm/models/operations/createcartaddress.d.ts +0 -21
  220. package/esm/models/operations/createcartaddress.d.ts.map +1 -1
  221. package/esm/models/operations/createcartaddress.js +0 -31
  222. package/esm/models/operations/createcartaddress.js.map +1 -1
  223. package/esm/models/operations/createorder.d.ts +0 -21
  224. package/esm/models/operations/createorder.d.ts.map +1 -1
  225. package/esm/models/operations/createorder.js +0 -31
  226. package/esm/models/operations/createorder.js.map +1 -1
  227. package/esm/models/operations/deleteaddress.d.ts +0 -22
  228. package/esm/models/operations/deleteaddress.d.ts.map +1 -1
  229. package/esm/models/operations/deleteaddress.js +0 -30
  230. package/esm/models/operations/deleteaddress.js.map +1 -1
  231. package/esm/models/operations/deletecart.d.ts +0 -22
  232. package/esm/models/operations/deletecart.d.ts.map +1 -1
  233. package/esm/models/operations/deletecart.js +0 -30
  234. package/esm/models/operations/deletecart.js.map +1 -1
  235. package/esm/models/operations/deleteusercart.d.ts +0 -22
  236. package/esm/models/operations/deleteusercart.d.ts.map +1 -1
  237. package/esm/models/operations/deleteusercart.js +0 -30
  238. package/esm/models/operations/deleteusercart.js.map +1 -1
  239. package/esm/models/operations/getaddressdetail.d.ts +0 -22
  240. package/esm/models/operations/getaddressdetail.d.ts.map +1 -1
  241. package/esm/models/operations/getaddressdetail.js +0 -30
  242. package/esm/models/operations/getaddressdetail.js.map +1 -1
  243. package/esm/models/operations/getcart.d.ts +0 -21
  244. package/esm/models/operations/getcart.d.ts.map +1 -1
  245. package/esm/models/operations/getcart.js +0 -29
  246. package/esm/models/operations/getcart.js.map +1 -1
  247. package/esm/models/operations/getloyaltydetails.d.ts +0 -21
  248. package/esm/models/operations/getloyaltydetails.d.ts.map +1 -1
  249. package/esm/models/operations/getloyaltydetails.js +0 -29
  250. package/esm/models/operations/getloyaltydetails.js.map +1 -1
  251. package/esm/models/operations/getorderdetail.d.ts +0 -21
  252. package/esm/models/operations/getorderdetail.d.ts.map +1 -1
  253. package/esm/models/operations/getorderdetail.js +0 -29
  254. package/esm/models/operations/getorderdetail.js.map +1 -1
  255. package/esm/models/operations/getproductdetail.d.ts +0 -21
  256. package/esm/models/operations/getproductdetail.d.ts.map +1 -1
  257. package/esm/models/operations/getproductdetail.js +0 -29
  258. package/esm/models/operations/getproductdetail.js.map +1 -1
  259. package/esm/models/operations/getusercart.d.ts +0 -21
  260. package/esm/models/operations/getusercart.d.ts.map +1 -1
  261. package/esm/models/operations/getusercart.js +0 -29
  262. package/esm/models/operations/getusercart.js.map +1 -1
  263. package/esm/models/operations/getvariantdetail.d.ts +0 -21
  264. package/esm/models/operations/getvariantdetail.d.ts.map +1 -1
  265. package/esm/models/operations/getvariantdetail.js +0 -29
  266. package/esm/models/operations/getvariantdetail.js.map +1 -1
  267. package/esm/models/operations/listcrosssellproducts.d.ts +0 -21
  268. package/esm/models/operations/listcrosssellproducts.d.ts.map +1 -1
  269. package/esm/models/operations/listcrosssellproducts.js +0 -29
  270. package/esm/models/operations/listcrosssellproducts.js.map +1 -1
  271. package/esm/models/operations/listordershipments.d.ts +0 -21
  272. package/esm/models/operations/listordershipments.d.ts.map +1 -1
  273. package/esm/models/operations/listordershipments.js +0 -29
  274. package/esm/models/operations/listordershipments.js.map +1 -1
  275. package/esm/models/operations/listproductreviews.d.ts +0 -21
  276. package/esm/models/operations/listproductreviews.d.ts.map +1 -1
  277. package/esm/models/operations/listproductreviews.js +0 -29
  278. package/esm/models/operations/listproductreviews.js.map +1 -1
  279. package/esm/models/operations/listproducts.d.ts +0 -21
  280. package/esm/models/operations/listproducts.d.ts.map +1 -1
  281. package/esm/models/operations/listproducts.js +0 -29
  282. package/esm/models/operations/listproducts.js.map +1 -1
  283. package/esm/models/operations/listproductvariants.d.ts +0 -21
  284. package/esm/models/operations/listproductvariants.d.ts.map +1 -1
  285. package/esm/models/operations/listproductvariants.js +0 -29
  286. package/esm/models/operations/listproductvariants.js.map +1 -1
  287. package/esm/models/operations/listsimilarproducts.d.ts +0 -21
  288. package/esm/models/operations/listsimilarproducts.d.ts.map +1 -1
  289. package/esm/models/operations/listsimilarproducts.js +0 -29
  290. package/esm/models/operations/listsimilarproducts.js.map +1 -1
  291. package/esm/models/operations/listskus.d.ts +0 -21
  292. package/esm/models/operations/listskus.d.ts.map +1 -1
  293. package/esm/models/operations/listskus.js +0 -29
  294. package/esm/models/operations/listskus.js.map +1 -1
  295. package/esm/models/operations/listupsellproducts.d.ts +0 -21
  296. package/esm/models/operations/listupsellproducts.d.ts.map +1 -1
  297. package/esm/models/operations/listupsellproducts.js +0 -29
  298. package/esm/models/operations/listupsellproducts.js.map +1 -1
  299. package/esm/models/operations/redeemloyaltypoints.d.ts +0 -21
  300. package/esm/models/operations/redeemloyaltypoints.d.ts.map +1 -1
  301. package/esm/models/operations/redeemloyaltypoints.js +0 -29
  302. package/esm/models/operations/redeemloyaltypoints.js.map +1 -1
  303. package/esm/models/operations/removecoupon.d.ts +0 -21
  304. package/esm/models/operations/removecoupon.d.ts.map +1 -1
  305. package/esm/models/operations/removecoupon.js +0 -29
  306. package/esm/models/operations/removecoupon.js.map +1 -1
  307. package/esm/models/operations/removeloyaltypoints.d.ts +0 -21
  308. package/esm/models/operations/removeloyaltypoints.d.ts.map +1 -1
  309. package/esm/models/operations/removeloyaltypoints.js +0 -29
  310. package/esm/models/operations/removeloyaltypoints.js.map +1 -1
  311. package/esm/models/operations/retryorderpayment.d.ts +0 -21
  312. package/esm/models/operations/retryorderpayment.d.ts.map +1 -1
  313. package/esm/models/operations/retryorderpayment.js +0 -31
  314. package/esm/models/operations/retryorderpayment.js.map +1 -1
  315. package/esm/models/operations/searchproducts.d.ts +0 -21
  316. package/esm/models/operations/searchproducts.d.ts.map +1 -1
  317. package/esm/models/operations/searchproducts.js +0 -27
  318. package/esm/models/operations/searchproducts.js.map +1 -1
  319. package/esm/models/operations/updateaddressdetail.d.ts +0 -21
  320. package/esm/models/operations/updateaddressdetail.d.ts.map +1 -1
  321. package/esm/models/operations/updateaddressdetail.js +0 -31
  322. package/esm/models/operations/updateaddressdetail.js.map +1 -1
  323. package/esm/models/operations/updatecart.d.ts +0 -21
  324. package/esm/models/operations/updatecart.d.ts.map +1 -1
  325. package/esm/models/operations/updatecart.js +0 -31
  326. package/esm/models/operations/updatecart.js.map +1 -1
  327. package/esm/models/operations/updateshippingmethod.d.ts +0 -21
  328. package/esm/models/operations/updateshippingmethod.d.ts.map +1 -1
  329. package/esm/models/operations/updateshippingmethod.js +0 -31
  330. package/esm/models/operations/updateshippingmethod.js.map +1 -1
  331. package/esm/sdk/carts.d.ts +11 -11
  332. package/esm/sdk/carts.d.ts.map +1 -1
  333. package/esm/sdk/catalog.d.ts +10 -10
  334. package/esm/sdk/catalog.d.ts.map +1 -1
  335. package/esm/sdk/customers.d.ts +5 -5
  336. package/esm/sdk/customers.d.ts.map +1 -1
  337. package/esm/sdk/orders.d.ts +6 -6
  338. package/esm/sdk/orders.d.ts.map +1 -1
  339. package/esm/sdk/shipping.d.ts +1 -1
  340. package/esm/sdk/shipping.d.ts.map +1 -1
  341. package/jsr.json +1 -1
  342. package/package.json +2 -2
  343. package/src/funcs/authGenerateOtp.ts +3 -1
  344. package/src/funcs/authGetAnonymousToken.ts +3 -1
  345. package/src/funcs/authGetUserDetail.ts +3 -1
  346. package/src/funcs/authLoginWithEmail.ts +3 -1
  347. package/src/funcs/authLoginWithPhone.ts +3 -1
  348. package/src/funcs/authLoginWithWhatsapp.ts +3 -1
  349. package/src/funcs/authLogout.ts +3 -1
  350. package/src/funcs/authRefreshToken.ts +3 -1
  351. package/src/funcs/authUpdateUser.ts +3 -1
  352. package/src/funcs/authVerifyOtp.ts +3 -1
  353. package/src/funcs/cartsAddShippingMethod.ts +25 -9
  354. package/src/funcs/cartsApplyCoupon.ts +21 -8
  355. package/src/funcs/cartsCreateCart.ts +3 -1
  356. package/src/funcs/cartsCreateCartAddress.ts +25 -9
  357. package/src/funcs/cartsDeleteCart.ts +21 -8
  358. package/src/funcs/cartsGetCart.ts +21 -8
  359. package/src/funcs/cartsGetUserCart.ts +21 -8
  360. package/src/funcs/cartsRedeemLoyaltyPoints.ts +21 -8
  361. package/src/funcs/cartsRemoveCoupon.ts +21 -9
  362. package/src/funcs/cartsRemoveLoyaltyPoints.ts +21 -18
  363. package/src/funcs/cartsRemoveUserCart.ts +21 -8
  364. package/src/funcs/cartsUpdateCart.ts +25 -9
  365. package/src/funcs/catalogGetProductDetail.ts +21 -8
  366. package/src/funcs/catalogGetVariantDetail.ts +21 -8
  367. package/src/funcs/catalogListCategories.ts +3 -1
  368. package/src/funcs/catalogListCrosssellProducts.ts +21 -8
  369. package/src/funcs/catalogListProductReviews.ts +21 -8
  370. package/src/funcs/catalogListProductVariants.ts +21 -8
  371. package/src/funcs/catalogListProducts.ts +21 -8
  372. package/src/funcs/catalogListSimilarProducts.ts +21 -8
  373. package/src/funcs/catalogListSkus.ts +21 -8
  374. package/src/funcs/catalogListUpsellProducts.ts +21 -8
  375. package/src/funcs/catalogSearchProducts.ts +17 -7
  376. package/src/funcs/commonListCountryPincodes.ts +3 -1
  377. package/src/funcs/customersCreateAddress.ts +21 -8
  378. package/src/funcs/customersDeleteAddress.ts +21 -8
  379. package/src/funcs/customersGetAddressDetail.ts +21 -8
  380. package/src/funcs/customersGetLoyaltyDetails.ts +21 -8
  381. package/src/funcs/customersListAddresses.ts +3 -1
  382. package/src/funcs/customersListUserReviews.ts +3 -1
  383. package/src/funcs/customersUpdateAddressDetail.ts +25 -9
  384. package/src/funcs/ordersCancelOrder.ts +21 -8
  385. package/src/funcs/ordersCreateOrder.ts +25 -9
  386. package/src/funcs/ordersGetOrderDetail.ts +21 -8
  387. package/src/funcs/ordersGetPaymentStatus.ts +3 -1
  388. package/src/funcs/ordersListOrderShipments.ts +21 -8
  389. package/src/funcs/ordersListOrders.ts +7 -6
  390. package/src/funcs/ordersRetryOrderPayment.ts +25 -9
  391. package/src/funcs/shippingCheckDeliveryAvailability.ts +17 -7
  392. package/src/funcs/shippingCheckServiceability.ts +3 -1
  393. package/src/lib/config.ts +3 -3
  394. package/src/models/components/cart.ts +21 -18
  395. package/src/models/components/cartitem.ts +24 -6
  396. package/src/models/components/index.ts +0 -3
  397. package/src/models/{components → errors}/badrequest.ts +40 -23
  398. package/src/models/errors/index.ts +3 -0
  399. package/src/models/{components → errors}/notfound.ts +36 -24
  400. package/src/models/{components → errors}/unauthorized.ts +38 -26
  401. package/src/models/operations/applycoupon.ts +0 -64
  402. package/src/models/operations/cancelorder.ts +0 -64
  403. package/src/models/operations/checkdeliveryavailability.ts +0 -64
  404. package/src/models/operations/createaddress.ts +0 -64
  405. package/src/models/operations/createcartaddress.ts +0 -68
  406. package/src/models/operations/createorder.ts +0 -68
  407. package/src/models/operations/deleteaddress.ts +0 -65
  408. package/src/models/operations/deletecart.ts +0 -65
  409. package/src/models/operations/deleteusercart.ts +0 -65
  410. package/src/models/operations/getaddressdetail.ts +0 -65
  411. package/src/models/operations/getcart.ts +0 -62
  412. package/src/models/operations/getloyaltydetails.ts +0 -64
  413. package/src/models/operations/getorderdetail.ts +0 -64
  414. package/src/models/operations/getproductdetail.ts +0 -64
  415. package/src/models/operations/getusercart.ts +0 -64
  416. package/src/models/operations/getvariantdetail.ts +0 -64
  417. package/src/models/operations/listcrosssellproducts.ts +0 -66
  418. package/src/models/operations/listordershipments.ts +0 -64
  419. package/src/models/operations/listproductreviews.ts +0 -64
  420. package/src/models/operations/listproducts.ts +0 -64
  421. package/src/models/operations/listproductvariants.ts +0 -66
  422. package/src/models/operations/listsimilarproducts.ts +0 -66
  423. package/src/models/operations/listskus.ts +0 -64
  424. package/src/models/operations/listupsellproducts.ts +0 -64
  425. package/src/models/operations/redeemloyaltypoints.ts +0 -66
  426. package/src/models/operations/removecoupon.ts +0 -64
  427. package/src/models/operations/removeloyaltypoints.ts +0 -66
  428. package/src/models/operations/retryorderpayment.ts +0 -68
  429. package/src/models/operations/searchproducts.ts +0 -60
  430. package/src/models/operations/updateaddressdetail.ts +0 -70
  431. package/src/models/operations/updatecart.ts +0 -68
  432. package/src/models/operations/updateshippingmethod.ts +0 -70
  433. package/src/sdk/carts.ts +11 -11
  434. package/src/sdk/catalog.ts +10 -10
  435. package/src/sdk/customers.ts +5 -5
  436. package/src/sdk/orders.ts +6 -6
  437. package/src/sdk/shipping.ts +1 -1
  438. package/esm/models/components/badrequest.d.ts.map +0 -1
  439. package/esm/models/components/badrequest.js.map +0 -1
  440. package/esm/models/components/notfound.d.ts.map +0 -1
  441. package/esm/models/components/notfound.js.map +0 -1
  442. package/esm/models/components/unauthorized.d.ts.map +0 -1
  443. package/esm/models/components/unauthorized.js.map +0 -1
@@ -18,6 +18,7 @@ import {
18
18
  RequestTimeoutError,
19
19
  UnexpectedClientError,
20
20
  } from "../models/errors/httpclienterrors.js";
21
+ import * as errors from "../models/errors/index.js";
21
22
  import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
22
23
  import * as operations from "../models/operations/index.js";
23
24
  import { APICall, APIPromise } from "../types/async.js";
@@ -35,7 +36,9 @@ export function ordersGetOrderDetail(
35
36
  options?: RequestOptions,
36
37
  ): APIPromise<
37
38
  Result<
38
- operations.GetOrderDetailResponse,
39
+ operations.GetOrderDetailResponseBody,
40
+ | errors.Unauthorized
41
+ | errors.NotFound
39
42
  | CeError
40
43
  | SDKValidationError
41
44
  | UnexpectedClientError
@@ -59,7 +62,9 @@ async function $do(
59
62
  ): Promise<
60
63
  [
61
64
  Result<
62
- operations.GetOrderDetailResponse,
65
+ operations.GetOrderDetailResponseBody,
66
+ | errors.Unauthorized
67
+ | errors.NotFound
63
68
  | CeError
64
69
  | SDKValidationError
65
70
  | UnexpectedClientError
@@ -129,7 +134,7 @@ async function $do(
129
134
 
130
135
  const doResult = await client._do(req, {
131
136
  context,
132
- errorCodes: [],
137
+ errorCodes: ["401", "404", "4XX", "5XX"],
133
138
  retryConfig: context.retryConfig,
134
139
  retryCodes: context.retryCodes,
135
140
  });
@@ -138,8 +143,14 @@ async function $do(
138
143
  }
139
144
  const response = doResult.value;
140
145
 
146
+ const responseFields = {
147
+ HttpMeta: { Response: response, Request: req },
148
+ };
149
+
141
150
  const [result] = await M.match<
142
- operations.GetOrderDetailResponse,
151
+ operations.GetOrderDetailResponseBody,
152
+ | errors.Unauthorized
153
+ | errors.NotFound
143
154
  | CeError
144
155
  | SDKValidationError
145
156
  | UnexpectedClientError
@@ -148,10 +159,12 @@ async function $do(
148
159
  | RequestTimeoutError
149
160
  | ConnectionError
150
161
  >(
151
- M.json(200, operations.GetOrderDetailResponse$inboundSchema),
152
- M.json(401, operations.GetOrderDetailResponse$inboundSchema),
153
- M.json(404, operations.GetOrderDetailResponse$inboundSchema),
154
- )(response);
162
+ M.json(200, operations.GetOrderDetailResponseBody$inboundSchema),
163
+ M.jsonErr(401, errors.Unauthorized$inboundSchema),
164
+ M.jsonErr(404, errors.NotFound$inboundSchema),
165
+ M.fail("4XX"),
166
+ M.fail("5XX"),
167
+ )(response, { extraFields: responseFields });
155
168
  if (!result.ok) {
156
169
  return [result, { status: "complete", request: req, response }];
157
170
  }
@@ -129,7 +129,7 @@ async function $do(
129
129
 
130
130
  const doResult = await client._do(req, {
131
131
  context,
132
- errorCodes: [],
132
+ errorCodes: ["4XX", "5XX"],
133
133
  retryConfig: context.retryConfig,
134
134
  retryCodes: context.retryCodes,
135
135
  });
@@ -149,6 +149,8 @@ async function $do(
149
149
  | ConnectionError
150
150
  >(
151
151
  M.json(200, operations.GetPaymentStatusResponseBody$inboundSchema),
152
+ M.fail("4XX"),
153
+ M.fail("5XX"),
152
154
  )(response);
153
155
  if (!result.ok) {
154
156
  return [result, { status: "complete", request: req, response }];
@@ -18,6 +18,7 @@ import {
18
18
  RequestTimeoutError,
19
19
  UnexpectedClientError,
20
20
  } from "../models/errors/httpclienterrors.js";
21
+ import * as errors from "../models/errors/index.js";
21
22
  import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
22
23
  import * as operations from "../models/operations/index.js";
23
24
  import { APICall, APIPromise } from "../types/async.js";
@@ -35,7 +36,9 @@ export function ordersListOrderShipments(
35
36
  options?: RequestOptions,
36
37
  ): APIPromise<
37
38
  Result<
38
- operations.ListOrderShipmentsResponse,
39
+ operations.ListOrderShipmentsResponseBody,
40
+ | errors.Unauthorized
41
+ | errors.NotFound
39
42
  | CeError
40
43
  | SDKValidationError
41
44
  | UnexpectedClientError
@@ -59,7 +62,9 @@ async function $do(
59
62
  ): Promise<
60
63
  [
61
64
  Result<
62
- operations.ListOrderShipmentsResponse,
65
+ operations.ListOrderShipmentsResponseBody,
66
+ | errors.Unauthorized
67
+ | errors.NotFound
63
68
  | CeError
64
69
  | SDKValidationError
65
70
  | UnexpectedClientError
@@ -129,7 +134,7 @@ async function $do(
129
134
 
130
135
  const doResult = await client._do(req, {
131
136
  context,
132
- errorCodes: [],
137
+ errorCodes: ["401", "404", "4XX", "5XX"],
133
138
  retryConfig: context.retryConfig,
134
139
  retryCodes: context.retryCodes,
135
140
  });
@@ -138,8 +143,14 @@ async function $do(
138
143
  }
139
144
  const response = doResult.value;
140
145
 
146
+ const responseFields = {
147
+ HttpMeta: { Response: response, Request: req },
148
+ };
149
+
141
150
  const [result] = await M.match<
142
- operations.ListOrderShipmentsResponse,
151
+ operations.ListOrderShipmentsResponseBody,
152
+ | errors.Unauthorized
153
+ | errors.NotFound
143
154
  | CeError
144
155
  | SDKValidationError
145
156
  | UnexpectedClientError
@@ -148,10 +159,12 @@ async function $do(
148
159
  | RequestTimeoutError
149
160
  | ConnectionError
150
161
  >(
151
- M.json(200, operations.ListOrderShipmentsResponse$inboundSchema),
152
- M.json(401, operations.ListOrderShipmentsResponse$inboundSchema),
153
- M.json(404, operations.ListOrderShipmentsResponse$inboundSchema),
154
- )(response);
162
+ M.json(200, operations.ListOrderShipmentsResponseBody$inboundSchema),
163
+ M.jsonErr(401, errors.Unauthorized$inboundSchema),
164
+ M.jsonErr(404, errors.NotFound$inboundSchema),
165
+ M.fail("4XX"),
166
+ M.fail("5XX"),
167
+ )(response, { extraFields: responseFields });
155
168
  if (!result.ok) {
156
169
  return [result, { status: "complete", request: req, response }];
157
170
  }
@@ -35,7 +35,7 @@ export function ordersListOrders(
35
35
  options?: RequestOptions,
36
36
  ): APIPromise<
37
37
  Result<
38
- operations.ListOrdersResponseBody | undefined,
38
+ operations.ListOrdersResponseBody,
39
39
  | CeError
40
40
  | SDKValidationError
41
41
  | UnexpectedClientError
@@ -59,7 +59,7 @@ async function $do(
59
59
  ): Promise<
60
60
  [
61
61
  Result<
62
- operations.ListOrdersResponseBody | undefined,
62
+ operations.ListOrdersResponseBody,
63
63
  | CeError
64
64
  | SDKValidationError
65
65
  | UnexpectedClientError
@@ -131,7 +131,7 @@ async function $do(
131
131
 
132
132
  const doResult = await client._do(req, {
133
133
  context,
134
- errorCodes: [],
134
+ errorCodes: ["401", "4XX", "5XX"],
135
135
  retryConfig: context.retryConfig,
136
136
  retryCodes: context.retryCodes,
137
137
  });
@@ -141,7 +141,7 @@ async function $do(
141
141
  const response = doResult.value;
142
142
 
143
143
  const [result] = await M.match<
144
- operations.ListOrdersResponseBody | undefined,
144
+ operations.ListOrdersResponseBody,
145
145
  | CeError
146
146
  | SDKValidationError
147
147
  | UnexpectedClientError
@@ -150,8 +150,9 @@ async function $do(
150
150
  | RequestTimeoutError
151
151
  | ConnectionError
152
152
  >(
153
- M.json(200, operations.ListOrdersResponseBody$inboundSchema.optional()),
154
- M.nil(401, operations.ListOrdersResponseBody$inboundSchema.optional()),
153
+ M.json(200, operations.ListOrdersResponseBody$inboundSchema),
154
+ M.fail([401, "4XX"]),
155
+ M.fail("5XX"),
155
156
  )(response);
156
157
  if (!result.ok) {
157
158
  return [result, { status: "complete", request: req, response }];
@@ -18,6 +18,7 @@ import {
18
18
  RequestTimeoutError,
19
19
  UnexpectedClientError,
20
20
  } from "../models/errors/httpclienterrors.js";
21
+ import * as errors from "../models/errors/index.js";
21
22
  import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
22
23
  import * as operations from "../models/operations/index.js";
23
24
  import { APICall, APIPromise } from "../types/async.js";
@@ -35,7 +36,10 @@ export function ordersRetryOrderPayment(
35
36
  options?: RequestOptions,
36
37
  ): APIPromise<
37
38
  Result<
38
- operations.RetryOrderPaymentResponse,
39
+ operations.RetryOrderPaymentResponseBody,
40
+ | errors.BadRequest
41
+ | errors.Unauthorized
42
+ | errors.NotFound
39
43
  | CeError
40
44
  | SDKValidationError
41
45
  | UnexpectedClientError
@@ -59,7 +63,10 @@ async function $do(
59
63
  ): Promise<
60
64
  [
61
65
  Result<
62
- operations.RetryOrderPaymentResponse,
66
+ operations.RetryOrderPaymentResponseBody,
67
+ | errors.BadRequest
68
+ | errors.Unauthorized
69
+ | errors.NotFound
63
70
  | CeError
64
71
  | SDKValidationError
65
72
  | UnexpectedClientError
@@ -130,7 +137,7 @@ async function $do(
130
137
 
131
138
  const doResult = await client._do(req, {
132
139
  context,
133
- errorCodes: [],
140
+ errorCodes: ["400", "401", "404", "4XX", "5XX"],
134
141
  retryConfig: context.retryConfig,
135
142
  retryCodes: context.retryCodes,
136
143
  });
@@ -139,8 +146,15 @@ async function $do(
139
146
  }
140
147
  const response = doResult.value;
141
148
 
149
+ const responseFields = {
150
+ HttpMeta: { Response: response, Request: req },
151
+ };
152
+
142
153
  const [result] = await M.match<
143
- operations.RetryOrderPaymentResponse,
154
+ operations.RetryOrderPaymentResponseBody,
155
+ | errors.BadRequest
156
+ | errors.Unauthorized
157
+ | errors.NotFound
144
158
  | CeError
145
159
  | SDKValidationError
146
160
  | UnexpectedClientError
@@ -149,11 +163,13 @@ async function $do(
149
163
  | RequestTimeoutError
150
164
  | ConnectionError
151
165
  >(
152
- M.json(200, operations.RetryOrderPaymentResponse$inboundSchema),
153
- M.json(400, operations.RetryOrderPaymentResponse$inboundSchema),
154
- M.json(401, operations.RetryOrderPaymentResponse$inboundSchema),
155
- M.json(404, operations.RetryOrderPaymentResponse$inboundSchema),
156
- )(response);
166
+ M.json(200, operations.RetryOrderPaymentResponseBody$inboundSchema),
167
+ M.jsonErr(400, errors.BadRequest$inboundSchema),
168
+ M.jsonErr(401, errors.Unauthorized$inboundSchema),
169
+ M.jsonErr(404, errors.NotFound$inboundSchema),
170
+ M.fail("4XX"),
171
+ M.fail("5XX"),
172
+ )(response, { extraFields: responseFields });
157
173
  if (!result.ok) {
158
174
  return [result, { status: "complete", request: req, response }];
159
175
  }
@@ -18,6 +18,7 @@ import {
18
18
  RequestTimeoutError,
19
19
  UnexpectedClientError,
20
20
  } from "../models/errors/httpclienterrors.js";
21
+ import * as errors from "../models/errors/index.js";
21
22
  import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
22
23
  import * as operations from "../models/operations/index.js";
23
24
  import { APICall, APIPromise } from "../types/async.js";
@@ -35,7 +36,8 @@ export function shippingCheckDeliveryAvailability(
35
36
  options?: RequestOptions,
36
37
  ): APIPromise<
37
38
  Result<
38
- operations.CheckDeliveryAvailabilityResponse,
39
+ operations.CheckDeliveryAvailabilityResponseBody,
40
+ | errors.Unauthorized
39
41
  | CeError
40
42
  | SDKValidationError
41
43
  | UnexpectedClientError
@@ -59,7 +61,8 @@ async function $do(
59
61
  ): Promise<
60
62
  [
61
63
  Result<
62
- operations.CheckDeliveryAvailabilityResponse,
64
+ operations.CheckDeliveryAvailabilityResponseBody,
65
+ | errors.Unauthorized
63
66
  | CeError
64
67
  | SDKValidationError
65
68
  | UnexpectedClientError
@@ -132,7 +135,7 @@ async function $do(
132
135
 
133
136
  const doResult = await client._do(req, {
134
137
  context,
135
- errorCodes: [],
138
+ errorCodes: ["401", "4XX", "5XX"],
136
139
  retryConfig: context.retryConfig,
137
140
  retryCodes: context.retryCodes,
138
141
  });
@@ -141,8 +144,13 @@ async function $do(
141
144
  }
142
145
  const response = doResult.value;
143
146
 
147
+ const responseFields = {
148
+ HttpMeta: { Response: response, Request: req },
149
+ };
150
+
144
151
  const [result] = await M.match<
145
- operations.CheckDeliveryAvailabilityResponse,
152
+ operations.CheckDeliveryAvailabilityResponseBody,
153
+ | errors.Unauthorized
146
154
  | CeError
147
155
  | SDKValidationError
148
156
  | UnexpectedClientError
@@ -151,9 +159,11 @@ async function $do(
151
159
  | RequestTimeoutError
152
160
  | ConnectionError
153
161
  >(
154
- M.json(200, operations.CheckDeliveryAvailabilityResponse$inboundSchema),
155
- M.json(401, operations.CheckDeliveryAvailabilityResponse$inboundSchema),
156
- )(response);
162
+ M.json(200, operations.CheckDeliveryAvailabilityResponseBody$inboundSchema),
163
+ M.jsonErr(401, errors.Unauthorized$inboundSchema),
164
+ M.fail("4XX"),
165
+ M.fail("5XX"),
166
+ )(response, { extraFields: responseFields });
157
167
  if (!result.ok) {
158
168
  return [result, { status: "complete", request: req, response }];
159
169
  }
@@ -128,7 +128,7 @@ async function $do(
128
128
 
129
129
  const doResult = await client._do(req, {
130
130
  context,
131
- errorCodes: [],
131
+ errorCodes: ["4XX", "5XX"],
132
132
  retryConfig: context.retryConfig,
133
133
  retryCodes: context.retryCodes,
134
134
  });
@@ -148,6 +148,8 @@ async function $do(
148
148
  | ConnectionError
149
149
  >(
150
150
  M.json(200, operations.ShippingMethodsResponseBody$inboundSchema),
151
+ M.fail("4XX"),
152
+ M.fail("5XX"),
151
153
  )(response);
152
154
  if (!result.ok) {
153
155
  return [result, { status: "complete", request: req, response }];
package/src/lib/config.ts CHANGED
@@ -76,7 +76,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
76
76
  export const SDK_METADATA = {
77
77
  language: "typescript",
78
78
  openapiDocVersion: "1.0",
79
- sdkVersion: "0.11.0",
80
- genVersion: "2.605.6",
81
- userAgent: "speakeasy-sdk/typescript 0.11.0 2.605.6 1.0 ce-storefront",
79
+ sdkVersion: "0.11.2",
80
+ genVersion: "2.607.0",
81
+ userAgent: "speakeasy-sdk/typescript 0.11.2 2.607.0 1.0 ce-storefront",
82
82
  } as const;
@@ -151,9 +151,12 @@ export type Cart = {
151
151
  shippingProviderName: string | null;
152
152
  courierCompanyId: string | null;
153
153
  courierCompanyName: string | null;
154
- handlingFee: number;
155
- handlingFeeTaxAmount: number;
156
- handlingFeeIncludingTax: number;
154
+ /**
155
+ * The additional charge applied to cover the costs associated with processing, packaging, and handling an order. This fee is separate from shipping charges and may include materials, or special handling requirements.
156
+ */
157
+ handlingChargeExcludingTax: number;
158
+ handlingChargeTaxAmount: number;
159
+ handlingChargeIncludingTax: number;
157
160
  /**
158
161
  * Total tax amount for the entire cart.
159
162
  */
@@ -455,9 +458,9 @@ export const Cart$inboundSchema: z.ZodType<Cart, z.ZodTypeDef, unknown> = z
455
458
  shipping_provider_name: z.nullable(z.string()),
456
459
  courier_company_id: z.nullable(z.string()),
457
460
  courier_company_name: z.nullable(z.string()),
458
- handling_fee: z.number(),
459
- handling_fee_tax_amount: z.number(),
460
- handling_fee_including_tax: z.number(),
461
+ handling_charge_excluding_tax: z.number(),
462
+ handling_charge_tax_amount: z.number(),
463
+ handling_charge_including_tax: z.number(),
461
464
  total_tax: z.number(),
462
465
  grand_total: z.number(),
463
466
  credit_balance_used: z.number(),
@@ -501,9 +504,9 @@ export const Cart$inboundSchema: z.ZodType<Cart, z.ZodTypeDef, unknown> = z
501
504
  "shipping_provider_name": "shippingProviderName",
502
505
  "courier_company_id": "courierCompanyId",
503
506
  "courier_company_name": "courierCompanyName",
504
- "handling_fee": "handlingFee",
505
- "handling_fee_tax_amount": "handlingFeeTaxAmount",
506
- "handling_fee_including_tax": "handlingFeeIncludingTax",
507
+ "handling_charge_excluding_tax": "handlingChargeExcludingTax",
508
+ "handling_charge_tax_amount": "handlingChargeTaxAmount",
509
+ "handling_charge_including_tax": "handlingChargeIncludingTax",
507
510
  "total_tax": "totalTax",
508
511
  "grand_total": "grandTotal",
509
512
  "credit_balance_used": "creditBalanceUsed",
@@ -549,9 +552,9 @@ export type Cart$Outbound = {
549
552
  shipping_provider_name: string | null;
550
553
  courier_company_id: string | null;
551
554
  courier_company_name: string | null;
552
- handling_fee: number;
553
- handling_fee_tax_amount: number;
554
- handling_fee_including_tax: number;
555
+ handling_charge_excluding_tax: number;
556
+ handling_charge_tax_amount: number;
557
+ handling_charge_including_tax: number;
555
558
  total_tax: number;
556
559
  grand_total: number;
557
560
  credit_balance_used: number;
@@ -599,9 +602,9 @@ export const Cart$outboundSchema: z.ZodType<Cart$Outbound, z.ZodTypeDef, Cart> =
599
602
  shippingProviderName: z.nullable(z.string()),
600
603
  courierCompanyId: z.nullable(z.string()),
601
604
  courierCompanyName: z.nullable(z.string()),
602
- handlingFee: z.number(),
603
- handlingFeeTaxAmount: z.number(),
604
- handlingFeeIncludingTax: z.number(),
605
+ handlingChargeExcludingTax: z.number(),
606
+ handlingChargeTaxAmount: z.number(),
607
+ handlingChargeIncludingTax: z.number(),
605
608
  totalTax: z.number(),
606
609
  grandTotal: z.number(),
607
610
  creditBalanceUsed: z.number(),
@@ -643,9 +646,9 @@ export const Cart$outboundSchema: z.ZodType<Cart$Outbound, z.ZodTypeDef, Cart> =
643
646
  shippingProviderName: "shipping_provider_name",
644
647
  courierCompanyId: "courier_company_id",
645
648
  courierCompanyName: "courier_company_name",
646
- handlingFee: "handling_fee",
647
- handlingFeeTaxAmount: "handling_fee_tax_amount",
648
- handlingFeeIncludingTax: "handling_fee_including_tax",
649
+ handlingChargeExcludingTax: "handling_charge_excluding_tax",
650
+ handlingChargeTaxAmount: "handling_charge_tax_amount",
651
+ handlingChargeIncludingTax: "handling_charge_including_tax",
649
652
  totalTax: "total_tax",
650
653
  grandTotal: "grand_total",
651
654
  creditBalanceUsed: "credit_balance_used",
@@ -107,7 +107,15 @@ export type CartItem = {
107
107
  /**
108
108
  * Additional cost for shipping associated with the product.
109
109
  */
110
- shippingAdditionalCost: number | null;
110
+ handlingChargeExcludingTax: number;
111
+ /**
112
+ * Additional cost for shipping associated with the product.
113
+ */
114
+ handlingChargeTaxRate: number;
115
+ /**
116
+ * Additional cost for shipping associated with the product.
117
+ */
118
+ handlingChargeIncludingTax: number;
111
119
  /**
112
120
  * Type of tax applied (e.g., GST).
113
121
  */
@@ -175,7 +183,9 @@ export const CartItem$inboundSchema: z.ZodType<
175
183
  min_order_quantity: z.number().int().default(1),
176
184
  max_order_quantity: z.nullable(z.number().int()),
177
185
  incremental_quantity: z.number().int().default(1),
178
- shipping_additional_cost: z.nullable(z.number()),
186
+ handling_charge_excluding_tax: z.number(),
187
+ handling_charge_tax_rate: z.number(),
188
+ handling_charge_including_tax: z.number(),
179
189
  tax_type: z.literal("GST").default("GST"),
180
190
  tax_rate: z.number(),
181
191
  tax_amount: z.number(),
@@ -204,7 +214,9 @@ export const CartItem$inboundSchema: z.ZodType<
204
214
  "min_order_quantity": "minOrderQuantity",
205
215
  "max_order_quantity": "maxOrderQuantity",
206
216
  "incremental_quantity": "incrementalQuantity",
207
- "shipping_additional_cost": "shippingAdditionalCost",
217
+ "handling_charge_excluding_tax": "handlingChargeExcludingTax",
218
+ "handling_charge_tax_rate": "handlingChargeTaxRate",
219
+ "handling_charge_including_tax": "handlingChargeIncludingTax",
208
220
  "tax_type": "taxType",
209
221
  "tax_rate": "taxRate",
210
222
  "tax_amount": "taxAmount",
@@ -238,7 +250,9 @@ export type CartItem$Outbound = {
238
250
  min_order_quantity: number;
239
251
  max_order_quantity: number | null;
240
252
  incremental_quantity: number;
241
- shipping_additional_cost: number | null;
253
+ handling_charge_excluding_tax: number;
254
+ handling_charge_tax_rate: number;
255
+ handling_charge_including_tax: number;
242
256
  tax_type: "GST";
243
257
  tax_rate: number;
244
258
  tax_amount: number;
@@ -276,7 +290,9 @@ export const CartItem$outboundSchema: z.ZodType<
276
290
  minOrderQuantity: z.number().int().default(1),
277
291
  maxOrderQuantity: z.nullable(z.number().int()),
278
292
  incrementalQuantity: z.number().int().default(1),
279
- shippingAdditionalCost: z.nullable(z.number()),
293
+ handlingChargeExcludingTax: z.number(),
294
+ handlingChargeTaxRate: z.number(),
295
+ handlingChargeIncludingTax: z.number(),
280
296
  taxType: z.literal("GST").default("GST" as const),
281
297
  taxRate: z.number(),
282
298
  taxAmount: z.number(),
@@ -305,7 +321,9 @@ export const CartItem$outboundSchema: z.ZodType<
305
321
  minOrderQuantity: "min_order_quantity",
306
322
  maxOrderQuantity: "max_order_quantity",
307
323
  incrementalQuantity: "incremental_quantity",
308
- shippingAdditionalCost: "shipping_additional_cost",
324
+ handlingChargeExcludingTax: "handling_charge_excluding_tax",
325
+ handlingChargeTaxRate: "handling_charge_tax_rate",
326
+ handlingChargeIncludingTax: "handling_charge_including_tax",
309
327
  taxType: "tax_type",
310
328
  taxRate: "tax_rate",
311
329
  taxAmount: "tax_amount",
@@ -4,7 +4,6 @@
4
4
 
5
5
  export * from "./anonymoususer.js";
6
6
  export * from "./associatedoption.js";
7
- export * from "./badrequest.js";
8
7
  export * from "./banktransfer.js";
9
8
  export * from "./booleanattribute.js";
10
9
  export * from "./cardpayment.js";
@@ -28,7 +27,6 @@ export * from "./juspaypaymentgatewayparams.js";
28
27
  export * from "./juspaypaymentinfo.js";
29
28
  export * from "./multiselectattribute.js";
30
29
  export * from "./netbankingpayment.js";
31
- export * from "./notfound.js";
32
30
  export * from "./notificationchannelpreferences.js";
33
31
  export * from "./notificationpreferences.js";
34
32
  export * from "./numberattribute.js";
@@ -61,7 +59,6 @@ export * from "./shipmentitem.js";
61
59
  export * from "./singleselectattribute.js";
62
60
  export * from "./singleselectoption.js";
63
61
  export * from "./textattribute.js";
64
- export * from "./unauthorized.js";
65
62
  export * from "./updatecartitem.js";
66
63
  export * from "./upipayment.js";
67
64
  export * from "./user.js";
@@ -5,7 +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 { SDKValidationError } from "../errors/sdkvalidationerror.js";
8
+ import { SDKValidationError } from "./sdkvalidationerror.js";
9
9
 
10
10
  export type ErrorT = {
11
11
  fieldname?: Array<string> | undefined;
@@ -14,13 +14,39 @@ export type ErrorT = {
14
14
  /**
15
15
  * Bad request
16
16
  */
17
- export type BadRequest = {
17
+ export type BadRequestData = {
18
18
  message?: string | undefined;
19
19
  success?: boolean | undefined;
20
20
  code?: string | undefined;
21
21
  error?: ErrorT | undefined;
22
22
  };
23
23
 
24
+ /**
25
+ * Bad request
26
+ */
27
+ export class BadRequest extends Error {
28
+ success?: boolean | undefined;
29
+ code?: string | undefined;
30
+ error?: ErrorT | undefined;
31
+
32
+ /** The original data that was passed to this error instance. */
33
+ data$: BadRequestData;
34
+
35
+ constructor(err: BadRequestData) {
36
+ const message = "message" in err && typeof err.message === "string"
37
+ ? err.message
38
+ : `API error occurred: ${JSON.stringify(err)}`;
39
+ super(message);
40
+ this.data$ = err;
41
+
42
+ if (err.success != null) this.success = err.success;
43
+ if (err.code != null) this.code = err.code;
44
+ if (err.error != null) this.error = err.error;
45
+
46
+ this.name = "BadRequest";
47
+ }
48
+ }
49
+
24
50
  /** @internal */
25
51
  export const ErrorT$inboundSchema: z.ZodType<ErrorT, z.ZodTypeDef, unknown> = z
26
52
  .object({
@@ -78,7 +104,10 @@ export const BadRequest$inboundSchema: z.ZodType<
78
104
  success: z.boolean().optional(),
79
105
  code: z.string().optional(),
80
106
  error: z.lazy(() => ErrorT$inboundSchema).optional(),
81
- });
107
+ })
108
+ .transform((v) => {
109
+ return new BadRequest(v);
110
+ });
82
111
 
83
112
  /** @internal */
84
113
  export type BadRequest$Outbound = {
@@ -93,12 +122,14 @@ export const BadRequest$outboundSchema: z.ZodType<
93
122
  BadRequest$Outbound,
94
123
  z.ZodTypeDef,
95
124
  BadRequest
96
- > = z.object({
97
- message: z.string().optional(),
98
- success: z.boolean().optional(),
99
- code: z.string().optional(),
100
- error: z.lazy(() => ErrorT$outboundSchema).optional(),
101
- });
125
+ > = z.instanceof(BadRequest)
126
+ .transform(v => v.data$)
127
+ .pipe(z.object({
128
+ message: z.string().optional(),
129
+ success: z.boolean().optional(),
130
+ code: z.string().optional(),
131
+ error: z.lazy(() => ErrorT$outboundSchema).optional(),
132
+ }));
102
133
 
103
134
  /**
104
135
  * @internal
@@ -112,17 +143,3 @@ export namespace BadRequest$ {
112
143
  /** @deprecated use `BadRequest$Outbound` instead. */
113
144
  export type Outbound = BadRequest$Outbound;
114
145
  }
115
-
116
- export function badRequestToJSON(badRequest: BadRequest): string {
117
- return JSON.stringify(BadRequest$outboundSchema.parse(badRequest));
118
- }
119
-
120
- export function badRequestFromJSON(
121
- jsonString: string,
122
- ): SafeParseResult<BadRequest, SDKValidationError> {
123
- return safeParse(
124
- jsonString,
125
- (x) => BadRequest$inboundSchema.parse(JSON.parse(x)),
126
- `Failed to parse 'BadRequest' from JSON`,
127
- );
128
- }
@@ -2,6 +2,9 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
4
 
5
+ export * from "./badrequest.js";
5
6
  export * from "./ceerror.js";
6
7
  export * from "./httpclienterrors.js";
8
+ export * from "./notfound.js";
7
9
  export * from "./sdkvalidationerror.js";
10
+ export * from "./unauthorized.js";