react-native-unit-components 1.11.0 → 1.13.0
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/android/src/main/java/com/unitreactnativecomponents/UnitReactNativeComponentsPackage.kt +2 -0
- package/android/src/main/java/com/unitreactnativecomponents/unStoreManager/UNStoreManager.kt +36 -0
- package/ios/UNStoreManager/UNStoreManager.swift +28 -0
- package/ios/UNStoreManager/UNStoreManagerExportModule.m +8 -0
- package/lib/commonjs/components/UNACHCreditComponent/UNACHCreditComponent.js +2 -1
- package/lib/commonjs/components/UNACHCreditComponent/UNACHCreditComponent.js.map +1 -1
- package/lib/commonjs/components/UNACHDebitComponent/UNACHDebitComponent.js +2 -1
- package/lib/commonjs/components/UNACHDebitComponent/UNACHDebitComponent.js.map +1 -1
- package/lib/commonjs/components/UNAccountComponent/UNAccountComponent.js +4 -1
- package/lib/commonjs/components/UNAccountComponent/UNAccountComponent.js.map +1 -1
- package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.js +36 -51
- package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.js.map +1 -1
- package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.utils.js +133 -12
- package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.utils.js.map +1 -1
- package/lib/commonjs/components/UNBottomSheetComponent/components/UNBottomSheetNativeComponent/UNBottomSheetNativeComponent.js +62 -19
- package/lib/commonjs/components/UNBottomSheetComponent/components/UNBottomSheetNativeComponent/UNBottomSheetNativeComponent.js.map +1 -1
- package/lib/commonjs/components/UNBottomSheetComponent/components/UNBottomSheetSlotComponent/UNBottomSheetSlotComponent.js +57 -38
- package/lib/commonjs/components/UNBottomSheetComponent/components/UNBottomSheetSlotComponent/UNBottomSheetSlotComponent.js.map +1 -1
- package/lib/commonjs/components/UNFundAccountPaymentComponent/UNFundAccountPaymentComponent.js +82 -0
- package/lib/commonjs/components/UNFundAccountPaymentComponent/UNFundAccountPaymentComponent.js.map +1 -0
- package/lib/commonjs/components/UNFundAccountPaymentComponent/UNFundAccountPaymentComponent.utils.js +30 -0
- package/lib/commonjs/components/UNFundAccountPaymentComponent/UNFundAccountPaymentComponent.utils.js.map +1 -0
- package/lib/commonjs/components/UNFundAccountPaymentComponent/index.js +21 -0
- package/lib/commonjs/components/UNFundAccountPaymentComponent/index.js.map +1 -0
- package/lib/commonjs/components/UNPayeeManagementComponent/UNPayeeManagementComponent.js +132 -0
- package/lib/commonjs/components/UNPayeeManagementComponent/UNPayeeManagementComponent.js.map +1 -0
- package/lib/commonjs/components/UNPayeeManagementComponent/UNPayeeManagementComponent.utils.js +96 -0
- package/lib/commonjs/components/UNPayeeManagementComponent/UNPayeeManagementComponent.utils.js.map +1 -0
- package/lib/commonjs/components/UNPayeeManagementComponent/index.js +21 -0
- package/lib/commonjs/components/UNPayeeManagementComponent/index.js.map +1 -0
- package/lib/commonjs/components/UNWhiteLabelAppComponent/UNWhiteLabelAppComponent.js +104 -0
- package/lib/commonjs/components/UNWhiteLabelAppComponent/UNWhiteLabelAppComponent.js.map +1 -0
- package/lib/commonjs/components/UNWhiteLabelAppComponent/UNWhiteLabelAppComponent.utils.js +37 -0
- package/lib/commonjs/components/UNWhiteLabelAppComponent/UNWhiteLabelAppComponent.utils.js.map +1 -0
- package/lib/commonjs/components/UNWhiteLabelAppComponent/index.js +21 -0
- package/lib/commonjs/components/UNWhiteLabelAppComponent/index.js.map +1 -0
- package/lib/commonjs/components/index.js +33 -0
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/index.js +1 -8
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/messages/webMessages/fundAccountPaymentMessage.js +6 -0
- package/lib/commonjs/messages/webMessages/fundAccountPaymentMessage.js.map +1 -0
- package/lib/commonjs/messages/webMessages/onLoadMessage.js +2 -0
- package/lib/commonjs/messages/webMessages/onLoadMessage.js.map +1 -1
- package/lib/commonjs/messages/webMessages/payeeManagementMessage.js +15 -0
- package/lib/commonjs/messages/webMessages/payeeManagementMessage.js.map +1 -0
- package/lib/commonjs/messages/webMessages/plaidMessages.js +14 -0
- package/lib/commonjs/messages/webMessages/plaidMessages.js.map +1 -0
- package/lib/commonjs/messages/webMessages/unitMessages.js +3 -2
- package/lib/commonjs/messages/webMessages/unitMessages.js.map +1 -1
- package/lib/commonjs/nativeModulesHelpers/UNStoreManagerHelper/UNStoreManagerHelper.js +23 -0
- package/lib/commonjs/nativeModulesHelpers/UNStoreManagerHelper/UNStoreManagerHelper.js.map +1 -0
- package/lib/commonjs/networking/common/UNNetworkConstants.js +3 -3
- package/lib/commonjs/networking/common/UNNetworkConstants.js.map +1 -1
- package/lib/commonjs/networking/requests/UNWalletPayloadRequest.js +1 -0
- package/lib/commonjs/networking/requests/UNWalletPayloadRequest.js.map +1 -1
- package/lib/commonjs/scripts/html/bodyHtml.js +1 -1
- package/lib/commonjs/scripts/html/bodyScript.js +110 -4
- package/lib/commonjs/scripts/html/bodyScript.js.map +1 -1
- package/lib/commonjs/slices/ConfigurationSlice.js.map +1 -1
- package/lib/commonjs/slices/SharedEventsSlice.js.map +1 -1
- package/lib/commonjs/types/internal/bottomSheet.types.js +5 -0
- package/lib/commonjs/types/internal/bottomSheet.types.js.map +1 -1
- package/lib/commonjs/types/internal/unitStore.types.js +13 -0
- package/lib/commonjs/types/internal/unitStore.types.js.map +1 -0
- package/lib/commonjs/types/internal/webComponent.types.js +3 -0
- package/lib/commonjs/types/internal/webComponent.types.js.map +1 -1
- package/lib/commonjs/types/shared/checkDeposit.types.js.map +1 -1
- package/lib/commonjs/types/shared/env.types.js +12 -0
- package/lib/commonjs/types/shared/env.types.js.map +1 -0
- package/lib/commonjs/types/shared/fundAccountPayment.types.js +6 -0
- package/lib/commonjs/types/shared/fundAccountPayment.types.js.map +1 -0
- package/lib/commonjs/types/shared/index.js +33 -0
- package/lib/commonjs/types/shared/index.js.map +1 -1
- package/lib/commonjs/types/shared/payeeManagement.types.js +17 -0
- package/lib/commonjs/types/shared/payeeManagement.types.js.map +1 -0
- package/lib/commonjs/types/shared/payments.types.js +34 -1
- package/lib/commonjs/types/shared/payments.types.js.map +1 -1
- package/lib/commonjs/types/shared/types.js +10 -0
- package/lib/commonjs/types/shared/types.js.map +1 -1
- package/lib/commonjs/unitSdkManager/UnitSdk.api.js +1 -3
- package/lib/commonjs/unitSdkManager/UnitSdk.api.js.map +1 -1
- package/lib/commonjs/unitSdkManager/UnitSdk.constants.js +1 -1
- package/lib/commonjs/unitSdkManager/UnitSdkManager.js +14 -6
- package/lib/commonjs/unitSdkManager/UnitSdkManager.js.map +1 -1
- package/lib/commonjs/unitSdkManager/UnitSdkManager.utils.internal.js +3 -3
- package/lib/commonjs/unitSdkManager/UnitSdkManager.utils.internal.js.map +1 -1
- package/lib/commonjs/unitSdkManager/unitHelpersManager/UnitHelpersManager.js +34 -0
- package/lib/commonjs/unitSdkManager/unitHelpersManager/UnitHelpersManager.js.map +1 -0
- package/lib/commonjs/utils/windowUnitStore.js +11 -0
- package/lib/commonjs/utils/windowUnitStore.js.map +1 -0
- package/lib/commonjs/webComponent/WebComponent.js +52 -14
- package/lib/commonjs/webComponent/WebComponent.js.map +1 -1
- package/lib/commonjs/webComponent/WebComponent.utils.js +2 -2
- package/lib/commonjs/webComponent/WebComponent.utils.js.map +1 -1
- package/lib/commonjs/webComponent/html.js +12 -0
- package/lib/commonjs/webComponent/html.js.map +1 -1
- package/lib/module/components/UNACHCreditComponent/UNACHCreditComponent.js +2 -1
- package/lib/module/components/UNACHCreditComponent/UNACHCreditComponent.js.map +1 -1
- package/lib/module/components/UNACHDebitComponent/UNACHDebitComponent.js +2 -1
- package/lib/module/components/UNACHDebitComponent/UNACHDebitComponent.js.map +1 -1
- package/lib/module/components/UNAccountComponent/UNAccountComponent.js +5 -2
- package/lib/module/components/UNAccountComponent/UNAccountComponent.js.map +1 -1
- package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.js +37 -52
- package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.js.map +1 -1
- package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.utils.js +131 -8
- package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.utils.js.map +1 -1
- package/lib/module/components/UNBottomSheetComponent/components/UNBottomSheetNativeComponent/UNBottomSheetNativeComponent.js +63 -21
- package/lib/module/components/UNBottomSheetComponent/components/UNBottomSheetNativeComponent/UNBottomSheetNativeComponent.js.map +1 -1
- package/lib/module/components/UNBottomSheetComponent/components/UNBottomSheetSlotComponent/UNBottomSheetSlotComponent.js +57 -38
- package/lib/module/components/UNBottomSheetComponent/components/UNBottomSheetSlotComponent/UNBottomSheetSlotComponent.js.map +1 -1
- package/lib/module/components/UNFundAccountPaymentComponent/UNFundAccountPaymentComponent.js +73 -0
- package/lib/module/components/UNFundAccountPaymentComponent/UNFundAccountPaymentComponent.js.map +1 -0
- package/lib/module/components/UNFundAccountPaymentComponent/UNFundAccountPaymentComponent.utils.js +22 -0
- package/lib/module/components/UNFundAccountPaymentComponent/UNFundAccountPaymentComponent.utils.js.map +1 -0
- package/lib/module/components/UNFundAccountPaymentComponent/index.js +2 -0
- package/lib/module/components/UNFundAccountPaymentComponent/index.js.map +1 -0
- package/lib/module/components/UNPayeeManagementComponent/UNPayeeManagementComponent.js +124 -0
- package/lib/module/components/UNPayeeManagementComponent/UNPayeeManagementComponent.js.map +1 -0
- package/lib/module/components/UNPayeeManagementComponent/UNPayeeManagementComponent.utils.js +82 -0
- package/lib/module/components/UNPayeeManagementComponent/UNPayeeManagementComponent.utils.js.map +1 -0
- package/lib/module/components/UNPayeeManagementComponent/index.js +2 -0
- package/lib/module/components/UNPayeeManagementComponent/index.js.map +1 -0
- package/lib/module/components/UNWhiteLabelAppComponent/UNWhiteLabelAppComponent.js +95 -0
- package/lib/module/components/UNWhiteLabelAppComponent/UNWhiteLabelAppComponent.js.map +1 -0
- package/lib/module/components/UNWhiteLabelAppComponent/UNWhiteLabelAppComponent.utils.js +28 -0
- package/lib/module/components/UNWhiteLabelAppComponent/UNWhiteLabelAppComponent.utils.js.map +1 -0
- package/lib/module/components/UNWhiteLabelAppComponent/index.js +2 -0
- package/lib/module/components/UNWhiteLabelAppComponent/index.js.map +1 -0
- package/lib/module/components/index.js +3 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/index.js +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/messages/webMessages/fundAccountPaymentMessage.js +2 -0
- package/lib/module/messages/webMessages/fundAccountPaymentMessage.js.map +1 -0
- package/lib/module/messages/webMessages/onLoadMessage.js +2 -0
- package/lib/module/messages/webMessages/onLoadMessage.js.map +1 -1
- package/lib/module/messages/webMessages/payeeManagementMessage.js +9 -0
- package/lib/module/messages/webMessages/payeeManagementMessage.js.map +1 -0
- package/lib/module/messages/webMessages/plaidMessages.js +8 -0
- package/lib/module/messages/webMessages/plaidMessages.js.map +1 -0
- package/lib/module/messages/webMessages/unitMessages.js +3 -2
- package/lib/module/messages/webMessages/unitMessages.js.map +1 -1
- package/lib/module/nativeModulesHelpers/UNStoreManagerHelper/UNStoreManagerHelper.js +17 -0
- package/lib/module/nativeModulesHelpers/UNStoreManagerHelper/UNStoreManagerHelper.js.map +1 -0
- package/lib/module/networking/common/UNNetworkConstants.js +1 -1
- package/lib/module/networking/common/UNNetworkConstants.js.map +1 -1
- package/lib/module/networking/requests/UNWalletPayloadRequest.js +1 -0
- package/lib/module/networking/requests/UNWalletPayloadRequest.js.map +1 -1
- package/lib/module/scripts/html/bodyHtml.js +1 -1
- package/lib/module/scripts/html/bodyScript.js +109 -3
- package/lib/module/scripts/html/bodyScript.js.map +1 -1
- package/lib/module/slices/ConfigurationSlice.js.map +1 -1
- package/lib/module/slices/SharedEventsSlice.js.map +1 -1
- package/lib/module/types/internal/bottomSheet.types.js +5 -0
- package/lib/module/types/internal/bottomSheet.types.js.map +1 -1
- package/lib/module/types/internal/unitStore.types.js +8 -0
- package/lib/module/types/internal/unitStore.types.js.map +1 -0
- package/lib/module/types/internal/webComponent.types.js +3 -0
- package/lib/module/types/internal/webComponent.types.js.map +1 -1
- package/lib/module/types/shared/checkDeposit.types.js.map +1 -1
- package/lib/module/types/shared/env.types.js +6 -0
- package/lib/module/types/shared/env.types.js.map +1 -0
- package/lib/module/types/shared/fundAccountPayment.types.js +2 -0
- package/lib/module/types/shared/fundAccountPayment.types.js.map +1 -0
- package/lib/module/types/shared/index.js +3 -0
- package/lib/module/types/shared/index.js.map +1 -1
- package/lib/module/types/shared/payeeManagement.types.js +11 -0
- package/lib/module/types/shared/payeeManagement.types.js.map +1 -0
- package/lib/module/types/shared/payments.types.js +33 -0
- package/lib/module/types/shared/payments.types.js.map +1 -1
- package/lib/module/types/shared/types.js +6 -0
- package/lib/module/types/shared/types.js.map +1 -1
- package/lib/module/unitSdkManager/UnitSdk.api.js +2 -4
- package/lib/module/unitSdkManager/UnitSdk.api.js.map +1 -1
- package/lib/module/unitSdkManager/UnitSdk.constants.js +1 -1
- package/lib/module/unitSdkManager/UnitSdkManager.js +12 -5
- package/lib/module/unitSdkManager/UnitSdkManager.js.map +1 -1
- package/lib/module/unitSdkManager/UnitSdkManager.utils.internal.js +1 -1
- package/lib/module/unitSdkManager/UnitSdkManager.utils.internal.js.map +1 -1
- package/lib/module/unitSdkManager/unitHelpersManager/UnitHelpersManager.js +27 -0
- package/lib/module/unitSdkManager/unitHelpersManager/UnitHelpersManager.js.map +1 -0
- package/lib/module/utils/windowUnitStore.js +4 -0
- package/lib/module/utils/windowUnitStore.js.map +1 -0
- package/lib/module/webComponent/WebComponent.js +52 -15
- package/lib/module/webComponent/WebComponent.js.map +1 -1
- package/lib/module/webComponent/WebComponent.utils.js +2 -2
- package/lib/module/webComponent/WebComponent.utils.js.map +1 -1
- package/lib/module/webComponent/html.js +13 -1
- package/lib/module/webComponent/html.js.map +1 -1
- package/lib/typescript/src/components/UNACHCreditComponent/UNACHCreditComponent.d.ts.map +1 -1
- package/lib/typescript/src/components/UNACHDebitComponent/UNACHDebitComponent.d.ts.map +1 -1
- package/lib/typescript/src/components/UNAccountComponent/UNAccountComponent.d.ts.map +1 -1
- package/lib/typescript/src/components/UNBottomSheetComponent/UNBottomSheetComponent.d.ts.map +1 -1
- package/lib/typescript/src/components/UNBottomSheetComponent/UNBottomSheetComponent.utils.d.ts +5 -4
- package/lib/typescript/src/components/UNBottomSheetComponent/UNBottomSheetComponent.utils.d.ts.map +1 -1
- package/lib/typescript/src/components/UNBottomSheetComponent/components/UNBottomSheetNativeComponent/UNBottomSheetNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/components/UNBottomSheetComponent/components/UNBottomSheetSlotComponent/UNBottomSheetSlotComponent.d.ts.map +1 -1
- package/lib/typescript/src/components/UNCardComponent/UNCardComponent.d.ts +1 -1
- package/lib/typescript/src/components/UNCardComponent/UNCardComponent.d.ts.map +1 -1
- package/lib/typescript/src/components/UNFundAccountPaymentComponent/UNFundAccountPaymentComponent.d.ts +19 -0
- package/lib/typescript/src/components/UNFundAccountPaymentComponent/UNFundAccountPaymentComponent.d.ts.map +1 -0
- package/lib/typescript/src/components/UNFundAccountPaymentComponent/UNFundAccountPaymentComponent.utils.d.ts +4 -0
- package/lib/typescript/src/components/UNFundAccountPaymentComponent/UNFundAccountPaymentComponent.utils.d.ts.map +1 -0
- package/lib/typescript/src/components/UNFundAccountPaymentComponent/index.d.ts +2 -0
- package/lib/typescript/src/components/UNFundAccountPaymentComponent/index.d.ts.map +1 -0
- package/lib/typescript/src/components/UNPayeeManagementComponent/UNPayeeManagementComponent.d.ts +27 -0
- package/lib/typescript/src/components/UNPayeeManagementComponent/UNPayeeManagementComponent.d.ts.map +1 -0
- package/lib/typescript/src/components/UNPayeeManagementComponent/UNPayeeManagementComponent.utils.d.ts +15 -0
- package/lib/typescript/src/components/UNPayeeManagementComponent/UNPayeeManagementComponent.utils.d.ts.map +1 -0
- package/lib/typescript/src/components/UNPayeeManagementComponent/index.d.ts +2 -0
- package/lib/typescript/src/components/UNPayeeManagementComponent/index.d.ts.map +1 -0
- package/lib/typescript/src/components/UNWhiteLabelAppComponent/UNWhiteLabelAppComponent.d.ts +10 -0
- package/lib/typescript/src/components/UNWhiteLabelAppComponent/UNWhiteLabelAppComponent.d.ts.map +1 -0
- package/lib/typescript/src/components/UNWhiteLabelAppComponent/UNWhiteLabelAppComponent.utils.d.ts +7 -0
- package/lib/typescript/src/components/UNWhiteLabelAppComponent/UNWhiteLabelAppComponent.utils.d.ts.map +1 -0
- package/lib/typescript/src/components/UNWhiteLabelAppComponent/index.d.ts +2 -0
- package/lib/typescript/src/components/UNWhiteLabelAppComponent/index.d.ts.map +1 -0
- package/lib/typescript/src/components/index.d.ts +3 -0
- package/lib/typescript/src/components/index.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +1 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/messages/webMessages/fundAccountPaymentMessage.d.ts +6 -0
- package/lib/typescript/src/messages/webMessages/fundAccountPaymentMessage.d.ts.map +1 -0
- package/lib/typescript/src/messages/webMessages/index.d.ts +5 -2
- package/lib/typescript/src/messages/webMessages/index.d.ts.map +1 -1
- package/lib/typescript/src/messages/webMessages/onLoadMessage.d.ts +9 -2
- package/lib/typescript/src/messages/webMessages/onLoadMessage.d.ts.map +1 -1
- package/lib/typescript/src/messages/webMessages/payeeManagementMessage.d.ts +19 -0
- package/lib/typescript/src/messages/webMessages/payeeManagementMessage.d.ts.map +1 -0
- package/lib/typescript/src/messages/webMessages/plaidMessages.d.ts +24 -0
- package/lib/typescript/src/messages/webMessages/plaidMessages.d.ts.map +1 -0
- package/lib/typescript/src/messages/webMessages/unitMessages.d.ts +12 -3
- package/lib/typescript/src/messages/webMessages/unitMessages.d.ts.map +1 -1
- package/lib/typescript/src/nativeModulesHelpers/UNStoreManagerHelper/UNStoreManagerHelper.d.ts +7 -0
- package/lib/typescript/src/nativeModulesHelpers/UNStoreManagerHelper/UNStoreManagerHelper.d.ts.map +1 -0
- package/lib/typescript/src/networking/requests/UNWalletPayloadRequest.d.ts +1 -1
- package/lib/typescript/src/networking/requests/UNWalletPayloadRequest.d.ts.map +1 -1
- package/lib/typescript/src/scripts/html/bodyScript.d.ts +12 -0
- package/lib/typescript/src/scripts/html/bodyScript.d.ts.map +1 -1
- package/lib/typescript/src/slices/ConfigurationSlice.d.ts.map +1 -1
- package/lib/typescript/src/slices/SharedEventsSlice.d.ts +21 -2
- package/lib/typescript/src/slices/SharedEventsSlice.d.ts.map +1 -1
- package/lib/typescript/src/store/store.d.ts +24 -0
- package/lib/typescript/src/store/store.d.ts.map +1 -1
- package/lib/typescript/src/types/internal/bottomSheet.types.d.ts +29 -16
- package/lib/typescript/src/types/internal/bottomSheet.types.d.ts.map +1 -1
- package/lib/typescript/src/types/internal/unitStore.types.d.ts +5 -0
- package/lib/typescript/src/types/internal/unitStore.types.d.ts.map +1 -0
- package/lib/typescript/src/types/internal/webComponent.types.d.ts +4 -1
- package/lib/typescript/src/types/internal/webComponent.types.d.ts.map +1 -1
- package/lib/typescript/src/types/shared/achCredit.types.d.ts +2 -2
- package/lib/typescript/src/types/shared/achCredit.types.d.ts.map +1 -1
- package/lib/typescript/src/types/shared/bookPayment.types.d.ts +2 -2
- package/lib/typescript/src/types/shared/bookPayment.types.d.ts.map +1 -1
- package/lib/typescript/src/types/shared/checkDeposit.types.d.ts +1 -1
- package/lib/typescript/src/types/shared/checkDeposit.types.d.ts.map +1 -1
- package/lib/typescript/src/types/shared/env.types.d.ts +5 -0
- package/lib/typescript/src/types/shared/env.types.d.ts.map +1 -0
- package/lib/typescript/src/types/shared/fundAccountPayment.types.d.ts +38 -0
- package/lib/typescript/src/types/shared/fundAccountPayment.types.d.ts.map +1 -0
- package/lib/typescript/src/types/shared/index.d.ts +3 -0
- package/lib/typescript/src/types/shared/index.d.ts.map +1 -1
- package/lib/typescript/src/types/shared/payeeManagement.types.d.ts +48 -0
- package/lib/typescript/src/types/shared/payeeManagement.types.d.ts.map +1 -0
- package/lib/typescript/src/types/shared/payments.types.d.ts +45 -4
- package/lib/typescript/src/types/shared/payments.types.d.ts.map +1 -1
- package/lib/typescript/src/types/shared/types.d.ts +7 -4
- package/lib/typescript/src/types/shared/types.d.ts.map +1 -1
- package/lib/typescript/src/unitSdkManager/UnitSdk.api.d.ts.map +1 -1
- package/lib/typescript/src/unitSdkManager/UnitSdkManager.d.ts +7 -5
- package/lib/typescript/src/unitSdkManager/UnitSdkManager.d.ts.map +1 -1
- package/lib/typescript/src/unitSdkManager/UnitSdkManager.utils.internal.d.ts +1 -1
- package/lib/typescript/src/unitSdkManager/UnitSdkManager.utils.internal.d.ts.map +1 -1
- package/lib/typescript/src/unitSdkManager/unitHelpersManager/UnitHelpersManager.d.ts +8 -0
- package/lib/typescript/src/unitSdkManager/unitHelpersManager/UnitHelpersManager.d.ts.map +1 -0
- package/lib/typescript/src/utils/windowUnitStore.d.ts +3 -0
- package/lib/typescript/src/utils/windowUnitStore.d.ts.map +1 -0
- package/lib/typescript/src/webComponent/WebComponent.d.ts.map +1 -1
- package/lib/typescript/src/webComponent/WebComponent.utils.d.ts.map +1 -1
- package/lib/typescript/src/webComponent/html.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/components/UNACHCreditComponent/UNACHCreditComponent.tsx +2 -1
- package/src/components/UNACHDebitComponent/UNACHDebitComponent.tsx +2 -1
- package/src/components/UNAccountComponent/UNAccountComponent.tsx +6 -2
- package/src/components/UNBottomSheetComponent/UNBottomSheetComponent.tsx +45 -58
- package/src/components/UNBottomSheetComponent/UNBottomSheetComponent.utils.ts +153 -9
- package/src/components/UNBottomSheetComponent/components/UNBottomSheetNativeComponent/UNBottomSheetNativeComponent.tsx +81 -21
- package/src/components/UNBottomSheetComponent/components/UNBottomSheetSlotComponent/UNBottomSheetSlotComponent.tsx +54 -36
- package/src/components/UNCardComponent/UNCardComponent.tsx +1 -1
- package/src/components/UNFundAccountPaymentComponent/UNFundAccountPaymentComponent.tsx +107 -0
- package/src/components/UNFundAccountPaymentComponent/UNFundAccountPaymentComponent.utils.ts +24 -0
- package/src/components/UNFundAccountPaymentComponent/index.ts +1 -0
- package/src/components/UNPayeeManagementComponent/UNPayeeManagementComponent.tsx +153 -0
- package/src/components/UNPayeeManagementComponent/UNPayeeManagementComponent.utils.ts +87 -0
- package/src/components/UNPayeeManagementComponent/index.ts +1 -0
- package/src/components/UNWhiteLabelAppComponent/UNWhiteLabelAppComponent.tsx +124 -0
- package/src/components/UNWhiteLabelAppComponent/UNWhiteLabelAppComponent.utils.ts +35 -0
- package/src/components/UNWhiteLabelAppComponent/index.ts +1 -0
- package/src/components/index.ts +3 -0
- package/src/index.tsx +1 -1
- package/src/messages/webMessages/fundAccountPaymentMessage.ts +8 -0
- package/src/messages/webMessages/index.ts +8 -0
- package/src/messages/webMessages/onLoadMessage.ts +12 -1
- package/src/messages/webMessages/payeeManagementMessage.ts +26 -0
- package/src/messages/webMessages/plaidMessages.ts +29 -0
- package/src/messages/webMessages/unitMessages.ts +14 -3
- package/src/nativeModulesHelpers/UNStoreManagerHelper/UNStoreManagerHelper.ts +19 -0
- package/src/networking/common/UNNetworkConstants.ts +1 -1
- package/src/networking/requests/UNWalletPayloadRequest.ts +2 -1
- package/src/scripts/html/bodyHtml.ts +1 -1
- package/src/scripts/html/bodyScript.ts +113 -3
- package/src/slices/ConfigurationSlice.ts +1 -2
- package/src/slices/SharedEventsSlice.ts +28 -1
- package/src/types/internal/bottomSheet.types.ts +34 -15
- package/src/types/internal/unitStore.types.ts +6 -0
- package/src/types/internal/webComponent.types.ts +3 -0
- package/src/types/shared/achCredit.types.ts +2 -2
- package/src/types/shared/bookPayment.types.ts +2 -2
- package/src/types/shared/checkDeposit.types.ts +1 -2
- package/src/types/shared/env.types.ts +4 -0
- package/src/types/shared/fundAccountPayment.types.ts +38 -0
- package/src/types/shared/index.ts +3 -0
- package/src/types/shared/payeeManagement.types.ts +49 -0
- package/src/types/shared/payments.types.ts +52 -3
- package/src/types/shared/types.ts +9 -4
- package/src/unitSdkManager/UnitSdk.api.ts +2 -4
- package/src/unitSdkManager/UnitSdk.constants.ts +1 -1
- package/src/unitSdkManager/UnitSdkManager.ts +17 -6
- package/src/unitSdkManager/UnitSdkManager.utils.internal.ts +3 -1
- package/src/unitSdkManager/unitHelpersManager/UnitHelpersManager.ts +31 -0
- package/src/utils/windowUnitStore.ts +5 -0
- package/src/webComponent/WebComponent.tsx +61 -23
- package/src/webComponent/WebComponent.utils.ts +2 -2
- package/src/webComponent/html.ts +15 -1
- package/lib/commonjs/utils/SDKInfo.js +0 -13
- package/lib/commonjs/utils/SDKInfo.js.map +0 -1
- package/lib/module/utils/SDKInfo.js +0 -5
- package/lib/module/utils/SDKInfo.js.map +0 -1
- package/lib/typescript/src/utils/SDKInfo.d.ts +0 -2
- package/lib/typescript/src/utils/SDKInfo.d.ts.map +0 -1
- package/src/utils/SDKInfo.ts +0 -5
|
@@ -4,6 +4,8 @@ import { PageMessage } from '../../messages/webMessages/pageMessage';
|
|
|
4
4
|
import { UnitMessage } from '../../messages/webMessages/unitMessages';
|
|
5
5
|
import { AccountMessage } from '../../messages/webMessages/accountMessage';
|
|
6
6
|
import { ActivityMessage } from '../../messages/webMessages/activityMessage';
|
|
7
|
+
import { PlaidMessage } from '../../messages/webMessages/plaidMessages';
|
|
8
|
+
import { PayeeManagementMessage } from '../../messages/webMessages/payeeManagementMessage';
|
|
7
9
|
|
|
8
10
|
export const POST_MESSAGE_TO_SDK = `
|
|
9
11
|
const postMessageToSDK = (message) => {
|
|
@@ -118,10 +120,10 @@ export const LISTENERS = {
|
|
|
118
120
|
});
|
|
119
121
|
`,
|
|
120
122
|
unitPlaidTokenCreated: `
|
|
121
|
-
window.addEventListener("${
|
|
123
|
+
window.addEventListener("${PlaidMessage.UNIT_PLAID_TOKEN_CREATED}", (e) => {
|
|
122
124
|
const response = e.detail
|
|
123
125
|
response.then((data) => {
|
|
124
|
-
postMessageToSDK({ type: "${
|
|
126
|
+
postMessageToSDK({ type: "${PlaidMessage.UNIT_PLAID_TOKEN_CREATED}", details: { linkToken: data.data }})
|
|
125
127
|
}).catch((e) => {
|
|
126
128
|
console.log(e)
|
|
127
129
|
})
|
|
@@ -142,6 +144,94 @@ export const LISTENERS = {
|
|
|
142
144
|
postMessageToSDK({ type: "${ActivityMessage.UNIT_ACTIVITY_FILTERS_CHANGED}", details: e.detail })
|
|
143
145
|
});
|
|
144
146
|
`,
|
|
147
|
+
unitMultiFactorAuthFinished: `
|
|
148
|
+
window.addEventListener("${UnitMessage.UNIT_MULTI_FACTOR_AUTH_FINISHED}", async (e) => {
|
|
149
|
+
const response = await event.detail.response;
|
|
150
|
+
const data = JSON.stringify({
|
|
151
|
+
token: response.data.attributes.token,
|
|
152
|
+
expiration: new Date().getTime() + response.data.attributes.expiresIn * 1000,
|
|
153
|
+
});
|
|
154
|
+
window.UnitStore["unitVerifiedCustomerToken"] = data;
|
|
155
|
+
|
|
156
|
+
postMessageToSDK({ type: "${UnitMessage.UNIT_MULTI_FACTOR_AUTH_FINISHED}", details: data })
|
|
157
|
+
});
|
|
158
|
+
`,
|
|
159
|
+
unitWhiteLabelAppOnLoad: `
|
|
160
|
+
window.addEventListener("${UnitMessage.UNIT_WHITE_LABEL_APP_ON_LOAD}", async (event) => {
|
|
161
|
+
const response = event.detail;
|
|
162
|
+
response.then((data) => {
|
|
163
|
+
postMessageToSDK({ type: "${UnitMessage.UNIT_WHITE_LABEL_APP_ON_LOAD}", details: data.data })
|
|
164
|
+
}).catch((e) => {
|
|
165
|
+
console.log(e)
|
|
166
|
+
})
|
|
167
|
+
});
|
|
168
|
+
`,
|
|
169
|
+
unitUnauthorizedToken: `
|
|
170
|
+
window.addEventListener("${UnitMessage.UNIT_UNAUTHORIZED_TOKEN}", (e) => {
|
|
171
|
+
postMessageToSDK({ type: "${UnitMessage.UNIT_UNAUTHORIZED_TOKEN}", details: "Clean the current user tokens" })
|
|
172
|
+
});
|
|
173
|
+
`,
|
|
174
|
+
unitConnectedAccountCreated: `
|
|
175
|
+
window.addEventListener("${PayeeManagementMessage.UNIT_CONNECTED_ACCOUNT_CREATED}", (e) => {
|
|
176
|
+
const response = e.detail;
|
|
177
|
+
response.then((data) => {
|
|
178
|
+
postMessageToSDK({ type: "${PayeeManagementMessage.UNIT_CONNECTED_ACCOUNT_CREATED}", details: { account: data.data }})
|
|
179
|
+
}).catch((e) => {
|
|
180
|
+
console.log(e)
|
|
181
|
+
})
|
|
182
|
+
});
|
|
183
|
+
`,
|
|
184
|
+
unitCounterpartyCreated: `
|
|
185
|
+
window.addEventListener("${PayeeManagementMessage.UNIT_COUNTERPARTY_CREATED}", (e) => {
|
|
186
|
+
const response = e.detail;
|
|
187
|
+
response.then((data) => {
|
|
188
|
+
postMessageToSDK({ type: "${PayeeManagementMessage.UNIT_COUNTERPARTY_CREATED}", details: { counterparty: data.data }})
|
|
189
|
+
}).catch((e) => {
|
|
190
|
+
console.log(e)
|
|
191
|
+
})
|
|
192
|
+
});
|
|
193
|
+
`,
|
|
194
|
+
unitCounterpartyDeleted: `
|
|
195
|
+
window.addEventListener("${PayeeManagementMessage.UNIT_COUNTERPARTY_DELETED}", (e) => {
|
|
196
|
+
const response = e.detail;
|
|
197
|
+
response.then((data) => {
|
|
198
|
+
postMessageToSDK({ type: "${PayeeManagementMessage.UNIT_COUNTERPARTY_DELETED}", details: { counterparty: data.data }})
|
|
199
|
+
}).catch((e) => {
|
|
200
|
+
console.log(e)
|
|
201
|
+
})
|
|
202
|
+
});
|
|
203
|
+
`,
|
|
204
|
+
unitMicroDepositConnectionCreated: `
|
|
205
|
+
window.addEventListener("${PayeeManagementMessage.UNIT_MICRO_DEPOSIT_CONNECTION_CREATED}", (e) => {
|
|
206
|
+
const response = e.detail;
|
|
207
|
+
response.then((data) => {
|
|
208
|
+
postMessageToSDK({ type: "${PayeeManagementMessage.UNIT_MICRO_DEPOSIT_CONNECTION_CREATED}", details: { account : data.data }})
|
|
209
|
+
}).catch((e) => {
|
|
210
|
+
console.log(e)
|
|
211
|
+
})
|
|
212
|
+
});
|
|
213
|
+
`,
|
|
214
|
+
unitMicroDepositConnectionRejected: `
|
|
215
|
+
window.addEventListener("${PayeeManagementMessage.UNIT_MICRO_DEPOSIT_CONNECTION_REJECTED}", (e) => {
|
|
216
|
+
const response = e.detail;
|
|
217
|
+
response.then((data) => {
|
|
218
|
+
postMessageToSDK({ type: "${PayeeManagementMessage.UNIT_MICRO_DEPOSIT_CONNECTION_REJECTED}", details: { account : data.data }})
|
|
219
|
+
}).catch((e) => {
|
|
220
|
+
console.log(e)
|
|
221
|
+
})
|
|
222
|
+
});
|
|
223
|
+
`,
|
|
224
|
+
|
|
225
|
+
unitOpenPlaid: `
|
|
226
|
+
window.addEventListener("${PlaidMessage.UNIT_OPEN_PLAID}", async (e) => {
|
|
227
|
+
const response = event.detail;
|
|
228
|
+
response.then((data) => {
|
|
229
|
+
postMessageToSDK({ type: "${PlaidMessage.UNIT_OPEN_PLAID}", details: data.data })
|
|
230
|
+
}).catch((e) => {
|
|
231
|
+
console.log(e)
|
|
232
|
+
})
|
|
233
|
+
});
|
|
234
|
+
`
|
|
145
235
|
};
|
|
146
236
|
|
|
147
237
|
export const DISPATCH_RENDERING_EVENT = `
|
|
@@ -164,6 +254,12 @@ export const DISPATCH_REQUEST_REFRESH = `
|
|
|
164
254
|
}
|
|
165
255
|
`;
|
|
166
256
|
|
|
257
|
+
export const SET_ITEM_IN_WINDOW_UNIT_STORE = `
|
|
258
|
+
const setItemInWindowUnitStore = (key, value) => {
|
|
259
|
+
window.UnitStore[key] = value;
|
|
260
|
+
}
|
|
261
|
+
`;
|
|
262
|
+
|
|
167
263
|
export const DISPATCH_ACTIVITY_FILTER_CHANGED_EVENT = `
|
|
168
264
|
const dispatchActivityFilterChangedEvent = (details) => {
|
|
169
265
|
const event = new CustomEvent("unitActivityFiltersChanged",{ detail: details});
|
|
@@ -173,7 +269,21 @@ export const DISPATCH_ACTIVITY_FILTER_CHANGED_EVENT = `
|
|
|
173
269
|
|
|
174
270
|
export const DISPATCH_PLAID_RESPONSE = `
|
|
175
271
|
const dispatchPlaidEvent = (details) => {
|
|
176
|
-
const event = new CustomEvent("${
|
|
272
|
+
const event = new CustomEvent("${PlaidMessage.UNIT_PLAID_RESPONSE}",{ detail: details })
|
|
273
|
+
window.dispatchEvent(event)
|
|
274
|
+
}
|
|
275
|
+
`;
|
|
276
|
+
|
|
277
|
+
export const DISPATCH_PLAID_EXIT = `
|
|
278
|
+
const dispatchPlaidExit = (details) => {
|
|
279
|
+
const event = new CustomEvent("${PlaidMessage.UNIT_PLAID_EXIT}",{ detail: details })
|
|
280
|
+
window.dispatchEvent(event)
|
|
281
|
+
}
|
|
282
|
+
`;
|
|
283
|
+
|
|
284
|
+
export const DISPATCH_OPEN_PLAID = `
|
|
285
|
+
const dispatchOpenPlaidEvent = (details) => {
|
|
286
|
+
const event = new CustomEvent("${PlaidMessage.UNIT_OPEN_PLAID}",{ detail: details })
|
|
177
287
|
window.dispatchEvent(event)
|
|
178
288
|
}
|
|
179
289
|
`;
|
|
@@ -21,9 +21,8 @@ const ConfigurationSlice = createSlice({
|
|
|
21
21
|
},
|
|
22
22
|
setLanguage(state, action: PayloadAction<string | undefined>) {
|
|
23
23
|
state.language = action.payload;
|
|
24
|
-
}
|
|
24
|
+
}
|
|
25
25
|
},
|
|
26
|
-
|
|
27
26
|
});
|
|
28
27
|
|
|
29
28
|
export const { setUnitScript, setLanguage, setTheme } = ConfigurationSlice.actions;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { createSlice, PayloadAction } from '@reduxjs/toolkit';
|
|
4
4
|
import type { RootState } from '../store';
|
|
5
|
-
import type { UNAccountData, UNCardData } from '../types/shared';
|
|
5
|
+
import type { UNAccountData, UNCardData, UNPayeeCounterparty } from '../types/shared';
|
|
6
6
|
import type { ActivityFiltersChangedEvent } from '../messages/webMessages/activityMessage';
|
|
7
7
|
import type { RequestRefreshEvent } from '../messages/webMessages/unitMessages';
|
|
8
8
|
import type { BottomSheetNativeMessage } from '../messages/nativeMessages/bottomSheetMessage';
|
|
@@ -12,6 +12,9 @@ import type { ActivityMessage } from '../messages/webMessages/activityMessage';
|
|
|
12
12
|
import type { UnitMessage } from '../messages/webMessages/unitMessages';
|
|
13
13
|
import type { MultipleCardsMessage } from '../messages/webMessages/multipleCardsMessage';
|
|
14
14
|
import { BottomSheetRenderingMessage } from '../messages/nativeMessages/bottomSheetMessage';
|
|
15
|
+
import { PageMessage } from '../messages/webMessages/pageMessage';
|
|
16
|
+
import { OpenPlaidEvent, PlaidMessage } from '../messages/webMessages/plaidMessages';
|
|
17
|
+
import { PayeeManagementMessage } from '../messages/webMessages/payeeManagementMessage';
|
|
15
18
|
|
|
16
19
|
type EmptyObj = Record<PropertyKey, never>;
|
|
17
20
|
|
|
@@ -55,6 +58,26 @@ type RequestRefreshEventState = {
|
|
|
55
58
|
data: RequestRefreshEvent
|
|
56
59
|
}
|
|
57
60
|
|
|
61
|
+
type MultiFactorAuthFinishedEventState = {
|
|
62
|
+
key: UnitMessage.UNIT_MULTI_FACTOR_AUTH_FINISHED,
|
|
63
|
+
data: string
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
type ComponentHeightEventState = {
|
|
67
|
+
key: PageMessage.PAGE_HEIGHT
|
|
68
|
+
data: number | string
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
type OpenPlaidEventState = {
|
|
72
|
+
key: PlaidMessage.UNIT_OPEN_PLAID,
|
|
73
|
+
data: OpenPlaidEvent
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
type PayeeCounterpartyDeletedEventState = {
|
|
77
|
+
key: PayeeManagementMessage.UNIT_COUNTERPARTY_DELETED,
|
|
78
|
+
data: UNPayeeCounterparty
|
|
79
|
+
}
|
|
80
|
+
|
|
58
81
|
//currently left state suffixes to avoid the duplication of the event names
|
|
59
82
|
type SharedEvent =
|
|
60
83
|
| CardStatusChangedEventState
|
|
@@ -65,6 +88,10 @@ type SharedEvent =
|
|
|
65
88
|
| RequestCloseBottomSheetFlowEventState
|
|
66
89
|
| RequestRenderingBottomSheetEventState
|
|
67
90
|
| RequestRefreshEventState
|
|
91
|
+
| MultiFactorAuthFinishedEventState
|
|
92
|
+
| OpenPlaidEventState
|
|
93
|
+
| ComponentHeightEventState
|
|
94
|
+
| PayeeCounterpartyDeletedEventState
|
|
68
95
|
|
|
69
96
|
type SharedEventsState = {
|
|
70
97
|
event?: SharedEvent
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
import type { RequestRenderingEvent } from '../../messages/webMessages/unitMessages';
|
|
2
|
-
import type {
|
|
2
|
+
import type { WebComponentType } from './webComponent.types';
|
|
3
3
|
import {
|
|
4
4
|
UNAddToWalletComponentProps,
|
|
5
5
|
} from '../../nativeComponents/UNAddToWallet/UNAddToWalletComponent/UNAddToWalletComponent';
|
|
6
|
+
import { UNACHCreditComponentProps } from '../../components/UNACHCreditComponent';
|
|
7
|
+
import { UNACHDebitComponentProps } from '../../components/UNACHDebitComponent';
|
|
8
|
+
import { UNCheckDepositComponentProps } from '../../components/UNCheckDepositComponent';
|
|
9
|
+
import { UNBookPaymentComponentProps } from '../../components/UNBookPaymentComponent';
|
|
6
10
|
|
|
7
11
|
export enum BottomSheetNativePlaceType {
|
|
8
12
|
overFullScreen = 'overFullScreen',
|
|
9
13
|
modal = 'modal',
|
|
10
14
|
menu = 'menu',
|
|
15
|
+
contentHeight = 'contentHeight'
|
|
11
16
|
}
|
|
12
17
|
|
|
13
18
|
export enum ScrollState {
|
|
@@ -40,6 +45,10 @@ export enum BottomSheetRenderingType {
|
|
|
40
45
|
|
|
41
46
|
export enum BottomSheetNativeComponentType {
|
|
42
47
|
AddToWalletComponent = 'UNAddToWalletComponent',
|
|
48
|
+
ACHCreditComponent = 'UNACHCreditComponent',
|
|
49
|
+
ACHDebitComponent = 'UNACHDebitComponent',
|
|
50
|
+
CheckDepositComponent = 'UNCheckDepositComponent',
|
|
51
|
+
BookPaymentComponent = 'UNBookPaymentComponent'
|
|
43
52
|
}
|
|
44
53
|
|
|
45
54
|
export type BottomSheetNativeAddToWalletComponentType = {
|
|
@@ -47,7 +56,31 @@ export type BottomSheetNativeAddToWalletComponentType = {
|
|
|
47
56
|
props: UNAddToWalletComponentProps
|
|
48
57
|
}
|
|
49
58
|
|
|
59
|
+
export type BottomSheetNativeACHCreditComponentType = {
|
|
60
|
+
type: BottomSheetNativeComponentType.ACHCreditComponent,
|
|
61
|
+
props: UNACHCreditComponentProps
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export type BottomSheetNativeACHDebitComponentType = {
|
|
65
|
+
type: BottomSheetNativeComponentType.ACHDebitComponent,
|
|
66
|
+
props: UNACHDebitComponentProps
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export type BottomSheetNativeCheckDepositComponentType = {
|
|
70
|
+
type: BottomSheetNativeComponentType.CheckDepositComponent,
|
|
71
|
+
props: UNCheckDepositComponentProps
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export type BottomSheetNativeBookPaymentComponentType = {
|
|
75
|
+
type: BottomSheetNativeComponentType.BookPaymentComponent,
|
|
76
|
+
props: UNBookPaymentComponentProps
|
|
77
|
+
}
|
|
78
|
+
|
|
50
79
|
export type BottomSheetNativeComponent = BottomSheetNativeAddToWalletComponentType
|
|
80
|
+
| BottomSheetNativeACHCreditComponentType
|
|
81
|
+
| BottomSheetNativeACHDebitComponentType
|
|
82
|
+
| BottomSheetNativeCheckDepositComponentType
|
|
83
|
+
| BottomSheetNativeBookPaymentComponentType
|
|
51
84
|
|
|
52
85
|
export type BottomSheetSlotData = {
|
|
53
86
|
// The data that rendered by the web view
|
|
@@ -56,20 +89,6 @@ export type BottomSheetSlotData = {
|
|
|
56
89
|
requestRenderingEvent: RequestRenderingEvent
|
|
57
90
|
}
|
|
58
91
|
|
|
59
|
-
export type BottomSheetComponentData = {
|
|
60
|
-
componentName?: WebComponentType,
|
|
61
|
-
componentResourceId?: string,
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export type WebComponentData = {
|
|
65
|
-
type: WebComponentType;
|
|
66
|
-
presentationMode?: PresentationMode,
|
|
67
|
-
params?: string;
|
|
68
|
-
theme?: string;
|
|
69
|
-
language?: string;
|
|
70
|
-
windowParams?: string;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
92
|
export type NativeComponentData = {
|
|
74
93
|
component: BottomSheetNativeComponent,
|
|
75
94
|
scrollState?: ScrollState,
|
|
@@ -5,12 +5,15 @@ export enum WebComponentType {
|
|
|
5
5
|
activity = 'unit-elements-activity',
|
|
6
6
|
slot = 'unit-elements-sdk-slot',
|
|
7
7
|
account = 'unit-elements-account',
|
|
8
|
+
fundAccountPayment = 'unit-elements-fund-account-payment',
|
|
8
9
|
checkDeposit = 'unit-elements-check-deposit',
|
|
9
10
|
achDebitPayment = 'unit-elements-ach-debit-payment',
|
|
10
11
|
achCreditPayment = 'unit-elements-ach-credit-payment',
|
|
11
12
|
cardAction = 'unit-elements-card-action',
|
|
12
13
|
programDetails = 'unit-elements-program-details',
|
|
13
14
|
nextRepayment = 'unit-elements-next-repayment',
|
|
15
|
+
payeeManagement = 'unit-elements-payee-management',
|
|
16
|
+
whiteLabelApp = 'unit-elements-white-label-app',
|
|
14
17
|
}
|
|
15
18
|
|
|
16
19
|
export enum PresentationMode {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { RESPONSE_KEYS } from '../../messages/webMessages/onLoadMessage';
|
|
2
2
|
import type { UNAccountData, UNCounterpartyAccountData } from './account.types';
|
|
3
|
-
import type { UNAchCounterparty, UNCounterpartyVerificationMethod, UNPaymentStatus } from './payments.types';
|
|
3
|
+
import type { UNPaymentType, UNAchCounterparty, UNCounterpartyVerificationMethod, UNPaymentStatus } from './payments.types';
|
|
4
4
|
import type { UNTags, UNRelationship } from './types';
|
|
5
5
|
|
|
6
6
|
export type UNACHOnLoadData = {
|
|
@@ -9,7 +9,7 @@ export type UNACHOnLoadData = {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
export type UNACHData = {
|
|
12
|
-
type:
|
|
12
|
+
type: UNPaymentType.AchPayment,
|
|
13
13
|
id: string,
|
|
14
14
|
attributes: {
|
|
15
15
|
createdAt: string | Date,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { UNPaymentStatus } from './payments.types';
|
|
1
|
+
import type { UNPaymentStatus, UNPaymentType } from './payments.types';
|
|
2
2
|
import type { UNTags, UNRelationship } from './types';
|
|
3
3
|
|
|
4
4
|
export type UNBookPaymentData = {
|
|
5
|
-
type:
|
|
5
|
+
type: UNPaymentType.BookPayment,
|
|
6
6
|
id: string,
|
|
7
7
|
attributes: {
|
|
8
8
|
createdAt: string | Date,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { UNRelationship } from './types';
|
|
2
|
+
import type { Cents } from './payments.types';
|
|
2
3
|
|
|
3
4
|
export type UNCheckDepositData = {
|
|
4
5
|
id: string
|
|
@@ -41,8 +42,6 @@ export enum UNCheckDepositStatus {
|
|
|
41
42
|
Returned = 'Returned',
|
|
42
43
|
}
|
|
43
44
|
|
|
44
|
-
export type Cents = number
|
|
45
|
-
|
|
46
45
|
export type UNCheckCounterparty = {
|
|
47
46
|
name: string
|
|
48
47
|
accountNumber: string
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { UNCardData } from './card.types';
|
|
2
|
+
import { UNPaymentType, Cents, UNPaymentStatus, UNAstraExternalCardData } from './payments.types';
|
|
3
|
+
import { UNDirection, UNRelationshipData } from './types';
|
|
4
|
+
|
|
5
|
+
export type UNFundAccountPaymentOnLoadData = [UNAstraExternalCardData] | [UNCardData]
|
|
6
|
+
|
|
7
|
+
export type UNFundAccountPaymentData = {
|
|
8
|
+
type: UNPaymentType.CardToCardPayment
|
|
9
|
+
id: string
|
|
10
|
+
attributes: {
|
|
11
|
+
createdAt: Date
|
|
12
|
+
amount: Cents
|
|
13
|
+
direction: UNDirection
|
|
14
|
+
description: string
|
|
15
|
+
status: UNPaymentStatus
|
|
16
|
+
reason?: string
|
|
17
|
+
tags?: {[key: string]: string}
|
|
18
|
+
astraRoutineId: string
|
|
19
|
+
}
|
|
20
|
+
relationships: {
|
|
21
|
+
account: {
|
|
22
|
+
data: UNRelationshipData
|
|
23
|
+
}
|
|
24
|
+
customer?: {
|
|
25
|
+
data: UNRelationshipData
|
|
26
|
+
}
|
|
27
|
+
customers?: {
|
|
28
|
+
data: [UNRelationshipData]
|
|
29
|
+
}
|
|
30
|
+
transaction?: {
|
|
31
|
+
data: [UNRelationshipData]
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
card: {
|
|
35
|
+
data: UNRelationshipData
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -10,3 +10,6 @@ export * from './fonts.types';
|
|
|
10
10
|
export * from './error.types';
|
|
11
11
|
export * from './versioning.types';
|
|
12
12
|
export * from './multipleCards.types';
|
|
13
|
+
export * from './fundAccountPayment.types';
|
|
14
|
+
export * from './payeeManagement.types';
|
|
15
|
+
export * from './env.types';
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { UNConnectedAccountStatus, UNConnectionAccountType, UNCounterpartyAccountType, UNCounterpartyPermission, UNCounterpartyType } from './payments.types';
|
|
2
|
+
|
|
3
|
+
export type UNPayeeConnectedAccount = {
|
|
4
|
+
type: 'plaidConnectedAccount'
|
|
5
|
+
id: string
|
|
6
|
+
attributes: {
|
|
7
|
+
mask: string
|
|
8
|
+
name: string
|
|
9
|
+
type: string
|
|
10
|
+
subType: string
|
|
11
|
+
createdAt: string
|
|
12
|
+
updatedAt: string
|
|
13
|
+
status: UNConnectedAccountStatus
|
|
14
|
+
connectionType: UNConnectionAccountType
|
|
15
|
+
}
|
|
16
|
+
relationships: {
|
|
17
|
+
customer: {
|
|
18
|
+
data: {
|
|
19
|
+
type: 'customer'
|
|
20
|
+
id: number
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export type UNPayeeCounterparty = {
|
|
27
|
+
id: string,
|
|
28
|
+
type: string,
|
|
29
|
+
attributes: {
|
|
30
|
+
name: string
|
|
31
|
+
bank?: string
|
|
32
|
+
routingNumber: string
|
|
33
|
+
accountNumber: string
|
|
34
|
+
accountType: UNCounterpartyAccountType
|
|
35
|
+
type: UNCounterpartyType
|
|
36
|
+
permissions: UNCounterpartyPermission
|
|
37
|
+
tags?: {[key: string]: string}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export enum UNPayeeManagementMenuItem {
|
|
42
|
+
sendFunds = 'sendFunds',
|
|
43
|
+
delete = 'delete'
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export enum UNPayeeManagementComponentPaginationType {
|
|
47
|
+
infiniteScroll = 'infiniteScroll',
|
|
48
|
+
pagination = 'pagination'
|
|
49
|
+
}
|
|
@@ -1,14 +1,38 @@
|
|
|
1
|
-
export
|
|
1
|
+
export enum UNPaymentType {
|
|
2
|
+
AchPayment = 'achPayment',
|
|
3
|
+
BookPayment = 'bookPayment',
|
|
4
|
+
CardToCardPayment = 'cardToCardPayment',
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export type UNPaymentStatus = 'Sent' | 'Rejected' | 'Pending' | 'Clearing' | 'Canceled' | 'Returned' | 'PendingReview'
|
|
2
8
|
|
|
3
9
|
export type UNAchCounterparty = {
|
|
4
10
|
name: string
|
|
5
11
|
accountNumber: string
|
|
6
12
|
routingNumber: string
|
|
7
|
-
accountType:
|
|
13
|
+
accountType: UNCounterpartyAccountType
|
|
8
14
|
}
|
|
9
15
|
|
|
10
|
-
type
|
|
16
|
+
export type UNCounterpartyAccountType = 'Savings' | 'Checking'
|
|
17
|
+
|
|
18
|
+
export enum UNCounterpartyType {
|
|
19
|
+
Business = 'Business',
|
|
20
|
+
Person = 'Person',
|
|
21
|
+
Unknown = 'Unknown',
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export type UNCounterpartyPermission = 'CreditOnly' | 'CreditAndDebit' | 'DebitOnly'
|
|
25
|
+
|
|
26
|
+
export enum UNConnectedAccountStatus {
|
|
27
|
+
Pending = 'Pending',
|
|
28
|
+
Failed = 'Failed',
|
|
29
|
+
Verified = 'Verified',
|
|
30
|
+
}
|
|
11
31
|
|
|
32
|
+
export enum UNConnectionAccountType {
|
|
33
|
+
SameDayMicroDeposit = 'SameDayMicroDeposit',
|
|
34
|
+
Instant = 'Instant',
|
|
35
|
+
}
|
|
12
36
|
export enum UNPlaidAccountFilter {
|
|
13
37
|
checking = 'checking',
|
|
14
38
|
savings = 'savings',
|
|
@@ -17,3 +41,28 @@ export enum UNPlaidAccountFilter {
|
|
|
17
41
|
export enum UNCounterpartyVerificationMethod {
|
|
18
42
|
Plaid = 'Plaid',
|
|
19
43
|
}
|
|
44
|
+
|
|
45
|
+
export enum UNCardNetwork {
|
|
46
|
+
Visa = 'Visa',
|
|
47
|
+
Diners = 'Diners',
|
|
48
|
+
Maestro = 'Maestro',
|
|
49
|
+
Generic = 'Generic',
|
|
50
|
+
Discover = 'Discover',
|
|
51
|
+
MasterCard = 'MasterCard',
|
|
52
|
+
AmericanExpress = 'AmericanExpress',
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface UNAstraExternalCardData {
|
|
56
|
+
type: 'astraExternalCard'
|
|
57
|
+
id: string
|
|
58
|
+
attributes: {
|
|
59
|
+
last4Digits: string
|
|
60
|
+
cardNetwork: UNCardNetwork
|
|
61
|
+
fullName: {
|
|
62
|
+
first: string
|
|
63
|
+
last: string
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export type Cents = number
|
|
@@ -14,17 +14,17 @@ export type UNLimits = {
|
|
|
14
14
|
monthlyPurchase?: string | number,
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
type
|
|
17
|
+
export type UNRelationshipData = {
|
|
18
18
|
type: string,
|
|
19
|
-
id: string
|
|
19
|
+
id: number | string
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
export type UNRelationship = {
|
|
23
23
|
data:
|
|
24
24
|
| null
|
|
25
25
|
| []
|
|
26
|
-
|
|
|
27
|
-
|
|
|
26
|
+
| UNRelationshipData
|
|
27
|
+
| UNRelationshipData[]
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
export type UNFullName = {
|
|
@@ -32,4 +32,9 @@ export type UNFullName = {
|
|
|
32
32
|
last: string
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
+
export enum UNDirection {
|
|
36
|
+
Debit = 'Debit',
|
|
37
|
+
Credit = 'Credit',
|
|
38
|
+
}
|
|
39
|
+
|
|
35
40
|
export type UNTags = Record<string, string> // TODO: specify Tag type
|
|
@@ -2,16 +2,14 @@ import { UnitSDK } from './UnitSdkManager';
|
|
|
2
2
|
|
|
3
3
|
import { getUnitScriptUrl } from './UnitSdkManager.utils.internal';
|
|
4
4
|
import { store } from '../store/store';
|
|
5
|
-
import { setUnitScript
|
|
5
|
+
import { setUnitScript } from '../slices/ConfigurationSlice';
|
|
6
6
|
|
|
7
7
|
let isLoadingScript = false;
|
|
8
8
|
|
|
9
9
|
export const fetchUnitScript = async () => {
|
|
10
|
-
const configurationState = selectConfiguration(store.getState());
|
|
11
|
-
const globalUnitScript = configurationState.unitScript;
|
|
12
10
|
const env = UnitSDK.getEnv();
|
|
13
11
|
const webVersioningStrategy = UnitSDK.getWebVersioningStrategy();
|
|
14
|
-
if (isLoadingScript ||
|
|
12
|
+
if (isLoadingScript || !env) {
|
|
15
13
|
// init function is called and success OR in progress
|
|
16
14
|
return null;
|
|
17
15
|
}
|
|
@@ -3,7 +3,7 @@ import { UNVersioningStrategyType, UNWebVersioningStrategy } from '../types/shar
|
|
|
3
3
|
const WEB_SDK_RECOMMENDED_STRATEGY: UNWebVersioningStrategy = {
|
|
4
4
|
type: UNVersioningStrategyType.upToNextMinor,
|
|
5
5
|
major: 1,
|
|
6
|
-
minor:
|
|
6
|
+
minor: 8,
|
|
7
7
|
};
|
|
8
8
|
|
|
9
9
|
export const UNSDKConstants = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { NativeModules } from 'react-native';
|
|
2
2
|
import { fetchUnitScript } from './UnitSdk.api';
|
|
3
3
|
import { UnitUiManager } from './unitUiManager/unitUiManager';
|
|
4
4
|
import type { UNFonts } from '../types/shared/fonts.types';
|
|
@@ -7,20 +7,21 @@ import { UNSDKConstants } from './UnitSdk.constants';
|
|
|
7
7
|
import type { UNWebVersioningStrategy } from '../types/shared';
|
|
8
8
|
import { setTheme, setLanguage } from '../slices/ConfigurationSlice';
|
|
9
9
|
import { store } from '../store/store';
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
10
|
+
import { UNEnvironment } from '../types/shared/env.types';
|
|
11
|
+
import { UserDataKeys } from '../types/internal/unitStore.types';
|
|
12
|
+
import UNStoreManagerHelper from '../nativeModulesHelpers/UNStoreManagerHelper/UNStoreManagerHelper';
|
|
13
|
+
import { UnitHelpersManager } from './unitHelpersManager/UnitHelpersManager';
|
|
15
14
|
|
|
16
15
|
export class UnitSDK {
|
|
17
16
|
public static ui: UnitUiManager;
|
|
17
|
+
public static helpers: UnitHelpersManager;
|
|
18
18
|
protected static env?: UNEnvironment;
|
|
19
19
|
protected static webVersioningStrategy: UNWebVersioningStrategy;
|
|
20
20
|
protected static customerToken?: string;
|
|
21
21
|
protected static fonts?: UNFonts;
|
|
22
22
|
protected static signedNonce?: string;
|
|
23
23
|
protected static pushProvisionModule?: typeof NativeModules;
|
|
24
|
+
protected static sdkVersion = '1.13.0';
|
|
24
25
|
|
|
25
26
|
public static init = async (env: UNEnvironment, theme?: string, language?: string, fonts?: UNFonts, webVersioningStrategy: UNWebVersioningStrategy = UNSDKConstants.webSDKRecommendedStrategy) => {
|
|
26
27
|
try {
|
|
@@ -30,6 +31,7 @@ export class UnitSDK {
|
|
|
30
31
|
store.dispatch(setTheme(theme));
|
|
31
32
|
store.dispatch(setLanguage(language));
|
|
32
33
|
this.ui = new UnitUiManager();
|
|
34
|
+
this.helpers = new UnitHelpersManager();
|
|
33
35
|
warnClientIfNeeded(this.webVersioningStrategy);
|
|
34
36
|
await fetchUnitScript();
|
|
35
37
|
} catch (e) {
|
|
@@ -79,4 +81,13 @@ export class UnitSDK {
|
|
|
79
81
|
return this.customerToken;
|
|
80
82
|
};
|
|
81
83
|
|
|
84
|
+
public static getSdkVersion = () => {
|
|
85
|
+
return this.sdkVersion;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
public static cleanUserData = () => {
|
|
89
|
+
UNStoreManagerHelper.cleanValue(UserDataKeys.unitCustomerToken);
|
|
90
|
+
UNStoreManagerHelper.cleanValue(UserDataKeys.unitVerifiedToken);
|
|
91
|
+
};
|
|
92
|
+
|
|
82
93
|
}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import type { UNWebVersioningStrategy } from '../types/shared';
|
|
2
|
+
import { UNEnvironment } from '../types/shared/env.types';
|
|
2
3
|
import { getWebSdkVersionString } from '../utils/webVersioningStrategy.utils';
|
|
3
|
-
import { UNEnvironment } from './UnitSdkManager';
|
|
4
4
|
|
|
5
5
|
export const getUnitScriptUrl = (env: UNEnvironment, webVersioningStrategy: UNWebVersioningStrategy) => {
|
|
6
6
|
const webSdkVersionString = getWebSdkVersionString(webVersioningStrategy);
|
|
7
|
+
|
|
7
8
|
switch (env) {
|
|
8
9
|
case UNEnvironment.sandbox:
|
|
9
10
|
return `https://ui.s.unit.sh/release/${webSdkVersionString}/components.js`;
|
|
11
|
+
|
|
10
12
|
case UNEnvironment.production:
|
|
11
13
|
return `https://ui.unit.co/release/${webSdkVersionString}/components.js`;
|
|
12
14
|
}
|