@tonder.io/rn-sdk 0.1.0-beta.DEV1355.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +20 -0
- package/README.md +33 -0
- package/lib/commonjs/core/3DSHandler.js +108 -0
- package/lib/commonjs/core/3DSHandler.js.map +1 -0
- package/lib/commonjs/core/BaseCheckout/index.js +337 -0
- package/lib/commonjs/core/BaseCheckout/index.js.map +1 -0
- package/lib/commonjs/core/BaseEnrollment/index.js +86 -0
- package/lib/commonjs/core/BaseEnrollment/index.js.map +1 -0
- package/lib/commonjs/core/BaseSDK/index.js +75 -0
- package/lib/commonjs/core/BaseSDK/index.js.map +1 -0
- package/lib/commonjs/core/EnrollmentContainer/index.js +87 -0
- package/lib/commonjs/core/EnrollmentContainer/index.js.map +1 -0
- package/lib/commonjs/core/PaymentInlineContainer/index.js +111 -0
- package/lib/commonjs/core/PaymentInlineContainer/index.js.map +1 -0
- package/lib/commonjs/core/PaymentLiteContainer/index.js +158 -0
- package/lib/commonjs/core/PaymentLiteContainer/index.js.map +1 -0
- package/lib/commonjs/core/Tonder/index.js +134 -0
- package/lib/commonjs/core/Tonder/index.js.map +1 -0
- package/lib/commonjs/hooks/useTonder/index-old.js +37 -0
- package/lib/commonjs/hooks/useTonder/index-old.js.map +1 -0
- package/lib/commonjs/hooks/useTonder/index.js +16 -0
- package/lib/commonjs/hooks/useTonder/index.js.map +1 -0
- package/lib/commonjs/index.js +121 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/infrastructure/HttpClient.js +108 -0
- package/lib/commonjs/infrastructure/HttpClient.js.map +1 -0
- package/lib/commonjs/infrastructure/ServiceManager.js +32 -0
- package/lib/commonjs/infrastructure/ServiceManager.js.map +1 -0
- package/lib/commonjs/infrastructure/index.js +28 -0
- package/lib/commonjs/infrastructure/index.js.map +1 -0
- package/lib/commonjs/services/BusinessService.js +36 -0
- package/lib/commonjs/services/BusinessService.js.map +1 -0
- package/lib/commonjs/services/CardService.js +89 -0
- package/lib/commonjs/services/CardService.js.map +1 -0
- package/lib/commonjs/services/CheckoutService.js +121 -0
- package/lib/commonjs/services/CheckoutService.js.map +1 -0
- package/lib/commonjs/services/CustomerService.js +62 -0
- package/lib/commonjs/services/CustomerService.js.map +1 -0
- package/lib/commonjs/services/MercadoPagoService.js +27 -0
- package/lib/commonjs/services/MercadoPagoService.js.map +1 -0
- package/lib/commonjs/services/OpenPayService.js +25 -0
- package/lib/commonjs/services/OpenPayService.js.map +1 -0
- package/lib/commonjs/services/PaymentMethodService.js +37 -0
- package/lib/commonjs/services/PaymentMethodService.js.map +1 -0
- package/lib/commonjs/services/SkyflowService.js +53 -0
- package/lib/commonjs/services/SkyflowService.js.map +1 -0
- package/lib/commonjs/services/StorageService.js +49 -0
- package/lib/commonjs/services/StorageService.js.map +1 -0
- package/lib/commonjs/services/TokenService.js +46 -0
- package/lib/commonjs/services/TokenService.js.map +1 -0
- package/lib/commonjs/services/TransactionService.js +26 -0
- package/lib/commonjs/services/TransactionService.js.map +1 -0
- package/lib/commonjs/services/index.js +127 -0
- package/lib/commonjs/services/index.js.map +1 -0
- package/lib/commonjs/shared/catalog/cardBrandCatalog.js +19 -0
- package/lib/commonjs/shared/catalog/cardBrandCatalog.js.map +1 -0
- package/lib/commonjs/shared/catalog/paymentMethodsCatalog.js +252 -0
- package/lib/commonjs/shared/catalog/paymentMethodsCatalog.js.map +1 -0
- package/lib/commonjs/shared/constants/environments.js +13 -0
- package/lib/commonjs/shared/constants/environments.js.map +1 -0
- package/lib/commonjs/shared/constants/index.js +28 -0
- package/lib/commonjs/shared/constants/index.js.map +1 -0
- package/lib/commonjs/shared/constants/messages.js +101 -0
- package/lib/commonjs/shared/constants/messages.js.map +1 -0
- package/lib/commonjs/shared/constants/paymentMethods.js +68 -0
- package/lib/commonjs/shared/constants/paymentMethods.js.map +1 -0
- package/lib/commonjs/shared/constants/skyflow.js +47 -0
- package/lib/commonjs/shared/constants/skyflow.js.map +1 -0
- package/lib/commonjs/shared/enum/ErrorKeyEnum.js +55 -0
- package/lib/commonjs/shared/enum/ErrorKeyEnum.js.map +1 -0
- package/lib/commonjs/shared/enum/index.js +17 -0
- package/lib/commonjs/shared/enum/index.js.map +1 -0
- package/lib/commonjs/shared/index.js +39 -0
- package/lib/commonjs/shared/index.js.map +1 -0
- package/lib/commonjs/shared/utils/common.js +47 -0
- package/lib/commonjs/shared/utils/common.js.map +1 -0
- package/lib/commonjs/shared/utils/errors.js +21 -0
- package/lib/commonjs/shared/utils/errors.js.map +1 -0
- package/lib/commonjs/shared/utils/numberUtils.js +17 -0
- package/lib/commonjs/shared/utils/numberUtils.js.map +1 -0
- package/lib/commonjs/shared/utils/paymentMethodUtils.js +21 -0
- package/lib/commonjs/shared/utils/paymentMethodUtils.js.map +1 -0
- package/lib/commonjs/shared/utils/stringUtils.js +11 -0
- package/lib/commonjs/shared/utils/stringUtils.js.map +1 -0
- package/lib/commonjs/shared/utils/styleUtils.js +21 -0
- package/lib/commonjs/shared/utils/styleUtils.js.map +1 -0
- package/lib/commonjs/types/base.js +14 -0
- package/lib/commonjs/types/base.js.map +1 -0
- package/lib/commonjs/types/baseCheckout.js +6 -0
- package/lib/commonjs/types/baseCheckout.js.map +1 -0
- package/lib/commonjs/types/baseEnrollment.js +6 -0
- package/lib/commonjs/types/baseEnrollment.js.map +1 -0
- package/lib/commonjs/types/baseSDK.js +6 -0
- package/lib/commonjs/types/baseSDK.js.map +1 -0
- package/lib/commonjs/types/business.js +2 -0
- package/lib/commonjs/types/business.js.map +1 -0
- package/lib/commonjs/types/card.js +2 -0
- package/lib/commonjs/types/card.js.map +1 -0
- package/lib/commonjs/types/checkout.js +6 -0
- package/lib/commonjs/types/checkout.js.map +1 -0
- package/lib/commonjs/types/common.js +6 -0
- package/lib/commonjs/types/common.js.map +1 -0
- package/lib/commonjs/types/customer.js +2 -0
- package/lib/commonjs/types/customer.js.map +1 -0
- package/lib/commonjs/types/enrollment.js +6 -0
- package/lib/commonjs/types/enrollment.js.map +1 -0
- package/lib/commonjs/types/index.js +204 -0
- package/lib/commonjs/types/index.js.map +1 -0
- package/lib/commonjs/types/inlineCheckout.js +6 -0
- package/lib/commonjs/types/inlineCheckout.js.map +1 -0
- package/lib/commonjs/types/input.js +6 -0
- package/lib/commonjs/types/input.js.map +1 -0
- package/lib/commonjs/types/liteCheckout.js +6 -0
- package/lib/commonjs/types/liteCheckout.js.map +1 -0
- package/lib/commonjs/types/openpay-react-native.d.js +2 -0
- package/lib/commonjs/types/openpay-react-native.d.js.map +1 -0
- package/lib/commonjs/types/openpay.js +2 -0
- package/lib/commonjs/types/openpay.js.map +1 -0
- package/lib/commonjs/types/payment.js +6 -0
- package/lib/commonjs/types/payment.js.map +1 -0
- package/lib/commonjs/types/secure.js +2 -0
- package/lib/commonjs/types/secure.js.map +1 -0
- package/lib/commonjs/types/skyflow-react-native.d.js +2 -0
- package/lib/commonjs/types/skyflow-react-native.d.js.map +1 -0
- package/lib/commonjs/types/threeDSHandler.js +6 -0
- package/lib/commonjs/types/threeDSHandler.js.map +1 -0
- package/lib/commonjs/types/transaction.js +2 -0
- package/lib/commonjs/types/transaction.js.map +1 -0
- package/lib/commonjs/ui/components/Button/ProcessButton.js +50 -0
- package/lib/commonjs/ui/components/Button/ProcessButton.js.map +1 -0
- package/lib/commonjs/ui/components/CardForm/index.js +80 -0
- package/lib/commonjs/ui/components/CardForm/index.js.map +1 -0
- package/lib/commonjs/ui/components/Checkbox/Checkbox.js +62 -0
- package/lib/commonjs/ui/components/Checkbox/Checkbox.js.map +1 -0
- package/lib/commonjs/ui/components/Input/CardCVVInput.js +83 -0
- package/lib/commonjs/ui/components/Input/CardCVVInput.js.map +1 -0
- package/lib/commonjs/ui/components/Input/CardExpirationDateInput.js +91 -0
- package/lib/commonjs/ui/components/Input/CardExpirationDateInput.js.map +1 -0
- package/lib/commonjs/ui/components/Input/CardExpirationMonthInput.js +84 -0
- package/lib/commonjs/ui/components/Input/CardExpirationMonthInput.js.map +1 -0
- package/lib/commonjs/ui/components/Input/CardExpirationYearInput.js +84 -0
- package/lib/commonjs/ui/components/Input/CardExpirationYearInput.js.map +1 -0
- package/lib/commonjs/ui/components/Input/CardHolderInput.js +83 -0
- package/lib/commonjs/ui/components/Input/CardHolderInput.js.map +1 -0
- package/lib/commonjs/ui/components/Input/CardNumberInput.js +83 -0
- package/lib/commonjs/ui/components/Input/CardNumberInput.js.map +1 -0
- package/lib/commonjs/ui/components/PaymentMethodsList/index.js +105 -0
- package/lib/commonjs/ui/components/PaymentMethodsList/index.js.map +1 -0
- package/lib/commonjs/ui/components/RadioButton/index.js +57 -0
- package/lib/commonjs/ui/components/RadioButton/index.js.map +1 -0
- package/lib/commonjs/ui/components/SavedCardsList/index.js +126 -0
- package/lib/commonjs/ui/components/SavedCardsList/index.js.map +1 -0
- package/lib/commonjs/ui/components/Skeleton/CardFormSkeleton.js +102 -0
- package/lib/commonjs/ui/components/Skeleton/CardFormSkeleton.js.map +1 -0
- package/lib/commonjs/ui/components/WebView/ThreeDSWebView.js +105 -0
- package/lib/commonjs/ui/components/WebView/ThreeDSWebView.js.map +1 -0
- package/lib/commonjs/ui/features/TonderEnrollment/index.js +119 -0
- package/lib/commonjs/ui/features/TonderEnrollment/index.js.map +1 -0
- package/lib/commonjs/ui/features/TonderPayment/index.js +195 -0
- package/lib/commonjs/ui/features/TonderPayment/index.js.map +1 -0
- package/lib/commonjs/ui/providers/InnerProvider/index.js +25 -0
- package/lib/commonjs/ui/providers/InnerProvider/index.js.map +1 -0
- package/lib/commonjs/ui/providers/SkyflowContainerWrapper/index.js +31 -0
- package/lib/commonjs/ui/providers/SkyflowContainerWrapper/index.js.map +1 -0
- package/lib/commonjs/ui/providers/TonderProvider/context.js +16 -0
- package/lib/commonjs/ui/providers/TonderProvider/context.js.map +1 -0
- package/lib/commonjs/ui/providers/TonderProvider/hook.js +15 -0
- package/lib/commonjs/ui/providers/TonderProvider/hook.js.map +1 -0
- package/lib/commonjs/ui/providers/TonderProvider/index.js +96 -0
- package/lib/commonjs/ui/providers/TonderProvider/index.js.map +1 -0
- package/lib/commonjs/ui/providers/TonderProvider/uiWrapper.js +61 -0
- package/lib/commonjs/ui/providers/TonderProvider/uiWrapper.js.map +1 -0
- package/lib/commonjs/ui/styles/payment.js +27 -0
- package/lib/commonjs/ui/styles/payment.js.map +1 -0
- package/lib/commonjs/ui/styles/skyflow.js +54 -0
- package/lib/commonjs/ui/styles/skyflow.js.map +1 -0
- package/lib/module/core/3DSHandler.js +102 -0
- package/lib/module/core/3DSHandler.js.map +1 -0
- package/lib/module/core/BaseCheckout/index.js +332 -0
- package/lib/module/core/BaseCheckout/index.js.map +1 -0
- package/lib/module/core/BaseEnrollment/index.js +81 -0
- package/lib/module/core/BaseEnrollment/index.js.map +1 -0
- package/lib/module/core/BaseSDK/index.js +70 -0
- package/lib/module/core/BaseSDK/index.js.map +1 -0
- package/lib/module/core/EnrollmentContainer/index.js +81 -0
- package/lib/module/core/EnrollmentContainer/index.js.map +1 -0
- package/lib/module/core/PaymentInlineContainer/index.js +106 -0
- package/lib/module/core/PaymentInlineContainer/index.js.map +1 -0
- package/lib/module/core/PaymentLiteContainer/index.js +153 -0
- package/lib/module/core/PaymentLiteContainer/index.js.map +1 -0
- package/lib/module/core/Tonder/index.js +129 -0
- package/lib/module/core/Tonder/index.js.map +1 -0
- package/lib/module/hooks/useTonder/index-old.js +37 -0
- package/lib/module/hooks/useTonder/index-old.js.map +1 -0
- package/lib/module/hooks/useTonder/index.js +11 -0
- package/lib/module/hooks/useTonder/index.js.map +1 -0
- package/lib/module/index.js +14 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/infrastructure/HttpClient.js +102 -0
- package/lib/module/infrastructure/HttpClient.js.map +1 -0
- package/lib/module/infrastructure/ServiceManager.js +27 -0
- package/lib/module/infrastructure/ServiceManager.js.map +1 -0
- package/lib/module/infrastructure/index.js +5 -0
- package/lib/module/infrastructure/index.js.map +1 -0
- package/lib/module/services/BusinessService.js +30 -0
- package/lib/module/services/BusinessService.js.map +1 -0
- package/lib/module/services/CardService.js +83 -0
- package/lib/module/services/CardService.js.map +1 -0
- package/lib/module/services/CheckoutService.js +115 -0
- package/lib/module/services/CheckoutService.js.map +1 -0
- package/lib/module/services/CustomerService.js +56 -0
- package/lib/module/services/CustomerService.js.map +1 -0
- package/lib/module/services/MercadoPagoService.js +22 -0
- package/lib/module/services/MercadoPagoService.js.map +1 -0
- package/lib/module/services/OpenPayService.js +20 -0
- package/lib/module/services/OpenPayService.js.map +1 -0
- package/lib/module/services/PaymentMethodService.js +31 -0
- package/lib/module/services/PaymentMethodService.js.map +1 -0
- package/lib/module/services/SkyflowService.js +47 -0
- package/lib/module/services/SkyflowService.js.map +1 -0
- package/lib/module/services/StorageService.js +43 -0
- package/lib/module/services/StorageService.js.map +1 -0
- package/lib/module/services/TokenService.js +40 -0
- package/lib/module/services/TokenService.js.map +1 -0
- package/lib/module/services/TransactionService.js +20 -0
- package/lib/module/services/TransactionService.js.map +1 -0
- package/lib/module/services/index.js +15 -0
- package/lib/module/services/index.js.map +1 -0
- package/lib/module/shared/catalog/cardBrandCatalog.js +14 -0
- package/lib/module/shared/catalog/cardBrandCatalog.js.map +1 -0
- package/lib/module/shared/catalog/paymentMethodsCatalog.js +247 -0
- package/lib/module/shared/catalog/paymentMethodsCatalog.js.map +1 -0
- package/lib/module/shared/constants/environments.js +10 -0
- package/lib/module/shared/constants/environments.js.map +1 -0
- package/lib/module/shared/constants/index.js +5 -0
- package/lib/module/shared/constants/index.js.map +1 -0
- package/lib/module/shared/constants/messages.js +97 -0
- package/lib/module/shared/constants/messages.js.map +1 -0
- package/lib/module/shared/constants/paymentMethods.js +65 -0
- package/lib/module/shared/constants/paymentMethods.js.map +1 -0
- package/lib/module/shared/constants/skyflow.js +43 -0
- package/lib/module/shared/constants/skyflow.js.map +1 -0
- package/lib/module/shared/enum/ErrorKeyEnum.js +51 -0
- package/lib/module/shared/enum/ErrorKeyEnum.js.map +1 -0
- package/lib/module/shared/enum/index.js +4 -0
- package/lib/module/shared/enum/index.js.map +1 -0
- package/lib/module/shared/index.js +6 -0
- package/lib/module/shared/index.js.map +1 -0
- package/lib/module/shared/utils/common.js +41 -0
- package/lib/module/shared/utils/common.js.map +1 -0
- package/lib/module/shared/utils/errors.js +17 -0
- package/lib/module/shared/utils/errors.js.map +1 -0
- package/lib/module/shared/utils/numberUtils.js +13 -0
- package/lib/module/shared/utils/numberUtils.js.map +1 -0
- package/lib/module/shared/utils/paymentMethodUtils.js +16 -0
- package/lib/module/shared/utils/paymentMethodUtils.js.map +1 -0
- package/lib/module/shared/utils/stringUtils.js +6 -0
- package/lib/module/shared/utils/stringUtils.js.map +1 -0
- package/lib/module/shared/utils/styleUtils.js +17 -0
- package/lib/module/shared/utils/styleUtils.js.map +1 -0
- package/lib/module/types/base.js +13 -0
- package/lib/module/types/base.js.map +1 -0
- package/lib/module/types/baseCheckout.js +4 -0
- package/lib/module/types/baseCheckout.js.map +1 -0
- package/lib/module/types/baseEnrollment.js +4 -0
- package/lib/module/types/baseEnrollment.js.map +1 -0
- package/lib/module/types/baseSDK.js +4 -0
- package/lib/module/types/baseSDK.js.map +1 -0
- package/lib/module/types/business.js +2 -0
- package/lib/module/types/business.js.map +1 -0
- package/lib/module/types/card.js +2 -0
- package/lib/module/types/card.js.map +1 -0
- package/lib/module/types/checkout.js +4 -0
- package/lib/module/types/checkout.js.map +1 -0
- package/lib/module/types/common.js +4 -0
- package/lib/module/types/common.js.map +1 -0
- package/lib/module/types/customer.js +2 -0
- package/lib/module/types/customer.js.map +1 -0
- package/lib/module/types/enrollment.js +4 -0
- package/lib/module/types/enrollment.js.map +1 -0
- package/lib/module/types/index.js +21 -0
- package/lib/module/types/index.js.map +1 -0
- package/lib/module/types/inlineCheckout.js +4 -0
- package/lib/module/types/inlineCheckout.js.map +1 -0
- package/lib/module/types/input.js +4 -0
- package/lib/module/types/input.js.map +1 -0
- package/lib/module/types/liteCheckout.js +4 -0
- package/lib/module/types/liteCheckout.js.map +1 -0
- package/lib/module/types/openpay-react-native.d.js +2 -0
- package/lib/module/types/openpay-react-native.d.js.map +1 -0
- package/lib/module/types/openpay.js +2 -0
- package/lib/module/types/openpay.js.map +1 -0
- package/lib/module/types/payment.js +4 -0
- package/lib/module/types/payment.js.map +1 -0
- package/lib/module/types/secure.js +2 -0
- package/lib/module/types/secure.js.map +1 -0
- package/lib/module/types/skyflow-react-native.d.js +2 -0
- package/lib/module/types/skyflow-react-native.d.js.map +1 -0
- package/lib/module/types/threeDSHandler.js +4 -0
- package/lib/module/types/threeDSHandler.js.map +1 -0
- package/lib/module/types/transaction.js +2 -0
- package/lib/module/types/transaction.js.map +1 -0
- package/lib/module/ui/components/Button/ProcessButton.js +44 -0
- package/lib/module/ui/components/Button/ProcessButton.js.map +1 -0
- package/lib/module/ui/components/CardForm/index.js +74 -0
- package/lib/module/ui/components/CardForm/index.js.map +1 -0
- package/lib/module/ui/components/Checkbox/Checkbox.js +56 -0
- package/lib/module/ui/components/Checkbox/Checkbox.js.map +1 -0
- package/lib/module/ui/components/Input/CardCVVInput.js +75 -0
- package/lib/module/ui/components/Input/CardCVVInput.js.map +1 -0
- package/lib/module/ui/components/Input/CardExpirationDateInput.js +84 -0
- package/lib/module/ui/components/Input/CardExpirationDateInput.js.map +1 -0
- package/lib/module/ui/components/Input/CardExpirationMonthInput.js +77 -0
- package/lib/module/ui/components/Input/CardExpirationMonthInput.js.map +1 -0
- package/lib/module/ui/components/Input/CardExpirationYearInput.js +76 -0
- package/lib/module/ui/components/Input/CardExpirationYearInput.js.map +1 -0
- package/lib/module/ui/components/Input/CardHolderInput.js +75 -0
- package/lib/module/ui/components/Input/CardHolderInput.js.map +1 -0
- package/lib/module/ui/components/Input/CardNumberInput.js +75 -0
- package/lib/module/ui/components/Input/CardNumberInput.js.map +1 -0
- package/lib/module/ui/components/PaymentMethodsList/index.js +100 -0
- package/lib/module/ui/components/PaymentMethodsList/index.js.map +1 -0
- package/lib/module/ui/components/RadioButton/index.js +50 -0
- package/lib/module/ui/components/RadioButton/index.js.map +1 -0
- package/lib/module/ui/components/SavedCardsList/index.js +121 -0
- package/lib/module/ui/components/SavedCardsList/index.js.map +1 -0
- package/lib/module/ui/components/Skeleton/CardFormSkeleton.js +97 -0
- package/lib/module/ui/components/Skeleton/CardFormSkeleton.js.map +1 -0
- package/lib/module/ui/components/WebView/ThreeDSWebView.js +96 -0
- package/lib/module/ui/components/WebView/ThreeDSWebView.js.map +1 -0
- package/lib/module/ui/features/TonderEnrollment/index.js +114 -0
- package/lib/module/ui/features/TonderEnrollment/index.js.map +1 -0
- package/lib/module/ui/features/TonderPayment/index.js +188 -0
- package/lib/module/ui/features/TonderPayment/index.js.map +1 -0
- package/lib/module/ui/providers/InnerProvider/index.js +19 -0
- package/lib/module/ui/providers/InnerProvider/index.js.map +1 -0
- package/lib/module/ui/providers/SkyflowContainerWrapper/index.js +24 -0
- package/lib/module/ui/providers/SkyflowContainerWrapper/index.js.map +1 -0
- package/lib/module/ui/providers/TonderProvider/context.js +10 -0
- package/lib/module/ui/providers/TonderProvider/context.js.map +1 -0
- package/lib/module/ui/providers/TonderProvider/hook.js +10 -0
- package/lib/module/ui/providers/TonderProvider/hook.js.map +1 -0
- package/lib/module/ui/providers/TonderProvider/index.js +88 -0
- package/lib/module/ui/providers/TonderProvider/index.js.map +1 -0
- package/lib/module/ui/providers/TonderProvider/uiWrapper.js +57 -0
- package/lib/module/ui/providers/TonderProvider/uiWrapper.js.map +1 -0
- package/lib/module/ui/styles/payment.js +25 -0
- package/lib/module/ui/styles/payment.js.map +1 -0
- package/lib/module/ui/styles/skyflow.js +52 -0
- package/lib/module/ui/styles/skyflow.js.map +1 -0
- package/lib/typescript/commonjs/package.json +1 -0
- package/lib/typescript/commonjs/src/core/3DSHandler.d.ts +23 -0
- package/lib/typescript/commonjs/src/core/3DSHandler.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/core/BaseCheckout/index.d.ts +28 -0
- package/lib/typescript/commonjs/src/core/BaseCheckout/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/core/BaseEnrollment/index.d.ts +16 -0
- package/lib/typescript/commonjs/src/core/BaseEnrollment/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/core/BaseSDK/index.d.ts +19 -0
- package/lib/typescript/commonjs/src/core/BaseSDK/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/core/EnrollmentContainer/index.d.ts +15 -0
- package/lib/typescript/commonjs/src/core/EnrollmentContainer/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/core/PaymentInlineContainer/index.d.ts +17 -0
- package/lib/typescript/commonjs/src/core/PaymentInlineContainer/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/core/PaymentLiteContainer/index.d.ts +21 -0
- package/lib/typescript/commonjs/src/core/PaymentLiteContainer/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/core/Tonder/index.d.ts +33 -0
- package/lib/typescript/commonjs/src/core/Tonder/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/hooks/useTonder/index-old.d.ts +1 -0
- package/lib/typescript/commonjs/src/hooks/useTonder/index-old.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/hooks/useTonder/index.d.ts +4 -0
- package/lib/typescript/commonjs/src/hooks/useTonder/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/index.d.ts +12 -0
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/infrastructure/HttpClient.d.ts +20 -0
- package/lib/typescript/commonjs/src/infrastructure/HttpClient.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/infrastructure/ServiceManager.d.ts +19 -0
- package/lib/typescript/commonjs/src/infrastructure/ServiceManager.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/infrastructure/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/infrastructure/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/services/BusinessService.d.ts +15 -0
- package/lib/typescript/commonjs/src/services/BusinessService.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/services/CardService.d.ts +28 -0
- package/lib/typescript/commonjs/src/services/CardService.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/services/CheckoutService.d.ts +37 -0
- package/lib/typescript/commonjs/src/services/CheckoutService.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/services/CustomerService.d.ts +24 -0
- package/lib/typescript/commonjs/src/services/CustomerService.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/services/MercadoPagoService.d.ts +4 -0
- package/lib/typescript/commonjs/src/services/MercadoPagoService.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/services/OpenPayService.d.ts +4 -0
- package/lib/typescript/commonjs/src/services/OpenPayService.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/services/PaymentMethodService.d.ts +15 -0
- package/lib/typescript/commonjs/src/services/PaymentMethodService.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/services/SkyflowService.d.ts +15 -0
- package/lib/typescript/commonjs/src/services/SkyflowService.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/services/StorageService.d.ts +7 -0
- package/lib/typescript/commonjs/src/services/StorageService.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/services/TokenService.d.ts +16 -0
- package/lib/typescript/commonjs/src/services/TokenService.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/services/TransactionService.d.ts +8 -0
- package/lib/typescript/commonjs/src/services/TransactionService.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/services/index.d.ts +13 -0
- package/lib/typescript/commonjs/src/services/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/shared/catalog/cardBrandCatalog.d.ts +2 -0
- package/lib/typescript/commonjs/src/shared/catalog/cardBrandCatalog.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/shared/catalog/paymentMethodsCatalog.d.ts +5 -0
- package/lib/typescript/commonjs/src/shared/catalog/paymentMethodsCatalog.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/shared/constants/environments.d.ts +8 -0
- package/lib/typescript/commonjs/src/shared/constants/environments.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/shared/constants/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/shared/constants/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/shared/constants/messages.d.ts +94 -0
- package/lib/typescript/commonjs/src/shared/constants/messages.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/shared/constants/paymentMethods.d.ts +63 -0
- package/lib/typescript/commonjs/src/shared/constants/paymentMethods.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/shared/constants/skyflow.d.ts +38 -0
- package/lib/typescript/commonjs/src/shared/constants/skyflow.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/shared/enum/ErrorKeyEnum.d.ts +48 -0
- package/lib/typescript/commonjs/src/shared/enum/ErrorKeyEnum.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/shared/enum/index.d.ts +2 -0
- package/lib/typescript/commonjs/src/shared/enum/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/shared/index.d.ts +4 -0
- package/lib/typescript/commonjs/src/shared/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/shared/utils/common.d.ts +9 -0
- package/lib/typescript/commonjs/src/shared/utils/common.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/shared/utils/errors.d.ts +16 -0
- package/lib/typescript/commonjs/src/shared/utils/errors.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/shared/utils/numberUtils.d.ts +2 -0
- package/lib/typescript/commonjs/src/shared/utils/numberUtils.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/shared/utils/paymentMethodUtils.d.ts +2 -0
- package/lib/typescript/commonjs/src/shared/utils/paymentMethodUtils.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/shared/utils/stringUtils.d.ts +2 -0
- package/lib/typescript/commonjs/src/shared/utils/stringUtils.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/shared/utils/styleUtils.d.ts +8 -0
- package/lib/typescript/commonjs/src/shared/utils/styleUtils.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/base.d.ts +48 -0
- package/lib/typescript/commonjs/src/types/base.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/baseCheckout.d.ts +29 -0
- package/lib/typescript/commonjs/src/types/baseCheckout.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/baseEnrollment.d.ts +11 -0
- package/lib/typescript/commonjs/src/types/baseEnrollment.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/baseSDK.d.ts +10 -0
- package/lib/typescript/commonjs/src/types/baseSDK.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/business.d.ts +36 -0
- package/lib/typescript/commonjs/src/types/business.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/card.d.ts +33 -0
- package/lib/typescript/commonjs/src/types/card.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/checkout.d.ts +150 -0
- package/lib/typescript/commonjs/src/types/checkout.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/common.d.ts +60 -0
- package/lib/typescript/commonjs/src/types/common.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/customer.d.ts +28 -0
- package/lib/typescript/commonjs/src/types/customer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/enrollment.d.ts +66 -0
- package/lib/typescript/commonjs/src/types/enrollment.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/index.d.ts +19 -0
- package/lib/typescript/commonjs/src/types/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/inlineCheckout.d.ts +78 -0
- package/lib/typescript/commonjs/src/types/inlineCheckout.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/input.d.ts +13 -0
- package/lib/typescript/commonjs/src/types/input.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/liteCheckout.d.ts +90 -0
- package/lib/typescript/commonjs/src/types/liteCheckout.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/openpay.d.ts +11 -0
- package/lib/typescript/commonjs/src/types/openpay.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/payment.d.ts +59 -0
- package/lib/typescript/commonjs/src/types/payment.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/secure.d.ts +4 -0
- package/lib/typescript/commonjs/src/types/secure.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/threeDSHandler.d.ts +7 -0
- package/lib/typescript/commonjs/src/types/threeDSHandler.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/transaction.d.ts +103 -0
- package/lib/typescript/commonjs/src/types/transaction.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/ui/components/Button/ProcessButton.d.ts +11 -0
- package/lib/typescript/commonjs/src/ui/components/Button/ProcessButton.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/ui/components/CardForm/index.d.ts +13 -0
- package/lib/typescript/commonjs/src/ui/components/CardForm/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/ui/components/Checkbox/Checkbox.d.ts +9 -0
- package/lib/typescript/commonjs/src/ui/components/Checkbox/Checkbox.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/ui/components/Input/CardCVVInput.d.ts +4 -0
- package/lib/typescript/commonjs/src/ui/components/Input/CardCVVInput.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/ui/components/Input/CardExpirationDateInput.d.ts +10 -0
- package/lib/typescript/commonjs/src/ui/components/Input/CardExpirationDateInput.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/ui/components/Input/CardExpirationMonthInput.d.ts +4 -0
- package/lib/typescript/commonjs/src/ui/components/Input/CardExpirationMonthInput.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/ui/components/Input/CardExpirationYearInput.d.ts +4 -0
- package/lib/typescript/commonjs/src/ui/components/Input/CardExpirationYearInput.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/ui/components/Input/CardHolderInput.d.ts +4 -0
- package/lib/typescript/commonjs/src/ui/components/Input/CardHolderInput.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/ui/components/Input/CardNumberInput.d.ts +4 -0
- package/lib/typescript/commonjs/src/ui/components/Input/CardNumberInput.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/ui/components/PaymentMethodsList/index.d.ts +11 -0
- package/lib/typescript/commonjs/src/ui/components/PaymentMethodsList/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/ui/components/RadioButton/index.d.ts +14 -0
- package/lib/typescript/commonjs/src/ui/components/RadioButton/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/ui/components/SavedCardsList/index.d.ts +14 -0
- package/lib/typescript/commonjs/src/ui/components/SavedCardsList/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/ui/components/Skeleton/CardFormSkeleton.d.ts +5 -0
- package/lib/typescript/commonjs/src/ui/components/Skeleton/CardFormSkeleton.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/ui/components/WebView/ThreeDSWebView.d.ts +9 -0
- package/lib/typescript/commonjs/src/ui/components/WebView/ThreeDSWebView.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/ui/features/TonderEnrollment/index.d.ts +6 -0
- package/lib/typescript/commonjs/src/ui/features/TonderEnrollment/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/ui/features/TonderPayment/index.d.ts +6 -0
- package/lib/typescript/commonjs/src/ui/features/TonderPayment/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/ui/providers/InnerProvider/index.d.ts +10 -0
- package/lib/typescript/commonjs/src/ui/providers/InnerProvider/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/ui/providers/SkyflowContainerWrapper/index.d.ts +10 -0
- package/lib/typescript/commonjs/src/ui/providers/SkyflowContainerWrapper/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/ui/providers/TonderProvider/context.d.ts +5 -0
- package/lib/typescript/commonjs/src/ui/providers/TonderProvider/context.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/ui/providers/TonderProvider/hook.d.ts +4 -0
- package/lib/typescript/commonjs/src/ui/providers/TonderProvider/hook.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/ui/providers/TonderProvider/index.d.ts +8 -0
- package/lib/typescript/commonjs/src/ui/providers/TonderProvider/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/ui/providers/TonderProvider/uiWrapper.d.ts +10 -0
- package/lib/typescript/commonjs/src/ui/providers/TonderProvider/uiWrapper.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/ui/styles/payment.d.ts +20 -0
- package/lib/typescript/commonjs/src/ui/styles/payment.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/ui/styles/skyflow.d.ts +44 -0
- package/lib/typescript/commonjs/src/ui/styles/skyflow.d.ts.map +1 -0
- package/lib/typescript/module/package.json +1 -0
- package/lib/typescript/module/src/core/3DSHandler.d.ts +23 -0
- package/lib/typescript/module/src/core/3DSHandler.d.ts.map +1 -0
- package/lib/typescript/module/src/core/BaseCheckout/index.d.ts +28 -0
- package/lib/typescript/module/src/core/BaseCheckout/index.d.ts.map +1 -0
- package/lib/typescript/module/src/core/BaseEnrollment/index.d.ts +16 -0
- package/lib/typescript/module/src/core/BaseEnrollment/index.d.ts.map +1 -0
- package/lib/typescript/module/src/core/BaseSDK/index.d.ts +19 -0
- package/lib/typescript/module/src/core/BaseSDK/index.d.ts.map +1 -0
- package/lib/typescript/module/src/core/EnrollmentContainer/index.d.ts +15 -0
- package/lib/typescript/module/src/core/EnrollmentContainer/index.d.ts.map +1 -0
- package/lib/typescript/module/src/core/PaymentInlineContainer/index.d.ts +17 -0
- package/lib/typescript/module/src/core/PaymentInlineContainer/index.d.ts.map +1 -0
- package/lib/typescript/module/src/core/PaymentLiteContainer/index.d.ts +21 -0
- package/lib/typescript/module/src/core/PaymentLiteContainer/index.d.ts.map +1 -0
- package/lib/typescript/module/src/core/Tonder/index.d.ts +33 -0
- package/lib/typescript/module/src/core/Tonder/index.d.ts.map +1 -0
- package/lib/typescript/module/src/hooks/useTonder/index-old.d.ts +1 -0
- package/lib/typescript/module/src/hooks/useTonder/index-old.d.ts.map +1 -0
- package/lib/typescript/module/src/hooks/useTonder/index.d.ts +4 -0
- package/lib/typescript/module/src/hooks/useTonder/index.d.ts.map +1 -0
- package/lib/typescript/module/src/index.d.ts +12 -0
- package/lib/typescript/module/src/index.d.ts.map +1 -0
- package/lib/typescript/module/src/infrastructure/HttpClient.d.ts +20 -0
- package/lib/typescript/module/src/infrastructure/HttpClient.d.ts.map +1 -0
- package/lib/typescript/module/src/infrastructure/ServiceManager.d.ts +19 -0
- package/lib/typescript/module/src/infrastructure/ServiceManager.d.ts.map +1 -0
- package/lib/typescript/module/src/infrastructure/index.d.ts +3 -0
- package/lib/typescript/module/src/infrastructure/index.d.ts.map +1 -0
- package/lib/typescript/module/src/services/BusinessService.d.ts +15 -0
- package/lib/typescript/module/src/services/BusinessService.d.ts.map +1 -0
- package/lib/typescript/module/src/services/CardService.d.ts +28 -0
- package/lib/typescript/module/src/services/CardService.d.ts.map +1 -0
- package/lib/typescript/module/src/services/CheckoutService.d.ts +37 -0
- package/lib/typescript/module/src/services/CheckoutService.d.ts.map +1 -0
- package/lib/typescript/module/src/services/CustomerService.d.ts +24 -0
- package/lib/typescript/module/src/services/CustomerService.d.ts.map +1 -0
- package/lib/typescript/module/src/services/MercadoPagoService.d.ts +4 -0
- package/lib/typescript/module/src/services/MercadoPagoService.d.ts.map +1 -0
- package/lib/typescript/module/src/services/OpenPayService.d.ts +4 -0
- package/lib/typescript/module/src/services/OpenPayService.d.ts.map +1 -0
- package/lib/typescript/module/src/services/PaymentMethodService.d.ts +15 -0
- package/lib/typescript/module/src/services/PaymentMethodService.d.ts.map +1 -0
- package/lib/typescript/module/src/services/SkyflowService.d.ts +15 -0
- package/lib/typescript/module/src/services/SkyflowService.d.ts.map +1 -0
- package/lib/typescript/module/src/services/StorageService.d.ts +7 -0
- package/lib/typescript/module/src/services/StorageService.d.ts.map +1 -0
- package/lib/typescript/module/src/services/TokenService.d.ts +16 -0
- package/lib/typescript/module/src/services/TokenService.d.ts.map +1 -0
- package/lib/typescript/module/src/services/TransactionService.d.ts +8 -0
- package/lib/typescript/module/src/services/TransactionService.d.ts.map +1 -0
- package/lib/typescript/module/src/services/index.d.ts +13 -0
- package/lib/typescript/module/src/services/index.d.ts.map +1 -0
- package/lib/typescript/module/src/shared/catalog/cardBrandCatalog.d.ts +2 -0
- package/lib/typescript/module/src/shared/catalog/cardBrandCatalog.d.ts.map +1 -0
- package/lib/typescript/module/src/shared/catalog/paymentMethodsCatalog.d.ts +5 -0
- package/lib/typescript/module/src/shared/catalog/paymentMethodsCatalog.d.ts.map +1 -0
- package/lib/typescript/module/src/shared/constants/environments.d.ts +8 -0
- package/lib/typescript/module/src/shared/constants/environments.d.ts.map +1 -0
- package/lib/typescript/module/src/shared/constants/index.d.ts +3 -0
- package/lib/typescript/module/src/shared/constants/index.d.ts.map +1 -0
- package/lib/typescript/module/src/shared/constants/messages.d.ts +94 -0
- package/lib/typescript/module/src/shared/constants/messages.d.ts.map +1 -0
- package/lib/typescript/module/src/shared/constants/paymentMethods.d.ts +63 -0
- package/lib/typescript/module/src/shared/constants/paymentMethods.d.ts.map +1 -0
- package/lib/typescript/module/src/shared/constants/skyflow.d.ts +38 -0
- package/lib/typescript/module/src/shared/constants/skyflow.d.ts.map +1 -0
- package/lib/typescript/module/src/shared/enum/ErrorKeyEnum.d.ts +48 -0
- package/lib/typescript/module/src/shared/enum/ErrorKeyEnum.d.ts.map +1 -0
- package/lib/typescript/module/src/shared/enum/index.d.ts +2 -0
- package/lib/typescript/module/src/shared/enum/index.d.ts.map +1 -0
- package/lib/typescript/module/src/shared/index.d.ts +4 -0
- package/lib/typescript/module/src/shared/index.d.ts.map +1 -0
- package/lib/typescript/module/src/shared/utils/common.d.ts +9 -0
- package/lib/typescript/module/src/shared/utils/common.d.ts.map +1 -0
- package/lib/typescript/module/src/shared/utils/errors.d.ts +16 -0
- package/lib/typescript/module/src/shared/utils/errors.d.ts.map +1 -0
- package/lib/typescript/module/src/shared/utils/numberUtils.d.ts +2 -0
- package/lib/typescript/module/src/shared/utils/numberUtils.d.ts.map +1 -0
- package/lib/typescript/module/src/shared/utils/paymentMethodUtils.d.ts +2 -0
- package/lib/typescript/module/src/shared/utils/paymentMethodUtils.d.ts.map +1 -0
- package/lib/typescript/module/src/shared/utils/stringUtils.d.ts +2 -0
- package/lib/typescript/module/src/shared/utils/stringUtils.d.ts.map +1 -0
- package/lib/typescript/module/src/shared/utils/styleUtils.d.ts +8 -0
- package/lib/typescript/module/src/shared/utils/styleUtils.d.ts.map +1 -0
- package/lib/typescript/module/src/types/base.d.ts +48 -0
- package/lib/typescript/module/src/types/base.d.ts.map +1 -0
- package/lib/typescript/module/src/types/baseCheckout.d.ts +29 -0
- package/lib/typescript/module/src/types/baseCheckout.d.ts.map +1 -0
- package/lib/typescript/module/src/types/baseEnrollment.d.ts +11 -0
- package/lib/typescript/module/src/types/baseEnrollment.d.ts.map +1 -0
- package/lib/typescript/module/src/types/baseSDK.d.ts +10 -0
- package/lib/typescript/module/src/types/baseSDK.d.ts.map +1 -0
- package/lib/typescript/module/src/types/business.d.ts +36 -0
- package/lib/typescript/module/src/types/business.d.ts.map +1 -0
- package/lib/typescript/module/src/types/card.d.ts +33 -0
- package/lib/typescript/module/src/types/card.d.ts.map +1 -0
- package/lib/typescript/module/src/types/checkout.d.ts +150 -0
- package/lib/typescript/module/src/types/checkout.d.ts.map +1 -0
- package/lib/typescript/module/src/types/common.d.ts +60 -0
- package/lib/typescript/module/src/types/common.d.ts.map +1 -0
- package/lib/typescript/module/src/types/customer.d.ts +28 -0
- package/lib/typescript/module/src/types/customer.d.ts.map +1 -0
- package/lib/typescript/module/src/types/enrollment.d.ts +66 -0
- package/lib/typescript/module/src/types/enrollment.d.ts.map +1 -0
- package/lib/typescript/module/src/types/index.d.ts +19 -0
- package/lib/typescript/module/src/types/index.d.ts.map +1 -0
- package/lib/typescript/module/src/types/inlineCheckout.d.ts +78 -0
- package/lib/typescript/module/src/types/inlineCheckout.d.ts.map +1 -0
- package/lib/typescript/module/src/types/input.d.ts +13 -0
- package/lib/typescript/module/src/types/input.d.ts.map +1 -0
- package/lib/typescript/module/src/types/liteCheckout.d.ts +90 -0
- package/lib/typescript/module/src/types/liteCheckout.d.ts.map +1 -0
- package/lib/typescript/module/src/types/openpay.d.ts +11 -0
- package/lib/typescript/module/src/types/openpay.d.ts.map +1 -0
- package/lib/typescript/module/src/types/payment.d.ts +59 -0
- package/lib/typescript/module/src/types/payment.d.ts.map +1 -0
- package/lib/typescript/module/src/types/secure.d.ts +4 -0
- package/lib/typescript/module/src/types/secure.d.ts.map +1 -0
- package/lib/typescript/module/src/types/threeDSHandler.d.ts +7 -0
- package/lib/typescript/module/src/types/threeDSHandler.d.ts.map +1 -0
- package/lib/typescript/module/src/types/transaction.d.ts +103 -0
- package/lib/typescript/module/src/types/transaction.d.ts.map +1 -0
- package/lib/typescript/module/src/ui/components/Button/ProcessButton.d.ts +11 -0
- package/lib/typescript/module/src/ui/components/Button/ProcessButton.d.ts.map +1 -0
- package/lib/typescript/module/src/ui/components/CardForm/index.d.ts +13 -0
- package/lib/typescript/module/src/ui/components/CardForm/index.d.ts.map +1 -0
- package/lib/typescript/module/src/ui/components/Checkbox/Checkbox.d.ts +9 -0
- package/lib/typescript/module/src/ui/components/Checkbox/Checkbox.d.ts.map +1 -0
- package/lib/typescript/module/src/ui/components/Input/CardCVVInput.d.ts +4 -0
- package/lib/typescript/module/src/ui/components/Input/CardCVVInput.d.ts.map +1 -0
- package/lib/typescript/module/src/ui/components/Input/CardExpirationDateInput.d.ts +10 -0
- package/lib/typescript/module/src/ui/components/Input/CardExpirationDateInput.d.ts.map +1 -0
- package/lib/typescript/module/src/ui/components/Input/CardExpirationMonthInput.d.ts +4 -0
- package/lib/typescript/module/src/ui/components/Input/CardExpirationMonthInput.d.ts.map +1 -0
- package/lib/typescript/module/src/ui/components/Input/CardExpirationYearInput.d.ts +4 -0
- package/lib/typescript/module/src/ui/components/Input/CardExpirationYearInput.d.ts.map +1 -0
- package/lib/typescript/module/src/ui/components/Input/CardHolderInput.d.ts +4 -0
- package/lib/typescript/module/src/ui/components/Input/CardHolderInput.d.ts.map +1 -0
- package/lib/typescript/module/src/ui/components/Input/CardNumberInput.d.ts +4 -0
- package/lib/typescript/module/src/ui/components/Input/CardNumberInput.d.ts.map +1 -0
- package/lib/typescript/module/src/ui/components/PaymentMethodsList/index.d.ts +11 -0
- package/lib/typescript/module/src/ui/components/PaymentMethodsList/index.d.ts.map +1 -0
- package/lib/typescript/module/src/ui/components/RadioButton/index.d.ts +14 -0
- package/lib/typescript/module/src/ui/components/RadioButton/index.d.ts.map +1 -0
- package/lib/typescript/module/src/ui/components/SavedCardsList/index.d.ts +14 -0
- package/lib/typescript/module/src/ui/components/SavedCardsList/index.d.ts.map +1 -0
- package/lib/typescript/module/src/ui/components/Skeleton/CardFormSkeleton.d.ts +5 -0
- package/lib/typescript/module/src/ui/components/Skeleton/CardFormSkeleton.d.ts.map +1 -0
- package/lib/typescript/module/src/ui/components/WebView/ThreeDSWebView.d.ts +9 -0
- package/lib/typescript/module/src/ui/components/WebView/ThreeDSWebView.d.ts.map +1 -0
- package/lib/typescript/module/src/ui/features/TonderEnrollment/index.d.ts +6 -0
- package/lib/typescript/module/src/ui/features/TonderEnrollment/index.d.ts.map +1 -0
- package/lib/typescript/module/src/ui/features/TonderPayment/index.d.ts +6 -0
- package/lib/typescript/module/src/ui/features/TonderPayment/index.d.ts.map +1 -0
- package/lib/typescript/module/src/ui/providers/InnerProvider/index.d.ts +10 -0
- package/lib/typescript/module/src/ui/providers/InnerProvider/index.d.ts.map +1 -0
- package/lib/typescript/module/src/ui/providers/SkyflowContainerWrapper/index.d.ts +10 -0
- package/lib/typescript/module/src/ui/providers/SkyflowContainerWrapper/index.d.ts.map +1 -0
- package/lib/typescript/module/src/ui/providers/TonderProvider/context.d.ts +5 -0
- package/lib/typescript/module/src/ui/providers/TonderProvider/context.d.ts.map +1 -0
- package/lib/typescript/module/src/ui/providers/TonderProvider/hook.d.ts +4 -0
- package/lib/typescript/module/src/ui/providers/TonderProvider/hook.d.ts.map +1 -0
- package/lib/typescript/module/src/ui/providers/TonderProvider/index.d.ts +8 -0
- package/lib/typescript/module/src/ui/providers/TonderProvider/index.d.ts.map +1 -0
- package/lib/typescript/module/src/ui/providers/TonderProvider/uiWrapper.d.ts +10 -0
- package/lib/typescript/module/src/ui/providers/TonderProvider/uiWrapper.d.ts.map +1 -0
- package/lib/typescript/module/src/ui/styles/payment.d.ts +20 -0
- package/lib/typescript/module/src/ui/styles/payment.d.ts.map +1 -0
- package/lib/typescript/module/src/ui/styles/skyflow.d.ts +44 -0
- package/lib/typescript/module/src/ui/styles/skyflow.d.ts.map +1 -0
- package/package.json +206 -0
- package/src/core/3DSHandler.ts +140 -0
- package/src/core/BaseCheckout/index.ts +420 -0
- package/src/core/BaseEnrollment/index.ts +99 -0
- package/src/core/BaseSDK/index.ts +93 -0
- package/src/core/EnrollmentContainer/index.ts +105 -0
- package/src/core/PaymentInlineContainer/index.ts +127 -0
- package/src/core/PaymentLiteContainer/index.ts +201 -0
- package/src/core/Tonder/index.ts +147 -0
- package/src/hooks/useTonder/index-old.ts +35 -0
- package/src/hooks/useTonder/index.ts +10 -0
- package/src/index.tsx +11 -0
- package/src/infrastructure/HttpClient.ts +121 -0
- package/src/infrastructure/ServiceManager.ts +54 -0
- package/src/infrastructure/index.ts +2 -0
- package/src/services/BusinessService.ts +33 -0
- package/src/services/CardService.ts +118 -0
- package/src/services/CheckoutService.ts +135 -0
- package/src/services/CustomerService.ts +59 -0
- package/src/services/MercadoPagoService.ts +19 -0
- package/src/services/OpenPayService.ts +22 -0
- package/src/services/PaymentMethodService.ts +38 -0
- package/src/services/SkyflowService.ts +50 -0
- package/src/services/StorageService.ts +56 -0
- package/src/services/TokenService.ts +45 -0
- package/src/services/TransactionService.ts +23 -0
- package/src/services/index.ts +12 -0
- package/src/shared/catalog/cardBrandCatalog.ts +16 -0
- package/src/shared/catalog/paymentMethodsCatalog.ts +252 -0
- package/src/shared/constants/environments.ts +8 -0
- package/src/shared/constants/index.ts +2 -0
- package/src/shared/constants/messages.ts +119 -0
- package/src/shared/constants/paymentMethods.ts +63 -0
- package/src/shared/constants/skyflow.ts +60 -0
- package/src/shared/enum/ErrorKeyEnum.ts +47 -0
- package/src/shared/enum/index.ts +1 -0
- package/src/shared/index.ts +3 -0
- package/src/shared/utils/common.ts +46 -0
- package/src/shared/utils/errors.ts +25 -0
- package/src/shared/utils/numberUtils.ts +10 -0
- package/src/shared/utils/paymentMethodUtils.ts +17 -0
- package/src/shared/utils/stringUtils.ts +3 -0
- package/src/shared/utils/styleUtils.ts +11 -0
- package/src/types/base.ts +79 -0
- package/src/types/baseCheckout.ts +42 -0
- package/src/types/baseEnrollment.ts +17 -0
- package/src/types/baseSDK.ts +10 -0
- package/src/types/business.ts +34 -0
- package/src/types/card.ts +38 -0
- package/src/types/checkout.ts +157 -0
- package/src/types/common.ts +68 -0
- package/src/types/customer.ts +29 -0
- package/src/types/enrollment.ts +70 -0
- package/src/types/index.ts +18 -0
- package/src/types/inlineCheckout.ts +96 -0
- package/src/types/input.ts +17 -0
- package/src/types/liteCheckout.ts +108 -0
- package/src/types/openpay-react-native.d.ts +3 -0
- package/src/types/openpay.ts +8 -0
- package/src/types/payment.ts +66 -0
- package/src/types/secure.ts +3 -0
- package/src/types/skyflow-react-native.d.ts +81 -0
- package/src/types/threeDSHandler.ts +10 -0
- package/src/types/transaction.ts +106 -0
- package/src/ui/components/Button/ProcessButton.tsx +57 -0
- package/src/ui/components/CardForm/index.tsx +91 -0
- package/src/ui/components/Checkbox/Checkbox.tsx +56 -0
- package/src/ui/components/Input/CardCVVInput.tsx +91 -0
- package/src/ui/components/Input/CardExpirationDateInput.tsx +95 -0
- package/src/ui/components/Input/CardExpirationMonthInput.tsx +90 -0
- package/src/ui/components/Input/CardExpirationYearInput.tsx +91 -0
- package/src/ui/components/Input/CardHolderInput.tsx +91 -0
- package/src/ui/components/Input/CardNumberInput.tsx +90 -0
- package/src/ui/components/PaymentMethodsList/index.tsx +103 -0
- package/src/ui/components/RadioButton/index.tsx +57 -0
- package/src/ui/components/SavedCardsList/index.tsx +137 -0
- package/src/ui/components/Skeleton/CardFormSkeleton.tsx +109 -0
- package/src/ui/components/WebView/ThreeDSWebView.tsx +110 -0
- package/src/ui/features/TonderEnrollment/index.tsx +141 -0
- package/src/ui/features/TonderPayment/index.tsx +243 -0
- package/src/ui/providers/InnerProvider/index.tsx +24 -0
- package/src/ui/providers/SkyflowContainerWrapper/index.tsx +35 -0
- package/src/ui/providers/TonderProvider/context.tsx +11 -0
- package/src/ui/providers/TonderProvider/hook.ts +10 -0
- package/src/ui/providers/TonderProvider/index.tsx +110 -0
- package/src/ui/providers/TonderProvider/uiWrapper.ts +67 -0
- package/src/ui/styles/payment.ts +23 -0
- package/src/ui/styles/skyflow.ts +58 -0
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import TonderError from '@shared/utils/errors';
|
|
4
|
+
import { ErrorKeyEnum } from '@shared/enum';
|
|
5
|
+
import BaseCheckout from '@core/BaseCheckout';
|
|
6
|
+
class PaymentInlineContainer {
|
|
7
|
+
#tonderClient;
|
|
8
|
+
#baseSDK;
|
|
9
|
+
#defaultCustomization = {
|
|
10
|
+
saveCards: {
|
|
11
|
+
showSaveCardOption: true,
|
|
12
|
+
showSaved: true,
|
|
13
|
+
autoSave: false,
|
|
14
|
+
showDeleteOption: true
|
|
15
|
+
},
|
|
16
|
+
paymentButton: {
|
|
17
|
+
show: true,
|
|
18
|
+
text: 'Pagar',
|
|
19
|
+
showAmount: true
|
|
20
|
+
},
|
|
21
|
+
paymentMethods: {
|
|
22
|
+
show: true
|
|
23
|
+
},
|
|
24
|
+
cardForm: {
|
|
25
|
+
show: true
|
|
26
|
+
},
|
|
27
|
+
showMessages: true
|
|
28
|
+
};
|
|
29
|
+
constructor(tonderClient, setSkyflowConfig) {
|
|
30
|
+
this.#tonderClient = tonderClient;
|
|
31
|
+
this.#baseSDK = new BaseCheckout(tonderClient, tonderClient.getState, tonderClient.setState, setSkyflowConfig);
|
|
32
|
+
}
|
|
33
|
+
create = async data => {
|
|
34
|
+
this.#baseSDK.setState({
|
|
35
|
+
...data,
|
|
36
|
+
customization: {
|
|
37
|
+
...this.#defaultCustomization,
|
|
38
|
+
...(data.customization || {}),
|
|
39
|
+
saveCards: {
|
|
40
|
+
...this.#defaultCustomization.saveCards,
|
|
41
|
+
...(data.customization?.saveCards || {})
|
|
42
|
+
},
|
|
43
|
+
paymentMethods: {
|
|
44
|
+
...this.#defaultCustomization.paymentMethods,
|
|
45
|
+
...(data.customization?.paymentMethods || {})
|
|
46
|
+
},
|
|
47
|
+
cardForm: {
|
|
48
|
+
...this.#defaultCustomization.cardForm,
|
|
49
|
+
...(data.customization?.cardForm || {})
|
|
50
|
+
},
|
|
51
|
+
paymentButton: {
|
|
52
|
+
...this.#defaultCustomization.paymentButton,
|
|
53
|
+
...(data.customization?.paymentButton || {})
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
uiData: {
|
|
57
|
+
card: '',
|
|
58
|
+
payment_method: '',
|
|
59
|
+
saveCard: false,
|
|
60
|
+
selectedMethod: 'new',
|
|
61
|
+
paymentMethods: [],
|
|
62
|
+
cards: []
|
|
63
|
+
},
|
|
64
|
+
isCreating: true,
|
|
65
|
+
isCreated: false
|
|
66
|
+
});
|
|
67
|
+
return await this.#baseSDK.create();
|
|
68
|
+
};
|
|
69
|
+
payment = async data => {
|
|
70
|
+
try {
|
|
71
|
+
if (data) {
|
|
72
|
+
await this.#tonderClient.setState({
|
|
73
|
+
paymentData: data
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
const state = this.#tonderClient.getState();
|
|
77
|
+
const payment_data = {
|
|
78
|
+
...state.paymentData,
|
|
79
|
+
card: state.uiData.card,
|
|
80
|
+
payment_method: state.uiData.payment_method
|
|
81
|
+
};
|
|
82
|
+
await this.validateProcessPaymentData(payment_data);
|
|
83
|
+
const response = await this.#baseSDK.setupPaymentFlow(payment_data);
|
|
84
|
+
return {
|
|
85
|
+
response
|
|
86
|
+
};
|
|
87
|
+
} catch (error) {
|
|
88
|
+
const err = await this.#baseSDK.handlePaymentError(error);
|
|
89
|
+
return {
|
|
90
|
+
error: err
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
reset = () => {
|
|
95
|
+
this.#tonderClient.reset();
|
|
96
|
+
};
|
|
97
|
+
validateProcessPaymentData(data) {
|
|
98
|
+
if (!data || data && Object.keys(data).length === 0) {
|
|
99
|
+
throw new TonderError({
|
|
100
|
+
code: ErrorKeyEnum.INVALID_PAYMENT_REQUEST
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
export default PaymentInlineContainer;
|
|
106
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["TonderError","ErrorKeyEnum","BaseCheckout","PaymentInlineContainer","tonderClient","baseSDK","defaultCustomization","saveCards","showSaveCardOption","showSaved","autoSave","showDeleteOption","paymentButton","show","text","showAmount","paymentMethods","cardForm","showMessages","constructor","setSkyflowConfig","getState","setState","create","data","customization","uiData","card","payment_method","saveCard","selectedMethod","cards","isCreating","isCreated","payment","paymentData","state","payment_data","validateProcessPaymentData","response","setupPaymentFlow","error","err","handlePaymentError","reset","Object","keys","length","code","INVALID_PAYMENT_REQUEST"],"sourceRoot":"../../../../src","sources":["core/PaymentInlineContainer/index.ts"],"mappings":";;AACA,OAAOA,WAAW,MAAM,sBAAsB;AAC9C,SAASC,YAAY,QAAQ,cAAc;AAW3C,OAAOC,YAAY,MAAM,oBAAoB;AAG7C,MAAMC,sBAAsB,CAAoC;EAC9D,CAACC,YAAY;EACb,CAACC,OAAO;EACR,CAACC,oBAAoB,GAAgC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I,CAAC;IACvB;EACF,CAAC;EAEDE,KAAK,GAAGA,CAAA,KAAY;IAClB,IAAI,CAAC,CAACxC,YAAY,CAACwC,KAAK,CAAC,CAAC;EAC5B,CAAC;EAEON,0BAA0BA,CAACd,IAA4B,EAAE;IAC/D,IAAI,CAACA,IAAI,IAAKA,IAAI,IAAIqB,MAAM,CAACC,IAAI,CAACtB,IAAI,CAAC,CAACuB,MAAM,KAAK,CAAE,EAAE;MACrD,MAAM,IAAI/C,WAAW,CAAC;QACpBgD,IAAI,EAAE/C,YAAY,CAACgD;MACrB,CAAC,CAAC;IACJ;EACF;AACF;AAEA,eAAe9C,sBAAsB","ignoreList":[]}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import TonderError from '@shared/utils/errors';
|
|
4
|
+
import { ErrorKeyEnum } from '@shared/enum';
|
|
5
|
+
import BaseCheckout from '@core/BaseCheckout';
|
|
6
|
+
import { defaultTo } from 'lodash';
|
|
7
|
+
import { getPaymentMethodsWithDetails } from '@shared/utils/paymentMethodUtils';
|
|
8
|
+
import { getCardType } from '@shared/catalog/cardBrandCatalog';
|
|
9
|
+
class PaymentLiteContainer {
|
|
10
|
+
#tonderClient;
|
|
11
|
+
#baseSDK;
|
|
12
|
+
#defaultCustomization = {
|
|
13
|
+
saveCards: {
|
|
14
|
+
autoSave: false
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
constructor(tonderClient, setSkyflowConfig) {
|
|
18
|
+
this.#tonderClient = tonderClient;
|
|
19
|
+
this.#baseSDK = new BaseCheckout(tonderClient, tonderClient.getState, tonderClient.setState, setSkyflowConfig);
|
|
20
|
+
}
|
|
21
|
+
create = async data => {
|
|
22
|
+
this.#baseSDK.setState({
|
|
23
|
+
...data,
|
|
24
|
+
customization: {
|
|
25
|
+
...this.#defaultCustomization,
|
|
26
|
+
...(data.customization || {}),
|
|
27
|
+
saveCards: {
|
|
28
|
+
...this.#defaultCustomization.saveCards,
|
|
29
|
+
...(data.customization?.saveCards || {})
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
isCreating: true,
|
|
33
|
+
isCreated: false
|
|
34
|
+
});
|
|
35
|
+
return await this.#baseSDK.create();
|
|
36
|
+
};
|
|
37
|
+
payment = async data => {
|
|
38
|
+
try {
|
|
39
|
+
if (data) {
|
|
40
|
+
await this.#tonderClient.setState({
|
|
41
|
+
paymentData: data
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
const state = this.#tonderClient.getState();
|
|
45
|
+
const payment_data = {
|
|
46
|
+
...state.paymentData
|
|
47
|
+
};
|
|
48
|
+
await this.validateProcessPaymentData(payment_data);
|
|
49
|
+
const response = await this.#baseSDK.setupPaymentFlow(payment_data);
|
|
50
|
+
return {
|
|
51
|
+
response
|
|
52
|
+
};
|
|
53
|
+
} catch (error) {
|
|
54
|
+
const err = await this.#baseSDK.handlePaymentError(error);
|
|
55
|
+
return {
|
|
56
|
+
error: err
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
saveCustomerCard = async () => {
|
|
61
|
+
try {
|
|
62
|
+
await this.#baseSDK.setState({
|
|
63
|
+
isProcessing: true
|
|
64
|
+
});
|
|
65
|
+
const cardFields = await this.#baseSDK.getState().skyflowContainer.collect();
|
|
66
|
+
const card_data = cardFields?.records[0]?.fields;
|
|
67
|
+
const response = await this.#baseSDK.validateAndSaveCard(card_data.skyflow_id, true);
|
|
68
|
+
return {
|
|
69
|
+
response: response
|
|
70
|
+
};
|
|
71
|
+
} catch (error) {
|
|
72
|
+
const err = error instanceof TonderError ? error : new TonderError({
|
|
73
|
+
code: ErrorKeyEnum.SAVE_CARD_PROCESS_ERROR,
|
|
74
|
+
details: error
|
|
75
|
+
});
|
|
76
|
+
await this.#baseSDK.setState({
|
|
77
|
+
error: error,
|
|
78
|
+
isProcessing: false
|
|
79
|
+
});
|
|
80
|
+
return {
|
|
81
|
+
error: err
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
getCustomerCards = async () => {
|
|
86
|
+
try {
|
|
87
|
+
const merchantId = this.#tonderClient.getBusinessPK();
|
|
88
|
+
const secureToken = this.#tonderClient.getSecureToken();
|
|
89
|
+
const customer_auth_token = this.#tonderClient.getCustomerAuthToken();
|
|
90
|
+
const response = await this.#tonderClient.getService().card.fetchCustomerCards(customer_auth_token, secureToken, merchantId);
|
|
91
|
+
return {
|
|
92
|
+
response: {
|
|
93
|
+
...response,
|
|
94
|
+
cards: response.cards.map(ic => ({
|
|
95
|
+
...ic,
|
|
96
|
+
icon: getCardType(ic.fields.card_scheme)
|
|
97
|
+
}))
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
} catch (error) {
|
|
101
|
+
return {
|
|
102
|
+
error: error
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
removeCustomerCard = async id => {
|
|
107
|
+
try {
|
|
108
|
+
const merchantId = this.#tonderClient.getBusinessPK();
|
|
109
|
+
const secureToken = this.#tonderClient.getSecureToken();
|
|
110
|
+
const customer_auth_token = this.#tonderClient.getCustomerAuthToken();
|
|
111
|
+
const response = await this.#tonderClient.getService().card.removeCustomerCard(customer_auth_token, secureToken, id, merchantId);
|
|
112
|
+
return {
|
|
113
|
+
response
|
|
114
|
+
};
|
|
115
|
+
} catch (error) {
|
|
116
|
+
return {
|
|
117
|
+
error: error
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
getPaymentMethods = async () => {
|
|
122
|
+
try {
|
|
123
|
+
const response = await this.#tonderClient.getService().paymentMethod.fetchPaymentMethods();
|
|
124
|
+
const pm_results = getPaymentMethodsWithDetails(response);
|
|
125
|
+
return {
|
|
126
|
+
response: pm_results
|
|
127
|
+
};
|
|
128
|
+
} catch (error) {
|
|
129
|
+
return {
|
|
130
|
+
error: error
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
reset = () => {
|
|
135
|
+
this.#tonderClient.reset();
|
|
136
|
+
};
|
|
137
|
+
validateProcessPaymentData(data) {
|
|
138
|
+
if (!data || data && Object.keys(data).length === 0) {
|
|
139
|
+
throw new TonderError({
|
|
140
|
+
code: ErrorKeyEnum.INVALID_PAYMENT_REQUEST
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
let card_data = defaultTo(data.card, '');
|
|
144
|
+
let payment_method_data = defaultTo(data.payment_method, '');
|
|
145
|
+
if (card_data !== '' && payment_method_data !== '') {
|
|
146
|
+
throw new TonderError({
|
|
147
|
+
code: ErrorKeyEnum.INVALID_PAYMENT_REQUEST_CARD_PM
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
export default PaymentLiteContainer;
|
|
153
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["TonderError","ErrorKeyEnum","BaseCheckout","defaultTo","getPaymentMethodsWithDetails","getCardType","PaymentLiteContainer","tonderClient","baseSDK","defaultCustomization","saveCards","autoSave","constructor","setSkyflowConfig","getState","setState","create","data","customization","isCreating","isCreated","payment","paymentData","state","payment_data","validateProcessPaymentData","response","setupPaymentFlow","error","err","handlePaymentError","saveCustomerCard","isProcessing","cardFields","skyflowContainer","collect","card_data","records","fields","validateAndSaveCard","skyflow_id","code","SAVE_CARD_PROCESS_ERROR","details","getCustomerCards","merchantId","getBusinessPK","secureToken","getSecureToken","customer_auth_token","getCustomerAuthToken","getService","card","fetchCustomerCards","cards","map","ic","icon","card_scheme","removeCustomerCard","id","getPaymentMethods","paymentMethod","fetchPaymentMethods","pm_results","reset","Object","keys","length","INVALID_PAYMENT_REQUEST","payment_method_data","payment_method","INVALID_PAYMENT_REQUEST_CARD_PM"],"sourceRoot":"../../../../src","sources":["core/PaymentLiteContainer/index.ts"],"mappings":";;AACA,OAAOA,WAAW,MAAM,sBAAsB;AAC9C,SAASC,YAAY,QAAQ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AmB,KAAK,EAAE,EAAE;MAClD,MAAM,IAAItE,WAAW,CAAC;QACpByC,IAAI,EAAExC,YAAY,CAACuE;MACrB,CAAC,CAAC;IACJ;EACF;AACF;AAEA,eAAelE,oBAAoB","ignoreList":[]}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { ServiceManager } from '@infrastructure/ServiceManager';
|
|
4
|
+
import TonderError from '@shared/utils/errors';
|
|
5
|
+
import { ErrorKeyEnum } from '@shared/enum';
|
|
6
|
+
import { TONDER_URL_BY_MODE } from '@shared/constants';
|
|
7
|
+
class Tonder {
|
|
8
|
+
subscribers = [];
|
|
9
|
+
eventListeners = new Map();
|
|
10
|
+
constructor(config) {
|
|
11
|
+
this.initData(config);
|
|
12
|
+
}
|
|
13
|
+
initData(config) {
|
|
14
|
+
this.service = new ServiceManager(config);
|
|
15
|
+
this.config = {
|
|
16
|
+
...config,
|
|
17
|
+
returnURL: config.returnURL && config.returnURL !== '' ? config.returnURL : TONDER_URL_BY_MODE[config.mode]
|
|
18
|
+
};
|
|
19
|
+
this.state = {};
|
|
20
|
+
this.eventListeners = new Map();
|
|
21
|
+
}
|
|
22
|
+
getConfig() {
|
|
23
|
+
return Object.freeze({
|
|
24
|
+
...this.config
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
getService() {
|
|
28
|
+
return this.service;
|
|
29
|
+
}
|
|
30
|
+
getCustomerAuthToken() {
|
|
31
|
+
const customerData = this.state.customerData;
|
|
32
|
+
if (!customerData?.auth_token) {
|
|
33
|
+
throw new TonderError({
|
|
34
|
+
code: ErrorKeyEnum.CUSTOMER_AUTH_TOKEN_NOT_VALID
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
return customerData.auth_token;
|
|
38
|
+
}
|
|
39
|
+
getSecureToken() {
|
|
40
|
+
return this.state.secureToken;
|
|
41
|
+
}
|
|
42
|
+
getBusinessPK() {
|
|
43
|
+
return this.state.merchantData?.business?.pk;
|
|
44
|
+
}
|
|
45
|
+
getState = () => {
|
|
46
|
+
return Object.freeze({
|
|
47
|
+
...this.state
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
setState = newState => {
|
|
51
|
+
this.state = {
|
|
52
|
+
...this.state,
|
|
53
|
+
...newState
|
|
54
|
+
};
|
|
55
|
+
this.notifySubscribers();
|
|
56
|
+
};
|
|
57
|
+
updateUIState({
|
|
58
|
+
card,
|
|
59
|
+
paymentMethod,
|
|
60
|
+
selectedMethod,
|
|
61
|
+
cards,
|
|
62
|
+
paymentMethods,
|
|
63
|
+
saveCard
|
|
64
|
+
}) {
|
|
65
|
+
const selected_data = {
|
|
66
|
+
...(selectedMethod && selectedMethod !== '' ? {
|
|
67
|
+
...(card && card !== '' ? {
|
|
68
|
+
card
|
|
69
|
+
} : paymentMethod && paymentMethod !== '' ? {
|
|
70
|
+
payment_method: paymentMethod
|
|
71
|
+
} : {
|
|
72
|
+
card: '',
|
|
73
|
+
payment_method: ''
|
|
74
|
+
})
|
|
75
|
+
} : {})
|
|
76
|
+
};
|
|
77
|
+
const new_state = {
|
|
78
|
+
uiData: {
|
|
79
|
+
...(this.state.uiData || {}),
|
|
80
|
+
...selected_data,
|
|
81
|
+
...(selectedMethod ? {
|
|
82
|
+
selectedMethod
|
|
83
|
+
} : {}),
|
|
84
|
+
...(saveCard !== undefined ? {
|
|
85
|
+
saveCard
|
|
86
|
+
} : {}),
|
|
87
|
+
...(cards ? {
|
|
88
|
+
cards
|
|
89
|
+
} : {}),
|
|
90
|
+
...(paymentMethods ? {
|
|
91
|
+
paymentMethods
|
|
92
|
+
} : {})
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
this.setState(new_state);
|
|
96
|
+
}
|
|
97
|
+
subscribe(callback) {
|
|
98
|
+
this.subscribers.push(callback);
|
|
99
|
+
return () => {
|
|
100
|
+
this.subscribers = this.subscribers.filter(sub => sub !== callback);
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
emit = (eventName, data) => {
|
|
104
|
+
const listeners = this.eventListeners.get(eventName);
|
|
105
|
+
if (listeners) {
|
|
106
|
+
listeners.forEach(listener => listener(data));
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
on(eventName, listener) {
|
|
110
|
+
if (!this.eventListeners.has(eventName)) {
|
|
111
|
+
this.eventListeners.set(eventName, new Set());
|
|
112
|
+
}
|
|
113
|
+
this.eventListeners.get(eventName).add(listener);
|
|
114
|
+
return () => {
|
|
115
|
+
this.eventListeners.get(eventName)?.delete(listener);
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
notifySubscribers() {
|
|
119
|
+
this.subscribers.forEach(callback => callback());
|
|
120
|
+
}
|
|
121
|
+
reset() {
|
|
122
|
+
// this.subscribers = [];
|
|
123
|
+
this.eventListeners.clear();
|
|
124
|
+
this.initData(this.config);
|
|
125
|
+
this.notifySubscribers();
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
export default Tonder;
|
|
129
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ServiceManager","TonderError","ErrorKeyEnum","TONDER_URL_BY_MODE","Tonder","subscribers","eventListeners","Map","constructor","config","initData","service","returnURL","mode","state","getConfig","Object","freeze","getService","getCustomerAuthToken","customerData","auth_token","code","CUSTOMER_AUTH_TOKEN_NOT_VALID","getSecureToken","secureToken","getBusinessPK","merchantData","business","pk","getState","setState","newState","notifySubscribers","updateUIState","card","paymentMethod","selectedMethod","cards","paymentMethods","saveCard","selected_data","payment_method","new_state","uiData","undefined","subscribe","callback","push","filter","sub","emit","eventName","data","listeners","get","forEach","listener","on","has","set","Set","add","delete","reset","clear"],"sourceRoot":"../../../../src","sources":["core/Tonder/index.ts"],"mappings":";;AAMA,SAASA,cAAc,QAAQ,gCAAgC;AAC/D,OAAOC,WAAW,MAAM,sBAAsB;AAC9C,SAASC,YAAY,QAAQ,cAAc;AAC3C,SAASC,kBAAkB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reList":[]}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// import { useCallback, useContext } from 'react';
|
|
2
|
+
// import { TonderContext } from '@ui/providers/TonderProvider';
|
|
3
|
+
// import type { SDKMethodsInstance, SDKType } from '@types';
|
|
4
|
+
// import { TonderError } from '@shared/utils/errors';
|
|
5
|
+
// import { ServiceManager } from '@infrastructure/ServiceManager';
|
|
6
|
+
//
|
|
7
|
+
// export interface IUseTonder<T extends SDKType> {
|
|
8
|
+
// methods: SDKMethodsInstance<T>;
|
|
9
|
+
// error: TonderError | Error | null;
|
|
10
|
+
// isCreated: boolean;
|
|
11
|
+
// create: any;
|
|
12
|
+
// }
|
|
13
|
+
//
|
|
14
|
+
// export function useTonder<T extends SDKType>(): IUseTonder<T> {
|
|
15
|
+
// const context = useContext(TonderContext);
|
|
16
|
+
// const { sdk, config } = context;
|
|
17
|
+
//
|
|
18
|
+
// const service = new ServiceManager(config!);
|
|
19
|
+
//
|
|
20
|
+
// const methods = useCallback(() => {
|
|
21
|
+
// const allowedMethods = sdk?.getAllowedMethods() || {};
|
|
22
|
+
// return {
|
|
23
|
+
// ...allowedMethods,
|
|
24
|
+
// getSecureToken: (secretApiKey: string, signal?: AbortSignal) =>
|
|
25
|
+
// service.token.getSecureToken(secretApiKey, signal),
|
|
26
|
+
// };
|
|
27
|
+
// }, [sdk, service.token]);
|
|
28
|
+
//
|
|
29
|
+
// return {
|
|
30
|
+
// methods: methods(),
|
|
31
|
+
// error: context?.sdkState?.error || null,
|
|
32
|
+
// isCreated: context?.sdkState?.isCreated,
|
|
33
|
+
// isProcessing: context?.sdkState?.isProcessing,
|
|
34
|
+
// } as IUseTonder<T>;
|
|
35
|
+
// }
|
|
36
|
+
"use strict";
|
|
37
|
+
//# sourceMappingURL=index-old.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["hooks/useTonder/index-old.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useTonderContext","useTonder","sdk"],"sourceRoot":"../../../../src","sources":["hooks/useTonder/index.ts"],"mappings":";;AAAA,OAAOA,gBAAgB,MAAM,mCAAmC;AAGhE,MAAMC,SAAS,GAAGA,CAAA,KAAyB;EACzC,MAAM;IAAEC;EAAI,CAAC,GAAGF,gBAAgB,CAAI,CAAC;EAErC,OAAOE,GAAG;AACZ,CAAC;AAED,eAAeD,SAAS","ignoreList":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
export * from "./ui/components/Input/CardHolderInput.js";
|
|
4
|
+
export * from "./ui/components/Input/CardExpirationMonthInput.js";
|
|
5
|
+
export * from "./ui/components/Input/CardExpirationYearInput.js";
|
|
6
|
+
export * from "./ui/components/Input/CardCVVInput.js";
|
|
7
|
+
export * from "./ui/components/Input/CardNumberInput.js";
|
|
8
|
+
export { default as TonderProvider } from "./ui/providers/TonderProvider/index.js";
|
|
9
|
+
export { default as useTonder } from "./hooks/useTonder/index.js";
|
|
10
|
+
export { default as TonderPayment } from "./ui/features/TonderPayment/index.js";
|
|
11
|
+
export { default as TonderEnrollment } from "./ui/features/TonderEnrollment/index.js";
|
|
12
|
+
export { default as TonderError } from "./shared/utils/errors.js";
|
|
13
|
+
export * from "./types/index.js";
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["default","TonderProvider","useTonder","TonderPayment","TonderEnrollment","TonderError"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,cAAc,0CAAuC;AACrD,cAAc,mDAAgD;AAC9D,cAAc,kDAA+C;AAC7D,cAAc,uCAAoC;AAClD,cAAc,0CAAuC;AACrD,SAASA,OAAO,IAAIC,cAAc,QAAQ,wCAA+B;AACzE,SAASD,OAAO,IAAIE,SAAS,QAAQ,4BAAmB;AACxD,SAASF,OAAO,IAAIG,aAAa,QAAQ,sCAA6B;AACtE,SAASH,OAAO,IAAII,gBAAgB,QAAQ,yCAAgC;AAC5E,SAASJ,OAAO,IAAIK,WAAW,QAAQ,0BAAuB;AAC9D,cAAc,kBAAS","ignoreList":[]}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import TonderError from '@shared/utils/errors';
|
|
4
|
+
import { TONDER_URL_BY_MODE } from '@shared/constants';
|
|
5
|
+
import { ErrorKeyEnum } from '@shared/enum';
|
|
6
|
+
export class HttpClient {
|
|
7
|
+
constructor(config) {
|
|
8
|
+
this.validateConfig(config);
|
|
9
|
+
this.apiKey = config.apiKey;
|
|
10
|
+
this.baseUrl = TONDER_URL_BY_MODE[config.mode];
|
|
11
|
+
this.abortController = new AbortController();
|
|
12
|
+
}
|
|
13
|
+
getApiKey() {
|
|
14
|
+
return this.apiKey;
|
|
15
|
+
}
|
|
16
|
+
validateConfig(config) {
|
|
17
|
+
if (!config.apiKey) {
|
|
18
|
+
throw new TonderError({
|
|
19
|
+
code: ErrorKeyEnum.MERCHANT_CREDENTIAL_REQUIRED
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
async request(endpoint, options = {}) {
|
|
24
|
+
try {
|
|
25
|
+
const headers = new Headers({
|
|
26
|
+
'Content-Type': 'application/json',
|
|
27
|
+
'Authorization': `Token ${this.apiKey}`,
|
|
28
|
+
...options.headers
|
|
29
|
+
});
|
|
30
|
+
const response = await fetch(`${this.baseUrl}${endpoint}`, {
|
|
31
|
+
...options,
|
|
32
|
+
headers: headers,
|
|
33
|
+
signal: options.signal || this.abortController.signal
|
|
34
|
+
});
|
|
35
|
+
if (!response.ok) {
|
|
36
|
+
throw await this.handleRequestError(response);
|
|
37
|
+
}
|
|
38
|
+
if (response.status === 204) {
|
|
39
|
+
return {};
|
|
40
|
+
}
|
|
41
|
+
return response.json();
|
|
42
|
+
} catch (error) {
|
|
43
|
+
throw this.handleError(error);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
get(endpoint, options = {}) {
|
|
47
|
+
return this.request(endpoint, {
|
|
48
|
+
...options,
|
|
49
|
+
method: 'GET'
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
post(endpoint, data, options = {}) {
|
|
53
|
+
return this.request(endpoint, {
|
|
54
|
+
...options,
|
|
55
|
+
method: 'POST',
|
|
56
|
+
body: JSON.stringify(data)
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
delete(endpoint, options = {}) {
|
|
60
|
+
return this.request(endpoint, {
|
|
61
|
+
...options,
|
|
62
|
+
method: 'DELETE'
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
async handleRequestError(response) {
|
|
66
|
+
const errorData = await response.json().catch(() => ({}));
|
|
67
|
+
throw new TonderError({
|
|
68
|
+
code: `HTTP_${response.status}`,
|
|
69
|
+
details: errorData,
|
|
70
|
+
message: errorData.detail || 'Request failed'
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
handleError(error) {
|
|
74
|
+
if (error instanceof TonderError) {
|
|
75
|
+
throw error;
|
|
76
|
+
}
|
|
77
|
+
if (error instanceof Error) {
|
|
78
|
+
if (error.name === 'AbortError') {
|
|
79
|
+
throw new TonderError({
|
|
80
|
+
code: ErrorKeyEnum.REQUEST_ABORTED,
|
|
81
|
+
details: error
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
throw new TonderError({
|
|
85
|
+
code: ErrorKeyEnum.REQUEST_FAILED,
|
|
86
|
+
details: error
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
throw new TonderError({
|
|
90
|
+
code: ErrorKeyEnum.UNKNOWN_ERROR,
|
|
91
|
+
details: error
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Cleanup method to abort any pending requests
|
|
97
|
+
*/
|
|
98
|
+
cleanup() {
|
|
99
|
+
this.abortController.abort();
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
//# sourceMappingURL=HttpClient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["TonderError","TONDER_URL_BY_MODE","ErrorKeyEnum","HttpClient","constructor","config","validateConfig","apiKey","baseUrl","mode","abortController","AbortController","getApiKey","code","MERCHANT_CREDENTIAL_REQUIRED","request","endpoint","options","headers","Headers","response","fetch","signal","ok","handleRequestError","status","json","error","handleError","get","method","post","data","body","JSON","stringify","delete","errorData","catch","details","message","detail","Error","name","REQUEST_ABORTED","REQUEST_FAILED","UNKNOWN_ERROR","cleanup","abort"],"sourceRoot":"../../../src","sources":["infrastructure/HttpClient.ts"],"mappings":";;AACA,OAAOA,WAAW,MAAM,sBAAsB;AAC9C,SAASC,kBAAkB,QAAQ,mBAAmB;AACtD,SAASC,YAAY,QAAQ,cAAc;AAE3C,OAAO,MAAMC,UAAU,CAAC;EAKtBC,WAAWA,CAACC,MAAkB,EAAE;IAC9B,IAAI,CAACC,cAAc,CAACD,MAAM,CAAC;IAC3B,IAAI,CAACE,MAAM,GAAGF,MAAM,CAACE,MAAM;IAC3B,IAAI,CAACC,OAAO,GAAGP,kBAAkB,CAACI,MAAM,CAACI,IAAI,CAAC;IAC9C,IAAI,CAACC,eAAe,GAAG,IAAIC,eAAe,CAAC,CAAC;EAC9C;EAEOC,SAASA,CAAA,EAAW;IACzB,OAAO,IAAI,CAACL,MAAM;EACpB;EAEQD,cAAcA,CAACD,MAAkB,EAAQ;IAC/C,IAAI,CAACA,MAAM,CAACE,MAAM,EAAE;MAClB,MAAM,IAAIP,WAAW,CAAC;QACpBa,IAAI,EAAEX,YAAY,CAACY;MACrB,CAAC,CAAC;IACJ;EAC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strict";
|
|
2
|
+
|
|
3
|
+
import { HttpClient } from '@infrastructure/HttpClient';
|
|
4
|
+
import { CardService, CheckoutService, CustomerService, OpenPayService, PaymentMethodService, SkyflowService, TokenService, BusinessService, MercadoPagoService, TransactionService, StorageService } from '@services';
|
|
5
|
+
export class ServiceManager {
|
|
6
|
+
constructor(config) {
|
|
7
|
+
this.http = new HttpClient({
|
|
8
|
+
apiKey: config.apiKey,
|
|
9
|
+
mode: config.mode
|
|
10
|
+
});
|
|
11
|
+
this.business = new BusinessService(this.http);
|
|
12
|
+
this.card = new CardService(this.http);
|
|
13
|
+
this.checkout = new CheckoutService(this.http);
|
|
14
|
+
this.customer = new CustomerService(this.http);
|
|
15
|
+
this.paymentMethod = new PaymentMethodService(this.http);
|
|
16
|
+
this.skyflow = new SkyflowService(this.http);
|
|
17
|
+
this.token = new TokenService(this.http);
|
|
18
|
+
this.openPay = new OpenPayService();
|
|
19
|
+
this.mercadoPago = new MercadoPagoService();
|
|
20
|
+
this.storage = new StorageService();
|
|
21
|
+
this.transaction = new TransactionService(this.http);
|
|
22
|
+
}
|
|
23
|
+
cleanup() {
|
|
24
|
+
this.http.cleanup();
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=ServiceManager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["HttpClient","CardService","CheckoutService","CustomerService","OpenPayService","PaymentMethodService","SkyflowService","TokenService","BusinessService","MercadoPagoService","TransactionService","StorageService","ServiceManager","constructor","config","http","apiKey","mode","business","card","checkout","customer","paymentMethod","skyflow","token","openPay","mercadoPago","storage","transaction","cleanup"],"sourceRoot":"../../../src","sources":["infrastructure/ServiceManager.ts"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,4BAA4B;AAEvD,SACEC,WAAW,EACXC,eAAe,EACfC,eAAe,EACfC,cAAc,EACdC,oBAAoB,EACpBC,cAAc,EACdC,YAAY,EACZC,eAAe,EACfC,kBAAkB,EAClBC,kBA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BAAkB;AAChC,cAAc,iBAAc","ignoreList":[]}
|