ce-storefront 0.13.3 → 0.14.1
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 +35 -28
- package/docs/sdks/catalog/README.md +7 -3
- package/esm/funcs/authGenerateOtp.d.ts +3 -2
- package/esm/funcs/authGenerateOtp.d.ts.map +1 -1
- package/esm/funcs/authGenerateOtp.js +1 -1
- package/esm/funcs/authGenerateOtp.js.map +1 -1
- package/esm/funcs/authGetAnonymousToken.d.ts +3 -2
- package/esm/funcs/authGetAnonymousToken.d.ts.map +1 -1
- package/esm/funcs/authGetAnonymousToken.js +1 -1
- package/esm/funcs/authGetAnonymousToken.js.map +1 -1
- package/esm/funcs/authGetUserDetail.d.ts +3 -2
- package/esm/funcs/authGetUserDetail.d.ts.map +1 -1
- package/esm/funcs/authGetUserDetail.js +1 -1
- package/esm/funcs/authGetUserDetail.js.map +1 -1
- package/esm/funcs/authLoginWithEmail.d.ts +3 -2
- package/esm/funcs/authLoginWithEmail.d.ts.map +1 -1
- package/esm/funcs/authLoginWithEmail.js +1 -1
- package/esm/funcs/authLoginWithEmail.js.map +1 -1
- package/esm/funcs/authLoginWithPhone.d.ts +3 -2
- package/esm/funcs/authLoginWithPhone.d.ts.map +1 -1
- package/esm/funcs/authLoginWithPhone.js +1 -1
- package/esm/funcs/authLoginWithPhone.js.map +1 -1
- package/esm/funcs/authLoginWithWhatsapp.d.ts +3 -2
- package/esm/funcs/authLoginWithWhatsapp.d.ts.map +1 -1
- package/esm/funcs/authLoginWithWhatsapp.js +1 -1
- package/esm/funcs/authLoginWithWhatsapp.js.map +1 -1
- package/esm/funcs/authLogout.d.ts +3 -2
- package/esm/funcs/authLogout.d.ts.map +1 -1
- package/esm/funcs/authLogout.js +1 -1
- package/esm/funcs/authLogout.js.map +1 -1
- package/esm/funcs/authRefreshToken.d.ts +3 -2
- package/esm/funcs/authRefreshToken.d.ts.map +1 -1
- package/esm/funcs/authRefreshToken.js +1 -1
- package/esm/funcs/authRefreshToken.js.map +1 -1
- package/esm/funcs/authUpdateUser.d.ts +3 -2
- package/esm/funcs/authUpdateUser.d.ts.map +1 -1
- package/esm/funcs/authUpdateUser.js +1 -1
- package/esm/funcs/authUpdateUser.js.map +1 -1
- package/esm/funcs/authVerifyOtp.d.ts +3 -2
- package/esm/funcs/authVerifyOtp.d.ts.map +1 -1
- package/esm/funcs/authVerifyOtp.js +1 -1
- package/esm/funcs/authVerifyOtp.js.map +1 -1
- package/esm/funcs/cartsAddShippingMethod.d.ts +3 -2
- package/esm/funcs/cartsAddShippingMethod.d.ts.map +1 -1
- package/esm/funcs/cartsAddShippingMethod.js +1 -1
- package/esm/funcs/cartsAddShippingMethod.js.map +1 -1
- package/esm/funcs/cartsApplyCoupon.d.ts +3 -2
- package/esm/funcs/cartsApplyCoupon.d.ts.map +1 -1
- package/esm/funcs/cartsApplyCoupon.js +1 -1
- package/esm/funcs/cartsApplyCoupon.js.map +1 -1
- package/esm/funcs/cartsCreateCart.d.ts +3 -2
- package/esm/funcs/cartsCreateCart.d.ts.map +1 -1
- package/esm/funcs/cartsCreateCart.js +1 -1
- package/esm/funcs/cartsCreateCart.js.map +1 -1
- package/esm/funcs/cartsCreateCartAddress.d.ts +3 -2
- package/esm/funcs/cartsCreateCartAddress.d.ts.map +1 -1
- package/esm/funcs/cartsCreateCartAddress.js +1 -1
- package/esm/funcs/cartsCreateCartAddress.js.map +1 -1
- package/esm/funcs/cartsDeleteCart.d.ts +3 -2
- package/esm/funcs/cartsDeleteCart.d.ts.map +1 -1
- package/esm/funcs/cartsDeleteCart.js +1 -1
- package/esm/funcs/cartsDeleteCart.js.map +1 -1
- package/esm/funcs/cartsGetCart.d.ts +3 -2
- package/esm/funcs/cartsGetCart.d.ts.map +1 -1
- package/esm/funcs/cartsGetCart.js +1 -1
- package/esm/funcs/cartsGetCart.js.map +1 -1
- package/esm/funcs/cartsGetUserCart.d.ts +3 -2
- package/esm/funcs/cartsGetUserCart.d.ts.map +1 -1
- package/esm/funcs/cartsGetUserCart.js +1 -1
- package/esm/funcs/cartsGetUserCart.js.map +1 -1
- package/esm/funcs/cartsRedeemLoyaltyPoints.d.ts +3 -2
- package/esm/funcs/cartsRedeemLoyaltyPoints.d.ts.map +1 -1
- package/esm/funcs/cartsRedeemLoyaltyPoints.js +1 -1
- package/esm/funcs/cartsRedeemLoyaltyPoints.js.map +1 -1
- package/esm/funcs/cartsRemoveCoupon.d.ts +3 -2
- package/esm/funcs/cartsRemoveCoupon.d.ts.map +1 -1
- package/esm/funcs/cartsRemoveCoupon.js +1 -1
- package/esm/funcs/cartsRemoveCoupon.js.map +1 -1
- package/esm/funcs/cartsRemoveLoyaltyPoints.d.ts +3 -2
- package/esm/funcs/cartsRemoveLoyaltyPoints.d.ts.map +1 -1
- package/esm/funcs/cartsRemoveLoyaltyPoints.js +1 -1
- package/esm/funcs/cartsRemoveLoyaltyPoints.js.map +1 -1
- package/esm/funcs/cartsRemoveUserCart.d.ts +3 -2
- package/esm/funcs/cartsRemoveUserCart.d.ts.map +1 -1
- package/esm/funcs/cartsRemoveUserCart.js +1 -1
- package/esm/funcs/cartsRemoveUserCart.js.map +1 -1
- package/esm/funcs/cartsUpdateCart.d.ts +3 -2
- package/esm/funcs/cartsUpdateCart.d.ts.map +1 -1
- package/esm/funcs/cartsUpdateCart.js +1 -1
- package/esm/funcs/cartsUpdateCart.js.map +1 -1
- package/esm/funcs/catalogGetProductDetail.d.ts +3 -2
- package/esm/funcs/catalogGetProductDetail.d.ts.map +1 -1
- package/esm/funcs/catalogGetProductDetail.js +2 -2
- package/esm/funcs/catalogGetProductDetail.js.map +1 -1
- package/esm/funcs/catalogGetVariantDetail.d.ts +3 -2
- package/esm/funcs/catalogGetVariantDetail.d.ts.map +1 -1
- package/esm/funcs/catalogGetVariantDetail.js +2 -2
- package/esm/funcs/catalogGetVariantDetail.js.map +1 -1
- package/esm/funcs/catalogListCategories.d.ts +3 -2
- package/esm/funcs/catalogListCategories.d.ts.map +1 -1
- package/esm/funcs/catalogListCategories.js +1 -1
- package/esm/funcs/catalogListCategories.js.map +1 -1
- package/esm/funcs/catalogListCrosssellProducts.d.ts +3 -2
- package/esm/funcs/catalogListCrosssellProducts.d.ts.map +1 -1
- package/esm/funcs/catalogListCrosssellProducts.js +2 -2
- package/esm/funcs/catalogListCrosssellProducts.js.map +1 -1
- package/esm/funcs/catalogListProductReviews.d.ts +3 -2
- package/esm/funcs/catalogListProductReviews.d.ts.map +1 -1
- package/esm/funcs/catalogListProductReviews.js +1 -1
- package/esm/funcs/catalogListProductReviews.js.map +1 -1
- package/esm/funcs/catalogListProductVariants.d.ts +3 -2
- package/esm/funcs/catalogListProductVariants.d.ts.map +1 -1
- package/esm/funcs/catalogListProductVariants.js +2 -2
- package/esm/funcs/catalogListProductVariants.js.map +1 -1
- package/esm/funcs/catalogListProducts.d.ts +3 -2
- package/esm/funcs/catalogListProducts.d.ts.map +1 -1
- package/esm/funcs/catalogListProducts.js +2 -2
- package/esm/funcs/catalogListProducts.js.map +1 -1
- package/esm/funcs/catalogListSimilarProducts.d.ts +3 -2
- package/esm/funcs/catalogListSimilarProducts.d.ts.map +1 -1
- package/esm/funcs/catalogListSimilarProducts.js +2 -2
- package/esm/funcs/catalogListSimilarProducts.js.map +1 -1
- package/esm/funcs/catalogListSkus.d.ts +3 -2
- package/esm/funcs/catalogListSkus.d.ts.map +1 -1
- package/esm/funcs/catalogListSkus.js +2 -2
- package/esm/funcs/catalogListSkus.js.map +1 -1
- package/esm/funcs/catalogListUpsellProducts.d.ts +3 -2
- package/esm/funcs/catalogListUpsellProducts.d.ts.map +1 -1
- package/esm/funcs/catalogListUpsellProducts.js +2 -2
- package/esm/funcs/catalogListUpsellProducts.js.map +1 -1
- package/esm/funcs/catalogSearchProducts.d.ts +3 -3
- package/esm/funcs/catalogSearchProducts.d.ts.map +1 -1
- package/esm/funcs/catalogSearchProducts.js +5 -5
- package/esm/funcs/catalogSearchProducts.js.map +1 -1
- package/esm/funcs/commonListCountryPincodes.d.ts +3 -2
- package/esm/funcs/commonListCountryPincodes.d.ts.map +1 -1
- package/esm/funcs/commonListCountryPincodes.js +1 -1
- package/esm/funcs/commonListCountryPincodes.js.map +1 -1
- package/esm/funcs/customersCreateAddress.d.ts +3 -2
- package/esm/funcs/customersCreateAddress.d.ts.map +1 -1
- package/esm/funcs/customersCreateAddress.js +1 -1
- package/esm/funcs/customersCreateAddress.js.map +1 -1
- package/esm/funcs/customersDeleteAddress.d.ts +3 -2
- package/esm/funcs/customersDeleteAddress.d.ts.map +1 -1
- package/esm/funcs/customersDeleteAddress.js +1 -1
- package/esm/funcs/customersDeleteAddress.js.map +1 -1
- package/esm/funcs/customersGetAddressDetail.d.ts +3 -2
- package/esm/funcs/customersGetAddressDetail.d.ts.map +1 -1
- package/esm/funcs/customersGetAddressDetail.js +1 -1
- package/esm/funcs/customersGetAddressDetail.js.map +1 -1
- package/esm/funcs/customersGetLoyaltyDetails.d.ts +3 -2
- package/esm/funcs/customersGetLoyaltyDetails.d.ts.map +1 -1
- package/esm/funcs/customersGetLoyaltyDetails.js +1 -1
- package/esm/funcs/customersGetLoyaltyDetails.js.map +1 -1
- package/esm/funcs/customersListAddresses.d.ts +3 -2
- package/esm/funcs/customersListAddresses.d.ts.map +1 -1
- package/esm/funcs/customersListAddresses.js +1 -1
- package/esm/funcs/customersListAddresses.js.map +1 -1
- package/esm/funcs/customersListUserReviews.d.ts +3 -2
- package/esm/funcs/customersListUserReviews.d.ts.map +1 -1
- package/esm/funcs/customersListUserReviews.js +1 -1
- package/esm/funcs/customersListUserReviews.js.map +1 -1
- package/esm/funcs/customersUpdateAddressDetail.d.ts +3 -2
- package/esm/funcs/customersUpdateAddressDetail.d.ts.map +1 -1
- package/esm/funcs/customersUpdateAddressDetail.js +1 -1
- package/esm/funcs/customersUpdateAddressDetail.js.map +1 -1
- package/esm/funcs/ordersCancelOrder.d.ts +3 -2
- package/esm/funcs/ordersCancelOrder.d.ts.map +1 -1
- package/esm/funcs/ordersCancelOrder.js +1 -1
- package/esm/funcs/ordersCancelOrder.js.map +1 -1
- package/esm/funcs/ordersCreateOrder.d.ts +3 -2
- package/esm/funcs/ordersCreateOrder.d.ts.map +1 -1
- package/esm/funcs/ordersCreateOrder.js +1 -1
- package/esm/funcs/ordersCreateOrder.js.map +1 -1
- package/esm/funcs/ordersGetOrderDetail.d.ts +3 -2
- package/esm/funcs/ordersGetOrderDetail.d.ts.map +1 -1
- package/esm/funcs/ordersGetOrderDetail.js +1 -1
- package/esm/funcs/ordersGetOrderDetail.js.map +1 -1
- package/esm/funcs/ordersGetPaymentStatus.d.ts +3 -2
- package/esm/funcs/ordersGetPaymentStatus.d.ts.map +1 -1
- package/esm/funcs/ordersGetPaymentStatus.js +1 -1
- package/esm/funcs/ordersGetPaymentStatus.js.map +1 -1
- package/esm/funcs/ordersListOrderShipments.d.ts +3 -2
- package/esm/funcs/ordersListOrderShipments.d.ts.map +1 -1
- package/esm/funcs/ordersListOrderShipments.js +1 -1
- package/esm/funcs/ordersListOrderShipments.js.map +1 -1
- package/esm/funcs/ordersListOrders.d.ts +3 -2
- package/esm/funcs/ordersListOrders.d.ts.map +1 -1
- package/esm/funcs/ordersListOrders.js +1 -1
- package/esm/funcs/ordersListOrders.js.map +1 -1
- package/esm/funcs/ordersRetryOrderPayment.d.ts +3 -2
- package/esm/funcs/ordersRetryOrderPayment.d.ts.map +1 -1
- package/esm/funcs/ordersRetryOrderPayment.js +1 -1
- package/esm/funcs/ordersRetryOrderPayment.js.map +1 -1
- package/esm/funcs/shippingShippingMethods.d.ts +3 -2
- package/esm/funcs/shippingShippingMethods.d.ts.map +1 -1
- package/esm/funcs/shippingShippingMethods.js +1 -1
- package/esm/funcs/shippingShippingMethods.js.map +1 -1
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/lib/files.d.ts +5 -0
- package/esm/lib/files.d.ts.map +1 -1
- package/esm/lib/files.js +40 -0
- package/esm/lib/files.js.map +1 -1
- package/esm/lib/matchers.d.ts +3 -10
- package/esm/lib/matchers.d.ts.map +1 -1
- package/esm/lib/matchers.js +33 -30
- package/esm/lib/matchers.js.map +1 -1
- package/esm/lib/security.d.ts +2 -2
- package/esm/lib/security.d.ts.map +1 -1
- package/esm/models/components/coloroption.js +1 -1
- package/esm/models/components/coloroption.js.map +1 -1
- package/esm/models/components/customeraddress.js +1 -1
- package/esm/models/components/customeraddress.js.map +1 -1
- package/esm/models/components/customeraddressinput.js +1 -1
- package/esm/models/components/customeraddressinput.js.map +1 -1
- package/esm/models/components/discountbasedpromotion.js +1 -1
- package/esm/models/components/discountbasedpromotion.js.map +1 -1
- package/esm/models/components/fixedpricepromotion.js +1 -1
- package/esm/models/components/fixedpricepromotion.js.map +1 -1
- package/esm/models/components/freegoodspromotion.js +1 -1
- package/esm/models/components/freegoodspromotion.js.map +1 -1
- package/esm/models/components/generateotpwithemail.js +1 -1
- package/esm/models/components/generateotpwithemail.js.map +1 -1
- package/esm/models/components/juspaypaymentinfo.d.ts.map +1 -1
- package/esm/models/components/juspaypaymentinfo.js +3 -2
- package/esm/models/components/juspaypaymentinfo.js.map +1 -1
- package/esm/models/components/orderpayment.d.ts +2 -2
- package/esm/models/components/orderpayment.d.ts.map +1 -1
- package/esm/models/components/orderpayment.js +2 -2
- package/esm/models/components/orderpayment.js.map +1 -1
- package/esm/models/components/payupaymentinfo.js +3 -3
- package/esm/models/components/payupaymentinfo.js.map +1 -1
- package/esm/models/components/product.d.ts +3 -0
- package/esm/models/components/product.d.ts.map +1 -1
- package/esm/models/components/product.js +3 -0
- package/esm/models/components/product.js.map +1 -1
- package/esm/models/components/productdetail.d.ts +3 -0
- package/esm/models/components/productdetail.d.ts.map +1 -1
- package/esm/models/components/productdetail.js +3 -0
- package/esm/models/components/productdetail.js.map +1 -1
- package/esm/models/components/productpromotion.d.ts +20 -20
- package/esm/models/components/productpromotion.d.ts.map +1 -1
- package/esm/models/components/productpromotion.js +16 -16
- package/esm/models/components/productpromotion.js.map +1 -1
- package/esm/models/components/searchproduct.d.ts +0 -5
- package/esm/models/components/searchproduct.d.ts.map +1 -1
- package/esm/models/components/searchproduct.js +0 -11
- package/esm/models/components/searchproduct.js.map +1 -1
- package/esm/models/components/singleselectoption.js +1 -1
- package/esm/models/components/singleselectoption.js.map +1 -1
- package/esm/models/components/volumebasedpromotion.js +1 -1
- package/esm/models/components/volumebasedpromotion.js.map +1 -1
- package/esm/models/errors/badrequest.d.ts +7 -2
- package/esm/models/errors/badrequest.d.ts.map +1 -1
- package/esm/models/errors/badrequest.js +12 -4
- package/esm/models/errors/badrequest.js.map +1 -1
- package/esm/models/errors/ceerror.d.ts +8 -18
- package/esm/models/errors/ceerror.d.ts.map +1 -1
- package/esm/models/errors/ceerror.js +17 -10
- package/esm/models/errors/ceerror.js.map +1 -1
- package/esm/models/errors/cestorefronterror.d.ts +19 -0
- package/esm/models/errors/cestorefronterror.d.ts.map +1 -0
- package/esm/models/errors/cestorefronterror.js +16 -0
- package/esm/models/errors/cestorefronterror.js.map +1 -0
- package/esm/models/errors/index.d.ts +1 -0
- package/esm/models/errors/index.d.ts.map +1 -1
- package/esm/models/errors/index.js +1 -0
- package/esm/models/errors/index.js.map +1 -1
- package/esm/models/errors/notfound.d.ts +7 -2
- package/esm/models/errors/notfound.d.ts.map +1 -1
- package/esm/models/errors/notfound.js +12 -4
- package/esm/models/errors/notfound.js.map +1 -1
- package/esm/models/errors/responsevalidationerror.d.ts +26 -0
- package/esm/models/errors/responsevalidationerror.d.ts.map +1 -0
- package/esm/models/errors/responsevalidationerror.js +29 -0
- package/esm/models/errors/responsevalidationerror.js.map +1 -0
- package/esm/models/errors/sdkvalidationerror.d.ts +1 -0
- package/esm/models/errors/sdkvalidationerror.d.ts.map +1 -1
- package/esm/models/errors/sdkvalidationerror.js +14 -0
- package/esm/models/errors/sdkvalidationerror.js.map +1 -1
- package/esm/models/errors/unauthorized.d.ts +7 -2
- package/esm/models/errors/unauthorized.d.ts.map +1 -1
- package/esm/models/errors/unauthorized.js +12 -4
- package/esm/models/errors/unauthorized.js.map +1 -1
- package/esm/models/operations/createaddress.js +1 -1
- package/esm/models/operations/createaddress.js.map +1 -1
- package/esm/models/operations/createorder.d.ts +16 -16
- package/esm/models/operations/createorder.d.ts.map +1 -1
- package/esm/models/operations/createorder.js +12 -12
- package/esm/models/operations/createorder.js.map +1 -1
- package/esm/models/operations/generateotp.d.ts +2 -2
- package/esm/models/operations/generateotp.js +2 -2
- package/esm/models/operations/getaddressdetail.js +1 -1
- package/esm/models/operations/getaddressdetail.js.map +1 -1
- package/esm/models/operations/getproductdetail.d.ts +3 -3
- package/esm/models/operations/getproductdetail.d.ts.map +1 -1
- package/esm/models/operations/getproductdetail.js +4 -4
- package/esm/models/operations/getproductdetail.js.map +1 -1
- package/esm/models/operations/getvariantdetail.d.ts +3 -3
- package/esm/models/operations/getvariantdetail.d.ts.map +1 -1
- package/esm/models/operations/getvariantdetail.js +4 -4
- package/esm/models/operations/getvariantdetail.js.map +1 -1
- package/esm/models/operations/listaddresses.js +1 -1
- package/esm/models/operations/listaddresses.js.map +1 -1
- package/esm/models/operations/listcrosssellproducts.d.ts +3 -3
- package/esm/models/operations/listcrosssellproducts.d.ts.map +1 -1
- package/esm/models/operations/listcrosssellproducts.js +4 -4
- package/esm/models/operations/listcrosssellproducts.js.map +1 -1
- package/esm/models/operations/listproducts.d.ts +3 -3
- package/esm/models/operations/listproducts.d.ts.map +1 -1
- package/esm/models/operations/listproducts.js +4 -4
- package/esm/models/operations/listproducts.js.map +1 -1
- package/esm/models/operations/listproductvariants.d.ts +3 -3
- package/esm/models/operations/listproductvariants.d.ts.map +1 -1
- package/esm/models/operations/listproductvariants.js +4 -4
- package/esm/models/operations/listproductvariants.js.map +1 -1
- package/esm/models/operations/listsimilarproducts.d.ts +3 -3
- package/esm/models/operations/listsimilarproducts.d.ts.map +1 -1
- package/esm/models/operations/listsimilarproducts.js +4 -4
- package/esm/models/operations/listsimilarproducts.js.map +1 -1
- package/esm/models/operations/listskus.d.ts +3 -3
- package/esm/models/operations/listskus.d.ts.map +1 -1
- package/esm/models/operations/listskus.js +4 -4
- package/esm/models/operations/listskus.js.map +1 -1
- package/esm/models/operations/listupsellproducts.d.ts +3 -3
- package/esm/models/operations/listupsellproducts.d.ts.map +1 -1
- package/esm/models/operations/listupsellproducts.js +4 -4
- package/esm/models/operations/listupsellproducts.js.map +1 -1
- package/esm/models/operations/loginwithwhatsapp.js +1 -1
- package/esm/models/operations/loginwithwhatsapp.js.map +1 -1
- package/esm/models/operations/retryorderpayment.d.ts +16 -16
- package/esm/models/operations/retryorderpayment.d.ts.map +1 -1
- package/esm/models/operations/retryorderpayment.js +12 -12
- package/esm/models/operations/retryorderpayment.js.map +1 -1
- package/esm/models/operations/searchproducts.d.ts +30 -0
- package/esm/models/operations/searchproducts.d.ts.map +1 -1
- package/esm/models/operations/searchproducts.js +37 -0
- package/esm/models/operations/searchproducts.js.map +1 -1
- package/esm/models/operations/updateaddressdetail.js +1 -1
- package/esm/models/operations/updateaddressdetail.js.map +1 -1
- package/esm/sdk/catalog.d.ts +1 -2
- package/esm/sdk/catalog.d.ts.map +1 -1
- package/esm/sdk/catalog.js.map +1 -1
- package/esm/types/constdatetime.js +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/authGenerateOtp.ts +21 -17
- package/src/funcs/authGetAnonymousToken.ts +21 -17
- package/src/funcs/authGetUserDetail.ts +21 -17
- package/src/funcs/authLoginWithEmail.ts +21 -17
- package/src/funcs/authLoginWithPhone.ts +21 -17
- package/src/funcs/authLoginWithWhatsapp.ts +21 -17
- package/src/funcs/authLogout.ts +21 -17
- package/src/funcs/authRefreshToken.ts +21 -17
- package/src/funcs/authUpdateUser.ts +21 -17
- package/src/funcs/authVerifyOtp.ts +21 -17
- package/src/funcs/cartsAddShippingMethod.ts +21 -17
- package/src/funcs/cartsApplyCoupon.ts +21 -17
- package/src/funcs/cartsCreateCart.ts +21 -17
- package/src/funcs/cartsCreateCartAddress.ts +21 -17
- package/src/funcs/cartsDeleteCart.ts +21 -17
- package/src/funcs/cartsGetCart.ts +21 -17
- package/src/funcs/cartsGetUserCart.ts +21 -17
- package/src/funcs/cartsRedeemLoyaltyPoints.ts +21 -17
- package/src/funcs/cartsRemoveCoupon.ts +21 -17
- package/src/funcs/cartsRemoveLoyaltyPoints.ts +21 -17
- package/src/funcs/cartsRemoveUserCart.ts +21 -17
- package/src/funcs/cartsUpdateCart.ts +21 -17
- package/src/funcs/catalogGetProductDetail.ts +24 -20
- package/src/funcs/catalogGetVariantDetail.ts +24 -20
- package/src/funcs/catalogListCategories.ts +21 -17
- package/src/funcs/catalogListCrosssellProducts.ts +24 -20
- package/src/funcs/catalogListProductReviews.ts +21 -17
- package/src/funcs/catalogListProductVariants.ts +24 -20
- package/src/funcs/catalogListProducts.ts +24 -20
- package/src/funcs/catalogListSimilarProducts.ts +24 -20
- package/src/funcs/catalogListSkus.ts +24 -20
- package/src/funcs/catalogListUpsellProducts.ts +24 -20
- package/src/funcs/catalogSearchProducts.ts +31 -23
- package/src/funcs/commonListCountryPincodes.ts +21 -17
- package/src/funcs/customersCreateAddress.ts +21 -17
- package/src/funcs/customersDeleteAddress.ts +21 -17
- package/src/funcs/customersGetAddressDetail.ts +21 -17
- package/src/funcs/customersGetLoyaltyDetails.ts +21 -17
- package/src/funcs/customersListAddresses.ts +21 -17
- package/src/funcs/customersListUserReviews.ts +21 -17
- package/src/funcs/customersUpdateAddressDetail.ts +21 -17
- package/src/funcs/ordersCancelOrder.ts +21 -17
- package/src/funcs/ordersCreateOrder.ts +21 -17
- package/src/funcs/ordersGetOrderDetail.ts +21 -17
- package/src/funcs/ordersGetPaymentStatus.ts +21 -17
- package/src/funcs/ordersListOrderShipments.ts +21 -17
- package/src/funcs/ordersListOrders.ts +21 -17
- package/src/funcs/ordersRetryOrderPayment.ts +21 -17
- package/src/funcs/shippingShippingMethods.ts +21 -17
- package/src/lib/config.ts +3 -3
- package/src/lib/files.ts +42 -0
- package/src/lib/matchers.ts +44 -41
- package/src/lib/security.ts +2 -2
- package/src/models/components/coloroption.ts +1 -1
- package/src/models/components/customeraddress.ts +1 -1
- package/src/models/components/customeraddressinput.ts +1 -1
- package/src/models/components/discountbasedpromotion.ts +1 -1
- package/src/models/components/fixedpricepromotion.ts +1 -1
- package/src/models/components/freegoodspromotion.ts +1 -1
- package/src/models/components/generateotpwithemail.ts +1 -1
- package/src/models/components/juspaypaymentinfo.ts +3 -2
- package/src/models/components/orderpayment.ts +4 -4
- package/src/models/components/payupaymentinfo.ts +3 -3
- package/src/models/components/product.ts +10 -0
- package/src/models/components/productdetail.ts +10 -0
- package/src/models/components/productpromotion.ts +48 -48
- package/src/models/components/searchproduct.ts +0 -16
- package/src/models/components/singleselectoption.ts +1 -1
- package/src/models/components/volumebasedpromotion.ts +1 -1
- package/src/models/errors/badrequest.ts +15 -5
- package/src/models/errors/ceerror.ts +23 -31
- package/src/models/errors/cestorefronterror.ts +35 -0
- package/src/models/errors/index.ts +1 -0
- package/src/models/errors/notfound.ts +15 -5
- package/src/models/errors/responsevalidationerror.ts +50 -0
- package/src/models/errors/sdkvalidationerror.ts +12 -0
- package/src/models/errors/unauthorized.ts +15 -5
- package/src/models/operations/createaddress.ts +1 -1
- package/src/models/operations/createorder.ts +37 -35
- package/src/models/operations/generateotp.ts +6 -6
- package/src/models/operations/getaddressdetail.ts +1 -1
- package/src/models/operations/getproductdetail.ts +7 -7
- package/src/models/operations/getvariantdetail.ts +7 -7
- package/src/models/operations/listaddresses.ts +1 -1
- package/src/models/operations/listcrosssellproducts.ts +7 -7
- package/src/models/operations/listproducts.ts +7 -7
- package/src/models/operations/listproductvariants.ts +7 -7
- package/src/models/operations/listsimilarproducts.ts +7 -7
- package/src/models/operations/listskus.ts +7 -7
- package/src/models/operations/listupsellproducts.ts +7 -7
- package/src/models/operations/loginwithwhatsapp.ts +1 -1
- package/src/models/operations/retryorderpayment.ts +37 -35
- package/src/models/operations/searchproducts.ts +75 -0
- package/src/models/operations/updateaddressdetail.ts +1 -1
- package/src/sdk/catalog.ts +1 -2
- package/src/types/constdatetime.ts +1 -1
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod";
|
|
6
|
-
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
6
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
7
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
8
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
@@ -24,10 +23,6 @@ export type SearchProduct = {
|
|
|
24
23
|
* Maximum number of records returned for a page.
|
|
25
24
|
*/
|
|
26
25
|
limit?: number | undefined;
|
|
27
|
-
/**
|
|
28
|
-
* to return pricing, promotion and subscriptions data for a specific customer group. Otherwise it will return data as per default customer group.
|
|
29
|
-
*/
|
|
30
|
-
customerGroupId?: string | undefined;
|
|
31
26
|
/**
|
|
32
27
|
* provide list of attributes for specific facets or * for all facets.
|
|
33
28
|
*
|
|
@@ -51,12 +46,7 @@ export const SearchProduct$inboundSchema: z.ZodType<
|
|
|
51
46
|
query: z.string(),
|
|
52
47
|
page: z.number().int().default(1),
|
|
53
48
|
limit: z.number().int().default(25),
|
|
54
|
-
customer_group_id: z.string().optional(),
|
|
55
49
|
facets: z.array(z.string()).optional(),
|
|
56
|
-
}).transform((v) => {
|
|
57
|
-
return remap$(v, {
|
|
58
|
-
"customer_group_id": "customerGroupId",
|
|
59
|
-
});
|
|
60
50
|
});
|
|
61
51
|
|
|
62
52
|
/** @internal */
|
|
@@ -64,7 +54,6 @@ export type SearchProduct$Outbound = {
|
|
|
64
54
|
query: string;
|
|
65
55
|
page: number;
|
|
66
56
|
limit: number;
|
|
67
|
-
customer_group_id?: string | undefined;
|
|
68
57
|
facets?: Array<string> | undefined;
|
|
69
58
|
};
|
|
70
59
|
|
|
@@ -77,12 +66,7 @@ export const SearchProduct$outboundSchema: z.ZodType<
|
|
|
77
66
|
query: z.string(),
|
|
78
67
|
page: z.number().int().default(1),
|
|
79
68
|
limit: z.number().int().default(25),
|
|
80
|
-
customerGroupId: z.string().optional(),
|
|
81
69
|
facets: z.array(z.string()).optional(),
|
|
82
|
-
}).transform((v) => {
|
|
83
|
-
return remap$(v, {
|
|
84
|
-
customerGroupId: "customer_group_id",
|
|
85
|
-
});
|
|
86
70
|
});
|
|
87
71
|
|
|
88
72
|
/**
|
|
@@ -29,7 +29,7 @@ export const SingleSelectOption$inboundSchema: z.ZodType<
|
|
|
29
29
|
unknown
|
|
30
30
|
> = z.object({
|
|
31
31
|
name: z.string(),
|
|
32
|
-
type: z.literal("single-select").optional(),
|
|
32
|
+
type: z.literal("single-select").default("single-select").optional(),
|
|
33
33
|
value: z.string(),
|
|
34
34
|
});
|
|
35
35
|
|
|
@@ -123,7 +123,7 @@ export const VolumeBasedPromotion$inboundSchema: z.ZodType<
|
|
|
123
123
|
z.ZodTypeDef,
|
|
124
124
|
unknown
|
|
125
125
|
> = z.object({
|
|
126
|
-
promotion_type: z.literal("volume-based").optional(),
|
|
126
|
+
promotion_type: z.literal("volume-based").default("volume-based").optional(),
|
|
127
127
|
slabs: z.array(z.lazy(() => Slabs$inboundSchema)),
|
|
128
128
|
}).transform((v) => {
|
|
129
129
|
return remap$(v, {
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import * as z from "zod";
|
|
6
6
|
import { safeParse } from "../../lib/schemas.js";
|
|
7
7
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { CeStorefrontError } from "./cestorefronterror.js";
|
|
8
9
|
import { SDKValidationError } from "./sdkvalidationerror.js";
|
|
9
10
|
|
|
10
11
|
export type ErrorT = {
|
|
@@ -24,7 +25,7 @@ export type BadRequestData = {
|
|
|
24
25
|
/**
|
|
25
26
|
* Bad request
|
|
26
27
|
*/
|
|
27
|
-
export class BadRequest extends
|
|
28
|
+
export class BadRequest extends CeStorefrontError {
|
|
28
29
|
success: boolean;
|
|
29
30
|
code: string;
|
|
30
31
|
error?: ErrorT | undefined;
|
|
@@ -32,11 +33,13 @@ export class BadRequest extends Error {
|
|
|
32
33
|
/** The original data that was passed to this error instance. */
|
|
33
34
|
data$: BadRequestData;
|
|
34
35
|
|
|
35
|
-
constructor(
|
|
36
|
+
constructor(
|
|
37
|
+
err: BadRequestData,
|
|
38
|
+
httpMeta: { response: Response; request: Request; body: string },
|
|
39
|
+
) {
|
|
36
40
|
const message = err.message || "API error occurred";
|
|
37
|
-
super(message);
|
|
41
|
+
super(message, httpMeta);
|
|
38
42
|
this.data$ = err;
|
|
39
|
-
|
|
40
43
|
this.success = err.success;
|
|
41
44
|
this.code = err.code;
|
|
42
45
|
if (err.error != null) this.error = err.error;
|
|
@@ -102,9 +105,16 @@ export const BadRequest$inboundSchema: z.ZodType<
|
|
|
102
105
|
success: z.boolean(),
|
|
103
106
|
code: z.string(),
|
|
104
107
|
error: z.lazy(() => ErrorT$inboundSchema).optional(),
|
|
108
|
+
request$: z.instanceof(Request),
|
|
109
|
+
response$: z.instanceof(Response),
|
|
110
|
+
body$: z.string(),
|
|
105
111
|
})
|
|
106
112
|
.transform((v) => {
|
|
107
|
-
return new BadRequest(v
|
|
113
|
+
return new BadRequest(v, {
|
|
114
|
+
request: v.request$,
|
|
115
|
+
response: v.response$,
|
|
116
|
+
body: v.body$,
|
|
117
|
+
});
|
|
108
118
|
});
|
|
109
119
|
|
|
110
120
|
/** @internal */
|
|
@@ -2,41 +2,33 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* HTTP status code
|
|
8
|
-
*/
|
|
9
|
-
public readonly statusCode: number;
|
|
10
|
-
/**
|
|
11
|
-
* HTTP content type
|
|
12
|
-
*/
|
|
13
|
-
public readonly contentType: string;
|
|
14
|
-
/**
|
|
15
|
-
* HTTP body
|
|
16
|
-
*/
|
|
17
|
-
public readonly body: string;
|
|
18
|
-
/**
|
|
19
|
-
* Raw response
|
|
20
|
-
*/
|
|
21
|
-
public readonly rawResponse: Response;
|
|
5
|
+
import { CeStorefrontError } from "./cestorefronterror.js";
|
|
22
6
|
|
|
7
|
+
/** The fallback error class if no more specific error class is matched */
|
|
8
|
+
export class CeError extends CeStorefrontError {
|
|
23
9
|
constructor(
|
|
24
10
|
message: string,
|
|
25
|
-
|
|
26
|
-
|
|
11
|
+
httpMeta: {
|
|
12
|
+
response: Response;
|
|
13
|
+
request: Request;
|
|
14
|
+
body: string;
|
|
15
|
+
},
|
|
27
16
|
) {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
)
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
17
|
+
if (message) {
|
|
18
|
+
message += `: `;
|
|
19
|
+
}
|
|
20
|
+
message += `Status ${httpMeta.response.status}`;
|
|
21
|
+
const contentType = httpMeta.response.headers.get("content-type") || `""`;
|
|
22
|
+
if (contentType !== "application/json") {
|
|
23
|
+
message += ` Content-Type ${
|
|
24
|
+
contentType.includes(" ") ? `"${contentType}"` : contentType
|
|
25
|
+
}`;
|
|
26
|
+
}
|
|
27
|
+
const body = httpMeta.body || `""`;
|
|
28
|
+
message += body.length > 100 ? "\n" : " ";
|
|
29
|
+
message += `Body ${body}`;
|
|
30
|
+
message = message.trim();
|
|
31
|
+
super(message, httpMeta);
|
|
40
32
|
this.name = "CeError";
|
|
41
33
|
}
|
|
42
34
|
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/** The base class for all HTTP error responses */
|
|
6
|
+
export class CeStorefrontError extends Error {
|
|
7
|
+
/** HTTP status code */
|
|
8
|
+
public readonly statusCode: number;
|
|
9
|
+
/** HTTP body */
|
|
10
|
+
public readonly body: string;
|
|
11
|
+
/** HTTP headers */
|
|
12
|
+
public readonly headers: Headers;
|
|
13
|
+
/** HTTP content type */
|
|
14
|
+
public readonly contentType: string;
|
|
15
|
+
/** Raw response */
|
|
16
|
+
public readonly rawResponse: Response;
|
|
17
|
+
|
|
18
|
+
constructor(
|
|
19
|
+
message: string,
|
|
20
|
+
httpMeta: {
|
|
21
|
+
response: Response;
|
|
22
|
+
request: Request;
|
|
23
|
+
body: string;
|
|
24
|
+
},
|
|
25
|
+
) {
|
|
26
|
+
super(message);
|
|
27
|
+
this.statusCode = httpMeta.response.status;
|
|
28
|
+
this.body = httpMeta.body;
|
|
29
|
+
this.headers = httpMeta.response.headers;
|
|
30
|
+
this.contentType = httpMeta.response.headers.get("content-type") || "";
|
|
31
|
+
this.rawResponse = httpMeta.response;
|
|
32
|
+
|
|
33
|
+
this.name = "CeStorefrontError";
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod";
|
|
6
|
+
import { CeStorefrontError } from "./cestorefronterror.js";
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* Requested resource not found
|
|
@@ -16,18 +17,20 @@ export type NotFoundData = {
|
|
|
16
17
|
/**
|
|
17
18
|
* Requested resource not found
|
|
18
19
|
*/
|
|
19
|
-
export class NotFound extends
|
|
20
|
+
export class NotFound extends CeStorefrontError {
|
|
20
21
|
success: boolean;
|
|
21
22
|
code: string;
|
|
22
23
|
|
|
23
24
|
/** The original data that was passed to this error instance. */
|
|
24
25
|
data$: NotFoundData;
|
|
25
26
|
|
|
26
|
-
constructor(
|
|
27
|
+
constructor(
|
|
28
|
+
err: NotFoundData,
|
|
29
|
+
httpMeta: { response: Response; request: Request; body: string },
|
|
30
|
+
) {
|
|
27
31
|
const message = err.message || "API error occurred";
|
|
28
|
-
super(message);
|
|
32
|
+
super(message, httpMeta);
|
|
29
33
|
this.data$ = err;
|
|
30
|
-
|
|
31
34
|
this.success = err.success;
|
|
32
35
|
this.code = err.code;
|
|
33
36
|
|
|
@@ -44,9 +47,16 @@ export const NotFound$inboundSchema: z.ZodType<
|
|
|
44
47
|
message: z.string(),
|
|
45
48
|
success: z.boolean(),
|
|
46
49
|
code: z.string(),
|
|
50
|
+
request$: z.instanceof(Request),
|
|
51
|
+
response$: z.instanceof(Response),
|
|
52
|
+
body$: z.string(),
|
|
47
53
|
})
|
|
48
54
|
.transform((v) => {
|
|
49
|
-
return new NotFound(v
|
|
55
|
+
return new NotFound(v, {
|
|
56
|
+
request: v.request$,
|
|
57
|
+
response: v.response$,
|
|
58
|
+
body: v.body$,
|
|
59
|
+
});
|
|
50
60
|
});
|
|
51
61
|
|
|
52
62
|
/** @internal */
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { CeStorefrontError } from "./cestorefronterror.js";
|
|
7
|
+
import { formatZodError } from "./sdkvalidationerror.js";
|
|
8
|
+
|
|
9
|
+
export class ResponseValidationError extends CeStorefrontError {
|
|
10
|
+
/**
|
|
11
|
+
* The raw value that failed validation.
|
|
12
|
+
*/
|
|
13
|
+
public readonly rawValue: unknown;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* The raw message that failed validation.
|
|
17
|
+
*/
|
|
18
|
+
public readonly rawMessage: unknown;
|
|
19
|
+
|
|
20
|
+
constructor(
|
|
21
|
+
message: string,
|
|
22
|
+
extra: {
|
|
23
|
+
response: Response;
|
|
24
|
+
request: Request;
|
|
25
|
+
body: string;
|
|
26
|
+
cause: unknown;
|
|
27
|
+
rawValue: unknown;
|
|
28
|
+
rawMessage: unknown;
|
|
29
|
+
},
|
|
30
|
+
) {
|
|
31
|
+
super(message, extra);
|
|
32
|
+
this.name = "ResponseValidationError";
|
|
33
|
+
this.cause = extra.cause;
|
|
34
|
+
this.rawValue = extra.rawValue;
|
|
35
|
+
this.rawMessage = extra.rawMessage;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Return a pretty-formatted error message if the underlying validation error
|
|
40
|
+
* is a ZodError or some other recognized error type, otherwise return the
|
|
41
|
+
* default error message.
|
|
42
|
+
*/
|
|
43
|
+
public pretty(): string {
|
|
44
|
+
if (this.cause instanceof z.ZodError) {
|
|
45
|
+
return `${this.rawMessage}\n${formatZodError(this.cause)}`;
|
|
46
|
+
} else {
|
|
47
|
+
return this.toString();
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -15,6 +15,18 @@ export class SDKValidationError extends Error {
|
|
|
15
15
|
*/
|
|
16
16
|
public readonly rawMessage: unknown;
|
|
17
17
|
|
|
18
|
+
// Allows for backwards compatibility for `instanceof` checks of `ResponseValidationError`
|
|
19
|
+
static override [Symbol.hasInstance](
|
|
20
|
+
instance: unknown,
|
|
21
|
+
): instance is SDKValidationError {
|
|
22
|
+
if (!(instance instanceof Error)) return false;
|
|
23
|
+
if (!("rawValue" in instance)) return false;
|
|
24
|
+
if (!("rawMessage" in instance)) return false;
|
|
25
|
+
if (!("pretty" in instance)) return false;
|
|
26
|
+
if (typeof instance.pretty !== "function") return false;
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
|
|
18
30
|
constructor(message: string, cause: unknown, rawValue: unknown) {
|
|
19
31
|
super(`${message}: ${cause}`);
|
|
20
32
|
this.name = "SDKValidationError";
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod";
|
|
6
|
+
import { CeStorefrontError } from "./cestorefronterror.js";
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* Not authorized for given operation on the Resource
|
|
@@ -16,18 +17,20 @@ export type UnauthorizedData = {
|
|
|
16
17
|
/**
|
|
17
18
|
* Not authorized for given operation on the Resource
|
|
18
19
|
*/
|
|
19
|
-
export class Unauthorized extends
|
|
20
|
+
export class Unauthorized extends CeStorefrontError {
|
|
20
21
|
success?: boolean;
|
|
21
22
|
code: string;
|
|
22
23
|
|
|
23
24
|
/** The original data that was passed to this error instance. */
|
|
24
25
|
data$: UnauthorizedData;
|
|
25
26
|
|
|
26
|
-
constructor(
|
|
27
|
+
constructor(
|
|
28
|
+
err: UnauthorizedData,
|
|
29
|
+
httpMeta: { response: Response; request: Request; body: string },
|
|
30
|
+
) {
|
|
27
31
|
const message = err.message || "API error occurred";
|
|
28
|
-
super(message);
|
|
32
|
+
super(message, httpMeta);
|
|
29
33
|
this.data$ = err;
|
|
30
|
-
|
|
31
34
|
if (err.success != null) this.success = err.success;
|
|
32
35
|
this.code = err.code;
|
|
33
36
|
|
|
@@ -44,9 +47,16 @@ export const Unauthorized$inboundSchema: z.ZodType<
|
|
|
44
47
|
message: z.string(),
|
|
45
48
|
success: z.boolean().default(false),
|
|
46
49
|
code: z.string(),
|
|
50
|
+
request$: z.instanceof(Request),
|
|
51
|
+
response$: z.instanceof(Response),
|
|
52
|
+
body$: z.string(),
|
|
47
53
|
})
|
|
48
54
|
.transform((v) => {
|
|
49
|
-
return new Unauthorized(v
|
|
55
|
+
return new Unauthorized(v, {
|
|
56
|
+
request: v.request$,
|
|
57
|
+
response: v.response$,
|
|
58
|
+
body: v.body$,
|
|
59
|
+
});
|
|
50
60
|
});
|
|
51
61
|
|
|
52
62
|
/** @internal */
|
|
@@ -91,7 +91,7 @@ export const CreateAddressRequestBody$inboundSchema: z.ZodType<
|
|
|
91
91
|
pincode: z.string(),
|
|
92
92
|
city: z.string(),
|
|
93
93
|
state: z.string(),
|
|
94
|
-
country: z.literal("India").optional(),
|
|
94
|
+
country: z.literal("India").default("India").optional(),
|
|
95
95
|
tax_identification_number: z.nullable(z.string()),
|
|
96
96
|
business_name: z.nullable(z.string()),
|
|
97
97
|
is_default_billing: z.boolean().optional(),
|
|
@@ -17,8 +17,8 @@ export const PaymentGateway = {
|
|
|
17
17
|
export type PaymentGateway = ClosedEnum<typeof PaymentGateway>;
|
|
18
18
|
|
|
19
19
|
export type PaymentGatewayParams =
|
|
20
|
-
| (components.
|
|
21
|
-
| (components.
|
|
20
|
+
| (components.JuspayPaymentGatewayParams & { paymentGateway: "JUSPAY" })
|
|
21
|
+
| (components.PayuPaymentGatewayParams & { paymentGateway: "PAYU" });
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* Request body
|
|
@@ -27,18 +27,18 @@ export type CreateOrderRequestBody = {
|
|
|
27
27
|
cartId: string;
|
|
28
28
|
paymentGateway: PaymentGateway;
|
|
29
29
|
paymentGatewayParams:
|
|
30
|
-
| (components.
|
|
31
|
-
| (components.
|
|
30
|
+
| (components.JuspayPaymentGatewayParams & { paymentGateway: "JUSPAY" })
|
|
31
|
+
| (components.PayuPaymentGatewayParams & { paymentGateway: "PAYU" });
|
|
32
32
|
};
|
|
33
33
|
|
|
34
34
|
export type PaymentInfo =
|
|
35
|
-
| components.
|
|
36
|
-
| components.
|
|
35
|
+
| components.PayuPaymentInfo
|
|
36
|
+
| components.JuspayPaymentInfo;
|
|
37
37
|
|
|
38
38
|
export type CreateOrderContent = {
|
|
39
39
|
order: components.Order;
|
|
40
40
|
paymentRequired: boolean;
|
|
41
|
-
paymentInfo: components.
|
|
41
|
+
paymentInfo: components.PayuPaymentInfo | components.JuspayPaymentInfo;
|
|
42
42
|
};
|
|
43
43
|
|
|
44
44
|
/**
|
|
@@ -77,13 +77,13 @@ export const PaymentGatewayParams$inboundSchema: z.ZodType<
|
|
|
77
77
|
z.ZodTypeDef,
|
|
78
78
|
unknown
|
|
79
79
|
> = z.union([
|
|
80
|
-
components.
|
|
81
|
-
z.object({ payment_gateway: z.literal("
|
|
80
|
+
components.JuspayPaymentGatewayParams$inboundSchema.and(
|
|
81
|
+
z.object({ payment_gateway: z.literal("JUSPAY") }).transform((v) => ({
|
|
82
82
|
paymentGateway: v.payment_gateway,
|
|
83
83
|
})),
|
|
84
84
|
),
|
|
85
|
-
components.
|
|
86
|
-
z.object({ payment_gateway: z.literal("
|
|
85
|
+
components.PayuPaymentGatewayParams$inboundSchema.and(
|
|
86
|
+
z.object({ payment_gateway: z.literal("PAYU") }).transform((v) => ({
|
|
87
87
|
paymentGateway: v.payment_gateway,
|
|
88
88
|
})),
|
|
89
89
|
),
|
|
@@ -91,9 +91,11 @@ export const PaymentGatewayParams$inboundSchema: z.ZodType<
|
|
|
91
91
|
|
|
92
92
|
/** @internal */
|
|
93
93
|
export type PaymentGatewayParams$Outbound =
|
|
94
|
-
| (components.PayuPaymentGatewayParams$Outbound & { payment_gateway: "PAYU" })
|
|
95
94
|
| (components.JuspayPaymentGatewayParams$Outbound & {
|
|
96
95
|
payment_gateway: "JUSPAY";
|
|
96
|
+
})
|
|
97
|
+
| (components.PayuPaymentGatewayParams$Outbound & {
|
|
98
|
+
payment_gateway: "PAYU";
|
|
97
99
|
});
|
|
98
100
|
|
|
99
101
|
/** @internal */
|
|
@@ -102,13 +104,13 @@ export const PaymentGatewayParams$outboundSchema: z.ZodType<
|
|
|
102
104
|
z.ZodTypeDef,
|
|
103
105
|
PaymentGatewayParams
|
|
104
106
|
> = z.union([
|
|
105
|
-
components.
|
|
106
|
-
z.object({ paymentGateway: z.literal("
|
|
107
|
+
components.JuspayPaymentGatewayParams$outboundSchema.and(
|
|
108
|
+
z.object({ paymentGateway: z.literal("JUSPAY") }).transform((v) => ({
|
|
107
109
|
payment_gateway: v.paymentGateway,
|
|
108
110
|
})),
|
|
109
111
|
),
|
|
110
|
-
components.
|
|
111
|
-
z.object({ paymentGateway: z.literal("
|
|
112
|
+
components.PayuPaymentGatewayParams$outboundSchema.and(
|
|
113
|
+
z.object({ paymentGateway: z.literal("PAYU") }).transform((v) => ({
|
|
112
114
|
payment_gateway: v.paymentGateway,
|
|
113
115
|
})),
|
|
114
116
|
),
|
|
@@ -154,13 +156,13 @@ export const CreateOrderRequestBody$inboundSchema: z.ZodType<
|
|
|
154
156
|
cart_id: z.string(),
|
|
155
157
|
payment_gateway: PaymentGateway$inboundSchema,
|
|
156
158
|
payment_gateway_params: z.union([
|
|
157
|
-
components.
|
|
158
|
-
z.object({ payment_gateway: z.literal("
|
|
159
|
+
components.JuspayPaymentGatewayParams$inboundSchema.and(
|
|
160
|
+
z.object({ payment_gateway: z.literal("JUSPAY") }).transform((v) => ({
|
|
159
161
|
paymentGateway: v.payment_gateway,
|
|
160
162
|
})),
|
|
161
163
|
),
|
|
162
|
-
components.
|
|
163
|
-
z.object({ payment_gateway: z.literal("
|
|
164
|
+
components.PayuPaymentGatewayParams$inboundSchema.and(
|
|
165
|
+
z.object({ payment_gateway: z.literal("PAYU") }).transform((v) => ({
|
|
164
166
|
paymentGateway: v.payment_gateway,
|
|
165
167
|
})),
|
|
166
168
|
),
|
|
@@ -178,11 +180,11 @@ export type CreateOrderRequestBody$Outbound = {
|
|
|
178
180
|
cart_id: string;
|
|
179
181
|
payment_gateway: string;
|
|
180
182
|
payment_gateway_params:
|
|
181
|
-
| (components.PayuPaymentGatewayParams$Outbound & {
|
|
182
|
-
payment_gateway: "PAYU";
|
|
183
|
-
})
|
|
184
183
|
| (components.JuspayPaymentGatewayParams$Outbound & {
|
|
185
184
|
payment_gateway: "JUSPAY";
|
|
185
|
+
})
|
|
186
|
+
| (components.PayuPaymentGatewayParams$Outbound & {
|
|
187
|
+
payment_gateway: "PAYU";
|
|
186
188
|
});
|
|
187
189
|
};
|
|
188
190
|
|
|
@@ -195,13 +197,13 @@ export const CreateOrderRequestBody$outboundSchema: z.ZodType<
|
|
|
195
197
|
cartId: z.string(),
|
|
196
198
|
paymentGateway: PaymentGateway$outboundSchema,
|
|
197
199
|
paymentGatewayParams: z.union([
|
|
198
|
-
components.
|
|
199
|
-
z.object({ paymentGateway: z.literal("
|
|
200
|
+
components.JuspayPaymentGatewayParams$outboundSchema.and(
|
|
201
|
+
z.object({ paymentGateway: z.literal("JUSPAY") }).transform((v) => ({
|
|
200
202
|
payment_gateway: v.paymentGateway,
|
|
201
203
|
})),
|
|
202
204
|
),
|
|
203
|
-
components.
|
|
204
|
-
z.object({ paymentGateway: z.literal("
|
|
205
|
+
components.PayuPaymentGatewayParams$outboundSchema.and(
|
|
206
|
+
z.object({ paymentGateway: z.literal("PAYU") }).transform((v) => ({
|
|
205
207
|
payment_gateway: v.paymentGateway,
|
|
206
208
|
})),
|
|
207
209
|
),
|
|
@@ -251,14 +253,14 @@ export const PaymentInfo$inboundSchema: z.ZodType<
|
|
|
251
253
|
z.ZodTypeDef,
|
|
252
254
|
unknown
|
|
253
255
|
> = z.union([
|
|
254
|
-
components.JuspayPaymentInfo$inboundSchema,
|
|
255
256
|
components.PayuPaymentInfo$inboundSchema,
|
|
257
|
+
components.JuspayPaymentInfo$inboundSchema,
|
|
256
258
|
]);
|
|
257
259
|
|
|
258
260
|
/** @internal */
|
|
259
261
|
export type PaymentInfo$Outbound =
|
|
260
|
-
| components.
|
|
261
|
-
| components.
|
|
262
|
+
| components.PayuPaymentInfo$Outbound
|
|
263
|
+
| components.JuspayPaymentInfo$Outbound;
|
|
262
264
|
|
|
263
265
|
/** @internal */
|
|
264
266
|
export const PaymentInfo$outboundSchema: z.ZodType<
|
|
@@ -266,8 +268,8 @@ export const PaymentInfo$outboundSchema: z.ZodType<
|
|
|
266
268
|
z.ZodTypeDef,
|
|
267
269
|
PaymentInfo
|
|
268
270
|
> = z.union([
|
|
269
|
-
components.JuspayPaymentInfo$outboundSchema,
|
|
270
271
|
components.PayuPaymentInfo$outboundSchema,
|
|
272
|
+
components.JuspayPaymentInfo$outboundSchema,
|
|
271
273
|
]);
|
|
272
274
|
|
|
273
275
|
/**
|
|
@@ -306,8 +308,8 @@ export const CreateOrderContent$inboundSchema: z.ZodType<
|
|
|
306
308
|
order: components.Order$inboundSchema,
|
|
307
309
|
payment_required: z.boolean(),
|
|
308
310
|
payment_info: z.union([
|
|
309
|
-
components.JuspayPaymentInfo$inboundSchema,
|
|
310
311
|
components.PayuPaymentInfo$inboundSchema,
|
|
312
|
+
components.JuspayPaymentInfo$inboundSchema,
|
|
311
313
|
]),
|
|
312
314
|
}).transform((v) => {
|
|
313
315
|
return remap$(v, {
|
|
@@ -321,8 +323,8 @@ export type CreateOrderContent$Outbound = {
|
|
|
321
323
|
order: components.Order$Outbound;
|
|
322
324
|
payment_required: boolean;
|
|
323
325
|
payment_info:
|
|
324
|
-
| components.
|
|
325
|
-
| components.
|
|
326
|
+
| components.PayuPaymentInfo$Outbound
|
|
327
|
+
| components.JuspayPaymentInfo$Outbound;
|
|
326
328
|
};
|
|
327
329
|
|
|
328
330
|
/** @internal */
|
|
@@ -334,8 +336,8 @@ export const CreateOrderContent$outboundSchema: z.ZodType<
|
|
|
334
336
|
order: components.Order$outboundSchema,
|
|
335
337
|
paymentRequired: z.boolean(),
|
|
336
338
|
paymentInfo: z.union([
|
|
337
|
-
components.JuspayPaymentInfo$outboundSchema,
|
|
338
339
|
components.PayuPaymentInfo$outboundSchema,
|
|
340
|
+
components.JuspayPaymentInfo$outboundSchema,
|
|
339
341
|
]),
|
|
340
342
|
}).transform((v) => {
|
|
341
343
|
return remap$(v, {
|
|
@@ -10,8 +10,8 @@ import * as components from "../components/index.js";
|
|
|
10
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
11
|
|
|
12
12
|
export type GenerateOtpRequestBody =
|
|
13
|
-
| components.
|
|
14
|
-
| components.
|
|
13
|
+
| components.GenerateOtpWithPhone
|
|
14
|
+
| components.GenerateOtpWithEmail;
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* An object containing the response content.
|
|
@@ -51,14 +51,14 @@ export const GenerateOtpRequestBody$inboundSchema: z.ZodType<
|
|
|
51
51
|
z.ZodTypeDef,
|
|
52
52
|
unknown
|
|
53
53
|
> = z.union([
|
|
54
|
-
components.GenerateOtpWithEmail$inboundSchema,
|
|
55
54
|
components.GenerateOtpWithPhone$inboundSchema,
|
|
55
|
+
components.GenerateOtpWithEmail$inboundSchema,
|
|
56
56
|
]);
|
|
57
57
|
|
|
58
58
|
/** @internal */
|
|
59
59
|
export type GenerateOtpRequestBody$Outbound =
|
|
60
|
-
| components.
|
|
61
|
-
| components.
|
|
60
|
+
| components.GenerateOtpWithPhone$Outbound
|
|
61
|
+
| components.GenerateOtpWithEmail$Outbound;
|
|
62
62
|
|
|
63
63
|
/** @internal */
|
|
64
64
|
export const GenerateOtpRequestBody$outboundSchema: z.ZodType<
|
|
@@ -66,8 +66,8 @@ export const GenerateOtpRequestBody$outboundSchema: z.ZodType<
|
|
|
66
66
|
z.ZodTypeDef,
|
|
67
67
|
GenerateOtpRequestBody
|
|
68
68
|
> = z.union([
|
|
69
|
-
components.GenerateOtpWithEmail$outboundSchema,
|
|
70
69
|
components.GenerateOtpWithPhone$outboundSchema,
|
|
70
|
+
components.GenerateOtpWithEmail$outboundSchema,
|
|
71
71
|
]);
|
|
72
72
|
|
|
73
73
|
/**
|
|
@@ -153,7 +153,7 @@ export const Address$inboundSchema: z.ZodType<Address, z.ZodTypeDef, unknown> =
|
|
|
153
153
|
pincode: z.string(),
|
|
154
154
|
city: z.string(),
|
|
155
155
|
state: z.string(),
|
|
156
|
-
country: z.literal("India").optional(),
|
|
156
|
+
country: z.literal("India").default("India").optional(),
|
|
157
157
|
tax_identification_number: z.nullable(z.string()),
|
|
158
158
|
business_name: z.nullable(z.string()),
|
|
159
159
|
is_phone_verified: z.boolean(),
|