@tap-payments/auth-jsconnect 2.6.102-test → 2.7.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/build/@types/app.d.ts +47 -14
- package/build/@types/app.js +16 -0
- package/build/@types/config.d.ts +49 -0
- package/build/@types/config.js +1 -0
- package/build/@types/form.d.ts +11 -1
- package/build/@types/index.d.ts +1 -0
- package/build/@types/index.js +1 -0
- package/build/@types/redux.d.ts +1 -0
- package/build/@types/theme.d.ts +4 -0
- package/build/@types/theme.js +5 -0
- package/build/api/account.d.ts +4 -0
- package/build/api/account.js +9 -2
- package/build/api/auth.d.ts +35 -20
- package/build/api/auth.js +1 -1
- 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 +13 -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 +3 -2
- package/build/app/settings.js +64 -31
- 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 +11 -6
- 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 +6 -4
- package/build/components/AnimationFlow/Dialog.js +9 -7
- 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 +29 -8
- package/build/features/app/auth/authStore.js +454 -136
- 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 +37 -15
- package/build/features/app/business/businessStore.js +407 -223
- package/build/features/app/connect/connectStore.d.ts +33 -5
- package/build/features/app/connect/connectStore.js +316 -93
- package/build/features/app/connectExpress/connectExpressStore.d.ts +53 -23
- package/build/features/app/connectExpress/connectExpressStore.js +604 -345
- 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 +67 -0
- package/build/features/app/kyc/kycStore.js +408 -0
- package/build/features/app/password/passwordStore.d.ts +33 -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 +44 -20
- 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/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 +5 -5
- package/build/features/brand/screens/BrandActivities/BrandActivities.js +48 -11
- package/build/features/brand/screens/BrandActivities/CustomerBase.d.ts +6 -6
- 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 +4 -4
- package/build/features/brand/screens/BrandActivities/RefundPolicy.js +1 -1
- package/build/features/brand/screens/BrandActivities/TAC.d.ts +1 -1
- 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 +4 -4
- package/build/features/business/screens/Activities/ActivitiesList.js +1 -1
- package/build/features/business/screens/Activities/OperationStartDate.d.ts +5 -3
- package/build/features/business/screens/Activities/OperationStartDate.js +2 -2
- package/build/features/business/screens/BrandDetails/SalesChannel.d.ts +2 -2
- 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/Customers/CustomerLocations.d.ts +10 -8
- 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 +12 -5
- 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 +3 -0
- package/build/features/business/screens/MobileOwnership/CollectMobileOwnership.js +105 -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 +21 -14
- package/build/features/connect/screens/BusinessCountry/BusinessCountry.js +7 -1
- package/build/features/connect/screens/CivilID/CivilID.js +6 -1
- package/build/features/{auth/screens/NID → connect/screens/DOB}/DOB.d.ts +1 -2
- 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 +3 -0
- package/build/features/connect/screens/MobileOwnership/CollectMobileOwnership.js +106 -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 +64 -41
- package/build/features/connectExpress/screens/AccountAlreadyCreated/AccountAlreadyCreated.js +14 -2
- 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/TAC.d.ts +1 -1
- 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/{NID → DOB}/DOB.d.ts +1 -2
- 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 +3 -0
- package/build/features/connectExpress/screens/MobileOwnership/CollectMobileOwnership.js +108 -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 +1 -1
- 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 +4 -4
- 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 +5 -5
- package/build/features/entity/screens/EntityName/EntityTypeList.js +2 -3
- package/build/features/entity/screens/EntityName/ExpiryDate.d.ts +2 -2
- package/build/features/entity/screens/EntityName/ExpiryDate.js +13 -8
- package/build/features/entity/screens/EntityName/IssuingDate.d.ts +2 -2
- 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 +2 -2
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +44 -11
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +5 -2
- 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 +4 -4
- 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/IndividualPersonalInfo.d.ts +2 -2
- 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 +11 -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 +5 -5
- package/build/features/shared/Address/InputSelect.d.ts +5 -5
- 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 +8 -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 +2 -1
- package/build/features/shared/Containers/FeatureContainer.js +5 -3
- package/build/features/shared/Containers/ScreenContainer.d.ts +1 -1
- 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 +1 -1
- package/build/features/shared/UploadFile/UploadFile.d.ts +1 -1
- package/build/features/shared/UploadFile/UploadWrapper.d.ts +1 -1
- package/build/features/shared/UploadMultipleFile/UploadFile.d.ts +1 -1
- package/build/features/shared/UploadMultipleFile/UploadMultipleFile.d.ts +1 -1
- 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 +3 -3
- 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/device.d.ts +2 -0
- package/build/utils/device.js +6 -0
- 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/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/shared/Button/AbsherButton.d.ts +0 -8
- /package/build/features/{connect/screens/NID → auth/screens/DOB}/DOB.d.ts +0 -0
|
@@ -59,9 +59,9 @@ import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
|
59
59
|
import { handleNextScreenStep, handleCurrentActiveScreen, handleOpen, handleSetCountryByIso2, onCloseComplete, storeAuthId } from '../../../app/settings';
|
|
60
60
|
import { FlowsTypes, AuthForType, BusinessType, LicenseType } from '../../../@types';
|
|
61
61
|
import API from '../../../api';
|
|
62
|
-
import { ADD_NEW_ENTITY, CONNECT_EXPRESS_STEP_NAMES, IDENTIFICATION_TYPE, OTHER_CR_LICENSE, OTHER_FL_LICENSE, SCOPE_AUTH } from '../../../constants';
|
|
62
|
+
import { ADD_NEW_ENTITY, COLLECT_DOB_INFO_NAFATH, CONNECT_EXPRESS_STEP_NAMES, IDENTIFICATION_TYPE, NAFATH_VERIFICATION_FAILED, OTHER_CR_LICENSE, OTHER_FL_LICENSE, SCOPE_AUTH } from '../../../constants';
|
|
63
63
|
import { defaultCountry } from '../../../constants';
|
|
64
|
-
import { getIndividualName, capitalizeTheFirstLetterOfEachWord, sleep, findCountryByIddPrefix, concatenateObjectValues, isSA, isKW, isOtherThanKWOrSA } from '../../../utils';
|
|
64
|
+
import { getIndividualName, capitalizeTheFirstLetterOfEachWord, sleep, findCountryByIddPrefix, concatenateObjectValues, isSA, isKW, isOtherThanKWOrSA, sendCustomEventToGTM, sendCustomDimension, getMetaData } from '../../../utils';
|
|
65
65
|
export var updateBusinessCountryAsync = createAsyncThunk('connectExpress/updateBusinessCountryAsync', function (countryCode, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
66
66
|
var connectExpress, payload, data;
|
|
67
67
|
return __generator(this, function (_a) {
|
|
@@ -81,25 +81,25 @@ export var updateBusinessCountryAsync = createAsyncThunk('connectExpress/updateB
|
|
|
81
81
|
});
|
|
82
82
|
}); });
|
|
83
83
|
export var retrieveLeadIdentityByIdAsync = createAsyncThunk('expressConnect/retrieveLeadIdentityByIdAsync', function (leadId, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
84
|
-
var
|
|
85
|
-
var _d, _e, _f, _g
|
|
86
|
-
return __generator(this, function (
|
|
87
|
-
switch (
|
|
84
|
+
var settings, countryCode, showBoard, data, _a, country_code, contact, phone, status, board_id, board_info_id, isRegistered, screen_1, _b, boardInfo, boardData, error_1;
|
|
85
|
+
var _c, _d, _e, _f, _g;
|
|
86
|
+
return __generator(this, function (_h) {
|
|
87
|
+
switch (_h.label) {
|
|
88
88
|
case 0:
|
|
89
|
-
|
|
89
|
+
settings = thunkApi.getState().settings;
|
|
90
90
|
countryCode = settings.data.businessCountry;
|
|
91
|
-
showBoard =
|
|
91
|
+
showBoard = settings.data.appConfig.showBoard;
|
|
92
92
|
return [4, API.leadService.retrieveLeadIdentity(leadId)];
|
|
93
93
|
case 1:
|
|
94
|
-
data =
|
|
95
|
-
|
|
94
|
+
data = _h.sent();
|
|
95
|
+
_a = data || {}, country_code = _a.country_code, contact = _a.contact;
|
|
96
96
|
if (country_code)
|
|
97
97
|
thunkApi.dispatch(handleSetCountryByIso2(country_code));
|
|
98
98
|
phone = (contact || {}).phone;
|
|
99
99
|
if (phone === null || phone === void 0 ? void 0 : phone.country_code)
|
|
100
100
|
countryCode = findCountryByIddPrefix(settings.data.countries, phone.country_code);
|
|
101
101
|
status = data.status, board_id = data.board_id, board_info_id = data.board_info_id;
|
|
102
|
-
if (!
|
|
102
|
+
if (!country_code && !((_c = settings.data.businessCountry) === null || _c === void 0 ? void 0 : _c.iso2)) {
|
|
103
103
|
thunkApi.dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_BUSINESS_COUNTRY_STEP'));
|
|
104
104
|
return [2, { data: data, countryCode: countryCode }];
|
|
105
105
|
}
|
|
@@ -108,22 +108,27 @@ export var retrieveLeadIdentityByIdAsync = createAsyncThunk('expressConnect/retr
|
|
|
108
108
|
thunkApi.dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_MOBILE_STEP'));
|
|
109
109
|
return [2, { data: data, countryCode: countryCode }];
|
|
110
110
|
}
|
|
111
|
-
if (!isRegistered &&
|
|
112
|
-
|
|
113
|
-
if (
|
|
114
|
-
|
|
111
|
+
if (!isRegistered && country_code) {
|
|
112
|
+
screen_1 = 'CONNECT_EXPRESS_NID_STEP';
|
|
113
|
+
if (!isSA(data.country_code))
|
|
114
|
+
screen_1 = 'CONNECT_EXPRESS_MOBILE_STEP';
|
|
115
|
+
thunkApi.dispatch(handleCurrentActiveScreen(screen_1));
|
|
115
116
|
return [2, { data: data, countryCode: countryCode }];
|
|
116
117
|
}
|
|
117
|
-
if (!isRegistered && (
|
|
118
|
+
if (!isRegistered && !isSA(settings.data.businessCountry.iso2)) {
|
|
118
119
|
thunkApi.dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_MOBILE_STEP'));
|
|
119
120
|
return [2, { data: data, countryCode: countryCode }];
|
|
120
121
|
}
|
|
121
|
-
if (
|
|
122
|
-
thunkApi.dispatch(
|
|
122
|
+
if (!isRegistered && isSA(settings.data.businessCountry.iso2)) {
|
|
123
|
+
thunkApi.dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_NID_STEP'));
|
|
124
|
+
return [2, { data: data, countryCode: countryCode }];
|
|
125
|
+
}
|
|
126
|
+
if ((_d = data === null || data === void 0 ? void 0 : data.identification) === null || _d === void 0 ? void 0 : _d.authentication_id) {
|
|
127
|
+
thunkApi.dispatch(storeAuthId((_e = data === null || data === void 0 ? void 0 : data.identification) === null || _e === void 0 ? void 0 : _e.authentication_id));
|
|
123
128
|
}
|
|
124
129
|
if (isRegistered && !showBoard) {
|
|
125
|
-
(
|
|
126
|
-
thunkApi.dispatch(
|
|
130
|
+
(_g = (_f = settings.data.appConfig).onFlowCompleted) === null || _g === void 0 ? void 0 : _g.call(_f, data);
|
|
131
|
+
thunkApi.dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_ACCOUNT_ALREADY_CREATED_STEP'));
|
|
127
132
|
return [2, { data: data, countryCode: countryCode }];
|
|
128
133
|
}
|
|
129
134
|
if (isRegistered && !(board_id && board_info_id)) {
|
|
@@ -131,19 +136,19 @@ export var retrieveLeadIdentityByIdAsync = createAsyncThunk('expressConnect/retr
|
|
|
131
136
|
return [2, { data: data, countryCode: countryCode }];
|
|
132
137
|
}
|
|
133
138
|
if (!(isRegistered && board_id && board_info_id)) return [3, 5];
|
|
134
|
-
|
|
139
|
+
_h.label = 2;
|
|
135
140
|
case 2:
|
|
136
|
-
|
|
141
|
+
_h.trys.push([2, 4, , 5]);
|
|
137
142
|
return [4, Promise.all([
|
|
138
143
|
API.boardService.retrieveBoardInfo({ id: board_id, infoId: board_info_id }),
|
|
139
144
|
API.boardService.retrieveBoardDetails(board_id)
|
|
140
145
|
])];
|
|
141
146
|
case 3:
|
|
142
|
-
|
|
147
|
+
_b = _h.sent(), boardInfo = _b[0], boardData = _b[1];
|
|
143
148
|
thunkApi.dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_SUCCESS_WITH_FLOW_BUTTONS_STEP'));
|
|
144
149
|
return [2, { data: data, countryCode: countryCode, boardInfo: boardInfo, boardData: boardData }];
|
|
145
150
|
case 4:
|
|
146
|
-
error_1 =
|
|
151
|
+
error_1 = _h.sent();
|
|
147
152
|
thunkApi.dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_ACCOUNT_ALREADY_CREATED_STEP'));
|
|
148
153
|
return [2, { data: data, countryCode: countryCode }];
|
|
149
154
|
case 5: return [2, { data: data, countryCode: countryCode }];
|
|
@@ -216,20 +221,26 @@ export var retrieveAuthenticationListAsync = createAsyncThunk('connectExpress/re
|
|
|
216
221
|
export var getMerchantListAsync = createAsyncThunk('connectExpress/getMerchantListAsync', function (_a, thunkApi) {
|
|
217
222
|
var brandInfo = _a.brandInfo, entityInfo = _a.entityInfo;
|
|
218
223
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
219
|
-
var settings, payload, merchants, list;
|
|
220
|
-
|
|
221
|
-
|
|
224
|
+
var _b, settings, connectExpress, leadId, platforms, payment_provider, payload, merchants, list;
|
|
225
|
+
var _c, _d, _e, _f, _g, _h, _j, _k;
|
|
226
|
+
return __generator(this, function (_l) {
|
|
227
|
+
switch (_l.label) {
|
|
222
228
|
case 0:
|
|
223
|
-
|
|
229
|
+
_b = thunkApi.getState(), settings = _b.settings, connectExpress = _b.connectExpress;
|
|
230
|
+
leadId = (_d = (_c = connectExpress.data.responseData) === null || _c === void 0 ? void 0 : _c.authData) === null || _d === void 0 ? void 0 : _d.lead_id;
|
|
231
|
+
platforms = (_g = (_f = (_e = connectExpress.data.responseData) === null || _e === void 0 ? void 0 : _e.leadData) === null || _f === void 0 ? void 0 : _f.platforms) !== null && _g !== void 0 ? _g : settings.data.appConfig.platforms;
|
|
232
|
+
payment_provider = (_k = (_j = (_h = connectExpress.data.responseData) === null || _h === void 0 ? void 0 : _h.leadData) === null || _j === void 0 ? void 0 : _j.payment_provider) !== null && _k !== void 0 ? _k : settings.data.appConfig.paymentProvider;
|
|
224
233
|
payload = {
|
|
225
234
|
business_entity_id: (entityInfo === null || entityInfo === void 0 ? void 0 : entityInfo.id) || '',
|
|
226
235
|
brand_id: (brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.id) || '',
|
|
236
|
+
lead_id: leadId || '',
|
|
227
237
|
create_if_not_present: true,
|
|
228
|
-
platforms:
|
|
238
|
+
platforms: platforms,
|
|
239
|
+
payment_provider: payment_provider
|
|
229
240
|
};
|
|
230
241
|
return [4, API.entityService.getMerchantListUsingEntityId(payload)];
|
|
231
242
|
case 1:
|
|
232
|
-
merchants = (
|
|
243
|
+
merchants = (_l.sent()).merchants;
|
|
233
244
|
list = merchants || [];
|
|
234
245
|
if ((list === null || list === void 0 ? void 0 : list.length) > 1) {
|
|
235
246
|
thunkApi.dispatch(handleNextScreenStep('CONNECT_EXPRESS_AUTH_MERCHANT_LIST_STEP'));
|
|
@@ -242,19 +253,21 @@ export var getMerchantListAsync = createAsyncThunk('connectExpress/getMerchantLi
|
|
|
242
253
|
});
|
|
243
254
|
});
|
|
244
255
|
export var createMobileAuthAsync = createAsyncThunk('connectExpress/createMobileAuthAsync', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
245
|
-
var _a, settings, connectExpress, requestBody, data;
|
|
246
|
-
var _b, _c;
|
|
247
|
-
return __generator(this, function (
|
|
248
|
-
switch (
|
|
256
|
+
var _a, settings, connectExpress, isStartWithZero, mobileNumber, requestBody, data;
|
|
257
|
+
var _b, _c, _d;
|
|
258
|
+
return __generator(this, function (_e) {
|
|
259
|
+
switch (_e.label) {
|
|
249
260
|
case 0:
|
|
250
261
|
_a = thunkApi.getState(), settings = _a.settings, connectExpress = _a.connectExpress;
|
|
262
|
+
isStartWithZero = (_b = params.mobile) === null || _b === void 0 ? void 0 : _b.startsWith('0');
|
|
263
|
+
mobileNumber = isStartWithZero ? params.mobile.slice(1) : params.mobile;
|
|
251
264
|
requestBody = {
|
|
252
265
|
country: settings.data.businessCountry.iso2,
|
|
253
266
|
scope: settings.data.appConfig.scope,
|
|
254
267
|
lang: settings.data.language,
|
|
255
268
|
lead_id: connectExpress.data.leadId,
|
|
256
269
|
user_credentail: {
|
|
257
|
-
phone:
|
|
270
|
+
phone: mobileNumber,
|
|
258
271
|
code: params.countryCode.idd_prefix.toString()
|
|
259
272
|
},
|
|
260
273
|
sign_in: false,
|
|
@@ -264,26 +277,29 @@ export var createMobileAuthAsync = createAsyncThunk('connectExpress/createMobile
|
|
|
264
277
|
};
|
|
265
278
|
return [4, API.authService.createExpressAuth(requestBody)];
|
|
266
279
|
case 1:
|
|
267
|
-
data =
|
|
280
|
+
data = _e.sent();
|
|
268
281
|
thunkApi.dispatch(handleNextScreenStep());
|
|
269
|
-
(
|
|
282
|
+
(_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, requestBody.user_credentail);
|
|
270
283
|
return [2, { response: data, formData: params }];
|
|
271
284
|
}
|
|
272
285
|
});
|
|
273
286
|
}); });
|
|
274
287
|
export var resendMobileAuthOTP = createAsyncThunk('connectExpress/resendMobileAuthOTPExpress', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
275
|
-
var _a, settings, connectExpress, requestBody, data;
|
|
276
|
-
|
|
277
|
-
|
|
288
|
+
var _a, settings, connectExpress, isStartWithZero, mobileNumber, requestBody, data;
|
|
289
|
+
var _b;
|
|
290
|
+
return __generator(this, function (_c) {
|
|
291
|
+
switch (_c.label) {
|
|
278
292
|
case 0:
|
|
279
293
|
_a = thunkApi.getState(), settings = _a.settings, connectExpress = _a.connectExpress;
|
|
294
|
+
isStartWithZero = (_b = params.mobile) === null || _b === void 0 ? void 0 : _b.startsWith('0');
|
|
295
|
+
mobileNumber = isStartWithZero ? params.mobile.slice(1) : params.mobile;
|
|
280
296
|
requestBody = {
|
|
281
297
|
country: settings.data.businessCountry.iso2,
|
|
282
298
|
scope: settings.data.appConfig.scope,
|
|
283
299
|
lang: settings.data.language,
|
|
284
300
|
lead_id: connectExpress.data.leadId,
|
|
285
301
|
user_credentail: {
|
|
286
|
-
phone:
|
|
302
|
+
phone: mobileNumber,
|
|
287
303
|
code: params.countryCode.idd_prefix.toString()
|
|
288
304
|
},
|
|
289
305
|
sign_in: false,
|
|
@@ -293,85 +309,125 @@ export var resendMobileAuthOTP = createAsyncThunk('connectExpress/resendMobileAu
|
|
|
293
309
|
};
|
|
294
310
|
return [4, API.authService.createExpressAuth(requestBody)];
|
|
295
311
|
case 1:
|
|
296
|
-
data =
|
|
312
|
+
data = _c.sent();
|
|
297
313
|
return [2, { response: data, formData: params }];
|
|
298
314
|
}
|
|
299
315
|
});
|
|
300
316
|
}); });
|
|
301
|
-
export var
|
|
302
|
-
var _a, settings, connectExpress,
|
|
317
|
+
export var createNafathAuth = createAsyncThunk('connectExpress/createNafathAuth', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
318
|
+
var _a, settings, connectExpress, requestBody, data;
|
|
303
319
|
var _b, _c;
|
|
304
320
|
return __generator(this, function (_d) {
|
|
305
321
|
switch (_d.label) {
|
|
306
322
|
case 0:
|
|
307
323
|
_a = thunkApi.getState(), settings = _a.settings, connectExpress = _a.connectExpress;
|
|
308
|
-
dob = params.dob, nid = params.nid;
|
|
309
|
-
nidType = nid.startsWith('1') ? IDENTIFICATION_TYPE.NID : IDENTIFICATION_TYPE.IQAMA;
|
|
310
|
-
countryCode = settings.data.businessCountry.iso2;
|
|
311
324
|
requestBody = {
|
|
312
|
-
country:
|
|
325
|
+
country: settings.data.businessCountry.iso2,
|
|
313
326
|
scope: settings.data.appConfig.scope,
|
|
314
327
|
lang: settings.data.language,
|
|
315
328
|
lead_id: connectExpress.data.leadId,
|
|
316
329
|
user_credentail: {
|
|
317
|
-
identification_id: nid,
|
|
318
|
-
identification_id_type:
|
|
319
|
-
|
|
320
|
-
country_code: countryCode
|
|
330
|
+
identification_id: params.nid,
|
|
331
|
+
identification_id_type: IDENTIFICATION_TYPE.NAFATH,
|
|
332
|
+
country_code: settings.data.businessCountry.iso2
|
|
321
333
|
},
|
|
322
334
|
sign_in: false,
|
|
323
335
|
is_lead: true,
|
|
324
336
|
step_name: CONNECT_EXPRESS_STEP_NAMES.CREATE_AUTH_NID,
|
|
325
|
-
encryption_contract: [
|
|
326
|
-
'user_credentail.country_code',
|
|
327
|
-
'user_credentail.identification_id',
|
|
328
|
-
'user_credentail.identification_id_type',
|
|
329
|
-
'user_credentail.date_of_birth'
|
|
330
|
-
]
|
|
337
|
+
encryption_contract: ['user_credentail.country_code', 'user_credentail.identification_id', 'user_credentail.identification_id_type']
|
|
331
338
|
};
|
|
332
|
-
return [4, API.authService.
|
|
339
|
+
return [4, API.authService.createAuthKitNID(requestBody)];
|
|
333
340
|
case 1:
|
|
334
341
|
data = _d.sent();
|
|
335
342
|
thunkApi.dispatch(handleNextScreenStep());
|
|
336
|
-
(_c = (_b = settings.data.appConfig).onStepCompleted) === null || _c === void 0 ? void 0 : _c.call(_b, settings.data.activeScreen.name, requestBody
|
|
337
|
-
return [2, { response: data, formData: params }];
|
|
343
|
+
(_c = (_b = settings.data.appConfig).onStepCompleted) === null || _c === void 0 ? void 0 : _c.call(_b, settings.data.activeScreen.name, requestBody);
|
|
344
|
+
return [2, { response: data, formData: __assign(__assign({}, params), { type: IDENTIFICATION_TYPE.NAFATH }) }];
|
|
338
345
|
}
|
|
339
346
|
});
|
|
340
347
|
}); });
|
|
341
|
-
export var
|
|
342
|
-
var _a, settings, connectExpress,
|
|
343
|
-
|
|
344
|
-
|
|
348
|
+
export var verifyNafathAsync = createAsyncThunk('connectExpress/verifyNafathAsync', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
349
|
+
var _a, settings, connectExpress, authData, _b, scope, redirectUrl, authConfigData, isScopeAuthentication, bi, isDataHasIndividualOnly, authDataHasValue, expiry, interval, maxCalls, count, data, isSuccess, isFailed, authId, leadId, urlQueryStart, _c, brandList, entityList, stepName, needToCollectMoreInfo, creatingAccount, askDobInfo;
|
|
350
|
+
var _d, _e, _f, _g, _h, _j, _k, _l;
|
|
351
|
+
return __generator(this, function (_m) {
|
|
352
|
+
switch (_m.label) {
|
|
345
353
|
case 0:
|
|
346
354
|
_a = thunkApi.getState(), settings = _a.settings, connectExpress = _a.connectExpress;
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
date_of_birth: dob,
|
|
359
|
-
country_code: countryCode
|
|
360
|
-
},
|
|
361
|
-
sign_in: false,
|
|
362
|
-
is_lead: true,
|
|
363
|
-
step_name: CONNECT_EXPRESS_STEP_NAMES.CREATE_AUTH_NID,
|
|
364
|
-
encryption_contract: [
|
|
365
|
-
'user_credentail.country_code',
|
|
366
|
-
'user_credentail.identification_id',
|
|
367
|
-
'user_credentail.identification_id_type',
|
|
368
|
-
'user_credentail.date_of_birth'
|
|
369
|
-
]
|
|
370
|
-
};
|
|
371
|
-
return [4, API.authService.createExpressAuth(requestBody)];
|
|
355
|
+
authData = (connectExpress.data.responseData || {}).authData;
|
|
356
|
+
_b = settings.data.appConfig, scope = _b.scope, redirectUrl = _b.redirectUrl, authConfigData = _b.data;
|
|
357
|
+
isScopeAuthentication = scope === SCOPE_AUTH;
|
|
358
|
+
bi = settings.data.deviceInfo.browser.browser_id;
|
|
359
|
+
isDataHasIndividualOnly = (authConfigData === null || authConfigData === void 0 ? void 0 : authConfigData.length) === 1 && authConfigData.includes('individual');
|
|
360
|
+
authDataHasValue = authConfigData === null || authConfigData === void 0 ? void 0 : authConfigData.length;
|
|
361
|
+
expiry = (authData === null || authData === void 0 ? void 0 : authData.expiry) || 120;
|
|
362
|
+
interval = 3;
|
|
363
|
+
maxCalls = Math.floor(expiry / interval);
|
|
364
|
+
count = 1;
|
|
365
|
+
_m.label = 1;
|
|
372
366
|
case 1:
|
|
373
|
-
|
|
374
|
-
|
|
367
|
+
if (!(count <= maxCalls)) return [3, 9];
|
|
368
|
+
if (thunkApi.signal.aborted) {
|
|
369
|
+
return [3, 9];
|
|
370
|
+
}
|
|
371
|
+
return [4, API.authService.getVerifyExpressAuth(authData === null || authData === void 0 ? void 0 : authData.auth_token)];
|
|
372
|
+
case 2:
|
|
373
|
+
data = _m.sent();
|
|
374
|
+
isSuccess = ((_e = (_d = data.auth) === null || _d === void 0 ? void 0 : _d.status) === null || _e === void 0 ? void 0 : _e.toLowerCase()) === 'success';
|
|
375
|
+
isFailed = ((_g = (_f = data.auth) === null || _f === void 0 ? void 0 : _f.status) === null || _g === void 0 ? void 0 : _g.toLowerCase()) === 'failed';
|
|
376
|
+
if (isFailed) {
|
|
377
|
+
(_h = params.onFailure) === null || _h === void 0 ? void 0 : _h.call(params);
|
|
378
|
+
return [2, { data: data }];
|
|
379
|
+
}
|
|
380
|
+
if (!isSuccess) return [3, 6];
|
|
381
|
+
authId = (_j = data.auth) === null || _j === void 0 ? void 0 : _j.id;
|
|
382
|
+
leadId = (_k = data.auth) === null || _k === void 0 ? void 0 : _k.lead_id;
|
|
383
|
+
thunkApi.dispatch(storeAuthId(authId));
|
|
384
|
+
if (isScopeAuthentication && !data.new_user && isDataHasIndividualOnly && authId) {
|
|
385
|
+
if (settings.data.appConfig.mode === 'popup') {
|
|
386
|
+
settings.data.appConfig.onFlowCompleted({ auth_id: authId, bi: bi });
|
|
387
|
+
thunkApi.dispatch(handleOpen(false));
|
|
388
|
+
return [2, { data: data }];
|
|
389
|
+
}
|
|
390
|
+
if (redirectUrl) {
|
|
391
|
+
urlQueryStart = redirectUrl.includes('?') ? '&' : '?';
|
|
392
|
+
window.open("".concat(redirectUrl).concat(urlQueryStart, "authentication_id=").concat(authId, "&bi=").concat(bi), '_self');
|
|
393
|
+
return [2, { data: data }];
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
if (!(isScopeAuthentication && !data.new_user && authDataHasValue)) return [3, 4];
|
|
397
|
+
return [4, thunkApi.dispatch(retrieveAuthenticationListAsync({ individualId: data.individual_id })).unwrap()];
|
|
398
|
+
case 3:
|
|
399
|
+
_c = _m.sent(), brandList = _c.brandList, entityList = _c.entityList;
|
|
400
|
+
if (brandList.length && entityList.length) {
|
|
401
|
+
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep('CONNECT_EXPRESS_AUTHENTICATION_LIST_STEP')); });
|
|
402
|
+
return [2, { data: data }];
|
|
403
|
+
}
|
|
404
|
+
_m.label = 4;
|
|
405
|
+
case 4: return [4, thunkApi.dispatch(getLeadByIdAsync(leadId)).unwrap()];
|
|
406
|
+
case 5:
|
|
407
|
+
_m.sent();
|
|
408
|
+
stepName = data.step_name;
|
|
409
|
+
needToCollectMoreInfo = stepName === 'collect_info';
|
|
410
|
+
creatingAccount = stepName === 'create_account';
|
|
411
|
+
askDobInfo = stepName === COLLECT_DOB_INFO_NAFATH;
|
|
412
|
+
(_l = params.onSuccess) === null || _l === void 0 ? void 0 : _l.call(params);
|
|
413
|
+
if (askDobInfo) {
|
|
414
|
+
sleep(100).then(function () { return thunkApi.dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_COLLECT_DOB_INFO_STEP')); });
|
|
415
|
+
}
|
|
416
|
+
if (creatingAccount) {
|
|
417
|
+
sleep(100).then(function () { return thunkApi.dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_WAITING_FOR_CREATING_ACCOUNT_STEP')); });
|
|
418
|
+
}
|
|
419
|
+
if (needToCollectMoreInfo) {
|
|
420
|
+
sleep(100).then(function () { return thunkApi.dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_COLLECT_INDIVIDUAL_INFO_STEP')); });
|
|
421
|
+
}
|
|
422
|
+
return [2, { data: data, isNextScreenIsDob: askDobInfo }];
|
|
423
|
+
case 6: return [4, sleep(interval * 1000)];
|
|
424
|
+
case 7:
|
|
425
|
+
_m.sent();
|
|
426
|
+
_m.label = 8;
|
|
427
|
+
case 8:
|
|
428
|
+
count++;
|
|
429
|
+
return [3, 1];
|
|
430
|
+
case 9: throw new Error(NAFATH_VERIFICATION_FAILED);
|
|
375
431
|
}
|
|
376
432
|
});
|
|
377
433
|
}); });
|
|
@@ -408,7 +464,7 @@ export var createCivilIdAuthAsync = createAsyncThunk('connectExpress/createCivil
|
|
|
408
464
|
});
|
|
409
465
|
}); });
|
|
410
466
|
export var verifyMobileOtpAsync = createAsyncThunk('connectExpress/verifyMobileOtpAsync', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
411
|
-
var _a, settings, connectExpress, _b, responseData, leadId, isLeadIdPassed, mobileData, _c, auth_token, device_token, service_name, _d, scope, redirectUrl, authData, isScopeAuthentication, bi,
|
|
467
|
+
var _a, settings, connectExpress, _b, responseData, leadId, isLeadIdPassed, mobileData, _c, auth_token, device_token, service_name, _d, scope, redirectUrl, authData, isScopeAuthentication, bi, isDataHasIndividualOnly, authDataHasValue, payload, data, authId, urlQueryStart, _e, brandList, entityList, isKuwait, next;
|
|
412
468
|
var _f, _g;
|
|
413
469
|
return __generator(this, function (_h) {
|
|
414
470
|
switch (_h.label) {
|
|
@@ -421,7 +477,8 @@ export var verifyMobileOtpAsync = createAsyncThunk('connectExpress/verifyMobileO
|
|
|
421
477
|
_d = settings.data.appConfig, scope = _d.scope, redirectUrl = _d.redirectUrl, authData = _d.data;
|
|
422
478
|
isScopeAuthentication = scope === SCOPE_AUTH;
|
|
423
479
|
bi = settings.data.deviceInfo.browser.browser_id;
|
|
424
|
-
|
|
480
|
+
isDataHasIndividualOnly = (authData === null || authData === void 0 ? void 0 : authData.length) === 1 && authData.includes('individual');
|
|
481
|
+
authDataHasValue = authData === null || authData === void 0 ? void 0 : authData.length;
|
|
425
482
|
payload = {
|
|
426
483
|
auth_token: auth_token,
|
|
427
484
|
lead_id: leadId,
|
|
@@ -437,10 +494,15 @@ export var verifyMobileOtpAsync = createAsyncThunk('connectExpress/verifyMobileO
|
|
|
437
494
|
return [4, API.authService.verifyExpressAuth(payload)];
|
|
438
495
|
case 1:
|
|
439
496
|
data = _h.sent();
|
|
497
|
+
sendCustomEventToGTM({
|
|
498
|
+
event: 'Send Event',
|
|
499
|
+
event_category: 'User Registration Flow',
|
|
500
|
+
event_action: 'First OTP Success'
|
|
501
|
+
});
|
|
440
502
|
(_g = (_f = settings.data.appConfig).onStepCompleted) === null || _g === void 0 ? void 0 : _g.call(_f, settings.data.activeScreen.name, params);
|
|
441
503
|
authId = data.auth.id;
|
|
442
504
|
thunkApi.dispatch(storeAuthId(authId));
|
|
443
|
-
if (isScopeAuthentication && !data.new_user &&
|
|
505
|
+
if (isScopeAuthentication && !data.new_user && isDataHasIndividualOnly && authId) {
|
|
444
506
|
if (settings.data.appConfig.mode === 'popup') {
|
|
445
507
|
settings.data.appConfig.onFlowCompleted({ auth_id: authId, bi: bi });
|
|
446
508
|
thunkApi.dispatch(handleOpen(false));
|
|
@@ -452,7 +514,7 @@ export var verifyMobileOtpAsync = createAsyncThunk('connectExpress/verifyMobileO
|
|
|
452
514
|
return [2, data];
|
|
453
515
|
}
|
|
454
516
|
}
|
|
455
|
-
if (!(isScopeAuthentication && !data.new_user &&
|
|
517
|
+
if (!(isScopeAuthentication && !data.new_user && authDataHasValue)) return [3, 3];
|
|
456
518
|
return [4, thunkApi.dispatch(retrieveAuthenticationListAsync({ individualId: data.individual_id })).unwrap()];
|
|
457
519
|
case 2:
|
|
458
520
|
_e = _h.sent(), brandList = _e.brandList, entityList = _e.entityList;
|
|
@@ -473,78 +535,8 @@ export var verifyMobileOtpAsync = createAsyncThunk('connectExpress/verifyMobileO
|
|
|
473
535
|
}
|
|
474
536
|
});
|
|
475
537
|
}); });
|
|
476
|
-
export var verifyNIDOtpAsync = createAsyncThunk('connectExpress/verifyNIDOtpAsync', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
477
|
-
var _a, settings, connectExpress, _b, responseData, leadId, isLeadIdPassed, nidData, _c, auth_token, device_token, service_name, _d, scope, redirectUrl, authData, isScopeAuthentication, bi, isDataHasOperator, payload, data, authId, urlQueryStart, _e, brandList, entityList, stepName, needToCollectMoreInfo, creatingAccount;
|
|
478
|
-
var _f, _g;
|
|
479
|
-
return __generator(this, function (_h) {
|
|
480
|
-
switch (_h.label) {
|
|
481
|
-
case 0:
|
|
482
|
-
_a = thunkApi.getState(), settings = _a.settings, connectExpress = _a.connectExpress;
|
|
483
|
-
_b = connectExpress.data || {}, responseData = _b.responseData, leadId = _b.leadId, isLeadIdPassed = _b.isLeadIdPassed, nidData = _b.nidData;
|
|
484
|
-
if (!(responseData === null || responseData === void 0 ? void 0 : responseData.authData))
|
|
485
|
-
throw new Error('Auth data is missing');
|
|
486
|
-
_c = responseData.authData, auth_token = _c.auth_token, device_token = _c.device_token, service_name = _c.service_name;
|
|
487
|
-
_d = settings.data.appConfig, scope = _d.scope, redirectUrl = _d.redirectUrl, authData = _d.data;
|
|
488
|
-
isScopeAuthentication = scope === SCOPE_AUTH;
|
|
489
|
-
bi = settings.data.deviceInfo.browser.browser_id;
|
|
490
|
-
isDataHasOperator = authData === null || authData === void 0 ? void 0 : authData.includes('operator');
|
|
491
|
-
payload = {
|
|
492
|
-
auth_token: auth_token,
|
|
493
|
-
lead_id: leadId,
|
|
494
|
-
data: params.otp,
|
|
495
|
-
auth_type: 2,
|
|
496
|
-
device_token: device_token,
|
|
497
|
-
service_name: service_name || 'ABSHER',
|
|
498
|
-
sign_in: false,
|
|
499
|
-
terms: isLeadIdPassed && nidData.termAndConditionChecked ? ['general'] : undefined,
|
|
500
|
-
step_name: CONNECT_EXPRESS_STEP_NAMES.VERIFY_AUTH_NID,
|
|
501
|
-
encryption_contract: ['data']
|
|
502
|
-
};
|
|
503
|
-
return [4, API.authService.verifyExpressAuth(payload)];
|
|
504
|
-
case 1:
|
|
505
|
-
data = _h.sent();
|
|
506
|
-
(_g = (_f = settings.data.appConfig).onStepCompleted) === null || _g === void 0 ? void 0 : _g.call(_f, settings.data.activeScreen.name, params);
|
|
507
|
-
authId = data.auth.id;
|
|
508
|
-
thunkApi.dispatch(storeAuthId(authId));
|
|
509
|
-
if (isScopeAuthentication && !data.new_user && !isDataHasOperator && authId) {
|
|
510
|
-
if (settings.data.appConfig.mode === 'popup') {
|
|
511
|
-
settings.data.appConfig.onFlowCompleted({ auth_id: authId, bi: bi });
|
|
512
|
-
thunkApi.dispatch(handleOpen(false));
|
|
513
|
-
return [2, data];
|
|
514
|
-
}
|
|
515
|
-
if (redirectUrl) {
|
|
516
|
-
urlQueryStart = redirectUrl.includes('?') ? '&' : '?';
|
|
517
|
-
window.open("".concat(redirectUrl).concat(urlQueryStart, "authentication_id=").concat(authId, "&bi=").concat(bi), '_self');
|
|
518
|
-
return [2, data];
|
|
519
|
-
}
|
|
520
|
-
}
|
|
521
|
-
if (!(isScopeAuthentication && !data.new_user && isDataHasOperator)) return [3, 3];
|
|
522
|
-
return [4, thunkApi.dispatch(retrieveAuthenticationListAsync({ individualId: data.individual_id })).unwrap()];
|
|
523
|
-
case 2:
|
|
524
|
-
_e = _h.sent(), brandList = _e.brandList, entityList = _e.entityList;
|
|
525
|
-
if (brandList.length && entityList.length) {
|
|
526
|
-
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep('CONNECT_EXPRESS_AUTHENTICATION_LIST_STEP')); });
|
|
527
|
-
return [2, data];
|
|
528
|
-
}
|
|
529
|
-
_h.label = 3;
|
|
530
|
-
case 3: return [4, thunkApi.dispatch(getLeadByIdAsync(data.lead.id)).unwrap()];
|
|
531
|
-
case 4:
|
|
532
|
-
_h.sent();
|
|
533
|
-
stepName = data.step_name;
|
|
534
|
-
needToCollectMoreInfo = stepName === 'collect_info';
|
|
535
|
-
creatingAccount = stepName === 'create_account';
|
|
536
|
-
if (creatingAccount) {
|
|
537
|
-
sleep(100).then(function () { return thunkApi.dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_WAITING_FOR_CREATING_ACCOUNT_STEP')); });
|
|
538
|
-
}
|
|
539
|
-
if (needToCollectMoreInfo) {
|
|
540
|
-
sleep(100).then(function () { return thunkApi.dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_COLLECT_INDIVIDUAL_INFO_STEP')); });
|
|
541
|
-
}
|
|
542
|
-
return [2, data];
|
|
543
|
-
}
|
|
544
|
-
});
|
|
545
|
-
}); });
|
|
546
538
|
export var verifyPACIAsync = createAsyncThunk('connectExpress/verifyPACIAsync', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
547
|
-
var _a, settings, connectExpress, authData, _b, scope, redirectUrl, authConfigData, isScopeAuthentication, bi,
|
|
539
|
+
var _a, settings, connectExpress, authData, _b, scope, redirectUrl, authConfigData, isScopeAuthentication, bi, isDataHasIndividualOnly, authDataHasValue, expiry, interval, maxCalls, count, data, isSuccess, authId, urlQueryStart, _c, brandList, entityList, stepName, needToCollectMoreInfo, creatingAccount;
|
|
548
540
|
var _d, _e, _f;
|
|
549
541
|
return __generator(this, function (_g) {
|
|
550
542
|
switch (_g.label) {
|
|
@@ -554,7 +546,8 @@ export var verifyPACIAsync = createAsyncThunk('connectExpress/verifyPACIAsync',
|
|
|
554
546
|
_b = settings.data.appConfig, scope = _b.scope, redirectUrl = _b.redirectUrl, authConfigData = _b.data;
|
|
555
547
|
isScopeAuthentication = scope === SCOPE_AUTH;
|
|
556
548
|
bi = settings.data.deviceInfo.browser.browser_id;
|
|
557
|
-
|
|
549
|
+
isDataHasIndividualOnly = (authConfigData === null || authConfigData === void 0 ? void 0 : authConfigData.length) === 1 && authConfigData.includes('individual');
|
|
550
|
+
authDataHasValue = authConfigData === null || authConfigData === void 0 ? void 0 : authConfigData.length;
|
|
558
551
|
expiry = (authData === null || authData === void 0 ? void 0 : authData.expiry) || 120;
|
|
559
552
|
interval = 3;
|
|
560
553
|
maxCalls = Math.floor(expiry / interval);
|
|
@@ -572,7 +565,7 @@ export var verifyPACIAsync = createAsyncThunk('connectExpress/verifyPACIAsync',
|
|
|
572
565
|
if (!isSuccess) return [3, 6];
|
|
573
566
|
authId = data.auth.id;
|
|
574
567
|
thunkApi.dispatch(storeAuthId(authId));
|
|
575
|
-
if (isScopeAuthentication && !data.new_user &&
|
|
568
|
+
if (isScopeAuthentication && !data.new_user && isDataHasIndividualOnly && authId) {
|
|
576
569
|
if (settings.data.appConfig.mode === 'popup') {
|
|
577
570
|
settings.data.appConfig.onFlowCompleted({ auth_id: authId, bi: bi });
|
|
578
571
|
thunkApi.dispatch(handleOpen(false));
|
|
@@ -584,7 +577,7 @@ export var verifyPACIAsync = createAsyncThunk('connectExpress/verifyPACIAsync',
|
|
|
584
577
|
return [2, data];
|
|
585
578
|
}
|
|
586
579
|
}
|
|
587
|
-
if (!(isScopeAuthentication && !data.new_user &&
|
|
580
|
+
if (!(isScopeAuthentication && !data.new_user && authDataHasValue)) return [3, 4];
|
|
588
581
|
return [4, thunkApi.dispatch(retrieveAuthenticationListAsync({ individualId: data.individual_id })).unwrap()];
|
|
589
582
|
case 3:
|
|
590
583
|
_c = _g.sent(), brandList = _c.brandList, entityList = _c.entityList;
|
|
@@ -646,28 +639,29 @@ export var createCivilIDAuthIdentityAsync = createAsyncThunk('connectExpress/cre
|
|
|
646
639
|
}
|
|
647
640
|
});
|
|
648
641
|
}); });
|
|
649
|
-
export var
|
|
650
|
-
var _a, settings, connectExpress,
|
|
642
|
+
export var createNIDNafathAuthIdentityAsync = createAsyncThunk('connectExpress/createNIDNafathAuthIdentityAsync', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
643
|
+
var _a, settings, connectExpress, nid, dob, nidType, countryCode, authData, requestBody, data;
|
|
651
644
|
var _b, _c, _d;
|
|
652
645
|
return __generator(this, function (_e) {
|
|
653
646
|
switch (_e.label) {
|
|
654
647
|
case 0:
|
|
655
648
|
_a = thunkApi.getState(), settings = _a.settings, connectExpress = _a.connectExpress;
|
|
656
|
-
|
|
657
|
-
nidType =
|
|
649
|
+
nid = params.nid, dob = params.dob;
|
|
650
|
+
nidType = IDENTIFICATION_TYPE.NAFATH;
|
|
658
651
|
countryCode = settings.data.businessCountry.iso2;
|
|
659
652
|
if (isOtherThanKWOrSA(countryCode)) {
|
|
660
653
|
nidType = IDENTIFICATION_TYPE.NID;
|
|
661
654
|
}
|
|
655
|
+
authData = (_b = connectExpress.data.responseData) === null || _b === void 0 ? void 0 : _b.authData;
|
|
662
656
|
requestBody = {
|
|
663
|
-
id:
|
|
657
|
+
id: authData === null || authData === void 0 ? void 0 : authData.lead_id,
|
|
664
658
|
identification: {
|
|
665
659
|
id: nid,
|
|
666
660
|
issued_country_code: countryCode,
|
|
667
661
|
type: nidType
|
|
668
662
|
},
|
|
663
|
+
date_of_birth: nidType === IDENTIFICATION_TYPE.NAFATH ? undefined : dob,
|
|
669
664
|
country_code: countryCode,
|
|
670
|
-
date_of_birth: dob,
|
|
671
665
|
step_name: CONNECT_EXPRESS_STEP_NAMES.IDENTITY_AUTH,
|
|
672
666
|
encryption_contract: ['identification.issued_country_code', 'identification.id', 'identification.type', 'date_of_birth']
|
|
673
667
|
};
|
|
@@ -675,7 +669,7 @@ export var createNIDAuthIdentityAsync = createAsyncThunk('connectExpress/createN
|
|
|
675
669
|
case 1:
|
|
676
670
|
data = _e.sent();
|
|
677
671
|
if (!((data === null || data === void 0 ? void 0 : data.verify_token) !== 'null')) return [3, 2];
|
|
678
|
-
thunkApi.dispatch(handleNextScreenStep('
|
|
672
|
+
thunkApi.dispatch(handleNextScreenStep('CONNECT_EXPRESS_IDENTITY_VERIFY_NAFATH_STEP'));
|
|
679
673
|
return [3, 4];
|
|
680
674
|
case 2:
|
|
681
675
|
if (!isOtherThanKWOrSA(countryCode)) return [3, 4];
|
|
@@ -685,83 +679,72 @@ export var createNIDAuthIdentityAsync = createAsyncThunk('connectExpress/createN
|
|
|
685
679
|
thunkApi.dispatch(handleNextScreenStep('CONNECT_EXPRESS_COLLECT_INDIVIDUAL_INFO_STEP'));
|
|
686
680
|
_e.label = 4;
|
|
687
681
|
case 4:
|
|
688
|
-
(_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, requestBody
|
|
689
|
-
return [2, { response: { verify_token: data.verify_token }, formData: params }];
|
|
682
|
+
(_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, requestBody);
|
|
683
|
+
return [2, { response: { random: data.random, expiry: data.expiry, verify_token: data.verify_token }, formData: params }];
|
|
690
684
|
}
|
|
691
685
|
});
|
|
692
686
|
}); });
|
|
693
|
-
export var
|
|
694
|
-
var
|
|
695
|
-
var _b;
|
|
696
|
-
return __generator(this, function (
|
|
697
|
-
switch (
|
|
698
|
-
case 0:
|
|
699
|
-
_a = thunkApi.getState(), settings = _a.settings, connectExpress = _a.connectExpress;
|
|
700
|
-
dob = params.dob, nid = params.nid;
|
|
701
|
-
nidType = nid.startsWith('1') ? IDENTIFICATION_TYPE.NID : IDENTIFICATION_TYPE.IQAMA;
|
|
702
|
-
countryCode = settings.data.businessCountry.iso2;
|
|
703
|
-
if (isOtherThanKWOrSA(countryCode)) {
|
|
704
|
-
nidType = IDENTIFICATION_TYPE.NID;
|
|
705
|
-
}
|
|
706
|
-
requestBody = {
|
|
707
|
-
id: (_b = connectExpress.data.responseData) === null || _b === void 0 ? void 0 : _b.authData.lead_id,
|
|
708
|
-
identification: {
|
|
709
|
-
id: nid,
|
|
710
|
-
issued_country_code: countryCode,
|
|
711
|
-
type: nidType
|
|
712
|
-
},
|
|
713
|
-
country_code: countryCode,
|
|
714
|
-
date_of_birth: dob,
|
|
715
|
-
step_name: CONNECT_EXPRESS_STEP_NAMES.IDENTITY_AUTH,
|
|
716
|
-
encryption_contract: ['identification.issued_country_code', 'identification.id', 'identification.type', 'date_of_birth']
|
|
717
|
-
};
|
|
718
|
-
return [4, API.leadService.updateLead(requestBody)];
|
|
719
|
-
case 1:
|
|
720
|
-
data = _c.sent();
|
|
721
|
-
return [2, { response: { verify_token: data.verify_token }, formData: params }];
|
|
722
|
-
}
|
|
723
|
-
});
|
|
724
|
-
}); });
|
|
725
|
-
export var verifyNIDOtpLeadIdentityAsync = createAsyncThunk('connectExpress/verifyNIDOtpLeadIdentityAsync', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
726
|
-
var _a, settings, connectExpress, _b, responseData, leadId, verify_token, payload, data, needToCollectMoreInfo, creatingAccount;
|
|
727
|
-
var _c, _d;
|
|
728
|
-
return __generator(this, function (_e) {
|
|
729
|
-
switch (_e.label) {
|
|
687
|
+
export var verifyNafathIdentityAsync = createAsyncThunk('connectExpress/verifyNafathIdentityAsync', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
688
|
+
var connectExpress, authData, expiry, interval, maxCalls, count, data, isSuccess, isFailed, needToCollectMoreInfo, creatingAccount, askDobInfo, collectPhoneOwnershipScreen;
|
|
689
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
690
|
+
return __generator(this, function (_h) {
|
|
691
|
+
switch (_h.label) {
|
|
730
692
|
case 0:
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
lead_id: leadId,
|
|
739
|
-
data: params.otp,
|
|
740
|
-
service_name: 'absher',
|
|
741
|
-
sign_in: false,
|
|
742
|
-
step_name: CONNECT_EXPRESS_STEP_NAMES.VERIFY_IDENTITY_AUTH,
|
|
743
|
-
encryption_contract: ['data']
|
|
744
|
-
};
|
|
745
|
-
return [4, API.authService.verifyExpressLeadIdentity(payload)];
|
|
693
|
+
connectExpress = thunkApi.getState().connectExpress;
|
|
694
|
+
authData = (connectExpress.data.responseData || {}).authData;
|
|
695
|
+
expiry = (authData === null || authData === void 0 ? void 0 : authData.expiry) || 120;
|
|
696
|
+
interval = 3;
|
|
697
|
+
maxCalls = Math.floor(expiry / interval);
|
|
698
|
+
count = 1;
|
|
699
|
+
_h.label = 1;
|
|
746
700
|
case 1:
|
|
747
|
-
|
|
748
|
-
|
|
701
|
+
if (!(count <= maxCalls)) return [3, 7];
|
|
702
|
+
if (thunkApi.signal.aborted) {
|
|
703
|
+
return [3, 7];
|
|
704
|
+
}
|
|
705
|
+
return [4, API.authService.getExpressTokenVerify({ token: authData === null || authData === void 0 ? void 0 : authData.verify_token, leadId: authData === null || authData === void 0 ? void 0 : authData.lead_id })];
|
|
749
706
|
case 2:
|
|
750
|
-
|
|
751
|
-
(
|
|
707
|
+
data = _h.sent();
|
|
708
|
+
isSuccess = ((_b = (_a = data.auth) === null || _a === void 0 ? void 0 : _a.status) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === 'success';
|
|
709
|
+
isFailed = ((_d = (_c = data.auth) === null || _c === void 0 ? void 0 : _c.status) === null || _d === void 0 ? void 0 : _d.toLowerCase()) === 'failed';
|
|
710
|
+
if (isFailed) {
|
|
711
|
+
(_e = params.onFailure) === null || _e === void 0 ? void 0 : _e.call(params);
|
|
712
|
+
return [2, { data: data }];
|
|
713
|
+
}
|
|
714
|
+
if (!isSuccess) return [3, 4];
|
|
715
|
+
return [4, thunkApi.dispatch(getLeadByIdAsync((_f = data.auth) === null || _f === void 0 ? void 0 : _f.lead_id)).unwrap()];
|
|
716
|
+
case 3:
|
|
717
|
+
_h.sent();
|
|
752
718
|
needToCollectMoreInfo = data.step_name === 'collect_info';
|
|
753
719
|
creatingAccount = data.step_name === 'create_account';
|
|
720
|
+
askDobInfo = data.step_name === COLLECT_DOB_INFO_NAFATH;
|
|
721
|
+
collectPhoneOwnershipScreen = data.step_name === CONNECT_EXPRESS_STEP_NAMES.COLLECT_MOBILE_OWNERSHIP;
|
|
722
|
+
(_g = params.onSuccess) === null || _g === void 0 ? void 0 : _g.call(params);
|
|
723
|
+
if (collectPhoneOwnershipScreen) {
|
|
724
|
+
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep('COLLECT_MOBILE_OWNERSHIP')); });
|
|
725
|
+
}
|
|
726
|
+
if (askDobInfo) {
|
|
727
|
+
sleep(100).then(function () { return thunkApi.dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_COLLECT_DOB_INFO_STEP')); });
|
|
728
|
+
}
|
|
754
729
|
if (creatingAccount) {
|
|
755
730
|
sleep(100).then(function () { return thunkApi.dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_WAITING_FOR_CREATING_ACCOUNT_STEP')); });
|
|
756
731
|
}
|
|
757
732
|
if (needToCollectMoreInfo) {
|
|
758
733
|
sleep(100).then(function () { return thunkApi.dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_COLLECT_INDIVIDUAL_INFO_STEP')); });
|
|
759
734
|
}
|
|
760
|
-
return [2, data];
|
|
735
|
+
return [2, { data: data, isNextScreenIsDob: askDobInfo }];
|
|
736
|
+
case 4: return [4, sleep(interval * 1000)];
|
|
737
|
+
case 5:
|
|
738
|
+
_h.sent();
|
|
739
|
+
_h.label = 6;
|
|
740
|
+
case 6:
|
|
741
|
+
count++;
|
|
742
|
+
return [3, 1];
|
|
743
|
+
case 7: throw new Error(NAFATH_VERIFICATION_FAILED);
|
|
761
744
|
}
|
|
762
745
|
});
|
|
763
746
|
}); });
|
|
764
|
-
export var verifyPaciLeadIdentityAsync = createAsyncThunk('connectExpress/
|
|
747
|
+
export var verifyPaciLeadIdentityAsync = createAsyncThunk('connectExpress/verifyPaciLeadIdentityAsync', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
765
748
|
var connectExpress, authData, expiry, interval, maxCalls, count, data, isSuccess, needToCollectMoreInfo, creatingAccount;
|
|
766
749
|
var _a, _b, _c;
|
|
767
750
|
return __generator(this, function (_d) {
|
|
@@ -804,7 +787,7 @@ export var verifyPaciLeadIdentityAsync = createAsyncThunk('connectExpress/verify
|
|
|
804
787
|
case 6:
|
|
805
788
|
count++;
|
|
806
789
|
return [3, 1];
|
|
807
|
-
case 7: throw new Error('
|
|
790
|
+
case 7: throw new Error('nafath_verification_failed');
|
|
808
791
|
}
|
|
809
792
|
});
|
|
810
793
|
}); });
|
|
@@ -858,43 +841,113 @@ export var checkBrandNameAvailabilityAsync = createAsyncThunk('connectExpress/ch
|
|
|
858
841
|
});
|
|
859
842
|
});
|
|
860
843
|
});
|
|
861
|
-
export var createAccountAsync = createAsyncThunk('connectExpress/createAccountAsync', function (
|
|
862
|
-
var
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
844
|
+
export var createAccountAsync = createAsyncThunk('connectExpress/createAccountAsync', function (_a, thunkApi) {
|
|
845
|
+
var isRetry = _a.isRetry;
|
|
846
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
847
|
+
var _b, connectExpress, settings, responseData, _c, postURL, scope, redirectUrl, mode, showBoard, notification, platforms, payment_provider, leadId, authId, bi, leadData, accountData, data, body, data, urlQueryStart;
|
|
848
|
+
var _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
|
|
849
|
+
return __generator(this, function (_v) {
|
|
850
|
+
switch (_v.label) {
|
|
851
|
+
case 0:
|
|
852
|
+
_b = thunkApi.getState(), connectExpress = _b.connectExpress, settings = _b.settings;
|
|
853
|
+
responseData = connectExpress.data.responseData;
|
|
854
|
+
_c = settings.data.appConfig, postURL = _c.postURL, scope = _c.scope, redirectUrl = _c.redirectUrl, mode = _c.mode, showBoard = _c.showBoard, notification = _c.notification;
|
|
855
|
+
platforms = (_e = (_d = responseData === null || responseData === void 0 ? void 0 : responseData.leadData) === null || _d === void 0 ? void 0 : _d.platforms) !== null && _e !== void 0 ? _e : settings.data.appConfig.platforms;
|
|
856
|
+
payment_provider = (_g = (_f = responseData === null || responseData === void 0 ? void 0 : responseData.leadData) === null || _f === void 0 ? void 0 : _f.payment_provider) !== null && _g !== void 0 ? _g : settings.data.appConfig.paymentProvider;
|
|
857
|
+
leadId = (_h = responseData === null || responseData === void 0 ? void 0 : responseData.leadData) === null || _h === void 0 ? void 0 : _h.id;
|
|
858
|
+
authId = (_k = (_j = responseData === null || responseData === void 0 ? void 0 : responseData.authData) === null || _j === void 0 ? void 0 : _j.auth) === null || _k === void 0 ? void 0 : _k.id;
|
|
859
|
+
bi = settings.data.deviceInfo.browser.browser_id;
|
|
860
|
+
accountData = undefined;
|
|
861
|
+
if (!isRetry) return [3, 2];
|
|
862
|
+
return [4, thunkApi.dispatch(getLeadByIdAsync(leadId)).unwrap()];
|
|
863
|
+
case 1:
|
|
864
|
+
data = (_v.sent()).data;
|
|
865
|
+
if (data === null || data === void 0 ? void 0 : data.board_id) {
|
|
866
|
+
leadData = data;
|
|
867
|
+
accountData = data;
|
|
868
|
+
}
|
|
869
|
+
_v.label = 2;
|
|
870
|
+
case 2:
|
|
871
|
+
body = {
|
|
872
|
+
lead_id: leadId,
|
|
873
|
+
post_url: scope === SCOPE_AUTH ? '' : postURL || '',
|
|
874
|
+
platforms: platforms,
|
|
875
|
+
payment_provider: payment_provider,
|
|
876
|
+
notification: notification
|
|
877
|
+
};
|
|
878
|
+
if (!!(leadData === null || leadData === void 0 ? void 0 : leadData.board_id)) return [3, 4];
|
|
879
|
+
return [4, API.accountService.expressCreateAccount(body)];
|
|
880
|
+
case 3:
|
|
881
|
+
accountData = _v.sent();
|
|
882
|
+
_v.label = 4;
|
|
883
|
+
case 4:
|
|
884
|
+
sendCustomEventToGTM({
|
|
885
|
+
event: 'Send Event',
|
|
886
|
+
event_category: 'User Registration Flow',
|
|
887
|
+
event_action: 'Registration Completed',
|
|
888
|
+
event_label: 'Product Type',
|
|
889
|
+
event_value: leadId
|
|
890
|
+
});
|
|
891
|
+
sendCustomDimension({
|
|
892
|
+
event: 'PageView',
|
|
893
|
+
lead_ID: leadId
|
|
894
|
+
});
|
|
895
|
+
(_m = (_l = settings.data.appConfig).onCreated) === null || _m === void 0 ? void 0 : _m.call(_l, accountData);
|
|
896
|
+
(_p = (_o = settings.data.appConfig).onFlowCompleted) === null || _p === void 0 ? void 0 : _p.call(_o, accountData);
|
|
897
|
+
(_r = (_q = settings.data.appConfig).onStepCompleted) === null || _r === void 0 ? void 0 : _r.call(_q, settings.data.activeScreen.name, accountData);
|
|
898
|
+
if (showBoard) {
|
|
899
|
+
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep()); });
|
|
900
|
+
return [2, { accountData: accountData }];
|
|
901
|
+
}
|
|
902
|
+
if (!(scope === SCOPE_AUTH)) return [3, 8];
|
|
903
|
+
if (!!(leadData === null || leadData === void 0 ? void 0 : leadData.board_id)) return [3, 6];
|
|
904
|
+
return [4, thunkApi.dispatch(getLeadByIdAsync(leadId)).unwrap()];
|
|
905
|
+
case 5:
|
|
906
|
+
data = (_v.sent()).data;
|
|
907
|
+
leadData = data;
|
|
908
|
+
_v.label = 6;
|
|
909
|
+
case 6: return [4, thunkApi.dispatch(onCloseComplete({ merchantId: (_s = leadData === null || leadData === void 0 ? void 0 : leadData.merchant) === null || _s === void 0 ? void 0 : _s.id, brandId: (_t = leadData === null || leadData === void 0 ? void 0 : leadData.brand) === null || _t === void 0 ? void 0 : _t.id, entityId: (_u = leadData === null || leadData === void 0 ? void 0 : leadData.entity) === null || _u === void 0 ? void 0 : _u.id }))];
|
|
910
|
+
case 7:
|
|
911
|
+
_v.sent();
|
|
912
|
+
return [2, { accountData: accountData }];
|
|
913
|
+
case 8:
|
|
914
|
+
if (redirectUrl && mode === 'page') {
|
|
915
|
+
urlQueryStart = redirectUrl.includes('?') ? '&' : '?';
|
|
916
|
+
window.open("".concat(redirectUrl).concat(urlQueryStart, "authentication_id=").concat(authId, "&bi=").concat(bi), '_self');
|
|
917
|
+
return [2, { accountData: accountData }];
|
|
918
|
+
}
|
|
919
|
+
thunkApi.dispatch(handleOpen(false));
|
|
920
|
+
return [2];
|
|
921
|
+
}
|
|
922
|
+
});
|
|
923
|
+
});
|
|
924
|
+
});
|
|
925
|
+
export var retrieveDetailsAfterCreateAccountAsync = createAsyncThunk('connectExpress/retrieveDetailsAfterCreateAccountAsync', function (_, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
926
|
+
var connectExpress, _a, accountData, leadData, leadResData, data, board_id, board_info_id, _b, boardInfo, boardData;
|
|
927
|
+
var _c, _d;
|
|
928
|
+
return __generator(this, function (_e) {
|
|
929
|
+
switch (_e.label) {
|
|
866
930
|
case 0:
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
post_url: scope === SCOPE_AUTH ? '' : postURL || '',
|
|
873
|
-
platforms: settings.data.appConfig.platforms
|
|
874
|
-
};
|
|
875
|
-
return [4, API.accountService.expressCreateAccount(body)];
|
|
931
|
+
connectExpress = thunkApi.getState().connectExpress;
|
|
932
|
+
_a = connectExpress.data.responseData || {}, accountData = _a.accountData, leadData = _a.leadData;
|
|
933
|
+
leadResData = undefined;
|
|
934
|
+
if (!!(leadData === null || leadData === void 0 ? void 0 : leadData.board_id)) return [3, 2];
|
|
935
|
+
return [4, thunkApi.dispatch(getLeadByIdAsync(leadData === null || leadData === void 0 ? void 0 : leadData.id)).unwrap()];
|
|
876
936
|
case 1:
|
|
877
|
-
data =
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
(_k = (_j = settings.data.appConfig).onStepCompleted) === null || _k === void 0 ? void 0 : _k.call(_j, settings.data.activeScreen.name, data);
|
|
881
|
-
if (!showBoard) return [3, 4];
|
|
882
|
-
return [4, thunkApi.dispatch(getLeadByIdAsync(data.lead.id)).unwrap()];
|
|
937
|
+
data = (_e.sent()).data;
|
|
938
|
+
leadResData = data;
|
|
939
|
+
_e.label = 2;
|
|
883
940
|
case 2:
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
board_info_id = (_m = data.board_info_id) !== null && _m !== void 0 ? _m : leadData.board_info_id;
|
|
941
|
+
board_id = (_c = accountData === null || accountData === void 0 ? void 0 : accountData.board_id) !== null && _c !== void 0 ? _c : leadResData === null || leadResData === void 0 ? void 0 : leadResData.board_id;
|
|
942
|
+
board_info_id = (_d = accountData === null || accountData === void 0 ? void 0 : accountData.board_info_id) !== null && _d !== void 0 ? _d : leadResData === null || leadResData === void 0 ? void 0 : leadResData.board_info_id;
|
|
887
943
|
return [4, Promise.all([
|
|
888
944
|
API.boardService.retrieveBoardInfo({ id: board_id, infoId: board_info_id }),
|
|
889
945
|
API.boardService.retrieveBoardDetails(board_id)
|
|
890
946
|
])];
|
|
891
947
|
case 3:
|
|
892
|
-
|
|
948
|
+
_b = _e.sent(), boardInfo = _b[0], boardData = _b[1];
|
|
893
949
|
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep()); });
|
|
894
|
-
return [2, { boardInfo: boardInfo, boardData: boardData
|
|
895
|
-
case 4:
|
|
896
|
-
thunkApi.dispatch(handleOpen(false));
|
|
897
|
-
return [2];
|
|
950
|
+
return [2, { boardInfo: boardInfo, boardData: boardData }];
|
|
898
951
|
}
|
|
899
952
|
});
|
|
900
953
|
}); });
|
|
@@ -927,10 +980,41 @@ export var createEntity = createAsyncThunk('connectExpress/createEntity', functi
|
|
|
927
980
|
}
|
|
928
981
|
});
|
|
929
982
|
}); });
|
|
983
|
+
export var updateLeadDOBAsync = createAsyncThunk('connectExpress/updateLeadDOBAsync', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
984
|
+
var _a, settings, connectExpress, id, dob, payload, data, needToCollectMoreInfo, creatingAccount;
|
|
985
|
+
var _b, _c, _d;
|
|
986
|
+
return __generator(this, function (_e) {
|
|
987
|
+
switch (_e.label) {
|
|
988
|
+
case 0:
|
|
989
|
+
_a = thunkApi.getState(), settings = _a.settings, connectExpress = _a.connectExpress;
|
|
990
|
+
id = (((_b = connectExpress.data.responseData) === null || _b === void 0 ? void 0 : _b.leadData) || {}).id;
|
|
991
|
+
dob = params.dob;
|
|
992
|
+
payload = {
|
|
993
|
+
id: id || '',
|
|
994
|
+
date_of_birth: dob,
|
|
995
|
+
step_name: CONNECT_EXPRESS_STEP_NAMES.UPDATE_LEAD_DOB,
|
|
996
|
+
encryption_contract: ['date_of_birth']
|
|
997
|
+
};
|
|
998
|
+
return [4, API.leadService.updateLeadExpress(payload)];
|
|
999
|
+
case 1:
|
|
1000
|
+
data = _e.sent();
|
|
1001
|
+
(_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, params);
|
|
1002
|
+
needToCollectMoreInfo = data.step_name === 'collect_info';
|
|
1003
|
+
creatingAccount = data.step_name === 'create_account';
|
|
1004
|
+
if (creatingAccount) {
|
|
1005
|
+
sleep(100).then(function () { return thunkApi.dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_WAITING_FOR_CREATING_ACCOUNT_STEP')); });
|
|
1006
|
+
}
|
|
1007
|
+
if (needToCollectMoreInfo) {
|
|
1008
|
+
sleep(100).then(function () { return thunkApi.dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_COLLECT_INDIVIDUAL_INFO_STEP')); });
|
|
1009
|
+
}
|
|
1010
|
+
return [2, { response: data, formData: params }];
|
|
1011
|
+
}
|
|
1012
|
+
});
|
|
1013
|
+
}); });
|
|
930
1014
|
export var updateLeadIndividualAsync = createAsyncThunk('connectExpress/updateLeadIndividualAsync', function (_a, thunkApi) {
|
|
931
1015
|
var formData = _a.formData, originalFormData = _a.originalFormData;
|
|
932
1016
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
933
|
-
var _b, settings, connectExpress, id, countryCode, name, email, mobile, phoneCountry, isContactAvailable, payload, data, needToCollectMoreInfo, creatingAccount, isSaudi;
|
|
1017
|
+
var _b, settings, connectExpress, id, countryCode, name, email, mobile, phoneCountry, isContactAvailable, payload, data, needToCollectMoreInfo, creatingAccount, collectPhoneOwnershipScreen, isSaudi;
|
|
934
1018
|
var _c, _d, _e, _f, _g;
|
|
935
1019
|
return __generator(this, function (_h) {
|
|
936
1020
|
switch (_h.label) {
|
|
@@ -942,13 +1026,17 @@ export var updateLeadIndividualAsync = createAsyncThunk('connectExpress/updateLe
|
|
|
942
1026
|
isContactAvailable = email || mobile;
|
|
943
1027
|
payload = __assign(__assign({ id: id || '', country_code: (_e = settings.data.businessCountry) === null || _e === void 0 ? void 0 : _e.iso2, name: getIndividualName(name) }, (isContactAvailable && {
|
|
944
1028
|
contact: __assign({ email: email }, (mobile && { phone: { country_code: phoneCountry, number: mobile } }))
|
|
945
|
-
})), { step_name: CONNECT_EXPRESS_STEP_NAMES.UPDATE_LEAD_INDIVIDUAL, encryption_contract: ['name.first', 'name.middle', 'name.last', 'contact.email', 'contact.phone.country_code', 'contact.phone.number'] });
|
|
1029
|
+
})), { metadata: getMetaData(), step_name: CONNECT_EXPRESS_STEP_NAMES.UPDATE_LEAD_INDIVIDUAL, encryption_contract: ['name.first', 'name.middle', 'name.last', 'contact.email', 'contact.phone.country_code', 'contact.phone.number'] });
|
|
946
1030
|
return [4, API.leadService.updateLeadExpress(payload)];
|
|
947
1031
|
case 1:
|
|
948
1032
|
data = _h.sent();
|
|
949
1033
|
(_g = (_f = settings.data.appConfig).onStepCompleted) === null || _g === void 0 ? void 0 : _g.call(_f, settings.data.activeScreen.name, formData);
|
|
950
1034
|
needToCollectMoreInfo = data.step_name === 'collect_info';
|
|
951
1035
|
creatingAccount = data.step_name === 'create_account';
|
|
1036
|
+
collectPhoneOwnershipScreen = data.step_name === CONNECT_EXPRESS_STEP_NAMES.COLLECT_MOBILE_OWNERSHIP;
|
|
1037
|
+
if (collectPhoneOwnershipScreen) {
|
|
1038
|
+
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep('COLLECT_MOBILE_OWNERSHIP')); });
|
|
1039
|
+
}
|
|
952
1040
|
if (creatingAccount) {
|
|
953
1041
|
sleep(100).then(function () { return thunkApi.dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_WAITING_FOR_CREATING_ACCOUNT_STEP')); });
|
|
954
1042
|
}
|
|
@@ -1008,19 +1096,119 @@ export var updateLeadBusinessDataAsync = createAsyncThunk('updateLeadBusinessDat
|
|
|
1008
1096
|
});
|
|
1009
1097
|
});
|
|
1010
1098
|
});
|
|
1099
|
+
export var updateLeadMobile = createAsyncThunk('connect/updateLeadMobile', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1100
|
+
var _a, settings, connectExpress, id, startWithNID, payload, leadResponse, needToCollectMoreInfo, creatingAccount, askDobInfo, collectPhoneOwnershipScreen;
|
|
1101
|
+
var _b, _c, _d;
|
|
1102
|
+
return __generator(this, function (_e) {
|
|
1103
|
+
switch (_e.label) {
|
|
1104
|
+
case 0:
|
|
1105
|
+
_a = thunkApi.getState(), settings = _a.settings, connectExpress = _a.connectExpress;
|
|
1106
|
+
id = (((_b = connectExpress.data.responseData) === null || _b === void 0 ? void 0 : _b.leadData) || {}).id;
|
|
1107
|
+
startWithNID = connectExpress.data.otpData.authFor === AuthForType.NATIONAL_ID;
|
|
1108
|
+
payload = {
|
|
1109
|
+
id: id || '',
|
|
1110
|
+
contact: {
|
|
1111
|
+
phone: {
|
|
1112
|
+
country_code: params.countryCode.idd_prefix.toString(),
|
|
1113
|
+
number: params.mobile
|
|
1114
|
+
}
|
|
1115
|
+
},
|
|
1116
|
+
step_name: CONNECT_EXPRESS_STEP_NAMES.COLLECT_MOBILE_OWNERSHIP,
|
|
1117
|
+
encryption_contract: ['contact.phone.country_code', 'contact.phone.number']
|
|
1118
|
+
};
|
|
1119
|
+
return [4, API.leadService.updateLeadExpress(payload)];
|
|
1120
|
+
case 1:
|
|
1121
|
+
leadResponse = _e.sent();
|
|
1122
|
+
(_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, params);
|
|
1123
|
+
needToCollectMoreInfo = leadResponse.step_name === 'collect_info';
|
|
1124
|
+
creatingAccount = leadResponse.step_name === 'create_account';
|
|
1125
|
+
askDobInfo = leadResponse.step_name === COLLECT_DOB_INFO_NAFATH;
|
|
1126
|
+
collectPhoneOwnershipScreen = leadResponse.step_name === CONNECT_EXPRESS_STEP_NAMES.COLLECT_MOBILE_OWNERSHIP;
|
|
1127
|
+
if (collectPhoneOwnershipScreen) {
|
|
1128
|
+
throw new Error("The new mobile number doesn't match the national ID, please update the mobile to the correct one");
|
|
1129
|
+
}
|
|
1130
|
+
if (askDobInfo) {
|
|
1131
|
+
sleep(100).then(function () { return thunkApi.dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_COLLECT_DOB_INFO_STEP')); });
|
|
1132
|
+
}
|
|
1133
|
+
if (creatingAccount) {
|
|
1134
|
+
sleep(100).then(function () { return thunkApi.dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_WAITING_FOR_CREATING_ACCOUNT_STEP')); });
|
|
1135
|
+
}
|
|
1136
|
+
if (!needToCollectMoreInfo) return [3, 5];
|
|
1137
|
+
if (!startWithNID) return [3, 4];
|
|
1138
|
+
if (!isSA(settings.data.businessCountry.iso2)) return [3, 3];
|
|
1139
|
+
return [4, thunkApi.dispatch(retrieveEntityListAsync(leadResponse.lead.id)).unwrap()];
|
|
1140
|
+
case 2:
|
|
1141
|
+
_e.sent();
|
|
1142
|
+
_e.label = 3;
|
|
1143
|
+
case 3:
|
|
1144
|
+
sleep(100).then(function () { return thunkApi.dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_COLLECT_BUSINESS_INFO_STEP')); });
|
|
1145
|
+
return [3, 5];
|
|
1146
|
+
case 4:
|
|
1147
|
+
sleep(100).then(function () { return thunkApi.dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_COLLECT_INDIVIDUAL_INFO_STEP')); });
|
|
1148
|
+
_e.label = 5;
|
|
1149
|
+
case 5: return [2, { leadResponse: leadResponse, formData: params }];
|
|
1150
|
+
}
|
|
1151
|
+
});
|
|
1152
|
+
}); });
|
|
1153
|
+
export var skipUpdateLeadMobile = createAsyncThunk('connect/skipUpdateLeadMobile', function (_, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1154
|
+
var _a, settings, connectExpress, id, startWithNID, payload, leadResponse, needToCollectMoreInfo, creatingAccount, askDobInfo;
|
|
1155
|
+
var _b, _c, _d;
|
|
1156
|
+
return __generator(this, function (_e) {
|
|
1157
|
+
switch (_e.label) {
|
|
1158
|
+
case 0:
|
|
1159
|
+
_a = thunkApi.getState(), settings = _a.settings, connectExpress = _a.connectExpress;
|
|
1160
|
+
id = (((_b = connectExpress.data.responseData) === null || _b === void 0 ? void 0 : _b.leadData) || {}).id;
|
|
1161
|
+
startWithNID = connectExpress.data.otpData.authFor === AuthForType.NATIONAL_ID;
|
|
1162
|
+
payload = {
|
|
1163
|
+
id: id || '',
|
|
1164
|
+
step_name: CONNECT_EXPRESS_STEP_NAMES.COLLECT_MOBILE_OWNERSHIP_SKIPPED,
|
|
1165
|
+
encryption_contract: []
|
|
1166
|
+
};
|
|
1167
|
+
return [4, API.leadService.updateLeadExpress(payload)];
|
|
1168
|
+
case 1:
|
|
1169
|
+
leadResponse = _e.sent();
|
|
1170
|
+
(_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, {});
|
|
1171
|
+
needToCollectMoreInfo = leadResponse.step_name === 'collect_info';
|
|
1172
|
+
creatingAccount = leadResponse.step_name === 'create_account';
|
|
1173
|
+
askDobInfo = leadResponse.step_name === COLLECT_DOB_INFO_NAFATH;
|
|
1174
|
+
if (askDobInfo) {
|
|
1175
|
+
sleep(100).then(function () { return thunkApi.dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_COLLECT_DOB_INFO_STEP')); });
|
|
1176
|
+
}
|
|
1177
|
+
if (creatingAccount) {
|
|
1178
|
+
sleep(100).then(function () { return thunkApi.dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_WAITING_FOR_CREATING_ACCOUNT_STEP')); });
|
|
1179
|
+
}
|
|
1180
|
+
if (!needToCollectMoreInfo) return [3, 5];
|
|
1181
|
+
if (!startWithNID) return [3, 4];
|
|
1182
|
+
if (!isSA(settings.data.businessCountry.iso2)) return [3, 3];
|
|
1183
|
+
return [4, thunkApi.dispatch(retrieveEntityListAsync(leadResponse.lead.id)).unwrap()];
|
|
1184
|
+
case 2:
|
|
1185
|
+
_e.sent();
|
|
1186
|
+
_e.label = 3;
|
|
1187
|
+
case 3:
|
|
1188
|
+
sleep(100).then(function () { return thunkApi.dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_COLLECT_BUSINESS_INFO_STEP')); });
|
|
1189
|
+
return [3, 5];
|
|
1190
|
+
case 4:
|
|
1191
|
+
sleep(100).then(function () { return thunkApi.dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_COLLECT_INDIVIDUAL_INFO_STEP')); });
|
|
1192
|
+
_e.label = 5;
|
|
1193
|
+
case 5: return [2, { leadResponse: leadResponse }];
|
|
1194
|
+
}
|
|
1195
|
+
});
|
|
1196
|
+
}); });
|
|
1011
1197
|
export var confirmInfo = createAsyncThunk('connectExpress/confirmInfo', function (_a, thunkApi) {
|
|
1012
1198
|
var brandInfo = _a.brandInfo, entityInfo = _a.entityInfo, merchantInfo = _a.merchantInfo;
|
|
1013
1199
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
1014
|
-
var _b, connectExpress, settings, responseData, _c, postURL, redirectUrl, bi, authId, body, data, urlQueryStart;
|
|
1015
|
-
var
|
|
1016
|
-
return __generator(this, function (
|
|
1017
|
-
switch (
|
|
1200
|
+
var _b, connectExpress, settings, responseData, _c, appConfig, deviceInfo, activeScreen, postURL, redirectUrl, showBoard, bi, authId, leadId, body, data, _d, board_id, board_info_id, _e, boardInfo, boardData, urlQueryStart;
|
|
1201
|
+
var _f, _g, _h, _j, _k;
|
|
1202
|
+
return __generator(this, function (_l) {
|
|
1203
|
+
switch (_l.label) {
|
|
1018
1204
|
case 0:
|
|
1019
1205
|
_b = thunkApi.getState(), connectExpress = _b.connectExpress, settings = _b.settings;
|
|
1020
1206
|
responseData = connectExpress.data.responseData;
|
|
1021
|
-
_c = settings.data.appConfig,
|
|
1022
|
-
|
|
1023
|
-
|
|
1207
|
+
_c = settings.data, appConfig = _c.appConfig, deviceInfo = _c.deviceInfo, activeScreen = _c.activeScreen;
|
|
1208
|
+
postURL = appConfig.postURL, redirectUrl = appConfig.redirectUrl, showBoard = appConfig.showBoard;
|
|
1209
|
+
bi = deviceInfo.browser.browser_id;
|
|
1210
|
+
authId = (_g = (_f = responseData === null || responseData === void 0 ? void 0 : responseData.authData) === null || _f === void 0 ? void 0 : _f.auth) === null || _g === void 0 ? void 0 : _g.id;
|
|
1211
|
+
leadId = (_j = (_h = responseData === null || responseData === void 0 ? void 0 : responseData.authData) === null || _h === void 0 ? void 0 : _h.lead) === null || _j === void 0 ? void 0 : _j.id;
|
|
1024
1212
|
body = {
|
|
1025
1213
|
post_url: postURL || '',
|
|
1026
1214
|
authentication_id: authId,
|
|
@@ -1028,14 +1216,28 @@ export var confirmInfo = createAsyncThunk('connectExpress/confirmInfo', function
|
|
|
1028
1216
|
brand_id: (brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.id) || '',
|
|
1029
1217
|
merchant_id: (merchantInfo === null || merchantInfo === void 0 ? void 0 : merchantInfo.id) || '',
|
|
1030
1218
|
entity_id: (entityInfo === null || entityInfo === void 0 ? void 0 : entityInfo.id) || '',
|
|
1031
|
-
data:
|
|
1219
|
+
data: appConfig.data || []
|
|
1032
1220
|
};
|
|
1033
1221
|
return [4, API.operatorService.confirm(body)];
|
|
1034
1222
|
case 1:
|
|
1035
|
-
data =
|
|
1036
|
-
(
|
|
1223
|
+
data = _l.sent();
|
|
1224
|
+
(_k = appConfig.onStepCompleted) === null || _k === void 0 ? void 0 : _k.call(appConfig, activeScreen.name, data);
|
|
1225
|
+
_d = merchantInfo || {}, board_id = _d.board_id, board_info_id = _d.board_info_id;
|
|
1226
|
+
if (!(showBoard && board_id && board_info_id)) return [3, 4];
|
|
1227
|
+
return [4, Promise.all([
|
|
1228
|
+
API.boardService.retrieveBoardInfo({ id: board_id, infoId: board_info_id }),
|
|
1229
|
+
API.boardService.retrieveBoardDetails(board_id)
|
|
1230
|
+
])];
|
|
1231
|
+
case 2:
|
|
1232
|
+
_e = _l.sent(), boardInfo = _e[0], boardData = _e[1];
|
|
1233
|
+
return [4, thunkApi.dispatch(getLeadByIdAsync(leadId))];
|
|
1234
|
+
case 3:
|
|
1235
|
+
_l.sent();
|
|
1236
|
+
thunkApi.dispatch(handleNextScreenStep('CONNECT_EXPRESS_SUCCESS_WITH_FLOW_BUTTONS_STEP'));
|
|
1237
|
+
return [2, { boardInfo: boardInfo, boardData: boardData, confirmData: data }];
|
|
1238
|
+
case 4:
|
|
1037
1239
|
if (authId) {
|
|
1038
|
-
if (
|
|
1240
|
+
if (appConfig.mode === 'popup') {
|
|
1039
1241
|
settings.data.appConfig.onFlowCompleted({ auth_id: authId, bi: bi });
|
|
1040
1242
|
thunkApi.dispatch(handleOpen(false));
|
|
1041
1243
|
return [2];
|
|
@@ -1051,16 +1253,34 @@ export var confirmInfo = createAsyncThunk('connectExpress/confirmInfo', function
|
|
|
1051
1253
|
});
|
|
1052
1254
|
});
|
|
1053
1255
|
export var onCloseCompleteAsync = createAsyncThunk('connectExpress/onCloseCompleteAsync', function (_, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1054
|
-
var connectExpress,
|
|
1055
|
-
var
|
|
1056
|
-
return __generator(this, function (
|
|
1057
|
-
switch (
|
|
1256
|
+
var _a, connectExpress, settings, _b, boardData, authData, confirmData, _c, appConfig, deviceInfo, activeScreen, _d, merchant, brand, entity, authId, redirectUrl, bi, urlQueryStart;
|
|
1257
|
+
var _e, _f, _g;
|
|
1258
|
+
return __generator(this, function (_h) {
|
|
1259
|
+
switch (_h.label) {
|
|
1058
1260
|
case 0:
|
|
1059
|
-
|
|
1060
|
-
|
|
1261
|
+
_a = thunkApi.getState(), connectExpress = _a.connectExpress, settings = _a.settings;
|
|
1262
|
+
_b = connectExpress.data.responseData || {}, boardData = _b.boardData, authData = _b.authData, confirmData = _b.confirmData;
|
|
1263
|
+
_c = settings.data, appConfig = _c.appConfig, deviceInfo = _c.deviceInfo, activeScreen = _c.activeScreen;
|
|
1264
|
+
_d = boardData || {}, merchant = _d.merchant, brand = _d.brand, entity = _d.entity;
|
|
1265
|
+
authId = (_e = authData === null || authData === void 0 ? void 0 : authData.auth) === null || _e === void 0 ? void 0 : _e.id;
|
|
1266
|
+
redirectUrl = appConfig.redirectUrl;
|
|
1267
|
+
bi = deviceInfo.browser.browser_id;
|
|
1268
|
+
if (confirmData && authId) {
|
|
1269
|
+
(_g = (_f = settings.data.appConfig).onStepCompleted) === null || _g === void 0 ? void 0 : _g.call(_f, activeScreen.name, confirmData);
|
|
1270
|
+
if (settings.data.appConfig.mode === 'popup') {
|
|
1271
|
+
settings.data.appConfig.onFlowCompleted({ auth_id: authId, bi: bi });
|
|
1272
|
+
thunkApi.dispatch(handleOpen(false));
|
|
1273
|
+
return [2];
|
|
1274
|
+
}
|
|
1275
|
+
if (redirectUrl) {
|
|
1276
|
+
urlQueryStart = redirectUrl.includes('?') ? '&' : '?';
|
|
1277
|
+
window.open("".concat(redirectUrl).concat(urlQueryStart, "authentication_id=").concat(authId, "&bi=").concat(bi), '_self');
|
|
1278
|
+
}
|
|
1279
|
+
return [2];
|
|
1280
|
+
}
|
|
1061
1281
|
return [4, thunkApi.dispatch(onCloseComplete({ merchantId: merchant === null || merchant === void 0 ? void 0 : merchant.id, brandId: brand === null || brand === void 0 ? void 0 : brand.id, entityId: entity === null || entity === void 0 ? void 0 : entity.id }))];
|
|
1062
1282
|
case 1:
|
|
1063
|
-
|
|
1283
|
+
_h.sent();
|
|
1064
1284
|
return [2];
|
|
1065
1285
|
}
|
|
1066
1286
|
});
|
|
@@ -1070,7 +1290,6 @@ var initialState = {
|
|
|
1070
1290
|
loading: false,
|
|
1071
1291
|
customLoading: false,
|
|
1072
1292
|
data: {
|
|
1073
|
-
showBoard: true,
|
|
1074
1293
|
isLeadIdPassed: false,
|
|
1075
1294
|
isStartFromBusinessCountry: false,
|
|
1076
1295
|
flowName: FlowsTypes.CONNECT_EXPRESS,
|
|
@@ -1081,7 +1300,6 @@ var initialState = {
|
|
|
1081
1300
|
},
|
|
1082
1301
|
nidData: {
|
|
1083
1302
|
nid: '',
|
|
1084
|
-
dob: '',
|
|
1085
1303
|
termAndConditionChecked: false
|
|
1086
1304
|
},
|
|
1087
1305
|
civilIdData: {
|
|
@@ -1091,6 +1309,9 @@ var initialState = {
|
|
|
1091
1309
|
otp: '',
|
|
1092
1310
|
authFor: AuthForType.MOBILE
|
|
1093
1311
|
},
|
|
1312
|
+
dobData: {
|
|
1313
|
+
dob: ''
|
|
1314
|
+
},
|
|
1094
1315
|
individualData: {
|
|
1095
1316
|
name: '',
|
|
1096
1317
|
email: '',
|
|
@@ -1118,9 +1339,6 @@ export var connectSlice = createSlice({
|
|
|
1118
1339
|
setLeadId: function (state, action) {
|
|
1119
1340
|
state.data.leadId = action.payload;
|
|
1120
1341
|
},
|
|
1121
|
-
setShowBoard: function (state, action) {
|
|
1122
|
-
state.data.showBoard = action.payload;
|
|
1123
|
-
},
|
|
1124
1342
|
storeIsStartFromBusinessCountry: function (state, action) {
|
|
1125
1343
|
state.data.isStartFromBusinessCountry = action.payload;
|
|
1126
1344
|
},
|
|
@@ -1156,7 +1374,8 @@ export var connectSlice = createSlice({
|
|
|
1156
1374
|
state.data.otpData.otp = '';
|
|
1157
1375
|
},
|
|
1158
1376
|
resetStore: function (state) {
|
|
1159
|
-
|
|
1377
|
+
var _a;
|
|
1378
|
+
state.data = __assign(__assign({}, state.data), { responseData: { leadData: (_a = state.data.responseData) === null || _a === void 0 ? void 0 : _a.leadData } });
|
|
1160
1379
|
},
|
|
1161
1380
|
resetIndividualScreen: function (state) {
|
|
1162
1381
|
state.data.individualData = initialState.data.individualData;
|
|
@@ -1172,11 +1391,9 @@ export var connectSlice = createSlice({
|
|
|
1172
1391
|
state.customLoading = false;
|
|
1173
1392
|
var _a = action.payload, data = _a.data, countryCode = _a.countryCode, boardInfo = _a.boardInfo, boardData = _a.boardData;
|
|
1174
1393
|
state.data.responseData = __assign(__assign({}, state.data.responseData), { leadData: data, boardInfo: boardInfo, boardData: boardData });
|
|
1175
|
-
var _b = data || {}, identification = _b.identification,
|
|
1394
|
+
var _b = data || {}, identification = _b.identification, contact = _b.contact, terms_conditions_accepted = _b.terms_conditions_accepted;
|
|
1176
1395
|
if (identification === null || identification === void 0 ? void 0 : identification.id)
|
|
1177
1396
|
state.data.nidData.nid = identification === null || identification === void 0 ? void 0 : identification.id;
|
|
1178
|
-
if (date_of_birth)
|
|
1179
|
-
state.data.nidData.dob = date_of_birth;
|
|
1180
1397
|
var phone = (contact || {}).phone;
|
|
1181
1398
|
if (phone) {
|
|
1182
1399
|
state.data.mobileData.mobile = phone === null || phone === void 0 ? void 0 : phone.number;
|
|
@@ -1200,11 +1417,9 @@ export var connectSlice = createSlice({
|
|
|
1200
1417
|
state.loading = false;
|
|
1201
1418
|
var _c = action.payload, data = _c.data, countryCode = _c.countryCode;
|
|
1202
1419
|
state.data.responseData = __assign(__assign({}, state.data.responseData), { leadData: data });
|
|
1203
|
-
var _d = data || {}, name = _d.name, contact = _d.contact, brand = _d.brand, identification = _d.identification,
|
|
1420
|
+
var _d = data || {}, name = _d.name, contact = _d.contact, brand = _d.brand, identification = _d.identification, terms_conditions_accepted = _d.terms_conditions_accepted;
|
|
1204
1421
|
if (identification === null || identification === void 0 ? void 0 : identification.id)
|
|
1205
1422
|
state.data.nidData.nid = identification === null || identification === void 0 ? void 0 : identification.id;
|
|
1206
|
-
if (date_of_birth)
|
|
1207
|
-
state.data.nidData.dob = date_of_birth;
|
|
1208
1423
|
var fullName = concatenateObjectValues(name, ['first', 'middle', 'last']);
|
|
1209
1424
|
if (!!fullName) {
|
|
1210
1425
|
var capitalizedName = capitalizeTheFirstLetterOfEachWord(fullName);
|
|
@@ -1251,29 +1466,20 @@ export var connectSlice = createSlice({
|
|
|
1251
1466
|
.addCase(resendMobileAuthOTP.rejected, function (state, action) {
|
|
1252
1467
|
state.error = action.error.message;
|
|
1253
1468
|
})
|
|
1254
|
-
.addCase(
|
|
1255
|
-
state.loading = true;
|
|
1256
|
-
state.error = null;
|
|
1257
|
-
})
|
|
1258
|
-
.addCase(createNIDAuthAsync.fulfilled, function (state, action) {
|
|
1469
|
+
.addCase(createNafathAuth.fulfilled, function (state, action) {
|
|
1259
1470
|
state.loading = false;
|
|
1260
|
-
state.
|
|
1471
|
+
state.error = null;
|
|
1472
|
+
var _a = action.payload, formData = _a.formData, response = _a.response;
|
|
1473
|
+
state.data.nidData = formData;
|
|
1474
|
+
state.data.responseData = __assign(__assign({}, state.data.responseData), { authData: response });
|
|
1261
1475
|
state.data.otpData.authFor = AuthForType.NATIONAL_ID;
|
|
1262
|
-
state.data.responseData = __assign(__assign({}, state.data.responseData), { authData: action.payload.response });
|
|
1263
1476
|
})
|
|
1264
|
-
.addCase(
|
|
1265
|
-
state.loading =
|
|
1266
|
-
state.error = action.error.message;
|
|
1267
|
-
})
|
|
1268
|
-
.addCase(resendNIDAuthOTP.pending, function (state) {
|
|
1477
|
+
.addCase(createNafathAuth.pending, function (state) {
|
|
1478
|
+
state.loading = true;
|
|
1269
1479
|
state.error = null;
|
|
1270
1480
|
})
|
|
1271
|
-
.addCase(
|
|
1272
|
-
state.
|
|
1273
|
-
state.data.otpData.authFor = AuthForType.NATIONAL_ID;
|
|
1274
|
-
state.data.responseData = __assign(__assign({}, state.data.responseData), { authData: action.payload.response });
|
|
1275
|
-
})
|
|
1276
|
-
.addCase(resendNIDAuthOTP.rejected, function (state, action) {
|
|
1481
|
+
.addCase(createNafathAuth.rejected, function (state, action) {
|
|
1482
|
+
state.loading = false;
|
|
1277
1483
|
state.error = action.error.message;
|
|
1278
1484
|
})
|
|
1279
1485
|
.addCase(createCivilIdAuthAsync.pending, function (state) {
|
|
@@ -1305,32 +1511,20 @@ export var connectSlice = createSlice({
|
|
|
1305
1511
|
state.loading = false;
|
|
1306
1512
|
state.error = action.error.message;
|
|
1307
1513
|
})
|
|
1308
|
-
.addCase(
|
|
1514
|
+
.addCase(createNIDNafathAuthIdentityAsync.pending, function (state) {
|
|
1309
1515
|
state.loading = true;
|
|
1310
1516
|
state.error = null;
|
|
1311
1517
|
})
|
|
1312
|
-
.addCase(
|
|
1518
|
+
.addCase(createNIDNafathAuthIdentityAsync.fulfilled, function (state, action) {
|
|
1313
1519
|
var _a;
|
|
1314
1520
|
state.loading = false;
|
|
1315
1521
|
state.data.nidData = action.payload.formData;
|
|
1316
1522
|
state.data.otpData.authFor = AuthForType.NATIONAL_ID_MISSED;
|
|
1317
1523
|
state.data.responseData = __assign(__assign({}, state.data.responseData), { authData: __assign(__assign({}, (_a = state.data.responseData) === null || _a === void 0 ? void 0 : _a.authData), action.payload.response) });
|
|
1318
1524
|
})
|
|
1319
|
-
.addCase(
|
|
1525
|
+
.addCase(createNIDNafathAuthIdentityAsync.rejected, function (state, action) {
|
|
1320
1526
|
state.loading = false;
|
|
1321
1527
|
state.error = action.error.message;
|
|
1322
|
-
})
|
|
1323
|
-
.addCase(resendNIDAuthIdentityOTP.pending, function (state) {
|
|
1324
|
-
state.error = null;
|
|
1325
|
-
})
|
|
1326
|
-
.addCase(resendNIDAuthIdentityOTP.fulfilled, function (state, action) {
|
|
1327
|
-
var _a;
|
|
1328
|
-
state.data.nidData = action.payload.formData;
|
|
1329
|
-
state.data.otpData.authFor = AuthForType.NATIONAL_ID_MISSED;
|
|
1330
|
-
state.data.responseData = __assign(__assign({}, state.data.responseData), { authData: __assign(__assign({}, (_a = state.data.responseData) === null || _a === void 0 ? void 0 : _a.authData), action.payload.response) });
|
|
1331
|
-
})
|
|
1332
|
-
.addCase(resendNIDAuthIdentityOTP.rejected, function (state, action) {
|
|
1333
|
-
state.error = action.error.message;
|
|
1334
1528
|
})
|
|
1335
1529
|
.addCase(verifyMobileOtpAsync.pending, function (state) {
|
|
1336
1530
|
state.loading = true;
|
|
@@ -1345,18 +1539,23 @@ export var connectSlice = createSlice({
|
|
|
1345
1539
|
state.loading = false;
|
|
1346
1540
|
state.error = action.error.message;
|
|
1347
1541
|
})
|
|
1348
|
-
.addCase(
|
|
1542
|
+
.addCase(verifyNafathAsync.pending, function (state) {
|
|
1349
1543
|
state.loading = true;
|
|
1350
1544
|
state.error = null;
|
|
1351
1545
|
})
|
|
1352
|
-
.addCase(
|
|
1546
|
+
.addCase(verifyNafathAsync.fulfilled, function (state, action) {
|
|
1353
1547
|
var _a;
|
|
1354
1548
|
state.loading = false;
|
|
1355
|
-
|
|
1549
|
+
var _b = action.payload, data = _b.data, isNextScreenIsDob = _b.isNextScreenIsDob;
|
|
1550
|
+
state.data.individualData.isPrevDob = isNextScreenIsDob || false;
|
|
1551
|
+
state.data.responseData = __assign(__assign({}, state.data.responseData), { authData: __assign(__assign({}, (_a = state.data.responseData) === null || _a === void 0 ? void 0 : _a.authData), data) });
|
|
1356
1552
|
})
|
|
1357
|
-
.addCase(
|
|
1553
|
+
.addCase(verifyNafathAsync.rejected, function (state, action) {
|
|
1358
1554
|
state.loading = false;
|
|
1359
|
-
|
|
1555
|
+
var error = action.error.message;
|
|
1556
|
+
if (error !== 'Aborted') {
|
|
1557
|
+
state.error = error;
|
|
1558
|
+
}
|
|
1360
1559
|
})
|
|
1361
1560
|
.addCase(verifyPACIAsync.pending, function (state) {
|
|
1362
1561
|
state.loading = true;
|
|
@@ -1374,19 +1573,24 @@ export var connectSlice = createSlice({
|
|
|
1374
1573
|
state.error = error;
|
|
1375
1574
|
}
|
|
1376
1575
|
})
|
|
1377
|
-
.addCase(
|
|
1576
|
+
.addCase(verifyNafathIdentityAsync.pending, function (state) {
|
|
1378
1577
|
state.loading = true;
|
|
1379
1578
|
state.error = null;
|
|
1380
1579
|
})
|
|
1381
|
-
.addCase(
|
|
1382
|
-
var _a, _b
|
|
1580
|
+
.addCase(verifyNafathIdentityAsync.fulfilled, function (state, action) {
|
|
1581
|
+
var _a, _b;
|
|
1383
1582
|
state.loading = false;
|
|
1583
|
+
var _c = action.payload, data = _c.data, isNextScreenIsDob = _c.isNextScreenIsDob;
|
|
1384
1584
|
var auth = (((_a = state.data.responseData) === null || _a === void 0 ? void 0 : _a.authData) || {}).auth;
|
|
1385
|
-
state.data.
|
|
1585
|
+
state.data.individualData.isPrevDob = isNextScreenIsDob || false;
|
|
1586
|
+
state.data.responseData = __assign(__assign({}, state.data.responseData), { authData: __assign(__assign(__assign({}, (_b = state.data.responseData) === null || _b === void 0 ? void 0 : _b.authData), data), { auth: __assign(__assign({}, data === null || data === void 0 ? void 0 : data.auth), { id: auth === null || auth === void 0 ? void 0 : auth.id }) }) });
|
|
1386
1587
|
})
|
|
1387
|
-
.addCase(
|
|
1588
|
+
.addCase(verifyNafathIdentityAsync.rejected, function (state, action) {
|
|
1388
1589
|
state.loading = false;
|
|
1389
|
-
|
|
1590
|
+
var error = action.error.message;
|
|
1591
|
+
if (error !== 'Aborted') {
|
|
1592
|
+
state.error = error;
|
|
1593
|
+
}
|
|
1390
1594
|
})
|
|
1391
1595
|
.addCase(verifyPaciLeadIdentityAsync.pending, function (state) {
|
|
1392
1596
|
state.loading = true;
|
|
@@ -1497,6 +1701,20 @@ export var connectSlice = createSlice({
|
|
|
1497
1701
|
if (action.error.message === 'Aborted')
|
|
1498
1702
|
return;
|
|
1499
1703
|
state.error = action.error.message;
|
|
1704
|
+
})
|
|
1705
|
+
.addCase(updateLeadDOBAsync.fulfilled, function (state, action) {
|
|
1706
|
+
state.loading = false;
|
|
1707
|
+
state.error = null;
|
|
1708
|
+
state.data.dobData = action.payload.formData;
|
|
1709
|
+
state.data.responseData = __assign(__assign({}, state.data.responseData), { dobData: action.payload.response });
|
|
1710
|
+
})
|
|
1711
|
+
.addCase(updateLeadDOBAsync.pending, function (state) {
|
|
1712
|
+
state.loading = true;
|
|
1713
|
+
state.error = null;
|
|
1714
|
+
})
|
|
1715
|
+
.addCase(updateLeadDOBAsync.rejected, function (state, action) {
|
|
1716
|
+
state.loading = false;
|
|
1717
|
+
state.error = action.error.message;
|
|
1500
1718
|
})
|
|
1501
1719
|
.addCase(updateLeadIndividualAsync.fulfilled, function (state, action) {
|
|
1502
1720
|
var _a, _b;
|
|
@@ -1527,6 +1745,33 @@ export var connectSlice = createSlice({
|
|
|
1527
1745
|
.addCase(updateLeadBusinessDataAsync.rejected, function (state, action) {
|
|
1528
1746
|
state.loading = false;
|
|
1529
1747
|
state.error = action.error.message;
|
|
1748
|
+
})
|
|
1749
|
+
.addCase(updateLeadMobile.fulfilled, function (state, action) {
|
|
1750
|
+
state.loading = false;
|
|
1751
|
+
state.error = null;
|
|
1752
|
+
state.data.individualData.mobile = action.payload.formData.mobile;
|
|
1753
|
+
state.data.responseData = __assign(__assign({}, state.data.responseData), { individualData: action.payload.leadResponse });
|
|
1754
|
+
})
|
|
1755
|
+
.addCase(updateLeadMobile.pending, function (state) {
|
|
1756
|
+
state.loading = true;
|
|
1757
|
+
state.error = null;
|
|
1758
|
+
})
|
|
1759
|
+
.addCase(updateLeadMobile.rejected, function (state, action) {
|
|
1760
|
+
state.loading = false;
|
|
1761
|
+
state.error = action.error.message;
|
|
1762
|
+
})
|
|
1763
|
+
.addCase(skipUpdateLeadMobile.fulfilled, function (state, action) {
|
|
1764
|
+
state.loading = false;
|
|
1765
|
+
state.error = null;
|
|
1766
|
+
state.data.responseData = __assign(__assign({}, state.data.responseData), { individualData: action.payload.leadResponse });
|
|
1767
|
+
})
|
|
1768
|
+
.addCase(skipUpdateLeadMobile.pending, function (state) {
|
|
1769
|
+
state.loading = true;
|
|
1770
|
+
state.error = null;
|
|
1771
|
+
})
|
|
1772
|
+
.addCase(skipUpdateLeadMobile.rejected, function (state, action) {
|
|
1773
|
+
state.loading = false;
|
|
1774
|
+
state.error = action.error.message;
|
|
1530
1775
|
})
|
|
1531
1776
|
.addCase(createAccountAsync.pending, function (state) {
|
|
1532
1777
|
state.loading = true;
|
|
@@ -1539,6 +1784,19 @@ export var connectSlice = createSlice({
|
|
|
1539
1784
|
.addCase(createAccountAsync.rejected, function (state, action) {
|
|
1540
1785
|
state.loading = false;
|
|
1541
1786
|
state.error = action.error.message;
|
|
1787
|
+
})
|
|
1788
|
+
.addCase(retrieveDetailsAfterCreateAccountAsync.pending, function (state) {
|
|
1789
|
+
state.loading = true;
|
|
1790
|
+
state.error = null;
|
|
1791
|
+
})
|
|
1792
|
+
.addCase(retrieveDetailsAfterCreateAccountAsync.fulfilled, function (state, action) {
|
|
1793
|
+
state.loading = false;
|
|
1794
|
+
state.error = null;
|
|
1795
|
+
state.data.responseData = __assign(__assign({}, state.data.responseData), action.payload);
|
|
1796
|
+
})
|
|
1797
|
+
.addCase(retrieveDetailsAfterCreateAccountAsync.rejected, function (state, action) {
|
|
1798
|
+
state.loading = false;
|
|
1799
|
+
state.error = action.error.message;
|
|
1542
1800
|
})
|
|
1543
1801
|
.addCase(getMerchantListAsync.pending, function (state) {
|
|
1544
1802
|
state.loading = true;
|
|
@@ -1564,10 +1822,11 @@ export var connectSlice = createSlice({
|
|
|
1564
1822
|
state.loading = true;
|
|
1565
1823
|
state.error = null;
|
|
1566
1824
|
})
|
|
1567
|
-
.addCase(confirmInfo.fulfilled, function (state) {
|
|
1825
|
+
.addCase(confirmInfo.fulfilled, function (state, action) {
|
|
1568
1826
|
state.loading = false;
|
|
1569
1827
|
state.error = null;
|
|
1570
|
-
|
|
1828
|
+
var _a = action.payload || {}, boardInfo = _a.boardInfo, boardData = _a.boardData, confirmData = _a.confirmData;
|
|
1829
|
+
state.data.responseData = __assign(__assign({}, state.data.responseData), { boardInfo: boardInfo, boardData: boardData, confirmData: confirmData });
|
|
1571
1830
|
})
|
|
1572
1831
|
.addCase(confirmInfo.rejected, function (state, action) {
|
|
1573
1832
|
state.loading = false;
|
|
@@ -1621,6 +1880,6 @@ export var connectSlice = createSlice({
|
|
|
1621
1880
|
});
|
|
1622
1881
|
}
|
|
1623
1882
|
});
|
|
1624
|
-
export var clearError = (_a = connectSlice.actions, _a.clearError), stopLoader = _a.stopLoader, setIsLeadIdPassed = _a.setIsLeadIdPassed, resetMobileScreen = _a.resetMobileScreen, resetOTPValue = _a.resetOTPValue, resetNIDScreen = _a.resetNIDScreen, resetCivilScreen = _a.resetCivilScreen, resetStore = _a.resetStore, setError = _a.setError, setLeadId = _a.setLeadId,
|
|
1883
|
+
export var clearError = (_a = connectSlice.actions, _a.clearError), stopLoader = _a.stopLoader, setIsLeadIdPassed = _a.setIsLeadIdPassed, resetMobileScreen = _a.resetMobileScreen, resetOTPValue = _a.resetOTPValue, resetNIDScreen = _a.resetNIDScreen, resetCivilScreen = _a.resetCivilScreen, resetStore = _a.resetStore, setError = _a.setError, setLeadId = _a.setLeadId, resetIndividualScreen = _a.resetIndividualScreen, setDefaultCountryCode = _a.setDefaultCountryCode, storeIsStartFromBusinessCountry = _a.storeIsStartFromBusinessCountry, resetAuthenticationScreen = _a.resetAuthenticationScreen;
|
|
1625
1884
|
export default connectSlice.reducer;
|
|
1626
1885
|
export var connectExpressSelector = function (state) { return state.connectExpress; };
|