@tap-payments/auth-jsconnect 2.4.23-test → 2.4.23
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 +1 -1
- package/build/@types/app.d.ts +190 -18
- package/build/@types/app.js +7 -0
- package/build/@types/config.d.ts +35 -0
- package/build/@types/config.js +1 -0
- package/build/@types/form.d.ts +36 -22
- package/build/@types/index.d.ts +1 -0
- package/build/@types/index.js +1 -0
- package/build/@types/theme.d.ts +5 -1
- package/build/@types/theme.js +5 -0
- package/build/@types/user.d.ts +18 -1
- package/build/api/account.d.ts +5 -2
- package/build/api/account.js +1 -1
- package/build/api/auth.d.ts +17 -11
- package/build/api/auth.js +10 -1
- package/build/api/availabilityServices.d.ts +4 -3
- 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 +2 -1
- package/build/api/country.js +8 -1
- package/build/api/data.d.ts +17 -10
- package/build/api/data.js +26 -2
- package/build/api/document.d.ts +2 -2
- package/build/api/entity.d.ts +32 -8
- package/build/api/entity.js +37 -1
- package/build/api/file.d.ts +1 -1
- package/build/api/index.d.ts +26 -4
- package/build/api/individual.d.ts +17 -6
- package/build/api/init.d.ts +2 -1
- package/build/api/lead.d.ts +18 -10
- package/build/api/lead.js +58 -1
- package/build/api/operator.d.ts +10 -1
- package/build/api/operator.js +10 -2
- package/build/api/user.d.ts +2 -2
- package/build/app/rootReducer.d.ts +1 -0
- package/build/app/rootReducer.js +3 -1
- package/build/app/settings.d.ts +37 -3
- package/build/app/settings.js +128 -43
- package/build/app/store.d.ts +6 -4
- package/build/assets/locales/ar.json +24 -1
- package/build/assets/locales/en.json +24 -1
- package/build/components/AnimationFlow/AnimationFlow.d.ts +10 -3
- package/build/components/AnimationFlow/AnimationFlow.js +4 -4
- package/build/components/AnimationFlow/BottomSheet.d.ts +5 -2
- package/build/components/AnimationFlow/BottomSheet.js +28 -6
- package/build/components/AnimationFlow/Dialog.d.ts +10 -2
- package/build/components/AnimationFlow/Dialog.js +6 -6
- 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 +5 -2
- package/build/components/ArabicDatePicker/ArabicDatePicker.js +45 -23
- package/build/components/ArabicDatePicker/arabicAr.d.ts +8 -0
- package/build/components/ArabicDatePicker/arabicAr.js +32 -0
- package/build/components/ArabicDatePicker/arabicEn.d.ts +8 -0
- package/build/components/ArabicDatePicker/arabicEn.js +32 -0
- package/build/components/ArabicDatePicker/style.css +45 -5
- 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 +2 -1
- package/build/components/DatePicker/DatePicker.js +12 -7
- package/build/components/ExpandIcon/ExpandIcon.d.ts +3 -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 +2 -1
- package/build/components/SimpleList/SimpleList.js +10 -7
- 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/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 +10 -0
- package/build/constants/api.js +20 -1
- package/build/constants/app.d.ts +23 -1
- package/build/constants/app.js +116 -16
- package/build/constants/assets.d.ts +2 -0
- package/build/constants/assets.js +2 -0
- package/build/constants/dummy.d.ts +43 -196
- package/build/constants/dummy.js +610 -6141
- package/build/constants/validation.d.ts +6 -2
- package/build/constants/validation.js +7 -3
- package/build/features/app/bank/bankStore.d.ts +93 -10
- package/build/features/app/bank/bankStore.js +88 -34
- package/build/features/app/board/boardStore.d.ts +69 -0
- package/build/features/app/board/boardStore.js +237 -0
- package/build/features/app/brand/brandStore.d.ts +159 -18
- package/build/features/app/brand/brandStore.js +269 -111
- package/build/features/app/business/businessStore.d.ts +171 -18
- package/build/features/app/business/businessStore.js +303 -206
- package/build/features/app/connect/connectStore.d.ts +166 -14
- package/build/features/app/connect/connectStore.js +279 -106
- package/build/features/app/connectExpress/connectExpressStore.d.ts +294 -25
- package/build/features/app/connectExpress/connectExpressStore.js +611 -114
- package/build/features/app/entity/entityStore.d.ts +98 -10
- package/build/features/app/entity/entityStore.js +172 -84
- package/build/features/app/individual/individualStore.d.ts +193 -24
- package/build/features/app/individual/individualStore.js +262 -172
- package/build/features/app/password/passwordStore.d.ts +114 -12
- package/build/features/app/password/passwordStore.js +121 -44
- package/build/features/app/signIn/signInStore.d.ts +61 -7
- package/build/features/app/signIn/signInStore.js +1 -1
- package/build/features/app/tax/taxStore.d.ts +83 -9
- package/build/features/app/tax/taxStore.js +86 -33
- package/build/features/bank/Bank.d.ts +2 -2
- package/build/features/bank/Bank.js +12 -7
- package/build/features/bank/screens/BankDetails/BankDetails.d.ts +1 -2
- package/build/features/bank/screens/BankDetails/BankDetails.js +2 -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/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/SuccessWithFlowButtons/SuccessWithFlowButtons.js +13 -5
- package/build/features/bank/screens/Verify/OTPInput.d.ts +1 -1
- package/build/features/bank/screens/Verify/OTPInput.js +3 -1
- package/build/features/bank/screens/Verify/Verify.d.ts +1 -1
- package/build/features/bank/screens/Verify/Verify.js +2 -2
- package/build/features/board/Board.d.ts +9 -0
- package/build/features/board/Board.js +74 -0
- package/build/features/board/index.d.ts +1 -0
- package/build/features/board/index.js +1 -0
- package/build/features/board/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +5 -0
- package/build/features/board/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +21 -0
- package/build/features/board/screens/ResetPasswordSuccess/index.d.ts +3 -0
- package/build/features/board/screens/ResetPasswordSuccess/index.js +2 -0
- package/build/features/board/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +3 -0
- package/build/features/board/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +35 -0
- package/build/features/board/screens/SuccessWithFlowButtons/index.d.ts +2 -0
- package/build/features/board/screens/SuccessWithFlowButtons/index.js +2 -0
- package/build/features/board/screens/Verify/OTPInput.d.ts +7 -0
- package/build/features/board/screens/Verify/OTPInput.js +51 -0
- package/build/features/board/screens/Verify/Verify.d.ts +5 -0
- package/build/features/board/screens/Verify/Verify.js +74 -0
- package/build/features/board/screens/Verify/index.d.ts +2 -0
- package/build/features/board/screens/Verify/index.js +2 -0
- package/build/features/board/screens/Verify/validation.d.ts +8 -0
- package/build/features/board/screens/Verify/validation.js +4 -0
- package/build/features/brand/Brand.d.ts +2 -2
- package/build/features/brand/Brand.js +12 -7
- package/build/features/brand/screens/BrandActivities/ActivitiesList.d.ts +15 -31
- package/build/features/brand/screens/BrandActivities/ActivitiesList.js +21 -13
- package/build/features/brand/screens/BrandActivities/BrandActivities.d.ts +1 -2
- package/build/features/brand/screens/BrandActivities/BrandActivities.js +2 -1
- package/build/features/brand/screens/BrandActivities/CustomerBase.d.ts +13 -37
- package/build/features/brand/screens/BrandActivities/CustomerBase.js +6 -9
- package/build/features/brand/screens/BrandActivities/ExpectedCustomers.d.ts +1 -2
- package/build/features/brand/screens/BrandActivities/ExpectedCustomers.js +7 -9
- package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.d.ts +1 -2
- package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.js +10 -12
- 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/BrandActivities/validation.d.ts +36 -36
- package/build/features/brand/screens/BrandActivities/validation.js +5 -10
- package/build/features/brand/screens/BrandInfo/BrandInfo.d.ts +1 -2
- package/build/features/brand/screens/BrandInfo/BrandInfo.js +15 -34
- package/build/features/brand/screens/BrandInfo/BrandLogo.d.ts +2 -4
- package/build/features/brand/screens/BrandInfo/BrandLogo.js +2 -14
- package/build/features/brand/screens/BrandInfo/BrandName.d.ts +1 -2
- package/build/features/brand/screens/BrandInfo/BrandName.js +7 -5
- package/build/features/brand/screens/BrandInfo/SalesChannels.d.ts +1 -2
- package/build/features/brand/screens/BrandInfo/SalesChannels.js +4 -4
- package/build/features/brand/screens/BrandInfo/validation.d.ts +21 -6
- package/build/features/brand/screens/BrandInfo/validation.js +11 -10
- package/build/features/brand/screens/BrandSegmentInfo/BrandSegmentInfo.d.ts +4 -0
- package/build/features/brand/screens/BrandSegmentInfo/BrandSegmentInfo.js +103 -0
- package/build/features/brand/screens/BrandSegmentInfo/SegmentLocations.d.ts +9 -0
- package/build/features/brand/screens/{BrandInfo/Segments.js → BrandSegmentInfo/SegmentLocations.js} +6 -14
- package/build/features/brand/screens/BrandSegmentInfo/SegmentProfits.d.ts +9 -0
- package/build/features/brand/screens/BrandSegmentInfo/SegmentProfits.js +69 -0
- package/build/features/brand/screens/BrandSegmentInfo/SegmentTechs.d.ts +9 -0
- package/build/features/{connect/screens/Merchant/Segments.js → brand/screens/BrandSegmentInfo/SegmentTechs.js} +23 -25
- package/build/features/brand/screens/{BrandInfo → BrandSegmentInfo}/TeamSize.d.ts +1 -2
- package/build/features/brand/screens/{BrandInfo → BrandSegmentInfo}/TeamSize.js +2 -10
- package/build/features/brand/screens/BrandSegmentInfo/index.d.ts +2 -0
- package/build/features/brand/screens/BrandSegmentInfo/index.js +2 -0
- package/build/features/brand/screens/BrandSegmentInfo/validation.d.ts +17 -0
- package/build/features/brand/screens/BrandSegmentInfo/validation.js +9 -0
- 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/SuccessWithFlowButtons/SuccessWithFlowButtons.js +13 -5
- package/build/features/brand/screens/Verify/OTPInput.d.ts +1 -1
- package/build/features/brand/screens/Verify/OTPInput.js +3 -1
- package/build/features/brand/screens/Verify/Verify.d.ts +1 -1
- package/build/features/brand/screens/Verify/Verify.js +2 -2
- package/build/features/business/Business.d.ts +1 -2
- package/build/features/business/Business.js +5 -2
- package/build/features/business/screens/Activities/Activities.d.ts +1 -2
- package/build/features/business/screens/Activities/Activities.js +2 -1
- package/build/features/business/screens/Activities/ActivitiesList.d.ts +14 -64
- package/build/features/business/screens/Activities/ActivitiesList.js +225 -94
- 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/Activities/OperationStartDate.js +2 -2
- package/build/features/business/screens/Activities/validation.d.ts +165 -30
- package/build/features/business/screens/Activities/validation.js +5 -2
- 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 +14 -6
- package/build/features/business/screens/BusinessType/EntityLicenseList.d.ts +1 -1
- package/build/features/business/screens/BusinessType/EntityLicenseList.js +3 -6
- package/build/features/business/screens/BusinessType/EntityName.d.ts +1 -2
- package/build/features/business/screens/BusinessType/EntityName.js +3 -3
- 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 +6 -9
- package/build/features/business/screens/BusinessType/LicenseNumber.d.ts +1 -1
- package/build/features/business/screens/BusinessType/LicenseNumber.js +10 -9
- package/build/features/business/screens/BusinessType/LicenseType.d.ts +6 -6
- 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/validation.d.ts +10 -0
- package/build/features/business/screens/BusinessType/validation.js +18 -2
- package/build/features/business/screens/CivilID/CivilID.d.ts +1 -1
- package/build/features/business/screens/CivilID/CivilID.js +2 -1
- package/build/features/business/screens/Customers/CustomerLocations.d.ts +45 -33
- package/build/features/business/screens/Customers/CustomerLocations.js +34 -10
- package/build/features/business/screens/Customers/Customers.d.ts +1 -1
- package/build/features/business/screens/Customers/Customers.js +2 -1
- package/build/features/business/screens/Customers/ExpectedCustomers.d.ts +1 -2
- package/build/features/business/screens/Customers/ExpectedCustomers.js +4 -7
- package/build/features/business/screens/Customers/ExpectedSalesRange.d.ts +1 -2
- package/build/features/business/screens/Customers/ExpectedSalesRange.js +7 -10
- package/build/features/business/screens/Customers/RefundPolicy.d.ts +11 -19
- package/build/features/business/screens/Customers/TransactionPolicy.d.ts +1 -2
- package/build/features/business/screens/IDBOD/DOB.d.ts +1 -1
- package/build/features/business/screens/IDBOD/DOB.js +2 -2
- package/build/features/business/screens/IDBOD/ID.d.ts +1 -1
- package/build/features/business/screens/IDBOD/ID.js +6 -2
- package/build/features/business/screens/IDBOD/IDBOD.d.ts +1 -1
- package/build/features/business/screens/IDBOD/IDBOD.js +9 -17
- package/build/features/business/screens/IDBOD/validation.d.ts +10 -0
- package/build/features/business/screens/IDBOD/validation.js +4 -0
- package/build/features/business/screens/OTP/OTP.d.ts +1 -1
- package/build/features/business/screens/OTP/OTP.js +2 -2
- package/build/features/business/screens/OTP/OTPInput.d.ts +1 -1
- package/build/features/business/screens/OTP/OTPInput.js +5 -2
- 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/OTPInput.js +3 -1
- package/build/features/business/screens/Verify/Verify.d.ts +1 -1
- package/build/features/business/screens/Verify/Verify.js +2 -2
- package/build/features/business/screens/VerifyPACI/VerifyPACI.d.ts +1 -1
- package/build/features/connect/Connect.d.ts +3 -2
- package/build/features/connect/Connect.js +99 -13
- package/build/features/connect/screens/BrandSegment/BrandSegment.d.ts +5 -0
- package/build/features/connect/screens/BrandSegment/BrandSegment.js +62 -0
- package/build/features/connect/screens/{Merchant → BrandSegment}/TeamSize.d.ts +1 -2
- package/build/features/connect/screens/{Merchant → BrandSegment}/TeamSize.js +3 -8
- package/build/features/connect/screens/BrandSegment/index.d.ts +3 -0
- package/build/features/connect/screens/BrandSegment/index.js +2 -0
- package/build/features/connect/screens/BrandSegment/validation.d.ts +8 -0
- package/build/features/connect/screens/BrandSegment/validation.js +6 -0
- package/build/features/connect/screens/BusinessCountry/BusinessCountry.d.ts +5 -0
- package/build/features/connect/screens/BusinessCountry/BusinessCountry.js +103 -0
- package/build/features/connect/screens/BusinessCountry/index.d.ts +3 -0
- package/build/features/connect/screens/BusinessCountry/index.js +2 -0
- package/build/features/connect/screens/CivilID/CivilID.d.ts +1 -1
- package/build/features/connect/screens/CivilID/CivilID.js +7 -3
- 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/Individual.js +10 -4
- package/build/features/connect/screens/Individual/MobileNumber.js +6 -3
- package/build/features/connect/screens/Individual/Name.d.ts +1 -1
- package/build/features/connect/screens/Individual/validation.js +8 -3
- package/build/features/connect/screens/Merchant/BrandList.d.ts +1 -1
- package/build/features/connect/screens/Merchant/BrandList.js +4 -22
- package/build/features/connect/screens/Merchant/BrandName.d.ts +1 -1
- package/build/features/connect/screens/Merchant/BrandName.js +6 -3
- package/build/features/connect/screens/Merchant/Merchant.d.ts +1 -1
- package/build/features/connect/screens/Merchant/Merchant.js +13 -16
- package/build/features/connect/screens/Merchant/SalesChannels.d.ts +1 -2
- package/build/features/connect/screens/Merchant/SalesChannels.js +6 -6
- package/build/features/connect/screens/Merchant/TAC.d.ts +1 -1
- package/build/features/connect/screens/Merchant/validation.d.ts +0 -6
- package/build/features/connect/screens/Merchant/validation.js +10 -14
- package/build/features/connect/screens/Mobile/Mobile.d.ts +1 -1
- package/build/features/connect/screens/Mobile/Mobile.js +23 -22
- package/build/features/connect/screens/Mobile/MobileNumber.js +21 -8
- package/build/features/connect/screens/Mobile/Title.d.ts +1 -1
- package/build/features/connect/screens/Mobile/validation.js +8 -3
- package/build/features/connect/screens/NID/DOB.d.ts +1 -2
- package/build/features/connect/screens/NID/DOB.js +3 -3
- package/build/features/connect/screens/NID/NID.d.ts +1 -1
- package/build/features/connect/screens/NID/NID.js +17 -4
- package/build/features/connect/screens/OTP/OTP.d.ts +1 -1
- package/build/features/connect/screens/OTP/OTP.js +14 -16
- package/build/features/connect/screens/OTP/OTPInput.d.ts +1 -1
- package/build/features/connect/screens/OTP/OTPInput.js +14 -2
- package/build/features/connect/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/connect/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/connect/screens/OperatorError/index.d.ts +3 -0
- package/build/features/connect/screens/OperatorError/index.js +2 -0
- package/build/features/connect/screens/ThankYou/ThankYou.d.ts +1 -1
- package/build/features/connect/screens/ThankYou/ThankYou.js +17 -2
- package/build/features/connect/screens/VerifyPACI/VerifyPACI.d.ts +1 -1
- package/build/features/connectExpress/ConnectExpress.d.ts +2 -3
- package/build/features/connectExpress/ConnectExpress.js +87 -19
- package/build/features/connectExpress/screens/AccountAlreadyCreated/AccountAlreadyCreated.d.ts +1 -1
- package/build/features/connectExpress/screens/AccountAlreadyCreated/AccountAlreadyCreated.js +14 -2
- package/build/features/connectExpress/screens/AccountCreatedLoader/AccountCreatedLoader.d.ts +5 -0
- package/build/features/connectExpress/screens/AccountCreatedLoader/AccountCreatedLoader.js +36 -0
- package/build/features/connectExpress/screens/AccountCreatedLoader/index.d.ts +2 -0
- package/build/features/connectExpress/screens/AccountCreatedLoader/index.js +2 -0
- package/build/features/connectExpress/screens/AuthMerchant/AuthMerchant.d.ts +5 -0
- package/build/features/connectExpress/screens/AuthMerchant/AuthMerchant.js +74 -0
- package/build/features/connectExpress/screens/AuthMerchant/MerchantList.d.ts +11 -0
- package/build/features/connectExpress/screens/AuthMerchant/MerchantList.js +64 -0
- package/build/features/connectExpress/screens/AuthMerchant/index.d.ts +2 -0
- package/build/features/connectExpress/screens/AuthMerchant/index.js +2 -0
- package/build/features/connectExpress/screens/AuthMerchant/validation.d.ts +8 -0
- package/build/features/connectExpress/screens/AuthMerchant/validation.js +4 -0
- package/build/features/connectExpress/screens/AuthenticationList/AuthenticationList.d.ts +5 -0
- package/build/features/connectExpress/screens/AuthenticationList/AuthenticationList.js +101 -0
- package/build/features/connectExpress/screens/AuthenticationList/BrandList.d.ts +10 -0
- package/build/features/connectExpress/screens/AuthenticationList/BrandList.js +81 -0
- package/build/features/connectExpress/screens/AuthenticationList/EntityLegalName.d.ts +2 -0
- package/build/features/connectExpress/screens/AuthenticationList/EntityLegalName.js +48 -0
- package/build/features/connectExpress/screens/AuthenticationList/EntityList.d.ts +11 -0
- package/build/features/connectExpress/screens/AuthenticationList/EntityList.js +133 -0
- package/build/features/connectExpress/screens/AuthenticationList/LicenseNumber.d.ts +3 -0
- package/build/features/connectExpress/screens/AuthenticationList/LicenseNumber.js +36 -0
- package/build/features/connectExpress/screens/AuthenticationList/index.d.ts +3 -0
- package/build/features/connectExpress/screens/AuthenticationList/index.js +2 -0
- package/build/features/connectExpress/screens/AuthenticationList/validation.d.ts +17 -0
- package/build/features/connectExpress/screens/AuthenticationList/validation.js +58 -0
- package/build/features/connectExpress/screens/Brand/Brand.d.ts +1 -1
- package/build/features/connectExpress/screens/BusinessCountry/BusinessCountry.d.ts +5 -0
- package/build/features/connectExpress/screens/BusinessCountry/BusinessCountry.js +105 -0
- package/build/features/connectExpress/screens/BusinessCountry/index.d.ts +3 -0
- package/build/features/connectExpress/screens/BusinessCountry/index.js +2 -0
- package/build/features/connectExpress/screens/CivilID/CivilID.d.ts +1 -1
- package/build/features/connectExpress/screens/CivilID/CivilID.js +11 -4
- package/build/features/connectExpress/screens/CivilID/IDNumber.js +7 -2
- package/build/features/connectExpress/screens/CivilIDMissed/CivilID.d.ts +1 -1
- package/build/features/connectExpress/screens/CivilIDMissed/CivilID.js +3 -2
- package/build/features/connectExpress/screens/CollectBusinessInfo/BrandName.d.ts +1 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/BrandName.js +6 -3
- package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.d.ts +1 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.js +13 -5
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.d.ts +1 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.js +10 -12
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseNumber.d.ts +1 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseNumber.js +9 -8
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.d.ts +6 -6
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.js +1 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.d.ts +3 -3
- package/build/features/connectExpress/screens/CollectBusinessInfo/validation.d.ts +13 -0
- package/build/features/connectExpress/screens/CollectBusinessInfo/validation.js +72 -5
- package/build/features/connectExpress/screens/CollectIndividualInfo/CollectIndividualInfo.d.ts +1 -1
- package/build/features/connectExpress/screens/CollectIndividualInfo/CollectIndividualInfo.js +7 -4
- 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/MobileNumber.js +7 -4
- package/build/features/connectExpress/screens/CollectIndividualInfo/Name.d.ts +1 -1
- package/build/features/connectExpress/screens/CollectIndividualInfo/validation.js +8 -3
- package/build/features/connectExpress/screens/CreateAccountLoader/CreateAccountLoader.d.ts +1 -1
- package/build/features/connectExpress/screens/IdentityOTP/OTP.d.ts +1 -1
- package/build/features/connectExpress/screens/IdentityOTP/OTP.js +4 -4
- package/build/features/connectExpress/screens/IdentityOTP/OTPInput.d.ts +1 -1
- package/build/features/connectExpress/screens/IdentityOTP/OTPInput.js +5 -3
- package/build/features/connectExpress/screens/IdentityVerifyPACI/VerifyPACI.d.ts +1 -1
- package/build/features/connectExpress/screens/IdentityVerifyPACI/VerifyPACI.js +2 -2
- package/build/features/connectExpress/screens/Mobile/Mobile.d.ts +1 -1
- package/build/features/connectExpress/screens/Mobile/Mobile.js +9 -5
- package/build/features/connectExpress/screens/Mobile/MobileNumber.js +15 -9
- package/build/features/connectExpress/screens/Mobile/TAC.d.ts +1 -1
- package/build/features/connectExpress/screens/Mobile/TAC.js +1 -1
- package/build/features/connectExpress/screens/Mobile/Title.d.ts +1 -1
- package/build/features/connectExpress/screens/Mobile/validation.js +16 -6
- package/build/features/connectExpress/screens/NID/DOB.d.ts +1 -2
- package/build/features/connectExpress/screens/NID/DOB.js +2 -2
- package/build/features/connectExpress/screens/NID/NID.d.ts +1 -1
- package/build/features/connectExpress/screens/NID/NID.js +7 -3
- package/build/features/connectExpress/screens/NID/TAC.d.ts +3 -3
- package/build/features/connectExpress/screens/NID/TAC.js +2 -2
- package/build/features/connectExpress/screens/NIDMissed/DOB.d.ts +1 -2
- package/build/features/connectExpress/screens/NIDMissed/DOB.js +2 -2
- package/build/features/connectExpress/screens/NIDMissed/IDNumber.js +6 -2
- package/build/features/connectExpress/screens/NIDMissed/NID.d.ts +1 -1
- package/build/features/connectExpress/screens/NIDMissed/NID.js +7 -4
- package/build/features/connectExpress/screens/NIDMissed/validation.d.ts +10 -0
- package/build/features/connectExpress/screens/NIDMissed/validation.js +4 -0
- package/build/features/connectExpress/screens/OTP/OTP.d.ts +1 -1
- package/build/features/connectExpress/screens/OTP/OTP.js +3 -3
- package/build/features/connectExpress/screens/OTP/OTPInput.d.ts +1 -1
- package/build/features/connectExpress/screens/OTP/OTPInput.js +4 -2
- package/build/features/connectExpress/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +1 -1
- package/build/features/connectExpress/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +15 -6
- package/build/features/connectExpress/screens/VerifyPACI/VerifyPACI.d.ts +1 -1
- package/build/features/entity/Entity.d.ts +2 -2
- package/build/features/entity/Entity.js +12 -7
- package/build/features/entity/screens/EntityCapital/ActivityList.d.ts +10 -25
- package/build/features/entity/screens/EntityCapital/ActivityList.js +14 -12
- package/build/features/entity/screens/EntityCapital/CapitalPaid.d.ts +1 -1
- package/build/features/entity/screens/EntityCapital/CapitalPaid.js +6 -12
- package/build/features/entity/screens/EntityCapital/CapitalShareCount.d.ts +1 -1
- package/build/features/entity/screens/EntityCapital/CapitalShareCount.js +5 -9
- package/build/features/entity/screens/EntityCapital/CapitalShareValue.d.ts +1 -1
- package/build/features/entity/screens/EntityCapital/CapitalShareValue.js +6 -12
- package/build/features/entity/screens/EntityCapital/EntityCapital.d.ts +1 -2
- package/build/features/entity/screens/EntityCapital/EntityCapital.js +2 -2
- package/build/features/entity/screens/EntityCapital/validation.d.ts +90 -90
- package/build/features/entity/screens/EntityCapital/validation.js +2 -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 +13 -6
- package/build/features/entity/screens/EntityName/EntityTypeList.d.ts +16 -31
- package/build/features/entity/screens/EntityName/EntityTypeList.js +10 -9
- package/build/features/entity/screens/EntityName/ExpiryDate.d.ts +5 -13
- package/build/features/entity/screens/EntityName/ExpiryDate.js +3 -2
- package/build/features/entity/screens/EntityName/IssuingDate.d.ts +5 -13
- package/build/features/entity/screens/EntityName/IssuingDate.js +3 -2
- package/build/features/entity/screens/EntityName/LegalName.d.ts +1 -1
- package/build/features/entity/screens/EntityName/LegalName.js +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/LicenseNumber.js +6 -5
- package/build/features/entity/screens/EntityName/UnifiedNumber.d.ts +1 -1
- package/build/features/entity/screens/EntityName/validation.d.ts +28 -0
- package/build/features/entity/screens/EntityName/validation.js +40 -2
- 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/SuccessWithFlowButtons/SuccessWithFlowButtons.js +13 -5
- package/build/features/entity/screens/Verify/OTPInput.d.ts +1 -1
- package/build/features/entity/screens/Verify/OTPInput.js +3 -1
- package/build/features/entity/screens/Verify/Verify.d.ts +1 -1
- package/build/features/entity/screens/Verify/Verify.js +2 -2
- package/build/features/featuresScreens.d.ts +1 -0
- package/build/features/featuresScreens.js +59 -2
- package/build/features/individual/Individual.d.ts +2 -2
- package/build/features/individual/Individual.js +12 -7
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.d.ts +5 -13
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +14 -11
- 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/MonthlyIncome.d.ts +1 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +5 -13
- package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.d.ts +1 -4
- package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.js +91 -43
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.d.ts +5 -5
- 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 -5
- 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/AdditionalIndividualInfo/SourceOfIncome.js +2 -10
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.d.ts +1 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.js +5 -5
- 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/MobileNumber.js +6 -3
- package/build/features/individual/screens/IndividualList/UserList.d.ts +1 -2
- package/build/features/individual/screens/IndividualList/validation.js +8 -3
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCity.js +2 -10
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCountry.js +2 -10
- package/build/features/individual/screens/IndividualPersonalInfo/DOB.d.ts +1 -1
- package/build/features/individual/screens/IndividualPersonalInfo/DOB.js +2 -2
- 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/ExpiryDate.js +2 -2
- package/build/features/individual/screens/IndividualPersonalInfo/Gender.d.ts +6 -6
- package/build/features/individual/screens/IndividualPersonalInfo/ID.d.ts +1 -1
- package/build/features/individual/screens/IndividualPersonalInfo/ID.js +6 -2
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.d.ts +5 -13
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.js +4 -3
- package/build/features/individual/screens/IndividualPersonalInfo/IssuedCountry.js +2 -10
- package/build/features/individual/screens/IndividualPersonalInfo/MobileNumber.js +6 -3
- package/build/features/individual/screens/IndividualPersonalInfo/Name.d.ts +1 -1
- package/build/features/individual/screens/IndividualPersonalInfo/Nationality.js +2 -10
- package/build/features/individual/screens/IndividualPersonalInfo/validation.d.ts +1 -1
- package/build/features/individual/screens/IndividualPersonalInfo/validation.js +72 -63
- package/build/features/individual/screens/IndividualPhoneInfo/MobileNumber.js +7 -4
- package/build/features/individual/screens/IndividualPhoneInfo/PhoneInfo.d.ts +1 -1
- package/build/features/individual/screens/IndividualPhoneInfo/PhoneInfo.js +2 -1
- package/build/features/individual/screens/IndividualPhoneInfo/validation.js +8 -3
- 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/SuccessWithFlowButtons/SuccessWithFlowButtons.js +13 -5
- package/build/features/individual/screens/Verify/OTPInput.d.ts +1 -1
- package/build/features/individual/screens/Verify/OTPInput.js +3 -1
- package/build/features/individual/screens/Verify/Verify.d.ts +1 -1
- package/build/features/individual/screens/Verify/Verify.js +2 -2
- package/build/features/password/Password.d.ts +2 -2
- package/build/features/password/Password.js +21 -6
- 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/CreatePassword.js +3 -2
- 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/OTP.js +2 -2
- package/build/features/password/screens/OTP/OTPInput.d.ts +1 -1
- package/build/features/password/screens/OTP/OTPInput.js +5 -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/SuccessWithFlowButtons/SuccessWithFlowButtons.js +13 -5
- package/build/features/password/screens/Verify/OTPInput.d.ts +1 -1
- package/build/features/password/screens/Verify/OTPInput.js +3 -1
- package/build/features/password/screens/Verify/Verify.d.ts +1 -1
- package/build/features/password/screens/Verify/Verify.js +2 -2
- 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 +14 -30
- package/build/features/shared/Address/InputSelect.d.ts +14 -30
- 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/BouncingDotsLoader/BouncingDotsLoader.d.ts +1 -2
- package/build/features/shared/BusinessCountry/BusinessCountry.d.ts +14 -0
- package/build/features/shared/BusinessCountry/BusinessCountry.js +179 -0
- package/build/features/shared/BusinessCountry/index.d.ts +2 -0
- package/build/features/shared/BusinessCountry/index.js +2 -0
- package/build/features/shared/Button/AbsherButton.d.ts +1 -2
- package/build/features/shared/Button/Button.d.ts +1 -2
- package/build/features/shared/Button/Button.js +8 -4
- package/build/features/shared/Button/EmailProvidersButtons.d.ts +2 -3
- package/build/features/shared/Button/EmailProvidersButtons.js +9 -2
- package/build/features/shared/Button/FlowsButtons.d.ts +4 -3
- package/build/features/shared/Button/FlowsButtons.js +15 -12
- package/build/features/shared/Button/IndividualActionButtons.d.ts +2 -2
- package/build/features/shared/Button/IndividualActionButtons.js +1 -1
- package/build/features/shared/Button/MobileButton.d.ts +1 -2
- package/build/features/shared/Button/SuccessButton.d.ts +1 -2
- package/build/features/shared/Calender/Calender.d.ts +12 -0
- package/build/features/shared/Calender/Calender.js +56 -0
- package/build/features/shared/Calender/index.d.ts +2 -0
- package/build/features/shared/Calender/index.js +2 -0
- 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 +4 -1
- package/build/features/shared/DataLoading/DataLoading.js +2 -2
- 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/Dot/Dot.js +2 -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/Footer.js +10 -1
- 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 -16
- package/build/features/shared/Input/index.d.ts +2 -1
- package/build/features/shared/InputSelect/InputSelect.d.ts +3 -0
- package/build/features/shared/InputSelect/InputSelect.js +33 -0
- package/build/features/shared/InputSelect/index.d.ts +2 -0
- package/build/features/shared/InputSelect/index.js +2 -0
- package/build/features/shared/Mandatory/Mandatory.d.ts +1 -2
- package/build/features/shared/OTP/OTP.d.ts +1 -1
- 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 +3 -1
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +9 -7
- package/build/features/shared/SuccessScreen/SuccessScreen.d.ts +1 -1
- package/build/features/shared/SuccessScreen/SuccessScreen.js +1 -1
- package/build/features/shared/UploadFile/FileUpload.d.ts +4 -4
- package/build/features/shared/UploadFile/FileUpload.js +2 -2
- package/build/features/shared/UploadFile/UploadFile.d.ts +3 -3
- package/build/features/shared/UploadFile/UploadWrapper.d.ts +3 -3
- package/build/features/shared/UploadFile/UploadWrapper.js +1 -1
- package/build/features/shared/UploadMultipleFile/UploadFile.d.ts +4 -4
- package/build/features/shared/UploadMultipleFile/UploadFile.js +2 -2
- package/build/features/shared/UploadMultipleFile/UploadMultipleFile.d.ts +3 -3
- package/build/features/signIn/SignIn.d.ts +1 -2
- package/build/features/signIn/SignIn.js +1 -1
- package/build/features/signIn/screens/Email/Email.d.ts +1 -1
- package/build/features/signIn/screens/Email/Email.js +2 -1
- package/build/features/signIn/screens/Mobile/Mobile.d.ts +1 -1
- package/build/features/signIn/screens/Mobile/Mobile.js +2 -1
- package/build/features/signIn/screens/Mobile/MobileNumber.js +6 -3
- package/build/features/signIn/screens/Mobile/validation.js +8 -3
- package/build/features/signIn/screens/OTP/OTP.d.ts +1 -1
- package/build/features/signIn/screens/OTP/OTP.js +2 -2
- package/build/features/signIn/screens/OTP/OTPInput.d.ts +1 -1
- package/build/features/signIn/screens/OTP/OTPInput.js +4 -2
- package/build/features/signIn/screens/Password/Password.d.ts +1 -1
- package/build/features/signIn/screens/Password/Password.js +2 -1
- package/build/features/signIn/screens/Password/PasswordInput.d.ts +1 -1
- package/build/features/tax/Tax.d.ts +2 -2
- package/build/features/tax/Tax.js +12 -7
- 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/SuccessWithFlowButtons/SuccessWithFlowButtons.js +13 -5
- 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/TaxDetails.js +2 -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/OTPInput.js +3 -1
- package/build/features/tax/screens/Verify/Verify.d.ts +1 -1
- package/build/features/tax/screens/Verify/Verify.js +2 -2
- package/build/hooks/useAppConfig.d.ts +4 -2
- package/build/hooks/useAppConfig.js +18 -18
- package/build/hooks/useAppDispatch.d.ts +1 -0
- package/build/hooks/useCountry.d.ts +1 -0
- package/build/hooks/useCountry.js +4 -3
- package/build/hooks/useDataVerified.d.ts +1 -1
- package/build/hooks/useErrorListener.d.ts +2 -1
- package/build/hooks/useErrorListener.js +16 -1
- package/build/hooks/useExcludeReadOnlyFelids.d.ts +2 -2
- 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/hooks/useVerifyToken.js +1 -1
- package/build/index.d.ts +3 -2
- package/build/index.js +4 -2
- package/build/utils/array.d.ts +11 -2
- package/build/utils/array.js +90 -2
- package/build/utils/common.d.ts +1 -0
- package/build/utils/common.js +10 -0
- package/build/utils/device.d.ts +2 -0
- package/build/utils/device.js +6 -0
- package/build/utils/gtm.d.ts +6 -0
- package/build/utils/gtm.js +29 -0
- package/build/utils/index.d.ts +1 -0
- package/build/utils/index.js +1 -0
- package/build/utils/object.d.ts +1 -0
- package/build/utils/object.js +14 -0
- package/build/utils/string.d.ts +1 -0
- package/build/utils/string.js +3 -0
- package/build/utils/validation.d.ts +2 -0
- package/build/utils/validation.js +6 -0
- package/package.json +4 -2
- package/build/features/brand/screens/BrandInfo/Segments.d.ts +0 -10
- package/build/features/connect/screens/Merchant/Segments.d.ts +0 -8
|
@@ -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]) {
|
|
@@ -56,36 +56,79 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
56
56
|
};
|
|
57
57
|
var _a;
|
|
58
58
|
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
59
|
-
import { handleNextScreenStep, handleCurrentActiveScreen, handleOpen } from '../../../app/settings';
|
|
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 { CONNECT_EXPRESS_STEP_NAMES, IDENTIFICATION_TYPE, OTHER_CR_LICENSE, OTHER_FL_LICENSE } from '../../../constants';
|
|
62
|
+
import { ADD_NEW_ENTITY, CONNECT_EXPRESS_STEP_NAMES, IDENTIFICATION_TYPE, OTHER_CR_LICENSE, OTHER_FL_LICENSE, SCOPE_AUTH } from '../../../constants';
|
|
63
63
|
import { defaultCountry } from '../../../constants';
|
|
64
|
-
import { getIndividualName, capitalizeTheFirstLetterOfEachWord, sleep, findCountryByIddPrefix, concatenateObjectValues, isSA } from '../../../utils';
|
|
64
|
+
import { getIndividualName, capitalizeTheFirstLetterOfEachWord, sleep, findCountryByIddPrefix, concatenateObjectValues, isSA, isKW, isOtherThanKWOrSA } from '../../../utils';
|
|
65
|
+
export var updateBusinessCountryAsync = createAsyncThunk('connectExpress/updateBusinessCountryAsync', function (countryCode, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
66
|
+
var connectExpress, payload, data;
|
|
67
|
+
return __generator(this, function (_a) {
|
|
68
|
+
switch (_a.label) {
|
|
69
|
+
case 0:
|
|
70
|
+
connectExpress = thunkApi.getState().connectExpress;
|
|
71
|
+
payload = {
|
|
72
|
+
id: connectExpress.data.leadId || '',
|
|
73
|
+
country_code: countryCode,
|
|
74
|
+
encryption_contract: []
|
|
75
|
+
};
|
|
76
|
+
return [4, API.leadService.updateLeadExpress(payload)];
|
|
77
|
+
case 1:
|
|
78
|
+
data = _a.sent();
|
|
79
|
+
return [2, data];
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
}); });
|
|
65
83
|
export var retrieveLeadIdentityByIdAsync = createAsyncThunk('expressConnect/retrieveLeadIdentityByIdAsync', function (leadId, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
66
|
-
var _a, settings, connectExpress, countryCode, showBoard, data, phone, status, board_id, board_info_id, isRegistered,
|
|
67
|
-
var
|
|
68
|
-
return __generator(this, function (
|
|
69
|
-
switch (
|
|
84
|
+
var _a, settings, connectExpress, countryCode, showBoard, data, _b, country_code, contact, phone, status, board_id, board_info_id, isRegistered, screen_1, _c, boardInfo, boardData, error_1;
|
|
85
|
+
var _d, _e, _f, _g, _h;
|
|
86
|
+
return __generator(this, function (_j) {
|
|
87
|
+
switch (_j.label) {
|
|
70
88
|
case 0:
|
|
71
89
|
_a = thunkApi.getState(), settings = _a.settings, connectExpress = _a.connectExpress;
|
|
72
90
|
countryCode = settings.data.businessCountry;
|
|
73
91
|
showBoard = connectExpress.data.showBoard;
|
|
74
92
|
return [4, API.leadService.retrieveLeadIdentity(leadId)];
|
|
75
93
|
case 1:
|
|
76
|
-
data =
|
|
77
|
-
|
|
94
|
+
data = _j.sent();
|
|
95
|
+
_b = data || {}, country_code = _b.country_code, contact = _b.contact;
|
|
96
|
+
if (country_code)
|
|
97
|
+
thunkApi.dispatch(handleSetCountryByIso2(country_code));
|
|
98
|
+
phone = (contact || {}).phone;
|
|
78
99
|
if (phone === null || phone === void 0 ? void 0 : phone.country_code)
|
|
79
100
|
countryCode = findCountryByIddPrefix(settings.data.countries, phone.country_code);
|
|
80
101
|
status = data.status, board_id = data.board_id, board_info_id = data.board_info_id;
|
|
102
|
+
if (!country_code && !((_d = settings.data.businessCountry) === null || _d === void 0 ? void 0 : _d.iso2)) {
|
|
103
|
+
thunkApi.dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_BUSINESS_COUNTRY_STEP'));
|
|
104
|
+
return [2, { data: data, countryCode: countryCode }];
|
|
105
|
+
}
|
|
81
106
|
isRegistered = (status === null || status === void 0 ? void 0 : status.toLowerCase()) === 'registered';
|
|
82
|
-
if (!isRegistered && !(data === null || data === void 0 ? void 0 : data.identification) &&
|
|
107
|
+
if (!isRegistered && !(data === null || data === void 0 ? void 0 : data.identification) && phone) {
|
|
108
|
+
thunkApi.dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_MOBILE_STEP'));
|
|
109
|
+
return [2, { data: data, countryCode: countryCode }];
|
|
110
|
+
}
|
|
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));
|
|
116
|
+
return [2, { data: data, countryCode: countryCode }];
|
|
117
|
+
}
|
|
118
|
+
if (!isRegistered && !isSA(settings.data.businessCountry.iso2)) {
|
|
83
119
|
thunkApi.dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_MOBILE_STEP'));
|
|
84
120
|
return [2, { data: data, countryCode: countryCode }];
|
|
85
121
|
}
|
|
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 ((_e = data === null || data === void 0 ? void 0 : data.identification) === null || _e === void 0 ? void 0 : _e.authentication_id) {
|
|
127
|
+
thunkApi.dispatch(storeAuthId((_f = data === null || data === void 0 ? void 0 : data.identification) === null || _f === void 0 ? void 0 : _f.authentication_id));
|
|
128
|
+
}
|
|
86
129
|
if (isRegistered && !showBoard) {
|
|
87
|
-
(
|
|
88
|
-
thunkApi.dispatch(
|
|
130
|
+
(_h = (_g = settings.data.appConfig).onFlowCompleted) === null || _h === void 0 ? void 0 : _h.call(_g, data);
|
|
131
|
+
thunkApi.dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_ACCOUNT_ALREADY_CREATED_STEP'));
|
|
89
132
|
return [2, { data: data, countryCode: countryCode }];
|
|
90
133
|
}
|
|
91
134
|
if (isRegistered && !(board_id && board_info_id)) {
|
|
@@ -93,19 +136,19 @@ export var retrieveLeadIdentityByIdAsync = createAsyncThunk('expressConnect/retr
|
|
|
93
136
|
return [2, { data: data, countryCode: countryCode }];
|
|
94
137
|
}
|
|
95
138
|
if (!(isRegistered && board_id && board_info_id)) return [3, 5];
|
|
96
|
-
|
|
139
|
+
_j.label = 2;
|
|
97
140
|
case 2:
|
|
98
|
-
|
|
141
|
+
_j.trys.push([2, 4, , 5]);
|
|
99
142
|
return [4, Promise.all([
|
|
100
143
|
API.boardService.retrieveBoardInfo({ id: board_id, infoId: board_info_id }),
|
|
101
144
|
API.boardService.retrieveBoardDetails(board_id)
|
|
102
145
|
])];
|
|
103
146
|
case 3:
|
|
104
|
-
|
|
147
|
+
_c = _j.sent(), boardInfo = _c[0], boardData = _c[1];
|
|
105
148
|
thunkApi.dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_SUCCESS_WITH_FLOW_BUTTONS_STEP'));
|
|
106
149
|
return [2, { data: data, countryCode: countryCode, boardInfo: boardInfo, boardData: boardData }];
|
|
107
150
|
case 4:
|
|
108
|
-
error_1 =
|
|
151
|
+
error_1 = _j.sent();
|
|
109
152
|
thunkApi.dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_ACCOUNT_ALREADY_CREATED_STEP'));
|
|
110
153
|
return [2, { data: data, countryCode: countryCode }];
|
|
111
154
|
case 5: return [2, { data: data, countryCode: countryCode }];
|
|
@@ -140,6 +183,73 @@ export var retrieveEntityListAsync = createAsyncThunk('connectExpress/retrieveEn
|
|
|
140
183
|
}
|
|
141
184
|
});
|
|
142
185
|
}); });
|
|
186
|
+
export var retrieveAuthenticationListAsync = createAsyncThunk('connectExpress/retrieveAuthenticationListAsync', function (_a) {
|
|
187
|
+
var individualId = _a.individualId;
|
|
188
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
189
|
+
var brandList, entityList, brands, err_1, list, err_2;
|
|
190
|
+
return __generator(this, function (_b) {
|
|
191
|
+
switch (_b.label) {
|
|
192
|
+
case 0:
|
|
193
|
+
brandList = undefined;
|
|
194
|
+
entityList = undefined;
|
|
195
|
+
_b.label = 1;
|
|
196
|
+
case 1:
|
|
197
|
+
_b.trys.push([1, 3, , 4]);
|
|
198
|
+
return [4, API.brandService.getBrandList({ individual_id: individualId })];
|
|
199
|
+
case 2:
|
|
200
|
+
brands = (_b.sent()).brands;
|
|
201
|
+
brandList = brands;
|
|
202
|
+
return [3, 4];
|
|
203
|
+
case 3:
|
|
204
|
+
err_1 = _b.sent();
|
|
205
|
+
return [3, 4];
|
|
206
|
+
case 4:
|
|
207
|
+
_b.trys.push([4, 6, , 7]);
|
|
208
|
+
return [4, API.entityService.getEntityListUsingIndividualId(individualId)];
|
|
209
|
+
case 5:
|
|
210
|
+
list = (_b.sent()).list;
|
|
211
|
+
entityList = list;
|
|
212
|
+
return [3, 7];
|
|
213
|
+
case 6:
|
|
214
|
+
err_2 = _b.sent();
|
|
215
|
+
return [3, 7];
|
|
216
|
+
case 7: return [2, { brandList: brandList || [], entityList: entityList || [] }];
|
|
217
|
+
}
|
|
218
|
+
});
|
|
219
|
+
});
|
|
220
|
+
});
|
|
221
|
+
export var getMerchantListAsync = createAsyncThunk('connectExpress/getMerchantListAsync', function (_a, thunkApi) {
|
|
222
|
+
var brandInfo = _a.brandInfo, entityInfo = _a.entityInfo;
|
|
223
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
224
|
+
var _b, settings, connectExpress, platforms, payment_provider, payload, merchants, list;
|
|
225
|
+
var _c, _d, _e, _f, _g, _h;
|
|
226
|
+
return __generator(this, function (_j) {
|
|
227
|
+
switch (_j.label) {
|
|
228
|
+
case 0:
|
|
229
|
+
_b = thunkApi.getState(), settings = _b.settings, connectExpress = _b.connectExpress;
|
|
230
|
+
platforms = (_e = (_d = (_c = connectExpress.data.responseData) === null || _c === void 0 ? void 0 : _c.leadData) === null || _d === void 0 ? void 0 : _d.platforms) !== null && _e !== void 0 ? _e : settings.data.appConfig.platforms;
|
|
231
|
+
payment_provider = (_h = (_g = (_f = connectExpress.data.responseData) === null || _f === void 0 ? void 0 : _f.leadData) === null || _g === void 0 ? void 0 : _g.payment_provider) !== null && _h !== void 0 ? _h : settings.data.appConfig.paymentProvider;
|
|
232
|
+
payload = {
|
|
233
|
+
business_entity_id: (entityInfo === null || entityInfo === void 0 ? void 0 : entityInfo.id) || '',
|
|
234
|
+
brand_id: (brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.id) || '',
|
|
235
|
+
create_if_not_present: true,
|
|
236
|
+
platforms: platforms,
|
|
237
|
+
payment_provider: payment_provider
|
|
238
|
+
};
|
|
239
|
+
return [4, API.entityService.getMerchantListUsingEntityId(payload)];
|
|
240
|
+
case 1:
|
|
241
|
+
merchants = (_j.sent()).merchants;
|
|
242
|
+
list = merchants || [];
|
|
243
|
+
if ((list === null || list === void 0 ? void 0 : list.length) > 1) {
|
|
244
|
+
thunkApi.dispatch(handleNextScreenStep('CONNECT_EXPRESS_AUTH_MERCHANT_LIST_STEP'));
|
|
245
|
+
return [2, { list: list, brandInfo: brandInfo, entityInfo: entityInfo }];
|
|
246
|
+
}
|
|
247
|
+
sleep(50).then(function () { return thunkApi.dispatch(handleNextScreenStep('CONNECT_EXPRESS_AUTH_ACCOUNT_CREATED_STEP')); });
|
|
248
|
+
return [2, { list: list, brandInfo: brandInfo, entityInfo: entityInfo }];
|
|
249
|
+
}
|
|
250
|
+
});
|
|
251
|
+
});
|
|
252
|
+
});
|
|
143
253
|
export var createMobileAuthAsync = createAsyncThunk('connectExpress/createMobileAuthAsync', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
144
254
|
var _a, settings, connectExpress, requestBody, data;
|
|
145
255
|
var _b, _c;
|
|
@@ -297,7 +407,7 @@ export var createCivilIdAuthAsync = createAsyncThunk('connectExpress/createCivil
|
|
|
297
407
|
step_name: CONNECT_EXPRESS_STEP_NAMES.CREATE_AUTH_CIVIL_ID,
|
|
298
408
|
encryption_contract: ['user_credentail.identification_id']
|
|
299
409
|
};
|
|
300
|
-
return [4, API.authService.
|
|
410
|
+
return [4, API.authService.createExpressAuth(requestBody)];
|
|
301
411
|
case 1:
|
|
302
412
|
data = _d.sent();
|
|
303
413
|
thunkApi.dispatch(handleNextScreenStep());
|
|
@@ -307,16 +417,21 @@ export var createCivilIdAuthAsync = createAsyncThunk('connectExpress/createCivil
|
|
|
307
417
|
});
|
|
308
418
|
}); });
|
|
309
419
|
export var verifyMobileOtpAsync = createAsyncThunk('connectExpress/verifyMobileOtpAsync', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
310
|
-
var _a, settings, connectExpress, _b, responseData, leadId, isLeadIdPassed, mobileData, _c, auth_token, device_token, service_name, payload, data,
|
|
311
|
-
var
|
|
312
|
-
return __generator(this, function (
|
|
313
|
-
switch (
|
|
420
|
+
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;
|
|
421
|
+
var _f, _g;
|
|
422
|
+
return __generator(this, function (_h) {
|
|
423
|
+
switch (_h.label) {
|
|
314
424
|
case 0:
|
|
315
425
|
_a = thunkApi.getState(), settings = _a.settings, connectExpress = _a.connectExpress;
|
|
316
426
|
_b = connectExpress.data || {}, responseData = _b.responseData, leadId = _b.leadId, isLeadIdPassed = _b.isLeadIdPassed, mobileData = _b.mobileData;
|
|
317
427
|
if (!(responseData === null || responseData === void 0 ? void 0 : responseData.authData))
|
|
318
428
|
throw new Error('Auth data is missing');
|
|
319
429
|
_c = responseData.authData, auth_token = _c.auth_token, device_token = _c.device_token, service_name = _c.service_name;
|
|
430
|
+
_d = settings.data.appConfig, scope = _d.scope, redirectUrl = _d.redirectUrl, authData = _d.data;
|
|
431
|
+
isScopeAuthentication = scope === SCOPE_AUTH;
|
|
432
|
+
bi = settings.data.deviceInfo.browser.browser_id;
|
|
433
|
+
isDataHasIndividualOnly = (authData === null || authData === void 0 ? void 0 : authData.length) === 1 && authData.includes('individual');
|
|
434
|
+
authDataHasValue = authData === null || authData === void 0 ? void 0 : authData.length;
|
|
320
435
|
payload = {
|
|
321
436
|
auth_token: auth_token,
|
|
322
437
|
lead_id: leadId,
|
|
@@ -331,29 +446,59 @@ export var verifyMobileOtpAsync = createAsyncThunk('connectExpress/verifyMobileO
|
|
|
331
446
|
};
|
|
332
447
|
return [4, API.authService.verifyExpressAuth(payload)];
|
|
333
448
|
case 1:
|
|
334
|
-
data =
|
|
335
|
-
|
|
449
|
+
data = _h.sent();
|
|
450
|
+
(_g = (_f = settings.data.appConfig).onStepCompleted) === null || _g === void 0 ? void 0 : _g.call(_f, settings.data.activeScreen.name, params);
|
|
451
|
+
authId = data.auth.id;
|
|
452
|
+
thunkApi.dispatch(storeAuthId(authId));
|
|
453
|
+
if (isScopeAuthentication && !data.new_user && isDataHasIndividualOnly && authId) {
|
|
454
|
+
if (settings.data.appConfig.mode === 'popup') {
|
|
455
|
+
settings.data.appConfig.onFlowCompleted({ auth_id: authId, bi: bi });
|
|
456
|
+
thunkApi.dispatch(handleOpen(false));
|
|
457
|
+
return [2, data];
|
|
458
|
+
}
|
|
459
|
+
if (redirectUrl) {
|
|
460
|
+
urlQueryStart = redirectUrl.includes('?') ? '&' : '?';
|
|
461
|
+
window.open("".concat(redirectUrl).concat(urlQueryStart, "authentication_id=").concat(authId, "&bi=").concat(bi), '_self');
|
|
462
|
+
return [2, data];
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
if (!(isScopeAuthentication && !data.new_user && authDataHasValue)) return [3, 3];
|
|
466
|
+
return [4, thunkApi.dispatch(retrieveAuthenticationListAsync({ individualId: data.individual_id })).unwrap()];
|
|
336
467
|
case 2:
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
468
|
+
_e = _h.sent(), brandList = _e.brandList, entityList = _e.entityList;
|
|
469
|
+
if (brandList.length && entityList.length) {
|
|
470
|
+
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep('CONNECT_EXPRESS_AUTHENTICATION_LIST_STEP')); });
|
|
471
|
+
return [2, data];
|
|
472
|
+
}
|
|
473
|
+
_h.label = 3;
|
|
474
|
+
case 3: return [4, thunkApi.dispatch(getLeadByIdAsync(data.lead_id)).unwrap()];
|
|
475
|
+
case 4:
|
|
476
|
+
_h.sent();
|
|
477
|
+
isKuwait = isKW(settings.data.businessCountry.iso2);
|
|
478
|
+
next = 'CONNECT_EXPRESS_NID_MISSED_STEP';
|
|
479
|
+
if (isKuwait)
|
|
480
|
+
next = 'CONNECT_EXPRESS_CIVIL_ID_MISSED_STEP';
|
|
341
481
|
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep(next)); });
|
|
342
482
|
return [2, data];
|
|
343
483
|
}
|
|
344
484
|
});
|
|
345
485
|
}); });
|
|
346
486
|
export var verifyNIDOtpAsync = createAsyncThunk('connectExpress/verifyNIDOtpAsync', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
347
|
-
var _a, settings, connectExpress, _b, responseData, leadId, isLeadIdPassed, nidData, _c, auth_token, device_token, service_name, payload, data, stepName, needToCollectMoreInfo, creatingAccount;
|
|
348
|
-
var
|
|
349
|
-
return __generator(this, function (
|
|
350
|
-
switch (
|
|
487
|
+
var _a, settings, connectExpress, _b, responseData, leadId, isLeadIdPassed, nidData, _c, auth_token, device_token, service_name, _d, scope, redirectUrl, authData, isScopeAuthentication, bi, isDataHasIndividualOnly, authDataHasValue, payload, data, authId, urlQueryStart, _e, brandList, entityList, stepName, needToCollectMoreInfo, creatingAccount;
|
|
488
|
+
var _f, _g;
|
|
489
|
+
return __generator(this, function (_h) {
|
|
490
|
+
switch (_h.label) {
|
|
351
491
|
case 0:
|
|
352
492
|
_a = thunkApi.getState(), settings = _a.settings, connectExpress = _a.connectExpress;
|
|
353
493
|
_b = connectExpress.data || {}, responseData = _b.responseData, leadId = _b.leadId, isLeadIdPassed = _b.isLeadIdPassed, nidData = _b.nidData;
|
|
354
494
|
if (!(responseData === null || responseData === void 0 ? void 0 : responseData.authData))
|
|
355
495
|
throw new Error('Auth data is missing');
|
|
356
496
|
_c = responseData.authData, auth_token = _c.auth_token, device_token = _c.device_token, service_name = _c.service_name;
|
|
497
|
+
_d = settings.data.appConfig, scope = _d.scope, redirectUrl = _d.redirectUrl, authData = _d.data;
|
|
498
|
+
isScopeAuthentication = scope === SCOPE_AUTH;
|
|
499
|
+
bi = settings.data.deviceInfo.browser.browser_id;
|
|
500
|
+
isDataHasIndividualOnly = (authData === null || authData === void 0 ? void 0 : authData.length) === 1 && authData.includes('individual');
|
|
501
|
+
authDataHasValue = authData === null || authData === void 0 ? void 0 : authData.length;
|
|
357
502
|
payload = {
|
|
358
503
|
auth_token: auth_token,
|
|
359
504
|
lead_id: leadId,
|
|
@@ -368,11 +513,34 @@ export var verifyNIDOtpAsync = createAsyncThunk('connectExpress/verifyNIDOtpAsyn
|
|
|
368
513
|
};
|
|
369
514
|
return [4, API.authService.verifyExpressAuth(payload)];
|
|
370
515
|
case 1:
|
|
371
|
-
data =
|
|
372
|
-
(
|
|
373
|
-
|
|
516
|
+
data = _h.sent();
|
|
517
|
+
(_g = (_f = settings.data.appConfig).onStepCompleted) === null || _g === void 0 ? void 0 : _g.call(_f, settings.data.activeScreen.name, params);
|
|
518
|
+
authId = data.auth.id;
|
|
519
|
+
thunkApi.dispatch(storeAuthId(authId));
|
|
520
|
+
if (isScopeAuthentication && !data.new_user && isDataHasIndividualOnly && authId) {
|
|
521
|
+
if (settings.data.appConfig.mode === 'popup') {
|
|
522
|
+
settings.data.appConfig.onFlowCompleted({ auth_id: authId, bi: bi });
|
|
523
|
+
thunkApi.dispatch(handleOpen(false));
|
|
524
|
+
return [2, data];
|
|
525
|
+
}
|
|
526
|
+
if (redirectUrl) {
|
|
527
|
+
urlQueryStart = redirectUrl.includes('?') ? '&' : '?';
|
|
528
|
+
window.open("".concat(redirectUrl).concat(urlQueryStart, "authentication_id=").concat(authId, "&bi=").concat(bi), '_self');
|
|
529
|
+
return [2, data];
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
if (!(isScopeAuthentication && !data.new_user && authDataHasValue)) return [3, 3];
|
|
533
|
+
return [4, thunkApi.dispatch(retrieveAuthenticationListAsync({ individualId: data.individual_id })).unwrap()];
|
|
374
534
|
case 2:
|
|
375
|
-
|
|
535
|
+
_e = _h.sent(), brandList = _e.brandList, entityList = _e.entityList;
|
|
536
|
+
if (brandList.length && entityList.length) {
|
|
537
|
+
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep('CONNECT_EXPRESS_AUTHENTICATION_LIST_STEP')); });
|
|
538
|
+
return [2, data];
|
|
539
|
+
}
|
|
540
|
+
_h.label = 3;
|
|
541
|
+
case 3: return [4, thunkApi.dispatch(getLeadByIdAsync(data.lead.id)).unwrap()];
|
|
542
|
+
case 4:
|
|
543
|
+
_h.sent();
|
|
376
544
|
stepName = data.step_name;
|
|
377
545
|
needToCollectMoreInfo = stepName === 'collect_info';
|
|
378
546
|
creatingAccount = stepName === 'create_account';
|
|
@@ -386,12 +554,82 @@ export var verifyNIDOtpAsync = createAsyncThunk('connectExpress/verifyNIDOtpAsyn
|
|
|
386
554
|
}
|
|
387
555
|
});
|
|
388
556
|
}); });
|
|
389
|
-
export var verifyPACIAsync = createAsyncThunk('connectExpress/verifyPACIAsync', function (
|
|
390
|
-
var
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
557
|
+
export var verifyPACIAsync = createAsyncThunk('connectExpress/verifyPACIAsync', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
558
|
+
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;
|
|
559
|
+
var _d, _e, _f;
|
|
560
|
+
return __generator(this, function (_g) {
|
|
561
|
+
switch (_g.label) {
|
|
562
|
+
case 0:
|
|
563
|
+
_a = thunkApi.getState(), settings = _a.settings, connectExpress = _a.connectExpress;
|
|
564
|
+
authData = (connectExpress.data.responseData || {}).authData;
|
|
565
|
+
_b = settings.data.appConfig, scope = _b.scope, redirectUrl = _b.redirectUrl, authConfigData = _b.data;
|
|
566
|
+
isScopeAuthentication = scope === SCOPE_AUTH;
|
|
567
|
+
bi = settings.data.deviceInfo.browser.browser_id;
|
|
568
|
+
isDataHasIndividualOnly = (authConfigData === null || authConfigData === void 0 ? void 0 : authConfigData.length) === 1 && authConfigData.includes('individual');
|
|
569
|
+
authDataHasValue = authConfigData === null || authConfigData === void 0 ? void 0 : authConfigData.length;
|
|
570
|
+
expiry = (authData === null || authData === void 0 ? void 0 : authData.expiry) || 120;
|
|
571
|
+
interval = 3;
|
|
572
|
+
maxCalls = Math.floor(expiry / interval);
|
|
573
|
+
count = 1;
|
|
574
|
+
_g.label = 1;
|
|
575
|
+
case 1:
|
|
576
|
+
if (!(count <= maxCalls)) return [3, 9];
|
|
577
|
+
if (thunkApi.signal.aborted) {
|
|
578
|
+
return [3, 9];
|
|
579
|
+
}
|
|
580
|
+
return [4, API.authService.getVerifyExpressAuth(authData === null || authData === void 0 ? void 0 : authData.auth_token)];
|
|
581
|
+
case 2:
|
|
582
|
+
data = _g.sent();
|
|
583
|
+
isSuccess = ((_e = (_d = data.auth) === null || _d === void 0 ? void 0 : _d.status) === null || _e === void 0 ? void 0 : _e.toLowerCase()) === 'success';
|
|
584
|
+
if (!isSuccess) return [3, 6];
|
|
585
|
+
authId = data.auth.id;
|
|
586
|
+
thunkApi.dispatch(storeAuthId(authId));
|
|
587
|
+
if (isScopeAuthentication && !data.new_user && isDataHasIndividualOnly && authId) {
|
|
588
|
+
if (settings.data.appConfig.mode === 'popup') {
|
|
589
|
+
settings.data.appConfig.onFlowCompleted({ auth_id: authId, bi: bi });
|
|
590
|
+
thunkApi.dispatch(handleOpen(false));
|
|
591
|
+
return [2, data];
|
|
592
|
+
}
|
|
593
|
+
if (redirectUrl) {
|
|
594
|
+
urlQueryStart = redirectUrl.includes('?') ? '&' : '?';
|
|
595
|
+
window.open("".concat(redirectUrl).concat(urlQueryStart, "authentication_id=").concat(authId, "&bi=").concat(bi), '_self');
|
|
596
|
+
return [2, data];
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
if (!(isScopeAuthentication && !data.new_user && authDataHasValue)) return [3, 4];
|
|
600
|
+
return [4, thunkApi.dispatch(retrieveAuthenticationListAsync({ individualId: data.individual_id })).unwrap()];
|
|
601
|
+
case 3:
|
|
602
|
+
_c = _g.sent(), brandList = _c.brandList, entityList = _c.entityList;
|
|
603
|
+
if (brandList.length && entityList.length) {
|
|
604
|
+
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep('CONNECT_EXPRESS_AUTHENTICATION_LIST_STEP')); });
|
|
605
|
+
return [2, data];
|
|
606
|
+
}
|
|
607
|
+
_g.label = 4;
|
|
608
|
+
case 4: return [4, thunkApi.dispatch(getLeadByIdAsync(data.lead.id)).unwrap()];
|
|
609
|
+
case 5:
|
|
610
|
+
_g.sent();
|
|
611
|
+
stepName = data.step_name;
|
|
612
|
+
needToCollectMoreInfo = stepName === 'collect_info';
|
|
613
|
+
creatingAccount = stepName === 'create_account';
|
|
614
|
+
(_f = params.onSuccess) === null || _f === void 0 ? void 0 : _f.call(params);
|
|
615
|
+
if (creatingAccount) {
|
|
616
|
+
sleep(100).then(function () { return thunkApi.dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_WAITING_FOR_CREATING_ACCOUNT_STEP')); });
|
|
617
|
+
}
|
|
618
|
+
if (needToCollectMoreInfo) {
|
|
619
|
+
sleep(100).then(function () { return thunkApi.dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_COLLECT_INDIVIDUAL_INFO_STEP')); });
|
|
620
|
+
}
|
|
621
|
+
return [2, data];
|
|
622
|
+
case 6: return [4, sleep(interval * 1000)];
|
|
623
|
+
case 7:
|
|
624
|
+
_g.sent();
|
|
625
|
+
_g.label = 8;
|
|
626
|
+
case 8:
|
|
627
|
+
count++;
|
|
628
|
+
return [3, 1];
|
|
629
|
+
case 9: throw new Error('paci_verification_failed');
|
|
630
|
+
}
|
|
631
|
+
});
|
|
632
|
+
}); });
|
|
395
633
|
export var createCivilIDAuthIdentityAsync = createAsyncThunk('connectExpress/createCivilIDAuthIdentityAsync', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
396
634
|
var _a, settings, connectExpress, civilId, countryCode, requestBody, data;
|
|
397
635
|
var _b, _c, _d;
|
|
@@ -430,6 +668,9 @@ export var createNIDAuthIdentityAsync = createAsyncThunk('connectExpress/createN
|
|
|
430
668
|
dob = params.dob, nid = params.nid;
|
|
431
669
|
nidType = nid.startsWith('1') ? IDENTIFICATION_TYPE.NID : IDENTIFICATION_TYPE.IQAMA;
|
|
432
670
|
countryCode = settings.data.businessCountry.iso2;
|
|
671
|
+
if (isOtherThanKWOrSA(countryCode)) {
|
|
672
|
+
nidType = IDENTIFICATION_TYPE.NID;
|
|
673
|
+
}
|
|
433
674
|
requestBody = {
|
|
434
675
|
id: (_b = connectExpress.data.responseData) === null || _b === void 0 ? void 0 : _b.authData.lead_id,
|
|
435
676
|
identification: {
|
|
@@ -445,7 +686,17 @@ export var createNIDAuthIdentityAsync = createAsyncThunk('connectExpress/createN
|
|
|
445
686
|
return [4, API.leadService.updateLead(requestBody)];
|
|
446
687
|
case 1:
|
|
447
688
|
data = _e.sent();
|
|
448
|
-
|
|
689
|
+
if (!((data === null || data === void 0 ? void 0 : data.verify_token) !== 'null')) return [3, 2];
|
|
690
|
+
thunkApi.dispatch(handleNextScreenStep('CONNECT_EXPRESS_OTP_IDENTITY_STEP'));
|
|
691
|
+
return [3, 4];
|
|
692
|
+
case 2:
|
|
693
|
+
if (!isOtherThanKWOrSA(countryCode)) return [3, 4];
|
|
694
|
+
return [4, thunkApi.dispatch(getLeadByIdAsync(data.id)).unwrap()];
|
|
695
|
+
case 3:
|
|
696
|
+
_e.sent();
|
|
697
|
+
thunkApi.dispatch(handleNextScreenStep('CONNECT_EXPRESS_COLLECT_INDIVIDUAL_INFO_STEP'));
|
|
698
|
+
_e.label = 4;
|
|
699
|
+
case 4:
|
|
449
700
|
(_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, requestBody.identification);
|
|
450
701
|
return [2, { response: { verify_token: data.verify_token }, formData: params }];
|
|
451
702
|
}
|
|
@@ -461,6 +712,9 @@ export var resendNIDAuthIdentityOTP = createAsyncThunk('connectExpress/resendNID
|
|
|
461
712
|
dob = params.dob, nid = params.nid;
|
|
462
713
|
nidType = nid.startsWith('1') ? IDENTIFICATION_TYPE.NID : IDENTIFICATION_TYPE.IQAMA;
|
|
463
714
|
countryCode = settings.data.businessCountry.iso2;
|
|
715
|
+
if (isOtherThanKWOrSA(countryCode)) {
|
|
716
|
+
nidType = IDENTIFICATION_TYPE.NID;
|
|
717
|
+
}
|
|
464
718
|
requestBody = {
|
|
465
719
|
id: (_b = connectExpress.data.responseData) === null || _b === void 0 ? void 0 : _b.authData.lead_id,
|
|
466
720
|
identification: {
|
|
@@ -519,35 +773,35 @@ export var verifyNIDOtpLeadIdentityAsync = createAsyncThunk('connectExpress/veri
|
|
|
519
773
|
}
|
|
520
774
|
});
|
|
521
775
|
}); });
|
|
522
|
-
export var
|
|
523
|
-
var
|
|
524
|
-
var
|
|
525
|
-
return __generator(this, function (
|
|
526
|
-
switch (
|
|
776
|
+
export var verifyPaciLeadIdentityAsync = createAsyncThunk('connectExpress/verifyPaciOtpLeadIdentityAsync', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
777
|
+
var connectExpress, authData, expiry, interval, maxCalls, count, data, isSuccess, needToCollectMoreInfo, creatingAccount;
|
|
778
|
+
var _a, _b, _c;
|
|
779
|
+
return __generator(this, function (_d) {
|
|
780
|
+
switch (_d.label) {
|
|
527
781
|
case 0:
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
lead_id: leadId,
|
|
536
|
-
data: params.otp,
|
|
537
|
-
service_name: 'ABSHER',
|
|
538
|
-
step_name: '',
|
|
539
|
-
sign_in: false,
|
|
540
|
-
encryption_contract: ['data']
|
|
541
|
-
};
|
|
542
|
-
return [4, API.authService.verifyExpressLeadIdentity(payload)];
|
|
782
|
+
connectExpress = thunkApi.getState().connectExpress;
|
|
783
|
+
authData = (connectExpress.data.responseData || {}).authData;
|
|
784
|
+
expiry = (authData === null || authData === void 0 ? void 0 : authData.expiry) || 120;
|
|
785
|
+
interval = 3;
|
|
786
|
+
maxCalls = Math.floor(expiry / interval);
|
|
787
|
+
count = 1;
|
|
788
|
+
_d.label = 1;
|
|
543
789
|
case 1:
|
|
544
|
-
|
|
545
|
-
|
|
790
|
+
if (!(count <= maxCalls)) return [3, 7];
|
|
791
|
+
if (thunkApi.signal.aborted) {
|
|
792
|
+
return [3, 7];
|
|
793
|
+
}
|
|
794
|
+
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 })];
|
|
546
795
|
case 2:
|
|
547
|
-
|
|
548
|
-
(
|
|
796
|
+
data = _d.sent();
|
|
797
|
+
isSuccess = ((_b = (_a = data.auth) === null || _a === void 0 ? void 0 : _a.status) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === 'success';
|
|
798
|
+
if (!isSuccess) return [3, 4];
|
|
799
|
+
return [4, thunkApi.dispatch(getLeadByIdAsync(data.lead.id)).unwrap()];
|
|
800
|
+
case 3:
|
|
801
|
+
_d.sent();
|
|
549
802
|
needToCollectMoreInfo = data.step_name === 'collect_info';
|
|
550
803
|
creatingAccount = data.step_name === 'create_account';
|
|
804
|
+
(_c = params.onSuccess) === null || _c === void 0 ? void 0 : _c.call(params);
|
|
551
805
|
if (creatingAccount) {
|
|
552
806
|
sleep(100).then(function () { return thunkApi.dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_WAITING_FOR_CREATING_ACCOUNT_STEP')); });
|
|
553
807
|
}
|
|
@@ -555,23 +809,34 @@ export var verifyPaciOtpLeadIdentityAsync = createAsyncThunk('connectExpress/ver
|
|
|
555
809
|
sleep(100).then(function () { return thunkApi.dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_COLLECT_INDIVIDUAL_INFO_STEP')); });
|
|
556
810
|
}
|
|
557
811
|
return [2, data];
|
|
812
|
+
case 4: return [4, sleep(interval * 1000)];
|
|
813
|
+
case 5:
|
|
814
|
+
_d.sent();
|
|
815
|
+
_d.label = 6;
|
|
816
|
+
case 6:
|
|
817
|
+
count++;
|
|
818
|
+
return [3, 1];
|
|
819
|
+
case 7: throw new Error('paci_verification_failed');
|
|
558
820
|
}
|
|
559
821
|
});
|
|
560
822
|
}); });
|
|
561
|
-
export var checkEmailAvailabilityAsync = createAsyncThunk('connectExpress/CheckEmailAvailabilityAsync', function (_a) {
|
|
823
|
+
export var checkEmailAvailabilityAsync = createAsyncThunk('connectExpress/CheckEmailAvailabilityAsync', function (_a, thunkApi) {
|
|
562
824
|
var email = _a.email, cancelToken = _a.cancelToken, onSuccess = _a.onSuccess;
|
|
563
825
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
564
|
-
var requestBody, data;
|
|
565
|
-
|
|
566
|
-
|
|
826
|
+
var connectExpress, requestBody, data;
|
|
827
|
+
var _b, _c;
|
|
828
|
+
return __generator(this, function (_d) {
|
|
829
|
+
switch (_d.label) {
|
|
567
830
|
case 0:
|
|
831
|
+
connectExpress = thunkApi.getState().connectExpress;
|
|
568
832
|
requestBody = {
|
|
569
833
|
email: email,
|
|
834
|
+
country: (_c = (_b = connectExpress.data.responseData) === null || _b === void 0 ? void 0 : _b.leadData) === null || _c === void 0 ? void 0 : _c.country_code,
|
|
570
835
|
encryption_contract: ['email']
|
|
571
836
|
};
|
|
572
837
|
return [4, API.availabilityServices.checkEmail(requestBody, { cancelToken: cancelToken })];
|
|
573
838
|
case 1:
|
|
574
|
-
data = (
|
|
839
|
+
data = (_d.sent()).data;
|
|
575
840
|
onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess();
|
|
576
841
|
if (!data.errors)
|
|
577
842
|
return [2, { response: data, formData: email }];
|
|
@@ -592,7 +857,7 @@ export var checkBrandNameAvailabilityAsync = createAsyncThunk('connectExpress/ch
|
|
|
592
857
|
requestBody = {
|
|
593
858
|
profile_name: name,
|
|
594
859
|
country_code: (_b = settings.data.businessCountry) === null || _b === void 0 ? void 0 : _b.iso2,
|
|
595
|
-
encryption_contract: [
|
|
860
|
+
encryption_contract: []
|
|
596
861
|
};
|
|
597
862
|
return [4, API.availabilityServices.checkBrand(requestBody, { cancelToken: cancelToken })];
|
|
598
863
|
case 1:
|
|
@@ -606,39 +871,82 @@ export var checkBrandNameAvailabilityAsync = createAsyncThunk('connectExpress/ch
|
|
|
606
871
|
});
|
|
607
872
|
});
|
|
608
873
|
export var createAccountAsync = createAsyncThunk('connectExpress/createAccountAsync', function (_, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
609
|
-
var _a, connectExpress, settings, _b, postURL,
|
|
610
|
-
var
|
|
611
|
-
return __generator(this, function (
|
|
612
|
-
switch (
|
|
874
|
+
var _a, connectExpress, settings, _b, responseData, showBoard, _c, postURL, scope, redirectUrl, mode, platforms, payment_provider, authId, bi, body, data, leadData, board_id, board_info_id, _d, boardInfo, boardData, urlQueryStart;
|
|
875
|
+
var _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
|
876
|
+
return __generator(this, function (_u) {
|
|
877
|
+
switch (_u.label) {
|
|
613
878
|
case 0:
|
|
614
879
|
_a = thunkApi.getState(), connectExpress = _a.connectExpress, settings = _a.settings;
|
|
615
|
-
_b = connectExpress.data,
|
|
880
|
+
_b = connectExpress.data, responseData = _b.responseData, showBoard = _b.showBoard;
|
|
881
|
+
_c = settings.data.appConfig, postURL = _c.postURL, scope = _c.scope, redirectUrl = _c.redirectUrl, mode = _c.mode;
|
|
882
|
+
platforms = (_f = (_e = responseData === null || responseData === void 0 ? void 0 : responseData.leadData) === null || _e === void 0 ? void 0 : _e.platforms) !== null && _f !== void 0 ? _f : settings.data.appConfig.platforms;
|
|
883
|
+
payment_provider = (_h = (_g = responseData === null || responseData === void 0 ? void 0 : responseData.leadData) === null || _g === void 0 ? void 0 : _g.payment_provider) !== null && _h !== void 0 ? _h : settings.data.appConfig.paymentProvider;
|
|
884
|
+
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;
|
|
885
|
+
bi = settings.data.deviceInfo.browser.browser_id;
|
|
616
886
|
body = {
|
|
617
887
|
lead_id: responseData === null || responseData === void 0 ? void 0 : responseData.leadData.id,
|
|
618
|
-
post_url: postURL
|
|
888
|
+
post_url: scope === SCOPE_AUTH ? '' : postURL || '',
|
|
889
|
+
platforms: platforms,
|
|
890
|
+
payment_provider: payment_provider
|
|
619
891
|
};
|
|
620
892
|
return [4, API.accountService.expressCreateAccount(body)];
|
|
621
893
|
case 1:
|
|
622
|
-
data =
|
|
623
|
-
(
|
|
624
|
-
(
|
|
625
|
-
(
|
|
626
|
-
if (!showBoard) return [3,
|
|
894
|
+
data = _u.sent();
|
|
895
|
+
(_m = (_l = settings.data.appConfig).onCreated) === null || _m === void 0 ? void 0 : _m.call(_l, data);
|
|
896
|
+
(_p = (_o = settings.data.appConfig).onFlowCompleted) === null || _p === void 0 ? void 0 : _p.call(_o, data);
|
|
897
|
+
(_r = (_q = settings.data.appConfig).onStepCompleted) === null || _r === void 0 ? void 0 : _r.call(_q, settings.data.activeScreen.name, data);
|
|
898
|
+
if (!showBoard) return [3, 4];
|
|
899
|
+
return [4, thunkApi.dispatch(getLeadByIdAsync(data.lead.id)).unwrap()];
|
|
900
|
+
case 2:
|
|
901
|
+
leadData = (_u.sent()).data;
|
|
902
|
+
board_id = (_s = data.board_id) !== null && _s !== void 0 ? _s : leadData.board_id;
|
|
903
|
+
board_info_id = (_t = data.board_info_id) !== null && _t !== void 0 ? _t : leadData.board_info_id;
|
|
627
904
|
return [4, Promise.all([
|
|
628
|
-
API.boardService.retrieveBoardInfo({ id:
|
|
629
|
-
API.boardService.retrieveBoardDetails(
|
|
630
|
-
thunkApi.dispatch(getLeadByIdAsync(data.lead.id)).unwrap()
|
|
905
|
+
API.boardService.retrieveBoardInfo({ id: board_id, infoId: board_info_id }),
|
|
906
|
+
API.boardService.retrieveBoardDetails(board_id)
|
|
631
907
|
])];
|
|
632
|
-
case
|
|
633
|
-
|
|
908
|
+
case 3:
|
|
909
|
+
_d = _u.sent(), boardInfo = _d[0], boardData = _d[1];
|
|
634
910
|
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep()); });
|
|
635
911
|
return [2, { boardInfo: boardInfo, boardData: boardData, account: data }];
|
|
636
|
-
case
|
|
912
|
+
case 4:
|
|
913
|
+
if (redirectUrl && mode === 'page') {
|
|
914
|
+
urlQueryStart = redirectUrl.includes('?') ? '&' : '?';
|
|
915
|
+
window.open("".concat(redirectUrl).concat(urlQueryStart, "authentication_id=").concat(authId, "&bi=").concat(bi), '_self');
|
|
916
|
+
return [2, { account: data }];
|
|
917
|
+
}
|
|
637
918
|
thunkApi.dispatch(handleOpen(false));
|
|
638
919
|
return [2];
|
|
639
920
|
}
|
|
640
921
|
});
|
|
641
922
|
}); });
|
|
923
|
+
export var createEntity = createAsyncThunk('connectExpress/createEntity', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
924
|
+
var settings, brandInfo, legalName, licenseNumber, body, data;
|
|
925
|
+
var _a;
|
|
926
|
+
return __generator(this, function (_b) {
|
|
927
|
+
switch (_b.label) {
|
|
928
|
+
case 0:
|
|
929
|
+
settings = thunkApi.getState().settings;
|
|
930
|
+
brandInfo = params.brandInfo, legalName = params.legalName, licenseNumber = params.licenseNumber;
|
|
931
|
+
body = {
|
|
932
|
+
business_id: (brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.business_id) || '',
|
|
933
|
+
entity: {
|
|
934
|
+
legal_name: {
|
|
935
|
+
en: legalName || '',
|
|
936
|
+
ar: legalName || ''
|
|
937
|
+
},
|
|
938
|
+
license_number: licenseNumber || '',
|
|
939
|
+
country: (_a = settings.data.businessCountry) === null || _a === void 0 ? void 0 : _a.iso2,
|
|
940
|
+
is_licensed: undefined
|
|
941
|
+
}
|
|
942
|
+
};
|
|
943
|
+
return [4, API.entityService.createEntity(body)];
|
|
944
|
+
case 1:
|
|
945
|
+
data = _b.sent();
|
|
946
|
+
return [2, { data: data, formData: params }];
|
|
947
|
+
}
|
|
948
|
+
});
|
|
949
|
+
}); });
|
|
642
950
|
export var updateLeadIndividualAsync = createAsyncThunk('connectExpress/updateLeadIndividualAsync', function (_a, thunkApi) {
|
|
643
951
|
var formData = _a.formData, originalFormData = _a.originalFormData;
|
|
644
952
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -682,34 +990,33 @@ export var updateLeadIndividualAsync = createAsyncThunk('connectExpress/updateLe
|
|
|
682
990
|
export var updateLeadBusinessDataAsync = createAsyncThunk('updateLeadBusinessDataAsync ', function (_a, thunkApi) {
|
|
683
991
|
var formData = _a.formData, originalFormData = _a.originalFormData;
|
|
684
992
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
685
|
-
var _b, settings, connectExpress, selectedLicense, brandName, licenseNumber, termAndConditionChecked,
|
|
993
|
+
var _b, settings, connectExpress, selectedLicense, brandName, licenseNumber, termAndConditionChecked, isKWCountry, isFL, _c, responseData, isLeadIdPassed, id, brandNameBody, payload, data;
|
|
686
994
|
var _d, _e;
|
|
687
995
|
return __generator(this, function (_f) {
|
|
688
996
|
switch (_f.label) {
|
|
689
997
|
case 0:
|
|
690
998
|
_b = thunkApi.getState(), settings = _b.settings, connectExpress = _b.connectExpress;
|
|
691
999
|
selectedLicense = formData.selectedLicense, brandName = formData.brandName, licenseNumber = formData.licenseNumber, termAndConditionChecked = formData.termAndConditionChecked;
|
|
692
|
-
|
|
1000
|
+
isKWCountry = isKW(settings.data.businessCountry.iso2);
|
|
693
1001
|
isFL = (selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.type) === BusinessType.FL;
|
|
694
1002
|
_c = connectExpress.data, responseData = _c.responseData, isLeadIdPassed = _c.isLeadIdPassed;
|
|
695
1003
|
id = ((responseData === null || responseData === void 0 ? void 0 : responseData.leadData) || {}).id;
|
|
696
1004
|
brandNameBody = {
|
|
697
1005
|
name: {
|
|
698
1006
|
en: brandName,
|
|
699
|
-
ar: brandName
|
|
700
|
-
zh: brandName
|
|
1007
|
+
ar: brandName
|
|
701
1008
|
}
|
|
702
1009
|
};
|
|
703
1010
|
payload = {
|
|
704
1011
|
id: id || '',
|
|
705
1012
|
brand: brandNameBody,
|
|
706
|
-
license_number:
|
|
1013
|
+
license_number: isKWCountry && isFL ? '' : licenseNumber,
|
|
707
1014
|
license_type: (selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.type) ? (isFL ? LicenseType.FL : LicenseType.CR) : undefined,
|
|
708
1015
|
business_type: selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.type,
|
|
709
1016
|
is_acknowledged: true,
|
|
710
1017
|
terms_conditions_accepted: !isLeadIdPassed ? termAndConditionChecked : undefined,
|
|
711
1018
|
step_name: CONNECT_EXPRESS_STEP_NAMES.UPDATE_LEAD_BRAND_BUSINESS,
|
|
712
|
-
encryption_contract: [
|
|
1019
|
+
encryption_contract: []
|
|
713
1020
|
};
|
|
714
1021
|
return [4, API.leadService.updateLeadExpress(payload)];
|
|
715
1022
|
case 1:
|
|
@@ -721,6 +1028,62 @@ export var updateLeadBusinessDataAsync = createAsyncThunk('updateLeadBusinessDat
|
|
|
721
1028
|
});
|
|
722
1029
|
});
|
|
723
1030
|
});
|
|
1031
|
+
export var confirmInfo = createAsyncThunk('connectExpress/confirmInfo', function (_a, thunkApi) {
|
|
1032
|
+
var brandInfo = _a.brandInfo, entityInfo = _a.entityInfo, merchantInfo = _a.merchantInfo;
|
|
1033
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
1034
|
+
var _b, connectExpress, settings, responseData, _c, postURL, redirectUrl, bi, authId, body, data, urlQueryStart;
|
|
1035
|
+
var _d, _e, _f, _g;
|
|
1036
|
+
return __generator(this, function (_h) {
|
|
1037
|
+
switch (_h.label) {
|
|
1038
|
+
case 0:
|
|
1039
|
+
_b = thunkApi.getState(), connectExpress = _b.connectExpress, settings = _b.settings;
|
|
1040
|
+
responseData = connectExpress.data.responseData;
|
|
1041
|
+
_c = settings.data.appConfig, postURL = _c.postURL, redirectUrl = _c.redirectUrl;
|
|
1042
|
+
bi = settings.data.deviceInfo.browser.browser_id;
|
|
1043
|
+
authId = (_e = (_d = responseData === null || responseData === void 0 ? void 0 : responseData.authData) === null || _d === void 0 ? void 0 : _d.auth) === null || _e === void 0 ? void 0 : _e.id;
|
|
1044
|
+
body = {
|
|
1045
|
+
post_url: postURL || '',
|
|
1046
|
+
authentication_id: authId,
|
|
1047
|
+
bi: bi,
|
|
1048
|
+
brand_id: (brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.id) || '',
|
|
1049
|
+
merchant_id: (merchantInfo === null || merchantInfo === void 0 ? void 0 : merchantInfo.id) || '',
|
|
1050
|
+
entity_id: (entityInfo === null || entityInfo === void 0 ? void 0 : entityInfo.id) || ''
|
|
1051
|
+
};
|
|
1052
|
+
return [4, API.operatorService.updateOperator(body)];
|
|
1053
|
+
case 1:
|
|
1054
|
+
data = _h.sent();
|
|
1055
|
+
(_g = (_f = settings.data.appConfig).onStepCompleted) === null || _g === void 0 ? void 0 : _g.call(_f, settings.data.activeScreen.name, data);
|
|
1056
|
+
if (authId) {
|
|
1057
|
+
if (settings.data.appConfig.mode === 'popup') {
|
|
1058
|
+
settings.data.appConfig.onFlowCompleted({ auth_id: authId, bi: bi });
|
|
1059
|
+
thunkApi.dispatch(handleOpen(false));
|
|
1060
|
+
return [2];
|
|
1061
|
+
}
|
|
1062
|
+
if (redirectUrl) {
|
|
1063
|
+
urlQueryStart = redirectUrl.includes('?') ? '&' : '?';
|
|
1064
|
+
window.open("".concat(redirectUrl).concat(urlQueryStart, "authentication_id=").concat(authId, "&bi=").concat(bi), '_self');
|
|
1065
|
+
}
|
|
1066
|
+
}
|
|
1067
|
+
return [2];
|
|
1068
|
+
}
|
|
1069
|
+
});
|
|
1070
|
+
});
|
|
1071
|
+
});
|
|
1072
|
+
export var onCloseCompleteAsync = createAsyncThunk('connectExpress/onCloseCompleteAsync', function (_, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1073
|
+
var connectExpress, _a, merchant, brand, entity;
|
|
1074
|
+
var _b;
|
|
1075
|
+
return __generator(this, function (_c) {
|
|
1076
|
+
switch (_c.label) {
|
|
1077
|
+
case 0:
|
|
1078
|
+
connectExpress = thunkApi.getState().connectExpress;
|
|
1079
|
+
_a = ((_b = connectExpress.data.responseData) === null || _b === void 0 ? void 0 : _b.boardData) || {}, merchant = _a.merchant, brand = _a.brand, entity = _a.entity;
|
|
1080
|
+
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 }))];
|
|
1081
|
+
case 1:
|
|
1082
|
+
_c.sent();
|
|
1083
|
+
return [2];
|
|
1084
|
+
}
|
|
1085
|
+
});
|
|
1086
|
+
}); });
|
|
724
1087
|
var initialState = {
|
|
725
1088
|
error: null,
|
|
726
1089
|
loading: false,
|
|
@@ -728,7 +1091,7 @@ var initialState = {
|
|
|
728
1091
|
data: {
|
|
729
1092
|
showBoard: true,
|
|
730
1093
|
isLeadIdPassed: false,
|
|
731
|
-
|
|
1094
|
+
isStartFromBusinessCountry: false,
|
|
732
1095
|
flowName: FlowsTypes.CONNECT_EXPRESS,
|
|
733
1096
|
mobileData: {
|
|
734
1097
|
countryCode: defaultCountry,
|
|
@@ -757,6 +1120,13 @@ var initialState = {
|
|
|
757
1120
|
brandName: '',
|
|
758
1121
|
licenseNumber: '',
|
|
759
1122
|
termAndConditionChecked: false
|
|
1123
|
+
},
|
|
1124
|
+
authenticationData: {
|
|
1125
|
+
brandInfo: undefined,
|
|
1126
|
+
entityInfo: undefined
|
|
1127
|
+
},
|
|
1128
|
+
authMerchantData: {
|
|
1129
|
+
merchantInfo: undefined
|
|
760
1130
|
}
|
|
761
1131
|
}
|
|
762
1132
|
};
|
|
@@ -770,6 +1140,9 @@ export var connectSlice = createSlice({
|
|
|
770
1140
|
setShowBoard: function (state, action) {
|
|
771
1141
|
state.data.showBoard = action.payload;
|
|
772
1142
|
},
|
|
1143
|
+
storeIsStartFromBusinessCountry: function (state, action) {
|
|
1144
|
+
state.data.isStartFromBusinessCountry = action.payload;
|
|
1145
|
+
},
|
|
773
1146
|
setIsLeadIdPassed: function (state, action) {
|
|
774
1147
|
state.data.isLeadIdPassed = action.payload;
|
|
775
1148
|
},
|
|
@@ -788,17 +1161,22 @@ export var connectSlice = createSlice({
|
|
|
788
1161
|
resetNIDScreen: function (state) {
|
|
789
1162
|
state.data.nidData = __assign(__assign({}, state.data.nidData), initialState.data.nidData);
|
|
790
1163
|
},
|
|
1164
|
+
setDefaultCountryCode: function (state, action) {
|
|
1165
|
+
state.data.mobileData.countryCode = action.payload;
|
|
1166
|
+
state.data.individualData.countryCode = action.payload;
|
|
1167
|
+
},
|
|
791
1168
|
resetCivilScreen: function (state) {
|
|
792
1169
|
state.data.civilIdData = __assign(__assign({}, state.data.civilIdData), initialState.data.civilIdData);
|
|
793
1170
|
},
|
|
1171
|
+
resetAuthenticationScreen: function (state) {
|
|
1172
|
+
state.data.authenticationData = __assign(__assign({}, state.data.authenticationData), initialState.data.authenticationData);
|
|
1173
|
+
},
|
|
794
1174
|
resetOTPValue: function (state) {
|
|
795
1175
|
state.data.otpData.otp = '';
|
|
796
1176
|
},
|
|
797
|
-
setPostUrl: function (state, action) {
|
|
798
|
-
state.data.postURL = action.payload;
|
|
799
|
-
},
|
|
800
1177
|
resetStore: function (state) {
|
|
801
|
-
|
|
1178
|
+
var _a;
|
|
1179
|
+
state.data = __assign(__assign({}, state.data), { responseData: { leadData: (_a = state.data.responseData) === null || _a === void 0 ? void 0 : _a.leadData } });
|
|
802
1180
|
},
|
|
803
1181
|
resetIndividualScreen: function (state) {
|
|
804
1182
|
state.data.individualData = initialState.data.individualData;
|
|
@@ -940,7 +1318,7 @@ export var connectSlice = createSlice({
|
|
|
940
1318
|
var _a;
|
|
941
1319
|
state.loading = false;
|
|
942
1320
|
state.data.civilIdData = action.payload.formData;
|
|
943
|
-
state.data.otpData.authFor = AuthForType.
|
|
1321
|
+
state.data.otpData.authFor = AuthForType.NATIONAL_ID_MISSED;
|
|
944
1322
|
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) });
|
|
945
1323
|
})
|
|
946
1324
|
.addCase(createCivilIDAuthIdentityAsync.rejected, function (state, action) {
|
|
@@ -955,7 +1333,7 @@ export var connectSlice = createSlice({
|
|
|
955
1333
|
var _a;
|
|
956
1334
|
state.loading = false;
|
|
957
1335
|
state.data.nidData = action.payload.formData;
|
|
958
|
-
state.data.otpData.authFor = AuthForType.
|
|
1336
|
+
state.data.otpData.authFor = AuthForType.NATIONAL_ID_MISSED;
|
|
959
1337
|
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) });
|
|
960
1338
|
})
|
|
961
1339
|
.addCase(createNIDAuthIdentityAsync.rejected, function (state, action) {
|
|
@@ -968,7 +1346,7 @@ export var connectSlice = createSlice({
|
|
|
968
1346
|
.addCase(resendNIDAuthIdentityOTP.fulfilled, function (state, action) {
|
|
969
1347
|
var _a;
|
|
970
1348
|
state.data.nidData = action.payload.formData;
|
|
971
|
-
state.data.otpData.authFor = AuthForType.
|
|
1349
|
+
state.data.otpData.authFor = AuthForType.NATIONAL_ID_MISSED;
|
|
972
1350
|
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) });
|
|
973
1351
|
})
|
|
974
1352
|
.addCase(resendNIDAuthIdentityOTP.rejected, function (state, action) {
|
|
@@ -1000,31 +1378,52 @@ export var connectSlice = createSlice({
|
|
|
1000
1378
|
state.loading = false;
|
|
1001
1379
|
state.error = action.error.message;
|
|
1002
1380
|
})
|
|
1003
|
-
.addCase(
|
|
1381
|
+
.addCase(verifyPACIAsync.pending, function (state) {
|
|
1004
1382
|
state.loading = true;
|
|
1005
1383
|
state.error = null;
|
|
1006
1384
|
})
|
|
1007
|
-
.addCase(
|
|
1385
|
+
.addCase(verifyPACIAsync.fulfilled, function (state, action) {
|
|
1008
1386
|
var _a;
|
|
1009
1387
|
state.loading = false;
|
|
1010
1388
|
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) });
|
|
1389
|
+
})
|
|
1390
|
+
.addCase(verifyPACIAsync.rejected, function (state, action) {
|
|
1391
|
+
state.loading = false;
|
|
1392
|
+
var error = action.error.message;
|
|
1393
|
+
if (error !== 'Aborted') {
|
|
1394
|
+
state.error = error;
|
|
1395
|
+
}
|
|
1396
|
+
})
|
|
1397
|
+
.addCase(verifyNIDOtpLeadIdentityAsync.pending, function (state) {
|
|
1398
|
+
state.loading = true;
|
|
1399
|
+
state.error = null;
|
|
1400
|
+
})
|
|
1401
|
+
.addCase(verifyNIDOtpLeadIdentityAsync.fulfilled, function (state, action) {
|
|
1402
|
+
var _a, _b, _c;
|
|
1403
|
+
state.loading = false;
|
|
1404
|
+
var auth = (((_a = state.data.responseData) === null || _a === void 0 ? void 0 : _a.authData) || {}).auth;
|
|
1405
|
+
state.data.responseData = __assign(__assign({}, state.data.responseData), { authData: __assign(__assign(__assign({}, (_b = state.data.responseData) === null || _b === void 0 ? void 0 : _b.authData), action.payload), { auth: __assign(__assign({}, (_c = action.payload) === null || _c === void 0 ? void 0 : _c.auth), { id: auth === null || auth === void 0 ? void 0 : auth.id }) }) });
|
|
1011
1406
|
})
|
|
1012
1407
|
.addCase(verifyNIDOtpLeadIdentityAsync.rejected, function (state, action) {
|
|
1013
1408
|
state.loading = false;
|
|
1014
1409
|
state.error = action.error.message;
|
|
1015
1410
|
})
|
|
1016
|
-
.addCase(
|
|
1411
|
+
.addCase(verifyPaciLeadIdentityAsync.pending, function (state) {
|
|
1017
1412
|
state.loading = true;
|
|
1018
1413
|
state.error = null;
|
|
1019
1414
|
})
|
|
1020
|
-
.addCase(
|
|
1021
|
-
var _a;
|
|
1415
|
+
.addCase(verifyPaciLeadIdentityAsync.fulfilled, function (state, action) {
|
|
1416
|
+
var _a, _b, _c;
|
|
1022
1417
|
state.loading = false;
|
|
1023
|
-
|
|
1418
|
+
var auth = (((_a = state.data.responseData) === null || _a === void 0 ? void 0 : _a.authData) || {}).auth;
|
|
1419
|
+
state.data.responseData = __assign(__assign({}, state.data.responseData), { authData: __assign(__assign(__assign({}, (_b = state.data.responseData) === null || _b === void 0 ? void 0 : _b.authData), action.payload), { auth: __assign(__assign({}, (_c = action.payload) === null || _c === void 0 ? void 0 : _c.auth), { id: auth === null || auth === void 0 ? void 0 : auth.id }) }) });
|
|
1024
1420
|
})
|
|
1025
|
-
.addCase(
|
|
1421
|
+
.addCase(verifyPaciLeadIdentityAsync.rejected, function (state, action) {
|
|
1026
1422
|
state.loading = false;
|
|
1027
|
-
|
|
1423
|
+
var error = action.error.message;
|
|
1424
|
+
if (error !== 'Aborted') {
|
|
1425
|
+
state.error = error;
|
|
1426
|
+
}
|
|
1028
1427
|
})
|
|
1029
1428
|
.addCase(retrieveEntityListAsync.pending, function (state) {
|
|
1030
1429
|
state.loading = true;
|
|
@@ -1073,6 +1472,23 @@ export var connectSlice = createSlice({
|
|
|
1073
1472
|
.addCase(retrieveEntityListAsync.rejected, function (state, action) {
|
|
1074
1473
|
state.loading = false;
|
|
1075
1474
|
state.error = action.error.message;
|
|
1475
|
+
})
|
|
1476
|
+
.addCase(retrieveAuthenticationListAsync.fulfilled, function (state, action) {
|
|
1477
|
+
state.error = null;
|
|
1478
|
+
state.loading = false;
|
|
1479
|
+
var _a = action.payload, brandList = _a.brandList, entityList = _a.entityList;
|
|
1480
|
+
var eList = __spreadArray(__spreadArray([], entityList, true), [ADD_NEW_ENTITY], false);
|
|
1481
|
+
if (brandList === null || brandList === void 0 ? void 0 : brandList.length)
|
|
1482
|
+
state.data.authenticationData.brandInfo = brandList[0];
|
|
1483
|
+
state.data.responseData = __assign(__assign({}, state.data.responseData), { authenticationData: { brandList: brandList, entityList: eList } });
|
|
1484
|
+
})
|
|
1485
|
+
.addCase(retrieveAuthenticationListAsync.pending, function (state) {
|
|
1486
|
+
state.loading = true;
|
|
1487
|
+
state.error = null;
|
|
1488
|
+
})
|
|
1489
|
+
.addCase(retrieveAuthenticationListAsync.rejected, function (state, action) {
|
|
1490
|
+
state.loading = false;
|
|
1491
|
+
state.error = action.error.message;
|
|
1076
1492
|
})
|
|
1077
1493
|
.addCase(checkEmailAvailabilityAsync.fulfilled, function (state, action) {
|
|
1078
1494
|
var _a;
|
|
@@ -1103,10 +1519,12 @@ export var connectSlice = createSlice({
|
|
|
1103
1519
|
state.error = action.error.message;
|
|
1104
1520
|
})
|
|
1105
1521
|
.addCase(updateLeadIndividualAsync.fulfilled, function (state, action) {
|
|
1522
|
+
var _a, _b;
|
|
1106
1523
|
state.loading = false;
|
|
1107
1524
|
state.error = null;
|
|
1525
|
+
var licenseList = [OTHER_CR_LICENSE, OTHER_FL_LICENSE];
|
|
1108
1526
|
state.data.individualData = action.payload.formData;
|
|
1109
|
-
state.data.responseData = __assign(__assign({}, state.data.responseData), { individualData: action.payload.response });
|
|
1527
|
+
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 }));
|
|
1110
1528
|
})
|
|
1111
1529
|
.addCase(updateLeadIndividualAsync.pending, function (state) {
|
|
1112
1530
|
state.loading = true;
|
|
@@ -1141,9 +1559,88 @@ export var connectSlice = createSlice({
|
|
|
1141
1559
|
.addCase(createAccountAsync.rejected, function (state, action) {
|
|
1142
1560
|
state.loading = false;
|
|
1143
1561
|
state.error = action.error.message;
|
|
1562
|
+
})
|
|
1563
|
+
.addCase(getMerchantListAsync.pending, function (state) {
|
|
1564
|
+
state.loading = true;
|
|
1565
|
+
state.error = null;
|
|
1566
|
+
})
|
|
1567
|
+
.addCase(getMerchantListAsync.fulfilled, function (state, action) {
|
|
1568
|
+
state.loading = false;
|
|
1569
|
+
state.error = null;
|
|
1570
|
+
var data = state.data.responseData;
|
|
1571
|
+
var _a = action.payload, list = _a.list, brandInfo = _a.brandInfo, entityInfo = _a.entityInfo;
|
|
1572
|
+
state.data.authenticationData.brandInfo = brandInfo;
|
|
1573
|
+
state.data.authenticationData.entityInfo = entityInfo;
|
|
1574
|
+
if (list === null || list === void 0 ? void 0 : list.length) {
|
|
1575
|
+
state.data.authMerchantData.merchantInfo = list[0];
|
|
1576
|
+
}
|
|
1577
|
+
state.data.responseData = __assign(__assign({}, data), { authMerchantData: __assign(__assign({}, data === null || data === void 0 ? void 0 : data.authMerchantData), { merchantList: list }) });
|
|
1578
|
+
})
|
|
1579
|
+
.addCase(getMerchantListAsync.rejected, function (state, action) {
|
|
1580
|
+
state.loading = false;
|
|
1581
|
+
state.error = action.error.message;
|
|
1582
|
+
})
|
|
1583
|
+
.addCase(confirmInfo.pending, function (state) {
|
|
1584
|
+
state.loading = true;
|
|
1585
|
+
state.error = null;
|
|
1586
|
+
})
|
|
1587
|
+
.addCase(confirmInfo.fulfilled, function (state) {
|
|
1588
|
+
state.loading = false;
|
|
1589
|
+
state.error = null;
|
|
1590
|
+
state.data.responseData = __assign({}, state.data.responseData);
|
|
1591
|
+
})
|
|
1592
|
+
.addCase(confirmInfo.rejected, function (state, action) {
|
|
1593
|
+
state.loading = false;
|
|
1594
|
+
state.error = action.error.message;
|
|
1595
|
+
})
|
|
1596
|
+
.addCase(onCloseCompleteAsync.pending, function (state) {
|
|
1597
|
+
state.loading = true;
|
|
1598
|
+
state.error = null;
|
|
1599
|
+
})
|
|
1600
|
+
.addCase(onCloseCompleteAsync.fulfilled, function (state) {
|
|
1601
|
+
state.loading = false;
|
|
1602
|
+
state.error = null;
|
|
1603
|
+
state.data.responseData = __assign({}, state.data.responseData);
|
|
1604
|
+
})
|
|
1605
|
+
.addCase(onCloseCompleteAsync.rejected, function (state, action) {
|
|
1606
|
+
state.loading = false;
|
|
1607
|
+
state.error = action.error.message;
|
|
1608
|
+
})
|
|
1609
|
+
.addCase(updateBusinessCountryAsync.pending, function (state) {
|
|
1610
|
+
state.loading = true;
|
|
1611
|
+
state.error = null;
|
|
1612
|
+
})
|
|
1613
|
+
.addCase(updateBusinessCountryAsync.rejected, function (state, action) {
|
|
1614
|
+
state.loading = false;
|
|
1615
|
+
state.error = action.error.message;
|
|
1616
|
+
})
|
|
1617
|
+
.addCase(updateBusinessCountryAsync.fulfilled, function (state) {
|
|
1618
|
+
state.loading = false;
|
|
1619
|
+
state.error = null;
|
|
1620
|
+
})
|
|
1621
|
+
.addCase(createEntity.pending, function (state) {
|
|
1622
|
+
state.loading = true;
|
|
1623
|
+
state.error = null;
|
|
1624
|
+
})
|
|
1625
|
+
.addCase(createEntity.rejected, function (state, action) {
|
|
1626
|
+
state.loading = false;
|
|
1627
|
+
state.error = action.error.message;
|
|
1628
|
+
})
|
|
1629
|
+
.addCase(createEntity.fulfilled, function (state, action) {
|
|
1630
|
+
state.loading = false;
|
|
1631
|
+
state.error = null;
|
|
1632
|
+
var data = action.payload.data;
|
|
1633
|
+
var authenticationData = (state.data.responseData || {}).authenticationData;
|
|
1634
|
+
var entityList = (authenticationData || {}).entityList;
|
|
1635
|
+
if (data === null || data === void 0 ? void 0 : data.entity) {
|
|
1636
|
+
var entity = __assign(__assign({}, data.entity), { business_id: data === null || data === void 0 ? void 0 : data.business_id });
|
|
1637
|
+
var list = __spreadArray([entity], entityList, true);
|
|
1638
|
+
state.data.authenticationData.entityInfo = list[0];
|
|
1639
|
+
state.data.responseData = __assign(__assign({}, state.data.responseData), { entityData: data, authenticationData: __assign(__assign({}, authenticationData), { entityList: list }) });
|
|
1640
|
+
}
|
|
1144
1641
|
});
|
|
1145
1642
|
}
|
|
1146
1643
|
});
|
|
1147
|
-
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,
|
|
1644
|
+
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, setShowBoard = _a.setShowBoard, resetIndividualScreen = _a.resetIndividualScreen, setDefaultCountryCode = _a.setDefaultCountryCode, storeIsStartFromBusinessCountry = _a.storeIsStartFromBusinessCountry, resetAuthenticationScreen = _a.resetAuthenticationScreen;
|
|
1148
1645
|
export default connectSlice.reducer;
|
|
1149
1646
|
export var connectExpressSelector = function (state) { return state.connectExpress; };
|