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
|
@@ -18,6 +18,7 @@ import {
|
|
|
18
18
|
} from "../models/errors/httpclienterrors.js";
|
|
19
19
|
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
20
20
|
import * as operations from "../models/operations/index.js";
|
|
21
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
21
22
|
import { Result } from "../types/fp.js";
|
|
22
23
|
|
|
23
24
|
/**
|
|
@@ -27,11 +28,11 @@ import { Result } from "../types/fp.js";
|
|
|
27
28
|
* This API’s focus is on anonymous users who have not undergone the formal account creation process. These anonymous users are associated with a unique ID, ensuring that even in the absence of a fully realized account, there is a distinct and trackable identity for each user.
|
|
28
29
|
* To interact with the system, each anonymous user is issued an access token. This access token plays a dual role in the system: it serves as a means of authenticating the user and it also acts as a tool for authorization, determining what actions the authenticated user is permitted to perform.
|
|
29
30
|
*/
|
|
30
|
-
export
|
|
31
|
+
export function authGetAnonymousToken(
|
|
31
32
|
client: CeStorefrontCore,
|
|
32
33
|
security: operations.GetAnonymousTokenSecurity,
|
|
33
34
|
options?: RequestOptions,
|
|
34
|
-
):
|
|
35
|
+
): APIPromise<
|
|
35
36
|
Result<
|
|
36
37
|
operations.GetAnonymousTokenResponseBody,
|
|
37
38
|
| CeError
|
|
@@ -42,6 +43,32 @@ export async function authGetAnonymousToken(
|
|
|
42
43
|
| RequestTimeoutError
|
|
43
44
|
| ConnectionError
|
|
44
45
|
>
|
|
46
|
+
> {
|
|
47
|
+
return new APIPromise($do(
|
|
48
|
+
client,
|
|
49
|
+
security,
|
|
50
|
+
options,
|
|
51
|
+
));
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
async function $do(
|
|
55
|
+
client: CeStorefrontCore,
|
|
56
|
+
security: operations.GetAnonymousTokenSecurity,
|
|
57
|
+
options?: RequestOptions,
|
|
58
|
+
): Promise<
|
|
59
|
+
[
|
|
60
|
+
Result<
|
|
61
|
+
operations.GetAnonymousTokenResponseBody,
|
|
62
|
+
| CeError
|
|
63
|
+
| SDKValidationError
|
|
64
|
+
| UnexpectedClientError
|
|
65
|
+
| InvalidRequestError
|
|
66
|
+
| RequestAbortedError
|
|
67
|
+
| RequestTimeoutError
|
|
68
|
+
| ConnectionError
|
|
69
|
+
>,
|
|
70
|
+
APICall,
|
|
71
|
+
]
|
|
45
72
|
> {
|
|
46
73
|
const path = pathToFunc("/auth/anonymous")();
|
|
47
74
|
|
|
@@ -60,7 +87,7 @@ export async function authGetAnonymousToken(
|
|
|
60
87
|
);
|
|
61
88
|
|
|
62
89
|
const context = {
|
|
63
|
-
baseURL: options?.serverURL ?? "",
|
|
90
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
64
91
|
operationID: "get-anonymous-token",
|
|
65
92
|
oAuth2Scopes: [],
|
|
66
93
|
|
|
@@ -82,7 +109,7 @@ export async function authGetAnonymousToken(
|
|
|
82
109
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
83
110
|
}, options);
|
|
84
111
|
if (!requestRes.ok) {
|
|
85
|
-
return requestRes;
|
|
112
|
+
return [requestRes, { status: "invalid" }];
|
|
86
113
|
}
|
|
87
114
|
const req = requestRes.value;
|
|
88
115
|
|
|
@@ -93,7 +120,7 @@ export async function authGetAnonymousToken(
|
|
|
93
120
|
retryCodes: context.retryCodes,
|
|
94
121
|
});
|
|
95
122
|
if (!doResult.ok) {
|
|
96
|
-
return doResult;
|
|
123
|
+
return [doResult, { status: "request-error", request: req }];
|
|
97
124
|
}
|
|
98
125
|
const response = doResult.value;
|
|
99
126
|
|
|
@@ -112,8 +139,8 @@ export async function authGetAnonymousToken(
|
|
|
112
139
|
M.fail("5XX"),
|
|
113
140
|
)(response);
|
|
114
141
|
if (!result.ok) {
|
|
115
|
-
return result;
|
|
142
|
+
return [result, { status: "complete", request: req, response }];
|
|
116
143
|
}
|
|
117
144
|
|
|
118
|
-
return result;
|
|
145
|
+
return [result, { status: "complete", request: req, response }];
|
|
119
146
|
}
|
|
@@ -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 Retrieve Notification Preferences API allows clients to fetch a user's notification preferences based on their unique user identifier (user_id).
|
|
30
31
|
*/
|
|
31
|
-
export
|
|
32
|
+
export function authGetNotificationPreferences(
|
|
32
33
|
client: CeStorefrontCore,
|
|
33
34
|
request: operations.GetNotificationPreferencesRequest,
|
|
34
35
|
options?: RequestOptions,
|
|
35
|
-
):
|
|
36
|
+
): APIPromise<
|
|
36
37
|
Result<
|
|
37
38
|
operations.GetNotificationPreferencesResponseBody,
|
|
38
39
|
| CeError
|
|
@@ -43,6 +44,32 @@ export async function authGetNotificationPreferences(
|
|
|
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.GetNotificationPreferencesRequest,
|
|
58
|
+
options?: RequestOptions,
|
|
59
|
+
): Promise<
|
|
60
|
+
[
|
|
61
|
+
Result<
|
|
62
|
+
operations.GetNotificationPreferencesResponseBody,
|
|
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 authGetNotificationPreferences(
|
|
|
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 = null;
|
|
@@ -76,7 +103,7 @@ export async function authGetNotificationPreferences(
|
|
|
76
103
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
77
104
|
|
|
78
105
|
const context = {
|
|
79
|
-
baseURL: options?.serverURL ?? "",
|
|
106
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
80
107
|
operationID: "get-notification-preferences",
|
|
81
108
|
oAuth2Scopes: [],
|
|
82
109
|
|
|
@@ -99,7 +126,7 @@ export async function authGetNotificationPreferences(
|
|
|
99
126
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
100
127
|
}, options);
|
|
101
128
|
if (!requestRes.ok) {
|
|
102
|
-
return requestRes;
|
|
129
|
+
return [requestRes, { status: "invalid" }];
|
|
103
130
|
}
|
|
104
131
|
const req = requestRes.value;
|
|
105
132
|
|
|
@@ -110,7 +137,7 @@ export async function authGetNotificationPreferences(
|
|
|
110
137
|
retryCodes: context.retryCodes,
|
|
111
138
|
});
|
|
112
139
|
if (!doResult.ok) {
|
|
113
|
-
return doResult;
|
|
140
|
+
return [doResult, { status: "request-error", request: req }];
|
|
114
141
|
}
|
|
115
142
|
const response = doResult.value;
|
|
116
143
|
|
|
@@ -132,8 +159,8 @@ export async function authGetNotificationPreferences(
|
|
|
132
159
|
M.fail("5XX"),
|
|
133
160
|
)(response);
|
|
134
161
|
if (!result.ok) {
|
|
135
|
-
return result;
|
|
162
|
+
return [result, { status: "complete", request: req, response }];
|
|
136
163
|
}
|
|
137
164
|
|
|
138
|
-
return result;
|
|
165
|
+
return [result, { status: "complete", request: req, response }];
|
|
139
166
|
}
|
|
@@ -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 Retrieve User API is designed to facilitate the retrieval of comprehensive user information from the system. A required parameter is a user-id of the user whose information needs to be retrieved.
|
|
30
31
|
*/
|
|
31
|
-
export
|
|
32
|
+
export function authGetUserDetail(
|
|
32
33
|
client: CeStorefrontCore,
|
|
33
34
|
request: operations.GetUserDetailRequest,
|
|
34
35
|
options?: RequestOptions,
|
|
35
|
-
):
|
|
36
|
+
): APIPromise<
|
|
36
37
|
Result<
|
|
37
38
|
operations.GetUserDetailResponseBody,
|
|
38
39
|
| CeError
|
|
@@ -43,6 +44,32 @@ export async function authGetUserDetail(
|
|
|
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.GetUserDetailRequest,
|
|
58
|
+
options?: RequestOptions,
|
|
59
|
+
): Promise<
|
|
60
|
+
[
|
|
61
|
+
Result<
|
|
62
|
+
operations.GetUserDetailResponseBody,
|
|
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 authGetUserDetail(
|
|
|
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 = null;
|
|
@@ -73,7 +100,7 @@ export async function authGetUserDetail(
|
|
|
73
100
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
74
101
|
|
|
75
102
|
const context = {
|
|
76
|
-
baseURL: options?.serverURL ?? "",
|
|
103
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
77
104
|
operationID: "get-user-detail",
|
|
78
105
|
oAuth2Scopes: [],
|
|
79
106
|
|
|
@@ -96,7 +123,7 @@ export async function authGetUserDetail(
|
|
|
96
123
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
97
124
|
}, options);
|
|
98
125
|
if (!requestRes.ok) {
|
|
99
|
-
return requestRes;
|
|
126
|
+
return [requestRes, { status: "invalid" }];
|
|
100
127
|
}
|
|
101
128
|
const req = requestRes.value;
|
|
102
129
|
|
|
@@ -107,7 +134,7 @@ export async function authGetUserDetail(
|
|
|
107
134
|
retryCodes: context.retryCodes,
|
|
108
135
|
});
|
|
109
136
|
if (!doResult.ok) {
|
|
110
|
-
return doResult;
|
|
137
|
+
return [doResult, { status: "request-error", request: req }];
|
|
111
138
|
}
|
|
112
139
|
const response = doResult.value;
|
|
113
140
|
|
|
@@ -126,8 +153,8 @@ export async function authGetUserDetail(
|
|
|
126
153
|
M.fail("5XX"),
|
|
127
154
|
)(response);
|
|
128
155
|
if (!result.ok) {
|
|
129
|
-
return result;
|
|
156
|
+
return [result, { status: "complete", request: req, response }];
|
|
130
157
|
}
|
|
131
158
|
|
|
132
|
-
return result;
|
|
159
|
+
return [result, { status: "complete", request: req, response }];
|
|
133
160
|
}
|
|
@@ -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 enables users to authenticate into the system using their email address. It provides a secure way for users to Login by verifying their identity through a one-time password (OTP) sent to their email address.
|
|
30
31
|
*/
|
|
31
|
-
export
|
|
32
|
+
export function authLoginWithEmail(
|
|
32
33
|
client: CeStorefrontCore,
|
|
33
34
|
request: operations.LoginWithEmailRequestBody,
|
|
34
35
|
options?: RequestOptions,
|
|
35
|
-
):
|
|
36
|
+
): APIPromise<
|
|
36
37
|
Result<
|
|
37
38
|
operations.LoginWithEmailResponseBody,
|
|
38
39
|
| CeError
|
|
@@ -43,6 +44,32 @@ export async function authLoginWithEmail(
|
|
|
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.LoginWithEmailRequestBody,
|
|
58
|
+
options?: RequestOptions,
|
|
59
|
+
): Promise<
|
|
60
|
+
[
|
|
61
|
+
Result<
|
|
62
|
+
operations.LoginWithEmailResponseBody,
|
|
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 authLoginWithEmail(
|
|
|
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 authLoginWithEmail(
|
|
|
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: "login-with-email",
|
|
72
99
|
oAuth2Scopes: [],
|
|
73
100
|
|
|
@@ -90,7 +117,7 @@ export async function authLoginWithEmail(
|
|
|
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 authLoginWithEmail(
|
|
|
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 authLoginWithEmail(
|
|
|
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
|
* This API enables users to authenticate into the system using their phone number. It provides a secure way for users to log in by verifying their identity through a one-time password (OTP) sent to their registered phone.
|
|
30
31
|
*/
|
|
31
|
-
export
|
|
32
|
+
export function authLoginWithPhone(
|
|
32
33
|
client: CeStorefrontCore,
|
|
33
34
|
request: operations.LoginWithPhoneRequestBody,
|
|
34
35
|
options?: RequestOptions,
|
|
35
|
-
):
|
|
36
|
+
): APIPromise<
|
|
36
37
|
Result<
|
|
37
38
|
operations.LoginWithPhoneResponseBody,
|
|
38
39
|
| CeError
|
|
@@ -43,6 +44,32 @@ export async function authLoginWithPhone(
|
|
|
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.LoginWithPhoneRequestBody,
|
|
58
|
+
options?: RequestOptions,
|
|
59
|
+
): Promise<
|
|
60
|
+
[
|
|
61
|
+
Result<
|
|
62
|
+
operations.LoginWithPhoneResponseBody,
|
|
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 authLoginWithPhone(
|
|
|
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 authLoginWithPhone(
|
|
|
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: "login-with-phone",
|
|
72
99
|
oAuth2Scopes: [],
|
|
73
100
|
|
|
@@ -90,7 +117,7 @@ export async function authLoginWithPhone(
|
|
|
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 authLoginWithPhone(
|
|
|
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 authLoginWithPhone(
|
|
|
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
|
* This API enables users to authenticate into the system using their WhatsApp Number. It provides a secure way for users to Login by verifying their identity through a one-time password (OTP) sent to their WhatsApp Number.
|
|
30
31
|
*/
|
|
31
|
-
export
|
|
32
|
+
export function authLoginWithWhatsapp(
|
|
32
33
|
client: CeStorefrontCore,
|
|
33
34
|
request: operations.LoginWithWhatsappRequestBody,
|
|
34
35
|
options?: RequestOptions,
|
|
35
|
-
):
|
|
36
|
+
): APIPromise<
|
|
36
37
|
Result<
|
|
37
38
|
operations.LoginWithWhatsappResponseBody,
|
|
38
39
|
| CeError
|
|
@@ -43,6 +44,32 @@ export async function authLoginWithWhatsapp(
|
|
|
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.LoginWithWhatsappRequestBody,
|
|
58
|
+
options?: RequestOptions,
|
|
59
|
+
): Promise<
|
|
60
|
+
[
|
|
61
|
+
Result<
|
|
62
|
+
operations.LoginWithWhatsappResponseBody,
|
|
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 authLoginWithWhatsapp(
|
|
|
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 authLoginWithWhatsapp(
|
|
|
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: "login-with-whatsapp",
|
|
73
100
|
oAuth2Scopes: [],
|
|
74
101
|
|
|
@@ -91,7 +118,7 @@ export async function authLoginWithWhatsapp(
|
|
|
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 authLoginWithWhatsapp(
|
|
|
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 authLoginWithWhatsapp(
|
|
|
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
|
}
|
package/src/funcs/authLogout.ts
CHANGED
|
@@ -18,6 +18,7 @@ import {
|
|
|
18
18
|
} from "../models/errors/httpclienterrors.js";
|
|
19
19
|
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
20
20
|
import * as operations from "../models/operations/index.js";
|
|
21
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
21
22
|
import { Result } from "../types/fp.js";
|
|
22
23
|
|
|
23
24
|
/**
|
|
@@ -26,10 +27,10 @@ import { Result } from "../types/fp.js";
|
|
|
26
27
|
* @remarks
|
|
27
28
|
* The Logout User API initiate the logout process for a user. Upon a successful request, the API responds with a confirmation message. If the user is not found or there's an issue with the request, an error response is returned with an appropriate message.
|
|
28
29
|
*/
|
|
29
|
-
export
|
|
30
|
+
export function authLogout(
|
|
30
31
|
client: CeStorefrontCore,
|
|
31
32
|
options?: RequestOptions,
|
|
32
|
-
):
|
|
33
|
+
): APIPromise<
|
|
33
34
|
Result<
|
|
34
35
|
operations.LogoutResponseBody,
|
|
35
36
|
| CeError
|
|
@@ -40,6 +41,30 @@ export async function authLogout(
|
|
|
40
41
|
| RequestTimeoutError
|
|
41
42
|
| ConnectionError
|
|
42
43
|
>
|
|
44
|
+
> {
|
|
45
|
+
return new APIPromise($do(
|
|
46
|
+
client,
|
|
47
|
+
options,
|
|
48
|
+
));
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
async function $do(
|
|
52
|
+
client: CeStorefrontCore,
|
|
53
|
+
options?: RequestOptions,
|
|
54
|
+
): Promise<
|
|
55
|
+
[
|
|
56
|
+
Result<
|
|
57
|
+
operations.LogoutResponseBody,
|
|
58
|
+
| CeError
|
|
59
|
+
| SDKValidationError
|
|
60
|
+
| UnexpectedClientError
|
|
61
|
+
| InvalidRequestError
|
|
62
|
+
| RequestAbortedError
|
|
63
|
+
| RequestTimeoutError
|
|
64
|
+
| ConnectionError
|
|
65
|
+
>,
|
|
66
|
+
APICall,
|
|
67
|
+
]
|
|
43
68
|
> {
|
|
44
69
|
const path = pathToFunc("/auth/logout")();
|
|
45
70
|
|
|
@@ -52,7 +77,7 @@ export async function authLogout(
|
|
|
52
77
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
53
78
|
|
|
54
79
|
const context = {
|
|
55
|
-
baseURL: options?.serverURL ?? "",
|
|
80
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
56
81
|
operationID: "logout",
|
|
57
82
|
oAuth2Scopes: [],
|
|
58
83
|
|
|
@@ -74,7 +99,7 @@ export async function authLogout(
|
|
|
74
99
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
75
100
|
}, options);
|
|
76
101
|
if (!requestRes.ok) {
|
|
77
|
-
return requestRes;
|
|
102
|
+
return [requestRes, { status: "invalid" }];
|
|
78
103
|
}
|
|
79
104
|
const req = requestRes.value;
|
|
80
105
|
|
|
@@ -85,7 +110,7 @@ export async function authLogout(
|
|
|
85
110
|
retryCodes: context.retryCodes,
|
|
86
111
|
});
|
|
87
112
|
if (!doResult.ok) {
|
|
88
|
-
return doResult;
|
|
113
|
+
return [doResult, { status: "request-error", request: req }];
|
|
89
114
|
}
|
|
90
115
|
const response = doResult.value;
|
|
91
116
|
|
|
@@ -104,8 +129,8 @@ export async function authLogout(
|
|
|
104
129
|
M.fail("5XX"),
|
|
105
130
|
)(response);
|
|
106
131
|
if (!result.ok) {
|
|
107
|
-
return result;
|
|
132
|
+
return [result, { status: "complete", request: req, response }];
|
|
108
133
|
}
|
|
109
134
|
|
|
110
|
-
return result;
|
|
135
|
+
return [result, { status: "complete", request: req, response }];
|
|
111
136
|
}
|