@tap-payments/auth-jsconnect 2.10.10-beta → 2.10.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/build/@types/app.d.ts +25 -18
- package/build/@types/app.js +7 -0
- package/build/@types/config.d.ts +1 -1
- package/build/@types/form.d.ts +32 -27
- package/build/@types/theme.d.ts +1 -1
- package/build/api/account.d.ts +4 -4
- package/build/api/account.js +7 -4
- package/build/api/auth.d.ts +17 -16
- package/build/api/auth.js +7 -3
- package/build/api/availabilityServices.d.ts +3 -3
- package/build/api/axios.d.ts +1 -1
- package/build/api/axios.js +1 -1
- package/build/api/board.d.ts +3 -3
- package/build/api/brand.d.ts +1 -1
- package/build/api/country.d.ts +1 -1
- package/build/api/data.d.ts +8 -8
- package/build/api/document.d.ts +2 -2
- package/build/api/entity.d.ts +13 -10
- package/build/api/file.d.ts +1 -1
- package/build/api/firebase.js +1 -1
- package/build/api/headers.d.ts +5 -0
- package/build/api/headers.js +3 -0
- package/build/api/index.d.ts +4 -4
- package/build/api/individual.d.ts +5 -5
- package/build/api/init.d.ts +1 -1
- package/build/api/lead.d.ts +14 -13
- package/build/api/lead.js +1 -1
- package/build/api/operator.d.ts +3 -3
- package/build/api/operator.js +6 -3
- package/build/api/user.d.ts +3 -3
- package/build/app/settings.d.ts +22 -3
- package/build/app/settings.js +9 -6
- package/build/app/store.d.ts +4 -4
- package/build/assets/currencies/AEDSymbol.d.ts +7 -0
- package/build/assets/currencies/AEDSymbol.js +28 -0
- package/build/assets/currencies/SARSymbol.d.ts +7 -0
- package/build/assets/currencies/SARSymbol.js +28 -0
- package/build/assets/currencies/index.d.ts +2 -0
- package/build/assets/currencies/index.js +2 -0
- package/build/assets/currencies/utils.d.ts +4 -0
- package/build/assets/currencies/utils.js +6 -0
- package/build/assets/locales/ar.json +53 -7
- package/build/assets/locales/en.json +58 -11
- package/build/components/AnimationFlow/AnimationFlow.d.ts +1 -1
- package/build/components/AnimationFlow/BottomSheet.d.ts +1 -1
- package/build/components/AnimationFlow/Dialog.d.ts +1 -1
- package/build/components/AnimationFlow/Error.d.ts +1 -2
- package/build/components/AnimationFlow/Loader.d.ts +1 -2
- package/build/components/ArabicDatePicker/ArabicDatePicker.d.ts +1 -1
- package/build/components/Button/Button.d.ts +1 -1
- package/build/components/CheckBox/CheckBox.d.ts +1 -1
- package/build/components/Collapse/Collapse.d.ts +1 -2
- package/build/components/DatePicker/DatePicker.d.ts +1 -1
- package/build/components/ExpandIcon/ExpandIcon.d.ts +1 -2
- package/build/components/FileInput/DragAndDrop.d.ts +1 -2
- package/build/components/FileInput/UploadInput.d.ts +1 -2
- package/build/components/Footer/Footer.d.ts +1 -1
- package/build/components/Form/Form.d.ts +1 -1
- package/build/components/Input/Input.d.ts +1 -1
- package/build/components/InputAdornment/InputAdornment.d.ts +1 -1
- package/build/components/List/List.d.ts +1 -1
- package/build/components/ListItem/ListItem.d.ts +1 -1
- package/build/components/Loader/Loader.d.ts +1 -1
- package/build/components/LogoBadge/LogoBadge.d.ts +1 -1
- package/build/components/OTPField/OTPField.d.ts +1 -1
- package/build/components/OTPTimer/OTPTimer.d.ts +1 -1
- package/build/components/ProgressBar/CircularProgressBar.d.ts +1 -2
- package/build/components/ProgressBar/ProgressBar.d.ts +1 -1
- package/build/components/Providers/ReduxProvider.d.ts +1 -1
- package/build/components/Providers/ThemeProvider.d.ts +1 -1
- package/build/components/Radio/Radio.d.ts +1 -1
- package/build/components/RadioGroup/RadioGroup.d.ts +1 -1
- package/build/components/RadioLabel/RadioLabel.d.ts +1 -1
- package/build/components/SimpleList/SimpleList.d.ts +1 -1
- package/build/components/Slide/Slide.d.ts +1 -1
- package/build/components/SocialMediaGroup/SocialMediaGroup.d.ts +1 -1
- package/build/components/Text/Text.d.ts +1 -1
- package/build/components/TextWithCurrency/TextWithCurrency.d.ts +6 -0
- package/build/components/TextWithCurrency/TextWithCurrency.js +14 -0
- package/build/components/TextWithCurrency/index.d.ts +2 -0
- package/build/components/TextWithCurrency/index.js +2 -0
- package/build/components/ToggleButton/ToggleButton.d.ts +1 -1
- package/build/components/ToggleButtonGroup/ToggleButtonGroup.d.ts +1 -1
- package/build/components/Tooltip/Tooltip.d.ts +1 -1
- package/build/components/Warning/Warning.d.ts +1 -1
- package/build/constants/api.d.ts +1 -0
- package/build/constants/api.js +2 -0
- package/build/constants/app.d.ts +13 -1
- package/build/constants/app.js +139 -26
- package/build/constants/assets.d.ts +12 -3
- package/build/constants/assets.js +123 -105
- package/build/constants/dummy.js +27 -20
- package/build/constants/validation.d.ts +1 -0
- package/build/constants/validation.js +1 -0
- package/build/features/app/auth/authStore.d.ts +232 -24
- package/build/features/app/auth/authStore.js +194 -117
- package/build/features/app/bank/bankStore.d.ts +93 -12
- package/build/features/app/bank/bankStore.js +25 -21
- package/build/features/app/board/boardStore.d.ts +41 -5
- package/build/features/app/board/boardStore.js +12 -8
- package/build/features/app/brand/brandStore.d.ts +143 -17
- package/build/features/app/brand/brandStore.js +23 -19
- package/build/features/app/business/businessStore.d.ts +192 -21
- package/build/features/app/business/businessStore.js +46 -37
- package/build/features/app/connect/connectStore.d.ts +186 -23
- package/build/features/app/connect/connectStore.js +49 -32
- package/build/features/app/connectExpress/connectExpressStore.d.ts +324 -36
- package/build/features/app/connectExpress/connectExpressStore.js +236 -47
- package/build/features/app/entity/entityStore.d.ts +93 -12
- package/build/features/app/entity/entityStore.js +22 -18
- package/build/features/app/individual/individualStore.d.ts +186 -24
- package/build/features/app/individual/individualStore.js +34 -29
- package/build/features/app/kyc/kycStore.d.ts +62 -8
- package/build/features/app/kyc/kycStore.js +1 -1
- package/build/features/app/password/passwordStore.d.ts +123 -15
- package/build/features/app/password/passwordStore.js +45 -47
- package/build/features/app/signIn/signInStore.d.ts +61 -7
- package/build/features/app/signIn/signInStore.js +13 -17
- package/build/features/app/tax/taxStore.d.ts +83 -11
- package/build/features/app/tax/taxStore.js +22 -18
- package/build/features/auth/Auth.d.ts +2 -3
- package/build/features/auth/Auth.js +1 -1
- package/build/features/auth/screens/AccountCreatedLoader/AccountCreatedLoader.d.ts +1 -1
- package/build/features/auth/screens/AccountNotFound/AccountNotFound.d.ts +1 -1
- package/build/features/auth/screens/AuthMerchant/AuthMerchant.d.ts +1 -1
- package/build/features/auth/screens/AuthSwitch/AuthSwitch.d.ts +1 -1
- package/build/features/auth/screens/AuthenticationList/AuthenticationList.d.ts +1 -1
- package/build/features/auth/screens/AuthenticationList/BrandList.d.ts +1 -1
- package/build/features/auth/screens/AuthenticationList/EntityLegalName.d.ts +1 -2
- package/build/features/auth/screens/AuthenticationList/EntityLicenseType.d.ts +3 -3
- package/build/features/auth/screens/AuthenticationList/EntityList.d.ts +1 -1
- package/build/features/auth/screens/AuthenticationList/EntityList.js +2 -2
- package/build/features/auth/screens/AuthenticationList/LicenseNumber.d.ts +1 -1
- package/build/features/auth/screens/BusinessCountry/BusinessCountry.d.ts +1 -1
- package/build/features/auth/screens/BusinessCountry/BusinessCountry.js +1 -1
- package/build/features/auth/screens/CivilID/CivilID.d.ts +1 -1
- package/build/features/auth/screens/DOB/DOB.d.ts +1 -2
- package/build/features/auth/screens/DOB/DOBForm.d.ts +1 -1
- package/build/features/auth/screens/Email/Email.d.ts +1 -1
- package/build/features/auth/screens/EmailSent/EmailSent.d.ts +1 -1
- package/build/features/auth/screens/MigratingData/MigratingData.d.ts +1 -1
- package/build/features/auth/screens/Mobile/Mobile.d.ts +1 -1
- package/build/features/auth/screens/NID/NID.d.ts +1 -1
- package/build/features/auth/screens/OTP/OTP.d.ts +6 -3
- package/build/features/auth/screens/OTP/OTP.js +15 -3
- package/build/features/auth/screens/OTP/OTPInput.d.ts +1 -1
- package/build/features/auth/screens/OTP/index.d.ts +1 -2
- package/build/features/auth/screens/OperatorError/OperatorError.d.ts +1 -1
- package/build/features/auth/screens/Passcode/Passcode.d.ts +8 -0
- package/build/features/auth/screens/Passcode/Passcode.js +82 -0
- package/build/features/auth/screens/Passcode/PasscodeInput.d.ts +6 -0
- package/build/features/auth/screens/Passcode/PasscodeInput.js +42 -0
- package/build/features/auth/screens/Passcode/index.d.ts +2 -0
- package/build/features/auth/screens/Passcode/index.js +2 -0
- package/build/features/auth/screens/Passcode/validation.d.ts +8 -0
- package/build/features/auth/screens/Passcode/validation.js +4 -0
- package/build/features/auth/screens/Password/Password.d.ts +1 -1
- package/build/features/auth/screens/Password/PasswordField.d.ts +1 -1
- package/build/features/auth/screens/PreparingData/PreparingData.d.ts +1 -1
- package/build/features/auth/screens/ResetPasswordMessage/ResetPasswordMessage.d.ts +1 -1
- package/build/features/auth/screens/VerifyNafath/VerifyNafath.d.ts +1 -1
- package/build/features/auth/screens/VerifyPACI/VerifyPACI.d.ts +1 -1
- package/build/features/bank/Bank.d.ts +1 -2
- package/build/features/bank/screens/BankDetails/BankDetails.d.ts +1 -2
- package/build/features/bank/screens/BankDetails/BankName.d.ts +2 -3
- package/build/features/bank/screens/BankDetails/BankStatement.d.ts +2 -3
- package/build/features/bank/screens/BankDetails/Beneficiary.d.ts +1 -2
- package/build/features/bank/screens/BankDetails/ConfirmPolicy.d.ts +2 -3
- package/build/features/bank/screens/BankDetails/IBAN.d.ts +1 -2
- package/build/features/bank/screens/BankDetails/IBAN.js +1 -1
- package/build/features/bank/screens/OperatorError/OperatorError.d.ts +1 -1
- package/build/features/bank/screens/PrepareDataLoading/PrepareDataLoading.d.ts +2 -2
- package/build/features/bank/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +1 -1
- package/build/features/bank/screens/Success/Success.d.ts +1 -1
- package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +1 -1
- package/build/features/bank/screens/Verify/OTPInput.d.ts +1 -1
- package/build/features/bank/screens/Verify/Verify.d.ts +1 -1
- package/build/features/board/Board.d.ts +1 -2
- package/build/features/board/screens/OperatorError/OperatorError.d.ts +1 -1
- package/build/features/board/screens/PrepareDataLoading/PrepareDataLoading.d.ts +2 -2
- package/build/features/board/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +1 -1
- package/build/features/board/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +1 -1
- package/build/features/board/screens/Verify/OTPInput.d.ts +1 -1
- package/build/features/board/screens/Verify/Verify.d.ts +1 -1
- package/build/features/brand/Brand.d.ts +1 -2
- package/build/features/brand/screens/BrandActivities/ActivitiesList.d.ts +13 -29
- package/build/features/brand/screens/BrandActivities/BrandActivities.d.ts +1 -2
- package/build/features/brand/screens/BrandActivities/CustomerBase.d.ts +13 -37
- package/build/features/brand/screens/BrandActivities/ExpectedCustomers.d.ts +1 -2
- package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.d.ts +1 -2
- package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.js +3 -8
- package/build/features/brand/screens/BrandActivities/RefundPolicy.d.ts +12 -20
- package/build/features/brand/screens/BrandActivities/TAC.d.ts +3 -3
- package/build/features/brand/screens/BrandActivities/TransactionPolicy.d.ts +2 -3
- package/build/features/brand/screens/BrandInfo/BrandInfo.d.ts +1 -2
- package/build/features/brand/screens/BrandInfo/BrandLogo.d.ts +2 -3
- package/build/features/brand/screens/BrandInfo/BrandName.d.ts +1 -1
- package/build/features/brand/screens/BrandInfo/BrandName.js +1 -1
- package/build/features/brand/screens/BrandInfo/SalesChannels.d.ts +1 -2
- package/build/features/brand/screens/BrandSegmentInfo/BrandSegmentInfo.d.ts +1 -2
- package/build/features/brand/screens/BrandSegmentInfo/SegmentLocations.d.ts +1 -2
- package/build/features/brand/screens/BrandSegmentInfo/SegmentProfits.d.ts +1 -2
- package/build/features/brand/screens/BrandSegmentInfo/SegmentTechs.d.ts +1 -2
- package/build/features/brand/screens/BrandSegmentInfo/TeamSize.d.ts +1 -2
- package/build/features/brand/screens/OperatorError/OperatorError.d.ts +1 -1
- package/build/features/brand/screens/PrepareDataLoading/PrepareDataLoading.d.ts +2 -2
- package/build/features/brand/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +1 -1
- package/build/features/brand/screens/Success/Success.d.ts +1 -1
- package/build/features/brand/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +1 -1
- package/build/features/brand/screens/Verify/OTPInput.d.ts +1 -1
- package/build/features/brand/screens/Verify/Verify.d.ts +1 -1
- package/build/features/business/Business.d.ts +1 -2
- package/build/features/business/screens/Activities/Activities.d.ts +1 -2
- package/build/features/business/screens/Activities/ActivitiesList.d.ts +9 -25
- package/build/features/business/screens/Activities/LicenseName.d.ts +1 -1
- package/build/features/business/screens/Activities/OperationStartDate.d.ts +5 -13
- package/build/features/business/screens/BrandDetails/BrandDetails.d.ts +1 -1
- package/build/features/business/screens/BrandDetails/BrandName.d.ts +1 -1
- package/build/features/business/screens/BrandDetails/Header.d.ts +1 -1
- package/build/features/business/screens/BrandDetails/LicenseInfo.d.ts +1 -1
- package/build/features/business/screens/BrandDetails/SalesChannel.d.ts +5 -13
- package/build/features/business/screens/BusinessType/Article.d.ts +2 -3
- package/build/features/business/screens/BusinessType/BusinessType.d.ts +1 -1
- package/build/features/business/screens/BusinessType/BusinessType.js +13 -2
- package/build/features/business/screens/BusinessType/EntityLicenseList.d.ts +1 -1
- package/build/features/business/screens/BusinessType/EntityLicenseList.js +11 -5
- package/build/features/business/screens/BusinessType/EntityName.d.ts +1 -2
- package/build/features/business/screens/BusinessType/LicenseCertificate.d.ts +1 -2
- package/build/features/business/screens/BusinessType/LicenseList.d.ts +1 -1
- package/build/features/business/screens/BusinessType/LicenseList.js +15 -7
- package/build/features/business/screens/BusinessType/LicenseNumber.d.ts +1 -1
- package/build/features/business/screens/BusinessType/LicenseType.d.ts +4 -4
- package/build/features/business/screens/BusinessType/SelectType.d.ts +1 -1
- package/build/features/business/screens/BusinessType/Switch.d.ts +1 -1
- package/build/features/business/screens/BusinessType/UnifiedNumber.d.ts +35 -0
- package/build/features/business/screens/BusinessType/UnifiedNumber.js +84 -0
- package/build/features/business/screens/BusinessType/validation.d.ts +6 -3
- package/build/features/business/screens/BusinessType/validation.js +31 -10
- package/build/features/business/screens/CivilID/CivilID.d.ts +1 -1
- package/build/features/business/screens/Customers/CustomerLocations.d.ts +17 -41
- package/build/features/business/screens/Customers/Customers.d.ts +1 -1
- package/build/features/business/screens/Customers/ExpectedCustomers.d.ts +1 -2
- package/build/features/business/screens/Customers/ExpectedSalesRange.d.ts +1 -2
- package/build/features/business/screens/Customers/ExpectedSalesRange.js +3 -8
- package/build/features/business/screens/Customers/RefundPolicy.d.ts +12 -20
- package/build/features/business/screens/Customers/TransactionPolicy.d.ts +2 -3
- package/build/features/business/screens/DOB/DOB.d.ts +1 -1
- package/build/features/business/screens/DOB/DOBForm.d.ts +1 -1
- package/build/features/business/screens/IDBOD/DOB.d.ts +1 -1
- package/build/features/business/screens/IDBOD/ID.d.ts +1 -1
- package/build/features/business/screens/IDBOD/IDBOD.d.ts +1 -1
- package/build/features/business/screens/MobileOwnership/CollectMobileOwnership.d.ts +1 -2
- package/build/features/business/screens/MobileOwnership/MobileNumber.d.ts +1 -1
- package/build/features/business/screens/OperatorError/OperatorError.d.ts +1 -1
- package/build/features/business/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +1 -1
- package/build/features/business/screens/Success/Success.d.ts +1 -1
- package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +1 -1
- package/build/features/business/screens/Verify/OTPInput.d.ts +1 -1
- package/build/features/business/screens/Verify/Verify.d.ts +1 -1
- package/build/features/business/screens/VerifyNafath/VerifyNafath.d.ts +1 -1
- package/build/features/business/screens/VerifyPACI/VerifyPACI.d.ts +1 -1
- package/build/features/connect/Connect.d.ts +1 -2
- package/build/features/connect/Connect.js +1 -1
- package/build/features/connect/screens/BrandSegment/BrandSegment.d.ts +1 -1
- package/build/features/connect/screens/BrandSegment/TeamSize.d.ts +1 -2
- package/build/features/connect/screens/BusinessCountry/BusinessCountry.d.ts +1 -1
- package/build/features/connect/screens/BusinessCountry/BusinessCountry.js +1 -1
- package/build/features/connect/screens/CivilID/CivilID.d.ts +1 -1
- package/build/features/connect/screens/DOB/DOB.d.ts +1 -2
- package/build/features/connect/screens/DOB/DOBForm.d.ts +1 -1
- package/build/features/connect/screens/Individual/Email.d.ts +1 -1
- package/build/features/connect/screens/Individual/Email.js +1 -1
- package/build/features/connect/screens/Individual/Individual.d.ts +1 -1
- package/build/features/connect/screens/Individual/Name.d.ts +1 -1
- package/build/features/connect/screens/Merchant/BrandList.d.ts +1 -1
- package/build/features/connect/screens/Merchant/BrandName.d.ts +1 -1
- package/build/features/connect/screens/Merchant/BrandName.js +1 -1
- package/build/features/connect/screens/Merchant/Merchant.d.ts +1 -1
- package/build/features/connect/screens/Merchant/SalesChannels.d.ts +1 -2
- package/build/features/connect/screens/Merchant/TAC.d.ts +1 -1
- package/build/features/connect/screens/Mobile/Mobile.d.ts +1 -1
- package/build/features/connect/screens/Mobile/Title.d.ts +1 -1
- package/build/features/connect/screens/MobileOwnership/CollectMobileOwnership.d.ts +1 -2
- package/build/features/connect/screens/MobileOwnership/MobileNumber.d.ts +1 -1
- package/build/features/connect/screens/NID/NID.d.ts +1 -1
- package/build/features/connect/screens/OTP/OTP.d.ts +1 -1
- package/build/features/connect/screens/OTP/OTPInput.d.ts +1 -1
- package/build/features/connect/screens/OperatorError/OperatorError.d.ts +1 -1
- package/build/features/connect/screens/ThankYou/ThankYou.d.ts +1 -1
- package/build/features/connect/screens/VerifyNafath/VerifyNafath.d.ts +1 -1
- package/build/features/connect/screens/VerifyPACI/VerifyPACI.d.ts +1 -1
- package/build/features/connectExpress/ConnectExpress.d.ts +1 -2
- package/build/features/connectExpress/ConnectExpress.js +1 -1
- package/build/features/connectExpress/screens/AccountAlreadyCreated/AccountAlreadyCreated.d.ts +1 -1
- package/build/features/connectExpress/screens/AccountCreatedLoader/AccountCreatedLoader.d.ts +1 -1
- package/build/features/connectExpress/screens/AuthMerchant/AuthMerchant.d.ts +1 -1
- package/build/features/connectExpress/screens/AuthenticationList/AuthenticationList.d.ts +1 -1
- package/build/features/connectExpress/screens/AuthenticationList/BrandList.d.ts +1 -1
- package/build/features/connectExpress/screens/AuthenticationList/EntityLegalName.d.ts +1 -2
- package/build/features/connectExpress/screens/AuthenticationList/EntityLicenseType.d.ts +3 -3
- package/build/features/connectExpress/screens/AuthenticationList/EntityList.d.ts +1 -1
- package/build/features/connectExpress/screens/AuthenticationList/EntityList.js +2 -2
- package/build/features/connectExpress/screens/AuthenticationList/LicenseNumber.d.ts +1 -1
- package/build/features/connectExpress/screens/Brand/Brand.d.ts +1 -1
- package/build/features/connectExpress/screens/BusinessCountry/BusinessCountry.d.ts +1 -1
- package/build/features/connectExpress/screens/BusinessCountry/BusinessCountry.js +1 -1
- package/build/features/connectExpress/screens/CivilID/CivilID.d.ts +1 -1
- package/build/features/connectExpress/screens/CivilIDMissed/CivilID.d.ts +1 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/BrandName.d.ts +1 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/BrandName.js +1 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.d.ts +1 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.js +1 -0
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.d.ts +1 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.js +23 -7
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseNumber.d.ts +1 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseNumber.js +2 -2
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.d.ts +4 -4
- package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.d.ts +3 -3
- package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.js +1 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/UnifiedNumber.d.ts +36 -0
- package/build/features/connectExpress/screens/CollectBusinessInfo/UnifiedNumber.js +81 -0
- package/build/features/connectExpress/screens/CollectBusinessInfo/validation.d.ts +6 -3
- package/build/features/connectExpress/screens/CollectBusinessInfo/validation.js +57 -21
- package/build/features/connectExpress/screens/CollectIndividualInfo/CollectIndividualInfo.d.ts +1 -1
- package/build/features/connectExpress/screens/CollectIndividualInfo/Email.d.ts +1 -1
- package/build/features/connectExpress/screens/CollectIndividualInfo/Email.js +1 -1
- package/build/features/connectExpress/screens/CollectIndividualInfo/Name.d.ts +1 -1
- package/build/features/connectExpress/screens/CreateAccountLoader/CreateAccountLoader.d.ts +1 -1
- package/build/features/connectExpress/screens/DOB/DOB.d.ts +1 -2
- package/build/features/connectExpress/screens/DOB/DOBForm.d.ts +1 -1
- package/build/features/connectExpress/screens/GenericPrepareDataLoading/GenericPrepareDataLoading.d.ts +1 -2
- package/build/features/connectExpress/screens/IdentityVerifyNafath/IdentityVerifyNafath.d.ts +1 -1
- package/build/features/connectExpress/screens/IdentityVerifyPACI/VerifyPACI.d.ts +1 -1
- package/build/features/connectExpress/screens/Mobile/Mobile.d.ts +1 -1
- package/build/features/connectExpress/screens/Mobile/TAC.d.ts +1 -1
- package/build/features/connectExpress/screens/Mobile/Title.d.ts +1 -1
- package/build/features/connectExpress/screens/MobileOwnership/CollectMobileOwnership.d.ts +1 -2
- package/build/features/connectExpress/screens/MobileOwnership/MobileNumber.d.ts +1 -1
- package/build/features/connectExpress/screens/NID/NID.d.ts +1 -1
- package/build/features/connectExpress/screens/NID/TAC.d.ts +3 -3
- package/build/features/connectExpress/screens/NIDMissed/DOB.d.ts +1 -2
- package/build/features/connectExpress/screens/NIDMissed/NID.d.ts +1 -1
- package/build/features/connectExpress/screens/OTP/OTP.d.ts +1 -1
- package/build/features/connectExpress/screens/OTP/OTPInput.d.ts +1 -1
- package/build/features/connectExpress/screens/OperatorError/OperatorError.d.ts +1 -1
- package/build/features/connectExpress/screens/PrepareDataLoading/PrepareDataLoading.d.ts +1 -1
- package/build/features/connectExpress/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +1 -1
- package/build/features/connectExpress/screens/VerifyMobileAuthOTP/OTPInput.d.ts +5 -0
- package/build/features/connectExpress/screens/VerifyMobileAuthOTP/OTPInput.js +49 -0
- package/build/features/connectExpress/screens/VerifyMobileAuthOTP/VerifyMobileAuthOTP.d.ts +5 -0
- package/build/features/connectExpress/screens/VerifyMobileAuthOTP/VerifyMobileAuthOTP.js +88 -0
- package/build/features/connectExpress/screens/VerifyMobileAuthOTP/index.d.ts +3 -0
- package/build/features/connectExpress/screens/VerifyMobileAuthOTP/index.js +2 -0
- package/build/features/connectExpress/screens/VerifyMobileAuthOTP/validation.d.ts +8 -0
- package/build/features/connectExpress/screens/VerifyMobileAuthOTP/validation.js +4 -0
- package/build/features/connectExpress/screens/VerifyNafath/VerifyNafath.d.ts +1 -1
- package/build/features/connectExpress/screens/VerifyPACI/VerifyPACI.d.ts +1 -1
- package/build/features/entity/Entity.d.ts +1 -2
- package/build/features/entity/screens/EntityCapital/ActivityList.d.ts +9 -25
- package/build/features/entity/screens/EntityCapital/CapitalPaid.d.ts +1 -1
- package/build/features/entity/screens/EntityCapital/CapitalPaid.js +3 -7
- package/build/features/entity/screens/EntityCapital/CapitalShareCount.d.ts +1 -1
- package/build/features/entity/screens/EntityCapital/CapitalShareValue.d.ts +1 -1
- package/build/features/entity/screens/EntityCapital/CapitalShareValue.js +3 -7
- package/build/features/entity/screens/EntityCapital/EntityCapital.d.ts +1 -2
- package/build/features/entity/screens/EntityName/Article.d.ts +2 -3
- package/build/features/entity/screens/EntityName/EntityName.d.ts +1 -2
- package/build/features/entity/screens/EntityName/EntityName.js +16 -15
- package/build/features/entity/screens/EntityName/EntityTypeList.d.ts +13 -29
- package/build/features/entity/screens/EntityName/ExpiryDate.d.ts +5 -13
- package/build/features/entity/screens/EntityName/IssuingDate.d.ts +5 -13
- package/build/features/entity/screens/EntityName/LegalName.d.ts +1 -1
- package/build/features/entity/screens/EntityName/LicenseCertificate.d.ts +1 -2
- package/build/features/entity/screens/EntityName/LicenseNumber.d.ts +1 -1
- package/build/features/entity/screens/EntityName/UnifiedNumber.d.ts +1 -1
- package/build/features/entity/screens/EntityName/UnifiedNumber.js +2 -2
- package/build/features/entity/screens/EntityName/validation.d.ts +50 -48
- package/build/features/entity/screens/EntityName/validation.js +100 -85
- package/build/features/entity/screens/OperatorError/OperatorError.d.ts +1 -1
- package/build/features/entity/screens/PrepareDataLoading/PrepareDataLoading.d.ts +2 -2
- package/build/features/entity/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +1 -1
- package/build/features/entity/screens/Success/Success.d.ts +1 -1
- package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +1 -1
- package/build/features/entity/screens/Verify/OTPInput.d.ts +1 -1
- package/build/features/entity/screens/Verify/Verify.d.ts +1 -1
- package/build/features/featuresScreens.js +65 -0
- package/build/features/individual/Individual.d.ts +1 -2
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.d.ts +5 -13
- package/build/features/individual/screens/AdditionalIndividualInfo/CivilIDFile.d.ts +2 -3
- package/build/features/individual/screens/AdditionalIndividualInfo/InfluencerSwitch.d.ts +1 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/IsAuthorizedSwitch.d.ts +3 -3
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.d.ts +1 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +3 -8
- package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.d.ts +1 -2
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.d.ts +3 -3
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareCount.d.ts +1 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.d.ts +1 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.js +3 -8
- package/build/features/individual/screens/AdditionalIndividualInfo/SignatureFile.d.ts +1 -2
- package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.d.ts +1 -1
- package/build/features/individual/screens/IndividualList/CollectPhoneEmail.d.ts +1 -1
- package/build/features/individual/screens/IndividualList/Email.d.ts +1 -1
- package/build/features/individual/screens/IndividualList/Email.js +1 -1
- package/build/features/individual/screens/IndividualList/IndividualList.d.ts +9 -25
- package/build/features/individual/screens/IndividualList/UserList.d.ts +1 -2
- package/build/features/individual/screens/IndividualPersonalInfo/DOB.d.ts +1 -1
- package/build/features/individual/screens/IndividualPersonalInfo/Email.d.ts +1 -1
- package/build/features/individual/screens/IndividualPersonalInfo/ExpiryDate.d.ts +1 -1
- package/build/features/individual/screens/IndividualPersonalInfo/Gender.d.ts +4 -4
- package/build/features/individual/screens/IndividualPersonalInfo/ID.d.ts +1 -1
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.d.ts +5 -13
- package/build/features/individual/screens/IndividualPersonalInfo/Name.d.ts +1 -1
- package/build/features/individual/screens/IndividualPhoneInfo/PhoneInfo.d.ts +1 -1
- package/build/features/individual/screens/OperatorError/OperatorError.d.ts +1 -1
- package/build/features/individual/screens/PrepareDataLoading/PrepareDataLoading.d.ts +2 -2
- package/build/features/individual/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +1 -1
- package/build/features/individual/screens/Success/Success.d.ts +1 -1
- package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +1 -1
- package/build/features/individual/screens/Verify/OTPInput.d.ts +1 -1
- package/build/features/individual/screens/Verify/Verify.d.ts +1 -1
- package/build/features/kyc/KYC.d.ts +1 -2
- package/build/features/kyc/screens/AlreadySubmitted/AlreadySubmitted.d.ts +1 -1
- package/build/features/kyc/screens/Loading/Loading.d.ts +2 -2
- package/build/features/kyc/screens/OperatorError/OperatorError.d.ts +1 -1
- package/build/features/kyc/screens/Success/Success.d.ts +1 -1
- package/build/features/kyc/screens/Terms/Header.d.ts +1 -1
- package/build/features/kyc/screens/Terms/Terms.d.ts +2 -2
- package/build/features/kyc/screens/TokenError/TokenError.d.ts +1 -1
- package/build/features/kyc/screens/Users/Users.d.ts +1 -1
- package/build/features/kyc/screens/VerifyNafath/VerifyNafath.d.ts +1 -1
- package/build/features/kyc/screens/VerifyPaci/VerifyPACI.d.ts +1 -1
- package/build/features/password/Password.d.ts +1 -2
- package/build/features/password/Password.js +1 -1
- package/build/features/password/screens/CreatePassword/ConditionText.d.ts +1 -2
- package/build/features/password/screens/CreatePassword/ConfirmPassword.d.ts +1 -1
- package/build/features/password/screens/CreatePassword/CreatePassword.d.ts +1 -1
- package/build/features/password/screens/CreatePassword/Password.d.ts +1 -1
- package/build/features/password/screens/CreatePassword/PasswordBar.d.ts +1 -2
- package/build/features/password/screens/OTP/OTP.d.ts +1 -1
- package/build/features/password/screens/OTP/OTPInput.d.ts +1 -1
- package/build/features/password/screens/OperatorError/OperatorError.d.ts +1 -1
- package/build/features/password/screens/PrepareDataLoading/PrepareDataLoading.d.ts +2 -2
- package/build/features/password/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +1 -1
- package/build/features/password/screens/Success/Success.d.ts +1 -1
- package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +1 -1
- package/build/features/password/screens/Verify/OTPInput.d.ts +1 -1
- package/build/features/password/screens/Verify/Verify.d.ts +1 -1
- package/build/features/shared/AcceptancePayouts/AcceptancePayouts.d.ts +1 -2
- package/build/features/shared/Address/Address.d.ts +1 -2
- package/build/features/shared/Address/CountryList.d.ts +13 -29
- package/build/features/shared/Address/InputSelect.d.ts +13 -29
- package/build/features/shared/Address/InputSelect.js +1 -1
- package/build/features/shared/Address/InputText.d.ts +1 -1
- package/build/features/shared/Background/Background.d.ts +1 -1
- package/build/features/shared/Background/LogoBackground.d.ts +1 -1
- package/build/features/shared/Background/LogoBackground.js +5 -17
- package/build/features/shared/BouncingDotsLoader/BouncingDotsLoader.d.ts +1 -2
- package/build/features/shared/BusinessCountry/BusinessCountry.d.ts +1 -2
- package/build/features/shared/BusinessCountry/BusinessCountry.js +1 -1
- package/build/features/shared/Button/Button.d.ts +1 -2
- package/build/features/shared/Button/Button.js +1 -2
- package/build/features/shared/Button/EmailProvidersButtons.d.ts +2 -3
- package/build/features/shared/Button/FlowsButtons.d.ts +2 -3
- package/build/features/shared/Button/FlowsButtons.js +1 -1
- package/build/features/shared/Button/IndividualActionButtons.d.ts +2 -2
- package/build/features/shared/Button/MobileButton.d.ts +1 -2
- package/build/features/shared/Button/NafathButton.d.ts +1 -2
- package/build/features/shared/Button/SuccessButton.d.ts +1 -2
- package/build/features/shared/Calender/Calender.d.ts +1 -2
- package/build/features/shared/CheckIcon/CheckIcon.d.ts +2 -3
- package/build/features/shared/Chip/Chip.d.ts +1 -2
- package/build/features/shared/ClearIcon/ClearIcon.d.ts +1 -2
- package/build/features/shared/Containers/FeatureContainer.d.ts +1 -1
- package/build/features/shared/Containers/ScreenContainer.d.ts +1 -1
- package/build/features/shared/CreateAccountLoading/CreateAccountLoading.d.ts +1 -1
- package/build/features/shared/DataLoading/DataLoading.d.ts +1 -1
- package/build/features/shared/Dialog/CloseDialog.d.ts +1 -2
- package/build/features/shared/Dialog/DialogContainer.d.ts +1 -1
- package/build/features/shared/Dot/Dot.d.ts +1 -2
- package/build/features/shared/EndAdornment/EndAdornment.d.ts +1 -2
- package/build/features/shared/EndAdornment/EndAdornmentExpanded.d.ts +1 -2
- package/build/features/shared/Footer/Footer.d.ts +1 -2
- package/build/features/shared/Footer/PoweredByFooter.d.ts +2 -3
- package/build/features/shared/GenericError/GenericError.d.ts +1 -1
- package/build/features/shared/Input/Input.d.ts +7 -15
- package/build/features/shared/InputSelect/InputSelect.d.ts +1 -2
- package/build/features/shared/Mandatory/Mandatory.d.ts +1 -2
- package/build/features/shared/NafathVerification/NafathVerification.d.ts +1 -1
- package/build/features/shared/OTP/OTP.d.ts +1 -1
- package/build/features/shared/OTPVerifySecurityError/OTPVerifySecurityError.d.ts +3 -0
- package/build/features/shared/OTPVerifySecurityError/OTPVerifySecurityError.js +9 -0
- package/build/features/shared/OTPVerifySecurityError/index.d.ts +2 -0
- package/build/features/shared/OTPVerifySecurityError/index.js +2 -0
- package/build/features/shared/PaciVerification/PaciVerification.d.ts +1 -1
- package/build/features/shared/PasswordIcon/PasswordIcon.d.ts +1 -2
- package/build/features/shared/SalesChannels/SaleChannelIconsInput.d.ts +1 -2
- package/build/features/shared/SalesChannels/SalesChannel.d.ts +1 -1
- package/build/features/shared/Search/Search.d.ts +1 -2
- package/build/features/shared/SearchIcon/SearchIcon.d.ts +1 -2
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.d.ts +1 -1
- package/build/features/shared/SuccessScreen/SuccessScreen.d.ts +1 -1
- package/build/features/shared/UploadFile/FileUpload.d.ts +4 -4
- package/build/features/shared/UploadFile/FileUpload.js +1 -1
- package/build/features/shared/UploadFile/UploadFile.d.ts +3 -3
- package/build/features/shared/UploadFile/UploadWrapper.d.ts +3 -3
- package/build/features/shared/UploadMultipleFile/UploadFile.d.ts +4 -4
- package/build/features/shared/UploadMultipleFile/UploadFile.js +1 -1
- package/build/features/shared/UploadMultipleFile/UploadMultipleFile.d.ts +3 -3
- package/build/features/signIn/SignIn.d.ts +1 -2
- package/build/features/signIn/screens/Email/Email.d.ts +1 -1
- package/build/features/signIn/screens/Mobile/Mobile.d.ts +1 -1
- package/build/features/signIn/screens/OTP/OTP.d.ts +1 -1
- package/build/features/signIn/screens/OTP/OTPInput.d.ts +1 -1
- package/build/features/signIn/screens/OperatorError/OperatorError.d.ts +1 -1
- package/build/features/signIn/screens/Password/Password.d.ts +1 -1
- package/build/features/signIn/screens/Password/PasswordInput.d.ts +1 -1
- package/build/features/tax/Tax.d.ts +1 -2
- package/build/features/tax/screens/OperatorError/OperatorError.d.ts +1 -1
- package/build/features/tax/screens/PrepareDataLoading/PrepareDataLoading.d.ts +2 -2
- package/build/features/tax/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +1 -1
- package/build/features/tax/screens/Success/Success.d.ts +1 -1
- package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +1 -1
- package/build/features/tax/screens/TaxDetails/ConfirmPolicy.d.ts +2 -3
- package/build/features/tax/screens/TaxDetails/TaxDetails.d.ts +1 -2
- package/build/features/tax/screens/TaxDetails/TaxDocument.d.ts +1 -2
- package/build/features/tax/screens/TaxDetails/VATId.d.ts +2 -3
- package/build/features/tax/screens/Verify/OTPInput.d.ts +1 -1
- package/build/features/tax/screens/Verify/Verify.d.ts +1 -1
- package/build/hooks/useAppConfig.js +1 -1
- package/build/hooks/useDataVerified.d.ts +1 -1
- package/build/hooks/useExcludeReadOnlyFelids.d.ts +2 -2
- package/build/hooks/useFormDirtyCheck.d.ts +3 -3
- package/build/hooks/useFormErrorAndUpdateReadOnly.d.ts +2 -2
- package/build/hooks/useFormReadOnly.d.ts +2 -2
- package/build/hooks/useSetFromDefaultValues.d.ts +1 -1
- package/build/utils/array.js +1 -1
- package/build/utils/common.d.ts +1 -1
- package/build/utils/common.js +14 -8
- package/build/utils/error.d.ts +2 -0
- package/build/utils/error.js +6 -0
- package/build/utils/string.d.ts +3 -2
- package/build/utils/string.js +4 -1
- package/build/utils/validation.js +1 -1
- package/package.json +3 -3
|
@@ -24,7 +24,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
24
24
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
25
25
|
function step(op) {
|
|
26
26
|
if (f) throw new TypeError("Generator is already executing.");
|
|
27
|
-
while (_) try {
|
|
27
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
28
28
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
29
29
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
30
30
|
switch (op[0]) {
|
|
@@ -57,11 +57,11 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
57
57
|
var _a;
|
|
58
58
|
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
59
59
|
import { handleNextScreenStep, handleCurrentActiveScreen, handleOpen, handleSetCountryByIso2, onCloseComplete, storeAuthId } from '../../../app/settings';
|
|
60
|
-
import { FlowsTypes, AuthForType, BusinessType, LicenseType } from '../../../@types';
|
|
60
|
+
import { FlowsTypes, AuthForType, BusinessType, LicenseType, AuthForScreen } from '../../../@types';
|
|
61
61
|
import API from '../../../api';
|
|
62
|
-
import { ADD_NEW_ENTITY, COLLECT_DOB_INFO_NAFATH, CONNECT_EXPRESS_STEP_NAMES, IDENTIFICATION_TYPE, NAFATH_PACI_TIMEOUT_DURATION, NAFATH_VERIFICATION_FAILED, 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_PACI_TIMEOUT_DURATION, NAFATH_VERIFICATION_FAILED, OTHER_CR_LICENSE, OTHER_FL_LICENSE, SCOPE_AUTH, SCOPE_MERCHANT } from '../../../constants';
|
|
63
63
|
import { defaultCountry } from '../../../constants';
|
|
64
|
-
import { getIndividualName, capitalizeTheFirstLetterOfEachWord, sleep, findCountryByIddPrefix, concatenateObjectValues, isSA, isKW, isOtherThanKWOrSA, sendCustomEventToGTM, sendCustomDimension, getMetaData, isNetworkError, isTimeoutError } from '../../../utils';
|
|
64
|
+
import { getIndividualName, capitalizeTheFirstLetterOfEachWord, sleep, findCountryByIddPrefix, concatenateObjectValues, isSA, isKW, isOtherThanKWOrSA, sendCustomEventToGTM, sendCustomDimension, getMetaData, isNetworkError, isTimeoutError, isInternalServerError, isAuthenticationVerificationFailed } 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) {
|
|
@@ -499,7 +499,11 @@ export var verifyMobileOtpAsync = createAsyncThunk('connectExpress/verifyMobileO
|
|
|
499
499
|
step_name: CONNECT_EXPRESS_STEP_NAMES.VERIFY_AUTH_MOBILE,
|
|
500
500
|
encryption_contract: ['data']
|
|
501
501
|
};
|
|
502
|
-
return [4, API.authService.verifyExpressAuth(payload)
|
|
502
|
+
return [4, API.authService.verifyExpressAuth(payload).catch(function (err) {
|
|
503
|
+
if (isAuthenticationVerificationFailed(err === null || err === void 0 ? void 0 : err.message))
|
|
504
|
+
thunkApi.dispatch(handleNextScreenStep('CONNECT_EXPRESS_OTP_VERIFY_SECURITY_ERROR_STEP'));
|
|
505
|
+
throw new Error(err === null || err === void 0 ? void 0 : err.message);
|
|
506
|
+
})];
|
|
503
507
|
case 1:
|
|
504
508
|
data = _h.sent();
|
|
505
509
|
sendCustomEventToGTM({
|
|
@@ -831,30 +835,43 @@ export var verifyPaciLeadIdentityAsync = createAsyncThunk('connectExpress/verify
|
|
|
831
835
|
case 9:
|
|
832
836
|
count++;
|
|
833
837
|
return [3, 1];
|
|
834
|
-
case 10: throw new Error('
|
|
838
|
+
case 10: throw new Error('paci_verification_failed');
|
|
835
839
|
}
|
|
836
840
|
});
|
|
837
841
|
}); });
|
|
838
842
|
export var checkEmailAvailabilityAsync = createAsyncThunk('connectExpress/CheckEmailAvailabilityAsync', function (_a, thunkApi) {
|
|
839
843
|
var email = _a.email, cancelToken = _a.cancelToken, onSuccess = _a.onSuccess;
|
|
840
844
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
841
|
-
var
|
|
842
|
-
var _b, _c;
|
|
843
|
-
return __generator(this, function (
|
|
844
|
-
switch (
|
|
845
|
+
var responseData, requestBody, data, retryData;
|
|
846
|
+
var _b, _c, _d, _e, _f;
|
|
847
|
+
return __generator(this, function (_g) {
|
|
848
|
+
switch (_g.label) {
|
|
845
849
|
case 0:
|
|
846
|
-
|
|
850
|
+
responseData = thunkApi.getState().connectExpress.data.responseData;
|
|
847
851
|
requestBody = {
|
|
848
852
|
email: email,
|
|
849
|
-
country: (
|
|
853
|
+
country: (_b = responseData === null || responseData === void 0 ? void 0 : responseData.leadData) === null || _b === void 0 ? void 0 : _b.country_code,
|
|
850
854
|
encryption_contract: ['email']
|
|
851
855
|
};
|
|
852
856
|
return [4, API.availabilityServices.checkEmail(requestBody, { cancelToken: cancelToken })];
|
|
853
857
|
case 1:
|
|
854
|
-
data = (
|
|
855
|
-
|
|
856
|
-
|
|
858
|
+
data = (_g.sent()).data;
|
|
859
|
+
if (!data.errors) {
|
|
860
|
+
onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess();
|
|
857
861
|
return [2, { response: data, formData: email }];
|
|
862
|
+
}
|
|
863
|
+
if (!isInternalServerError((_d = (_c = data.errors) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.error)) {
|
|
864
|
+
onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess();
|
|
865
|
+
return [2];
|
|
866
|
+
}
|
|
867
|
+
return [4, API.availabilityServices.checkEmail(requestBody, { cancelToken: cancelToken })];
|
|
868
|
+
case 2:
|
|
869
|
+
retryData = (_g.sent()).data;
|
|
870
|
+
onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess();
|
|
871
|
+
if (!retryData.errors)
|
|
872
|
+
return [2, { response: retryData, formData: email }];
|
|
873
|
+
if (isInternalServerError((_f = (_e = retryData.errors) === null || _e === void 0 ? void 0 : _e[0]) === null || _f === void 0 ? void 0 : _f.error))
|
|
874
|
+
return [2, { response: { is_available: true }, formData: email }];
|
|
858
875
|
return [2];
|
|
859
876
|
}
|
|
860
877
|
});
|
|
@@ -888,10 +905,10 @@ export var checkBrandNameAvailabilityAsync = createAsyncThunk('connectExpress/ch
|
|
|
888
905
|
export var createAccountAsync = createAsyncThunk('connectExpress/createAccountAsync', function (_a, thunkApi) {
|
|
889
906
|
var isRetry = _a.isRetry;
|
|
890
907
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
891
|
-
var _b, connectExpress, settings, responseData, _c, postURL, scope, redirectUrl, mode, showBoard, notification, platforms, payment_provider, leadId, authId, bi, leadData, accountData, data, body, data, urlQueryStart;
|
|
892
|
-
var _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
|
|
893
|
-
return __generator(this, function (
|
|
894
|
-
switch (
|
|
908
|
+
var _b, connectExpress, settings, responseData, _c, postURL, scope, redirectUrl, mode, showBoard, notification, platforms, payment_provider, leadId, authId, bi, leadData, accountData, data, body, data, data, urlQueryStart;
|
|
909
|
+
var _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
|
|
910
|
+
return __generator(this, function (_y) {
|
|
911
|
+
switch (_y.label) {
|
|
895
912
|
case 0:
|
|
896
913
|
_b = thunkApi.getState(), connectExpress = _b.connectExpress, settings = _b.settings;
|
|
897
914
|
responseData = connectExpress.data.responseData;
|
|
@@ -905,12 +922,12 @@ export var createAccountAsync = createAsyncThunk('connectExpress/createAccountAs
|
|
|
905
922
|
if (!isRetry) return [3, 2];
|
|
906
923
|
return [4, thunkApi.dispatch(getLeadByIdAsync(leadId)).unwrap()];
|
|
907
924
|
case 1:
|
|
908
|
-
data = (
|
|
925
|
+
data = (_y.sent()).data;
|
|
909
926
|
if (data === null || data === void 0 ? void 0 : data.board_id) {
|
|
910
927
|
leadData = data;
|
|
911
928
|
accountData = data;
|
|
912
929
|
}
|
|
913
|
-
|
|
930
|
+
_y.label = 2;
|
|
914
931
|
case 2:
|
|
915
932
|
body = {
|
|
916
933
|
lead_id: leadId,
|
|
@@ -922,8 +939,8 @@ export var createAccountAsync = createAsyncThunk('connectExpress/createAccountAs
|
|
|
922
939
|
if (!!(leadData === null || leadData === void 0 ? void 0 : leadData.board_id)) return [3, 4];
|
|
923
940
|
return [4, API.accountService.expressCreateAccount(body)];
|
|
924
941
|
case 3:
|
|
925
|
-
accountData =
|
|
926
|
-
|
|
942
|
+
accountData = _y.sent();
|
|
943
|
+
_y.label = 4;
|
|
927
944
|
case 4:
|
|
928
945
|
sendCustomEventToGTM({
|
|
929
946
|
event: 'Send Event',
|
|
@@ -939,22 +956,41 @@ export var createAccountAsync = createAsyncThunk('connectExpress/createAccountAs
|
|
|
939
956
|
(_m = (_l = settings.data.appConfig).onCreated) === null || _m === void 0 ? void 0 : _m.call(_l, accountData);
|
|
940
957
|
(_p = (_o = settings.data.appConfig).onFlowCompleted) === null || _p === void 0 ? void 0 : _p.call(_o, accountData);
|
|
941
958
|
(_r = (_q = settings.data.appConfig).onStepCompleted) === null || _r === void 0 ? void 0 : _r.call(_q, settings.data.activeScreen.name, accountData);
|
|
942
|
-
if (
|
|
943
|
-
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep()); });
|
|
944
|
-
return [2, { accountData: accountData }];
|
|
945
|
-
}
|
|
946
|
-
if (!(scope === SCOPE_AUTH)) return [3, 8];
|
|
959
|
+
if (!(scope === SCOPE_MERCHANT)) return [3, 8];
|
|
947
960
|
if (!!(leadData === null || leadData === void 0 ? void 0 : leadData.board_id)) return [3, 6];
|
|
948
961
|
return [4, thunkApi.dispatch(getLeadByIdAsync(leadId)).unwrap()];
|
|
949
962
|
case 5:
|
|
950
|
-
data = (
|
|
963
|
+
data = (_y.sent()).data;
|
|
951
964
|
leadData = data;
|
|
952
|
-
|
|
953
|
-
case 6:
|
|
965
|
+
_y.label = 6;
|
|
966
|
+
case 6:
|
|
967
|
+
if (!postURL) return [3, 8];
|
|
968
|
+
return [4, thunkApi.dispatch(onCloseComplete({
|
|
969
|
+
merchantId: (_s = leadData === null || leadData === void 0 ? void 0 : leadData.merchant) === null || _s === void 0 ? void 0 : _s.id,
|
|
970
|
+
brandId: (_t = leadData === null || leadData === void 0 ? void 0 : leadData.brand) === null || _t === void 0 ? void 0 : _t.id,
|
|
971
|
+
entityId: (_u = leadData === null || leadData === void 0 ? void 0 : leadData.entity) === null || _u === void 0 ? void 0 : _u.id,
|
|
972
|
+
nextScreen: showBoard ? 'CONNECT_EXPRESS_PREPARING_DATA_STEP' : ''
|
|
973
|
+
}))];
|
|
954
974
|
case 7:
|
|
955
|
-
|
|
975
|
+
_y.sent();
|
|
956
976
|
return [2, { accountData: accountData }];
|
|
957
977
|
case 8:
|
|
978
|
+
if (showBoard) {
|
|
979
|
+
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep()); });
|
|
980
|
+
return [2, { accountData: accountData }];
|
|
981
|
+
}
|
|
982
|
+
if (!(scope === SCOPE_AUTH)) return [3, 12];
|
|
983
|
+
if (!!(leadData === null || leadData === void 0 ? void 0 : leadData.board_id)) return [3, 10];
|
|
984
|
+
return [4, thunkApi.dispatch(getLeadByIdAsync(leadId)).unwrap()];
|
|
985
|
+
case 9:
|
|
986
|
+
data = (_y.sent()).data;
|
|
987
|
+
leadData = data;
|
|
988
|
+
_y.label = 10;
|
|
989
|
+
case 10: return [4, thunkApi.dispatch(onCloseComplete({ merchantId: (_v = leadData === null || leadData === void 0 ? void 0 : leadData.merchant) === null || _v === void 0 ? void 0 : _v.id, brandId: (_w = leadData === null || leadData === void 0 ? void 0 : leadData.brand) === null || _w === void 0 ? void 0 : _w.id, entityId: (_x = leadData === null || leadData === void 0 ? void 0 : leadData.entity) === null || _x === void 0 ? void 0 : _x.id }))];
|
|
990
|
+
case 11:
|
|
991
|
+
_y.sent();
|
|
992
|
+
return [2, { accountData: accountData }];
|
|
993
|
+
case 12:
|
|
958
994
|
if (redirectUrl && mode === 'page') {
|
|
959
995
|
urlQueryStart = redirectUrl.includes('?') ? '&' : '?';
|
|
960
996
|
window.open("".concat(redirectUrl).concat(urlQueryStart, "authentication_id=").concat(authId, "&bi=").concat(bi), '_self');
|
|
@@ -1025,7 +1061,7 @@ export var createEntity = createAsyncThunk('connectExpress/createEntity', functi
|
|
|
1025
1061
|
});
|
|
1026
1062
|
}); });
|
|
1027
1063
|
export var updateLeadDOBAsync = createAsyncThunk('connectExpress/updateLeadDOBAsync', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1028
|
-
var _a, settings, connectExpress, id, dob, payload, data, needToCollectMoreInfo, creatingAccount;
|
|
1064
|
+
var _a, settings, connectExpress, id, dob, payload, data, needToCollectMoreInfo, creatingAccount, verifyAuthMobile;
|
|
1029
1065
|
var _b, _c, _d;
|
|
1030
1066
|
return __generator(this, function (_e) {
|
|
1031
1067
|
switch (_e.label) {
|
|
@@ -1045,6 +1081,10 @@ export var updateLeadDOBAsync = createAsyncThunk('connectExpress/updateLeadDOBAs
|
|
|
1045
1081
|
(_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, params);
|
|
1046
1082
|
needToCollectMoreInfo = data.step_name === 'collect_info';
|
|
1047
1083
|
creatingAccount = data.step_name === 'create_account';
|
|
1084
|
+
verifyAuthMobile = data.step_name === 'connect_express_auth_mobile';
|
|
1085
|
+
if (verifyAuthMobile) {
|
|
1086
|
+
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep('CONNECT_EXPRESS_VERIFY_AUTH_OTP_STEP')); });
|
|
1087
|
+
}
|
|
1048
1088
|
if (creatingAccount) {
|
|
1049
1089
|
sleep(100).then(function () { return thunkApi.dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_WAITING_FOR_CREATING_ACCOUNT_STEP')); });
|
|
1050
1090
|
}
|
|
@@ -1058,7 +1098,7 @@ export var updateLeadDOBAsync = createAsyncThunk('connectExpress/updateLeadDOBAs
|
|
|
1058
1098
|
export var updateLeadIndividualAsync = createAsyncThunk('connectExpress/updateLeadIndividualAsync', function (_a, thunkApi) {
|
|
1059
1099
|
var formData = _a.formData, originalFormData = _a.originalFormData;
|
|
1060
1100
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
1061
|
-
var _b, settings, connectExpress, id, countryCode, name, email, mobile, phoneCountry, isContactAvailable, payload, data, needToCollectMoreInfo, creatingAccount, collectPhoneOwnershipScreen, isSaudi;
|
|
1101
|
+
var _b, settings, connectExpress, id, countryCode, name, email, mobile, phoneCountry, isContactAvailable, payload, data, needToCollectMoreInfo, creatingAccount, collectPhoneOwnershipScreen, verifyAuthMobile, isSaudi;
|
|
1062
1102
|
var _c, _d, _e, _f, _g;
|
|
1063
1103
|
return __generator(this, function (_h) {
|
|
1064
1104
|
switch (_h.label) {
|
|
@@ -1078,6 +1118,10 @@ export var updateLeadIndividualAsync = createAsyncThunk('connectExpress/updateLe
|
|
|
1078
1118
|
needToCollectMoreInfo = data.step_name === 'collect_info';
|
|
1079
1119
|
creatingAccount = data.step_name === 'create_account';
|
|
1080
1120
|
collectPhoneOwnershipScreen = data.step_name === CONNECT_EXPRESS_STEP_NAMES.COLLECT_MOBILE_OWNERSHIP;
|
|
1121
|
+
verifyAuthMobile = data.step_name === CONNECT_EXPRESS_STEP_NAMES.VERIFY_AUTH_MOBILE_OTP;
|
|
1122
|
+
if (verifyAuthMobile) {
|
|
1123
|
+
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep('CONNECT_EXPRESS_VERIFY_AUTH_OTP_STEP')); });
|
|
1124
|
+
}
|
|
1081
1125
|
if (collectPhoneOwnershipScreen) {
|
|
1082
1126
|
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep('COLLECT_MOBILE_OWNERSHIP')); });
|
|
1083
1127
|
}
|
|
@@ -1102,13 +1146,13 @@ export var updateLeadIndividualAsync = createAsyncThunk('connectExpress/updateLe
|
|
|
1102
1146
|
export var updateLeadBusinessDataAsync = createAsyncThunk('updateLeadBusinessDataAsync ', function (_a, thunkApi) {
|
|
1103
1147
|
var formData = _a.formData, originalFormData = _a.originalFormData;
|
|
1104
1148
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
1105
|
-
var _b, settings, connectExpress, selectedLicense, brandName, licenseNumber, termAndConditionChecked, isKWCountry, isFL, _c, responseData, isLeadIdPassed, id, brandNameBody, payload, data;
|
|
1149
|
+
var _b, settings, connectExpress, selectedLicense, brandName, licenseNumber, termAndConditionChecked, unifiedNumber, isKWCountry, isFL, _c, responseData, isLeadIdPassed, id, brandNameBody, payload, data;
|
|
1106
1150
|
var _d, _e;
|
|
1107
1151
|
return __generator(this, function (_f) {
|
|
1108
1152
|
switch (_f.label) {
|
|
1109
1153
|
case 0:
|
|
1110
1154
|
_b = thunkApi.getState(), settings = _b.settings, connectExpress = _b.connectExpress;
|
|
1111
|
-
selectedLicense = formData.selectedLicense, brandName = formData.brandName, licenseNumber = formData.licenseNumber, termAndConditionChecked = formData.termAndConditionChecked;
|
|
1155
|
+
selectedLicense = formData.selectedLicense, brandName = formData.brandName, licenseNumber = formData.licenseNumber, termAndConditionChecked = formData.termAndConditionChecked, unifiedNumber = formData.unifiedNumber;
|
|
1112
1156
|
isKWCountry = isKW(settings.data.businessCountry.iso2);
|
|
1113
1157
|
isFL = (selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.type) === BusinessType.FL;
|
|
1114
1158
|
_c = connectExpress.data, responseData = _c.responseData, isLeadIdPassed = _c.isLeadIdPassed;
|
|
@@ -1126,6 +1170,7 @@ export var updateLeadBusinessDataAsync = createAsyncThunk('updateLeadBusinessDat
|
|
|
1126
1170
|
license_type: (selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.type) ? (isFL ? LicenseType.FL : LicenseType.CR) : undefined,
|
|
1127
1171
|
business_type: selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.type,
|
|
1128
1172
|
is_acknowledged: true,
|
|
1173
|
+
unified_number: unifiedNumber,
|
|
1129
1174
|
terms_conditions_accepted: !isLeadIdPassed ? termAndConditionChecked : undefined,
|
|
1130
1175
|
step_name: CONNECT_EXPRESS_STEP_NAMES.UPDATE_LEAD_BRAND_BUSINESS,
|
|
1131
1176
|
encryption_contract: []
|
|
@@ -1141,7 +1186,7 @@ export var updateLeadBusinessDataAsync = createAsyncThunk('updateLeadBusinessDat
|
|
|
1141
1186
|
});
|
|
1142
1187
|
});
|
|
1143
1188
|
export var updateLeadMobile = createAsyncThunk('connectExpress/updateLeadMobile', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1144
|
-
var _a, settings, connectExpress, id, startWithNID, payload, leadResponse, needToCollectMoreInfo, creatingAccount, askDobInfo, collectPhoneOwnershipScreen;
|
|
1189
|
+
var _a, settings, connectExpress, id, startWithNID, payload, leadResponse, needToCollectMoreInfo, creatingAccount, askDobInfo, collectPhoneOwnershipScreen, verifyAuthMobile;
|
|
1145
1190
|
var _b, _c, _d;
|
|
1146
1191
|
return __generator(this, function (_e) {
|
|
1147
1192
|
switch (_e.label) {
|
|
@@ -1168,9 +1213,13 @@ export var updateLeadMobile = createAsyncThunk('connectExpress/updateLeadMobile'
|
|
|
1168
1213
|
creatingAccount = leadResponse.step_name === 'create_account';
|
|
1169
1214
|
askDobInfo = leadResponse.step_name === COLLECT_DOB_INFO_NAFATH;
|
|
1170
1215
|
collectPhoneOwnershipScreen = leadResponse.step_name === CONNECT_EXPRESS_STEP_NAMES.COLLECT_MOBILE_OWNERSHIP;
|
|
1216
|
+
verifyAuthMobile = leadResponse.step_name === CONNECT_EXPRESS_STEP_NAMES.VERIFY_AUTH_MOBILE_OTP;
|
|
1171
1217
|
if (collectPhoneOwnershipScreen) {
|
|
1172
1218
|
throw new Error("The new mobile number doesn't match the national ID, please update the mobile to the correct one");
|
|
1173
1219
|
}
|
|
1220
|
+
if (verifyAuthMobile) {
|
|
1221
|
+
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep('CONNECT_EXPRESS_VERIFY_AUTH_OTP_STEP')); });
|
|
1222
|
+
}
|
|
1174
1223
|
if (askDobInfo) {
|
|
1175
1224
|
sleep(100).then(function () { return thunkApi.dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_COLLECT_DOB_INFO_STEP')); });
|
|
1176
1225
|
}
|
|
@@ -1195,7 +1244,7 @@ export var updateLeadMobile = createAsyncThunk('connectExpress/updateLeadMobile'
|
|
|
1195
1244
|
});
|
|
1196
1245
|
}); });
|
|
1197
1246
|
export var skipUpdateLeadMobile = createAsyncThunk('connectExpress/skipUpdateLeadMobile', function (_, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1198
|
-
var _a, settings, connectExpress, id, startWithNID, payload, leadResponse, needToCollectMoreInfo, creatingAccount, askDobInfo;
|
|
1247
|
+
var _a, settings, connectExpress, id, startWithNID, payload, leadResponse, needToCollectMoreInfo, creatingAccount, askDobInfo, verifyAuthMobile;
|
|
1199
1248
|
var _b, _c, _d;
|
|
1200
1249
|
return __generator(this, function (_e) {
|
|
1201
1250
|
switch (_e.label) {
|
|
@@ -1215,6 +1264,10 @@ export var skipUpdateLeadMobile = createAsyncThunk('connectExpress/skipUpdateLea
|
|
|
1215
1264
|
needToCollectMoreInfo = leadResponse.step_name === 'collect_info';
|
|
1216
1265
|
creatingAccount = leadResponse.step_name === 'create_account';
|
|
1217
1266
|
askDobInfo = leadResponse.step_name === COLLECT_DOB_INFO_NAFATH;
|
|
1267
|
+
verifyAuthMobile = leadResponse.step_name === CONNECT_EXPRESS_STEP_NAMES.VERIFY_AUTH_MOBILE_OTP;
|
|
1268
|
+
if (verifyAuthMobile) {
|
|
1269
|
+
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep('CONNECT_EXPRESS_VERIFY_AUTH_OTP_STEP')); });
|
|
1270
|
+
}
|
|
1218
1271
|
if (askDobInfo) {
|
|
1219
1272
|
sleep(100).then(function () { return thunkApi.dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_COLLECT_DOB_INFO_STEP')); });
|
|
1220
1273
|
}
|
|
@@ -1238,6 +1291,86 @@ export var skipUpdateLeadMobile = createAsyncThunk('connectExpress/skipUpdateLea
|
|
|
1238
1291
|
}
|
|
1239
1292
|
});
|
|
1240
1293
|
}); });
|
|
1294
|
+
export var verifyAuthMobileOtpAsync = createAsyncThunk('connectExpress/verifyAuthMobileOtpAsync', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1295
|
+
var _a, settings, connectExpress, responseData, _b, verify_token, verification_by, payload, data, needToCollectMoreInfo, creatingAccount, askDobInfo, collectPhoneOwnershipScreen, isSaudi;
|
|
1296
|
+
var _c, _d;
|
|
1297
|
+
return __generator(this, function (_e) {
|
|
1298
|
+
switch (_e.label) {
|
|
1299
|
+
case 0:
|
|
1300
|
+
_a = thunkApi.getState(), settings = _a.settings, connectExpress = _a.connectExpress;
|
|
1301
|
+
responseData = (connectExpress.data || {}).responseData;
|
|
1302
|
+
if (!(responseData === null || responseData === void 0 ? void 0 : responseData.verifyAuthMobile))
|
|
1303
|
+
throw new Error('Auth data is missing');
|
|
1304
|
+
_b = responseData.verifyAuthMobile, verify_token = _b.verify_token, verification_by = _b.verification_by;
|
|
1305
|
+
payload = {
|
|
1306
|
+
verify_token: verify_token,
|
|
1307
|
+
data: params.otp,
|
|
1308
|
+
auth_type: 2,
|
|
1309
|
+
service_name: verification_by === null || verification_by === void 0 ? void 0 : verification_by.service_name,
|
|
1310
|
+
sign_in: false,
|
|
1311
|
+
step_name: CONNECT_EXPRESS_STEP_NAMES.VERIFY_AUTH_MOBILE_OTP,
|
|
1312
|
+
encryption_contract: ['data']
|
|
1313
|
+
};
|
|
1314
|
+
return [4, API.authService.verifyExpressLeadIdentity(payload).catch(function (err) {
|
|
1315
|
+
if (isAuthenticationVerificationFailed(err === null || err === void 0 ? void 0 : err.message))
|
|
1316
|
+
thunkApi.dispatch(handleNextScreenStep('CONNECT_EXPRESS_OTP_VERIFY_SECURITY_ERROR_STEP'));
|
|
1317
|
+
throw new Error(err === null || err === void 0 ? void 0 : err.message);
|
|
1318
|
+
})];
|
|
1319
|
+
case 1:
|
|
1320
|
+
data = _e.sent();
|
|
1321
|
+
(_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, params);
|
|
1322
|
+
needToCollectMoreInfo = data.step_name === 'collect_info';
|
|
1323
|
+
creatingAccount = data.step_name === 'create_account';
|
|
1324
|
+
askDobInfo = data.step_name === COLLECT_DOB_INFO_NAFATH;
|
|
1325
|
+
collectPhoneOwnershipScreen = data.step_name === CONNECT_EXPRESS_STEP_NAMES.COLLECT_MOBILE_OWNERSHIP;
|
|
1326
|
+
if (askDobInfo) {
|
|
1327
|
+
sleep(100).then(function () { return thunkApi.dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_COLLECT_DOB_INFO_STEP')); });
|
|
1328
|
+
}
|
|
1329
|
+
if (creatingAccount) {
|
|
1330
|
+
sleep(100).then(function () { return thunkApi.dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_WAITING_FOR_CREATING_ACCOUNT_STEP')); });
|
|
1331
|
+
}
|
|
1332
|
+
if (collectPhoneOwnershipScreen) {
|
|
1333
|
+
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep('COLLECT_MOBILE_OWNERSHIP')); });
|
|
1334
|
+
}
|
|
1335
|
+
if (!needToCollectMoreInfo) return [3, 4];
|
|
1336
|
+
isSaudi = isSA(settings.data.businessCountry.iso2);
|
|
1337
|
+
if (!isSaudi) return [3, 3];
|
|
1338
|
+
return [4, thunkApi.dispatch(retrieveEntityListAsync(data.lead.id)).unwrap()];
|
|
1339
|
+
case 2:
|
|
1340
|
+
_e.sent();
|
|
1341
|
+
_e.label = 3;
|
|
1342
|
+
case 3:
|
|
1343
|
+
sleep(100).then(function () { return thunkApi.dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_COLLECT_BUSINESS_INFO_STEP')); });
|
|
1344
|
+
_e.label = 4;
|
|
1345
|
+
case 4: return [2, { data: data }];
|
|
1346
|
+
}
|
|
1347
|
+
});
|
|
1348
|
+
}); });
|
|
1349
|
+
export var resendLeadMobileAuthOTP = createAsyncThunk('connectExpress/resendLeadMobileAuthOTPExpress', function (_, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1350
|
+
var connectExpress, payload, data;
|
|
1351
|
+
var _a, _b, _c, _d, _e, _f;
|
|
1352
|
+
return __generator(this, function (_g) {
|
|
1353
|
+
switch (_g.label) {
|
|
1354
|
+
case 0:
|
|
1355
|
+
connectExpress = thunkApi.getState().connectExpress;
|
|
1356
|
+
payload = {
|
|
1357
|
+
id: ((_b = (_a = connectExpress.data.responseData) === null || _a === void 0 ? void 0 : _a.leadData) === null || _b === void 0 ? void 0 : _b.id) || '',
|
|
1358
|
+
contact: {
|
|
1359
|
+
phone: {
|
|
1360
|
+
country_code: (_e = (_d = (_c = connectExpress.data.individualData) === null || _c === void 0 ? void 0 : _c.countryCode) === null || _d === void 0 ? void 0 : _d.idd_prefix) === null || _e === void 0 ? void 0 : _e.toString(),
|
|
1361
|
+
number: ((_f = connectExpress.data.individualData) === null || _f === void 0 ? void 0 : _f.mobile) || ''
|
|
1362
|
+
}
|
|
1363
|
+
},
|
|
1364
|
+
step_name: CONNECT_EXPRESS_STEP_NAMES.UPDATE_LEAD_INDIVIDUAL,
|
|
1365
|
+
encryption_contract: ['contact.phone.country_code', 'contact.phone.number']
|
|
1366
|
+
};
|
|
1367
|
+
return [4, API.leadService.updateLeadExpress(payload)];
|
|
1368
|
+
case 1:
|
|
1369
|
+
data = _g.sent();
|
|
1370
|
+
return [2, data];
|
|
1371
|
+
}
|
|
1372
|
+
});
|
|
1373
|
+
}); });
|
|
1241
1374
|
export var confirmInfo = createAsyncThunk('connectExpress/confirmInfo', function (_a, thunkApi) {
|
|
1242
1375
|
var brandInfo = _a.brandInfo, entityInfo = _a.entityInfo, merchantInfo = _a.merchantInfo;
|
|
1243
1376
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -1362,9 +1495,14 @@ var initialState = {
|
|
|
1362
1495
|
mobile: '',
|
|
1363
1496
|
countryCode: defaultCountry
|
|
1364
1497
|
},
|
|
1498
|
+
verifyAuthOtpData: {
|
|
1499
|
+
otp: '',
|
|
1500
|
+
authFor: AuthForScreen.INDIVIDUAL
|
|
1501
|
+
},
|
|
1365
1502
|
businessData: {
|
|
1366
1503
|
brandName: '',
|
|
1367
1504
|
licenseNumber: '',
|
|
1505
|
+
unifiedNumber: '',
|
|
1368
1506
|
termAndConditionChecked: false
|
|
1369
1507
|
},
|
|
1370
1508
|
authenticationData: {
|
|
@@ -1417,6 +1555,9 @@ export var connectSlice = createSlice({
|
|
|
1417
1555
|
resetOTPValue: function (state) {
|
|
1418
1556
|
state.data.otpData.otp = '';
|
|
1419
1557
|
},
|
|
1558
|
+
resetVerifyAuthOTPValue: function (state) {
|
|
1559
|
+
state.data.verifyAuthOtpData.otp = '';
|
|
1560
|
+
},
|
|
1420
1561
|
resetStore: function (state) {
|
|
1421
1562
|
var _a;
|
|
1422
1563
|
state.data = __assign(__assign({}, state.data), { responseData: { leadData: (_a = state.data.responseData) === null || _a === void 0 ? void 0 : _a.leadData } });
|
|
@@ -1579,9 +1720,11 @@ export var connectSlice = createSlice({
|
|
|
1579
1720
|
state.loading = false;
|
|
1580
1721
|
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) });
|
|
1581
1722
|
})
|
|
1582
|
-
.addCase(verifyMobileOtpAsync.rejected, function (state,
|
|
1723
|
+
.addCase(verifyMobileOtpAsync.rejected, function (state, _a) {
|
|
1724
|
+
var message = _a.error.message;
|
|
1583
1725
|
state.loading = false;
|
|
1584
|
-
|
|
1726
|
+
if (!isAuthenticationVerificationFailed(message))
|
|
1727
|
+
state.error = message;
|
|
1585
1728
|
})
|
|
1586
1729
|
.addCase(verifyNafathAsync.pending, function (state) {
|
|
1587
1730
|
state.loading = true;
|
|
@@ -1658,7 +1801,7 @@ export var connectSlice = createSlice({
|
|
|
1658
1801
|
state.error = null;
|
|
1659
1802
|
})
|
|
1660
1803
|
.addCase(retrieveEntityListAsync.fulfilled, function (state, action) {
|
|
1661
|
-
var _a, _b;
|
|
1804
|
+
var _a, _b, _c, _d;
|
|
1662
1805
|
state.loading = false;
|
|
1663
1806
|
var data = action.payload;
|
|
1664
1807
|
var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
|
|
@@ -1678,7 +1821,8 @@ export var connectSlice = createSlice({
|
|
|
1678
1821
|
}
|
|
1679
1822
|
}
|
|
1680
1823
|
licenseList = __spreadArray(__spreadArray([], licenseList, true), [OTHER_CR_LICENSE, OTHER_FL_LICENSE], false);
|
|
1681
|
-
var
|
|
1824
|
+
var _e = ((_b = state.data.responseData) === null || _b === void 0 ? void 0 : _b.leadData) || {}, license_number = _e.license_number, license_type = _e.license_type, entity = _e.entity;
|
|
1825
|
+
var unified_number = (_d = (_c = entity === null || entity === void 0 ? void 0 : entity.license) === null || _c === void 0 ? void 0 : _c.additional_info) === null || _d === void 0 ? void 0 : _d.unified_number;
|
|
1682
1826
|
var selectedLicense = undefined;
|
|
1683
1827
|
if (license_number) {
|
|
1684
1828
|
var findLicense = licenseList.find(function (_a) {
|
|
@@ -1694,6 +1838,18 @@ export var connectSlice = createSlice({
|
|
|
1694
1838
|
selectedLicense = __assign(__assign({}, OTHER_CR_LICENSE), { license: { number: license_number } });
|
|
1695
1839
|
state.data.businessData.licenseNumber = license_number;
|
|
1696
1840
|
}
|
|
1841
|
+
if (unified_number) {
|
|
1842
|
+
var findLicense = licenseList.find(function (_a) {
|
|
1843
|
+
var _b;
|
|
1844
|
+
var license = _a.license;
|
|
1845
|
+
return ((_b = license === null || license === void 0 ? void 0 : license.additional_info) === null || _b === void 0 ? void 0 : _b.unified_number) === unified_number;
|
|
1846
|
+
});
|
|
1847
|
+
if (findLicense)
|
|
1848
|
+
selectedLicense = findLicense;
|
|
1849
|
+
else
|
|
1850
|
+
selectedLicense = __assign(__assign({}, OTHER_CR_LICENSE), { license: { number: '', additional_info: { unified_number: unified_number } } });
|
|
1851
|
+
state.data.businessData.unifiedNumber = unified_number;
|
|
1852
|
+
}
|
|
1697
1853
|
state.data.businessData.selectedLicense = selectedLicense;
|
|
1698
1854
|
state.data.responseData = __assign(__assign({}, state.data.responseData), { licenseList: licenseList });
|
|
1699
1855
|
})
|
|
@@ -1750,7 +1906,8 @@ export var connectSlice = createSlice({
|
|
|
1750
1906
|
state.loading = false;
|
|
1751
1907
|
state.error = null;
|
|
1752
1908
|
state.data.dobData = action.payload.formData;
|
|
1753
|
-
state.data.responseData = __assign(__assign({}, state.data.responseData), { dobData: action.payload.response });
|
|
1909
|
+
state.data.responseData = __assign(__assign({}, state.data.responseData), { dobData: action.payload.response, verifyAuthMobile: action.payload.response });
|
|
1910
|
+
state.data.verifyAuthOtpData.authFor = AuthForScreen.DOB;
|
|
1754
1911
|
})
|
|
1755
1912
|
.addCase(updateLeadDOBAsync.pending, function (state) {
|
|
1756
1913
|
state.loading = true;
|
|
@@ -1766,7 +1923,8 @@ export var connectSlice = createSlice({
|
|
|
1766
1923
|
state.error = null;
|
|
1767
1924
|
var licenseList = [OTHER_CR_LICENSE, OTHER_FL_LICENSE];
|
|
1768
1925
|
state.data.individualData = action.payload.formData;
|
|
1769
|
-
state.data.responseData = __assign(__assign(__assign({}, state.data.responseData), { individualData: action.payload.response }), (!((_b = (_a = state.data.responseData) === null || _a === void 0 ? void 0 : _a.licenseList) === null || _b === void 0 ? void 0 : _b.length) && { licenseList: licenseList }));
|
|
1926
|
+
state.data.responseData = __assign(__assign(__assign(__assign({}, state.data.responseData), { individualData: action.payload.response }), (!((_b = (_a = state.data.responseData) === null || _a === void 0 ? void 0 : _a.licenseList) === null || _b === void 0 ? void 0 : _b.length) && { licenseList: licenseList })), { verifyAuthMobile: action.payload.response });
|
|
1927
|
+
state.data.verifyAuthOtpData.authFor = AuthForScreen.INDIVIDUAL;
|
|
1770
1928
|
})
|
|
1771
1929
|
.addCase(updateLeadIndividualAsync.pending, function (state) {
|
|
1772
1930
|
state.loading = true;
|
|
@@ -1794,7 +1952,9 @@ export var connectSlice = createSlice({
|
|
|
1794
1952
|
state.loading = false;
|
|
1795
1953
|
state.error = null;
|
|
1796
1954
|
state.data.individualData.mobile = action.payload.formData.mobile;
|
|
1797
|
-
state.data.
|
|
1955
|
+
state.data.individualData.countryCode = action.payload.formData.countryCode;
|
|
1956
|
+
state.data.responseData = __assign(__assign({}, state.data.responseData), { individualData: action.payload.leadResponse, verifyAuthMobile: action.payload.leadResponse });
|
|
1957
|
+
state.data.verifyAuthOtpData.authFor = AuthForScreen.MOBILE_OWNERSHIP;
|
|
1798
1958
|
})
|
|
1799
1959
|
.addCase(updateLeadMobile.pending, function (state) {
|
|
1800
1960
|
state.loading = true;
|
|
@@ -1807,7 +1967,8 @@ export var connectSlice = createSlice({
|
|
|
1807
1967
|
.addCase(skipUpdateLeadMobile.fulfilled, function (state, action) {
|
|
1808
1968
|
state.loading = false;
|
|
1809
1969
|
state.error = null;
|
|
1810
|
-
state.data.responseData = __assign(__assign({}, state.data.responseData), { individualData: action.payload.leadResponse });
|
|
1970
|
+
state.data.responseData = __assign(__assign({}, state.data.responseData), { individualData: action.payload.leadResponse, verifyAuthMobile: action.payload.leadResponse });
|
|
1971
|
+
state.data.verifyAuthOtpData.authFor = AuthForScreen.MOBILE_OWNERSHIP;
|
|
1811
1972
|
})
|
|
1812
1973
|
.addCase(skipUpdateLeadMobile.pending, function (state) {
|
|
1813
1974
|
state.loading = true;
|
|
@@ -1816,6 +1977,34 @@ export var connectSlice = createSlice({
|
|
|
1816
1977
|
.addCase(skipUpdateLeadMobile.rejected, function (state, action) {
|
|
1817
1978
|
state.loading = false;
|
|
1818
1979
|
state.error = action.error.message;
|
|
1980
|
+
})
|
|
1981
|
+
.addCase(verifyAuthMobileOtpAsync.fulfilled, function (state, action) {
|
|
1982
|
+
state.loading = false;
|
|
1983
|
+
state.error = null;
|
|
1984
|
+
state.data.responseData = __assign(__assign({}, state.data.responseData), { verifyAuthMobileOtp: action.payload.data });
|
|
1985
|
+
state.data.verifyAuthOtpData.authFor = AuthForScreen.MOBILE_OWNERSHIP;
|
|
1986
|
+
})
|
|
1987
|
+
.addCase(verifyAuthMobileOtpAsync.pending, function (state) {
|
|
1988
|
+
state.loading = true;
|
|
1989
|
+
state.error = null;
|
|
1990
|
+
})
|
|
1991
|
+
.addCase(verifyAuthMobileOtpAsync.rejected, function (state, _a) {
|
|
1992
|
+
var message = _a.error.message;
|
|
1993
|
+
state.loading = false;
|
|
1994
|
+
if (!isAuthenticationVerificationFailed(message))
|
|
1995
|
+
state.error = message;
|
|
1996
|
+
})
|
|
1997
|
+
.addCase(resendLeadMobileAuthOTP.pending, function (state) {
|
|
1998
|
+
state.loading = true;
|
|
1999
|
+
state.error = null;
|
|
2000
|
+
})
|
|
2001
|
+
.addCase(resendLeadMobileAuthOTP.fulfilled, function (state) {
|
|
2002
|
+
state.loading = false;
|
|
2003
|
+
state.error = null;
|
|
2004
|
+
})
|
|
2005
|
+
.addCase(resendLeadMobileAuthOTP.rejected, function (state, action) {
|
|
2006
|
+
state.loading = false;
|
|
2007
|
+
state.error = action.error.message;
|
|
1819
2008
|
})
|
|
1820
2009
|
.addCase(createAccountAsync.pending, function (state) {
|
|
1821
2010
|
state.loading = true;
|
|
@@ -1924,6 +2113,6 @@ export var connectSlice = createSlice({
|
|
|
1924
2113
|
});
|
|
1925
2114
|
}
|
|
1926
2115
|
});
|
|
1927
|
-
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;
|
|
2116
|
+
export var clearError = (_a = connectSlice.actions, _a.clearError), stopLoader = _a.stopLoader, setIsLeadIdPassed = _a.setIsLeadIdPassed, resetMobileScreen = _a.resetMobileScreen, resetOTPValue = _a.resetOTPValue, resetVerifyAuthOTPValue = _a.resetVerifyAuthOTPValue, 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;
|
|
1928
2117
|
export default connectSlice.reducer;
|
|
1929
2118
|
export var connectExpressSelector = function (state) { return state.connectExpress; };
|