@tonder.io/rn-sdk 0.1.0-beta.DEV1355.6 → 0.1.0-beta.DEV1355.7
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 +4 -3
- package/android/build.gradle +99 -0
- package/android/gradle.properties +5 -0
- package/android/src/main/AndroidManifest.xml +3 -0
- package/android/src/main/AndroidManifestNew.xml +2 -0
- package/android/src/main/java/com/tonderio/rnsdk/RnSdkModule.kt +25 -0
- package/android/src/main/java/com/tonderio/rnsdk/RnSdkPackage.kt +17 -0
- package/ios/RnSdk-Bridging-Header.h +2 -0
- package/ios/RnSdk.mm +14 -0
- package/ios/RnSdk.swift +8 -0
- package/lib/commonjs/core/3DSHandler.js +17 -12
- package/lib/commonjs/core/3DSHandler.js.map +1 -1
- package/lib/commonjs/core/BaseCheckout/index.js +21 -22
- package/lib/commonjs/core/BaseCheckout/index.js.map +1 -1
- package/lib/commonjs/core/BaseEnrollment/index.js +8 -9
- package/lib/commonjs/core/BaseEnrollment/index.js.map +1 -1
- package/lib/commonjs/core/BaseSDK/index.js +3 -3
- package/lib/commonjs/core/BaseSDK/index.js.map +1 -1
- package/lib/commonjs/core/EnrollmentContainer/index.js +9 -10
- package/lib/commonjs/core/EnrollmentContainer/index.js.map +1 -1
- package/lib/commonjs/core/PaymentInlineContainer/index.js +5 -5
- package/lib/commonjs/core/PaymentInlineContainer/index.js.map +1 -1
- package/lib/commonjs/core/PaymentLiteContainer/index.js +12 -12
- package/lib/commonjs/core/PaymentLiteContainer/index.js.map +1 -1
- package/lib/commonjs/core/Tonder/index.js +5 -5
- package/lib/commonjs/core/Tonder/index.js.map +1 -1
- package/lib/commonjs/hooks/useTonder/index.js +1 -1
- package/lib/commonjs/hooks/useTonder/index.js.map +1 -1
- package/lib/commonjs/index.js +15 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/infrastructure/HttpClient.js +7 -8
- package/lib/commonjs/infrastructure/HttpClient.js.map +1 -1
- package/lib/commonjs/infrastructure/ServiceManager.js +12 -13
- package/lib/commonjs/infrastructure/ServiceManager.js.map +1 -1
- package/lib/commonjs/services/BusinessService.js +3 -3
- package/lib/commonjs/services/BusinessService.js.map +1 -1
- package/lib/commonjs/services/CardService.js +7 -8
- package/lib/commonjs/services/CardService.js.map +1 -1
- package/lib/commonjs/services/CheckoutService.js +11 -11
- package/lib/commonjs/services/CheckoutService.js.map +1 -1
- package/lib/commonjs/services/CustomerService.js +5 -5
- package/lib/commonjs/services/CustomerService.js.map +1 -1
- package/lib/commonjs/services/PaymentMethodService.js +3 -3
- package/lib/commonjs/services/PaymentMethodService.js.map +1 -1
- package/lib/commonjs/services/SkyflowService.js +4 -4
- package/lib/commonjs/services/SkyflowService.js.map +1 -1
- package/lib/commonjs/services/TokenService.js +4 -4
- package/lib/commonjs/services/TokenService.js.map +1 -1
- package/lib/commonjs/services/TransactionService.js +3 -3
- package/lib/commonjs/services/TransactionService.js.map +1 -1
- package/lib/commonjs/services/index.js +0 -11
- package/lib/commonjs/services/index.js.map +1 -1
- package/lib/commonjs/shared/catalog/cardBrandCatalog.js +1 -1
- package/lib/commonjs/shared/catalog/paymentMethodsCatalog.js +2 -2
- package/lib/commonjs/shared/constants/messages.js +90 -90
- package/lib/commonjs/shared/constants/messages.js.map +1 -1
- package/lib/commonjs/shared/utils/errors.js +2 -2
- package/lib/commonjs/shared/utils/errors.js.map +1 -1
- package/lib/commonjs/shared/utils/paymentMethodUtils.js +3 -3
- package/lib/commonjs/shared/utils/paymentMethodUtils.js.map +1 -1
- package/lib/commonjs/shared/utils/stringUtils.js +17 -1
- package/lib/commonjs/shared/utils/stringUtils.js.map +1 -1
- package/lib/commonjs/types/srn-temp.d.js +2 -0
- package/lib/commonjs/types/srn-temp.d.js.map +1 -0
- package/lib/commonjs/ui/components/Button/ProcessButton.js +1 -1
- package/lib/commonjs/ui/components/Button/ProcessButton.js.map +1 -1
- package/lib/commonjs/ui/components/CardForm/index.js +5 -5
- package/lib/commonjs/ui/components/CardForm/index.js.map +1 -1
- package/lib/commonjs/ui/components/Input/CardCVVInput.js +6 -4
- package/lib/commonjs/ui/components/Input/CardCVVInput.js.map +1 -1
- package/lib/commonjs/ui/components/Input/CardExpirationDateInput.js +5 -5
- package/lib/commonjs/ui/components/Input/CardExpirationDateInput.js.map +1 -1
- package/lib/commonjs/ui/components/Input/CardExpirationMonthInput.js +6 -4
- package/lib/commonjs/ui/components/Input/CardExpirationMonthInput.js.map +1 -1
- package/lib/commonjs/ui/components/Input/CardExpirationYearInput.js +6 -4
- package/lib/commonjs/ui/components/Input/CardExpirationYearInput.js.map +1 -1
- package/lib/commonjs/ui/components/Input/CardHolderInput.js +6 -4
- package/lib/commonjs/ui/components/Input/CardHolderInput.js.map +1 -1
- package/lib/commonjs/ui/components/Input/CardNumberInput.js +6 -4
- package/lib/commonjs/ui/components/Input/CardNumberInput.js.map +1 -1
- package/lib/commonjs/ui/components/PaymentMethodsList/index.js +4 -4
- package/lib/commonjs/ui/components/PaymentMethodsList/index.js.map +1 -1
- package/lib/commonjs/ui/components/SavedCardsList/index.js +6 -4
- package/lib/commonjs/ui/components/SavedCardsList/index.js.map +1 -1
- package/lib/commonjs/ui/features/TonderEnrollment/index.js +7 -7
- package/lib/commonjs/ui/features/TonderEnrollment/index.js.map +1 -1
- package/lib/commonjs/ui/features/TonderPayment/index.js +15 -15
- package/lib/commonjs/ui/features/TonderPayment/index.js.map +1 -1
- package/lib/commonjs/ui/providers/InnerProvider/index.js +1 -1
- package/lib/commonjs/ui/providers/InnerProvider/index.js.map +1 -1
- package/lib/commonjs/ui/providers/SkyflowContainerWrapper/index.js +2 -2
- package/lib/commonjs/ui/providers/SkyflowContainerWrapper/index.js.map +1 -1
- package/lib/commonjs/ui/providers/TonderProvider/hook.js +1 -1
- package/lib/commonjs/ui/providers/TonderProvider/index.js +16 -16
- package/lib/commonjs/ui/providers/TonderProvider/index.js.map +1 -1
- package/lib/commonjs/ui/providers/TonderProvider/uiWrapper.js +3 -3
- package/lib/commonjs/ui/providers/TonderProvider/uiWrapper.js.map +1 -1
- package/lib/commonjs/ui/styles/skyflow.js +1 -1
- package/lib/module/core/3DSHandler.js +16 -11
- package/lib/module/core/3DSHandler.js.map +1 -1
- package/lib/module/core/BaseCheckout/index.js +8 -9
- package/lib/module/core/BaseCheckout/index.js.map +1 -1
- package/lib/module/core/BaseEnrollment/index.js +3 -4
- package/lib/module/core/BaseEnrollment/index.js.map +1 -1
- package/lib/module/core/BaseSDK/index.js +2 -2
- package/lib/module/core/BaseSDK/index.js.map +1 -1
- package/lib/module/core/EnrollmentContainer/index.js +4 -5
- package/lib/module/core/EnrollmentContainer/index.js.map +1 -1
- package/lib/module/core/PaymentInlineContainer/index.js +3 -3
- package/lib/module/core/PaymentInlineContainer/index.js.map +1 -1
- package/lib/module/core/PaymentLiteContainer/index.js +6 -6
- package/lib/module/core/PaymentLiteContainer/index.js.map +1 -1
- package/lib/module/core/Tonder/index.js +3 -3
- package/lib/module/core/Tonder/index.js.map +1 -1
- package/lib/module/hooks/useTonder/index.js +1 -1
- package/lib/module/hooks/useTonder/index.js.map +1 -1
- package/lib/module/index.js +13 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/infrastructure/HttpClient.js +2 -3
- package/lib/module/infrastructure/HttpClient.js.map +1 -1
- package/lib/module/infrastructure/ServiceManager.js +2 -3
- package/lib/module/infrastructure/ServiceManager.js.map +1 -1
- package/lib/module/services/BusinessService.js +2 -2
- package/lib/module/services/BusinessService.js.map +1 -1
- package/lib/module/services/CardService.js +2 -3
- package/lib/module/services/CardService.js.map +1 -1
- package/lib/module/services/CheckoutService.js +2 -2
- package/lib/module/services/CheckoutService.js.map +1 -1
- package/lib/module/services/CustomerService.js +2 -2
- package/lib/module/services/CustomerService.js.map +1 -1
- package/lib/module/services/PaymentMethodService.js +2 -2
- package/lib/module/services/PaymentMethodService.js.map +1 -1
- package/lib/module/services/SkyflowService.js +2 -2
- package/lib/module/services/SkyflowService.js.map +1 -1
- package/lib/module/services/TokenService.js +2 -2
- package/lib/module/services/TokenService.js.map +1 -1
- package/lib/module/services/TransactionService.js +2 -2
- package/lib/module/services/TransactionService.js.map +1 -1
- package/lib/module/services/index.js +0 -1
- package/lib/module/services/index.js.map +1 -1
- package/lib/module/shared/catalog/cardBrandCatalog.js +1 -1
- package/lib/module/shared/catalog/cardBrandCatalog.js.map +1 -1
- package/lib/module/shared/catalog/paymentMethodsCatalog.js +2 -2
- package/lib/module/shared/catalog/paymentMethodsCatalog.js.map +1 -1
- package/lib/module/shared/constants/messages.js +1 -1
- package/lib/module/shared/constants/messages.js.map +1 -1
- package/lib/module/shared/utils/errors.js +1 -1
- package/lib/module/shared/utils/errors.js.map +1 -1
- package/lib/module/shared/utils/paymentMethodUtils.js +2 -2
- package/lib/module/shared/utils/paymentMethodUtils.js.map +1 -1
- package/lib/module/shared/utils/stringUtils.js +15 -0
- package/lib/module/shared/utils/stringUtils.js.map +1 -1
- package/lib/module/types/srn-temp.d.js +2 -0
- package/lib/module/types/srn-temp.d.js.map +1 -0
- package/lib/module/ui/components/Button/ProcessButton.js +1 -1
- package/lib/module/ui/components/Button/ProcessButton.js.map +1 -1
- package/lib/module/ui/components/CardForm/index.js +5 -5
- package/lib/module/ui/components/CardForm/index.js.map +1 -1
- package/lib/module/ui/components/Input/CardCVVInput.js +5 -4
- package/lib/module/ui/components/Input/CardCVVInput.js.map +1 -1
- package/lib/module/ui/components/Input/CardExpirationDateInput.js +5 -5
- package/lib/module/ui/components/Input/CardExpirationDateInput.js.map +1 -1
- package/lib/module/ui/components/Input/CardExpirationMonthInput.js +6 -5
- package/lib/module/ui/components/Input/CardExpirationMonthInput.js.map +1 -1
- package/lib/module/ui/components/Input/CardExpirationYearInput.js +5 -4
- package/lib/module/ui/components/Input/CardExpirationYearInput.js.map +1 -1
- package/lib/module/ui/components/Input/CardHolderInput.js +5 -4
- package/lib/module/ui/components/Input/CardHolderInput.js.map +1 -1
- package/lib/module/ui/components/Input/CardNumberInput.js +5 -4
- package/lib/module/ui/components/Input/CardNumberInput.js.map +1 -1
- package/lib/module/ui/components/PaymentMethodsList/index.js +3 -3
- package/lib/module/ui/components/PaymentMethodsList/index.js.map +1 -1
- package/lib/module/ui/components/SavedCardsList/index.js +4 -3
- package/lib/module/ui/components/SavedCardsList/index.js.map +1 -1
- package/lib/module/ui/features/TonderEnrollment/index.js +6 -6
- package/lib/module/ui/features/TonderEnrollment/index.js.map +1 -1
- package/lib/module/ui/features/TonderPayment/index.js +11 -11
- package/lib/module/ui/features/TonderPayment/index.js.map +1 -1
- package/lib/module/ui/providers/InnerProvider/index.js +1 -1
- package/lib/module/ui/providers/InnerProvider/index.js.map +1 -1
- package/lib/module/ui/providers/SkyflowContainerWrapper/index.js +1 -1
- package/lib/module/ui/providers/SkyflowContainerWrapper/index.js.map +1 -1
- package/lib/module/ui/providers/TonderProvider/hook.js +1 -1
- package/lib/module/ui/providers/TonderProvider/hook.js.map +1 -1
- package/lib/module/ui/providers/TonderProvider/index.js +9 -9
- package/lib/module/ui/providers/TonderProvider/index.js.map +1 -1
- package/lib/module/ui/providers/TonderProvider/uiWrapper.js +2 -2
- package/lib/module/ui/providers/TonderProvider/uiWrapper.js.map +1 -1
- package/lib/module/ui/styles/skyflow.js +1 -1
- package/lib/typescript/commonjs/src/core/3DSHandler.d.ts +4 -4
- package/lib/typescript/commonjs/src/core/3DSHandler.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/core/BaseCheckout/index.d.ts +5 -5
- package/lib/typescript/commonjs/src/core/BaseCheckout/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/core/BaseEnrollment/index.d.ts +5 -5
- package/lib/typescript/commonjs/src/core/BaseEnrollment/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/core/BaseSDK/index.d.ts +2 -2
- package/lib/typescript/commonjs/src/core/BaseSDK/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/core/EnrollmentContainer/index.d.ts +4 -4
- package/lib/typescript/commonjs/src/core/EnrollmentContainer/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/core/PaymentInlineContainer/index.d.ts +4 -4
- package/lib/typescript/commonjs/src/core/PaymentInlineContainer/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/core/PaymentLiteContainer/index.d.ts +4 -4
- package/lib/typescript/commonjs/src/core/PaymentLiteContainer/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/core/Tonder/index.d.ts +2 -2
- package/lib/typescript/commonjs/src/core/Tonder/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/hooks/useTonder/index.d.ts +2 -2
- package/lib/typescript/commonjs/src/hooks/useTonder/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/infrastructure/HttpClient.d.ts +1 -1
- package/lib/typescript/commonjs/src/infrastructure/HttpClient.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/infrastructure/ServiceManager.d.ts +2 -3
- package/lib/typescript/commonjs/src/infrastructure/ServiceManager.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/services/BusinessService.d.ts +2 -2
- package/lib/typescript/commonjs/src/services/BusinessService.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/services/CardService.d.ts +2 -2
- package/lib/typescript/commonjs/src/services/CardService.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/services/CheckoutService.d.ts +2 -2
- package/lib/typescript/commonjs/src/services/CheckoutService.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/services/CustomerService.d.ts +2 -2
- package/lib/typescript/commonjs/src/services/CustomerService.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/services/PaymentMethodService.d.ts +2 -2
- package/lib/typescript/commonjs/src/services/PaymentMethodService.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/services/SkyflowService.d.ts +1 -1
- package/lib/typescript/commonjs/src/services/SkyflowService.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/services/TokenService.d.ts +2 -2
- package/lib/typescript/commonjs/src/services/TokenService.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/services/TransactionService.d.ts +2 -2
- package/lib/typescript/commonjs/src/services/TransactionService.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/services/index.d.ts +0 -1
- package/lib/typescript/commonjs/src/services/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/shared/utils/common.d.ts +1 -1
- package/lib/typescript/commonjs/src/shared/utils/common.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/shared/utils/stringUtils.d.ts +3 -0
- package/lib/typescript/commonjs/src/shared/utils/stringUtils.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/shared/utils/styleUtils.d.ts +1 -1
- package/lib/typescript/commonjs/src/shared/utils/styleUtils.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/base.d.ts +5 -5
- package/lib/typescript/commonjs/src/types/base.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/baseCheckout.d.ts +2 -2
- package/lib/typescript/commonjs/src/types/baseCheckout.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/baseEnrollment.d.ts +2 -2
- package/lib/typescript/commonjs/src/types/baseEnrollment.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/baseSDK.d.ts +2 -2
- package/lib/typescript/commonjs/src/types/baseSDK.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/common.d.ts +1 -1
- package/lib/typescript/commonjs/src/types/common.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/enrollment.d.ts +1 -1
- package/lib/typescript/commonjs/src/types/enrollment.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/inlineCheckout.d.ts +3 -3
- package/lib/typescript/commonjs/src/types/inlineCheckout.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/liteCheckout.d.ts +3 -3
- package/lib/typescript/commonjs/src/types/liteCheckout.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/threeDSHandler.d.ts +2 -2
- package/lib/typescript/commonjs/src/types/threeDSHandler.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/Button/ProcessButton.d.ts +1 -1
- package/lib/typescript/commonjs/src/ui/components/Button/ProcessButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/CardForm/index.d.ts +1 -1
- package/lib/typescript/commonjs/src/ui/components/CardForm/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/Input/CardCVVInput.d.ts +1 -1
- package/lib/typescript/commonjs/src/ui/components/Input/CardCVVInput.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/Input/CardExpirationDateInput.d.ts +1 -1
- package/lib/typescript/commonjs/src/ui/components/Input/CardExpirationDateInput.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/Input/CardExpirationMonthInput.d.ts +1 -1
- package/lib/typescript/commonjs/src/ui/components/Input/CardExpirationMonthInput.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/Input/CardExpirationYearInput.d.ts +1 -1
- package/lib/typescript/commonjs/src/ui/components/Input/CardExpirationYearInput.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/Input/CardHolderInput.d.ts +1 -1
- package/lib/typescript/commonjs/src/ui/components/Input/CardHolderInput.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/Input/CardNumberInput.d.ts +1 -1
- package/lib/typescript/commonjs/src/ui/components/Input/CardNumberInput.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/PaymentMethodsList/index.d.ts +1 -1
- package/lib/typescript/commonjs/src/ui/components/PaymentMethodsList/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/RadioButton/index.d.ts +1 -1
- package/lib/typescript/commonjs/src/ui/components/RadioButton/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/SavedCardsList/index.d.ts +1 -1
- package/lib/typescript/commonjs/src/ui/components/SavedCardsList/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/providers/InnerProvider/index.d.ts +1 -1
- package/lib/typescript/commonjs/src/ui/providers/InnerProvider/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/providers/SkyflowContainerWrapper/index.d.ts +2 -2
- package/lib/typescript/commonjs/src/ui/providers/SkyflowContainerWrapper/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/providers/TonderProvider/context.d.ts +2 -2
- package/lib/typescript/commonjs/src/ui/providers/TonderProvider/context.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/providers/TonderProvider/hook.d.ts +1 -1
- package/lib/typescript/commonjs/src/ui/providers/TonderProvider/hook.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/providers/TonderProvider/index.d.ts +1 -1
- package/lib/typescript/commonjs/src/ui/providers/TonderProvider/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/providers/TonderProvider/uiWrapper.d.ts +1 -1
- package/lib/typescript/commonjs/src/ui/providers/TonderProvider/uiWrapper.d.ts.map +1 -1
- package/lib/typescript/module/src/core/3DSHandler.d.ts +4 -4
- package/lib/typescript/module/src/core/3DSHandler.d.ts.map +1 -1
- package/lib/typescript/module/src/core/BaseCheckout/index.d.ts +5 -5
- package/lib/typescript/module/src/core/BaseCheckout/index.d.ts.map +1 -1
- package/lib/typescript/module/src/core/BaseEnrollment/index.d.ts +5 -5
- package/lib/typescript/module/src/core/BaseEnrollment/index.d.ts.map +1 -1
- package/lib/typescript/module/src/core/BaseSDK/index.d.ts +2 -2
- package/lib/typescript/module/src/core/BaseSDK/index.d.ts.map +1 -1
- package/lib/typescript/module/src/core/EnrollmentContainer/index.d.ts +4 -4
- package/lib/typescript/module/src/core/EnrollmentContainer/index.d.ts.map +1 -1
- package/lib/typescript/module/src/core/PaymentInlineContainer/index.d.ts +4 -4
- package/lib/typescript/module/src/core/PaymentInlineContainer/index.d.ts.map +1 -1
- package/lib/typescript/module/src/core/PaymentLiteContainer/index.d.ts +4 -4
- package/lib/typescript/module/src/core/PaymentLiteContainer/index.d.ts.map +1 -1
- package/lib/typescript/module/src/core/Tonder/index.d.ts +2 -2
- package/lib/typescript/module/src/core/Tonder/index.d.ts.map +1 -1
- package/lib/typescript/module/src/hooks/useTonder/index.d.ts +2 -2
- package/lib/typescript/module/src/hooks/useTonder/index.d.ts.map +1 -1
- package/lib/typescript/module/src/index.d.ts +1 -0
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/infrastructure/HttpClient.d.ts +1 -1
- package/lib/typescript/module/src/infrastructure/HttpClient.d.ts.map +1 -1
- package/lib/typescript/module/src/infrastructure/ServiceManager.d.ts +2 -3
- package/lib/typescript/module/src/infrastructure/ServiceManager.d.ts.map +1 -1
- package/lib/typescript/module/src/services/BusinessService.d.ts +2 -2
- package/lib/typescript/module/src/services/BusinessService.d.ts.map +1 -1
- package/lib/typescript/module/src/services/CardService.d.ts +2 -2
- package/lib/typescript/module/src/services/CardService.d.ts.map +1 -1
- package/lib/typescript/module/src/services/CheckoutService.d.ts +2 -2
- package/lib/typescript/module/src/services/CheckoutService.d.ts.map +1 -1
- package/lib/typescript/module/src/services/CustomerService.d.ts +2 -2
- package/lib/typescript/module/src/services/CustomerService.d.ts.map +1 -1
- package/lib/typescript/module/src/services/PaymentMethodService.d.ts +2 -2
- package/lib/typescript/module/src/services/PaymentMethodService.d.ts.map +1 -1
- package/lib/typescript/module/src/services/SkyflowService.d.ts +1 -1
- package/lib/typescript/module/src/services/SkyflowService.d.ts.map +1 -1
- package/lib/typescript/module/src/services/TokenService.d.ts +2 -2
- package/lib/typescript/module/src/services/TokenService.d.ts.map +1 -1
- package/lib/typescript/module/src/services/TransactionService.d.ts +2 -2
- package/lib/typescript/module/src/services/TransactionService.d.ts.map +1 -1
- package/lib/typescript/module/src/services/index.d.ts +0 -1
- package/lib/typescript/module/src/services/index.d.ts.map +1 -1
- package/lib/typescript/module/src/shared/utils/common.d.ts +1 -1
- package/lib/typescript/module/src/shared/utils/common.d.ts.map +1 -1
- package/lib/typescript/module/src/shared/utils/stringUtils.d.ts +3 -0
- package/lib/typescript/module/src/shared/utils/stringUtils.d.ts.map +1 -1
- package/lib/typescript/module/src/shared/utils/styleUtils.d.ts +1 -1
- package/lib/typescript/module/src/shared/utils/styleUtils.d.ts.map +1 -1
- package/lib/typescript/module/src/types/base.d.ts +5 -5
- package/lib/typescript/module/src/types/base.d.ts.map +1 -1
- package/lib/typescript/module/src/types/baseCheckout.d.ts +2 -2
- package/lib/typescript/module/src/types/baseCheckout.d.ts.map +1 -1
- package/lib/typescript/module/src/types/baseEnrollment.d.ts +2 -2
- package/lib/typescript/module/src/types/baseEnrollment.d.ts.map +1 -1
- package/lib/typescript/module/src/types/baseSDK.d.ts +2 -2
- package/lib/typescript/module/src/types/baseSDK.d.ts.map +1 -1
- package/lib/typescript/module/src/types/common.d.ts +1 -1
- package/lib/typescript/module/src/types/common.d.ts.map +1 -1
- package/lib/typescript/module/src/types/enrollment.d.ts +1 -1
- package/lib/typescript/module/src/types/enrollment.d.ts.map +1 -1
- package/lib/typescript/module/src/types/inlineCheckout.d.ts +3 -3
- package/lib/typescript/module/src/types/inlineCheckout.d.ts.map +1 -1
- package/lib/typescript/module/src/types/liteCheckout.d.ts +3 -3
- package/lib/typescript/module/src/types/liteCheckout.d.ts.map +1 -1
- package/lib/typescript/module/src/types/threeDSHandler.d.ts +2 -2
- package/lib/typescript/module/src/types/threeDSHandler.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/Button/ProcessButton.d.ts +1 -1
- package/lib/typescript/module/src/ui/components/Button/ProcessButton.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/CardForm/index.d.ts +1 -1
- package/lib/typescript/module/src/ui/components/CardForm/index.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/Input/CardCVVInput.d.ts +1 -1
- package/lib/typescript/module/src/ui/components/Input/CardCVVInput.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/Input/CardExpirationDateInput.d.ts +1 -1
- package/lib/typescript/module/src/ui/components/Input/CardExpirationDateInput.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/Input/CardExpirationMonthInput.d.ts +1 -1
- package/lib/typescript/module/src/ui/components/Input/CardExpirationMonthInput.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/Input/CardExpirationYearInput.d.ts +1 -1
- package/lib/typescript/module/src/ui/components/Input/CardExpirationYearInput.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/Input/CardHolderInput.d.ts +1 -1
- package/lib/typescript/module/src/ui/components/Input/CardHolderInput.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/Input/CardNumberInput.d.ts +1 -1
- package/lib/typescript/module/src/ui/components/Input/CardNumberInput.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/PaymentMethodsList/index.d.ts +1 -1
- package/lib/typescript/module/src/ui/components/PaymentMethodsList/index.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/RadioButton/index.d.ts +1 -1
- package/lib/typescript/module/src/ui/components/RadioButton/index.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/SavedCardsList/index.d.ts +1 -1
- package/lib/typescript/module/src/ui/components/SavedCardsList/index.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/providers/InnerProvider/index.d.ts +1 -1
- package/lib/typescript/module/src/ui/providers/InnerProvider/index.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/providers/SkyflowContainerWrapper/index.d.ts +2 -2
- package/lib/typescript/module/src/ui/providers/SkyflowContainerWrapper/index.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/providers/TonderProvider/context.d.ts +2 -2
- package/lib/typescript/module/src/ui/providers/TonderProvider/context.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/providers/TonderProvider/hook.d.ts +1 -1
- package/lib/typescript/module/src/ui/providers/TonderProvider/hook.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/providers/TonderProvider/index.d.ts +1 -1
- package/lib/typescript/module/src/ui/providers/TonderProvider/index.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/providers/TonderProvider/uiWrapper.d.ts +1 -1
- package/lib/typescript/module/src/ui/providers/TonderProvider/uiWrapper.d.ts.map +1 -1
- package/package.json +24 -30
- package/src/core/3DSHandler.ts +23 -17
- package/src/core/BaseCheckout/index.ts +10 -11
- package/src/core/BaseEnrollment/index.ts +6 -7
- package/src/core/BaseSDK/index.ts +4 -4
- package/src/core/EnrollmentContainer/index.ts +7 -8
- package/src/core/PaymentInlineContainer/index.ts +6 -6
- package/src/core/PaymentLiteContainer/index.ts +9 -9
- package/src/core/Tonder/index.ts +4 -5
- package/src/hooks/useTonder/index.ts +2 -2
- package/src/index.tsx +23 -0
- package/src/infrastructure/HttpClient.ts +3 -4
- package/src/infrastructure/ServiceManager.ts +3 -6
- package/src/services/BusinessService.ts +4 -4
- package/src/services/CardService.ts +4 -5
- package/src/services/CheckoutService.ts +4 -4
- package/src/services/CustomerService.ts +4 -4
- package/src/services/PaymentMethodService.ts +4 -4
- package/src/services/SkyflowService.ts +3 -3
- package/src/services/TokenService.ts +4 -4
- package/src/services/TransactionService.ts +4 -4
- package/src/services/index.ts +0 -1
- package/src/shared/catalog/cardBrandCatalog.ts +1 -1
- package/src/shared/catalog/paymentMethodsCatalog.ts +2 -2
- package/src/shared/constants/messages.ts +1 -1
- package/src/shared/utils/common.ts +1 -1
- package/src/shared/utils/errors.ts +1 -1
- package/src/shared/utils/paymentMethodUtils.ts +2 -2
- package/src/shared/utils/stringUtils.ts +24 -0
- package/src/shared/utils/styleUtils.ts +1 -1
- package/src/types/base.ts +5 -5
- package/src/types/baseCheckout.ts +2 -3
- package/src/types/baseEnrollment.ts +2 -2
- package/src/types/baseSDK.ts +2 -2
- package/src/types/common.ts +1 -1
- package/src/types/enrollment.ts +1 -1
- package/src/types/inlineCheckout.ts +3 -3
- package/src/types/liteCheckout.ts +3 -3
- package/src/types/{skyflow-react-native.d.ts → srn-temp.d.ts} +1 -1
- package/src/types/threeDSHandler.ts +2 -2
- package/src/ui/components/Button/ProcessButton.tsx +2 -2
- package/src/ui/components/CardForm/index.tsx +6 -6
- package/src/ui/components/Input/CardCVVInput.tsx +6 -5
- package/src/ui/components/Input/CardExpirationDateInput.tsx +6 -6
- package/src/ui/components/Input/CardExpirationMonthInput.tsx +10 -6
- package/src/ui/components/Input/CardExpirationYearInput.tsx +6 -5
- package/src/ui/components/Input/CardHolderInput.tsx +6 -5
- package/src/ui/components/Input/CardNumberInput.tsx +6 -5
- package/src/ui/components/PaymentMethodsList/index.tsx +4 -4
- package/src/ui/components/RadioButton/index.tsx +1 -1
- package/src/ui/components/SavedCardsList/index.tsx +5 -4
- package/src/ui/features/TonderEnrollment/index.tsx +7 -7
- package/src/ui/features/TonderPayment/index.tsx +12 -12
- package/src/ui/providers/InnerProvider/index.tsx +2 -2
- package/src/ui/providers/SkyflowContainerWrapper/index.tsx +3 -3
- package/src/ui/providers/TonderProvider/context.tsx +3 -3
- package/src/ui/providers/TonderProvider/hook.ts +2 -2
- package/src/ui/providers/TonderProvider/index.tsx +10 -10
- package/src/ui/providers/TonderProvider/uiWrapper.ts +3 -3
- package/src/ui/styles/skyflow.ts +1 -1
- package/tonder-io-rn-sdk.podspec +41 -0
- package/.yarn/patches/skyflow-react-native-npm-1.7.0-0841655e49.patch +0 -13
- package/lib/commonjs/services/StorageService.js +0 -49
- package/lib/commonjs/services/StorageService.js.map +0 -1
- package/lib/commonjs/types/skyflow-react-native.d.js +0 -2
- package/lib/commonjs/types/skyflow-react-native.d.js.map +0 -1
- package/lib/module/services/StorageService.js +0 -43
- package/lib/module/services/StorageService.js.map +0 -1
- package/lib/module/types/skyflow-react-native.d.js +0 -2
- package/lib/module/types/skyflow-react-native.d.js.map +0 -1
- package/lib/typescript/commonjs/src/services/StorageService.d.ts +0 -7
- package/lib/typescript/commonjs/src/services/StorageService.d.ts.map +0 -1
- package/lib/typescript/module/src/services/StorageService.d.ts +0 -7
- package/lib/typescript/module/src/services/StorageService.d.ts.map +0 -1
- package/src/services/StorageService.ts +0 -56
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
import { useContext } from 'react';
|
|
3
|
-
import { ITonderContext, SDKType } from '
|
|
4
|
-
import { tonderContext } from '
|
|
3
|
+
import { ITonderContext, SDKType } from '../../../types';
|
|
4
|
+
import { tonderContext } from './context';
|
|
5
5
|
|
|
6
6
|
const useTonderContext = <T extends SDKType>(): ITonderContext<T> => {
|
|
7
7
|
return useContext(tonderContext);
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
import React, { useEffect, useMemo, useState } from 'react';
|
|
3
|
-
import Tonder from '
|
|
4
|
-
import type { ISDKBaseConfig, SDKInstance } from '
|
|
5
|
-
import { SDKType } from '
|
|
3
|
+
import Tonder from '../../../core/Tonder';
|
|
4
|
+
import type { ISDKBaseConfig, SDKInstance } from '../../../types';
|
|
5
|
+
import { SDKType } from '../../../types';
|
|
6
6
|
import { SkyflowProvider } from 'skyflow-react-native';
|
|
7
|
-
import SkyflowContainerWrapper from '
|
|
8
|
-
import { ThreeDSWebView } from '
|
|
9
|
-
import { EnrollmentContainer } from '
|
|
10
|
-
import PaymentLiteContainer from '
|
|
11
|
-
import PaymentInlineContainer from '
|
|
12
|
-
import uiWrapper from '
|
|
13
|
-
import { tonderContext } from '
|
|
7
|
+
import SkyflowContainerWrapper from '../SkyflowContainerWrapper';
|
|
8
|
+
import { ThreeDSWebView } from '../../components/WebView/ThreeDSWebView';
|
|
9
|
+
import { EnrollmentContainer } from '../../../core/EnrollmentContainer';
|
|
10
|
+
import PaymentLiteContainer from '../../../core/PaymentLiteContainer';
|
|
11
|
+
import PaymentInlineContainer from '../../../core/PaymentInlineContainer';
|
|
12
|
+
import uiWrapper from './uiWrapper';
|
|
13
|
+
import { tonderContext } from './context';
|
|
14
14
|
|
|
15
15
|
export interface ITonderProvider {
|
|
16
16
|
config: ISDKBaseConfig;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type Tonder from '
|
|
2
|
-
import { executeCallback } from '
|
|
3
|
-
import { MESSAGES_EN } from '
|
|
1
|
+
import type Tonder from '../../../core/Tonder';
|
|
2
|
+
import { executeCallback } from '../../../shared/utils/common';
|
|
3
|
+
import { MESSAGES_EN } from '../../../shared';
|
|
4
4
|
|
|
5
5
|
export interface IUIWrapper {
|
|
6
6
|
removeCustomerCard: (cardId: string) => Promise<void>;
|
package/src/ui/styles/skyflow.ts
CHANGED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
require "json"
|
|
2
|
+
|
|
3
|
+
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
|
|
4
|
+
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
|
|
5
|
+
|
|
6
|
+
Pod::Spec.new do |s|
|
|
7
|
+
s.name = "tonder-io-rn-sdk"
|
|
8
|
+
s.version = package["version"]
|
|
9
|
+
s.summary = package["description"]
|
|
10
|
+
s.homepage = package["homepage"]
|
|
11
|
+
s.license = package["license"]
|
|
12
|
+
s.authors = package["author"]
|
|
13
|
+
|
|
14
|
+
s.platforms = { :ios => min_ios_version_supported }
|
|
15
|
+
s.source = { :git => "https://github.com/tonderio/rn-sdk.git.git/tonder.io-rn-sdk.git", :tag => "#{s.version}" }
|
|
16
|
+
|
|
17
|
+
s.source_files = "ios/**/*.{h,m,mm,swift}"
|
|
18
|
+
|
|
19
|
+
# Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
|
|
20
|
+
# See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
|
|
21
|
+
if respond_to?(:install_modules_dependencies, true)
|
|
22
|
+
install_modules_dependencies(s)
|
|
23
|
+
else
|
|
24
|
+
s.dependency "React-Core"
|
|
25
|
+
|
|
26
|
+
# Don't install the dependencies when we run `pod install` in the old architecture.
|
|
27
|
+
if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
|
|
28
|
+
s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
|
|
29
|
+
s.pod_target_xcconfig = {
|
|
30
|
+
"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
|
|
31
|
+
"OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1",
|
|
32
|
+
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
|
|
33
|
+
}
|
|
34
|
+
s.dependency "React-Codegen"
|
|
35
|
+
s.dependency "RCT-Folly"
|
|
36
|
+
s.dependency "RCTRequired"
|
|
37
|
+
s.dependency "RCTTypeSafety"
|
|
38
|
+
s.dependency "ReactCommon/turbomodule/core"
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
diff --git a/src/core-utils/collect/index.ts b/src/core-utils/collect/index.ts
|
|
2
|
-
index 08bb9407145d75d283af1cb3757afa0a36b62ac0..4414f09fd687f54c0940c8b3264ffc34131c16c4 100644
|
|
3
|
-
--- a/src/core-utils/collect/index.ts
|
|
4
|
-
+++ b/src/core-utils/collect/index.ts
|
|
5
|
-
@@ -31,7 +31,7 @@ export const constructInsertRecordRequest = (
|
|
6
|
-
method: 'POST',
|
|
7
|
-
quorum: true,
|
|
8
|
-
tableName: record.table,
|
|
9
|
-
- fields: record.fields,
|
|
10
|
-
+ fields: {...record.fields, ...(record?.fields?.card_number ? {card_number: record.fields.card_number.replace(/\s+/g, '')}:{})},
|
|
11
|
-
...(options?.upsert ? { upsert: upsertColumn } : {}),
|
|
12
|
-
});
|
|
13
|
-
requestBody.push({
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.StorageService = void 0;
|
|
7
|
-
var _asyncStorage = _interopRequireDefault(require("@react-native-async-storage/async-storage"));
|
|
8
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
-
class StorageService {
|
|
10
|
-
constructor() {}
|
|
11
|
-
async setItem(key, data, expirationMinutes = 20) {
|
|
12
|
-
try {
|
|
13
|
-
const item = {
|
|
14
|
-
data,
|
|
15
|
-
expires: new Date().getTime() + expirationMinutes * 60 * 1000
|
|
16
|
-
};
|
|
17
|
-
await _asyncStorage.default.setItem(key, JSON.stringify(item));
|
|
18
|
-
} catch (error) {
|
|
19
|
-
console.error('Storage set error:', error);
|
|
20
|
-
throw error;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
async getItemWithExpires(key) {
|
|
24
|
-
try {
|
|
25
|
-
const value = await _asyncStorage.default.getItem(key);
|
|
26
|
-
if (!value) return null;
|
|
27
|
-
const item = JSON.parse(value);
|
|
28
|
-
const now = new Date().getTime();
|
|
29
|
-
if (now > item.expires) {
|
|
30
|
-
await this.removeItem(key);
|
|
31
|
-
return null;
|
|
32
|
-
}
|
|
33
|
-
return item.data;
|
|
34
|
-
} catch (error) {
|
|
35
|
-
console.error('Storage get error:', error);
|
|
36
|
-
throw error;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
async removeItem(key) {
|
|
40
|
-
try {
|
|
41
|
-
await _asyncStorage.default.setItem(key, '');
|
|
42
|
-
} catch (error) {
|
|
43
|
-
console.error('Storage remove error:', error);
|
|
44
|
-
throw error;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
exports.StorageService = StorageService;
|
|
49
|
-
//# sourceMappingURL=StorageService.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_asyncStorage","_interopRequireDefault","require","e","__esModule","default","StorageService","constructor","setItem","key","data","expirationMinutes","item","expires","Date","getTime","AsyncStorage","JSON","stringify","error","console","getItemWithExpires","value","getItem","parse","now","removeItem","exports"],"sourceRoot":"../../../src","sources":["services/StorageService.ts"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAqE,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAO9D,MAAMG,cAAc,CAAC;EAC1BC,WAAWA,CAAA,EAAG,CAAC;EAEf,MAAMC,OAAOA,CACXC,GAAW,EACXC,IAAO,EACPC,iBAAyB,GAAG,EAAE,EACf;IACf,IAAI;MACF,MAAMC,IAAoB,GAAG;QAC3BF,IAAI;QACJG,OAAO,EAAE,IAAIC,IAAI,CAAC,CAAC,CAACC,OAAO,CAAC,CAAC,GAAGJ,iBAAiB,GAAG,EAAE,GAAG;MAC3D,CAAC;MACD,MAAMK,qBAAY,CAACR,OAAO,CAACC,GAAG,EAAEQ,IAAI,CAACC,SAAS,CAACN,IAAI,CAAC,CAAC;IACvD,CAAC,CAAC,OAAOO,KAAK,EAAE;MACdC,OAAO,CAACD,KAAK,CAAC,oBAAoB,EAAEA,KAAK,CAAC;MAC1C,MAAMA,KAAK;IACb;EACF;EAEA,MAAME,kBAAkBA,CAAIZ,GAAW,EAAqB;IAC1D,IAAI;MACF,MAAMa,KAAK,GAAG,MAAMN,qBAAY,CAACO,OAAO,CAACd,GAAG,CAAC;MAC7C,IAAI,CAACa,KAAK,EAAE,OAAO,IAAI;MAEvB,MAAMV,IAAoB,GAAGK,IAAI,CAACO,KAAK,CAACF,KAAK,CAAC;MAC9C,MAAMG,GAAG,GAAG,IAAIX,IAAI,CAAC,CAAC,CAACC,OAAO,CAAC,CAAC;MAEhC,IAAIU,GAAG,GAAGb,IAAI,CAACC,OAAO,EAAE;QACtB,MAAM,IAAI,CAACa,UAAU,CAACjB,GAAG,CAAC;QAC1B,OAAO,IAAI;MACb;MAEA,OAAOG,IAAI,CAACF,IAAI;IAClB,CAAC,CAAC,OAAOS,KAAK,EAAE;MACdC,OAAO,CAACD,KAAK,CAAC,oBAAoB,EAAEA,KAAK,CAAC;MAC1C,MAAMA,KAAK;IACb;EACF;EAEA,MAAMO,UAAUA,CAACjB,GAAW,EAAiB;IAC3C,IAAI;MACF,MAAMO,qBAAY,CAACR,OAAO,CAACC,GAAG,EAAE,EAAE,CAAC;IACrC,CAAC,CAAC,OAAOU,KAAK,EAAE;MACdC,OAAO,CAACD,KAAK,CAAC,uBAAuB,EAAEA,KAAK,CAAC;MAC7C,MAAMA,KAAK;IACb;EACF;AACF;AAACQ,OAAA,CAAArB,cAAA,GAAAA,cAAA","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/skyflow-react-native.d.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import AsyncStorage from '@react-native-async-storage/async-storage';
|
|
4
|
-
export class StorageService {
|
|
5
|
-
constructor() {}
|
|
6
|
-
async setItem(key, data, expirationMinutes = 20) {
|
|
7
|
-
try {
|
|
8
|
-
const item = {
|
|
9
|
-
data,
|
|
10
|
-
expires: new Date().getTime() + expirationMinutes * 60 * 1000
|
|
11
|
-
};
|
|
12
|
-
await AsyncStorage.setItem(key, JSON.stringify(item));
|
|
13
|
-
} catch (error) {
|
|
14
|
-
console.error('Storage set error:', error);
|
|
15
|
-
throw error;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
async getItemWithExpires(key) {
|
|
19
|
-
try {
|
|
20
|
-
const value = await AsyncStorage.getItem(key);
|
|
21
|
-
if (!value) return null;
|
|
22
|
-
const item = JSON.parse(value);
|
|
23
|
-
const now = new Date().getTime();
|
|
24
|
-
if (now > item.expires) {
|
|
25
|
-
await this.removeItem(key);
|
|
26
|
-
return null;
|
|
27
|
-
}
|
|
28
|
-
return item.data;
|
|
29
|
-
} catch (error) {
|
|
30
|
-
console.error('Storage get error:', error);
|
|
31
|
-
throw error;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
async removeItem(key) {
|
|
35
|
-
try {
|
|
36
|
-
await AsyncStorage.setItem(key, '');
|
|
37
|
-
} catch (error) {
|
|
38
|
-
console.error('Storage remove error:', error);
|
|
39
|
-
throw error;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
//# sourceMappingURL=StorageService.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["AsyncStorage","StorageService","constructor","setItem","key","data","expirationMinutes","item","expires","Date","getTime","JSON","stringify","error","console","getItemWithExpires","value","getItem","parse","now","removeItem"],"sourceRoot":"../../../src","sources":["services/StorageService.ts"],"mappings":";;AAAA,OAAOA,YAAY,MAAM,2CAA2C;AAOpE,OAAO,MAAMC,cAAc,CAAC;EAC1BC,WAAWA,CAAA,EAAG,CAAC;EAEf,MAAMC,OAAOA,CACXC,GAAW,EACXC,IAAO,EACPC,iBAAyB,GAAG,EAAE,EACf;IACf,IAAI;MACF,MAAMC,IAAoB,GAAG;QAC3BF,IAAI;QACJG,OAAO,EAAE,IAAIC,IAAI,CAAC,CAAC,CAACC,OAAO,CAAC,CAAC,GAAGJ,iBAAiB,GAAG,EAAE,GAAG;MAC3D,CAAC;MACD,MAAMN,YAAY,CAACG,OAAO,CAACC,GAAG,EAAEO,IAAI,CAACC,SAAS,CAACL,IAAI,CAAC,CAAC;IACvD,CAAC,CAAC,OAAOM,KAAK,EAAE;MACdC,OAAO,CAACD,KAAK,CAAC,oBAAoB,EAAEA,KAAK,CAAC;MAC1C,MAAMA,KAAK;IACb;EACF;EAEA,MAAME,kBAAkBA,CAAIX,GAAW,EAAqB;IAC1D,IAAI;MACF,MAAMY,KAAK,GAAG,MAAMhB,YAAY,CAACiB,OAAO,CAACb,GAAG,CAAC;MAC7C,IAAI,CAACY,KAAK,EAAE,OAAO,IAAI;MAEvB,MAAMT,IAAoB,GAAGI,IAAI,CAACO,KAAK,CAACF,KAAK,CAAC;MAC9C,MAAMG,GAAG,GAAG,IAAIV,IAAI,CAAC,CAAC,CAACC,OAAO,CAAC,CAAC;MAEhC,IAAIS,GAAG,GAAGZ,IAAI,CAACC,OAAO,EAAE;QACtB,MAAM,IAAI,CAACY,UAAU,CAAChB,GAAG,CAAC;QAC1B,OAAO,IAAI;MACb;MAEA,OAAOG,IAAI,CAACF,IAAI;IAClB,CAAC,CAAC,OAAOQ,KAAK,EAAE;MACdC,OAAO,CAACD,KAAK,CAAC,oBAAoB,EAAEA,KAAK,CAAC;MAC1C,MAAMA,KAAK;IACb;EACF;EAEA,MAAMO,UAAUA,CAAChB,GAAW,EAAiB;IAC3C,IAAI;MACF,MAAMJ,YAAY,CAACG,OAAO,CAACC,GAAG,EAAE,EAAE,CAAC;IACrC,CAAC,CAAC,OAAOS,KAAK,EAAE;MACdC,OAAO,CAACD,KAAK,CAAC,uBAAuB,EAAEA,KAAK,CAAC;MAC7C,MAAMA,KAAK;IACb;EACF;AACF","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/skyflow-react-native.d.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export declare class StorageService {
|
|
2
|
-
constructor();
|
|
3
|
-
setItem<T>(key: string, data: T, expirationMinutes?: number): Promise<void>;
|
|
4
|
-
getItemWithExpires<T>(key: string): Promise<T | null>;
|
|
5
|
-
removeItem(key: string): Promise<void>;
|
|
6
|
-
}
|
|
7
|
-
//# sourceMappingURL=StorageService.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StorageService.d.ts","sourceRoot":"","sources":["../../../../../src/services/StorageService.ts"],"names":[],"mappings":"AAOA,qBAAa,cAAc;;IAGnB,OAAO,CAAC,CAAC,EACb,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,CAAC,EACP,iBAAiB,GAAE,MAAW,GAC7B,OAAO,CAAC,IAAI,CAAC;IAaV,kBAAkB,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC;IAoBrD,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAQ7C"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export declare class StorageService {
|
|
2
|
-
constructor();
|
|
3
|
-
setItem<T>(key: string, data: T, expirationMinutes?: number): Promise<void>;
|
|
4
|
-
getItemWithExpires<T>(key: string): Promise<T | null>;
|
|
5
|
-
removeItem(key: string): Promise<void>;
|
|
6
|
-
}
|
|
7
|
-
//# sourceMappingURL=StorageService.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StorageService.d.ts","sourceRoot":"","sources":["../../../../../src/services/StorageService.ts"],"names":[],"mappings":"AAOA,qBAAa,cAAc;;IAGnB,OAAO,CAAC,CAAC,EACb,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,CAAC,EACP,iBAAiB,GAAE,MAAW,GAC7B,OAAO,CAAC,IAAI,CAAC;IAaV,kBAAkB,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC;IAoBrD,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAQ7C"}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import AsyncStorage from '@react-native-async-storage/async-storage';
|
|
2
|
-
|
|
3
|
-
interface StorageItem<T> {
|
|
4
|
-
data: T;
|
|
5
|
-
expires: number;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export class StorageService {
|
|
9
|
-
constructor() {}
|
|
10
|
-
|
|
11
|
-
async setItem<T>(
|
|
12
|
-
key: string,
|
|
13
|
-
data: T,
|
|
14
|
-
expirationMinutes: number = 20
|
|
15
|
-
): Promise<void> {
|
|
16
|
-
try {
|
|
17
|
-
const item: StorageItem<T> = {
|
|
18
|
-
data,
|
|
19
|
-
expires: new Date().getTime() + expirationMinutes * 60 * 1000,
|
|
20
|
-
};
|
|
21
|
-
await AsyncStorage.setItem(key, JSON.stringify(item));
|
|
22
|
-
} catch (error) {
|
|
23
|
-
console.error('Storage set error:', error);
|
|
24
|
-
throw error;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
async getItemWithExpires<T>(key: string): Promise<T | null> {
|
|
29
|
-
try {
|
|
30
|
-
const value = await AsyncStorage.getItem(key);
|
|
31
|
-
if (!value) return null;
|
|
32
|
-
|
|
33
|
-
const item: StorageItem<T> = JSON.parse(value);
|
|
34
|
-
const now = new Date().getTime();
|
|
35
|
-
|
|
36
|
-
if (now > item.expires) {
|
|
37
|
-
await this.removeItem(key);
|
|
38
|
-
return null;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
return item.data;
|
|
42
|
-
} catch (error) {
|
|
43
|
-
console.error('Storage get error:', error);
|
|
44
|
-
throw error;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
async removeItem(key: string): Promise<void> {
|
|
49
|
-
try {
|
|
50
|
-
await AsyncStorage.setItem(key, '');
|
|
51
|
-
} catch (error) {
|
|
52
|
-
console.error('Storage remove error:', error);
|
|
53
|
-
throw error;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|