@tap-payments/auth-jsconnect 2.7.4-test → 2.7.5
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/build/@types/app.d.ts +45 -3
- package/build/@types/app.js +16 -0
- package/build/@types/config.d.ts +19 -0
- package/build/@types/form.d.ts +11 -1
- package/build/@types/redux.d.ts +1 -0
- package/build/api/account.d.ts +5 -0
- package/build/api/account.js +16 -2
- package/build/api/auth.d.ts +35 -20
- package/build/api/auth.js +1 -1
- package/build/api/axios.js +1 -2
- package/build/api/data.d.ts +4 -17
- package/build/api/data.js +5 -45
- package/build/api/entity.d.ts +5 -2
- package/build/api/entity.js +12 -4
- package/build/api/firebase.js +68 -8
- package/build/api/index.d.ts +14 -25
- package/build/api/lead.d.ts +16 -3
- package/build/api/lead.js +16 -0
- package/build/api/user.d.ts +7 -0
- package/build/api/user.js +9 -1
- package/build/app/rootReducer.d.ts +1 -0
- package/build/app/rootReducer.js +3 -1
- package/build/app/settings.d.ts +2 -1
- package/build/app/settings.js +51 -21
- package/build/app/store.d.ts +2 -0
- package/build/assets/locales/ar.json +353 -151
- package/build/assets/locales/en.json +349 -150
- package/build/components/AnimationFlow/AnimationFlow.d.ts +9 -5
- package/build/components/AnimationFlow/AnimationFlow.js +5 -5
- package/build/components/AnimationFlow/BottomSheet.d.ts +5 -2
- package/build/components/AnimationFlow/BottomSheet.js +43 -14
- package/build/components/AnimationFlow/Dialog.d.ts +4 -3
- package/build/components/AnimationFlow/Dialog.js +5 -3
- package/build/components/ArabicDatePicker/ArabicDatePicker.d.ts +1 -1
- package/build/components/ArabicDatePicker/ArabicDatePicker.js +2 -2
- package/build/components/ArabicDatePicker/style.css +32 -3
- package/build/components/DatePicker/DatePicker.d.ts +1 -1
- package/build/components/DatePicker/DatePicker.js +2 -2
- package/build/components/Footer/Footer.js +2 -1
- package/build/components/Input/Input.js +1 -1
- package/build/components/Providers/ThemeProvider.js +3 -3
- package/build/components/Tooltip/Tooltip.js +1 -1
- package/build/constants/api.d.ts +5 -7
- package/build/constants/api.js +11 -15
- package/build/constants/app.d.ts +39 -0
- package/build/constants/app.js +345 -35
- package/build/constants/assets.d.ts +3 -0
- package/build/constants/assets.js +4 -1
- package/build/constants/dummy.d.ts +4 -219
- package/build/constants/dummy.js +64 -6194
- package/build/constants/flows.d.ts +26 -0
- package/build/constants/flows.js +27 -0
- package/build/constants/index.d.ts +1 -0
- package/build/constants/index.js +1 -0
- package/build/constants/validation.d.ts +2 -0
- package/build/constants/validation.js +2 -0
- package/build/features/app/auth/authStore.d.ts +74 -8
- package/build/features/app/auth/authStore.js +496 -148
- package/build/features/app/bank/bankStore.d.ts +13 -18
- package/build/features/app/bank/bankStore.js +186 -153
- package/build/features/app/board/boardStore.d.ts +5 -1
- package/build/features/app/board/boardStore.js +82 -51
- package/build/features/app/brand/brandStore.d.ts +17 -33
- package/build/features/app/brand/brandStore.js +254 -257
- package/build/features/app/business/businessStore.d.ts +64 -15
- package/build/features/app/business/businessStore.js +442 -234
- package/build/features/app/connect/connectStore.d.ts +69 -14
- package/build/features/app/connect/connectStore.js +355 -120
- package/build/features/app/connectExpress/connectExpressStore.d.ts +89 -41
- package/build/features/app/connectExpress/connectExpressStore.js +671 -367
- package/build/features/app/entity/entityStore.d.ts +20 -36
- package/build/features/app/entity/entityStore.js +204 -238
- package/build/features/app/individual/individualStore.d.ts +18 -34
- package/build/features/app/individual/individualStore.js +269 -292
- package/build/features/app/kyc/kycStore.d.ts +121 -0
- package/build/features/app/kyc/kycStore.js +432 -0
- package/build/features/app/password/passwordStore.d.ts +42 -18
- package/build/features/app/password/passwordStore.js +260 -219
- package/build/features/app/signIn/signInStore.js +19 -15
- package/build/features/app/tax/taxStore.d.ts +13 -7
- package/build/features/app/tax/taxStore.js +170 -136
- package/build/features/auth/Auth.d.ts +5 -6
- package/build/features/auth/Auth.js +40 -15
- package/build/features/auth/screens/AccountNotFound/AccountNotFound.js +2 -5
- package/build/features/auth/screens/AuthSwitch/AuthSwitch.d.ts +5 -0
- package/build/features/auth/screens/AuthSwitch/AuthSwitch.js +58 -0
- package/build/features/auth/screens/AuthSwitch/index.d.ts +3 -0
- package/build/features/auth/screens/AuthSwitch/index.js +2 -0
- package/build/features/auth/screens/AuthenticationList/AuthenticationList.js +2 -8
- package/build/features/auth/screens/AuthenticationList/EntityLicenseType.d.ts +4 -26
- package/build/features/auth/screens/AuthenticationList/LicenseNumber.js +2 -2
- package/build/features/auth/screens/BusinessCountry/BusinessCountry.js +8 -2
- package/build/features/auth/screens/CivilID/CivilID.js +4 -35
- package/build/features/auth/screens/{NID → DOB}/DOB.js +3 -3
- package/build/features/auth/screens/DOB/DOBForm.d.ts +5 -0
- package/build/features/auth/screens/DOB/DOBForm.js +59 -0
- package/build/features/auth/screens/DOB/index.d.ts +3 -0
- package/build/features/auth/screens/DOB/index.js +2 -0
- package/build/features/{business/screens/OTP → auth/screens/DOB}/validation.d.ts +4 -4
- package/build/features/auth/screens/DOB/validation.js +4 -0
- package/build/features/auth/screens/Email/Email.d.ts +5 -0
- package/build/features/auth/screens/Email/Email.js +57 -0
- package/build/features/auth/screens/Email/EmailField.d.ts +8 -0
- package/build/features/auth/screens/Email/EmailField.js +52 -0
- package/build/features/auth/screens/Email/index.d.ts +3 -0
- package/build/features/auth/screens/Email/index.js +2 -0
- package/build/features/auth/screens/Email/validation.d.ts +8 -0
- package/build/features/auth/screens/Email/validation.js +4 -0
- package/build/features/auth/screens/EmailSent/EmailSent.d.ts +5 -0
- package/build/features/auth/screens/EmailSent/EmailSent.js +79 -0
- package/build/features/auth/screens/EmailSent/index.d.ts +2 -0
- package/build/features/auth/screens/EmailSent/index.js +2 -0
- package/build/features/auth/screens/MigratingData/MigratingData.d.ts +5 -0
- package/build/features/auth/screens/MigratingData/MigratingData.js +44 -0
- package/build/features/auth/screens/MigratingData/index.d.ts +2 -0
- package/build/features/auth/screens/MigratingData/index.js +2 -0
- package/build/features/auth/screens/Mobile/Mobile.js +6 -38
- package/build/features/auth/screens/Mobile/MobileNumber.js +13 -15
- package/build/features/auth/screens/Mobile/validation.js +11 -3
- package/build/features/auth/screens/NID/IDNumber.js +1 -1
- package/build/features/auth/screens/NID/NID.js +7 -43
- package/build/features/auth/screens/NID/validation.d.ts +0 -3
- package/build/features/auth/screens/NID/validation.js +0 -1
- package/build/features/auth/screens/OTP/OTP.js +41 -10
- package/build/features/auth/screens/OTP/OTPInput.js +23 -6
- package/build/features/auth/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/auth/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/auth/screens/OperatorError/index.d.ts +3 -0
- package/build/features/auth/screens/OperatorError/index.js +2 -0
- package/build/features/auth/screens/Password/Password.d.ts +5 -0
- package/build/features/auth/screens/Password/Password.js +61 -0
- package/build/features/auth/screens/Password/PasswordField.d.ts +5 -0
- package/build/features/auth/screens/Password/PasswordField.js +28 -0
- package/build/features/auth/screens/Password/index.d.ts +3 -0
- package/build/features/auth/screens/Password/index.js +2 -0
- package/build/features/auth/screens/Password/validation.d.ts +8 -0
- package/build/features/auth/screens/Password/validation.js +4 -0
- package/build/features/auth/screens/PreparingData/PreparingData.js +3 -0
- package/build/features/auth/screens/ResetPasswordMessage/ResetPasswordMessage.d.ts +5 -0
- package/build/features/auth/screens/ResetPasswordMessage/ResetPasswordMessage.js +21 -0
- package/build/features/auth/screens/ResetPasswordMessage/index.d.ts +3 -0
- package/build/features/auth/screens/ResetPasswordMessage/index.js +2 -0
- package/build/features/auth/screens/VerifyNafath/VerifyNafath.d.ts +5 -0
- package/build/features/auth/screens/VerifyNafath/VerifyNafath.js +35 -0
- package/build/features/auth/screens/VerifyNafath/index.d.ts +3 -0
- package/build/features/auth/screens/VerifyNafath/index.js +2 -0
- package/build/features/bank/Bank.d.ts +5 -1
- package/build/features/bank/Bank.js +22 -9
- package/build/features/bank/screens/BankDetails/BankDetails.js +20 -6
- package/build/features/bank/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/bank/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/bank/screens/OperatorError/index.d.ts +3 -0
- package/build/features/bank/screens/OperatorError/index.js +2 -0
- package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/bank/screens/Verify/Verify.js +7 -6
- package/build/features/board/Board.d.ts +2 -0
- package/build/features/board/Board.js +24 -13
- package/build/features/board/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/board/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/board/screens/OperatorError/index.d.ts +3 -0
- package/build/features/board/screens/OperatorError/index.js +2 -0
- package/build/features/board/screens/PrepareDataLoading/PrepareDataLoading.d.ts +4 -0
- package/build/features/board/screens/PrepareDataLoading/PrepareDataLoading.js +10 -0
- package/build/features/board/screens/PrepareDataLoading/index.d.ts +2 -0
- package/build/features/board/screens/PrepareDataLoading/index.js +2 -0
- package/build/features/board/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +13 -4
- package/build/features/board/screens/Verify/Verify.js +3 -2
- package/build/features/brand/Brand.d.ts +5 -1
- package/build/features/brand/Brand.js +22 -9
- package/build/features/brand/screens/BrandActivities/ActivitiesList.d.ts +8 -35
- package/build/features/brand/screens/BrandActivities/BrandActivities.js +48 -11
- package/build/features/brand/screens/BrandActivities/CustomerBase.d.ts +3 -3
- package/build/features/brand/screens/BrandActivities/CustomerBase.js +1 -1
- package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.js +6 -3
- package/build/features/brand/screens/BrandActivities/RefundPolicy.d.ts +5 -18
- package/build/features/brand/screens/BrandActivities/RefundPolicy.js +1 -1
- package/build/features/brand/screens/BrandActivities/TAC.d.ts +2 -7
- package/build/features/brand/screens/BrandActivities/TAC.js +1 -1
- package/build/features/brand/screens/BrandActivities/TransactionPolicy.js +1 -1
- package/build/features/brand/screens/BrandInfo/BrandInfo.js +26 -6
- package/build/features/brand/screens/BrandInfo/BrandName.js +5 -2
- package/build/features/brand/screens/BrandInfo/validation.js +2 -2
- package/build/features/brand/screens/BrandSegmentInfo/BrandSegmentInfo.js +22 -6
- package/build/features/brand/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/brand/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/brand/screens/OperatorError/index.d.ts +3 -0
- package/build/features/brand/screens/OperatorError/index.js +2 -0
- package/build/features/brand/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/brand/screens/Verify/Verify.js +3 -2
- package/build/features/business/Business.js +20 -12
- package/build/features/business/screens/Activities/Activities.js +26 -9
- package/build/features/business/screens/Activities/ActivitiesList.d.ts +2 -2
- package/build/features/business/screens/Activities/ActivitiesList.js +1 -1
- package/build/features/business/screens/Activities/OperationStartDate.d.ts +4 -2
- package/build/features/business/screens/Activities/OperationStartDate.js +2 -2
- package/build/features/business/screens/BrandDetails/SalesChannel.d.ts +1 -1
- package/build/features/business/screens/BusinessType/BusinessType.js +11 -3
- package/build/features/business/screens/BusinessType/LicenseNumber.js +3 -3
- package/build/features/business/screens/BusinessType/LicenseType.d.ts +4 -26
- package/build/features/business/screens/Customers/CustomerLocations.d.ts +12 -37
- package/build/features/business/screens/Customers/CustomerLocations.js +5 -3
- package/build/features/business/screens/Customers/Customers.js +50 -10
- package/build/features/business/screens/Customers/ExpectedCustomers.d.ts +3 -1
- package/build/features/business/screens/Customers/ExpectedCustomers.js +5 -3
- package/build/features/business/screens/Customers/ExpectedSalesRange.d.ts +3 -1
- package/build/features/business/screens/Customers/ExpectedSalesRange.js +11 -5
- package/build/features/business/screens/Customers/RefundPolicy.d.ts +13 -19
- package/build/features/business/screens/Customers/RefundPolicy.js +13 -13
- package/build/features/business/screens/Customers/TransactionPolicy.d.ts +4 -1
- package/build/features/business/screens/Customers/TransactionPolicy.js +8 -5
- package/build/features/business/screens/Customers/validation.d.ts +6 -6
- package/build/features/business/screens/Customers/validation.js +3 -8
- package/build/features/business/screens/DOB/DOB.d.ts +6 -0
- package/build/features/business/screens/DOB/DOB.js +45 -0
- package/build/features/business/screens/DOB/DOBForm.d.ts +5 -0
- package/build/features/business/screens/DOB/DOBForm.js +72 -0
- package/build/features/business/screens/DOB/index.d.ts +3 -0
- package/build/features/business/screens/DOB/index.js +2 -0
- package/build/features/{connectExpress/screens/IdentityOTP → business/screens/DOB}/validation.d.ts +4 -4
- package/build/features/business/screens/DOB/validation.js +4 -0
- package/build/features/business/screens/IDBOD/IDBOD.js +10 -2
- package/build/features/business/screens/IDBOD/validation.d.ts +0 -3
- package/build/features/business/screens/IDBOD/validation.js +0 -1
- package/build/features/business/screens/MobileOwnership/CollectMobileOwnership.d.ts +2 -0
- package/build/features/business/screens/MobileOwnership/CollectMobileOwnership.js +103 -0
- package/build/features/{connectExpress/screens/IdentityOTP/OTP.d.ts → business/screens/MobileOwnership/MobileNumber.d.ts} +0 -2
- package/build/features/business/screens/MobileOwnership/MobileNumber.js +72 -0
- package/build/features/business/screens/MobileOwnership/index.d.ts +2 -0
- package/build/features/business/screens/MobileOwnership/index.js +2 -0
- package/build/features/business/screens/MobileOwnership/validation.d.ts +8 -0
- package/build/features/business/screens/MobileOwnership/validation.js +38 -0
- package/build/features/business/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/business/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/business/screens/OperatorError/index.d.ts +3 -0
- package/build/features/business/screens/OperatorError/index.js +2 -0
- package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +14 -3
- package/build/features/business/screens/Verify/Verify.js +15 -4
- package/build/features/business/screens/VerifyNafath/VerifyNafath.d.ts +5 -0
- package/build/features/business/screens/VerifyNafath/VerifyNafath.js +35 -0
- package/build/features/business/screens/VerifyNafath/index.d.ts +3 -0
- package/build/features/business/screens/VerifyNafath/index.js +2 -0
- package/build/features/connect/Connect.d.ts +5 -1
- package/build/features/connect/Connect.js +16 -9
- package/build/features/connect/screens/BusinessCountry/BusinessCountry.js +7 -1
- package/build/features/connect/screens/CivilID/CivilID.js +6 -1
- package/build/features/connect/screens/DOB/DOB.d.ts +5 -0
- package/build/features/connect/screens/{NID → DOB}/DOB.js +2 -2
- package/build/features/connect/screens/DOB/DOBForm.d.ts +5 -0
- package/build/features/connect/screens/DOB/DOBForm.js +59 -0
- package/build/features/connect/screens/DOB/index.d.ts +3 -0
- package/build/features/connect/screens/DOB/index.js +2 -0
- package/build/features/connect/screens/DOB/validation.d.ts +8 -0
- package/build/features/connect/screens/DOB/validation.js +4 -0
- package/build/features/connect/screens/Individual/Email.js +1 -3
- package/build/features/connect/screens/Individual/Individual.js +11 -5
- package/build/features/connect/screens/Individual/MobileNumber.js +8 -7
- package/build/features/connect/screens/Individual/validation.js +11 -3
- package/build/features/connect/screens/Merchant/BrandName.js +5 -2
- package/build/features/connect/screens/Merchant/validation.js +2 -2
- package/build/features/connect/screens/Mobile/Mobile.js +12 -9
- package/build/features/connect/screens/Mobile/MobileNumber.js +8 -7
- package/build/features/connect/screens/Mobile/validation.js +11 -3
- package/build/features/connect/screens/MobileOwnership/CollectMobileOwnership.d.ts +2 -0
- package/build/features/connect/screens/MobileOwnership/CollectMobileOwnership.js +104 -0
- package/build/features/connect/screens/MobileOwnership/MobileNumber.d.ts +3 -0
- package/build/features/connect/screens/MobileOwnership/MobileNumber.js +72 -0
- package/build/features/connect/screens/MobileOwnership/index.d.ts +2 -0
- package/build/features/connect/screens/MobileOwnership/index.js +2 -0
- package/build/features/connect/screens/MobileOwnership/validation.d.ts +8 -0
- package/build/features/connect/screens/MobileOwnership/validation.js +38 -0
- package/build/features/connect/screens/NID/IDNumber.d.ts +1 -0
- package/build/features/connect/screens/NID/IDNumber.js +2 -2
- package/build/features/connect/screens/NID/NID.js +5 -11
- package/build/features/connect/screens/NID/validation.d.ts +0 -3
- package/build/features/connect/screens/NID/validation.js +0 -1
- package/build/features/connect/screens/OTP/OTP.js +6 -6
- package/build/features/connect/screens/OTP/OTPInput.js +3 -11
- package/build/features/connect/screens/OperatorError/OperatorError.js +1 -1
- package/build/features/connect/screens/VerifyNafath/VerifyNafath.d.ts +5 -0
- package/build/features/connect/screens/VerifyNafath/VerifyNafath.js +35 -0
- package/build/features/connect/screens/VerifyNafath/index.d.ts +3 -0
- package/build/features/connect/screens/VerifyNafath/index.js +2 -0
- package/build/features/connectExpress/ConnectExpress.d.ts +5 -2
- package/build/features/connectExpress/ConnectExpress.js +62 -39
- package/build/features/connectExpress/screens/AccountAlreadyCreated/AccountAlreadyCreated.js +14 -2
- package/build/features/connectExpress/screens/AuthenticationList/EntityLicenseType.d.ts +4 -26
- package/build/features/connectExpress/screens/AuthenticationList/LicenseNumber.js +2 -2
- package/build/features/connectExpress/screens/BusinessCountry/BusinessCountry.js +7 -1
- package/build/features/connectExpress/screens/CivilID/CivilID.js +6 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/BrandName.js +5 -2
- package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.js +8 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseNumber.js +2 -2
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.d.ts +4 -26
- package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.d.ts +2 -7
- package/build/features/connectExpress/screens/CollectBusinessInfo/validation.js +2 -2
- package/build/features/connectExpress/screens/CollectIndividualInfo/CollectIndividualInfo.js +30 -7
- package/build/features/connectExpress/screens/CollectIndividualInfo/Email.js +1 -3
- package/build/features/connectExpress/screens/CollectIndividualInfo/MobileNumber.js +9 -8
- package/build/features/connectExpress/screens/CollectIndividualInfo/validation.js +11 -3
- package/build/features/connectExpress/screens/CreateAccountLoader/CreateAccountLoader.js +14 -24
- package/build/features/connectExpress/screens/DOB/DOB.d.ts +5 -0
- package/build/features/connectExpress/screens/{NID → DOB}/DOB.js +3 -3
- package/build/features/connectExpress/screens/DOB/DOBForm.d.ts +5 -0
- package/build/features/connectExpress/screens/DOB/DOBForm.js +63 -0
- package/build/features/connectExpress/screens/DOB/index.d.ts +3 -0
- package/build/features/connectExpress/screens/DOB/index.js +2 -0
- package/build/features/connectExpress/screens/DOB/validation.d.ts +8 -0
- package/build/features/connectExpress/screens/DOB/validation.js +4 -0
- package/build/features/connectExpress/screens/IdentityVerifyNafath/IdentityVerifyNafath.d.ts +5 -0
- package/build/features/connectExpress/screens/IdentityVerifyNafath/IdentityVerifyNafath.js +35 -0
- package/build/features/connectExpress/screens/IdentityVerifyNafath/index.d.ts +3 -0
- package/build/features/connectExpress/screens/IdentityVerifyNafath/index.js +2 -0
- package/build/features/connectExpress/screens/Mobile/Mobile.js +10 -3
- package/build/features/connectExpress/screens/Mobile/MobileNumber.js +9 -8
- package/build/features/connectExpress/screens/Mobile/validation.js +21 -6
- package/build/features/connectExpress/screens/MobileOwnership/CollectMobileOwnership.d.ts +2 -0
- package/build/features/connectExpress/screens/MobileOwnership/CollectMobileOwnership.js +106 -0
- package/build/features/connectExpress/screens/MobileOwnership/MobileNumber.d.ts +3 -0
- package/build/features/connectExpress/screens/MobileOwnership/MobileNumber.js +72 -0
- package/build/features/connectExpress/screens/MobileOwnership/index.d.ts +2 -0
- package/build/features/connectExpress/screens/MobileOwnership/index.js +2 -0
- package/build/features/connectExpress/screens/MobileOwnership/validation.d.ts +8 -0
- package/build/features/connectExpress/screens/MobileOwnership/validation.js +38 -0
- package/build/features/connectExpress/screens/NID/IDNumber.d.ts +1 -0
- package/build/features/connectExpress/screens/NID/IDNumber.js +2 -2
- package/build/features/connectExpress/screens/NID/NID.js +10 -10
- package/build/features/connectExpress/screens/NID/TAC.d.ts +2 -7
- package/build/features/connectExpress/screens/NID/TAC.js +2 -2
- package/build/features/connectExpress/screens/NID/validation.d.ts +0 -3
- package/build/features/connectExpress/screens/NID/validation.js +0 -2
- package/build/features/connectExpress/screens/NIDMissed/NID.js +3 -3
- package/build/features/connectExpress/screens/NIDMissed/validation.d.ts +0 -3
- package/build/features/connectExpress/screens/NIDMissed/validation.js +0 -1
- package/build/features/connectExpress/screens/OTP/OTP.js +13 -15
- package/build/features/connectExpress/screens/OTP/OTPInput.js +12 -10
- package/build/features/connectExpress/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/connectExpress/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/connectExpress/screens/OperatorError/index.d.ts +3 -0
- package/build/features/connectExpress/screens/OperatorError/index.js +2 -0
- package/build/features/connectExpress/screens/PrepareDataLoading/PrepareDataLoading.d.ts +5 -0
- package/build/features/connectExpress/screens/PrepareDataLoading/PrepareDataLoading.js +34 -0
- package/build/features/connectExpress/screens/PrepareDataLoading/index.d.ts +2 -0
- package/build/features/connectExpress/screens/PrepareDataLoading/index.js +2 -0
- package/build/features/connectExpress/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +3 -3
- package/build/features/connectExpress/screens/VerifyNafath/VerifyNafath.d.ts +5 -0
- package/build/features/connectExpress/screens/VerifyNafath/VerifyNafath.js +35 -0
- package/build/features/connectExpress/screens/VerifyNafath/index.d.ts +3 -0
- package/build/features/connectExpress/screens/VerifyNafath/index.js +2 -0
- package/build/features/entity/Entity.d.ts +4 -1
- package/build/features/entity/Entity.js +22 -9
- package/build/features/entity/screens/EntityCapital/ActivityList.d.ts +2 -2
- package/build/features/entity/screens/EntityCapital/CapitalPaid.js +8 -4
- package/build/features/entity/screens/EntityCapital/CapitalShareValue.js +8 -4
- package/build/features/entity/screens/EntityCapital/EntityCapital.js +33 -9
- package/build/features/entity/screens/EntityName/EntityName.js +33 -15
- package/build/features/entity/screens/EntityName/EntityTypeList.d.ts +8 -35
- package/build/features/entity/screens/EntityName/EntityTypeList.js +2 -3
- package/build/features/entity/screens/EntityName/ExpiryDate.d.ts +1 -1
- package/build/features/entity/screens/EntityName/ExpiryDate.js +13 -8
- package/build/features/entity/screens/EntityName/IssuingDate.d.ts +1 -1
- package/build/features/entity/screens/EntityName/IssuingDate.js +15 -8
- package/build/features/entity/screens/EntityName/LegalName.js +1 -13
- package/build/features/entity/screens/EntityName/LicenseNumber.js +6 -8
- package/build/features/entity/screens/EntityName/UnifiedNumber.js +4 -6
- package/build/features/entity/screens/EntityName/validation.d.ts +3 -3
- package/build/features/entity/screens/EntityName/validation.js +1 -10
- package/build/features/entity/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/entity/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/entity/screens/OperatorError/index.d.ts +3 -0
- package/build/features/entity/screens/OperatorError/index.js +2 -0
- package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/entity/screens/Verify/Verify.js +3 -2
- package/build/features/featuresScreens.d.ts +1 -0
- package/build/features/featuresScreens.js +211 -13
- package/build/features/individual/Individual.d.ts +4 -1
- package/build/features/individual/Individual.js +22 -9
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.d.ts +1 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +44 -11
- package/build/features/individual/screens/AdditionalIndividualInfo/IsAuthorizedSwitch.d.ts +4 -26
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +5 -2
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.d.ts +4 -26
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.js +8 -3
- package/build/features/individual/screens/IndividualList/Email.js +2 -3
- package/build/features/individual/screens/IndividualList/IndividualList.d.ts +2 -2
- package/build/features/individual/screens/IndividualList/IndividualList.js +21 -6
- package/build/features/individual/screens/IndividualList/MobileNumber.js +8 -10
- package/build/features/individual/screens/IndividualList/UserList.js +7 -7
- package/build/features/individual/screens/IndividualList/validation.js +11 -4
- package/build/features/individual/screens/IndividualPersonalInfo/Email.js +2 -4
- package/build/features/individual/screens/IndividualPersonalInfo/Gender.d.ts +4 -26
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.d.ts +1 -1
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.js +76 -20
- package/build/features/individual/screens/IndividualPersonalInfo/MobileNumber.js +6 -5
- package/build/features/individual/screens/IndividualPersonalInfo/validation.js +11 -3
- package/build/features/individual/screens/IndividualPhoneInfo/MobileNumber.js +9 -11
- package/build/features/individual/screens/IndividualPhoneInfo/validation.js +11 -3
- package/build/features/individual/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/individual/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/individual/screens/OperatorError/index.d.ts +3 -0
- package/build/features/individual/screens/OperatorError/index.js +2 -0
- package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/individual/screens/Verify/Verify.js +3 -2
- package/build/features/kyc/KYC.d.ts +10 -0
- package/build/features/kyc/KYC.js +99 -0
- package/build/features/kyc/index.d.ts +1 -0
- package/build/features/kyc/index.js +1 -0
- package/build/features/kyc/screens/AlreadySubmitted/AlreadySubmitted.d.ts +5 -0
- package/build/features/kyc/screens/AlreadySubmitted/AlreadySubmitted.js +19 -0
- package/build/features/kyc/screens/AlreadySubmitted/index.d.ts +2 -0
- package/build/features/kyc/screens/AlreadySubmitted/index.js +2 -0
- package/build/features/kyc/screens/Loading/Loading.d.ts +4 -0
- package/build/features/kyc/screens/Loading/Loading.js +10 -0
- package/build/features/kyc/screens/Loading/index.d.ts +2 -0
- package/build/features/kyc/screens/Loading/index.js +2 -0
- package/build/features/kyc/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/kyc/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/kyc/screens/OperatorError/index.d.ts +2 -0
- package/build/features/kyc/screens/OperatorError/index.js +2 -0
- package/build/features/kyc/screens/Success/Success.d.ts +5 -0
- package/build/features/kyc/screens/Success/Success.js +32 -0
- package/build/features/kyc/screens/Success/index.d.ts +2 -0
- package/build/features/kyc/screens/Success/index.js +2 -0
- package/build/features/kyc/screens/Terms/Header.d.ts +6 -0
- package/build/features/kyc/screens/Terms/Header.js +36 -0
- package/build/features/kyc/screens/Terms/Terms.d.ts +4 -0
- package/build/features/kyc/screens/Terms/Terms.js +81 -0
- package/build/features/kyc/screens/Terms/index.d.ts +2 -0
- package/build/features/kyc/screens/Terms/index.js +2 -0
- package/build/features/kyc/screens/TokenError/TokenError.d.ts +5 -0
- package/build/features/kyc/screens/TokenError/TokenError.js +9 -0
- package/build/features/kyc/screens/TokenError/index.d.ts +2 -0
- package/build/features/kyc/screens/TokenError/index.js +2 -0
- package/build/features/kyc/screens/Users/Users.d.ts +3 -0
- package/build/features/kyc/screens/Users/Users.js +76 -0
- package/build/features/kyc/screens/Users/index.d.ts +2 -0
- package/build/features/kyc/screens/Users/index.js +2 -0
- package/build/features/kyc/screens/VerifyNafath/VerifyNafath.d.ts +5 -0
- package/build/features/kyc/screens/VerifyNafath/VerifyNafath.js +45 -0
- package/build/features/kyc/screens/VerifyNafath/index.d.ts +3 -0
- package/build/features/kyc/screens/VerifyNafath/index.js +2 -0
- package/build/features/kyc/screens/VerifyPaci/VerifyPACI.d.ts +5 -0
- package/build/features/kyc/screens/VerifyPaci/VerifyPACI.js +44 -0
- package/build/features/kyc/screens/VerifyPaci/index.d.ts +3 -0
- package/build/features/kyc/screens/VerifyPaci/index.js +2 -0
- package/build/features/password/Password.d.ts +4 -1
- package/build/features/password/Password.js +88 -31
- package/build/features/password/screens/CreatePassword/CreatePassword.js +10 -4
- package/build/features/password/screens/OTP/OTP.js +3 -3
- package/build/features/password/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/password/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/password/screens/OperatorError/index.d.ts +3 -0
- package/build/features/password/screens/OperatorError/index.js +2 -0
- package/build/features/password/screens/PrepareDataLoading/PrepareDataLoading.d.ts +4 -0
- package/build/features/password/screens/PrepareDataLoading/PrepareDataLoading.js +10 -0
- package/build/features/password/screens/PrepareDataLoading/index.d.ts +2 -0
- package/build/features/password/screens/PrepareDataLoading/index.js +2 -0
- package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/password/screens/Verify/Verify.js +7 -6
- package/build/features/shared/Address/CountryList.d.ts +7 -23
- package/build/features/shared/Address/InputSelect.d.ts +7 -23
- package/build/features/shared/Background/Background.js +1 -1
- package/build/features/shared/BusinessCountry/BusinessCountry.js +1 -1
- package/build/features/shared/Button/Button.js +3 -1
- package/build/features/shared/Button/EmailProvidersButtons.js +2 -0
- package/build/features/shared/Button/FlowsButtons.js +18 -4
- package/build/features/shared/Button/NafathButton.d.ts +7 -0
- package/build/features/shared/Button/{AbsherButton.js → NafathButton.js} +12 -3
- package/build/features/shared/Button/index.d.ts +2 -2
- package/build/features/shared/Button/index.js +2 -2
- package/build/features/shared/Calender/Calender.d.ts +2 -1
- package/build/features/shared/Calender/Calender.js +3 -3
- package/build/features/shared/Containers/FeatureContainer.d.ts +1 -0
- package/build/features/shared/Containers/FeatureContainer.js +5 -3
- package/build/features/shared/Dialog/DialogContainer.js +5 -4
- package/build/features/shared/Input/Input.d.ts +2 -2
- package/build/features/shared/NafathVerification/NafathVerification.d.ts +14 -0
- package/build/features/shared/NafathVerification/NafathVerification.js +92 -0
- package/build/features/shared/NafathVerification/VerifyNafathLoading.d.ts +8 -0
- package/build/features/shared/NafathVerification/VerifyNafathLoading.js +53 -0
- package/build/features/shared/NafathVerification/VerifyNafathSuccess.d.ts +5 -0
- package/build/features/shared/NafathVerification/VerifyNafathSuccess.js +8 -0
- package/build/features/shared/NafathVerification/index.d.ts +2 -0
- package/build/features/shared/NafathVerification/index.js +2 -0
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.d.ts +6 -1
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +10 -13
- package/build/features/shared/SuccessScreen/SuccessScreen.js +1 -1
- package/build/features/shared/UploadFile/FileUpload.d.ts +2 -7
- package/build/features/shared/UploadFile/UploadFile.d.ts +2 -7
- package/build/features/shared/UploadFile/UploadWrapper.d.ts +2 -7
- package/build/features/shared/UploadMultipleFile/UploadFile.d.ts +2 -7
- package/build/features/shared/UploadMultipleFile/UploadMultipleFile.d.ts +2 -7
- package/build/features/signIn/SignIn.js +18 -7
- package/build/features/signIn/screens/Mobile/MobileNumber.js +8 -7
- package/build/features/signIn/screens/Mobile/validation.js +11 -3
- package/build/features/signIn/screens/OTP/OTP.js +5 -4
- package/build/features/signIn/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/signIn/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/signIn/screens/OperatorError/index.d.ts +3 -0
- package/build/features/signIn/screens/OperatorError/index.js +2 -0
- package/build/features/tax/Tax.d.ts +4 -1
- package/build/features/tax/Tax.js +22 -9
- package/build/features/tax/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/tax/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/tax/screens/OperatorError/index.d.ts +3 -0
- package/build/features/tax/screens/OperatorError/index.js +2 -0
- package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/tax/screens/TaxDetails/TaxDetails.js +9 -3
- package/build/features/tax/screens/Verify/Verify.js +7 -6
- package/build/hooks/index.d.ts +3 -0
- package/build/hooks/index.js +3 -0
- package/build/hooks/useAppConfig.d.ts +1 -1
- package/build/hooks/useAppConfig.js +4 -3
- package/build/hooks/useAppDispatch.d.ts +1 -0
- package/build/hooks/useAppTheme.js +4 -3
- package/build/hooks/useCountDown.d.ts +10 -0
- package/build/hooks/useCountDown.js +17 -0
- package/build/hooks/useFormDirtyCheck.d.ts +10 -0
- package/build/hooks/useFormDirtyCheck.js +66 -0
- package/build/hooks/useSanitizedTranslation.d.ts +2 -0
- package/build/hooks/useSanitizedTranslation.js +15 -0
- package/build/hooks/useVerifyToken.d.ts +4 -2
- package/build/hooks/useVerifyToken.js +9 -4
- package/build/index.css +360 -120
- package/build/index.d.ts +3 -2
- package/build/index.js +4 -2
- package/build/theme/components.js +7 -0
- package/build/theme/palette.js +2 -1
- package/build/theme/shadows.js +1 -1
- package/build/theme/theme.d.ts +1 -1
- package/build/theme/theme.js +2 -2
- package/build/utils/array.js +2 -2
- package/build/utils/common.d.ts +1 -0
- package/build/utils/common.js +16 -3
- package/build/utils/object.d.ts +1 -0
- package/build/utils/object.js +3 -0
- package/build/utils/string.d.ts +6 -2
- package/build/utils/string.js +28 -3
- package/build/utils/validation.d.ts +2 -0
- package/build/utils/validation.js +6 -0
- package/package.json +2 -2
- package/build/features/auth/screens/NID/DOB.d.ts +0 -6
- package/build/features/business/screens/OTP/OTP.d.ts +0 -8
- package/build/features/business/screens/OTP/OTP.js +0 -90
- package/build/features/business/screens/OTP/OTPInput.d.ts +0 -5
- package/build/features/business/screens/OTP/OTPInput.js +0 -49
- package/build/features/business/screens/OTP/index.d.ts +0 -3
- package/build/features/business/screens/OTP/index.js +0 -2
- package/build/features/business/screens/OTP/validation.js +0 -4
- package/build/features/connectExpress/screens/IdentityOTP/OTP.js +0 -87
- package/build/features/connectExpress/screens/IdentityOTP/OTPInput.d.ts +0 -5
- package/build/features/connectExpress/screens/IdentityOTP/OTPInput.js +0 -54
- package/build/features/connectExpress/screens/IdentityOTP/index.d.ts +0 -3
- package/build/features/connectExpress/screens/IdentityOTP/index.js +0 -2
- package/build/features/connectExpress/screens/IdentityOTP/validation.js +0 -4
- package/build/features/connectExpress/screens/NID/DOB.d.ts +0 -6
- package/build/features/shared/Button/AbsherButton.d.ts +0 -7
- /package/build/features/{connect/screens/NID → auth/screens/DOB}/DOB.d.ts +0 -0
|
@@ -7,19 +7,7 @@ interface VerifyLeadTokenProps {
|
|
|
7
7
|
}
|
|
8
8
|
export declare const verifyLeadToken: import("@reduxjs/toolkit").AsyncThunk<{
|
|
9
9
|
data: any;
|
|
10
|
-
|
|
11
|
-
boardResponse: {
|
|
12
|
-
user: any;
|
|
13
|
-
brand: any;
|
|
14
|
-
bank_account: any;
|
|
15
|
-
entity: any;
|
|
16
|
-
merchant: any;
|
|
17
|
-
name: any;
|
|
18
|
-
contact: any;
|
|
19
|
-
business: any;
|
|
20
|
-
individuals: any;
|
|
21
|
-
notification: any;
|
|
22
|
-
};
|
|
10
|
+
bankData: any;
|
|
23
11
|
token: string;
|
|
24
12
|
}, VerifyLeadTokenProps, {
|
|
25
13
|
state?: unknown;
|
|
@@ -45,6 +33,7 @@ export declare const resendOTP: import("@reduxjs/toolkit").AsyncThunk<{
|
|
|
45
33
|
}>;
|
|
46
34
|
export declare const verifyBankLeadOTP: import("@reduxjs/toolkit").AsyncThunk<{
|
|
47
35
|
data: any;
|
|
36
|
+
bankData: any;
|
|
48
37
|
formData: OTPFormValues;
|
|
49
38
|
}, OTPFormValues, {
|
|
50
39
|
state?: unknown;
|
|
@@ -68,9 +57,12 @@ export declare const retrieveBoardStatus: import("@reduxjs/toolkit").AsyncThunk<
|
|
|
68
57
|
fulfilledMeta?: unknown;
|
|
69
58
|
rejectedMeta?: unknown;
|
|
70
59
|
}>;
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
60
|
+
type RetrieveBoardProps = {
|
|
61
|
+
boardId: string;
|
|
62
|
+
individualId: string;
|
|
63
|
+
individualType: string;
|
|
64
|
+
};
|
|
65
|
+
export declare const retrieveBoardDetails: import("@reduxjs/toolkit").AsyncThunk<any, RetrieveBoardProps, {
|
|
74
66
|
state?: unknown;
|
|
75
67
|
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
76
68
|
extra?: unknown;
|
|
@@ -110,8 +102,11 @@ export declare const checkIbanBank: import("@reduxjs/toolkit").AsyncThunk<{
|
|
|
110
102
|
rejectedMeta?: unknown;
|
|
111
103
|
}>;
|
|
112
104
|
export declare const updateBoardSuccess: import("@reduxjs/toolkit").AsyncThunk<{
|
|
113
|
-
|
|
114
|
-
|
|
105
|
+
data: any;
|
|
106
|
+
flows?: undefined;
|
|
107
|
+
} | {
|
|
108
|
+
data: any;
|
|
109
|
+
flows: any;
|
|
115
110
|
} | undefined, void, {
|
|
116
111
|
state?: unknown;
|
|
117
112
|
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
@@ -51,14 +51,14 @@ import API from '../../../api';
|
|
|
51
51
|
import { DocumentPurpose, FlowsTypes } from '../../../@types';
|
|
52
52
|
import { handleCurrentActiveScreen, handleNextScreenStep, handlePrevScreenStep, handlePublicKey, handleSetCountryByIso2, onCloseComplete } from '../../../app/settings';
|
|
53
53
|
import { BANK_STEP_NAMES } from '../../../constants';
|
|
54
|
-
import { hasNoneEditableValue, isStringHasOneAsterisk, retrieveIndividualData, sleep } from '../../../utils';
|
|
54
|
+
import { hasNoneEditableValue, isStringHasOneAsterisk, retrieveIndividualData, sendCustomEventToGTM, sleep } from '../../../utils';
|
|
55
55
|
export var verifyLeadToken = createAsyncThunk('bankVerifyLeadToken', function (_a, thunkApi) {
|
|
56
56
|
var token = _a.token, isInternally = _a.isInternally;
|
|
57
57
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
58
|
-
var payload, data,
|
|
59
|
-
var _e, _f, _g, _h
|
|
60
|
-
return __generator(this, function (
|
|
61
|
-
switch (
|
|
58
|
+
var payload, data, bankData, _b, config, country_code, step_name, bank_account_id, wallet_id, boardId, publicKey, data_1;
|
|
59
|
+
var _c, _d, _e, _f, _g, _h;
|
|
60
|
+
return __generator(this, function (_j) {
|
|
61
|
+
switch (_j.label) {
|
|
62
62
|
case 0:
|
|
63
63
|
payload = __assign({ service_name: 'tap_email', verify_token: token }, (isInternally && {
|
|
64
64
|
notification: {
|
|
@@ -67,61 +67,51 @@ export var verifyLeadToken = createAsyncThunk('bankVerifyLeadToken', function (_
|
|
|
67
67
|
}));
|
|
68
68
|
return [4, API.leadService.verifyLeadToken(payload)];
|
|
69
69
|
case 1:
|
|
70
|
-
data = (
|
|
71
|
-
|
|
72
|
-
if ((_e = data.errors) === null || _e === void 0 ? void 0 : _e.length)
|
|
70
|
+
data = (_j.sent()).data;
|
|
71
|
+
if ((_c = data.errors) === null || _c === void 0 ? void 0 : _c.length)
|
|
73
72
|
throw new Error(data.errors[0].description);
|
|
74
|
-
|
|
73
|
+
bankData = undefined;
|
|
74
|
+
_b = data || {}, config = _b.config, country_code = _b.country_code, step_name = _b.step_name, bank_account_id = _b.bank_account_id, wallet_id = _b.wallet_id, boardId = _b.id;
|
|
75
75
|
publicKey = config === null || config === void 0 ? void 0 : config.public_key;
|
|
76
|
-
if (
|
|
76
|
+
if (country_code)
|
|
77
|
+
thunkApi.dispatch(handleSetCountryByIso2(country_code));
|
|
78
|
+
if (publicKey)
|
|
77
79
|
thunkApi.dispatch(handlePublicKey(publicKey));
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
if (!
|
|
81
|
-
|
|
80
|
+
if (isInternally)
|
|
81
|
+
data.step_name = BANK_STEP_NAMES.BANK_INFO;
|
|
82
|
+
if (!(step_name === BANK_STEP_NAMES.PHONE_AUTH)) return [3, 2];
|
|
83
|
+
thunkApi.dispatch(handleCurrentActiveScreen('BANK_VERIFY_STEP'));
|
|
84
|
+
return [3, 7];
|
|
82
85
|
case 2:
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
+
if (!(step_name === BANK_STEP_NAMES.BANK_INFO)) return [3, 7];
|
|
87
|
+
if (!(!wallet_id || !country_code)) return [3, 4];
|
|
88
|
+
return [4, API.boardService.retrieveBoardDetails(boardId)];
|
|
89
|
+
case 3:
|
|
90
|
+
data_1 = _j.sent();
|
|
91
|
+
if (!country_code && ((_d = data_1 === null || data_1 === void 0 ? void 0 : data_1.entity) === null || _d === void 0 ? void 0 : _d.country))
|
|
92
|
+
thunkApi.dispatch(handleSetCountryByIso2(data_1.entity.country));
|
|
93
|
+
if (!((_h = (_g = (_f = (_e = data_1 === null || data_1 === void 0 ? void 0 : data_1.business) === null || _e === void 0 ? void 0 : _e.entity) === null || _f === void 0 ? void 0 : _f.merchant) === null || _g === void 0 ? void 0 : _g.wallet) === null || _h === void 0 ? void 0 : _h.id))
|
|
94
|
+
throw new Error('wallet_id_missing');
|
|
95
|
+
if (data_1 === null || data_1 === void 0 ? void 0 : data_1.bank_account)
|
|
96
|
+
bankData = data_1.bank_account;
|
|
97
|
+
return [3, 6];
|
|
86
98
|
case 4:
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
serviceCallBack = function () { return API.individualService.retrieveIndividual(id_1, type_1); };
|
|
90
|
-
return [4, retrieveIndividualData(type_1, boardData, serviceCallBack)];
|
|
99
|
+
if (!bank_account_id) return [3, 6];
|
|
100
|
+
return [4, API.entityService.retrieveBankAccount(bank_account_id)];
|
|
91
101
|
case 5:
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
individualData = individualRes;
|
|
95
|
-
_k.label = 6;
|
|
102
|
+
bankData = _j.sent();
|
|
103
|
+
_j.label = 6;
|
|
96
104
|
case 6:
|
|
97
|
-
countryIso2 = (_g = boardData === null || boardData === void 0 ? void 0 : boardData.entity) === null || _g === void 0 ? void 0 : _g.country;
|
|
98
|
-
if (countryIso2)
|
|
99
|
-
thunkApi.dispatch(handleSetCountryByIso2(countryIso2));
|
|
100
105
|
if (isInternally)
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
thunkApi.dispatch(handleCurrentActiveScreen('BANK_VERIFY_STEP'));
|
|
104
|
-
}
|
|
105
|
-
else if (data.step_name === BANK_STEP_NAMES.BANK_INFO) {
|
|
106
|
+
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep()); });
|
|
107
|
+
else
|
|
106
108
|
thunkApi.dispatch(handleNextScreenStep());
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
brand: boardData === null || boardData === void 0 ? void 0 : boardData.brand,
|
|
114
|
-
bank_account: boardData === null || boardData === void 0 ? void 0 : boardData.bank_account,
|
|
115
|
-
entity: boardData === null || boardData === void 0 ? void 0 : boardData.entity,
|
|
116
|
-
merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant,
|
|
117
|
-
name: (_h = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _h === void 0 ? void 0 : _h.names,
|
|
118
|
-
contact: (_j = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _j === void 0 ? void 0 : _j.contact,
|
|
119
|
-
business: boardData === null || boardData === void 0 ? void 0 : boardData.business,
|
|
120
|
-
individuals: boardData === null || boardData === void 0 ? void 0 : boardData.individuals,
|
|
121
|
-
notification: boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.notification
|
|
122
|
-
},
|
|
123
|
-
token: token
|
|
124
|
-
}];
|
|
109
|
+
_j.label = 7;
|
|
110
|
+
case 7: return [2, {
|
|
111
|
+
data: data,
|
|
112
|
+
bankData: bankData,
|
|
113
|
+
token: token
|
|
114
|
+
}];
|
|
125
115
|
}
|
|
126
116
|
});
|
|
127
117
|
});
|
|
@@ -144,75 +134,118 @@ export var resendOTP = createAsyncThunk('resendOTPBank', function (params, thunk
|
|
|
144
134
|
});
|
|
145
135
|
}); });
|
|
146
136
|
export var verifyBankLeadOTP = createAsyncThunk('verifyBankLeadOTP', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
147
|
-
var _a, bank, settings, responseBody, payload, data, publicKey;
|
|
148
|
-
var
|
|
149
|
-
return __generator(this, function (
|
|
150
|
-
switch (
|
|
137
|
+
var _a, bank, settings, responseBody, payload, data, countryIso2, publicKey, _b, bank_account_id, wallet_id, boardId, bankData, data_2;
|
|
138
|
+
var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
139
|
+
return __generator(this, function (_o) {
|
|
140
|
+
switch (_o.label) {
|
|
151
141
|
case 0:
|
|
152
142
|
_a = thunkApi.getState(), bank = _a.bank, settings = _a.settings;
|
|
153
143
|
responseBody = bank.data.verify.responseBody;
|
|
154
144
|
payload = {
|
|
155
145
|
data: params.otp,
|
|
156
|
-
service_name: (
|
|
146
|
+
service_name: (_c = responseBody === null || responseBody === void 0 ? void 0 : responseBody.verification_by) === null || _c === void 0 ? void 0 : _c.service_name,
|
|
157
147
|
verify_token: responseBody === null || responseBody === void 0 ? void 0 : responseBody.verify_token,
|
|
158
148
|
step_name: BANK_STEP_NAMES.PHONE_AUTH,
|
|
159
149
|
encryption_contract: ['data']
|
|
160
150
|
};
|
|
161
151
|
return [4, API.leadService.verifyLeadOTP(payload)];
|
|
162
152
|
case 1:
|
|
163
|
-
data = (
|
|
164
|
-
if (
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
(
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
153
|
+
data = (_o.sent()).data;
|
|
154
|
+
if ((_d = data.errors) === null || _d === void 0 ? void 0 : _d.length)
|
|
155
|
+
throw new Error(data.errors[0].description);
|
|
156
|
+
countryIso2 = (data === null || data === void 0 ? void 0 : data.country_code) || (responseBody === null || responseBody === void 0 ? void 0 : responseBody.country_code);
|
|
157
|
+
publicKey = (_e = data === null || data === void 0 ? void 0 : data.config) === null || _e === void 0 ? void 0 : _e.public_key;
|
|
158
|
+
if (countryIso2)
|
|
159
|
+
thunkApi.dispatch(handleSetCountryByIso2(countryIso2));
|
|
160
|
+
if (publicKey)
|
|
161
|
+
thunkApi.dispatch(handlePublicKey(publicKey));
|
|
162
|
+
_b = data || {}, bank_account_id = _b.bank_account_id, wallet_id = _b.wallet_id, boardId = _b.id;
|
|
163
|
+
bankData = undefined;
|
|
164
|
+
if (!(!wallet_id || !countryIso2)) return [3, 3];
|
|
165
|
+
return [4, API.boardService.retrieveBoardDetails(boardId)];
|
|
166
|
+
case 2:
|
|
167
|
+
data_2 = _o.sent();
|
|
168
|
+
if (!countryIso2 && ((_f = data_2 === null || data_2 === void 0 ? void 0 : data_2.entity) === null || _f === void 0 ? void 0 : _f.country))
|
|
169
|
+
thunkApi.dispatch(handleSetCountryByIso2(data_2.entity.country));
|
|
170
|
+
if (!((_k = (_j = (_h = (_g = data_2 === null || data_2 === void 0 ? void 0 : data_2.business) === null || _g === void 0 ? void 0 : _g.entity) === null || _h === void 0 ? void 0 : _h.merchant) === null || _j === void 0 ? void 0 : _j.wallet) === null || _k === void 0 ? void 0 : _k.id))
|
|
171
|
+
throw new Error('wallet_id_missing');
|
|
172
|
+
if (data_2 === null || data_2 === void 0 ? void 0 : data_2.bank_account)
|
|
173
|
+
bankData = data_2.bank_account;
|
|
174
|
+
return [3, 5];
|
|
175
|
+
case 3:
|
|
176
|
+
if (!bank_account_id) return [3, 5];
|
|
177
|
+
return [4, API.entityService.retrieveBankAccount(bank_account_id)];
|
|
178
|
+
case 4:
|
|
179
|
+
bankData = _o.sent();
|
|
180
|
+
_o.label = 5;
|
|
181
|
+
case 5:
|
|
182
|
+
(_m = (_l = settings.data.appConfig).onStepCompleted) === null || _m === void 0 ? void 0 : _m.call(_l, settings.data.activeScreen.name, { otp: params.otp });
|
|
183
|
+
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep()); });
|
|
184
|
+
return [2, {
|
|
185
|
+
data: data,
|
|
186
|
+
bankData: bankData,
|
|
187
|
+
formData: params
|
|
188
|
+
}];
|
|
173
189
|
}
|
|
174
190
|
});
|
|
175
191
|
}); });
|
|
176
192
|
export var retrieveBoardStatus = createAsyncThunk('bank/retrieveBoardStatus', function (parmas, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
177
|
-
var bank, board_id, data;
|
|
178
|
-
return __generator(this, function (
|
|
179
|
-
switch (
|
|
193
|
+
var bank, _a, board_id, board_info_id, recipient, _b, id, type, data;
|
|
194
|
+
return __generator(this, function (_c) {
|
|
195
|
+
switch (_c.label) {
|
|
180
196
|
case 0:
|
|
181
197
|
bank = thunkApi.getState().bank;
|
|
182
|
-
|
|
183
|
-
|
|
198
|
+
_a = bank.data.verify.responseBody || {}, board_id = _a.board_id, board_info_id = _a.board_info_id, recipient = _a.recipient;
|
|
199
|
+
if (!board_id || !board_info_id)
|
|
200
|
+
throw new Error('Internal server error');
|
|
201
|
+
_b = recipient || {}, id = _b.id, type = _b.type;
|
|
202
|
+
return [4, Promise.all([
|
|
203
|
+
API.boardService.retrieveBoardInfoStatus(board_id),
|
|
204
|
+
thunkApi.dispatch(retrieveBoardDetails({ boardId: board_id, individualId: id, individualType: type })).unwrap()
|
|
205
|
+
])];
|
|
184
206
|
case 1:
|
|
185
|
-
data =
|
|
207
|
+
data = (_c.sent())[0];
|
|
186
208
|
thunkApi.dispatch(handlePrevScreenStep());
|
|
187
209
|
return [2, { flows: (data === null || data === void 0 ? void 0 : data.info) || [] }];
|
|
188
210
|
}
|
|
189
211
|
});
|
|
190
212
|
}); });
|
|
191
|
-
export var retrieveBoardDetails = createAsyncThunk('bank/retrieveBoardDetails', function (
|
|
192
|
-
var
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
213
|
+
export var retrieveBoardDetails = createAsyncThunk('bank/retrieveBoardDetails', function (_a) {
|
|
214
|
+
var boardId = _a.boardId, id = _a.individualId, type = _a.individualType;
|
|
215
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
216
|
+
var data, individualData, boardData, serviceCallBack, _b, boardRes, individualRes;
|
|
217
|
+
var _c, _d, _e;
|
|
218
|
+
return __generator(this, function (_f) {
|
|
219
|
+
switch (_f.label) {
|
|
220
|
+
case 0: return [4, API.boardService.retrieveBoardDetails(boardId)];
|
|
221
|
+
case 1:
|
|
222
|
+
data = _f.sent();
|
|
223
|
+
individualData = data === null || data === void 0 ? void 0 : data.user;
|
|
224
|
+
boardData = data;
|
|
225
|
+
if (!(((_c = data === null || data === void 0 ? void 0 : data.user) === null || _c === void 0 ? void 0 : _c.id) !== id)) return [3, 3];
|
|
226
|
+
serviceCallBack = function () { return API.individualService.retrieveIndividual(id, type); };
|
|
227
|
+
return [4, retrieveIndividualData(type, data, serviceCallBack)];
|
|
228
|
+
case 2:
|
|
229
|
+
_b = _f.sent(), boardRes = _b.boardRes, individualRes = _b.individualRes;
|
|
230
|
+
individualData = individualRes;
|
|
231
|
+
boardData = boardRes;
|
|
232
|
+
_f.label = 3;
|
|
233
|
+
case 3: return [2, __assign(__assign({}, boardData), { brand: boardData === null || boardData === void 0 ? void 0 : boardData.brand, bank_account: boardData === null || boardData === void 0 ? void 0 : boardData.bank_account, entity: boardData === null || boardData === void 0 ? void 0 : boardData.entity, merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant, name: (_d = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _d === void 0 ? void 0 : _d.names, business: boardData === null || boardData === void 0 ? void 0 : boardData.business, individuals: boardData === null || boardData === void 0 ? void 0 : boardData.individuals, contact: (_e = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _e === void 0 ? void 0 : _e.contact, user: individualData, board_status: boardData === null || boardData === void 0 ? void 0 : boardData.status })];
|
|
234
|
+
}
|
|
235
|
+
});
|
|
203
236
|
});
|
|
204
|
-
});
|
|
237
|
+
});
|
|
205
238
|
export var createBankAccount = createAsyncThunk('createBankAccount', function (_a, thunkApi) {
|
|
206
|
-
var formData = _a.formData, originalFormData = _a.originalFormData;
|
|
239
|
+
var formData = _a.formData, originalFormData = _a.originalFormData, isDirty = _a.isDirty;
|
|
207
240
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
208
|
-
var _b, settings, bank, iban, beneficiaryName, bankName, bankStatementId, confirmPolicy, _c, bank_account,
|
|
209
|
-
var _e, _f
|
|
210
|
-
return __generator(this, function (
|
|
211
|
-
switch (
|
|
241
|
+
var _b, settings, bank, iban, beneficiaryName, bankName, bankStatementId, confirmPolicy, _c, bank_account, wallet_id, recipient, _d, data_status, document, isIBANMasked, isIBANNonEditable, isBeneficiaryNameNonEditable, isBankNameNonEditable, isBankStatementIdNonEditable, isConfirmPolicyNonEditable, documentResponse, data, hasDocument, documentId, requestBody, documentBody;
|
|
242
|
+
var _e, _f;
|
|
243
|
+
return __generator(this, function (_g) {
|
|
244
|
+
switch (_g.label) {
|
|
212
245
|
case 0:
|
|
213
246
|
_b = thunkApi.getState(), settings = _b.settings, bank = _b.bank;
|
|
214
247
|
iban = formData.iban, beneficiaryName = formData.beneficiaryName, bankName = formData.bankName, bankStatementId = formData.bankStatementId, confirmPolicy = formData.confirmPolicy;
|
|
215
|
-
_c = bank.data.verify.responseBody || {}, bank_account = _c.bank_account,
|
|
248
|
+
_c = bank.data.verify.responseBody || {}, bank_account = _c.bank_account, wallet_id = _c.wallet_id, recipient = _c.recipient;
|
|
216
249
|
_d = bank_account || {}, data_status = _d.data_status, document = _d.document;
|
|
217
250
|
isIBANMasked = isStringHasOneAsterisk(iban);
|
|
218
251
|
isIBANNonEditable = hasNoneEditableValue(data_status, 'iban');
|
|
@@ -221,14 +254,16 @@ export var createBankAccount = createAsyncThunk('createBankAccount', function (_
|
|
|
221
254
|
isBankStatementIdNonEditable = hasNoneEditableValue(data_status, 'bank_statement_file_id');
|
|
222
255
|
isConfirmPolicyNonEditable = hasNoneEditableValue(data_status, 'is_acknowledged');
|
|
223
256
|
documentResponse = undefined;
|
|
224
|
-
|
|
257
|
+
data = bank_account || {};
|
|
258
|
+
hasDocument = !isBankStatementIdNonEditable && (bankStatementId || []).length > 0;
|
|
225
259
|
documentId = document === null || document === void 0 ? void 0 : document.id;
|
|
226
260
|
requestBody = {
|
|
227
|
-
wallet_id:
|
|
261
|
+
wallet_id: wallet_id,
|
|
228
262
|
bank_account: __assign(__assign({ iban: isIBANNonEditable || isIBANMasked ? undefined : iban, beneficiary_name: isBeneficiaryNameNonEditable ? undefined : beneficiaryName, bank_name: isBankNameNonEditable ? undefined : bankName }, (!isConfirmPolicyNonEditable && {
|
|
229
|
-
acknowledged_by:
|
|
263
|
+
acknowledged_by: recipient === null || recipient === void 0 ? void 0 : recipient.id,
|
|
230
264
|
is_acknowledged: confirmPolicy
|
|
231
|
-
})), (!
|
|
265
|
+
})), (!documentId &&
|
|
266
|
+
hasDocument && {
|
|
232
267
|
document: {
|
|
233
268
|
type: DocumentPurpose.BANK_STATEMENT,
|
|
234
269
|
files: bankStatementId || []
|
|
@@ -237,24 +272,25 @@ export var createBankAccount = createAsyncThunk('createBankAccount', function (_
|
|
|
237
272
|
step_name: BANK_STEP_NAMES.BANK_INFO,
|
|
238
273
|
encryption_contract: ['bank_account.iban', 'bank_account.beneficiary_name', 'bank_account.bank_name']
|
|
239
274
|
};
|
|
275
|
+
if (!(isDirty || (!documentId && hasDocument))) return [3, 2];
|
|
240
276
|
return [4, API.entityService.createBankAccount(requestBody)];
|
|
241
277
|
case 1:
|
|
242
|
-
data =
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
if (!(
|
|
278
|
+
data = _g.sent();
|
|
279
|
+
_g.label = 2;
|
|
280
|
+
case 2:
|
|
281
|
+
if (!(documentId && hasDocument)) return [3, 4];
|
|
246
282
|
documentBody = {
|
|
247
283
|
id: documentId,
|
|
248
284
|
files: bankStatementId || []
|
|
249
285
|
};
|
|
250
286
|
return [4, API.documentService.addFilesToExistingDocument(documentBody)];
|
|
251
|
-
case 2:
|
|
252
|
-
documentResponse = _p.sent();
|
|
253
|
-
_p.label = 3;
|
|
254
287
|
case 3:
|
|
255
|
-
|
|
288
|
+
documentResponse = _g.sent();
|
|
289
|
+
_g.label = 4;
|
|
290
|
+
case 4:
|
|
291
|
+
data = __assign(__assign({}, data), { documentResponse: documentResponse });
|
|
256
292
|
thunkApi.dispatch(handleNextScreenStep());
|
|
257
|
-
(
|
|
293
|
+
(_f = (_e = settings.data.appConfig).onStepCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, settings.data.activeScreen.name, requestBody);
|
|
258
294
|
return [2, { data: data, formData: originalFormData }];
|
|
259
295
|
}
|
|
260
296
|
});
|
|
@@ -281,33 +317,45 @@ export var checkIbanBank = createAsyncThunk('checkIbanBank', function (_a) {
|
|
|
281
317
|
});
|
|
282
318
|
});
|
|
283
319
|
export var updateBoardSuccess = createAsyncThunk('updateBoardBankSuccess', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
284
|
-
var _a, settings, bank, _b,
|
|
285
|
-
var
|
|
286
|
-
return __generator(this, function (
|
|
287
|
-
switch (
|
|
320
|
+
var _a, settings, bank, _b, board_id, infoId, _c, showBoard, mode, payload, data, _d, id, type, boardInfoStatusData;
|
|
321
|
+
var _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
322
|
+
return __generator(this, function (_p) {
|
|
323
|
+
switch (_p.label) {
|
|
288
324
|
case 0:
|
|
289
325
|
_a = thunkApi.getState(), settings = _a.settings, bank = _a.bank;
|
|
290
|
-
_b = bank.data.verify.responseBody || {},
|
|
291
|
-
|
|
326
|
+
_b = bank.data.verify.responseBody || {}, board_id = _b.board_id, infoId = _b.board_info_id;
|
|
327
|
+
_c = settings.data.appConfig, showBoard = _c.showBoard, mode = _c.mode;
|
|
328
|
+
if (!board_id)
|
|
292
329
|
return [2];
|
|
293
330
|
payload = {
|
|
294
331
|
lang: settings.data.language,
|
|
295
|
-
step_name: BANK_STEP_NAMES.BANK_SUCCESS
|
|
296
|
-
id: id
|
|
332
|
+
step_name: BANK_STEP_NAMES.BANK_SUCCESS
|
|
297
333
|
};
|
|
298
|
-
return [4, API.boardService.updateBoardInfo(__assign({ id:
|
|
334
|
+
return [4, API.boardService.updateBoardInfo(__assign({ id: board_id, infoId: infoId }, payload))];
|
|
299
335
|
case 1:
|
|
300
|
-
data =
|
|
301
|
-
|
|
336
|
+
data = _p.sent();
|
|
337
|
+
sendCustomEventToGTM({
|
|
338
|
+
event: 'Send Event',
|
|
339
|
+
event_category: 'Board Flows - Wallet',
|
|
340
|
+
event_action: 'Wallet Update Success Page',
|
|
341
|
+
event_label: settings.data.businessCountry.iso2
|
|
342
|
+
});
|
|
343
|
+
if (!showBoard && mode === 'content') {
|
|
344
|
+
(_f = (_e = settings.data.appConfig).onStepCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, settings.data.activeScreen.name, {});
|
|
345
|
+
(_h = (_g = settings.data.appConfig).onFlowCompleted) === null || _h === void 0 ? void 0 : _h.call(_g, { data: data });
|
|
346
|
+
return [2, { data: data }];
|
|
347
|
+
}
|
|
348
|
+
_d = ((_j = data === null || data === void 0 ? void 0 : data.notification) === null || _j === void 0 ? void 0 : _j.recipient) || {}, id = _d.id, type = _d.type;
|
|
349
|
+
return [4, Promise.all([
|
|
350
|
+
API.boardService.retrieveBoardInfoStatus(board_id),
|
|
351
|
+
thunkApi.dispatch(retrieveBoardDetails({ boardId: board_id, individualId: id, individualType: type })).unwrap()
|
|
352
|
+
])];
|
|
302
353
|
case 2:
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
_g.sent();
|
|
307
|
-
(_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, {});
|
|
308
|
-
(_f = (_e = settings.data.appConfig).onFlowCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, { data: data });
|
|
354
|
+
boardInfoStatusData = (_p.sent())[0];
|
|
355
|
+
(_l = (_k = settings.data.appConfig).onStepCompleted) === null || _l === void 0 ? void 0 : _l.call(_k, settings.data.activeScreen.name, {});
|
|
356
|
+
(_o = (_m = settings.data.appConfig).onFlowCompleted) === null || _o === void 0 ? void 0 : _o.call(_m, { data: data });
|
|
309
357
|
thunkApi.dispatch(handleNextScreenStep());
|
|
310
|
-
return [2, {
|
|
358
|
+
return [2, { data: data, flows: (boardInfoStatusData === null || boardInfoStatusData === void 0 ? void 0 : boardInfoStatusData.info) || [] }];
|
|
311
359
|
}
|
|
312
360
|
});
|
|
313
361
|
}); });
|
|
@@ -370,23 +418,17 @@ export var bankSlice = createSlice({
|
|
|
370
418
|
state.customLoading = true;
|
|
371
419
|
})
|
|
372
420
|
.addCase(verifyLeadToken.fulfilled, function (state, action) {
|
|
373
|
-
var _a;
|
|
374
421
|
state.error = null;
|
|
375
422
|
state.customLoading = false;
|
|
376
|
-
var
|
|
377
|
-
var
|
|
378
|
-
if (description) {
|
|
379
|
-
state.error = description;
|
|
380
|
-
return;
|
|
381
|
-
}
|
|
382
|
-
state.data.verify.responseBody = __assign(__assign(__assign(__assign({}, data), boardResponse), state.data.verify.responseBody), { board_id: data.id, individualData: individualData });
|
|
383
|
-
state.data.verify.token = token;
|
|
384
|
-
var _c = (boardResponse === null || boardResponse === void 0 ? void 0 : boardResponse.bank_account) || {}, bank_name = _c.bank_name, beneficiary_name = _c.beneficiary_name, iban = _c.iban, is_acknowledged = _c.is_acknowledged;
|
|
423
|
+
var _a = action.payload || {}, data = _a.data, token = _a.token, bank_account = _a.bankData;
|
|
424
|
+
var _b = bank_account || {}, bank_name = _b.bank_name, beneficiary_name = _b.beneficiary_name, iban = _b.iban, is_acknowledged = _b.is_acknowledged;
|
|
385
425
|
state.data.bankData.bankName = bank_name || '';
|
|
386
426
|
state.data.bankData.beneficiaryName = beneficiary_name || '';
|
|
387
427
|
state.data.bankData.iban = iban || '';
|
|
388
428
|
if (is_acknowledged)
|
|
389
429
|
state.data.bankData.confirmPolicy = is_acknowledged;
|
|
430
|
+
state.data.verify.responseBody = __assign(__assign(__assign({}, data), state.data.verify.responseBody), { bank_account: bank_account, board_id: data.id });
|
|
431
|
+
state.data.verify.token = token;
|
|
390
432
|
})
|
|
391
433
|
.addCase(verifyLeadToken.rejected, function (state, action) {
|
|
392
434
|
state.error = action.error.message;
|
|
@@ -414,17 +456,18 @@ export var bankSlice = createSlice({
|
|
|
414
456
|
state.error = null;
|
|
415
457
|
})
|
|
416
458
|
.addCase(verifyBankLeadOTP.fulfilled, function (state, action) {
|
|
417
|
-
var _a;
|
|
418
459
|
state.loading = false;
|
|
419
460
|
state.error = null;
|
|
420
|
-
var
|
|
421
|
-
var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
|
|
422
|
-
if (description) {
|
|
423
|
-
state.error = description;
|
|
424
|
-
return;
|
|
425
|
-
}
|
|
461
|
+
var _a = action.payload, data = _a.data, bank_account = _a.bankData, formData = _a.formData;
|
|
426
462
|
state.data.otpData = formData;
|
|
427
463
|
state.data.otpData.responseBody = data;
|
|
464
|
+
var _b = bank_account || {}, bank_name = _b.bank_name, beneficiary_name = _b.beneficiary_name, iban = _b.iban, is_acknowledged = _b.is_acknowledged;
|
|
465
|
+
state.data.bankData.bankName = bank_name || '';
|
|
466
|
+
state.data.bankData.beneficiaryName = beneficiary_name || '';
|
|
467
|
+
state.data.bankData.iban = iban || '';
|
|
468
|
+
if (is_acknowledged)
|
|
469
|
+
state.data.bankData.confirmPolicy = is_acknowledged;
|
|
470
|
+
state.data.verify.responseBody = __assign(__assign(__assign({}, data), state.data.verify.responseBody), { bank_account: bank_account, board_id: data.id });
|
|
428
471
|
})
|
|
429
472
|
.addCase(verifyBankLeadOTP.rejected, function (state, action) {
|
|
430
473
|
state.loading = false;
|
|
@@ -437,7 +480,7 @@ export var bankSlice = createSlice({
|
|
|
437
480
|
.addCase(retrieveBoardDetails.fulfilled, function (state, action) {
|
|
438
481
|
state.error = null;
|
|
439
482
|
state.loading = false;
|
|
440
|
-
var data =
|
|
483
|
+
var data = action.payload || {};
|
|
441
484
|
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), data);
|
|
442
485
|
})
|
|
443
486
|
.addCase(retrieveBoardDetails.rejected, function (state, action) {
|
|
@@ -462,18 +505,8 @@ export var bankSlice = createSlice({
|
|
|
462
505
|
var _a;
|
|
463
506
|
state.loading = false;
|
|
464
507
|
state.error = null;
|
|
465
|
-
var
|
|
466
|
-
|
|
467
|
-
if (description) {
|
|
468
|
-
state.error = description;
|
|
469
|
-
return;
|
|
470
|
-
}
|
|
471
|
-
var flows = response.flows;
|
|
472
|
-
var _b = state.data.verify.responseBody || {}, individuals = _b.individuals, individualData = _b.individualData;
|
|
473
|
-
var data_state = (((individualData === null || individualData === void 0 ? void 0 : individualData.is_authorized) ? individuals : individualData) || {}).data_state;
|
|
474
|
-
state.data.verify.responseBody = __assign(__assign(__assign(__assign({}, state.data.verify.responseBody), { flows: flows }), (individualData && { user: individualData })), (data_state && {
|
|
475
|
-
individuals: __assign(__assign({}, individuals), { data_state: data_state })
|
|
476
|
-
}));
|
|
508
|
+
var _b = action.payload || {}, flows = _b.flows, data = _b.data;
|
|
509
|
+
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { flows: flows, recipient: (_a = data === null || data === void 0 ? void 0 : data.notification) === null || _a === void 0 ? void 0 : _a.recipient });
|
|
477
510
|
})
|
|
478
511
|
.addCase(updateBoardSuccess.pending, function (state) {
|
|
479
512
|
state.loading = true;
|
|
@@ -491,7 +524,7 @@ export var bankSlice = createSlice({
|
|
|
491
524
|
state.loading = false;
|
|
492
525
|
state.error = null;
|
|
493
526
|
var _a = action.payload, data = _a.data, formData = _a.formData;
|
|
494
|
-
state.data.bankData = formData;
|
|
527
|
+
state.data.bankData = __assign(__assign({}, formData), { bankStatementId: undefined });
|
|
495
528
|
state.data.bankData.responseBody = data;
|
|
496
529
|
})
|
|
497
530
|
.addCase(createBankAccount.rejected, function (state, action) {
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { RootState } from '../../../app/store';
|
|
2
2
|
import { FlowsTypes, OTPFormValues, ResponseData, SharedState } from '../../../@types';
|
|
3
|
-
|
|
3
|
+
interface CreateVerifyTokenByProps {
|
|
4
|
+
boardId: string;
|
|
5
|
+
isInternally?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const createVerifyTokenBy: import("@reduxjs/toolkit").AsyncThunk<any, CreateVerifyTokenByProps, {
|
|
4
8
|
state?: unknown;
|
|
5
9
|
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
6
10
|
extra?: unknown;
|