@tap-payments/auth-jsconnect 2.12.0-beta → 2.12.0-development
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/@types/app.d.ts +3 -1
- package/build/@types/app.js +1 -0
- package/build/@types/form.d.ts +4 -2
- package/build/@types/index.d.ts +1 -0
- package/build/@types/index.js +1 -0
- package/build/@types/terminal.d.ts +104 -0
- package/build/@types/terminal.js +1 -0
- package/build/api/account.d.ts +2 -2
- package/build/api/account.js +7 -4
- package/build/api/auth.d.ts +18 -3
- package/build/api/auth.js +7 -3
- package/build/api/axios.d.ts +1 -1
- package/build/api/axios.js +9 -1
- package/build/api/entity.d.ts +3 -0
- package/build/api/headers.d.ts +6 -0
- package/build/api/headers.js +18 -0
- package/build/api/index.d.ts +15 -8
- package/build/api/index.js +5 -2
- package/build/api/lead.d.ts +3 -2
- package/build/api/operator.d.ts +1 -1
- package/build/api/operator.js +5 -2
- package/build/api/terminal.d.ts +25 -0
- package/build/api/terminal.js +55 -0
- package/build/app/rootReducer.d.ts +2 -0
- package/build/app/rootReducer.js +5 -1
- package/build/app/session.d.ts +17 -0
- package/build/app/session.js +28 -0
- package/build/app/settings.js +1 -1
- package/build/app/store.d.ts +4 -0
- package/build/assets/currencies/AEDSymbol.js +1 -1
- package/build/assets/currencies/SARSymbol.js +1 -1
- package/build/assets/locales/ar.json +51 -15
- package/build/assets/locales/en.json +56 -46
- package/build/components/DeviceCard/DeviceCard.d.ts +19 -0
- package/build/components/DeviceCard/DeviceCard.js +102 -0
- package/build/components/DeviceCard/index.d.ts +3 -0
- package/build/components/DeviceCard/index.js +2 -0
- package/build/components/OTPTimer/OTPTimer.d.ts +2 -1
- package/build/components/OTPTimer/OTPTimer.js +4 -4
- package/build/components/Tooltip/Tooltip.js +1 -1
- package/build/components/TruncatedTooltipText/TruncatedTooltipText.d.ts +7 -0
- package/build/components/TruncatedTooltipText/TruncatedTooltipText.js +33 -0
- package/build/components/TruncatedTooltipText/index.d.ts +2 -0
- package/build/components/TruncatedTooltipText/index.js +2 -0
- package/build/constants/api.d.ts +1 -1
- package/build/constants/api.js +2 -2
- package/build/constants/app.d.ts +27 -3
- package/build/constants/app.js +350 -40
- package/build/constants/dummy.d.ts +2 -29
- package/build/constants/dummy.js +4 -4
- package/build/constants/flows.d.ts +27 -22
- package/build/constants/flows.js +27 -23
- package/build/constants/validation.d.ts +2 -0
- package/build/constants/validation.js +2 -0
- package/build/features/app/auth/authStore.d.ts +4 -0
- package/build/features/app/auth/authStore.js +168 -54
- package/build/features/app/bank/bankStore.d.ts +7 -0
- package/build/features/app/bank/bankStore.js +110 -20
- package/build/features/app/board/boardStore.d.ts +5 -0
- package/build/features/app/board/boardStore.js +94 -7
- package/build/features/app/brand/brandStore.d.ts +7 -0
- package/build/features/app/brand/brandStore.js +107 -19
- package/build/features/app/business/businessStore.d.ts +10 -0
- package/build/features/app/business/businessStore.js +130 -37
- package/build/features/app/connect/connectStore.d.ts +12 -5
- package/build/features/app/connect/connectStore.js +146 -31
- package/build/features/app/connectExpress/connectExpressStore.d.ts +10 -5
- package/build/features/app/connectExpress/connectExpressStore.js +159 -21
- package/build/features/app/entity/entityStore.d.ts +7 -0
- package/build/features/app/entity/entityStore.js +108 -18
- package/build/features/app/individual/individualStore.d.ts +9 -0
- package/build/features/app/individual/individualStore.js +126 -34
- package/build/features/app/kyc/kycStore.d.ts +5 -5
- package/build/features/app/kyc/kycStore.js +4 -1
- package/build/features/app/password/passwordStore.d.ts +9 -0
- package/build/features/app/password/passwordStore.js +130 -46
- package/build/features/app/signIn/signInStore.js +12 -16
- package/build/features/app/tax/taxStore.d.ts +7 -0
- package/build/features/app/tax/taxStore.js +104 -17
- package/build/features/app/terminal/terminalStore.d.ts +119 -0
- package/build/features/app/terminal/terminalStore.js +781 -0
- package/build/features/auth/Auth.js +3 -2
- package/build/features/auth/screens/AuthenticationList/AuthenticationList.js +10 -7
- package/build/features/auth/screens/AuthenticationList/EntityLicenseType.d.ts +6 -3
- package/build/features/auth/screens/AuthenticationList/EntityLicenseType.js +6 -4
- package/build/features/auth/screens/AuthenticationList/EntityList.js +11 -3
- package/build/features/auth/screens/OTPSessionExpired/OTPInput.d.ts +3 -0
- package/build/features/auth/screens/OTPSessionExpired/OTPInput.js +58 -0
- package/build/features/auth/screens/OTPSessionExpired/OTPSessionExpired.d.ts +5 -0
- package/build/features/auth/screens/OTPSessionExpired/OTPSessionExpired.js +85 -0
- package/build/features/auth/screens/OTPSessionExpired/index.d.ts +2 -0
- package/build/features/auth/screens/OTPSessionExpired/index.js +2 -0
- package/build/features/auth/screens/OTPSessionExpired/validation.d.ts +8 -0
- package/build/features/auth/screens/OTPSessionExpired/validation.js +4 -0
- package/build/features/bank/Bank.js +3 -2
- package/build/features/bank/screens/OTPSessionExpired/OTPInput.d.ts +7 -0
- package/build/features/bank/screens/OTPSessionExpired/OTPInput.js +51 -0
- package/build/features/bank/screens/OTPSessionExpired/OTPSessionExpired.d.ts +5 -0
- package/build/features/bank/screens/OTPSessionExpired/OTPSessionExpired.js +75 -0
- package/build/features/bank/screens/OTPSessionExpired/index.d.ts +2 -0
- package/build/features/bank/screens/OTPSessionExpired/index.js +2 -0
- package/build/features/bank/screens/OTPSessionExpired/validation.d.ts +8 -0
- package/build/features/bank/screens/OTPSessionExpired/validation.js +4 -0
- package/build/features/board/Board.js +5 -4
- package/build/features/board/screens/OTPSessionExpired/OTPInput.d.ts +7 -0
- package/build/features/board/screens/OTPSessionExpired/OTPInput.js +51 -0
- package/build/features/board/screens/OTPSessionExpired/OTPSessionExpired.d.ts +5 -0
- package/build/features/board/screens/OTPSessionExpired/OTPSessionExpired.js +75 -0
- package/build/features/board/screens/OTPSessionExpired/index.d.ts +2 -0
- package/build/features/board/screens/OTPSessionExpired/index.js +2 -0
- package/build/features/board/screens/OTPSessionExpired/validation.d.ts +8 -0
- package/build/features/board/screens/OTPSessionExpired/validation.js +4 -0
- package/build/features/brand/Brand.js +3 -2
- package/build/features/brand/screens/BrandActivities/ActivitiesList.d.ts +2 -2
- package/build/features/brand/screens/BrandActivities/RefundPolicy.d.ts +1 -1
- package/build/features/brand/screens/OTPSessionExpired/OTPInput.d.ts +7 -0
- package/build/features/brand/screens/OTPSessionExpired/OTPInput.js +51 -0
- package/build/features/brand/screens/OTPSessionExpired/OTPSessionExpired.d.ts +5 -0
- package/build/features/brand/screens/OTPSessionExpired/OTPSessionExpired.js +75 -0
- package/build/features/brand/screens/OTPSessionExpired/index.d.ts +2 -0
- package/build/features/brand/screens/OTPSessionExpired/index.js +2 -0
- package/build/features/brand/screens/OTPSessionExpired/validation.d.ts +8 -0
- package/build/features/brand/screens/OTPSessionExpired/validation.js +4 -0
- package/build/features/business/Business.js +3 -2
- package/build/features/business/screens/BusinessType/BusinessType.js +15 -5
- package/build/features/business/screens/BusinessType/EntityLicenseList.js +11 -5
- package/build/features/business/screens/BusinessType/LicenseList.js +20 -12
- package/build/features/business/screens/BusinessType/LicenseType.d.ts +2 -2
- package/build/features/business/screens/BusinessType/UnifiedNumber.d.ts +35 -0
- package/build/features/business/screens/BusinessType/UnifiedNumber.js +84 -0
- package/build/features/business/screens/BusinessType/validation.d.ts +6 -3
- package/build/features/business/screens/BusinessType/validation.js +31 -10
- package/build/features/business/screens/Customers/CustomerLocations.d.ts +2 -2
- package/build/features/business/screens/Customers/RefundPolicy.d.ts +1 -1
- package/build/features/business/screens/OTPSessionExpired/OTPInput.d.ts +7 -0
- package/build/features/business/screens/OTPSessionExpired/OTPInput.js +51 -0
- package/build/features/business/screens/OTPSessionExpired/OTPSessionExpired.d.ts +5 -0
- package/build/features/business/screens/OTPSessionExpired/OTPSessionExpired.js +75 -0
- package/build/features/business/screens/OTPSessionExpired/index.d.ts +2 -0
- package/build/features/business/screens/OTPSessionExpired/index.js +2 -0
- package/build/features/business/screens/OTPSessionExpired/validation.d.ts +8 -0
- package/build/features/business/screens/OTPSessionExpired/validation.js +4 -0
- package/build/features/connect/Connect.js +3 -2
- package/build/features/connect/screens/OTPSessionExpired/OTPInput.d.ts +5 -0
- package/build/features/connect/screens/OTPSessionExpired/OTPInput.js +58 -0
- package/build/features/connect/screens/OTPSessionExpired/OTPSessionExpired.d.ts +3 -0
- package/build/features/connect/screens/OTPSessionExpired/OTPSessionExpired.js +86 -0
- package/build/features/connect/screens/OTPSessionExpired/index.d.ts +2 -0
- package/build/features/connect/screens/OTPSessionExpired/index.js +2 -0
- package/build/features/connect/screens/OTPSessionExpired/validation.d.ts +8 -0
- package/build/features/connect/screens/OTPSessionExpired/validation.js +4 -0
- package/build/features/connectExpress/ConnectExpress.js +3 -2
- package/build/features/connectExpress/screens/AuthenticationList/AuthenticationList.js +10 -10
- package/build/features/connectExpress/screens/AuthenticationList/EntityLicenseType.d.ts +6 -3
- package/build/features/connectExpress/screens/AuthenticationList/EntityLicenseType.js +6 -4
- package/build/features/connectExpress/screens/AuthenticationList/EntityList.js +11 -3
- package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.js +1 -0
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.js +27 -16
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseNumber.js +2 -2
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.d.ts +2 -2
- package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.js +1 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/UnifiedNumber.d.ts +36 -0
- package/build/features/connectExpress/screens/CollectBusinessInfo/UnifiedNumber.js +81 -0
- package/build/features/connectExpress/screens/CollectBusinessInfo/validation.d.ts +6 -3
- package/build/features/connectExpress/screens/CollectBusinessInfo/validation.js +57 -21
- package/build/features/connectExpress/screens/Mobile/Mobile.js +7 -6
- package/build/features/connectExpress/screens/OTPSessionExpired/OTPInput.d.ts +3 -0
- package/build/features/connectExpress/screens/OTPSessionExpired/OTPInput.js +58 -0
- package/build/features/connectExpress/screens/OTPSessionExpired/OTPSessionExpired.d.ts +5 -0
- package/build/features/connectExpress/screens/OTPSessionExpired/OTPSessionExpired.js +85 -0
- package/build/features/connectExpress/screens/OTPSessionExpired/index.d.ts +2 -0
- package/build/features/connectExpress/screens/OTPSessionExpired/index.js +2 -0
- package/build/features/connectExpress/screens/OTPSessionExpired/validation.d.ts +8 -0
- package/build/features/connectExpress/screens/OTPSessionExpired/validation.js +4 -0
- package/build/features/entity/Entity.js +3 -2
- package/build/features/entity/screens/EntityName/EntityName.js +16 -15
- package/build/features/entity/screens/EntityName/EntityTypeList.d.ts +2 -2
- package/build/features/entity/screens/EntityName/UnifiedNumber.js +2 -2
- package/build/features/entity/screens/EntityName/validation.d.ts +50 -48
- package/build/features/entity/screens/EntityName/validation.js +100 -85
- package/build/features/entity/screens/OTPSessionExpired/OTPInput.d.ts +7 -0
- package/build/features/entity/screens/OTPSessionExpired/OTPInput.js +51 -0
- package/build/features/entity/screens/OTPSessionExpired/OTPSessionExpired.d.ts +5 -0
- package/build/features/entity/screens/OTPSessionExpired/OTPSessionExpired.js +75 -0
- package/build/features/entity/screens/OTPSessionExpired/index.d.ts +2 -0
- package/build/features/entity/screens/OTPSessionExpired/index.js +2 -0
- package/build/features/entity/screens/OTPSessionExpired/validation.d.ts +8 -0
- package/build/features/entity/screens/OTPSessionExpired/validation.js +4 -0
- package/build/features/featuresScreens.d.ts +1 -0
- package/build/features/featuresScreens.js +187 -0
- package/build/features/individual/Individual.js +3 -2
- package/build/features/individual/screens/AdditionalIndividualInfo/IsAuthorizedSwitch.d.ts +2 -2
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.d.ts +2 -2
- package/build/features/individual/screens/IndividualPersonalInfo/Gender.d.ts +2 -2
- package/build/features/individual/screens/OTPSessionExpired/OTPInput.d.ts +7 -0
- package/build/features/individual/screens/OTPSessionExpired/OTPInput.js +51 -0
- package/build/features/individual/screens/OTPSessionExpired/OTPSessionExpired.d.ts +5 -0
- package/build/features/individual/screens/OTPSessionExpired/OTPSessionExpired.js +75 -0
- package/build/features/individual/screens/OTPSessionExpired/index.d.ts +2 -0
- package/build/features/individual/screens/OTPSessionExpired/index.js +2 -0
- package/build/features/individual/screens/OTPSessionExpired/validation.d.ts +8 -0
- package/build/features/individual/screens/OTPSessionExpired/validation.js +4 -0
- package/build/features/password/Password.js +3 -2
- package/build/features/password/screens/OTPSessionExpired/OTPInput.d.ts +7 -0
- package/build/features/password/screens/OTPSessionExpired/OTPInput.js +51 -0
- package/build/features/password/screens/OTPSessionExpired/OTPSessionExpired.d.ts +5 -0
- package/build/features/password/screens/OTPSessionExpired/OTPSessionExpired.js +75 -0
- package/build/features/password/screens/OTPSessionExpired/index.d.ts +2 -0
- package/build/features/password/screens/OTPSessionExpired/index.js +2 -0
- package/build/features/password/screens/OTPSessionExpired/validation.d.ts +8 -0
- package/build/features/password/screens/OTPSessionExpired/validation.js +4 -0
- package/build/features/shared/Address/CountryList.d.ts +1 -1
- package/build/features/shared/Address/InputSelect.d.ts +1 -1
- package/build/features/shared/Button/Button.js +1 -1
- package/build/features/shared/Button/FlowsButtons.d.ts +1 -0
- package/build/features/shared/Button/FlowsButtons.js +2 -2
- package/build/features/shared/OTPVerifySecurityError/OTPVerifySecurityError.d.ts +3 -0
- package/build/features/shared/OTPVerifySecurityError/OTPVerifySecurityError.js +9 -0
- package/build/features/shared/OTPVerifySecurityError/index.d.ts +2 -0
- package/build/features/shared/OTPVerifySecurityError/index.js +2 -0
- package/build/features/shared/PushNotification/PushNotification.d.ts +11 -0
- package/build/features/shared/PushNotification/PushNotification.js +34 -0
- package/build/features/shared/PushNotification/index.d.ts +2 -0
- package/build/features/shared/PushNotification/index.js +2 -0
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.d.ts +2 -1
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +6 -5
- package/build/features/shared/SuccessScreen/SuccessScreen.d.ts +3 -1
- package/build/features/shared/SuccessScreen/SuccessScreen.js +2 -2
- package/build/features/tax/Tax.js +3 -2
- package/build/features/tax/screens/OTPSessionExpired/OTPInput.d.ts +7 -0
- package/build/features/tax/screens/OTPSessionExpired/OTPInput.js +51 -0
- package/build/features/tax/screens/OTPSessionExpired/OTPSessionExpired.d.ts +5 -0
- package/build/features/tax/screens/OTPSessionExpired/OTPSessionExpired.js +75 -0
- package/build/features/tax/screens/OTPSessionExpired/index.d.ts +2 -0
- package/build/features/tax/screens/OTPSessionExpired/index.js +2 -0
- package/build/features/tax/screens/OTPSessionExpired/validation.d.ts +8 -0
- package/build/features/tax/screens/OTPSessionExpired/validation.js +4 -0
- package/build/features/terminal/Terminal.d.ts +14 -0
- package/build/features/terminal/Terminal.js +96 -0
- package/build/features/terminal/index.d.ts +1 -0
- package/build/features/terminal/index.js +1 -0
- package/build/features/terminal/screens/LinkNewTerminal/LinkNewTerminal.d.ts +3 -0
- package/build/features/terminal/screens/LinkNewTerminal/LinkNewTerminal.js +68 -0
- package/build/features/terminal/screens/LinkNewTerminal/index.d.ts +2 -0
- package/build/features/terminal/screens/LinkNewTerminal/index.js +2 -0
- package/build/features/terminal/screens/LinkNewTerminal/styles.d.ts +10 -0
- package/build/features/terminal/screens/LinkNewTerminal/styles.js +28 -0
- package/build/features/terminal/screens/LinkedSuccess/LinkedSuccess.d.ts +3 -0
- package/build/features/terminal/screens/LinkedSuccess/LinkedSuccess.js +50 -0
- package/build/features/terminal/screens/LinkedSuccess/index.d.ts +2 -0
- package/build/features/terminal/screens/LinkedSuccess/index.js +2 -0
- package/build/features/terminal/screens/LinkedTerminalInfo/LinkedTerminalInfo.d.ts +3 -0
- package/build/features/terminal/screens/LinkedTerminalInfo/LinkedTerminalInfo.js +55 -0
- package/build/features/terminal/screens/LinkedTerminalInfo/index.d.ts +2 -0
- package/build/features/terminal/screens/LinkedTerminalInfo/index.js +2 -0
- package/build/features/terminal/screens/Loading/Loading.d.ts +4 -0
- package/build/features/terminal/screens/Loading/Loading.js +10 -0
- package/build/features/terminal/screens/Loading/index.d.ts +2 -0
- package/build/features/terminal/screens/Loading/index.js +2 -0
- package/build/features/terminal/screens/NoTerminalDeviceLinked/NoTerminalDeviceLinked.d.ts +3 -0
- package/build/features/terminal/screens/NoTerminalDeviceLinked/NoTerminalDeviceLinked.js +103 -0
- package/build/features/terminal/screens/NoTerminalDeviceLinked/index.d.ts +2 -0
- package/build/features/terminal/screens/NoTerminalDeviceLinked/index.js +2 -0
- package/build/features/terminal/screens/NoTerminalDeviceLinked/styles.d.ts +36 -0
- package/build/features/terminal/screens/NoTerminalDeviceLinked/styles.js +34 -0
- package/build/features/terminal/screens/OTPSessionExpired/OTPInput.d.ts +7 -0
- package/build/features/terminal/screens/OTPSessionExpired/OTPInput.js +51 -0
- package/build/features/terminal/screens/OTPSessionExpired/OTPSessionExpired.d.ts +5 -0
- package/build/features/terminal/screens/OTPSessionExpired/OTPSessionExpired.js +89 -0
- package/build/features/terminal/screens/OTPSessionExpired/index.d.ts +2 -0
- package/build/features/terminal/screens/OTPSessionExpired/index.js +2 -0
- package/build/features/terminal/screens/OTPSessionExpired/validation.d.ts +8 -0
- package/build/features/terminal/screens/OTPSessionExpired/validation.js +4 -0
- package/build/features/terminal/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/terminal/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/terminal/screens/OperatorError/index.d.ts +2 -0
- package/build/features/terminal/screens/OperatorError/index.js +2 -0
- package/build/features/terminal/screens/POSDeviceListPage/POSDeviceListPage.d.ts +3 -0
- package/build/features/terminal/screens/POSDeviceListPage/POSDeviceListPage.js +50 -0
- package/build/features/terminal/screens/POSDeviceListPage/index.d.ts +2 -0
- package/build/features/terminal/screens/POSDeviceListPage/index.js +2 -0
- package/build/features/terminal/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +3 -0
- package/build/features/terminal/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +21 -0
- package/build/features/terminal/screens/ResetPasswordSuccess/index.d.ts +2 -0
- package/build/features/terminal/screens/ResetPasswordSuccess/index.js +2 -0
- package/build/features/terminal/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +3 -0
- package/build/features/terminal/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +32 -0
- package/build/features/terminal/screens/SuccessWithFlowButtons/index.d.ts +2 -0
- package/build/features/terminal/screens/SuccessWithFlowButtons/index.js +2 -0
- package/build/features/terminal/screens/TerminalDeviceList/DeviceList.d.ts +9 -0
- package/build/features/terminal/screens/TerminalDeviceList/DeviceList.js +20 -0
- package/build/features/terminal/screens/TerminalDeviceList/TerminalDeviceList.d.ts +3 -0
- package/build/features/terminal/screens/TerminalDeviceList/TerminalDeviceList.js +153 -0
- package/build/features/terminal/screens/TerminalDeviceList/index.d.ts +2 -0
- package/build/features/terminal/screens/TerminalDeviceList/index.js +2 -0
- package/build/features/terminal/screens/TerminalDeviceList/styles.d.ts +9 -0
- package/build/features/terminal/screens/TerminalDeviceList/styles.js +13 -0
- package/build/features/terminal/screens/UnlinkedSuccess/UnlinkedSuccess.d.ts +3 -0
- package/build/features/terminal/screens/UnlinkedSuccess/UnlinkedSuccess.js +51 -0
- package/build/features/terminal/screens/UnlinkedSuccess/index.d.ts +2 -0
- package/build/features/terminal/screens/UnlinkedSuccess/index.js +2 -0
- package/build/features/terminal/screens/UnlinkedTerminalInfo/UnlinkedTerminalInfo.d.ts +3 -0
- package/build/features/terminal/screens/UnlinkedTerminalInfo/UnlinkedTerminalInfo.js +99 -0
- package/build/features/terminal/screens/UnlinkedTerminalInfo/index.d.ts +2 -0
- package/build/features/terminal/screens/UnlinkedTerminalInfo/index.js +2 -0
- package/build/features/terminal/screens/UnlinkedTerminalInfo/styles.d.ts +26 -0
- package/build/features/terminal/screens/UnlinkedTerminalInfo/styles.js +30 -0
- package/build/features/terminal/screens/Verify/OTPInput.d.ts +7 -0
- package/build/features/terminal/screens/Verify/OTPInput.js +51 -0
- package/build/features/terminal/screens/Verify/Verify.d.ts +5 -0
- package/build/features/terminal/screens/Verify/Verify.js +89 -0
- package/build/features/terminal/screens/Verify/index.d.ts +2 -0
- package/build/features/terminal/screens/Verify/index.js +2 -0
- package/build/features/terminal/screens/Verify/validation.d.ts +8 -0
- package/build/features/terminal/screens/Verify/validation.js +4 -0
- package/build/features/terminal/screens/shared/Header.d.ts +10 -0
- package/build/features/terminal/screens/shared/Header.js +30 -0
- package/build/features/terminal/screens/shared/POSDeviceList.d.ts +11 -0
- package/build/features/terminal/screens/shared/POSDeviceList.js +30 -0
- package/build/features/terminal/screens/shared/index.d.ts +5 -0
- package/build/features/terminal/screens/shared/index.js +5 -0
- package/build/features/terminal/screens/shared/styles.d.ts +196 -0
- package/build/features/terminal/screens/shared/styles.js +155 -0
- package/build/features/terminal/screens/shared/utils.d.ts +7 -0
- package/build/features/terminal/screens/shared/utils.js +24 -0
- package/build/hooks/index.d.ts +1 -0
- package/build/hooks/index.js +1 -0
- package/build/hooks/useAppDispatch.d.ts +2 -0
- package/build/hooks/useSessionExpiryHandler.d.ts +8 -0
- package/build/hooks/useSessionExpiryHandler.js +71 -0
- package/build/index.d.ts +3 -2
- package/build/index.js +4 -2
- package/build/theme/palette.js +12 -0
- package/build/theme/typography.js +4 -0
- package/build/utils/common.js +13 -6
- package/build/utils/error.d.ts +4 -0
- package/build/utils/error.js +12 -0
- package/build/utils/string.d.ts +3 -1
- package/build/utils/string.js +12 -2
- package/build/utils/validation.js +1 -1
- package/package.json +3 -3
|
@@ -37,6 +37,10 @@ export declare const resendMobileAuthOTP: import("@reduxjs/toolkit").AsyncThunk<
|
|
|
37
37
|
response: any;
|
|
38
38
|
formData: MobileFormValues;
|
|
39
39
|
}, MobileFormValues, {}>;
|
|
40
|
+
export declare const createAuthSessionExpiredAsync: import("@reduxjs/toolkit").AsyncThunk<{
|
|
41
|
+
data: any;
|
|
42
|
+
}, boolean, {}>;
|
|
43
|
+
export declare const verifySessionExpiredOtpAsync: import("@reduxjs/toolkit").AsyncThunk<any, OTPFormValues, {}>;
|
|
40
44
|
export declare const createNafathAuth: import("@reduxjs/toolkit").AsyncThunk<{
|
|
41
45
|
response: any;
|
|
42
46
|
formData: {
|
|
@@ -82,14 +86,15 @@ export declare const verifyNafathIdentityAsync: import("@reduxjs/toolkit").Async
|
|
|
82
86
|
isNextScreenIsDob: boolean;
|
|
83
87
|
}, verifyPACIAsyncParams, {}>;
|
|
84
88
|
export declare const verifyPaciLeadIdentityAsync: import("@reduxjs/toolkit").AsyncThunk<any, verifyPACIAsyncParams, {}>;
|
|
89
|
+
interface EmailCheckProps {
|
|
90
|
+
email: string;
|
|
91
|
+
cancelToken: CancelToken;
|
|
92
|
+
onSuccess?: () => void;
|
|
93
|
+
}
|
|
85
94
|
export declare const checkEmailAvailabilityAsync: import("@reduxjs/toolkit").AsyncThunk<{
|
|
86
95
|
response: any;
|
|
87
96
|
formData: string;
|
|
88
|
-
} | undefined, {
|
|
89
|
-
email: string;
|
|
90
|
-
cancelToken: CancelToken;
|
|
91
|
-
onSuccess?: (() => void) | undefined;
|
|
92
|
-
}, {}>;
|
|
97
|
+
} | undefined, EmailCheckProps, {}>;
|
|
93
98
|
export declare const checkBrandNameAvailabilityAsync: import("@reduxjs/toolkit").AsyncThunk<{
|
|
94
99
|
response: any;
|
|
95
100
|
formData: {
|
|
@@ -58,10 +58,10 @@ var _a;
|
|
|
58
58
|
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
59
59
|
import { handleNextScreenStep, handleCurrentActiveScreen, handleOpen, handleSetCountryByIso2, onCloseComplete, storeAuthId } from '../../../app/settings';
|
|
60
60
|
import { FlowsTypes, AuthForType, BusinessType, LicenseType, AuthForScreen } from '../../../@types';
|
|
61
|
-
import API from '../../../api';
|
|
61
|
+
import API, { setAuthSessionToGlobalHeaders } from '../../../api';
|
|
62
62
|
import { ADD_NEW_ENTITY, COLLECT_DOB_INFO_NAFATH, CONNECT_EXPRESS_STEP_NAMES, IDENTIFICATION_TYPE, NAFATH_PACI_TIMEOUT_DURATION, NAFATH_VERIFICATION_FAILED, OTHER_CR_LICENSE, OTHER_FL_LICENSE, SCOPE_AUTH, SCOPE_MERCHANT } from '../../../constants';
|
|
63
63
|
import { defaultCountry } from '../../../constants';
|
|
64
|
-
import { getIndividualName, capitalizeTheFirstLetterOfEachWord, sleep, findCountryByIddPrefix, concatenateObjectValues, isSA, isKW, isOtherThanKWOrSA, sendCustomEventToGTM, sendCustomDimension, getMetaData, isNetworkError, isTimeoutError } from '../../../utils';
|
|
64
|
+
import { getIndividualName, capitalizeTheFirstLetterOfEachWord, sleep, findCountryByIddPrefix, concatenateObjectValues, isSA, isKW, isOtherThanKWOrSA, sendCustomEventToGTM, sendCustomDimension, getMetaData, isNetworkError, isTimeoutError, isInternalServerError, isAuthenticationVerificationFailed } from '../../../utils';
|
|
65
65
|
export var updateBusinessCountryAsync = createAsyncThunk('connectExpress/updateBusinessCountryAsync', function (countryCode, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
66
66
|
var connectExpress, payload, data;
|
|
67
67
|
return __generator(this, function (_a) {
|
|
@@ -309,6 +309,71 @@ export var resendMobileAuthOTP = createAsyncThunk('connectExpress/resendMobileAu
|
|
|
309
309
|
}
|
|
310
310
|
});
|
|
311
311
|
}); });
|
|
312
|
+
export var createAuthSessionExpiredAsync = createAsyncThunk('connectExpress/createAuthSessionExpiredAsync', function (redirect, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
313
|
+
var settings, requestBody, data;
|
|
314
|
+
return __generator(this, function (_a) {
|
|
315
|
+
switch (_a.label) {
|
|
316
|
+
case 0:
|
|
317
|
+
settings = thunkApi.getState().settings;
|
|
318
|
+
requestBody = {
|
|
319
|
+
country: settings.data.businessCountry.iso2,
|
|
320
|
+
scope: settings.data.appConfig.scope,
|
|
321
|
+
lang: settings.data.language,
|
|
322
|
+
step_name: CONNECT_EXPRESS_STEP_NAMES.CREATE_AUTH_SESSION_EXPIRED,
|
|
323
|
+
encryption_contract: []
|
|
324
|
+
};
|
|
325
|
+
return [4, API.authService.createExpressAuth(requestBody)];
|
|
326
|
+
case 1:
|
|
327
|
+
data = _a.sent();
|
|
328
|
+
if (redirect)
|
|
329
|
+
thunkApi.dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_SESSION_EXPIRED_OTP_STEP'));
|
|
330
|
+
return [2, { data: data }];
|
|
331
|
+
}
|
|
332
|
+
});
|
|
333
|
+
}); });
|
|
334
|
+
export var verifySessionExpiredOtpAsync = createAsyncThunk('connectExpress/verifySessionExpiredOtpAsync', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
335
|
+
var _a, settings, connectExpress, session, _b, responseData, leadId, _c, auth_token, device_token, service_name, payload, data, authId;
|
|
336
|
+
var _d, _e;
|
|
337
|
+
return __generator(this, function (_f) {
|
|
338
|
+
switch (_f.label) {
|
|
339
|
+
case 0:
|
|
340
|
+
_a = thunkApi.getState(), settings = _a.settings, connectExpress = _a.connectExpress, session = _a.session;
|
|
341
|
+
_b = connectExpress.data || {}, responseData = _b.responseData, leadId = _b.leadId;
|
|
342
|
+
if (!(responseData === null || responseData === void 0 ? void 0 : responseData.authData))
|
|
343
|
+
throw new Error('Auth data is missing');
|
|
344
|
+
_c = responseData.authData, auth_token = _c.auth_token, device_token = _c.device_token, service_name = _c.service_name;
|
|
345
|
+
payload = {
|
|
346
|
+
auth_token: auth_token,
|
|
347
|
+
lead_id: leadId,
|
|
348
|
+
data: params.otp,
|
|
349
|
+
auth_type: 2,
|
|
350
|
+
device_token: device_token,
|
|
351
|
+
service_name: service_name,
|
|
352
|
+
sign_in: false,
|
|
353
|
+
step_name: CONNECT_EXPRESS_STEP_NAMES.VERIFY_AUTH_SESSION_EXPIRED,
|
|
354
|
+
encryption_contract: ['data']
|
|
355
|
+
};
|
|
356
|
+
return [4, API.authService.verifyExpressAuth(payload).catch(function (err) {
|
|
357
|
+
if (isAuthenticationVerificationFailed(err === null || err === void 0 ? void 0 : err.message))
|
|
358
|
+
thunkApi.dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_OTP_VERIFY_SECURITY_ERROR_STEP'));
|
|
359
|
+
throw new Error(err === null || err === void 0 ? void 0 : err.message);
|
|
360
|
+
})];
|
|
361
|
+
case 1:
|
|
362
|
+
data = _f.sent();
|
|
363
|
+
setAuthSessionToGlobalHeaders(data === null || data === void 0 ? void 0 : data.auth_session);
|
|
364
|
+
sendCustomEventToGTM({
|
|
365
|
+
event: 'Send Event',
|
|
366
|
+
event_category: 'User Registration Flow',
|
|
367
|
+
event_action: 'Session Expired - OTP Success'
|
|
368
|
+
});
|
|
369
|
+
(_e = (_d = settings.data.appConfig).onStepCompleted) === null || _e === void 0 ? void 0 : _e.call(_d, settings.data.activeScreen.name, params);
|
|
370
|
+
authId = data.auth.id;
|
|
371
|
+
thunkApi.dispatch(storeAuthId(authId));
|
|
372
|
+
thunkApi.dispatch(handleCurrentActiveScreen(session.data.nextScreen));
|
|
373
|
+
return [2, data];
|
|
374
|
+
}
|
|
375
|
+
});
|
|
376
|
+
}); });
|
|
312
377
|
export var createNafathAuth = createAsyncThunk('connectExpress/createNafathAuth', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
313
378
|
var _a, settings, connectExpress, requestBody, data;
|
|
314
379
|
var _b, _c;
|
|
@@ -385,6 +450,7 @@ export var verifyNafathAsync = createAsyncThunk('connectExpress/verifyNafathAsyn
|
|
|
385
450
|
return [2, { data: data }];
|
|
386
451
|
}
|
|
387
452
|
if (!isSuccess) return [3, 9];
|
|
453
|
+
setAuthSessionToGlobalHeaders(data === null || data === void 0 ? void 0 : data.auth_session);
|
|
388
454
|
authId = (_j = data.auth) === null || _j === void 0 ? void 0 : _j.id;
|
|
389
455
|
leadId = (_k = data.auth) === null || _k === void 0 ? void 0 : _k.lead_id;
|
|
390
456
|
thunkApi.dispatch(storeAuthId(authId));
|
|
@@ -499,9 +565,14 @@ export var verifyMobileOtpAsync = createAsyncThunk('connectExpress/verifyMobileO
|
|
|
499
565
|
step_name: CONNECT_EXPRESS_STEP_NAMES.VERIFY_AUTH_MOBILE,
|
|
500
566
|
encryption_contract: ['data']
|
|
501
567
|
};
|
|
502
|
-
return [4, API.authService.verifyExpressAuth(payload)
|
|
568
|
+
return [4, API.authService.verifyExpressAuth(payload).catch(function (err) {
|
|
569
|
+
if (isAuthenticationVerificationFailed(err === null || err === void 0 ? void 0 : err.message))
|
|
570
|
+
thunkApi.dispatch(handleNextScreenStep('CONNECT_EXPRESS_OTP_VERIFY_SECURITY_ERROR_STEP'));
|
|
571
|
+
throw new Error(err === null || err === void 0 ? void 0 : err.message);
|
|
572
|
+
})];
|
|
503
573
|
case 1:
|
|
504
574
|
data = _h.sent();
|
|
575
|
+
setAuthSessionToGlobalHeaders(data === null || data === void 0 ? void 0 : data.auth_session);
|
|
505
576
|
sendCustomEventToGTM({
|
|
506
577
|
event: 'Send Event',
|
|
507
578
|
event_category: 'User Registration Flow',
|
|
@@ -583,6 +654,7 @@ export var verifyPACIAsync = createAsyncThunk('connectExpress/verifyPACIAsync',
|
|
|
583
654
|
case 5:
|
|
584
655
|
isSuccess = ((_e = (_d = data === null || data === void 0 ? void 0 : data.auth) === null || _d === void 0 ? void 0 : _d.status) === null || _e === void 0 ? void 0 : _e.toLowerCase()) === 'success';
|
|
585
656
|
if (!isSuccess) return [3, 9];
|
|
657
|
+
setAuthSessionToGlobalHeaders(data === null || data === void 0 ? void 0 : data.auth_session);
|
|
586
658
|
authId = data.auth.id;
|
|
587
659
|
thunkApi.dispatch(storeAuthId(authId));
|
|
588
660
|
if (isScopeAuthentication && !data.new_user && isDataHasIndividualOnly && authId) {
|
|
@@ -838,23 +910,36 @@ export var verifyPaciLeadIdentityAsync = createAsyncThunk('connectExpress/verify
|
|
|
838
910
|
export var checkEmailAvailabilityAsync = createAsyncThunk('connectExpress/CheckEmailAvailabilityAsync', function (_a, thunkApi) {
|
|
839
911
|
var email = _a.email, cancelToken = _a.cancelToken, onSuccess = _a.onSuccess;
|
|
840
912
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
841
|
-
var
|
|
842
|
-
var _b, _c;
|
|
843
|
-
return __generator(this, function (
|
|
844
|
-
switch (
|
|
913
|
+
var responseData, requestBody, data, retryData;
|
|
914
|
+
var _b, _c, _d, _e, _f, _g, _h;
|
|
915
|
+
return __generator(this, function (_j) {
|
|
916
|
+
switch (_j.label) {
|
|
845
917
|
case 0:
|
|
846
|
-
|
|
918
|
+
responseData = thunkApi.getState().connectExpress.data.responseData;
|
|
847
919
|
requestBody = {
|
|
848
920
|
email: email,
|
|
849
|
-
country: (
|
|
921
|
+
country: (_b = responseData === null || responseData === void 0 ? void 0 : responseData.leadData) === null || _b === void 0 ? void 0 : _b.country_code,
|
|
850
922
|
encryption_contract: ['email']
|
|
851
923
|
};
|
|
852
924
|
return [4, API.availabilityServices.checkEmail(requestBody, { cancelToken: cancelToken })];
|
|
853
925
|
case 1:
|
|
854
|
-
data = (
|
|
855
|
-
|
|
856
|
-
|
|
926
|
+
data = (_j.sent()).data;
|
|
927
|
+
if (!data.errors) {
|
|
928
|
+
onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess();
|
|
857
929
|
return [2, { response: data, formData: email }];
|
|
930
|
+
}
|
|
931
|
+
if (!isInternalServerError((_d = (_c = data.errors) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.error)) {
|
|
932
|
+
onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess();
|
|
933
|
+
throw new Error((_f = (_e = data.errors) === null || _e === void 0 ? void 0 : _e[0]) === null || _f === void 0 ? void 0 : _f.error);
|
|
934
|
+
}
|
|
935
|
+
return [4, API.availabilityServices.checkEmail(requestBody, { cancelToken: cancelToken })];
|
|
936
|
+
case 2:
|
|
937
|
+
retryData = (_j.sent()).data;
|
|
938
|
+
onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess();
|
|
939
|
+
if (!retryData.errors)
|
|
940
|
+
return [2, { response: retryData, formData: email }];
|
|
941
|
+
if (isInternalServerError((_h = (_g = retryData.errors) === null || _g === void 0 ? void 0 : _g[0]) === null || _h === void 0 ? void 0 : _h.error))
|
|
942
|
+
return [2, { response: { is_available: true }, formData: email }];
|
|
858
943
|
return [2];
|
|
859
944
|
}
|
|
860
945
|
});
|
|
@@ -1129,13 +1214,13 @@ export var updateLeadIndividualAsync = createAsyncThunk('connectExpress/updateLe
|
|
|
1129
1214
|
export var updateLeadBusinessDataAsync = createAsyncThunk('updateLeadBusinessDataAsync ', function (_a, thunkApi) {
|
|
1130
1215
|
var formData = _a.formData, originalFormData = _a.originalFormData;
|
|
1131
1216
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
1132
|
-
var _b, settings, connectExpress, selectedLicense, brandName, licenseNumber, termAndConditionChecked, isKWCountry, isFL, _c, responseData, isLeadIdPassed, id, brandNameBody, payload, data;
|
|
1217
|
+
var _b, settings, connectExpress, selectedLicense, brandName, licenseNumber, termAndConditionChecked, unifiedNumber, isKWCountry, isFL, _c, responseData, isLeadIdPassed, id, brandNameBody, payload, data;
|
|
1133
1218
|
var _d, _e;
|
|
1134
1219
|
return __generator(this, function (_f) {
|
|
1135
1220
|
switch (_f.label) {
|
|
1136
1221
|
case 0:
|
|
1137
1222
|
_b = thunkApi.getState(), settings = _b.settings, connectExpress = _b.connectExpress;
|
|
1138
|
-
selectedLicense = formData.selectedLicense, brandName = formData.brandName, licenseNumber = formData.licenseNumber, termAndConditionChecked = formData.termAndConditionChecked;
|
|
1223
|
+
selectedLicense = formData.selectedLicense, brandName = formData.brandName, licenseNumber = formData.licenseNumber, termAndConditionChecked = formData.termAndConditionChecked, unifiedNumber = formData.unifiedNumber;
|
|
1139
1224
|
isKWCountry = isKW(settings.data.businessCountry.iso2);
|
|
1140
1225
|
isFL = (selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.type) === BusinessType.FL;
|
|
1141
1226
|
_c = connectExpress.data, responseData = _c.responseData, isLeadIdPassed = _c.isLeadIdPassed;
|
|
@@ -1153,6 +1238,7 @@ export var updateLeadBusinessDataAsync = createAsyncThunk('updateLeadBusinessDat
|
|
|
1153
1238
|
license_type: (selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.type) ? (isFL ? LicenseType.FL : LicenseType.CR) : undefined,
|
|
1154
1239
|
business_type: selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.type,
|
|
1155
1240
|
is_acknowledged: true,
|
|
1241
|
+
unified_number: unifiedNumber,
|
|
1156
1242
|
terms_conditions_accepted: !isLeadIdPassed ? termAndConditionChecked : undefined,
|
|
1157
1243
|
step_name: CONNECT_EXPRESS_STEP_NAMES.UPDATE_LEAD_BRAND_BUSINESS,
|
|
1158
1244
|
encryption_contract: []
|
|
@@ -1293,7 +1379,11 @@ export var verifyAuthMobileOtpAsync = createAsyncThunk('connectExpress/verifyAut
|
|
|
1293
1379
|
step_name: CONNECT_EXPRESS_STEP_NAMES.VERIFY_AUTH_MOBILE_OTP,
|
|
1294
1380
|
encryption_contract: ['data']
|
|
1295
1381
|
};
|
|
1296
|
-
return [4, API.authService.verifyExpressLeadIdentity(payload)
|
|
1382
|
+
return [4, API.authService.verifyExpressLeadIdentity(payload).catch(function (err) {
|
|
1383
|
+
if (isAuthenticationVerificationFailed(err === null || err === void 0 ? void 0 : err.message))
|
|
1384
|
+
thunkApi.dispatch(handleNextScreenStep('CONNECT_EXPRESS_OTP_VERIFY_SECURITY_ERROR_STEP'));
|
|
1385
|
+
throw new Error(err === null || err === void 0 ? void 0 : err.message);
|
|
1386
|
+
})];
|
|
1297
1387
|
case 1:
|
|
1298
1388
|
data = _e.sent();
|
|
1299
1389
|
(_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, params);
|
|
@@ -1480,6 +1570,7 @@ var initialState = {
|
|
|
1480
1570
|
businessData: {
|
|
1481
1571
|
brandName: '',
|
|
1482
1572
|
licenseNumber: '',
|
|
1573
|
+
unifiedNumber: '',
|
|
1483
1574
|
termAndConditionChecked: false
|
|
1484
1575
|
},
|
|
1485
1576
|
authenticationData: {
|
|
@@ -1627,6 +1718,35 @@ export var connectSlice = createSlice({
|
|
|
1627
1718
|
})
|
|
1628
1719
|
.addCase(resendMobileAuthOTP.rejected, function (state, action) {
|
|
1629
1720
|
state.error = action.error.message;
|
|
1721
|
+
})
|
|
1722
|
+
.addCase(createAuthSessionExpiredAsync.pending, function (state) {
|
|
1723
|
+
state.loading = true;
|
|
1724
|
+
state.error = null;
|
|
1725
|
+
})
|
|
1726
|
+
.addCase(createAuthSessionExpiredAsync.fulfilled, function (state, _a) {
|
|
1727
|
+
var data = _a.payload.data;
|
|
1728
|
+
state.loading = false;
|
|
1729
|
+
state.data.otpData.authFor = AuthForType.MOBILE;
|
|
1730
|
+
state.data.responseData = __assign(__assign({}, state.data.responseData), { authData: data });
|
|
1731
|
+
})
|
|
1732
|
+
.addCase(createAuthSessionExpiredAsync.rejected, function (state, action) {
|
|
1733
|
+
state.loading = false;
|
|
1734
|
+
state.error = action.error.message;
|
|
1735
|
+
})
|
|
1736
|
+
.addCase(verifySessionExpiredOtpAsync.pending, function (state) {
|
|
1737
|
+
state.loading = true;
|
|
1738
|
+
state.error = null;
|
|
1739
|
+
})
|
|
1740
|
+
.addCase(verifySessionExpiredOtpAsync.fulfilled, function (state, action) {
|
|
1741
|
+
var _a;
|
|
1742
|
+
state.loading = false;
|
|
1743
|
+
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) });
|
|
1744
|
+
})
|
|
1745
|
+
.addCase(verifySessionExpiredOtpAsync.rejected, function (state, _a) {
|
|
1746
|
+
var message = _a.error.message;
|
|
1747
|
+
state.loading = false;
|
|
1748
|
+
if (!isAuthenticationVerificationFailed(message))
|
|
1749
|
+
state.error = message;
|
|
1630
1750
|
})
|
|
1631
1751
|
.addCase(createNafathAuth.fulfilled, function (state, action) {
|
|
1632
1752
|
state.loading = false;
|
|
@@ -1697,9 +1817,11 @@ export var connectSlice = createSlice({
|
|
|
1697
1817
|
state.loading = false;
|
|
1698
1818
|
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) });
|
|
1699
1819
|
})
|
|
1700
|
-
.addCase(verifyMobileOtpAsync.rejected, function (state,
|
|
1820
|
+
.addCase(verifyMobileOtpAsync.rejected, function (state, _a) {
|
|
1821
|
+
var message = _a.error.message;
|
|
1701
1822
|
state.loading = false;
|
|
1702
|
-
|
|
1823
|
+
if (!isAuthenticationVerificationFailed(message))
|
|
1824
|
+
state.error = message;
|
|
1703
1825
|
})
|
|
1704
1826
|
.addCase(verifyNafathAsync.pending, function (state) {
|
|
1705
1827
|
state.loading = true;
|
|
@@ -1776,7 +1898,7 @@ export var connectSlice = createSlice({
|
|
|
1776
1898
|
state.error = null;
|
|
1777
1899
|
})
|
|
1778
1900
|
.addCase(retrieveEntityListAsync.fulfilled, function (state, action) {
|
|
1779
|
-
var _a, _b;
|
|
1901
|
+
var _a, _b, _c, _d;
|
|
1780
1902
|
state.loading = false;
|
|
1781
1903
|
var data = action.payload;
|
|
1782
1904
|
var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
|
|
@@ -1796,7 +1918,8 @@ export var connectSlice = createSlice({
|
|
|
1796
1918
|
}
|
|
1797
1919
|
}
|
|
1798
1920
|
licenseList = __spreadArray(__spreadArray([], licenseList, true), [OTHER_CR_LICENSE, OTHER_FL_LICENSE], false);
|
|
1799
|
-
var
|
|
1921
|
+
var _e = ((_b = state.data.responseData) === null || _b === void 0 ? void 0 : _b.leadData) || {}, license_number = _e.license_number, license_type = _e.license_type, entity = _e.entity;
|
|
1922
|
+
var unified_number = (_d = (_c = entity === null || entity === void 0 ? void 0 : entity.license) === null || _c === void 0 ? void 0 : _c.additional_info) === null || _d === void 0 ? void 0 : _d.unified_number;
|
|
1800
1923
|
var selectedLicense = undefined;
|
|
1801
1924
|
if (license_number) {
|
|
1802
1925
|
var findLicense = licenseList.find(function (_a) {
|
|
@@ -1812,6 +1935,18 @@ export var connectSlice = createSlice({
|
|
|
1812
1935
|
selectedLicense = __assign(__assign({}, OTHER_CR_LICENSE), { license: { number: license_number } });
|
|
1813
1936
|
state.data.businessData.licenseNumber = license_number;
|
|
1814
1937
|
}
|
|
1938
|
+
if (unified_number) {
|
|
1939
|
+
var findLicense = licenseList.find(function (_a) {
|
|
1940
|
+
var _b;
|
|
1941
|
+
var license = _a.license;
|
|
1942
|
+
return ((_b = license === null || license === void 0 ? void 0 : license.additional_info) === null || _b === void 0 ? void 0 : _b.unified_number) === unified_number;
|
|
1943
|
+
});
|
|
1944
|
+
if (findLicense)
|
|
1945
|
+
selectedLicense = findLicense;
|
|
1946
|
+
else
|
|
1947
|
+
selectedLicense = __assign(__assign({}, OTHER_CR_LICENSE), { license: { number: '', additional_info: { unified_number: unified_number } } });
|
|
1948
|
+
state.data.businessData.unifiedNumber = unified_number;
|
|
1949
|
+
}
|
|
1815
1950
|
state.data.businessData.selectedLicense = selectedLicense;
|
|
1816
1951
|
state.data.responseData = __assign(__assign({}, state.data.responseData), { licenseList: licenseList });
|
|
1817
1952
|
})
|
|
@@ -1914,6 +2049,7 @@ export var connectSlice = createSlice({
|
|
|
1914
2049
|
state.loading = false;
|
|
1915
2050
|
state.error = null;
|
|
1916
2051
|
state.data.individualData.mobile = action.payload.formData.mobile;
|
|
2052
|
+
state.data.individualData.countryCode = action.payload.formData.countryCode;
|
|
1917
2053
|
state.data.responseData = __assign(__assign({}, state.data.responseData), { individualData: action.payload.leadResponse, verifyAuthMobile: action.payload.leadResponse });
|
|
1918
2054
|
state.data.verifyAuthOtpData.authFor = AuthForScreen.MOBILE_OWNERSHIP;
|
|
1919
2055
|
})
|
|
@@ -1949,9 +2085,11 @@ export var connectSlice = createSlice({
|
|
|
1949
2085
|
state.loading = true;
|
|
1950
2086
|
state.error = null;
|
|
1951
2087
|
})
|
|
1952
|
-
.addCase(verifyAuthMobileOtpAsync.rejected, function (state,
|
|
2088
|
+
.addCase(verifyAuthMobileOtpAsync.rejected, function (state, _a) {
|
|
2089
|
+
var message = _a.error.message;
|
|
1953
2090
|
state.loading = false;
|
|
1954
|
-
|
|
2091
|
+
if (!isAuthenticationVerificationFailed(message))
|
|
2092
|
+
state.error = message;
|
|
1955
2093
|
})
|
|
1956
2094
|
.addCase(resendLeadMobileAuthOTP.pending, function (state) {
|
|
1957
2095
|
state.loading = true;
|
|
@@ -19,6 +19,13 @@ export declare const verifyEntityLeadOTP: import("@reduxjs/toolkit").AsyncThunk<
|
|
|
19
19
|
entityTypes: any;
|
|
20
20
|
formData: OTPFormValues;
|
|
21
21
|
}, OTPFormValues, {}>;
|
|
22
|
+
export declare const verifyLeadTokenSessionExpired: import("@reduxjs/toolkit").AsyncThunk<{
|
|
23
|
+
data: any;
|
|
24
|
+
}, boolean, {}>;
|
|
25
|
+
export declare const verifyEntityLeadOTPSessionExpired: import("@reduxjs/toolkit").AsyncThunk<{
|
|
26
|
+
data: any;
|
|
27
|
+
formData: OTPFormValues;
|
|
28
|
+
}, OTPFormValues, {}>;
|
|
22
29
|
export declare const retrieveBoardStatus: import("@reduxjs/toolkit").AsyncThunk<{
|
|
23
30
|
flows: any;
|
|
24
31
|
}, void, {}>;
|
|
@@ -58,12 +58,12 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
58
58
|
};
|
|
59
59
|
var _a;
|
|
60
60
|
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
61
|
-
import API from '../../../api';
|
|
61
|
+
import API, { setAuthSessionToGlobalHeaders } from '../../../api';
|
|
62
62
|
import { BusinessType, DocumentPurpose, FlowsTypes, LicenseType } from '../../../@types';
|
|
63
|
-
import { handleNextScreenStep, handlePrevScreenStep, handlePublicKey, handleSetCountryByIso2, onCloseComplete } from '../../../app/settings';
|
|
63
|
+
import { handleCurrentActiveScreen, handleNextScreenStep, handlePrevScreenStep, handlePublicKey, handleSetCountryByIso2, onCloseComplete } from '../../../app/settings';
|
|
64
64
|
import { ENTITY_STEP_NAMES } from '../../../constants';
|
|
65
65
|
import moment from 'moment';
|
|
66
|
-
import { convertNumbers2English, getRecentDocumentBasedOnPurpose, hasVerifiedValue, hasNoneEditableValue, sleep, formatNumberAsCurrency, removeAllCharsFromNumber, retrieveIndividualData, sendCustomEventToGTM } from '../../../utils';
|
|
66
|
+
import { convertNumbers2English, getRecentDocumentBasedOnPurpose, hasVerifiedValue, hasNoneEditableValue, sleep, formatNumberAsCurrency, removeAllCharsFromNumber, retrieveIndividualData, sendCustomEventToGTM, isAuthenticationVerificationFailed } from '../../../utils';
|
|
67
67
|
export var verifyLeadToken = createAsyncThunk('entityVerifyLeadToken', function (_a, thunkApi) {
|
|
68
68
|
var token = _a.token, isInternally = _a.isInternally;
|
|
69
69
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -85,6 +85,7 @@ export var verifyLeadToken = createAsyncThunk('entityVerifyLeadToken', function
|
|
|
85
85
|
throw new Error(data.errors[0].description || (data === null || data === void 0 ? void 0 : data.mw_error));
|
|
86
86
|
if (isInternally)
|
|
87
87
|
data.step_name = ENTITY_STEP_NAMES.ENTITY_INFO;
|
|
88
|
+
setAuthSessionToGlobalHeaders(data === null || data === void 0 ? void 0 : data.auth_session);
|
|
88
89
|
_b = data || {}, country_code = _b.country_code, config = _b.config;
|
|
89
90
|
publicKey = config === null || config === void 0 ? void 0 : config.public_key;
|
|
90
91
|
if (country_code)
|
|
@@ -145,9 +146,9 @@ export var resendOTP = createAsyncThunk('entityResendOTP', function (params, thu
|
|
|
145
146
|
}); });
|
|
146
147
|
export var verifyEntityLeadOTP = createAsyncThunk('verifyEntityLeadOTP', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
147
148
|
var _a, entity, settings, responseBody, payload, data, _b, entity_id, config, boardId, country_code, entityData, publicKey, countryIso2, data_2, entityTypes;
|
|
148
|
-
var _c, _d, _e, _f, _g
|
|
149
|
-
return __generator(this, function (
|
|
150
|
-
switch (
|
|
149
|
+
var _c, _d, _e, _f, _g;
|
|
150
|
+
return __generator(this, function (_h) {
|
|
151
|
+
switch (_h.label) {
|
|
151
152
|
case 0:
|
|
152
153
|
_a = thunkApi.getState(), entity = _a.entity, settings = _a.settings;
|
|
153
154
|
responseBody = entity.data.verify.responseBody;
|
|
@@ -158,11 +159,14 @@ export var verifyEntityLeadOTP = createAsyncThunk('verifyEntityLeadOTP', functio
|
|
|
158
159
|
step_name: ENTITY_STEP_NAMES.PHONE_AUTH,
|
|
159
160
|
encryption_contract: ['data']
|
|
160
161
|
};
|
|
161
|
-
return [4, API.leadService.
|
|
162
|
+
return [4, API.leadService.verifyTokenOTP(payload).catch(function (err) {
|
|
163
|
+
if (isAuthenticationVerificationFailed(err === null || err === void 0 ? void 0 : err.message))
|
|
164
|
+
thunkApi.dispatch(handleNextScreenStep('ENTITY_OTP_VERIFY_SECURITY_ERROR_STEP'));
|
|
165
|
+
throw new Error(err === null || err === void 0 ? void 0 : err.message);
|
|
166
|
+
})];
|
|
162
167
|
case 1:
|
|
163
|
-
data =
|
|
164
|
-
|
|
165
|
-
throw new Error(data.errors[0].description);
|
|
168
|
+
data = _h.sent();
|
|
169
|
+
setAuthSessionToGlobalHeaders(data === null || data === void 0 ? void 0 : data.auth_session);
|
|
166
170
|
_b = data || {}, entity_id = _b.entity_id, config = _b.config, boardId = _b.id, country_code = _b.country_code;
|
|
167
171
|
entityData = undefined;
|
|
168
172
|
publicKey = config === null || config === void 0 ? void 0 : config.public_key;
|
|
@@ -174,22 +178,22 @@ export var verifyEntityLeadOTP = createAsyncThunk('verifyEntityLeadOTP', functio
|
|
|
174
178
|
if (!!entity_id) return [3, 3];
|
|
175
179
|
return [4, API.boardService.retrieveBoardDetails(boardId)];
|
|
176
180
|
case 2:
|
|
177
|
-
data_2 =
|
|
178
|
-
if (!((
|
|
181
|
+
data_2 = _h.sent();
|
|
182
|
+
if (!((_d = data_2 === null || data_2 === void 0 ? void 0 : data_2.entity) === null || _d === void 0 ? void 0 : _d.id))
|
|
179
183
|
throw new Error('entity_id_missing');
|
|
180
184
|
entityData = data_2;
|
|
181
185
|
return [3, 5];
|
|
182
186
|
case 3: return [4, API.entityService.retrieveEntity(entity_id)];
|
|
183
187
|
case 4:
|
|
184
|
-
entityData =
|
|
185
|
-
|
|
188
|
+
entityData = _h.sent();
|
|
189
|
+
_h.label = 5;
|
|
186
190
|
case 5:
|
|
187
|
-
if (!countryIso2 && ((
|
|
191
|
+
if (!countryIso2 && ((_e = entityData === null || entityData === void 0 ? void 0 : entityData.entity) === null || _e === void 0 ? void 0 : _e.country))
|
|
188
192
|
thunkApi.dispatch(handleSetCountryByIso2(entityData.entity.country));
|
|
189
|
-
(
|
|
193
|
+
(_g = (_f = settings.data.appConfig).onStepCompleted) === null || _g === void 0 ? void 0 : _g.call(_f, settings.data.activeScreen.name, { otp: params.otp });
|
|
190
194
|
return [4, API.entityService.retrieveEntityType()];
|
|
191
195
|
case 6:
|
|
192
|
-
entityTypes =
|
|
196
|
+
entityTypes = _h.sent();
|
|
193
197
|
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep('ENTITY_NAME_STEP')); });
|
|
194
198
|
return [2, {
|
|
195
199
|
data: data,
|
|
@@ -200,6 +204,58 @@ export var verifyEntityLeadOTP = createAsyncThunk('verifyEntityLeadOTP', functio
|
|
|
200
204
|
}
|
|
201
205
|
});
|
|
202
206
|
}); });
|
|
207
|
+
export var verifyLeadTokenSessionExpired = createAsyncThunk('entity/verifyLeadTokenSessionExpired', function (redirect, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
208
|
+
var entity, payload, data;
|
|
209
|
+
return __generator(this, function (_a) {
|
|
210
|
+
switch (_a.label) {
|
|
211
|
+
case 0:
|
|
212
|
+
entity = thunkApi.getState().entity;
|
|
213
|
+
payload = {
|
|
214
|
+
service_name: 'tap_email',
|
|
215
|
+
verify_token: entity.data.verify.token
|
|
216
|
+
};
|
|
217
|
+
return [4, API.leadService.verifyToken(payload)];
|
|
218
|
+
case 1:
|
|
219
|
+
data = _a.sent();
|
|
220
|
+
setAuthSessionToGlobalHeaders(data === null || data === void 0 ? void 0 : data.auth_session);
|
|
221
|
+
if (redirect)
|
|
222
|
+
thunkApi.dispatch(handleCurrentActiveScreen('ENTITY_SESSION_EXPIRED_OTP_STEP'));
|
|
223
|
+
return [2, { data: data }];
|
|
224
|
+
}
|
|
225
|
+
});
|
|
226
|
+
}); });
|
|
227
|
+
export var verifyEntityLeadOTPSessionExpired = createAsyncThunk('entity/verifyEntityLeadOTPSessionExpired', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
228
|
+
var _a, entity, settings, session, responseBody, payload, data;
|
|
229
|
+
var _b, _c, _d;
|
|
230
|
+
return __generator(this, function (_e) {
|
|
231
|
+
switch (_e.label) {
|
|
232
|
+
case 0:
|
|
233
|
+
_a = thunkApi.getState(), entity = _a.entity, settings = _a.settings, session = _a.session;
|
|
234
|
+
responseBody = entity.data.verify.responseBody;
|
|
235
|
+
payload = {
|
|
236
|
+
data: params.otp,
|
|
237
|
+
service_name: (_b = responseBody === null || responseBody === void 0 ? void 0 : responseBody.verification_by) === null || _b === void 0 ? void 0 : _b.service_name,
|
|
238
|
+
verify_token: responseBody === null || responseBody === void 0 ? void 0 : responseBody.verify_token,
|
|
239
|
+
step_name: ENTITY_STEP_NAMES.PHONE_AUTH,
|
|
240
|
+
encryption_contract: ['data']
|
|
241
|
+
};
|
|
242
|
+
return [4, API.leadService.verifyTokenOTP(payload).catch(function (err) {
|
|
243
|
+
if (isAuthenticationVerificationFailed(err === null || err === void 0 ? void 0 : err.message))
|
|
244
|
+
thunkApi.dispatch(handleCurrentActiveScreen('ENTITY_OTP_VERIFY_SECURITY_ERROR_STEP'));
|
|
245
|
+
throw new Error(err === null || err === void 0 ? void 0 : err.message);
|
|
246
|
+
})];
|
|
247
|
+
case 1:
|
|
248
|
+
data = _e.sent();
|
|
249
|
+
setAuthSessionToGlobalHeaders(data === null || data === void 0 ? void 0 : data.auth_session);
|
|
250
|
+
(_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, { otp: params.otp });
|
|
251
|
+
thunkApi.dispatch(handleCurrentActiveScreen(session.data.nextScreen));
|
|
252
|
+
return [2, {
|
|
253
|
+
data: data,
|
|
254
|
+
formData: params
|
|
255
|
+
}];
|
|
256
|
+
}
|
|
257
|
+
});
|
|
258
|
+
}); });
|
|
203
259
|
export var retrieveBoardStatus = createAsyncThunk('entity/retrieveBoardStatus', function (parmas, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
204
260
|
var entity, _a, board_id, board_info_id, recipient, _b, id, type, data;
|
|
205
261
|
return __generator(this, function (_c) {
|
|
@@ -649,9 +705,43 @@ export var entitySlice = createSlice({
|
|
|
649
705
|
state.data.entityCapitalData.capitalShareValue = formatNumberAsCurrency(shares === null || shares === void 0 ? void 0 : shares.value);
|
|
650
706
|
state.data.entityNameData = __assign(__assign({}, state.data.entityNameData), { responseBody: __assign(__assign({}, state.data.entityNameData.responseBody), { entity_id: entity === null || entity === void 0 ? void 0 : entity.id }) });
|
|
651
707
|
})
|
|
652
|
-
.addCase(verifyEntityLeadOTP.rejected, function (state,
|
|
708
|
+
.addCase(verifyEntityLeadOTP.rejected, function (state, _a) {
|
|
709
|
+
var message = _a.error.message;
|
|
653
710
|
state.loading = false;
|
|
711
|
+
if (!isAuthenticationVerificationFailed(message))
|
|
712
|
+
state.error = message;
|
|
713
|
+
})
|
|
714
|
+
.addCase(verifyLeadTokenSessionExpired.pending, function (state) {
|
|
715
|
+
state.error = null;
|
|
716
|
+
state.loading = true;
|
|
717
|
+
})
|
|
718
|
+
.addCase(verifyLeadTokenSessionExpired.fulfilled, function (state, action) {
|
|
719
|
+
state.error = null;
|
|
720
|
+
state.loading = false;
|
|
721
|
+
var data = action.payload.data;
|
|
722
|
+
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), data);
|
|
723
|
+
})
|
|
724
|
+
.addCase(verifyLeadTokenSessionExpired.rejected, function (state, action) {
|
|
654
725
|
state.error = action.error.message;
|
|
726
|
+
state.loading = false;
|
|
727
|
+
})
|
|
728
|
+
.addCase(verifyEntityLeadOTPSessionExpired.pending, function (state) {
|
|
729
|
+
state.loading = true;
|
|
730
|
+
state.error = null;
|
|
731
|
+
})
|
|
732
|
+
.addCase(verifyEntityLeadOTPSessionExpired.fulfilled, function (state, action) {
|
|
733
|
+
state.loading = false;
|
|
734
|
+
state.error = null;
|
|
735
|
+
var _a = action.payload, data = _a.data, formData = _a.formData;
|
|
736
|
+
state.data.otpData = formData;
|
|
737
|
+
state.data.otpData.responseBody = data;
|
|
738
|
+
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), data);
|
|
739
|
+
})
|
|
740
|
+
.addCase(verifyEntityLeadOTPSessionExpired.rejected, function (state, _a) {
|
|
741
|
+
var message = _a.error.message;
|
|
742
|
+
state.loading = false;
|
|
743
|
+
if (!isAuthenticationVerificationFailed(message))
|
|
744
|
+
state.error = message;
|
|
655
745
|
})
|
|
656
746
|
.addCase(updateEntityName.pending, function (state) {
|
|
657
747
|
state.loading = true;
|
|
@@ -74,6 +74,15 @@ export declare const verifyLeadOTP: import("@reduxjs/toolkit").AsyncThunk<{
|
|
|
74
74
|
};
|
|
75
75
|
userList: User[] | undefined;
|
|
76
76
|
}, OTPFormValues, {}>;
|
|
77
|
+
export declare const verifyTokenSessionExpired: import("@reduxjs/toolkit").AsyncThunk<{
|
|
78
|
+
data: any;
|
|
79
|
+
}, boolean, {}>;
|
|
80
|
+
export declare const verifyLeadOTPSessionExpired: import("@reduxjs/toolkit").AsyncThunk<{
|
|
81
|
+
data: any;
|
|
82
|
+
formData: {
|
|
83
|
+
otp: string;
|
|
84
|
+
};
|
|
85
|
+
}, OTPFormValues, {}>;
|
|
77
86
|
export declare const updatePhoneInfo: import("@reduxjs/toolkit").AsyncThunk<{
|
|
78
87
|
data: any;
|
|
79
88
|
formData: IndividualMobileFormValues;
|