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.
- package/README.md +28 -18
- package/docs/sdks/carts/README.md +69 -44
- package/docs/sdks/catalog/README.md +59 -40
- package/docs/sdks/customers/README.md +31 -20
- package/docs/sdks/orders/README.md +32 -20
- package/docs/sdks/shipping/README.md +5 -4
- package/esm/funcs/authGenerateOtp.js +2 -2
- package/esm/funcs/authGenerateOtp.js.map +1 -1
- package/esm/funcs/authGetAnonymousToken.js +2 -2
- package/esm/funcs/authGetAnonymousToken.js.map +1 -1
- package/esm/funcs/authGetUserDetail.js +2 -2
- package/esm/funcs/authGetUserDetail.js.map +1 -1
- package/esm/funcs/authLoginWithEmail.js +2 -2
- package/esm/funcs/authLoginWithEmail.js.map +1 -1
- package/esm/funcs/authLoginWithPhone.js +2 -2
- package/esm/funcs/authLoginWithPhone.js.map +1 -1
- package/esm/funcs/authLoginWithWhatsapp.js +2 -2
- package/esm/funcs/authLoginWithWhatsapp.js.map +1 -1
- package/esm/funcs/authLogout.js +2 -2
- package/esm/funcs/authLogout.js.map +1 -1
- package/esm/funcs/authRefreshToken.js +2 -2
- package/esm/funcs/authRefreshToken.js.map +1 -1
- package/esm/funcs/authUpdateUser.js +2 -2
- package/esm/funcs/authUpdateUser.js.map +1 -1
- package/esm/funcs/authVerifyOtp.js +2 -2
- package/esm/funcs/authVerifyOtp.js.map +1 -1
- package/esm/funcs/cartsAddShippingMethod.d.ts +2 -1
- package/esm/funcs/cartsAddShippingMethod.d.ts.map +1 -1
- package/esm/funcs/cartsAddShippingMethod.js +6 -2
- package/esm/funcs/cartsAddShippingMethod.js.map +1 -1
- package/esm/funcs/cartsApplyCoupon.d.ts +2 -1
- package/esm/funcs/cartsApplyCoupon.d.ts.map +1 -1
- package/esm/funcs/cartsApplyCoupon.js +6 -2
- package/esm/funcs/cartsApplyCoupon.js.map +1 -1
- package/esm/funcs/cartsCreateCart.js +2 -2
- package/esm/funcs/cartsCreateCart.js.map +1 -1
- package/esm/funcs/cartsCreateCartAddress.d.ts +2 -1
- package/esm/funcs/cartsCreateCartAddress.d.ts.map +1 -1
- package/esm/funcs/cartsCreateCartAddress.js +6 -2
- package/esm/funcs/cartsCreateCartAddress.js.map +1 -1
- package/esm/funcs/cartsDeleteCart.d.ts +2 -1
- package/esm/funcs/cartsDeleteCart.d.ts.map +1 -1
- package/esm/funcs/cartsDeleteCart.js +6 -2
- package/esm/funcs/cartsDeleteCart.js.map +1 -1
- package/esm/funcs/cartsGetCart.d.ts +2 -1
- package/esm/funcs/cartsGetCart.d.ts.map +1 -1
- package/esm/funcs/cartsGetCart.js +6 -2
- package/esm/funcs/cartsGetCart.js.map +1 -1
- package/esm/funcs/cartsGetUserCart.d.ts +2 -1
- package/esm/funcs/cartsGetUserCart.d.ts.map +1 -1
- package/esm/funcs/cartsGetUserCart.js +6 -2
- package/esm/funcs/cartsGetUserCart.js.map +1 -1
- package/esm/funcs/cartsRedeemLoyaltyPoints.d.ts +2 -1
- package/esm/funcs/cartsRedeemLoyaltyPoints.d.ts.map +1 -1
- package/esm/funcs/cartsRedeemLoyaltyPoints.js +6 -2
- package/esm/funcs/cartsRedeemLoyaltyPoints.js.map +1 -1
- package/esm/funcs/cartsRemoveCoupon.d.ts +2 -1
- package/esm/funcs/cartsRemoveCoupon.d.ts.map +1 -1
- package/esm/funcs/cartsRemoveCoupon.js +6 -2
- package/esm/funcs/cartsRemoveCoupon.js.map +1 -1
- package/esm/funcs/cartsRemoveLoyaltyPoints.d.ts +2 -1
- package/esm/funcs/cartsRemoveLoyaltyPoints.d.ts.map +1 -1
- package/esm/funcs/cartsRemoveLoyaltyPoints.js +6 -2
- package/esm/funcs/cartsRemoveLoyaltyPoints.js.map +1 -1
- package/esm/funcs/cartsRemoveUserCart.d.ts +2 -1
- package/esm/funcs/cartsRemoveUserCart.d.ts.map +1 -1
- package/esm/funcs/cartsRemoveUserCart.js +6 -2
- package/esm/funcs/cartsRemoveUserCart.js.map +1 -1
- package/esm/funcs/cartsUpdateCart.d.ts +2 -1
- package/esm/funcs/cartsUpdateCart.d.ts.map +1 -1
- package/esm/funcs/cartsUpdateCart.js +6 -2
- package/esm/funcs/cartsUpdateCart.js.map +1 -1
- package/esm/funcs/catalogGetProductDetail.d.ts +2 -1
- package/esm/funcs/catalogGetProductDetail.d.ts.map +1 -1
- package/esm/funcs/catalogGetProductDetail.js +6 -2
- package/esm/funcs/catalogGetProductDetail.js.map +1 -1
- package/esm/funcs/catalogGetVariantDetail.d.ts +2 -1
- package/esm/funcs/catalogGetVariantDetail.d.ts.map +1 -1
- package/esm/funcs/catalogGetVariantDetail.js +6 -2
- package/esm/funcs/catalogGetVariantDetail.js.map +1 -1
- package/esm/funcs/catalogListCategories.js +2 -2
- package/esm/funcs/catalogListCategories.js.map +1 -1
- package/esm/funcs/catalogListCrosssellProducts.d.ts +2 -1
- package/esm/funcs/catalogListCrosssellProducts.d.ts.map +1 -1
- package/esm/funcs/catalogListCrosssellProducts.js +6 -2
- package/esm/funcs/catalogListCrosssellProducts.js.map +1 -1
- package/esm/funcs/catalogListProductReviews.d.ts +2 -1
- package/esm/funcs/catalogListProductReviews.d.ts.map +1 -1
- package/esm/funcs/catalogListProductReviews.js +6 -2
- package/esm/funcs/catalogListProductReviews.js.map +1 -1
- package/esm/funcs/catalogListProductVariants.d.ts +2 -1
- package/esm/funcs/catalogListProductVariants.d.ts.map +1 -1
- package/esm/funcs/catalogListProductVariants.js +6 -2
- package/esm/funcs/catalogListProductVariants.js.map +1 -1
- package/esm/funcs/catalogListProducts.d.ts +2 -1
- package/esm/funcs/catalogListProducts.d.ts.map +1 -1
- package/esm/funcs/catalogListProducts.js +6 -2
- package/esm/funcs/catalogListProducts.js.map +1 -1
- package/esm/funcs/catalogListSimilarProducts.d.ts +2 -1
- package/esm/funcs/catalogListSimilarProducts.d.ts.map +1 -1
- package/esm/funcs/catalogListSimilarProducts.js +6 -2
- package/esm/funcs/catalogListSimilarProducts.js.map +1 -1
- package/esm/funcs/catalogListSkus.d.ts +2 -1
- package/esm/funcs/catalogListSkus.d.ts.map +1 -1
- package/esm/funcs/catalogListSkus.js +6 -2
- package/esm/funcs/catalogListSkus.js.map +1 -1
- package/esm/funcs/catalogListUpsellProducts.d.ts +2 -1
- package/esm/funcs/catalogListUpsellProducts.d.ts.map +1 -1
- package/esm/funcs/catalogListUpsellProducts.js +6 -2
- package/esm/funcs/catalogListUpsellProducts.js.map +1 -1
- package/esm/funcs/catalogSearchProducts.d.ts +2 -1
- package/esm/funcs/catalogSearchProducts.d.ts.map +1 -1
- package/esm/funcs/catalogSearchProducts.js +6 -2
- package/esm/funcs/catalogSearchProducts.js.map +1 -1
- package/esm/funcs/commonListCountryPincodes.js +2 -2
- package/esm/funcs/commonListCountryPincodes.js.map +1 -1
- package/esm/funcs/customersCreateAddress.d.ts +2 -1
- package/esm/funcs/customersCreateAddress.d.ts.map +1 -1
- package/esm/funcs/customersCreateAddress.js +6 -2
- package/esm/funcs/customersCreateAddress.js.map +1 -1
- package/esm/funcs/customersDeleteAddress.d.ts +2 -1
- package/esm/funcs/customersDeleteAddress.d.ts.map +1 -1
- package/esm/funcs/customersDeleteAddress.js +6 -2
- package/esm/funcs/customersDeleteAddress.js.map +1 -1
- package/esm/funcs/customersGetAddressDetail.d.ts +2 -1
- package/esm/funcs/customersGetAddressDetail.d.ts.map +1 -1
- package/esm/funcs/customersGetAddressDetail.js +6 -2
- package/esm/funcs/customersGetAddressDetail.js.map +1 -1
- package/esm/funcs/customersGetLoyaltyDetails.d.ts +2 -1
- package/esm/funcs/customersGetLoyaltyDetails.d.ts.map +1 -1
- package/esm/funcs/customersGetLoyaltyDetails.js +6 -2
- package/esm/funcs/customersGetLoyaltyDetails.js.map +1 -1
- package/esm/funcs/customersListAddresses.js +2 -2
- package/esm/funcs/customersListAddresses.js.map +1 -1
- package/esm/funcs/customersListUserReviews.js +2 -2
- package/esm/funcs/customersListUserReviews.js.map +1 -1
- package/esm/funcs/customersUpdateAddressDetail.d.ts +2 -1
- package/esm/funcs/customersUpdateAddressDetail.d.ts.map +1 -1
- package/esm/funcs/customersUpdateAddressDetail.js +6 -2
- package/esm/funcs/customersUpdateAddressDetail.js.map +1 -1
- package/esm/funcs/ordersCancelOrder.d.ts +2 -1
- package/esm/funcs/ordersCancelOrder.d.ts.map +1 -1
- package/esm/funcs/ordersCancelOrder.js +6 -2
- package/esm/funcs/ordersCancelOrder.js.map +1 -1
- package/esm/funcs/ordersCreateOrder.d.ts +2 -1
- package/esm/funcs/ordersCreateOrder.d.ts.map +1 -1
- package/esm/funcs/ordersCreateOrder.js +6 -2
- package/esm/funcs/ordersCreateOrder.js.map +1 -1
- package/esm/funcs/ordersGetOrderDetail.d.ts +2 -1
- package/esm/funcs/ordersGetOrderDetail.d.ts.map +1 -1
- package/esm/funcs/ordersGetOrderDetail.js +6 -2
- package/esm/funcs/ordersGetOrderDetail.js.map +1 -1
- package/esm/funcs/ordersGetPaymentStatus.js +2 -2
- package/esm/funcs/ordersGetPaymentStatus.js.map +1 -1
- package/esm/funcs/ordersListOrderShipments.d.ts +2 -1
- package/esm/funcs/ordersListOrderShipments.d.ts.map +1 -1
- package/esm/funcs/ordersListOrderShipments.js +6 -2
- package/esm/funcs/ordersListOrderShipments.js.map +1 -1
- package/esm/funcs/ordersListOrders.d.ts +1 -1
- package/esm/funcs/ordersListOrders.d.ts.map +1 -1
- package/esm/funcs/ordersListOrders.js +2 -2
- package/esm/funcs/ordersListOrders.js.map +1 -1
- package/esm/funcs/ordersRetryOrderPayment.d.ts +2 -1
- package/esm/funcs/ordersRetryOrderPayment.d.ts.map +1 -1
- package/esm/funcs/ordersRetryOrderPayment.js +6 -2
- package/esm/funcs/ordersRetryOrderPayment.js.map +1 -1
- package/esm/funcs/shippingCheckDeliveryAvailability.d.ts +2 -1
- package/esm/funcs/shippingCheckDeliveryAvailability.d.ts.map +1 -1
- package/esm/funcs/shippingCheckDeliveryAvailability.js +6 -2
- package/esm/funcs/shippingCheckDeliveryAvailability.js.map +1 -1
- package/esm/funcs/shippingCheckServiceability.js +2 -2
- package/esm/funcs/shippingCheckServiceability.js.map +1 -1
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/models/components/cart.d.ts +9 -6
- package/esm/models/components/cart.d.ts.map +1 -1
- package/esm/models/components/cart.js +12 -12
- package/esm/models/components/cart.js.map +1 -1
- package/esm/models/components/cartitem.d.ts +12 -2
- package/esm/models/components/cartitem.d.ts.map +1 -1
- package/esm/models/components/cartitem.js +12 -4
- package/esm/models/components/cartitem.js.map +1 -1
- package/esm/models/components/index.d.ts +0 -3
- package/esm/models/components/index.d.ts.map +1 -1
- package/esm/models/components/index.js +0 -3
- package/esm/models/components/index.js.map +1 -1
- package/esm/models/{components → errors}/badrequest.d.ts +13 -4
- package/esm/models/errors/badrequest.d.ts.map +1 -0
- package/esm/models/{components → errors}/badrequest.js +26 -8
- package/esm/models/errors/badrequest.js.map +1 -0
- package/esm/models/errors/index.d.ts +3 -0
- package/esm/models/errors/index.d.ts.map +1 -1
- package/esm/models/errors/index.js +3 -0
- package/esm/models/errors/index.js.map +1 -1
- package/esm/models/{components → errors}/notfound.d.ts +11 -5
- package/esm/models/errors/notfound.d.ts.map +1 -0
- package/esm/models/{components → errors}/notfound.js +24 -9
- package/esm/models/errors/notfound.js.map +1 -0
- package/esm/models/{components → errors}/unauthorized.d.ts +13 -7
- package/esm/models/errors/unauthorized.d.ts.map +1 -0
- package/esm/models/{components → errors}/unauthorized.js +24 -9
- package/esm/models/errors/unauthorized.js.map +1 -0
- package/esm/models/operations/applycoupon.d.ts +0 -21
- package/esm/models/operations/applycoupon.d.ts.map +1 -1
- package/esm/models/operations/applycoupon.js +0 -29
- package/esm/models/operations/applycoupon.js.map +1 -1
- package/esm/models/operations/cancelorder.d.ts +0 -21
- package/esm/models/operations/cancelorder.d.ts.map +1 -1
- package/esm/models/operations/cancelorder.js +0 -29
- package/esm/models/operations/cancelorder.js.map +1 -1
- package/esm/models/operations/checkdeliveryavailability.d.ts +0 -22
- package/esm/models/operations/checkdeliveryavailability.d.ts.map +1 -1
- package/esm/models/operations/checkdeliveryavailability.js +0 -28
- package/esm/models/operations/checkdeliveryavailability.js.map +1 -1
- package/esm/models/operations/createaddress.d.ts +0 -21
- package/esm/models/operations/createaddress.d.ts.map +1 -1
- package/esm/models/operations/createaddress.js +0 -29
- package/esm/models/operations/createaddress.js.map +1 -1
- package/esm/models/operations/createcartaddress.d.ts +0 -21
- package/esm/models/operations/createcartaddress.d.ts.map +1 -1
- package/esm/models/operations/createcartaddress.js +0 -31
- package/esm/models/operations/createcartaddress.js.map +1 -1
- package/esm/models/operations/createorder.d.ts +0 -21
- package/esm/models/operations/createorder.d.ts.map +1 -1
- package/esm/models/operations/createorder.js +0 -31
- package/esm/models/operations/createorder.js.map +1 -1
- package/esm/models/operations/deleteaddress.d.ts +0 -22
- package/esm/models/operations/deleteaddress.d.ts.map +1 -1
- package/esm/models/operations/deleteaddress.js +0 -30
- package/esm/models/operations/deleteaddress.js.map +1 -1
- package/esm/models/operations/deletecart.d.ts +0 -22
- package/esm/models/operations/deletecart.d.ts.map +1 -1
- package/esm/models/operations/deletecart.js +0 -30
- package/esm/models/operations/deletecart.js.map +1 -1
- package/esm/models/operations/deleteusercart.d.ts +0 -22
- package/esm/models/operations/deleteusercart.d.ts.map +1 -1
- package/esm/models/operations/deleteusercart.js +0 -30
- package/esm/models/operations/deleteusercart.js.map +1 -1
- package/esm/models/operations/getaddressdetail.d.ts +0 -22
- package/esm/models/operations/getaddressdetail.d.ts.map +1 -1
- package/esm/models/operations/getaddressdetail.js +0 -30
- package/esm/models/operations/getaddressdetail.js.map +1 -1
- package/esm/models/operations/getcart.d.ts +0 -21
- package/esm/models/operations/getcart.d.ts.map +1 -1
- package/esm/models/operations/getcart.js +0 -29
- package/esm/models/operations/getcart.js.map +1 -1
- package/esm/models/operations/getloyaltydetails.d.ts +0 -21
- package/esm/models/operations/getloyaltydetails.d.ts.map +1 -1
- package/esm/models/operations/getloyaltydetails.js +0 -29
- package/esm/models/operations/getloyaltydetails.js.map +1 -1
- package/esm/models/operations/getorderdetail.d.ts +0 -21
- package/esm/models/operations/getorderdetail.d.ts.map +1 -1
- package/esm/models/operations/getorderdetail.js +0 -29
- package/esm/models/operations/getorderdetail.js.map +1 -1
- package/esm/models/operations/getproductdetail.d.ts +0 -21
- package/esm/models/operations/getproductdetail.d.ts.map +1 -1
- package/esm/models/operations/getproductdetail.js +0 -29
- package/esm/models/operations/getproductdetail.js.map +1 -1
- package/esm/models/operations/getusercart.d.ts +0 -21
- package/esm/models/operations/getusercart.d.ts.map +1 -1
- package/esm/models/operations/getusercart.js +0 -29
- package/esm/models/operations/getusercart.js.map +1 -1
- package/esm/models/operations/getvariantdetail.d.ts +0 -21
- package/esm/models/operations/getvariantdetail.d.ts.map +1 -1
- package/esm/models/operations/getvariantdetail.js +0 -29
- package/esm/models/operations/getvariantdetail.js.map +1 -1
- package/esm/models/operations/listcrosssellproducts.d.ts +0 -21
- package/esm/models/operations/listcrosssellproducts.d.ts.map +1 -1
- package/esm/models/operations/listcrosssellproducts.js +0 -29
- package/esm/models/operations/listcrosssellproducts.js.map +1 -1
- package/esm/models/operations/listordershipments.d.ts +0 -21
- package/esm/models/operations/listordershipments.d.ts.map +1 -1
- package/esm/models/operations/listordershipments.js +0 -29
- package/esm/models/operations/listordershipments.js.map +1 -1
- package/esm/models/operations/listproductreviews.d.ts +0 -21
- package/esm/models/operations/listproductreviews.d.ts.map +1 -1
- package/esm/models/operations/listproductreviews.js +0 -29
- package/esm/models/operations/listproductreviews.js.map +1 -1
- package/esm/models/operations/listproducts.d.ts +0 -21
- package/esm/models/operations/listproducts.d.ts.map +1 -1
- package/esm/models/operations/listproducts.js +0 -29
- package/esm/models/operations/listproducts.js.map +1 -1
- package/esm/models/operations/listproductvariants.d.ts +0 -21
- package/esm/models/operations/listproductvariants.d.ts.map +1 -1
- package/esm/models/operations/listproductvariants.js +0 -29
- package/esm/models/operations/listproductvariants.js.map +1 -1
- package/esm/models/operations/listsimilarproducts.d.ts +0 -21
- package/esm/models/operations/listsimilarproducts.d.ts.map +1 -1
- package/esm/models/operations/listsimilarproducts.js +0 -29
- package/esm/models/operations/listsimilarproducts.js.map +1 -1
- package/esm/models/operations/listskus.d.ts +0 -21
- package/esm/models/operations/listskus.d.ts.map +1 -1
- package/esm/models/operations/listskus.js +0 -29
- package/esm/models/operations/listskus.js.map +1 -1
- package/esm/models/operations/listupsellproducts.d.ts +0 -21
- package/esm/models/operations/listupsellproducts.d.ts.map +1 -1
- package/esm/models/operations/listupsellproducts.js +0 -29
- package/esm/models/operations/listupsellproducts.js.map +1 -1
- package/esm/models/operations/redeemloyaltypoints.d.ts +0 -21
- package/esm/models/operations/redeemloyaltypoints.d.ts.map +1 -1
- package/esm/models/operations/redeemloyaltypoints.js +0 -29
- package/esm/models/operations/redeemloyaltypoints.js.map +1 -1
- package/esm/models/operations/removecoupon.d.ts +0 -21
- package/esm/models/operations/removecoupon.d.ts.map +1 -1
- package/esm/models/operations/removecoupon.js +0 -29
- package/esm/models/operations/removecoupon.js.map +1 -1
- package/esm/models/operations/removeloyaltypoints.d.ts +0 -21
- package/esm/models/operations/removeloyaltypoints.d.ts.map +1 -1
- package/esm/models/operations/removeloyaltypoints.js +0 -29
- package/esm/models/operations/removeloyaltypoints.js.map +1 -1
- package/esm/models/operations/retryorderpayment.d.ts +0 -21
- package/esm/models/operations/retryorderpayment.d.ts.map +1 -1
- package/esm/models/operations/retryorderpayment.js +0 -31
- package/esm/models/operations/retryorderpayment.js.map +1 -1
- package/esm/models/operations/searchproducts.d.ts +0 -21
- package/esm/models/operations/searchproducts.d.ts.map +1 -1
- package/esm/models/operations/searchproducts.js +0 -27
- package/esm/models/operations/searchproducts.js.map +1 -1
- package/esm/models/operations/updateaddressdetail.d.ts +0 -21
- package/esm/models/operations/updateaddressdetail.d.ts.map +1 -1
- package/esm/models/operations/updateaddressdetail.js +0 -31
- package/esm/models/operations/updateaddressdetail.js.map +1 -1
- package/esm/models/operations/updatecart.d.ts +0 -21
- package/esm/models/operations/updatecart.d.ts.map +1 -1
- package/esm/models/operations/updatecart.js +0 -31
- package/esm/models/operations/updatecart.js.map +1 -1
- package/esm/models/operations/updateshippingmethod.d.ts +0 -21
- package/esm/models/operations/updateshippingmethod.d.ts.map +1 -1
- package/esm/models/operations/updateshippingmethod.js +0 -31
- package/esm/models/operations/updateshippingmethod.js.map +1 -1
- package/esm/sdk/carts.d.ts +11 -11
- package/esm/sdk/carts.d.ts.map +1 -1
- package/esm/sdk/catalog.d.ts +10 -10
- package/esm/sdk/catalog.d.ts.map +1 -1
- package/esm/sdk/customers.d.ts +5 -5
- package/esm/sdk/customers.d.ts.map +1 -1
- package/esm/sdk/orders.d.ts +6 -6
- package/esm/sdk/orders.d.ts.map +1 -1
- package/esm/sdk/shipping.d.ts +1 -1
- package/esm/sdk/shipping.d.ts.map +1 -1
- package/jsr.json +1 -1
- package/package.json +2 -2
- package/src/funcs/authGenerateOtp.ts +3 -1
- package/src/funcs/authGetAnonymousToken.ts +3 -1
- package/src/funcs/authGetUserDetail.ts +3 -1
- package/src/funcs/authLoginWithEmail.ts +3 -1
- package/src/funcs/authLoginWithPhone.ts +3 -1
- package/src/funcs/authLoginWithWhatsapp.ts +3 -1
- package/src/funcs/authLogout.ts +3 -1
- package/src/funcs/authRefreshToken.ts +3 -1
- package/src/funcs/authUpdateUser.ts +3 -1
- package/src/funcs/authVerifyOtp.ts +3 -1
- package/src/funcs/cartsAddShippingMethod.ts +25 -9
- package/src/funcs/cartsApplyCoupon.ts +21 -8
- package/src/funcs/cartsCreateCart.ts +3 -1
- package/src/funcs/cartsCreateCartAddress.ts +25 -9
- package/src/funcs/cartsDeleteCart.ts +21 -8
- package/src/funcs/cartsGetCart.ts +21 -8
- package/src/funcs/cartsGetUserCart.ts +21 -8
- package/src/funcs/cartsRedeemLoyaltyPoints.ts +21 -8
- package/src/funcs/cartsRemoveCoupon.ts +21 -9
- package/src/funcs/cartsRemoveLoyaltyPoints.ts +21 -18
- package/src/funcs/cartsRemoveUserCart.ts +21 -8
- package/src/funcs/cartsUpdateCart.ts +25 -9
- package/src/funcs/catalogGetProductDetail.ts +21 -8
- package/src/funcs/catalogGetVariantDetail.ts +21 -8
- package/src/funcs/catalogListCategories.ts +3 -1
- package/src/funcs/catalogListCrosssellProducts.ts +21 -8
- package/src/funcs/catalogListProductReviews.ts +21 -8
- package/src/funcs/catalogListProductVariants.ts +21 -8
- package/src/funcs/catalogListProducts.ts +21 -8
- package/src/funcs/catalogListSimilarProducts.ts +21 -8
- package/src/funcs/catalogListSkus.ts +21 -8
- package/src/funcs/catalogListUpsellProducts.ts +21 -8
- package/src/funcs/catalogSearchProducts.ts +17 -7
- package/src/funcs/commonListCountryPincodes.ts +3 -1
- package/src/funcs/customersCreateAddress.ts +21 -8
- package/src/funcs/customersDeleteAddress.ts +21 -8
- package/src/funcs/customersGetAddressDetail.ts +21 -8
- package/src/funcs/customersGetLoyaltyDetails.ts +21 -8
- package/src/funcs/customersListAddresses.ts +3 -1
- package/src/funcs/customersListUserReviews.ts +3 -1
- package/src/funcs/customersUpdateAddressDetail.ts +25 -9
- package/src/funcs/ordersCancelOrder.ts +21 -8
- package/src/funcs/ordersCreateOrder.ts +25 -9
- package/src/funcs/ordersGetOrderDetail.ts +21 -8
- package/src/funcs/ordersGetPaymentStatus.ts +3 -1
- package/src/funcs/ordersListOrderShipments.ts +21 -8
- package/src/funcs/ordersListOrders.ts +7 -6
- package/src/funcs/ordersRetryOrderPayment.ts +25 -9
- package/src/funcs/shippingCheckDeliveryAvailability.ts +17 -7
- package/src/funcs/shippingCheckServiceability.ts +3 -1
- package/src/lib/config.ts +3 -3
- package/src/models/components/cart.ts +21 -18
- package/src/models/components/cartitem.ts +24 -6
- package/src/models/components/index.ts +0 -3
- package/src/models/{components → errors}/badrequest.ts +40 -23
- package/src/models/errors/index.ts +3 -0
- package/src/models/{components → errors}/notfound.ts +36 -24
- package/src/models/{components → errors}/unauthorized.ts +38 -26
- package/src/models/operations/applycoupon.ts +0 -64
- package/src/models/operations/cancelorder.ts +0 -64
- package/src/models/operations/checkdeliveryavailability.ts +0 -64
- package/src/models/operations/createaddress.ts +0 -64
- package/src/models/operations/createcartaddress.ts +0 -68
- package/src/models/operations/createorder.ts +0 -68
- package/src/models/operations/deleteaddress.ts +0 -65
- package/src/models/operations/deletecart.ts +0 -65
- package/src/models/operations/deleteusercart.ts +0 -65
- package/src/models/operations/getaddressdetail.ts +0 -65
- package/src/models/operations/getcart.ts +0 -62
- package/src/models/operations/getloyaltydetails.ts +0 -64
- package/src/models/operations/getorderdetail.ts +0 -64
- package/src/models/operations/getproductdetail.ts +0 -64
- package/src/models/operations/getusercart.ts +0 -64
- package/src/models/operations/getvariantdetail.ts +0 -64
- package/src/models/operations/listcrosssellproducts.ts +0 -66
- package/src/models/operations/listordershipments.ts +0 -64
- package/src/models/operations/listproductreviews.ts +0 -64
- package/src/models/operations/listproducts.ts +0 -64
- package/src/models/operations/listproductvariants.ts +0 -66
- package/src/models/operations/listsimilarproducts.ts +0 -66
- package/src/models/operations/listskus.ts +0 -64
- package/src/models/operations/listupsellproducts.ts +0 -64
- package/src/models/operations/redeemloyaltypoints.ts +0 -66
- package/src/models/operations/removecoupon.ts +0 -64
- package/src/models/operations/removeloyaltypoints.ts +0 -66
- package/src/models/operations/retryorderpayment.ts +0 -68
- package/src/models/operations/searchproducts.ts +0 -60
- package/src/models/operations/updateaddressdetail.ts +0 -70
- package/src/models/operations/updatecart.ts +0 -68
- package/src/models/operations/updateshippingmethod.ts +0 -70
- package/src/sdk/carts.ts +11 -11
- package/src/sdk/catalog.ts +10 -10
- package/src/sdk/customers.ts +5 -5
- package/src/sdk/orders.ts +6 -6
- package/src/sdk/shipping.ts +1 -1
- package/esm/models/components/badrequest.d.ts.map +0 -1
- package/esm/models/components/badrequest.js.map +0 -1
- package/esm/models/components/notfound.d.ts.map +0 -1
- package/esm/models/components/notfound.js.map +0 -1
- package/esm/models/components/unauthorized.d.ts.map +0 -1
- 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.
|
|
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.
|
|
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.
|
|
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.
|
|
152
|
-
M.
|
|
153
|
-
M.
|
|
154
|
-
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
152
|
-
M.
|
|
153
|
-
M.
|
|
154
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
154
|
-
M.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
153
|
-
M.
|
|
154
|
-
M.
|
|
155
|
-
M.
|
|
156
|
-
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
155
|
-
M.
|
|
156
|
-
|
|
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.
|
|
80
|
-
genVersion: "2.
|
|
81
|
-
userAgent: "speakeasy-sdk/typescript 0.11.
|
|
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
|
-
|
|
155
|
-
|
|
156
|
-
|
|
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
|
-
|
|
459
|
-
|
|
460
|
-
|
|
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
|
-
"
|
|
505
|
-
"
|
|
506
|
-
"
|
|
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
|
-
|
|
553
|
-
|
|
554
|
-
|
|
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
|
-
|
|
603
|
-
|
|
604
|
-
|
|
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
|
-
|
|
647
|
-
|
|
648
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
"
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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 "
|
|
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
|
|
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.
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
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";
|