ce-storefront 0.7.3 → 0.8.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 +93 -7
- package/bin/mcp-server.js +50005 -0
- package/bin/mcp-server.js.map +465 -0
- package/docs/sdks/catalog/README.md +0 -90
- package/esm/funcs/authCheckVerificationStatus.d.ts +2 -1
- package/esm/funcs/authCheckVerificationStatus.d.ts.map +1 -1
- package/esm/funcs/authCheckVerificationStatus.js +11 -7
- package/esm/funcs/authCheckVerificationStatus.js.map +1 -1
- package/esm/funcs/authCreateNotificationPreferences.d.ts +2 -1
- package/esm/funcs/authCreateNotificationPreferences.d.ts.map +1 -1
- package/esm/funcs/authCreateNotificationPreferences.js +11 -7
- package/esm/funcs/authCreateNotificationPreferences.js.map +1 -1
- package/esm/funcs/authGenerateOtp.d.ts +2 -1
- package/esm/funcs/authGenerateOtp.d.ts.map +1 -1
- package/esm/funcs/authGenerateOtp.js +11 -7
- package/esm/funcs/authGenerateOtp.js.map +1 -1
- package/esm/funcs/authGetAnonymousToken.d.ts +2 -1
- package/esm/funcs/authGetAnonymousToken.d.ts.map +1 -1
- package/esm/funcs/authGetAnonymousToken.js +10 -6
- package/esm/funcs/authGetAnonymousToken.js.map +1 -1
- package/esm/funcs/authGetNotificationPreferences.d.ts +2 -1
- package/esm/funcs/authGetNotificationPreferences.d.ts.map +1 -1
- package/esm/funcs/authGetNotificationPreferences.js +11 -7
- package/esm/funcs/authGetNotificationPreferences.js.map +1 -1
- package/esm/funcs/authGetUserDetail.d.ts +2 -1
- package/esm/funcs/authGetUserDetail.d.ts.map +1 -1
- package/esm/funcs/authGetUserDetail.js +11 -7
- package/esm/funcs/authGetUserDetail.js.map +1 -1
- package/esm/funcs/authLoginWithEmail.d.ts +2 -1
- package/esm/funcs/authLoginWithEmail.d.ts.map +1 -1
- package/esm/funcs/authLoginWithEmail.js +11 -7
- package/esm/funcs/authLoginWithEmail.js.map +1 -1
- package/esm/funcs/authLoginWithPhone.d.ts +2 -1
- package/esm/funcs/authLoginWithPhone.d.ts.map +1 -1
- package/esm/funcs/authLoginWithPhone.js +11 -7
- package/esm/funcs/authLoginWithPhone.js.map +1 -1
- package/esm/funcs/authLoginWithWhatsapp.d.ts +2 -1
- package/esm/funcs/authLoginWithWhatsapp.d.ts.map +1 -1
- package/esm/funcs/authLoginWithWhatsapp.js +11 -7
- package/esm/funcs/authLoginWithWhatsapp.js.map +1 -1
- package/esm/funcs/authLogout.d.ts +2 -1
- package/esm/funcs/authLogout.d.ts.map +1 -1
- package/esm/funcs/authLogout.js +10 -6
- package/esm/funcs/authLogout.js.map +1 -1
- package/esm/funcs/authRefreshToken.d.ts +2 -1
- package/esm/funcs/authRefreshToken.d.ts.map +1 -1
- package/esm/funcs/authRefreshToken.js +11 -7
- package/esm/funcs/authRefreshToken.js.map +1 -1
- package/esm/funcs/authUpdateNotificationPreferences.d.ts +2 -1
- package/esm/funcs/authUpdateNotificationPreferences.d.ts.map +1 -1
- package/esm/funcs/authUpdateNotificationPreferences.js +11 -7
- package/esm/funcs/authUpdateNotificationPreferences.js.map +1 -1
- package/esm/funcs/authUpdateUser.d.ts +2 -1
- package/esm/funcs/authUpdateUser.d.ts.map +1 -1
- package/esm/funcs/authUpdateUser.js +11 -7
- package/esm/funcs/authUpdateUser.js.map +1 -1
- package/esm/funcs/authVerifyOtp.d.ts +2 -1
- package/esm/funcs/authVerifyOtp.d.ts.map +1 -1
- package/esm/funcs/authVerifyOtp.js +11 -7
- package/esm/funcs/authVerifyOtp.js.map +1 -1
- package/esm/funcs/campaignsSubscribeNewsletter.d.ts +2 -1
- package/esm/funcs/campaignsSubscribeNewsletter.d.ts.map +1 -1
- package/esm/funcs/campaignsSubscribeNewsletter.js +11 -7
- package/esm/funcs/campaignsSubscribeNewsletter.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 +11 -7
- package/esm/funcs/cartsApplyCoupon.js.map +1 -1
- package/esm/funcs/cartsCreateCart.d.ts +2 -1
- package/esm/funcs/cartsCreateCart.d.ts.map +1 -1
- package/esm/funcs/cartsCreateCart.js +11 -7
- 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 +11 -7
- 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 +11 -7
- 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 +11 -7
- 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 +11 -7
- package/esm/funcs/cartsGetUserCart.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 +11 -7
- package/esm/funcs/cartsRemoveCoupon.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 +11 -7
- 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 +11 -7
- 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 +11 -7
- 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 +11 -7
- package/esm/funcs/catalogGetVariantDetail.js.map +1 -1
- package/esm/funcs/catalogListCategories.d.ts +2 -1
- package/esm/funcs/catalogListCategories.d.ts.map +1 -1
- package/esm/funcs/catalogListCategories.js +11 -7
- 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 +11 -7
- 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 +11 -7
- 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 +11 -7
- 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 +11 -7
- 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 +11 -7
- 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 +11 -7
- 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 +11 -7
- 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 +11 -7
- package/esm/funcs/catalogSearchProducts.js.map +1 -1
- package/esm/funcs/commonListCountryPincodes.d.ts +2 -1
- package/esm/funcs/commonListCountryPincodes.d.ts.map +1 -1
- package/esm/funcs/commonListCountryPincodes.js +11 -7
- 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 +11 -7
- 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 +11 -7
- 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 +11 -7
- package/esm/funcs/customersGetAddressDetail.js.map +1 -1
- package/esm/funcs/customersListAddresses.d.ts +2 -1
- package/esm/funcs/customersListAddresses.d.ts.map +1 -1
- package/esm/funcs/customersListAddresses.js +11 -7
- package/esm/funcs/customersListAddresses.js.map +1 -1
- package/esm/funcs/customersListUserReviews.d.ts +2 -1
- package/esm/funcs/customersListUserReviews.d.ts.map +1 -1
- package/esm/funcs/customersListUserReviews.js +11 -7
- 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 +11 -7
- 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 +11 -7
- 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 +11 -7
- 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 +11 -7
- package/esm/funcs/ordersGetOrderDetail.js.map +1 -1
- package/esm/funcs/ordersGetPaymentStatus.d.ts +2 -1
- package/esm/funcs/ordersGetPaymentStatus.d.ts.map +1 -1
- package/esm/funcs/ordersGetPaymentStatus.js +11 -7
- 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 +11 -7
- package/esm/funcs/ordersListOrderShipments.js.map +1 -1
- package/esm/funcs/ordersListOrders.d.ts +2 -1
- package/esm/funcs/ordersListOrders.d.ts.map +1 -1
- package/esm/funcs/ordersListOrders.js +11 -7
- 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 +11 -7
- 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 +11 -7
- package/esm/funcs/shippingCheckDeliveryAvailability.js.map +1 -1
- package/esm/hooks/types.d.ts +1 -1
- package/esm/hooks/types.d.ts.map +1 -1
- package/esm/lib/config.d.ts +7 -7
- package/esm/lib/config.d.ts.map +1 -1
- package/esm/lib/config.js +3 -3
- package/esm/lib/files.js.map +1 -1
- package/esm/lib/primitives.d.ts +3 -0
- package/esm/lib/primitives.d.ts.map +1 -1
- package/esm/lib/primitives.js +6 -0
- package/esm/lib/primitives.js.map +1 -1
- package/esm/lib/sdks.d.ts +1 -1
- package/esm/lib/sdks.d.ts.map +1 -1
- package/esm/lib/sdks.js +2 -8
- package/esm/lib/sdks.js.map +1 -1
- package/esm/lib/security.d.ts +4 -3
- package/esm/lib/security.d.ts.map +1 -1
- package/esm/lib/security.js +6 -1
- package/esm/lib/security.js.map +1 -1
- package/esm/mcp-server/build.d.mts.map +1 -0
- package/esm/mcp-server/build.mjs +14 -0
- package/esm/mcp-server/build.mjs.map +1 -0
- package/esm/mcp-server/cli/start/command.d.ts +2 -0
- package/esm/mcp-server/cli/start/command.d.ts.map +1 -0
- package/esm/mcp-server/cli/start/command.js +108 -0
- package/esm/mcp-server/cli/start/command.js.map +1 -0
- package/esm/mcp-server/cli/start/impl.d.ts +19 -0
- package/esm/mcp-server/cli/start/impl.d.ts.map +1 -0
- package/esm/mcp-server/cli/start/impl.js +100 -0
- package/esm/mcp-server/cli/start/impl.js.map +1 -0
- package/esm/mcp-server/cli.d.ts +6 -0
- package/esm/mcp-server/cli.d.ts.map +1 -0
- package/esm/mcp-server/cli.js +7 -0
- package/esm/mcp-server/cli.js.map +1 -0
- package/esm/mcp-server/console-logger.d.ts +7 -0
- package/esm/mcp-server/console-logger.d.ts.map +1 -0
- package/esm/mcp-server/console-logger.js +55 -0
- package/esm/mcp-server/console-logger.js.map +1 -0
- package/esm/mcp-server/extensions.d.ts +11 -0
- package/esm/mcp-server/extensions.d.ts.map +1 -0
- package/esm/mcp-server/extensions.js +5 -0
- package/esm/mcp-server/extensions.js.map +1 -0
- package/esm/mcp-server/mcp-server.d.ts +2 -0
- package/esm/mcp-server/mcp-server.d.ts.map +1 -0
- package/esm/mcp-server/mcp-server.js +23 -0
- package/esm/mcp-server/mcp-server.js.map +1 -0
- package/esm/mcp-server/prompts.d.ts +26 -0
- package/esm/mcp-server/prompts.d.ts.map +1 -0
- package/esm/mcp-server/prompts.js +43 -0
- package/esm/mcp-server/prompts.js.map +1 -0
- package/esm/mcp-server/resources.d.ts +32 -0
- package/esm/mcp-server/resources.d.ts.map +1 -0
- package/esm/mcp-server/resources.js +74 -0
- package/esm/mcp-server/resources.js.map +1 -0
- package/esm/mcp-server/scopes.d.ts +3 -0
- package/esm/mcp-server/scopes.d.ts.map +1 -0
- package/esm/mcp-server/scopes.js +5 -0
- package/esm/mcp-server/scopes.js.map +1 -0
- package/esm/mcp-server/server.d.ts +14 -0
- package/esm/mcp-server/server.d.ts.map +1 -0
- package/esm/mcp-server/server.js +129 -0
- package/esm/mcp-server/server.js.map +1 -0
- package/esm/mcp-server/shared.d.ts +7 -0
- package/esm/mcp-server/shared.d.ts.map +1 -0
- package/esm/mcp-server/shared.js +59 -0
- package/esm/mcp-server/shared.js.map +1 -0
- package/esm/mcp-server/tools/authCheckVerificationStatus.d.ts +8 -0
- package/esm/mcp-server/tools/authCheckVerificationStatus.d.ts.map +1 -0
- package/esm/mcp-server/tools/authCheckVerificationStatus.js +28 -0
- package/esm/mcp-server/tools/authCheckVerificationStatus.js.map +1 -0
- package/esm/mcp-server/tools/authCreateNotificationPreferences.d.ts +8 -0
- package/esm/mcp-server/tools/authCreateNotificationPreferences.d.ts.map +1 -0
- package/esm/mcp-server/tools/authCreateNotificationPreferences.js +28 -0
- package/esm/mcp-server/tools/authCreateNotificationPreferences.js.map +1 -0
- package/esm/mcp-server/tools/authGenerateOtp.d.ts +8 -0
- package/esm/mcp-server/tools/authGenerateOtp.d.ts.map +1 -0
- package/esm/mcp-server/tools/authGenerateOtp.js +28 -0
- package/esm/mcp-server/tools/authGenerateOtp.js.map +1 -0
- package/esm/mcp-server/tools/authGetNotificationPreferences.d.ts +8 -0
- package/esm/mcp-server/tools/authGetNotificationPreferences.d.ts.map +1 -0
- package/esm/mcp-server/tools/authGetNotificationPreferences.js +28 -0
- package/esm/mcp-server/tools/authGetNotificationPreferences.js.map +1 -0
- package/esm/mcp-server/tools/authGetUserDetail.d.ts +8 -0
- package/esm/mcp-server/tools/authGetUserDetail.d.ts.map +1 -0
- package/esm/mcp-server/tools/authGetUserDetail.js +28 -0
- package/esm/mcp-server/tools/authGetUserDetail.js.map +1 -0
- package/esm/mcp-server/tools/authLoginWithEmail.d.ts +8 -0
- package/esm/mcp-server/tools/authLoginWithEmail.d.ts.map +1 -0
- package/esm/mcp-server/tools/authLoginWithEmail.js +28 -0
- package/esm/mcp-server/tools/authLoginWithEmail.js.map +1 -0
- package/esm/mcp-server/tools/authLoginWithPhone.d.ts +8 -0
- package/esm/mcp-server/tools/authLoginWithPhone.d.ts.map +1 -0
- package/esm/mcp-server/tools/authLoginWithPhone.js +28 -0
- package/esm/mcp-server/tools/authLoginWithPhone.js.map +1 -0
- package/esm/mcp-server/tools/authLoginWithWhatsapp.d.ts +8 -0
- package/esm/mcp-server/tools/authLoginWithWhatsapp.d.ts.map +1 -0
- package/esm/mcp-server/tools/authLoginWithWhatsapp.js +28 -0
- package/esm/mcp-server/tools/authLoginWithWhatsapp.js.map +1 -0
- package/esm/mcp-server/tools/authLogout.d.ts +3 -0
- package/esm/mcp-server/tools/authLogout.d.ts.map +1 -0
- package/esm/mcp-server/tools/authLogout.js +23 -0
- package/esm/mcp-server/tools/authLogout.js.map +1 -0
- package/esm/mcp-server/tools/authRefreshToken.d.ts +8 -0
- package/esm/mcp-server/tools/authRefreshToken.d.ts.map +1 -0
- package/esm/mcp-server/tools/authRefreshToken.js +28 -0
- package/esm/mcp-server/tools/authRefreshToken.js.map +1 -0
- package/esm/mcp-server/tools/authUpdateNotificationPreferences.d.ts +8 -0
- package/esm/mcp-server/tools/authUpdateNotificationPreferences.d.ts.map +1 -0
- package/esm/mcp-server/tools/authUpdateNotificationPreferences.js +28 -0
- package/esm/mcp-server/tools/authUpdateNotificationPreferences.js.map +1 -0
- package/esm/mcp-server/tools/authUpdateUser.d.ts +8 -0
- package/esm/mcp-server/tools/authUpdateUser.d.ts.map +1 -0
- package/esm/mcp-server/tools/authUpdateUser.js +28 -0
- package/esm/mcp-server/tools/authUpdateUser.js.map +1 -0
- package/esm/mcp-server/tools/authVerifyOtp.d.ts +8 -0
- package/esm/mcp-server/tools/authVerifyOtp.d.ts.map +1 -0
- package/esm/mcp-server/tools/authVerifyOtp.js +28 -0
- package/esm/mcp-server/tools/authVerifyOtp.js.map +1 -0
- package/esm/mcp-server/tools/campaignsSubscribeNewsletter.d.ts +8 -0
- package/esm/mcp-server/tools/campaignsSubscribeNewsletter.d.ts.map +1 -0
- package/esm/mcp-server/tools/campaignsSubscribeNewsletter.js +28 -0
- package/esm/mcp-server/tools/campaignsSubscribeNewsletter.js.map +1 -0
- package/esm/mcp-server/tools/cartsApplyCoupon.d.ts +8 -0
- package/esm/mcp-server/tools/cartsApplyCoupon.d.ts.map +1 -0
- package/esm/mcp-server/tools/cartsApplyCoupon.js +28 -0
- package/esm/mcp-server/tools/cartsApplyCoupon.js.map +1 -0
- package/esm/mcp-server/tools/cartsCreateCart.d.ts +8 -0
- package/esm/mcp-server/tools/cartsCreateCart.d.ts.map +1 -0
- package/esm/mcp-server/tools/cartsCreateCart.js +28 -0
- package/esm/mcp-server/tools/cartsCreateCart.js.map +1 -0
- package/esm/mcp-server/tools/cartsCreateCartAddress.d.ts +8 -0
- package/esm/mcp-server/tools/cartsCreateCartAddress.d.ts.map +1 -0
- package/esm/mcp-server/tools/cartsCreateCartAddress.js +28 -0
- package/esm/mcp-server/tools/cartsCreateCartAddress.js.map +1 -0
- package/esm/mcp-server/tools/cartsDeleteCart.d.ts +8 -0
- package/esm/mcp-server/tools/cartsDeleteCart.d.ts.map +1 -0
- package/esm/mcp-server/tools/cartsDeleteCart.js +28 -0
- package/esm/mcp-server/tools/cartsDeleteCart.js.map +1 -0
- package/esm/mcp-server/tools/cartsGetCart.d.ts +8 -0
- package/esm/mcp-server/tools/cartsGetCart.d.ts.map +1 -0
- package/esm/mcp-server/tools/cartsGetCart.js +28 -0
- package/esm/mcp-server/tools/cartsGetCart.js.map +1 -0
- package/esm/mcp-server/tools/cartsGetUserCart.d.ts +8 -0
- package/esm/mcp-server/tools/cartsGetUserCart.d.ts.map +1 -0
- package/esm/mcp-server/tools/cartsGetUserCart.js +28 -0
- package/esm/mcp-server/tools/cartsGetUserCart.js.map +1 -0
- package/esm/mcp-server/tools/cartsRemoveCoupon.d.ts +8 -0
- package/esm/mcp-server/tools/cartsRemoveCoupon.d.ts.map +1 -0
- package/esm/mcp-server/tools/cartsRemoveCoupon.js +28 -0
- package/esm/mcp-server/tools/cartsRemoveCoupon.js.map +1 -0
- package/esm/mcp-server/tools/cartsRemoveUserCart.d.ts +8 -0
- package/esm/mcp-server/tools/cartsRemoveUserCart.d.ts.map +1 -0
- package/esm/mcp-server/tools/cartsRemoveUserCart.js +28 -0
- package/esm/mcp-server/tools/cartsRemoveUserCart.js.map +1 -0
- package/esm/mcp-server/tools/cartsUpdateCart.d.ts +8 -0
- package/esm/mcp-server/tools/cartsUpdateCart.d.ts.map +1 -0
- package/esm/mcp-server/tools/cartsUpdateCart.js +28 -0
- package/esm/mcp-server/tools/cartsUpdateCart.js.map +1 -0
- package/esm/mcp-server/tools/catalogGetProductDetail.d.ts +8 -0
- package/esm/mcp-server/tools/catalogGetProductDetail.d.ts.map +1 -0
- package/esm/mcp-server/tools/catalogGetProductDetail.js +28 -0
- package/esm/mcp-server/tools/catalogGetProductDetail.js.map +1 -0
- package/esm/mcp-server/tools/catalogGetVariantDetail.d.ts +8 -0
- package/esm/mcp-server/tools/catalogGetVariantDetail.d.ts.map +1 -0
- package/esm/mcp-server/tools/catalogGetVariantDetail.js +28 -0
- package/esm/mcp-server/tools/catalogGetVariantDetail.js.map +1 -0
- package/esm/mcp-server/tools/catalogListCategories.d.ts +8 -0
- package/esm/mcp-server/tools/catalogListCategories.d.ts.map +1 -0
- package/esm/mcp-server/tools/catalogListCategories.js +28 -0
- package/esm/mcp-server/tools/catalogListCategories.js.map +1 -0
- package/esm/mcp-server/tools/catalogListCrosssellProducts.d.ts +8 -0
- package/esm/mcp-server/tools/catalogListCrosssellProducts.d.ts.map +1 -0
- package/esm/mcp-server/tools/catalogListCrosssellProducts.js +28 -0
- package/esm/mcp-server/tools/catalogListCrosssellProducts.js.map +1 -0
- package/esm/mcp-server/tools/catalogListProductReviews.d.ts +8 -0
- package/esm/mcp-server/tools/catalogListProductReviews.d.ts.map +1 -0
- package/esm/mcp-server/tools/catalogListProductReviews.js +28 -0
- package/esm/mcp-server/tools/catalogListProductReviews.js.map +1 -0
- package/esm/mcp-server/tools/catalogListProductVariants.d.ts +8 -0
- package/esm/mcp-server/tools/catalogListProductVariants.d.ts.map +1 -0
- package/esm/mcp-server/tools/catalogListProductVariants.js +28 -0
- package/esm/mcp-server/tools/catalogListProductVariants.js.map +1 -0
- package/esm/mcp-server/tools/catalogListProducts.d.ts +8 -0
- package/esm/mcp-server/tools/catalogListProducts.d.ts.map +1 -0
- package/esm/mcp-server/tools/catalogListProducts.js +28 -0
- package/esm/mcp-server/tools/catalogListProducts.js.map +1 -0
- package/esm/mcp-server/tools/catalogListSimilarProducts.d.ts +8 -0
- package/esm/mcp-server/tools/catalogListSimilarProducts.d.ts.map +1 -0
- package/esm/mcp-server/tools/catalogListSimilarProducts.js +28 -0
- package/esm/mcp-server/tools/catalogListSimilarProducts.js.map +1 -0
- package/esm/mcp-server/tools/catalogListSkus.d.ts +8 -0
- package/esm/mcp-server/tools/catalogListSkus.d.ts.map +1 -0
- package/esm/mcp-server/tools/catalogListSkus.js +28 -0
- package/esm/mcp-server/tools/catalogListSkus.js.map +1 -0
- package/esm/mcp-server/tools/catalogListUpsellProducts.d.ts +8 -0
- package/esm/mcp-server/tools/catalogListUpsellProducts.d.ts.map +1 -0
- package/esm/mcp-server/tools/catalogListUpsellProducts.js +28 -0
- package/esm/mcp-server/tools/catalogListUpsellProducts.js.map +1 -0
- package/esm/mcp-server/tools/catalogSearchProducts.d.ts +8 -0
- package/esm/mcp-server/tools/catalogSearchProducts.d.ts.map +1 -0
- package/esm/mcp-server/tools/catalogSearchProducts.js +28 -0
- package/esm/mcp-server/tools/catalogSearchProducts.js.map +1 -0
- package/esm/mcp-server/tools/commonListCountryPincodes.d.ts +8 -0
- package/esm/mcp-server/tools/commonListCountryPincodes.d.ts.map +1 -0
- package/esm/mcp-server/tools/commonListCountryPincodes.js +28 -0
- package/esm/mcp-server/tools/commonListCountryPincodes.js.map +1 -0
- package/esm/mcp-server/tools/customersCreateAddress.d.ts +8 -0
- package/esm/mcp-server/tools/customersCreateAddress.d.ts.map +1 -0
- package/esm/mcp-server/tools/customersCreateAddress.js +28 -0
- package/esm/mcp-server/tools/customersCreateAddress.js.map +1 -0
- package/esm/mcp-server/tools/customersDeleteAddress.d.ts +8 -0
- package/esm/mcp-server/tools/customersDeleteAddress.d.ts.map +1 -0
- package/esm/mcp-server/tools/customersDeleteAddress.js +28 -0
- package/esm/mcp-server/tools/customersDeleteAddress.js.map +1 -0
- package/esm/mcp-server/tools/customersGetAddressDetail.d.ts +8 -0
- package/esm/mcp-server/tools/customersGetAddressDetail.d.ts.map +1 -0
- package/esm/mcp-server/tools/customersGetAddressDetail.js +28 -0
- package/esm/mcp-server/tools/customersGetAddressDetail.js.map +1 -0
- package/esm/mcp-server/tools/customersListAddresses.d.ts +8 -0
- package/esm/mcp-server/tools/customersListAddresses.d.ts.map +1 -0
- package/esm/mcp-server/tools/customersListAddresses.js +28 -0
- package/esm/mcp-server/tools/customersListAddresses.js.map +1 -0
- package/esm/mcp-server/tools/customersListUserReviews.d.ts +8 -0
- package/esm/mcp-server/tools/customersListUserReviews.d.ts.map +1 -0
- package/esm/mcp-server/tools/customersListUserReviews.js +28 -0
- package/esm/mcp-server/tools/customersListUserReviews.js.map +1 -0
- package/esm/mcp-server/tools/customersUpdateAddressDetail.d.ts +8 -0
- package/esm/mcp-server/tools/customersUpdateAddressDetail.d.ts.map +1 -0
- package/esm/mcp-server/tools/customersUpdateAddressDetail.js +28 -0
- package/esm/mcp-server/tools/customersUpdateAddressDetail.js.map +1 -0
- package/esm/mcp-server/tools/ordersCancelOrder.d.ts +8 -0
- package/esm/mcp-server/tools/ordersCancelOrder.d.ts.map +1 -0
- package/esm/mcp-server/tools/ordersCancelOrder.js +28 -0
- package/esm/mcp-server/tools/ordersCancelOrder.js.map +1 -0
- package/esm/mcp-server/tools/ordersCreateOrder.d.ts +8 -0
- package/esm/mcp-server/tools/ordersCreateOrder.d.ts.map +1 -0
- package/esm/mcp-server/tools/ordersCreateOrder.js +28 -0
- package/esm/mcp-server/tools/ordersCreateOrder.js.map +1 -0
- package/esm/mcp-server/tools/ordersGetOrderDetail.d.ts +8 -0
- package/esm/mcp-server/tools/ordersGetOrderDetail.d.ts.map +1 -0
- package/esm/mcp-server/tools/ordersGetOrderDetail.js +28 -0
- package/esm/mcp-server/tools/ordersGetOrderDetail.js.map +1 -0
- package/esm/mcp-server/tools/ordersGetPaymentStatus.d.ts +8 -0
- package/esm/mcp-server/tools/ordersGetPaymentStatus.d.ts.map +1 -0
- package/esm/mcp-server/tools/ordersGetPaymentStatus.js +28 -0
- package/esm/mcp-server/tools/ordersGetPaymentStatus.js.map +1 -0
- package/esm/mcp-server/tools/ordersListOrderShipments.d.ts +8 -0
- package/esm/mcp-server/tools/ordersListOrderShipments.d.ts.map +1 -0
- package/esm/mcp-server/tools/ordersListOrderShipments.js +28 -0
- package/esm/mcp-server/tools/ordersListOrderShipments.js.map +1 -0
- package/esm/mcp-server/tools/ordersListOrders.d.ts +8 -0
- package/esm/mcp-server/tools/ordersListOrders.d.ts.map +1 -0
- package/esm/mcp-server/tools/ordersListOrders.js +28 -0
- package/esm/mcp-server/tools/ordersListOrders.js.map +1 -0
- package/esm/mcp-server/tools/ordersRetryOrderPayment.d.ts +8 -0
- package/esm/mcp-server/tools/ordersRetryOrderPayment.d.ts.map +1 -0
- package/esm/mcp-server/tools/ordersRetryOrderPayment.js +28 -0
- package/esm/mcp-server/tools/ordersRetryOrderPayment.js.map +1 -0
- package/esm/mcp-server/tools/shippingCheckDeliveryAvailability.d.ts +8 -0
- package/esm/mcp-server/tools/shippingCheckDeliveryAvailability.d.ts.map +1 -0
- package/esm/mcp-server/tools/shippingCheckDeliveryAvailability.js +28 -0
- package/esm/mcp-server/tools/shippingCheckDeliveryAvailability.js.map +1 -0
- package/esm/mcp-server/tools.d.ts +25 -0
- package/esm/mcp-server/tools.d.ts.map +1 -0
- package/esm/mcp-server/tools.js +77 -0
- package/esm/mcp-server/tools.js.map +1 -0
- package/esm/models/components/index.d.ts +1 -2
- package/esm/models/components/index.d.ts.map +1 -1
- package/esm/models/components/index.js +1 -2
- package/esm/models/components/index.js.map +1 -1
- package/esm/models/components/{sku.d.ts → item.d.ts} +22 -22
- package/esm/models/components/item.d.ts.map +1 -0
- package/esm/models/components/{sku.js → item.js} +26 -27
- package/esm/models/components/item.js.map +1 -0
- package/esm/models/components/juspaypaymentinfo.d.ts +9 -9
- package/esm/models/components/juspaypaymentinfo.js +3 -3
- package/esm/models/components/juspaypaymentinfo.js.map +1 -1
- package/esm/models/components/productdetail.d.ts +2 -2
- package/esm/models/components/productdetail.d.ts.map +1 -1
- package/esm/models/components/productdetail.js +2 -2
- package/esm/models/components/productdetail.js.map +1 -1
- package/esm/models/operations/index.d.ts +0 -1
- package/esm/models/operations/index.d.ts.map +1 -1
- package/esm/models/operations/index.js +0 -1
- package/esm/models/operations/index.js.map +1 -1
- package/esm/models/operations/listaddresses.d.ts +2 -2
- package/esm/models/operations/listaddresses.d.ts.map +1 -1
- package/esm/models/operations/listaddresses.js +2 -2
- package/esm/models/operations/listaddresses.js.map +1 -1
- package/esm/models/operations/listcrosssellproducts.d.ts +2 -2
- package/esm/models/operations/listcrosssellproducts.d.ts.map +1 -1
- package/esm/models/operations/listcrosssellproducts.js +2 -2
- package/esm/models/operations/listcrosssellproducts.js.map +1 -1
- package/esm/models/operations/listsimilarproducts.d.ts +2 -2
- package/esm/models/operations/listsimilarproducts.d.ts.map +1 -1
- package/esm/models/operations/listsimilarproducts.js +2 -2
- package/esm/models/operations/listsimilarproducts.js.map +1 -1
- package/esm/models/operations/listskus.d.ts +2 -2
- package/esm/models/operations/listskus.d.ts.map +1 -1
- package/esm/models/operations/listskus.js +2 -2
- package/esm/models/operations/listskus.js.map +1 -1
- package/esm/models/operations/listupsellproducts.d.ts +2 -2
- package/esm/models/operations/listupsellproducts.d.ts.map +1 -1
- package/esm/models/operations/listupsellproducts.js +2 -2
- package/esm/models/operations/listupsellproducts.js.map +1 -1
- package/esm/models/operations/searchproducts.d.ts +2 -2
- package/esm/models/operations/searchproducts.d.ts.map +1 -1
- package/esm/models/operations/searchproducts.js +2 -2
- package/esm/models/operations/searchproducts.js.map +1 -1
- package/esm/sdk/catalog.d.ts +0 -7
- package/esm/sdk/catalog.d.ts.map +1 -1
- package/esm/sdk/catalog.js +0 -10
- package/esm/sdk/catalog.js.map +1 -1
- package/esm/types/async.d.ts +23 -0
- package/esm/types/async.d.ts.map +1 -0
- package/esm/types/async.js +40 -0
- package/esm/types/async.js.map +1 -0
- package/jsr.json +1 -1
- package/package.json +16 -2
- package/src/funcs/authCheckVerificationStatus.ts +35 -8
- package/src/funcs/authCreateNotificationPreferences.ts +35 -8
- package/src/funcs/authGenerateOtp.ts +35 -8
- package/src/funcs/authGetAnonymousToken.ts +34 -7
- package/src/funcs/authGetNotificationPreferences.ts +35 -8
- package/src/funcs/authGetUserDetail.ts +35 -8
- package/src/funcs/authLoginWithEmail.ts +35 -8
- package/src/funcs/authLoginWithPhone.ts +35 -8
- package/src/funcs/authLoginWithWhatsapp.ts +35 -8
- package/src/funcs/authLogout.ts +32 -7
- package/src/funcs/authRefreshToken.ts +35 -8
- package/src/funcs/authUpdateNotificationPreferences.ts +35 -8
- package/src/funcs/authUpdateUser.ts +35 -8
- package/src/funcs/authVerifyOtp.ts +35 -8
- package/src/funcs/campaignsSubscribeNewsletter.ts +35 -8
- package/src/funcs/cartsApplyCoupon.ts +37 -8
- package/src/funcs/cartsCreateCart.ts +35 -8
- package/src/funcs/cartsCreateCartAddress.ts +38 -8
- package/src/funcs/cartsDeleteCart.ts +37 -8
- package/src/funcs/cartsGetCart.ts +37 -8
- package/src/funcs/cartsGetUserCart.ts +37 -8
- package/src/funcs/cartsRemoveCoupon.ts +37 -8
- package/src/funcs/cartsRemoveUserCart.ts +37 -8
- package/src/funcs/cartsUpdateCart.ts +38 -8
- package/src/funcs/catalogGetProductDetail.ts +37 -8
- package/src/funcs/catalogGetVariantDetail.ts +37 -8
- package/src/funcs/catalogListCategories.ts +35 -8
- package/src/funcs/catalogListCrosssellProducts.ts +37 -8
- package/src/funcs/catalogListProductReviews.ts +37 -8
- package/src/funcs/catalogListProductVariants.ts +37 -8
- package/src/funcs/catalogListProducts.ts +37 -8
- package/src/funcs/catalogListSimilarProducts.ts +37 -8
- package/src/funcs/catalogListSkus.ts +37 -8
- package/src/funcs/catalogListUpsellProducts.ts +37 -8
- package/src/funcs/catalogSearchProducts.ts +36 -8
- package/src/funcs/commonListCountryPincodes.ts +35 -8
- package/src/funcs/customersCreateAddress.ts +37 -8
- package/src/funcs/customersDeleteAddress.ts +37 -8
- package/src/funcs/customersGetAddressDetail.ts +37 -8
- package/src/funcs/customersListAddresses.ts +35 -8
- package/src/funcs/customersListUserReviews.ts +35 -8
- package/src/funcs/customersUpdateAddressDetail.ts +38 -8
- package/src/funcs/ordersCancelOrder.ts +37 -8
- package/src/funcs/ordersCreateOrder.ts +38 -8
- package/src/funcs/ordersGetOrderDetail.ts +37 -8
- package/src/funcs/ordersGetPaymentStatus.ts +35 -8
- package/src/funcs/ordersListOrderShipments.ts +37 -8
- package/src/funcs/ordersListOrders.ts +35 -8
- package/src/funcs/ordersRetryOrderPayment.ts +38 -8
- package/src/funcs/shippingCheckDeliveryAvailability.ts +36 -8
- package/src/hooks/types.ts +1 -1
- package/src/lib/config.ts +7 -7
- package/src/lib/files.ts +1 -1
- package/src/lib/primitives.ts +14 -0
- package/src/lib/sdks.ts +3 -8
- package/src/lib/security.ts +11 -3
- package/src/mcp-server/cli/start/command.ts +113 -0
- package/src/mcp-server/cli/start/impl.ts +137 -0
- package/src/mcp-server/cli.ts +13 -0
- package/src/mcp-server/console-logger.ts +71 -0
- package/src/mcp-server/extensions.ts +17 -0
- package/src/mcp-server/mcp-server.ts +26 -0
- package/src/mcp-server/prompts.ts +110 -0
- package/src/mcp-server/resources.ts +158 -0
- package/src/mcp-server/scopes.ts +7 -0
- package/src/mcp-server/server.ts +159 -0
- package/src/mcp-server/shared.ts +75 -0
- package/src/mcp-server/tools/authCheckVerificationStatus.ts +37 -0
- package/src/mcp-server/tools/authCreateNotificationPreferences.ts +39 -0
- package/src/mcp-server/tools/authGenerateOtp.ts +37 -0
- package/src/mcp-server/tools/authGetNotificationPreferences.ts +38 -0
- package/src/mcp-server/tools/authGetUserDetail.ts +37 -0
- package/src/mcp-server/tools/authLoginWithEmail.ts +37 -0
- package/src/mcp-server/tools/authLoginWithPhone.ts +37 -0
- package/src/mcp-server/tools/authLoginWithWhatsapp.ts +37 -0
- package/src/mcp-server/tools/authLogout.ts +30 -0
- package/src/mcp-server/tools/authRefreshToken.ts +37 -0
- package/src/mcp-server/tools/authUpdateNotificationPreferences.ts +39 -0
- package/src/mcp-server/tools/authUpdateUser.ts +37 -0
- package/src/mcp-server/tools/authVerifyOtp.ts +37 -0
- package/src/mcp-server/tools/campaignsSubscribeNewsletter.ts +37 -0
- package/src/mcp-server/tools/cartsApplyCoupon.ts +37 -0
- package/src/mcp-server/tools/cartsCreateCart.ts +37 -0
- package/src/mcp-server/tools/cartsCreateCartAddress.ts +37 -0
- package/src/mcp-server/tools/cartsDeleteCart.ts +37 -0
- package/src/mcp-server/tools/cartsGetCart.ts +37 -0
- package/src/mcp-server/tools/cartsGetUserCart.ts +37 -0
- package/src/mcp-server/tools/cartsRemoveCoupon.ts +37 -0
- package/src/mcp-server/tools/cartsRemoveUserCart.ts +37 -0
- package/src/mcp-server/tools/cartsUpdateCart.ts +37 -0
- package/src/mcp-server/tools/catalogGetProductDetail.ts +37 -0
- package/src/mcp-server/tools/catalogGetVariantDetail.ts +37 -0
- package/src/mcp-server/tools/catalogListCategories.ts +37 -0
- package/src/mcp-server/tools/catalogListCrosssellProducts.ts +37 -0
- package/src/mcp-server/tools/catalogListProductReviews.ts +37 -0
- package/src/mcp-server/tools/catalogListProductVariants.ts +37 -0
- package/src/mcp-server/tools/catalogListProducts.ts +37 -0
- package/src/mcp-server/tools/catalogListSimilarProducts.ts +37 -0
- package/src/mcp-server/tools/catalogListSkus.ts +37 -0
- package/src/mcp-server/tools/catalogListUpsellProducts.ts +37 -0
- package/src/mcp-server/tools/catalogSearchProducts.ts +37 -0
- package/src/mcp-server/tools/commonListCountryPincodes.ts +37 -0
- package/src/mcp-server/tools/customersCreateAddress.ts +37 -0
- package/src/mcp-server/tools/customersDeleteAddress.ts +37 -0
- package/src/mcp-server/tools/customersGetAddressDetail.ts +37 -0
- package/src/mcp-server/tools/customersListAddresses.ts +37 -0
- package/src/mcp-server/tools/customersListUserReviews.ts +37 -0
- package/src/mcp-server/tools/customersUpdateAddressDetail.ts +37 -0
- package/src/mcp-server/tools/ordersCancelOrder.ts +37 -0
- package/src/mcp-server/tools/ordersCreateOrder.ts +37 -0
- package/src/mcp-server/tools/ordersGetOrderDetail.ts +37 -0
- package/src/mcp-server/tools/ordersGetPaymentStatus.ts +37 -0
- package/src/mcp-server/tools/ordersListOrderShipments.ts +37 -0
- package/src/mcp-server/tools/ordersListOrders.ts +37 -0
- package/src/mcp-server/tools/ordersRetryOrderPayment.ts +37 -0
- package/src/mcp-server/tools/shippingCheckDeliveryAvailability.ts +39 -0
- package/src/mcp-server/tools.ts +126 -0
- package/src/models/components/index.ts +1 -2
- package/src/models/components/{sku.ts → item.ts} +34 -34
- package/src/models/components/juspaypaymentinfo.ts +3 -3
- package/src/models/components/productdetail.ts +4 -4
- package/src/models/operations/index.ts +0 -1
- package/src/models/operations/listaddresses.ts +4 -4
- package/src/models/operations/listcrosssellproducts.ts +4 -4
- package/src/models/operations/listsimilarproducts.ts +4 -4
- package/src/models/operations/listskus.ts +4 -4
- package/src/models/operations/listupsellproducts.ts +4 -4
- package/src/models/operations/searchproducts.ts +4 -4
- package/src/sdk/catalog.ts +0 -18
- package/src/types/async.ts +68 -0
- package/esm/funcs/catalogCreateProductReview.d.ts +0 -16
- package/esm/funcs/catalogCreateProductReview.d.ts.map +0 -1
- package/esm/funcs/catalogCreateProductReview.js +0 -93
- package/esm/funcs/catalogCreateProductReview.js.map +0 -1
- package/esm/models/components/createreview.d.ts +0 -42
- package/esm/models/components/createreview.d.ts.map +0 -1
- package/esm/models/components/createreview.js +0 -54
- package/esm/models/components/createreview.js.map +0 -1
- package/esm/models/components/sku.d.ts.map +0 -1
- package/esm/models/components/sku.js.map +0 -1
- package/esm/models/operations/createproductreview.d.ts +0 -65
- package/esm/models/operations/createproductreview.d.ts.map +0 -1
- package/esm/models/operations/createproductreview.js +0 -72
- package/esm/models/operations/createproductreview.js.map +0 -1
- package/src/funcs/catalogCreateProductReview.ts +0 -161
- package/src/models/components/createreview.ts +0 -98
- package/src/models/operations/createproductreview.ts +0 -152
|
@@ -20,6 +20,7 @@ import {
|
|
|
20
20
|
} from "../models/errors/httpclienterrors.js";
|
|
21
21
|
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
22
22
|
import * as operations from "../models/operations/index.js";
|
|
23
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
23
24
|
import { Result } from "../types/fp.js";
|
|
24
25
|
|
|
25
26
|
/**
|
|
@@ -28,11 +29,11 @@ import { Result } from "../types/fp.js";
|
|
|
28
29
|
* @remarks
|
|
29
30
|
* The Refresh Access Token API is an integral component designed to enhance security and user experience. It enables clients to refresh their access tokens seamlessly, extending user sessions without compromising security.
|
|
30
31
|
*/
|
|
31
|
-
export
|
|
32
|
+
export function authRefreshToken(
|
|
32
33
|
client: CeStorefrontCore,
|
|
33
34
|
request: operations.RefreshTokenRequestBody,
|
|
34
35
|
options?: RequestOptions,
|
|
35
|
-
):
|
|
36
|
+
): APIPromise<
|
|
36
37
|
Result<
|
|
37
38
|
operations.RefreshTokenResponseBody,
|
|
38
39
|
| CeError
|
|
@@ -43,6 +44,32 @@ export async function authRefreshToken(
|
|
|
43
44
|
| RequestTimeoutError
|
|
44
45
|
| ConnectionError
|
|
45
46
|
>
|
|
47
|
+
> {
|
|
48
|
+
return new APIPromise($do(
|
|
49
|
+
client,
|
|
50
|
+
request,
|
|
51
|
+
options,
|
|
52
|
+
));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
async function $do(
|
|
56
|
+
client: CeStorefrontCore,
|
|
57
|
+
request: operations.RefreshTokenRequestBody,
|
|
58
|
+
options?: RequestOptions,
|
|
59
|
+
): Promise<
|
|
60
|
+
[
|
|
61
|
+
Result<
|
|
62
|
+
operations.RefreshTokenResponseBody,
|
|
63
|
+
| CeError
|
|
64
|
+
| SDKValidationError
|
|
65
|
+
| UnexpectedClientError
|
|
66
|
+
| InvalidRequestError
|
|
67
|
+
| RequestAbortedError
|
|
68
|
+
| RequestTimeoutError
|
|
69
|
+
| ConnectionError
|
|
70
|
+
>,
|
|
71
|
+
APICall,
|
|
72
|
+
]
|
|
46
73
|
> {
|
|
47
74
|
const parsed = safeParse(
|
|
48
75
|
request,
|
|
@@ -50,7 +77,7 @@ export async function authRefreshToken(
|
|
|
50
77
|
"Input validation failed",
|
|
51
78
|
);
|
|
52
79
|
if (!parsed.ok) {
|
|
53
|
-
return parsed;
|
|
80
|
+
return [parsed, { status: "invalid" }];
|
|
54
81
|
}
|
|
55
82
|
const payload = parsed.value;
|
|
56
83
|
const body = encodeJSON("body", payload, { explode: true });
|
|
@@ -67,7 +94,7 @@ export async function authRefreshToken(
|
|
|
67
94
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
68
95
|
|
|
69
96
|
const context = {
|
|
70
|
-
baseURL: options?.serverURL ?? "",
|
|
97
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
71
98
|
operationID: "refresh-token",
|
|
72
99
|
oAuth2Scopes: [],
|
|
73
100
|
|
|
@@ -90,7 +117,7 @@ export async function authRefreshToken(
|
|
|
90
117
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
91
118
|
}, options);
|
|
92
119
|
if (!requestRes.ok) {
|
|
93
|
-
return requestRes;
|
|
120
|
+
return [requestRes, { status: "invalid" }];
|
|
94
121
|
}
|
|
95
122
|
const req = requestRes.value;
|
|
96
123
|
|
|
@@ -101,7 +128,7 @@ export async function authRefreshToken(
|
|
|
101
128
|
retryCodes: context.retryCodes,
|
|
102
129
|
});
|
|
103
130
|
if (!doResult.ok) {
|
|
104
|
-
return doResult;
|
|
131
|
+
return [doResult, { status: "request-error", request: req }];
|
|
105
132
|
}
|
|
106
133
|
const response = doResult.value;
|
|
107
134
|
|
|
@@ -120,8 +147,8 @@ export async function authRefreshToken(
|
|
|
120
147
|
M.fail("5XX"),
|
|
121
148
|
)(response);
|
|
122
149
|
if (!result.ok) {
|
|
123
|
-
return result;
|
|
150
|
+
return [result, { status: "complete", request: req, response }];
|
|
124
151
|
}
|
|
125
152
|
|
|
126
|
-
return result;
|
|
153
|
+
return [result, { status: "complete", request: req, response }];
|
|
127
154
|
}
|
|
@@ -20,6 +20,7 @@ import {
|
|
|
20
20
|
} from "../models/errors/httpclienterrors.js";
|
|
21
21
|
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
22
22
|
import * as operations from "../models/operations/index.js";
|
|
23
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
23
24
|
import { Result } from "../types/fp.js";
|
|
24
25
|
|
|
25
26
|
/**
|
|
@@ -28,11 +29,11 @@ import { Result } from "../types/fp.js";
|
|
|
28
29
|
* @remarks
|
|
29
30
|
* Update Notification Preferences API allows clients to update a user's notification preferences based on their unique user identifier (user_id).
|
|
30
31
|
*/
|
|
31
|
-
export
|
|
32
|
+
export function authUpdateNotificationPreferences(
|
|
32
33
|
client: CeStorefrontCore,
|
|
33
34
|
request: operations.UpdateNotificationPreferencesRequest,
|
|
34
35
|
options?: RequestOptions,
|
|
35
|
-
):
|
|
36
|
+
): APIPromise<
|
|
36
37
|
Result<
|
|
37
38
|
operations.UpdateNotificationPreferencesResponseBody,
|
|
38
39
|
| CeError
|
|
@@ -43,6 +44,32 @@ export async function authUpdateNotificationPreferences(
|
|
|
43
44
|
| RequestTimeoutError
|
|
44
45
|
| ConnectionError
|
|
45
46
|
>
|
|
47
|
+
> {
|
|
48
|
+
return new APIPromise($do(
|
|
49
|
+
client,
|
|
50
|
+
request,
|
|
51
|
+
options,
|
|
52
|
+
));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
async function $do(
|
|
56
|
+
client: CeStorefrontCore,
|
|
57
|
+
request: operations.UpdateNotificationPreferencesRequest,
|
|
58
|
+
options?: RequestOptions,
|
|
59
|
+
): Promise<
|
|
60
|
+
[
|
|
61
|
+
Result<
|
|
62
|
+
operations.UpdateNotificationPreferencesResponseBody,
|
|
63
|
+
| CeError
|
|
64
|
+
| SDKValidationError
|
|
65
|
+
| UnexpectedClientError
|
|
66
|
+
| InvalidRequestError
|
|
67
|
+
| RequestAbortedError
|
|
68
|
+
| RequestTimeoutError
|
|
69
|
+
| ConnectionError
|
|
70
|
+
>,
|
|
71
|
+
APICall,
|
|
72
|
+
]
|
|
46
73
|
> {
|
|
47
74
|
const parsed = safeParse(
|
|
48
75
|
request,
|
|
@@ -53,7 +80,7 @@ export async function authUpdateNotificationPreferences(
|
|
|
53
80
|
"Input validation failed",
|
|
54
81
|
);
|
|
55
82
|
if (!parsed.ok) {
|
|
56
|
-
return parsed;
|
|
83
|
+
return [parsed, { status: "invalid" }];
|
|
57
84
|
}
|
|
58
85
|
const payload = parsed.value;
|
|
59
86
|
const body = encodeJSON("body", payload.RequestBody, { explode: true });
|
|
@@ -79,7 +106,7 @@ export async function authUpdateNotificationPreferences(
|
|
|
79
106
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
80
107
|
|
|
81
108
|
const context = {
|
|
82
|
-
baseURL: options?.serverURL ?? "",
|
|
109
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
83
110
|
operationID: "update-notification-preferences",
|
|
84
111
|
oAuth2Scopes: [],
|
|
85
112
|
|
|
@@ -102,7 +129,7 @@ export async function authUpdateNotificationPreferences(
|
|
|
102
129
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
103
130
|
}, options);
|
|
104
131
|
if (!requestRes.ok) {
|
|
105
|
-
return requestRes;
|
|
132
|
+
return [requestRes, { status: "invalid" }];
|
|
106
133
|
}
|
|
107
134
|
const req = requestRes.value;
|
|
108
135
|
|
|
@@ -113,7 +140,7 @@ export async function authUpdateNotificationPreferences(
|
|
|
113
140
|
retryCodes: context.retryCodes,
|
|
114
141
|
});
|
|
115
142
|
if (!doResult.ok) {
|
|
116
|
-
return doResult;
|
|
143
|
+
return [doResult, { status: "request-error", request: req }];
|
|
117
144
|
}
|
|
118
145
|
const response = doResult.value;
|
|
119
146
|
|
|
@@ -135,8 +162,8 @@ export async function authUpdateNotificationPreferences(
|
|
|
135
162
|
M.fail("5XX"),
|
|
136
163
|
)(response);
|
|
137
164
|
if (!result.ok) {
|
|
138
|
-
return result;
|
|
165
|
+
return [result, { status: "complete", request: req, response }];
|
|
139
166
|
}
|
|
140
167
|
|
|
141
|
-
return result;
|
|
168
|
+
return [result, { status: "complete", request: req, response }];
|
|
142
169
|
}
|
|
@@ -20,6 +20,7 @@ import {
|
|
|
20
20
|
} from "../models/errors/httpclienterrors.js";
|
|
21
21
|
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
22
22
|
import * as operations from "../models/operations/index.js";
|
|
23
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
23
24
|
import { Result } from "../types/fp.js";
|
|
24
25
|
|
|
25
26
|
/**
|
|
@@ -28,11 +29,11 @@ import { Result } from "../types/fp.js";
|
|
|
28
29
|
* @remarks
|
|
29
30
|
* The Update User API helps to efficiently modify and enhance user information within the system, ensuring that user profiles remain accurate and up-to-date. This API provides a secure and flexible mechanism for updating specific details while maintaining adherence to established conventions.
|
|
30
31
|
*/
|
|
31
|
-
export
|
|
32
|
+
export function authUpdateUser(
|
|
32
33
|
client: CeStorefrontCore,
|
|
33
34
|
request: operations.UpdateUserRequest,
|
|
34
35
|
options?: RequestOptions,
|
|
35
|
-
):
|
|
36
|
+
): APIPromise<
|
|
36
37
|
Result<
|
|
37
38
|
operations.UpdateUserResponseBody,
|
|
38
39
|
| CeError
|
|
@@ -43,6 +44,32 @@ export async function authUpdateUser(
|
|
|
43
44
|
| RequestTimeoutError
|
|
44
45
|
| ConnectionError
|
|
45
46
|
>
|
|
47
|
+
> {
|
|
48
|
+
return new APIPromise($do(
|
|
49
|
+
client,
|
|
50
|
+
request,
|
|
51
|
+
options,
|
|
52
|
+
));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
async function $do(
|
|
56
|
+
client: CeStorefrontCore,
|
|
57
|
+
request: operations.UpdateUserRequest,
|
|
58
|
+
options?: RequestOptions,
|
|
59
|
+
): Promise<
|
|
60
|
+
[
|
|
61
|
+
Result<
|
|
62
|
+
operations.UpdateUserResponseBody,
|
|
63
|
+
| CeError
|
|
64
|
+
| SDKValidationError
|
|
65
|
+
| UnexpectedClientError
|
|
66
|
+
| InvalidRequestError
|
|
67
|
+
| RequestAbortedError
|
|
68
|
+
| RequestTimeoutError
|
|
69
|
+
| ConnectionError
|
|
70
|
+
>,
|
|
71
|
+
APICall,
|
|
72
|
+
]
|
|
46
73
|
> {
|
|
47
74
|
const parsed = safeParse(
|
|
48
75
|
request,
|
|
@@ -50,7 +77,7 @@ export async function authUpdateUser(
|
|
|
50
77
|
"Input validation failed",
|
|
51
78
|
);
|
|
52
79
|
if (!parsed.ok) {
|
|
53
|
-
return parsed;
|
|
80
|
+
return [parsed, { status: "invalid" }];
|
|
54
81
|
}
|
|
55
82
|
const payload = parsed.value;
|
|
56
83
|
const body = encodeJSON("body", payload.User, { explode: true });
|
|
@@ -74,7 +101,7 @@ export async function authUpdateUser(
|
|
|
74
101
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
75
102
|
|
|
76
103
|
const context = {
|
|
77
|
-
baseURL: options?.serverURL ?? "",
|
|
104
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
78
105
|
operationID: "update-user",
|
|
79
106
|
oAuth2Scopes: [],
|
|
80
107
|
|
|
@@ -97,7 +124,7 @@ export async function authUpdateUser(
|
|
|
97
124
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
98
125
|
}, options);
|
|
99
126
|
if (!requestRes.ok) {
|
|
100
|
-
return requestRes;
|
|
127
|
+
return [requestRes, { status: "invalid" }];
|
|
101
128
|
}
|
|
102
129
|
const req = requestRes.value;
|
|
103
130
|
|
|
@@ -108,7 +135,7 @@ export async function authUpdateUser(
|
|
|
108
135
|
retryCodes: context.retryCodes,
|
|
109
136
|
});
|
|
110
137
|
if (!doResult.ok) {
|
|
111
|
-
return doResult;
|
|
138
|
+
return [doResult, { status: "request-error", request: req }];
|
|
112
139
|
}
|
|
113
140
|
const response = doResult.value;
|
|
114
141
|
|
|
@@ -127,8 +154,8 @@ export async function authUpdateUser(
|
|
|
127
154
|
M.fail("5XX"),
|
|
128
155
|
)(response);
|
|
129
156
|
if (!result.ok) {
|
|
130
|
-
return result;
|
|
157
|
+
return [result, { status: "complete", request: req, response }];
|
|
131
158
|
}
|
|
132
159
|
|
|
133
|
-
return result;
|
|
160
|
+
return [result, { status: "complete", request: req, response }];
|
|
134
161
|
}
|
|
@@ -20,6 +20,7 @@ import {
|
|
|
20
20
|
} from "../models/errors/httpclienterrors.js";
|
|
21
21
|
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
22
22
|
import * as operations from "../models/operations/index.js";
|
|
23
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
23
24
|
import { Result } from "../types/fp.js";
|
|
24
25
|
|
|
25
26
|
/**
|
|
@@ -28,11 +29,11 @@ import { Result } from "../types/fp.js";
|
|
|
28
29
|
* @remarks
|
|
29
30
|
* This API endpoint allows you to verify a one-time password (OTP) for authentication purposes. By sending a request to this endpoint with the necessary parameters, you can confirm the validity of the OTP provided by the user.
|
|
30
31
|
*/
|
|
31
|
-
export
|
|
32
|
+
export function authVerifyOtp(
|
|
32
33
|
client: CeStorefrontCore,
|
|
33
34
|
request: operations.VerifyOtpRequestBody,
|
|
34
35
|
options?: RequestOptions,
|
|
35
|
-
):
|
|
36
|
+
): APIPromise<
|
|
36
37
|
Result<
|
|
37
38
|
operations.VerifyOtpResponseBody,
|
|
38
39
|
| CeError
|
|
@@ -43,6 +44,32 @@ export async function authVerifyOtp(
|
|
|
43
44
|
| RequestTimeoutError
|
|
44
45
|
| ConnectionError
|
|
45
46
|
>
|
|
47
|
+
> {
|
|
48
|
+
return new APIPromise($do(
|
|
49
|
+
client,
|
|
50
|
+
request,
|
|
51
|
+
options,
|
|
52
|
+
));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
async function $do(
|
|
56
|
+
client: CeStorefrontCore,
|
|
57
|
+
request: operations.VerifyOtpRequestBody,
|
|
58
|
+
options?: RequestOptions,
|
|
59
|
+
): Promise<
|
|
60
|
+
[
|
|
61
|
+
Result<
|
|
62
|
+
operations.VerifyOtpResponseBody,
|
|
63
|
+
| CeError
|
|
64
|
+
| SDKValidationError
|
|
65
|
+
| UnexpectedClientError
|
|
66
|
+
| InvalidRequestError
|
|
67
|
+
| RequestAbortedError
|
|
68
|
+
| RequestTimeoutError
|
|
69
|
+
| ConnectionError
|
|
70
|
+
>,
|
|
71
|
+
APICall,
|
|
72
|
+
]
|
|
46
73
|
> {
|
|
47
74
|
const parsed = safeParse(
|
|
48
75
|
request,
|
|
@@ -50,7 +77,7 @@ export async function authVerifyOtp(
|
|
|
50
77
|
"Input validation failed",
|
|
51
78
|
);
|
|
52
79
|
if (!parsed.ok) {
|
|
53
|
-
return parsed;
|
|
80
|
+
return [parsed, { status: "invalid" }];
|
|
54
81
|
}
|
|
55
82
|
const payload = parsed.value;
|
|
56
83
|
const body = encodeJSON("body", payload, { explode: true });
|
|
@@ -67,7 +94,7 @@ export async function authVerifyOtp(
|
|
|
67
94
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
68
95
|
|
|
69
96
|
const context = {
|
|
70
|
-
baseURL: options?.serverURL ?? "",
|
|
97
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
71
98
|
operationID: "verify-otp",
|
|
72
99
|
oAuth2Scopes: [],
|
|
73
100
|
|
|
@@ -90,7 +117,7 @@ export async function authVerifyOtp(
|
|
|
90
117
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
91
118
|
}, options);
|
|
92
119
|
if (!requestRes.ok) {
|
|
93
|
-
return requestRes;
|
|
120
|
+
return [requestRes, { status: "invalid" }];
|
|
94
121
|
}
|
|
95
122
|
const req = requestRes.value;
|
|
96
123
|
|
|
@@ -101,7 +128,7 @@ export async function authVerifyOtp(
|
|
|
101
128
|
retryCodes: context.retryCodes,
|
|
102
129
|
});
|
|
103
130
|
if (!doResult.ok) {
|
|
104
|
-
return doResult;
|
|
131
|
+
return [doResult, { status: "request-error", request: req }];
|
|
105
132
|
}
|
|
106
133
|
const response = doResult.value;
|
|
107
134
|
|
|
@@ -120,8 +147,8 @@ export async function authVerifyOtp(
|
|
|
120
147
|
M.fail("5XX"),
|
|
121
148
|
)(response);
|
|
122
149
|
if (!result.ok) {
|
|
123
|
-
return result;
|
|
150
|
+
return [result, { status: "complete", request: req, response }];
|
|
124
151
|
}
|
|
125
152
|
|
|
126
|
-
return result;
|
|
153
|
+
return [result, { status: "complete", request: req, response }];
|
|
127
154
|
}
|
|
@@ -20,6 +20,7 @@ import {
|
|
|
20
20
|
} from "../models/errors/httpclienterrors.js";
|
|
21
21
|
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
22
22
|
import * as operations from "../models/operations/index.js";
|
|
23
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
23
24
|
import { Result } from "../types/fp.js";
|
|
24
25
|
|
|
25
26
|
/**
|
|
@@ -28,11 +29,11 @@ import { Result } from "../types/fp.js";
|
|
|
28
29
|
* @remarks
|
|
29
30
|
* Subscribe to newsletter
|
|
30
31
|
*/
|
|
31
|
-
export
|
|
32
|
+
export function campaignsSubscribeNewsletter(
|
|
32
33
|
client: CeStorefrontCore,
|
|
33
34
|
request: operations.SubscribeNewsletterRequestBody,
|
|
34
35
|
options?: RequestOptions,
|
|
35
|
-
):
|
|
36
|
+
): APIPromise<
|
|
36
37
|
Result<
|
|
37
38
|
operations.SubscribeNewsletterResponseBody,
|
|
38
39
|
| CeError
|
|
@@ -43,6 +44,32 @@ export async function campaignsSubscribeNewsletter(
|
|
|
43
44
|
| RequestTimeoutError
|
|
44
45
|
| ConnectionError
|
|
45
46
|
>
|
|
47
|
+
> {
|
|
48
|
+
return new APIPromise($do(
|
|
49
|
+
client,
|
|
50
|
+
request,
|
|
51
|
+
options,
|
|
52
|
+
));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
async function $do(
|
|
56
|
+
client: CeStorefrontCore,
|
|
57
|
+
request: operations.SubscribeNewsletterRequestBody,
|
|
58
|
+
options?: RequestOptions,
|
|
59
|
+
): Promise<
|
|
60
|
+
[
|
|
61
|
+
Result<
|
|
62
|
+
operations.SubscribeNewsletterResponseBody,
|
|
63
|
+
| CeError
|
|
64
|
+
| SDKValidationError
|
|
65
|
+
| UnexpectedClientError
|
|
66
|
+
| InvalidRequestError
|
|
67
|
+
| RequestAbortedError
|
|
68
|
+
| RequestTimeoutError
|
|
69
|
+
| ConnectionError
|
|
70
|
+
>,
|
|
71
|
+
APICall,
|
|
72
|
+
]
|
|
46
73
|
> {
|
|
47
74
|
const parsed = safeParse(
|
|
48
75
|
request,
|
|
@@ -51,7 +78,7 @@ export async function campaignsSubscribeNewsletter(
|
|
|
51
78
|
"Input validation failed",
|
|
52
79
|
);
|
|
53
80
|
if (!parsed.ok) {
|
|
54
|
-
return parsed;
|
|
81
|
+
return [parsed, { status: "invalid" }];
|
|
55
82
|
}
|
|
56
83
|
const payload = parsed.value;
|
|
57
84
|
const body = encodeJSON("body", payload, { explode: true });
|
|
@@ -68,7 +95,7 @@ export async function campaignsSubscribeNewsletter(
|
|
|
68
95
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
69
96
|
|
|
70
97
|
const context = {
|
|
71
|
-
baseURL: options?.serverURL ?? "",
|
|
98
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
72
99
|
operationID: "subscribe-newsletter",
|
|
73
100
|
oAuth2Scopes: [],
|
|
74
101
|
|
|
@@ -91,7 +118,7 @@ export async function campaignsSubscribeNewsletter(
|
|
|
91
118
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
92
119
|
}, options);
|
|
93
120
|
if (!requestRes.ok) {
|
|
94
|
-
return requestRes;
|
|
121
|
+
return [requestRes, { status: "invalid" }];
|
|
95
122
|
}
|
|
96
123
|
const req = requestRes.value;
|
|
97
124
|
|
|
@@ -102,7 +129,7 @@ export async function campaignsSubscribeNewsletter(
|
|
|
102
129
|
retryCodes: context.retryCodes,
|
|
103
130
|
});
|
|
104
131
|
if (!doResult.ok) {
|
|
105
|
-
return doResult;
|
|
132
|
+
return [doResult, { status: "request-error", request: req }];
|
|
106
133
|
}
|
|
107
134
|
const response = doResult.value;
|
|
108
135
|
|
|
@@ -121,8 +148,8 @@ export async function campaignsSubscribeNewsletter(
|
|
|
121
148
|
M.fail("5XX"),
|
|
122
149
|
)(response);
|
|
123
150
|
if (!result.ok) {
|
|
124
|
-
return result;
|
|
151
|
+
return [result, { status: "complete", request: req, response }];
|
|
125
152
|
}
|
|
126
153
|
|
|
127
|
-
return result;
|
|
154
|
+
return [result, { status: "complete", request: req, response }];
|
|
128
155
|
}
|
|
@@ -21,6 +21,7 @@ import {
|
|
|
21
21
|
import * as errors from "../models/errors/index.js";
|
|
22
22
|
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
23
23
|
import * as operations from "../models/operations/index.js";
|
|
24
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
24
25
|
import { Result } from "../types/fp.js";
|
|
25
26
|
|
|
26
27
|
/**
|
|
@@ -29,11 +30,11 @@ import { Result } from "../types/fp.js";
|
|
|
29
30
|
* @remarks
|
|
30
31
|
* Apply coupon
|
|
31
32
|
*/
|
|
32
|
-
export
|
|
33
|
+
export function cartsApplyCoupon(
|
|
33
34
|
client: CeStorefrontCore,
|
|
34
35
|
request: operations.ApplyCouponRequest,
|
|
35
36
|
options?: RequestOptions,
|
|
36
|
-
):
|
|
37
|
+
): APIPromise<
|
|
37
38
|
Result<
|
|
38
39
|
operations.ApplyCouponResponseBody,
|
|
39
40
|
| errors.BadRequest
|
|
@@ -46,6 +47,34 @@ export async function cartsApplyCoupon(
|
|
|
46
47
|
| RequestTimeoutError
|
|
47
48
|
| ConnectionError
|
|
48
49
|
>
|
|
50
|
+
> {
|
|
51
|
+
return new APIPromise($do(
|
|
52
|
+
client,
|
|
53
|
+
request,
|
|
54
|
+
options,
|
|
55
|
+
));
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
async function $do(
|
|
59
|
+
client: CeStorefrontCore,
|
|
60
|
+
request: operations.ApplyCouponRequest,
|
|
61
|
+
options?: RequestOptions,
|
|
62
|
+
): Promise<
|
|
63
|
+
[
|
|
64
|
+
Result<
|
|
65
|
+
operations.ApplyCouponResponseBody,
|
|
66
|
+
| errors.BadRequest
|
|
67
|
+
| errors.Unauthorized
|
|
68
|
+
| CeError
|
|
69
|
+
| SDKValidationError
|
|
70
|
+
| UnexpectedClientError
|
|
71
|
+
| InvalidRequestError
|
|
72
|
+
| RequestAbortedError
|
|
73
|
+
| RequestTimeoutError
|
|
74
|
+
| ConnectionError
|
|
75
|
+
>,
|
|
76
|
+
APICall,
|
|
77
|
+
]
|
|
49
78
|
> {
|
|
50
79
|
const parsed = safeParse(
|
|
51
80
|
request,
|
|
@@ -53,7 +82,7 @@ export async function cartsApplyCoupon(
|
|
|
53
82
|
"Input validation failed",
|
|
54
83
|
);
|
|
55
84
|
if (!parsed.ok) {
|
|
56
|
-
return parsed;
|
|
85
|
+
return [parsed, { status: "invalid" }];
|
|
57
86
|
}
|
|
58
87
|
const payload = parsed.value;
|
|
59
88
|
const body = encodeJSON("body", payload.RequestBody, { explode: true });
|
|
@@ -77,7 +106,7 @@ export async function cartsApplyCoupon(
|
|
|
77
106
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
78
107
|
|
|
79
108
|
const context = {
|
|
80
|
-
baseURL: options?.serverURL ?? "",
|
|
109
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
81
110
|
operationID: "apply-coupon",
|
|
82
111
|
oAuth2Scopes: [],
|
|
83
112
|
|
|
@@ -100,7 +129,7 @@ export async function cartsApplyCoupon(
|
|
|
100
129
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
101
130
|
}, options);
|
|
102
131
|
if (!requestRes.ok) {
|
|
103
|
-
return requestRes;
|
|
132
|
+
return [requestRes, { status: "invalid" }];
|
|
104
133
|
}
|
|
105
134
|
const req = requestRes.value;
|
|
106
135
|
|
|
@@ -111,7 +140,7 @@ export async function cartsApplyCoupon(
|
|
|
111
140
|
retryCodes: context.retryCodes,
|
|
112
141
|
});
|
|
113
142
|
if (!doResult.ok) {
|
|
114
|
-
return doResult;
|
|
143
|
+
return [doResult, { status: "request-error", request: req }];
|
|
115
144
|
}
|
|
116
145
|
const response = doResult.value;
|
|
117
146
|
|
|
@@ -138,8 +167,8 @@ export async function cartsApplyCoupon(
|
|
|
138
167
|
M.fail("5XX"),
|
|
139
168
|
)(response, { extraFields: responseFields });
|
|
140
169
|
if (!result.ok) {
|
|
141
|
-
return result;
|
|
170
|
+
return [result, { status: "complete", request: req, response }];
|
|
142
171
|
}
|
|
143
172
|
|
|
144
|
-
return result;
|
|
173
|
+
return [result, { status: "complete", request: req, response }];
|
|
145
174
|
}
|
|
@@ -20,6 +20,7 @@ import {
|
|
|
20
20
|
} from "../models/errors/httpclienterrors.js";
|
|
21
21
|
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
22
22
|
import * as operations from "../models/operations/index.js";
|
|
23
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
23
24
|
import { Result } from "../types/fp.js";
|
|
24
25
|
|
|
25
26
|
/**
|
|
@@ -28,11 +29,11 @@ import { Result } from "../types/fp.js";
|
|
|
28
29
|
* @remarks
|
|
29
30
|
* Create cart
|
|
30
31
|
*/
|
|
31
|
-
export
|
|
32
|
+
export function cartsCreateCart(
|
|
32
33
|
client: CeStorefrontCore,
|
|
33
34
|
request: operations.CreateCartRequestBody,
|
|
34
35
|
options?: RequestOptions,
|
|
35
|
-
):
|
|
36
|
+
): APIPromise<
|
|
36
37
|
Result<
|
|
37
38
|
operations.CreateCartResponseBody,
|
|
38
39
|
| CeError
|
|
@@ -43,6 +44,32 @@ export async function cartsCreateCart(
|
|
|
43
44
|
| RequestTimeoutError
|
|
44
45
|
| ConnectionError
|
|
45
46
|
>
|
|
47
|
+
> {
|
|
48
|
+
return new APIPromise($do(
|
|
49
|
+
client,
|
|
50
|
+
request,
|
|
51
|
+
options,
|
|
52
|
+
));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
async function $do(
|
|
56
|
+
client: CeStorefrontCore,
|
|
57
|
+
request: operations.CreateCartRequestBody,
|
|
58
|
+
options?: RequestOptions,
|
|
59
|
+
): Promise<
|
|
60
|
+
[
|
|
61
|
+
Result<
|
|
62
|
+
operations.CreateCartResponseBody,
|
|
63
|
+
| CeError
|
|
64
|
+
| SDKValidationError
|
|
65
|
+
| UnexpectedClientError
|
|
66
|
+
| InvalidRequestError
|
|
67
|
+
| RequestAbortedError
|
|
68
|
+
| RequestTimeoutError
|
|
69
|
+
| ConnectionError
|
|
70
|
+
>,
|
|
71
|
+
APICall,
|
|
72
|
+
]
|
|
46
73
|
> {
|
|
47
74
|
const parsed = safeParse(
|
|
48
75
|
request,
|
|
@@ -50,7 +77,7 @@ export async function cartsCreateCart(
|
|
|
50
77
|
"Input validation failed",
|
|
51
78
|
);
|
|
52
79
|
if (!parsed.ok) {
|
|
53
|
-
return parsed;
|
|
80
|
+
return [parsed, { status: "invalid" }];
|
|
54
81
|
}
|
|
55
82
|
const payload = parsed.value;
|
|
56
83
|
const body = encodeJSON("body", payload, { explode: true });
|
|
@@ -67,7 +94,7 @@ export async function cartsCreateCart(
|
|
|
67
94
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
68
95
|
|
|
69
96
|
const context = {
|
|
70
|
-
baseURL: options?.serverURL ?? "",
|
|
97
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
71
98
|
operationID: "create-cart",
|
|
72
99
|
oAuth2Scopes: [],
|
|
73
100
|
|
|
@@ -90,7 +117,7 @@ export async function cartsCreateCart(
|
|
|
90
117
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
91
118
|
}, options);
|
|
92
119
|
if (!requestRes.ok) {
|
|
93
|
-
return requestRes;
|
|
120
|
+
return [requestRes, { status: "invalid" }];
|
|
94
121
|
}
|
|
95
122
|
const req = requestRes.value;
|
|
96
123
|
|
|
@@ -101,7 +128,7 @@ export async function cartsCreateCart(
|
|
|
101
128
|
retryCodes: context.retryCodes,
|
|
102
129
|
});
|
|
103
130
|
if (!doResult.ok) {
|
|
104
|
-
return doResult;
|
|
131
|
+
return [doResult, { status: "request-error", request: req }];
|
|
105
132
|
}
|
|
106
133
|
const response = doResult.value;
|
|
107
134
|
|
|
@@ -120,8 +147,8 @@ export async function cartsCreateCart(
|
|
|
120
147
|
M.fail("5XX"),
|
|
121
148
|
)(response);
|
|
122
149
|
if (!result.ok) {
|
|
123
|
-
return result;
|
|
150
|
+
return [result, { status: "complete", request: req, response }];
|
|
124
151
|
}
|
|
125
152
|
|
|
126
|
-
return result;
|
|
153
|
+
return [result, { status: "complete", request: req, response }];
|
|
127
154
|
}
|