@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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BusinessCountryInfo } from '../@types';
|
|
1
|
+
import { BusinessCountryInfo, CountryCode } from '../@types';
|
|
2
2
|
export declare const OTHER_BRAND: {
|
|
3
3
|
id: string;
|
|
4
4
|
code: string;
|
|
@@ -52,34 +52,7 @@ export declare const MONTHLY_INCOME_LIST: {
|
|
|
52
52
|
};
|
|
53
53
|
country_code: string[];
|
|
54
54
|
}[];
|
|
55
|
-
export declare const defaultCountry:
|
|
56
|
-
created: number;
|
|
57
|
-
updated: number;
|
|
58
|
-
countryId: string;
|
|
59
|
-
name: {
|
|
60
|
-
created: number;
|
|
61
|
-
updated: number;
|
|
62
|
-
textId: string;
|
|
63
|
-
arabic: string;
|
|
64
|
-
english: string;
|
|
65
|
-
french: string;
|
|
66
|
-
spanish: string;
|
|
67
|
-
russian: string;
|
|
68
|
-
chinese: string;
|
|
69
|
-
};
|
|
70
|
-
iso2: string;
|
|
71
|
-
iso3: string;
|
|
72
|
-
numeric: number;
|
|
73
|
-
continent: string;
|
|
74
|
-
capital: string;
|
|
75
|
-
geoNameId: string;
|
|
76
|
-
idd_prefix: number;
|
|
77
|
-
logo: string;
|
|
78
|
-
digits: number;
|
|
79
|
-
supported_by_tap: boolean;
|
|
80
|
-
min_digits: number;
|
|
81
|
-
max_digits: number;
|
|
82
|
-
};
|
|
55
|
+
export declare const defaultCountry: CountryCode;
|
|
83
56
|
export declare const SOCIAL_MEDIA_LINKS: {
|
|
84
57
|
twitter: string;
|
|
85
58
|
facebook: string;
|
package/build/constants/dummy.js
CHANGED
|
@@ -351,8 +351,8 @@ export var defaultCountry = {
|
|
|
351
351
|
created: 1577690965000,
|
|
352
352
|
updated: 1577691209000,
|
|
353
353
|
textId: 'txt_vSW31311012NdeM7214',
|
|
354
|
-
arabic: 'المملكة العربية السعودية',
|
|
355
354
|
english: 'Saudi Arabia',
|
|
355
|
+
arabic: 'المملكة العربية السعودية',
|
|
356
356
|
french: 'Arabie saoudite',
|
|
357
357
|
spanish: 'Arabia Saudita',
|
|
358
358
|
russian: 'Саудовская Аравия',
|
|
@@ -366,10 +366,10 @@ export var defaultCountry = {
|
|
|
366
366
|
geoNameId: '102358',
|
|
367
367
|
idd_prefix: 966,
|
|
368
368
|
logo: getCountryLogoPNGPath('SA'),
|
|
369
|
-
digits:
|
|
369
|
+
digits: 9,
|
|
370
370
|
supported_by_tap: true,
|
|
371
|
-
min_digits:
|
|
372
|
-
max_digits:
|
|
371
|
+
min_digits: 9,
|
|
372
|
+
max_digits: 9
|
|
373
373
|
};
|
|
374
374
|
export var SOCIAL_MEDIA_LINKS = {
|
|
375
375
|
twitter: 'https://twitter.com/gotapnow',
|
|
@@ -1,26 +1,31 @@
|
|
|
1
|
-
export declare enum KYC_FLOWS {
|
|
2
|
-
loadingData = "KYC_LOADING_DATA_STEP",
|
|
3
|
-
alreadySubmitted = "ALREADY_SUBMITTED",
|
|
4
|
-
tokenError = "TOKEN_ERROR_STEP",
|
|
5
|
-
verify = "KYC_VERIFY_STEP",
|
|
6
|
-
terms = "KYC_TERMS_STEP",
|
|
7
|
-
users = "KYC_USERS_STEP",
|
|
8
|
-
operatorError = "KYC_OPERATOR_ERROR_STEP",
|
|
9
|
-
verifyPACI = "KYC_VERIFY_PACI_STEP",
|
|
10
|
-
verifyNafath = "KYC_VERIFY_NAFATH_STEP",
|
|
11
|
-
success = "KYC_SUCCESS_STEP"
|
|
12
|
-
}
|
|
13
1
|
export declare const CONNECT_FLOWS: {
|
|
14
2
|
kyc: {
|
|
15
|
-
loadingData:
|
|
16
|
-
alreadySubmitted:
|
|
17
|
-
tokenError:
|
|
18
|
-
verify:
|
|
19
|
-
terms:
|
|
20
|
-
users:
|
|
21
|
-
operatorError:
|
|
22
|
-
verifyPACI:
|
|
23
|
-
verifyNafath:
|
|
24
|
-
success:
|
|
3
|
+
loadingData: string;
|
|
4
|
+
alreadySubmitted: string;
|
|
5
|
+
tokenError: string;
|
|
6
|
+
verify: string;
|
|
7
|
+
terms: string;
|
|
8
|
+
users: string;
|
|
9
|
+
operatorError: string;
|
|
10
|
+
verifyPACI: string;
|
|
11
|
+
verifyNafath: string;
|
|
12
|
+
success: string;
|
|
13
|
+
};
|
|
14
|
+
terminal: {
|
|
15
|
+
loadingData: string;
|
|
16
|
+
operatorError: string;
|
|
17
|
+
verify: string;
|
|
18
|
+
noTerminalLinked: string;
|
|
19
|
+
terminalDeviceList: string;
|
|
20
|
+
terminalLinkNew: string;
|
|
21
|
+
linkedTerminalInfo: string;
|
|
22
|
+
unlinkedTerminalInfo: string;
|
|
23
|
+
terminalLinkedSuccess: string;
|
|
24
|
+
terminalUnlinkedSuccess: string;
|
|
25
|
+
board: string;
|
|
26
|
+
resetPassword: string;
|
|
27
|
+
posDeviceList: string;
|
|
28
|
+
otpVerifySecurityError: string;
|
|
29
|
+
otpSessionExpired: string;
|
|
25
30
|
};
|
|
26
31
|
};
|
package/build/constants/flows.js
CHANGED
|
@@ -1,27 +1,31 @@
|
|
|
1
|
-
export var KYC_FLOWS;
|
|
2
|
-
(function (KYC_FLOWS) {
|
|
3
|
-
KYC_FLOWS["loadingData"] = "KYC_LOADING_DATA_STEP";
|
|
4
|
-
KYC_FLOWS["alreadySubmitted"] = "ALREADY_SUBMITTED";
|
|
5
|
-
KYC_FLOWS["tokenError"] = "TOKEN_ERROR_STEP";
|
|
6
|
-
KYC_FLOWS["verify"] = "KYC_VERIFY_STEP";
|
|
7
|
-
KYC_FLOWS["terms"] = "KYC_TERMS_STEP";
|
|
8
|
-
KYC_FLOWS["users"] = "KYC_USERS_STEP";
|
|
9
|
-
KYC_FLOWS["operatorError"] = "KYC_OPERATOR_ERROR_STEP";
|
|
10
|
-
KYC_FLOWS["verifyPACI"] = "KYC_VERIFY_PACI_STEP";
|
|
11
|
-
KYC_FLOWS["verifyNafath"] = "KYC_VERIFY_NAFATH_STEP";
|
|
12
|
-
KYC_FLOWS["success"] = "KYC_SUCCESS_STEP";
|
|
13
|
-
})(KYC_FLOWS || (KYC_FLOWS = {}));
|
|
14
1
|
export var CONNECT_FLOWS = {
|
|
15
2
|
kyc: {
|
|
16
|
-
loadingData:
|
|
17
|
-
alreadySubmitted:
|
|
18
|
-
tokenError:
|
|
19
|
-
verify:
|
|
20
|
-
terms:
|
|
21
|
-
users:
|
|
22
|
-
operatorError:
|
|
23
|
-
verifyPACI:
|
|
24
|
-
verifyNafath:
|
|
25
|
-
success:
|
|
3
|
+
loadingData: 'KYC_LOADING_DATA_STEP',
|
|
4
|
+
alreadySubmitted: 'ALREADY_SUBMITTED',
|
|
5
|
+
tokenError: 'TOKEN_ERROR_STEP',
|
|
6
|
+
verify: 'KYC_VERIFY_STEP',
|
|
7
|
+
terms: 'KYC_TERMS_STEP',
|
|
8
|
+
users: 'KYC_USERS_STEP',
|
|
9
|
+
operatorError: 'KYC_OPERATOR_ERROR_STEP',
|
|
10
|
+
verifyPACI: 'KYC_VERIFY_PACI_STEP',
|
|
11
|
+
verifyNafath: 'KYC_VERIFY_NAFATH_STEP',
|
|
12
|
+
success: 'KYC_SUCCESS_STEP'
|
|
13
|
+
},
|
|
14
|
+
terminal: {
|
|
15
|
+
loadingData: 'TERMINAL_LOADING_DATA_STEP',
|
|
16
|
+
operatorError: 'TERMINAL_OPERATOR_ERROR_STEP',
|
|
17
|
+
verify: 'TERMINAL_VERIFY_OTP_STEP',
|
|
18
|
+
noTerminalLinked: 'TERMINAL_NO_TERMINAL_LINKED',
|
|
19
|
+
terminalDeviceList: 'TERMINAL_DEVICE_LIST_STEP',
|
|
20
|
+
terminalLinkNew: 'TERMINAL_LINK_NEW_STEP',
|
|
21
|
+
linkedTerminalInfo: 'TERMINAL_LINKED_INFO_STEP',
|
|
22
|
+
unlinkedTerminalInfo: 'TERMINAL_UNLINKED_INFO_STEP',
|
|
23
|
+
terminalLinkedSuccess: 'TERMINAL_LINKED_SUCCESS_STEP',
|
|
24
|
+
terminalUnlinkedSuccess: 'TERMINAL_UNLINKED_SUCCESS_STEP',
|
|
25
|
+
board: 'TERMINAL_BOARD_STEP',
|
|
26
|
+
resetPassword: 'TERMINAL_RESET_PASSWORD',
|
|
27
|
+
posDeviceList: 'TERMINAL_POS_DEVICE_LIST_STEP',
|
|
28
|
+
otpVerifySecurityError: 'TERMINAL_OTP_VERIFY_SECURITY_ERROR_STEP',
|
|
29
|
+
otpSessionExpired: 'TERMINAL_SESSION_EXPIRED_OTP_STEP'
|
|
26
30
|
}
|
|
27
31
|
};
|
|
@@ -10,6 +10,7 @@ export declare const LICENSE_NUMBER_MIN_LENGTH = 5;
|
|
|
10
10
|
export declare const FL_NUMBER_ENTITY_LENGTH = 50;
|
|
11
11
|
export declare const FL_MIN_LICENSE_LENGTH = 5;
|
|
12
12
|
export declare const CR_MIN_LICENSE_LENGTH = 5;
|
|
13
|
+
export declare const UNIFIED_NUMBER_MIN_LENGTH = 2;
|
|
13
14
|
export declare const MAX_EMAIL_LENGTH = 50;
|
|
14
15
|
export declare const BRAND_NAME_MAX_LENGTH = 99;
|
|
15
16
|
export declare const KW_MIN_LICENSE_LENGTH = 3;
|
|
@@ -32,3 +33,4 @@ export declare const DIGITS_ONLY: RegExp;
|
|
|
32
33
|
export declare const REGEX_PHONE_APP_NAME: RegExp;
|
|
33
34
|
export declare const REGEX_IBAN: RegExp;
|
|
34
35
|
export declare const NAFATH_PACI_TIMEOUT_DURATION = 30000;
|
|
36
|
+
export declare const TERMINAL_PUSH_NOTIFICATION_DURATION = 10000000;
|
|
@@ -10,6 +10,7 @@ export var LICENSE_NUMBER_MIN_LENGTH = 5;
|
|
|
10
10
|
export var FL_NUMBER_ENTITY_LENGTH = 50;
|
|
11
11
|
export var FL_MIN_LICENSE_LENGTH = 5;
|
|
12
12
|
export var CR_MIN_LICENSE_LENGTH = 5;
|
|
13
|
+
export var UNIFIED_NUMBER_MIN_LENGTH = 2;
|
|
13
14
|
export var MAX_EMAIL_LENGTH = 50;
|
|
14
15
|
export var BRAND_NAME_MAX_LENGTH = 99;
|
|
15
16
|
export var KW_MIN_LICENSE_LENGTH = 3;
|
|
@@ -32,3 +33,4 @@ export var DIGITS_ONLY = /^\d+$/;
|
|
|
32
33
|
export var REGEX_PHONE_APP_NAME = /^[a-zA-Z0-9[._-]*$/;
|
|
33
34
|
export var REGEX_IBAN = /^[a-zA-Z]{2}[a-zA-Z0-9]{13,34}$/g;
|
|
34
35
|
export var NAFATH_PACI_TIMEOUT_DURATION = 30000;
|
|
36
|
+
export var TERMINAL_PUSH_NOTIFICATION_DURATION = 10000000;
|
|
@@ -22,6 +22,10 @@ export declare const resendMobileAuthOTP: import("@reduxjs/toolkit").AsyncThunk<
|
|
|
22
22
|
formData: MobileFormValues;
|
|
23
23
|
}, MobileFormValues, {}>;
|
|
24
24
|
export declare const verifyMobileOtp: import("@reduxjs/toolkit").AsyncThunk<any, OTPFormValues, {}>;
|
|
25
|
+
export declare const createAuthSessionExpired: import("@reduxjs/toolkit").AsyncThunk<{
|
|
26
|
+
response: any;
|
|
27
|
+
}, boolean, {}>;
|
|
28
|
+
export declare const verifySessionExpiredOtp: import("@reduxjs/toolkit").AsyncThunk<any, OTPFormValues, {}>;
|
|
25
29
|
export declare const verifyPasscode: import("@reduxjs/toolkit").AsyncThunk<any, PasscodeFormValues, {}>;
|
|
26
30
|
interface CreateEmailAuthParams extends AuthEmailFormValues {
|
|
27
31
|
skipPasscode?: boolean;
|
|
@@ -69,9 +69,9 @@ var _a;
|
|
|
69
69
|
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
70
70
|
import { AuthForType, AuthTypeNumber, FlowsTypes, MigrationStatus } from '../../../@types';
|
|
71
71
|
import { ADD_NEW_ENTITY, AUTH_STEP_NAMES, COLLECT_DOB_INFO_NAFATH, IDENTIFICATION_TYPE, NAFATH_PACI_TIMEOUT_DURATION, NAFATH_VERIFICATION_FAILED, SCOPE_AUTH, defaultCountry } from '../../../constants';
|
|
72
|
-
import API from '../../../api';
|
|
72
|
+
import API, { setAuthSessionToGlobalHeaders } from '../../../api';
|
|
73
73
|
import { handleCurrentActiveScreen, handleNextScreenStep, handleOpen, handlePrevScreenStep, handleSetCountryByIso2 } from '../../../app/settings';
|
|
74
|
-
import { findCountryByIddPrefix, isNetworkError, isTimeoutError, openConnect, sendCustomEventToGTM, sleep } from '../../../utils';
|
|
74
|
+
import { findCountryByIddPrefix, isAuthenticationVerificationFailed, isNetworkError, isTimeoutError, openConnect, sendCustomEventToGTM, sleep } from '../../../utils';
|
|
75
75
|
export var updateBusinessCountry = createAsyncThunk('auth/updateBusinessCountry', function (countryCode, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
76
76
|
var auth, payload, data;
|
|
77
77
|
return __generator(this, function (_a) {
|
|
@@ -178,9 +178,9 @@ export var resendMobileAuthOTP = createAsyncThunk('auth/resendMobileAuthOTP', fu
|
|
|
178
178
|
}); });
|
|
179
179
|
export var verifyMobileOtp = createAsyncThunk('auth/verifyMobileOtp', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
180
180
|
var _a, settings, auth, _b, responseData, leadId, _c, auth_token, device_token, service_name, auth_type, sign_in, scope, payload, data;
|
|
181
|
-
var _d, _e, _f
|
|
182
|
-
return __generator(this, function (
|
|
183
|
-
switch (
|
|
181
|
+
var _d, _e, _f;
|
|
182
|
+
return __generator(this, function (_g) {
|
|
183
|
+
switch (_g.label) {
|
|
184
184
|
case 0:
|
|
185
185
|
_a = thunkApi.getState(), settings = _a.settings, auth = _a.auth;
|
|
186
186
|
_b = auth.data || {}, responseData = _b.responseData, leadId = _b.leadId;
|
|
@@ -199,11 +199,14 @@ export var verifyMobileOtp = createAsyncThunk('auth/verifyMobileOtp', function (
|
|
|
199
199
|
step_name: AUTH_STEP_NAMES.VERIFY_AUTH_MOBILE,
|
|
200
200
|
encryption_contract: ['data']
|
|
201
201
|
};
|
|
202
|
-
return [4, API.authService.verifyAuth(payload)
|
|
202
|
+
return [4, API.authService.verifyAuth(payload).catch(function (err) {
|
|
203
|
+
if (isAuthenticationVerificationFailed(err === null || err === void 0 ? void 0 : err.message))
|
|
204
|
+
thunkApi.dispatch(handleNextScreenStep('AUTH_OTP_VERIFY_SECURITY_ERROR_STEP'));
|
|
205
|
+
throw new Error(err === null || err === void 0 ? void 0 : err.message);
|
|
206
|
+
})];
|
|
203
207
|
case 1:
|
|
204
|
-
data =
|
|
205
|
-
|
|
206
|
-
throw new Error(data.errors[0].description);
|
|
208
|
+
data = _g.sent();
|
|
209
|
+
setAuthSessionToGlobalHeaders(data === null || data === void 0 ? void 0 : data.auth_session);
|
|
207
210
|
sendCustomEventToGTM({
|
|
208
211
|
event: 'Send Event',
|
|
209
212
|
event_category: 'User Registration Flow',
|
|
@@ -213,17 +216,86 @@ export var verifyMobileOtp = createAsyncThunk('auth/verifyMobileOtp', function (
|
|
|
213
216
|
openConnect(settings.data.appConfig.publicKey, settings.data.businessCountry.iso2);
|
|
214
217
|
return [2, data];
|
|
215
218
|
}
|
|
216
|
-
(
|
|
219
|
+
(_f = (_e = settings.data.appConfig).onStepCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, settings.data.activeScreen.name, params);
|
|
217
220
|
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep('AUTH_PREPARING_DATA_STEP')); });
|
|
218
221
|
return [2, data];
|
|
219
222
|
}
|
|
220
223
|
});
|
|
221
224
|
}); });
|
|
225
|
+
export var createAuthSessionExpired = createAsyncThunk('auth/createAuthSessionExpired', function (redirect, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
226
|
+
var _a, settings, auth, requestBody, data;
|
|
227
|
+
var _b, _c;
|
|
228
|
+
return __generator(this, function (_d) {
|
|
229
|
+
switch (_d.label) {
|
|
230
|
+
case 0:
|
|
231
|
+
_a = thunkApi.getState(), settings = _a.settings, auth = _a.auth;
|
|
232
|
+
requestBody = {
|
|
233
|
+
country: settings.data.businessCountry.iso2,
|
|
234
|
+
scope: settings.data.appConfig.scope,
|
|
235
|
+
lang: settings.data.language,
|
|
236
|
+
lead_id: auth.data.leadId,
|
|
237
|
+
sign_in: false,
|
|
238
|
+
login: true,
|
|
239
|
+
is_lead: true,
|
|
240
|
+
step_name: AUTH_STEP_NAMES.CREATE_AUTH_SESSION_EXPIRED,
|
|
241
|
+
encryption_contract: []
|
|
242
|
+
};
|
|
243
|
+
return [4, API.authService.createAuth(requestBody)];
|
|
244
|
+
case 1:
|
|
245
|
+
data = _d.sent();
|
|
246
|
+
if (redirect)
|
|
247
|
+
thunkApi.dispatch(handleCurrentActiveScreen('AUTH_SESSION_EXPIRED_OTP_STEP'));
|
|
248
|
+
(_c = (_b = settings.data.appConfig).onStepCompleted) === null || _c === void 0 ? void 0 : _c.call(_b, settings.data.activeScreen.name, requestBody);
|
|
249
|
+
return [2, { response: data }];
|
|
250
|
+
}
|
|
251
|
+
});
|
|
252
|
+
}); });
|
|
253
|
+
export var verifySessionExpiredOtp = createAsyncThunk('auth/verifySessionExpiredOtp', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
254
|
+
var _a, settings, auth, session, _b, responseData, leadId, _c, auth_token, device_token, service_name, auth_type, sign_in, payload, data;
|
|
255
|
+
var _d, _e, _f;
|
|
256
|
+
return __generator(this, function (_g) {
|
|
257
|
+
switch (_g.label) {
|
|
258
|
+
case 0:
|
|
259
|
+
_a = thunkApi.getState(), settings = _a.settings, auth = _a.auth, session = _a.session;
|
|
260
|
+
_b = auth.data || {}, responseData = _b.responseData, leadId = _b.leadId;
|
|
261
|
+
_c = (_d = responseData === null || responseData === void 0 ? void 0 : responseData.authResponse) !== null && _d !== void 0 ? _d : {}, auth_token = _c.auth_token, device_token = _c.device_token, service_name = _c.service_name, auth_type = _c.auth_type, sign_in = _c.sign_in;
|
|
262
|
+
if (!auth_token)
|
|
263
|
+
throw new Error('Auth token is missing');
|
|
264
|
+
payload = {
|
|
265
|
+
auth_token: auth_token,
|
|
266
|
+
lead_id: leadId,
|
|
267
|
+
data: params.otp,
|
|
268
|
+
auth_type: auth_type,
|
|
269
|
+
device_token: device_token,
|
|
270
|
+
service_name: service_name,
|
|
271
|
+
sign_in: sign_in,
|
|
272
|
+
step_name: AUTH_STEP_NAMES.VERIFY_AUTH_SESSION_EXPIRED,
|
|
273
|
+
encryption_contract: ['data']
|
|
274
|
+
};
|
|
275
|
+
return [4, API.authService.verifyAuth(payload).catch(function (err) {
|
|
276
|
+
if (isAuthenticationVerificationFailed(err === null || err === void 0 ? void 0 : err.message))
|
|
277
|
+
thunkApi.dispatch(handleCurrentActiveScreen(session.data.nextScreen));
|
|
278
|
+
throw new Error(err === null || err === void 0 ? void 0 : err.message);
|
|
279
|
+
})];
|
|
280
|
+
case 1:
|
|
281
|
+
data = _g.sent();
|
|
282
|
+
setAuthSessionToGlobalHeaders(data === null || data === void 0 ? void 0 : data.auth_session);
|
|
283
|
+
sendCustomEventToGTM({
|
|
284
|
+
event: 'Send Event',
|
|
285
|
+
event_category: 'User Registration Flow',
|
|
286
|
+
event_action: 'Session Expired - OTP Success'
|
|
287
|
+
});
|
|
288
|
+
(_f = (_e = settings.data.appConfig).onStepCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, settings.data.activeScreen.name, params);
|
|
289
|
+
thunkApi.dispatch(handleCurrentActiveScreen(session.data.nextScreen));
|
|
290
|
+
return [2, data];
|
|
291
|
+
}
|
|
292
|
+
});
|
|
293
|
+
}); });
|
|
222
294
|
export var verifyPasscode = createAsyncThunk('auth/verifyPasscode', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
223
295
|
var _a, settings, auth, _b, responseData, leadId, _c, auth_token, device_token, service_name, auth_type, sign_in, scope, payload, data, stepName_1;
|
|
224
|
-
var _d, _e, _f, _g, _h
|
|
225
|
-
return __generator(this, function (
|
|
226
|
-
switch (
|
|
296
|
+
var _d, _e, _f, _g, _h;
|
|
297
|
+
return __generator(this, function (_j) {
|
|
298
|
+
switch (_j.label) {
|
|
227
299
|
case 0:
|
|
228
300
|
_a = thunkApi.getState(), settings = _a.settings, auth = _a.auth;
|
|
229
301
|
_b = auth.data || {}, responseData = _b.responseData, leadId = _b.leadId;
|
|
@@ -242,12 +314,15 @@ export var verifyPasscode = createAsyncThunk('auth/verifyPasscode', function (pa
|
|
|
242
314
|
step_name: AUTH_STEP_NAMES.CREATE_AUTH_PASSCODE,
|
|
243
315
|
encryption_contract: ['data']
|
|
244
316
|
};
|
|
245
|
-
return [4, API.authService.verifyAuth(payload)
|
|
317
|
+
return [4, API.authService.verifyAuth(payload).catch(function (err) {
|
|
318
|
+
if (isAuthenticationVerificationFailed(err === null || err === void 0 ? void 0 : err.message))
|
|
319
|
+
thunkApi.dispatch(handleNextScreenStep('AUTH_OTP_VERIFY_SECURITY_ERROR_STEP'));
|
|
320
|
+
throw new Error(err === null || err === void 0 ? void 0 : err.message);
|
|
321
|
+
})];
|
|
246
322
|
case 1:
|
|
247
|
-
data =
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
if (((_f = data === null || data === void 0 ? void 0 : data.status) === null || _f === void 0 ? void 0 : _f.toLowerCase()) === 'success' && (data === null || data === void 0 ? void 0 : data.auth_session)) {
|
|
323
|
+
data = _j.sent();
|
|
324
|
+
setAuthSessionToGlobalHeaders(data === null || data === void 0 ? void 0 : data.auth_session);
|
|
325
|
+
if (((_e = data === null || data === void 0 ? void 0 : data.status) === null || _e === void 0 ? void 0 : _e.toLowerCase()) === 'success' && (data === null || data === void 0 ? void 0 : data.auth_session)) {
|
|
251
326
|
if (scope === 'merchant') {
|
|
252
327
|
openConnect(settings.data.appConfig.publicKey, settings.data.businessCountry.iso2);
|
|
253
328
|
return [2, data];
|
|
@@ -255,10 +330,10 @@ export var verifyPasscode = createAsyncThunk('auth/verifyPasscode', function (pa
|
|
|
255
330
|
stepName_1 = 'AUTH_PREPARING_DATA_STEP';
|
|
256
331
|
if ((data === null || data === void 0 ? void 0 : data.auth_type) === AuthTypeNumber.MIGRATION)
|
|
257
332
|
stepName_1 = 'AUTH_MIGRATING_DATA_STEP';
|
|
258
|
-
(
|
|
333
|
+
(_g = (_f = settings.data.appConfig).onStepCompleted) === null || _g === void 0 ? void 0 : _g.call(_f, settings.data.activeScreen.name, params);
|
|
259
334
|
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep(stepName_1)); });
|
|
260
335
|
}
|
|
261
|
-
else if (((
|
|
336
|
+
else if (((_h = data === null || data === void 0 ? void 0 : data.status) === null || _h === void 0 ? void 0 : _h.toLowerCase()) === 'pending') {
|
|
262
337
|
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep('AUTH_OTP_STEP')); });
|
|
263
338
|
}
|
|
264
339
|
return [2, data];
|
|
@@ -297,9 +372,9 @@ export var createEmailAuth = createAsyncThunk('auth/createEmailAuth', function (
|
|
|
297
372
|
}); });
|
|
298
373
|
export var verifyEmailPassword = createAsyncThunk('auth/verifyEmailPassword', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
299
374
|
var _a, settings, auth, _b, responseData, leadId, _c, auth_token, device_token, service_name, auth_type, sign_in, scope, payload, data;
|
|
300
|
-
var _d, _e, _f
|
|
301
|
-
return __generator(this, function (
|
|
302
|
-
switch (
|
|
375
|
+
var _d, _e, _f;
|
|
376
|
+
return __generator(this, function (_g) {
|
|
377
|
+
switch (_g.label) {
|
|
303
378
|
case 0:
|
|
304
379
|
_a = thunkApi.getState(), settings = _a.settings, auth = _a.auth;
|
|
305
380
|
_b = auth.data || {}, responseData = _b.responseData, leadId = _b.leadId;
|
|
@@ -321,9 +396,8 @@ export var verifyEmailPassword = createAsyncThunk('auth/verifyEmailPassword', fu
|
|
|
321
396
|
};
|
|
322
397
|
return [4, API.authService.verifyAuth(payload)];
|
|
323
398
|
case 1:
|
|
324
|
-
data =
|
|
325
|
-
|
|
326
|
-
throw new Error(data.errors[0].description);
|
|
399
|
+
data = _g.sent();
|
|
400
|
+
setAuthSessionToGlobalHeaders(data === null || data === void 0 ? void 0 : data.auth_session);
|
|
327
401
|
if ((data === null || data === void 0 ? void 0 : data.auth_type) === AuthTypeNumber.MOBILE_OTP) {
|
|
328
402
|
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep('AUTH_OTP_STEP')); });
|
|
329
403
|
return [2, data];
|
|
@@ -332,7 +406,7 @@ export var verifyEmailPassword = createAsyncThunk('auth/verifyEmailPassword', fu
|
|
|
332
406
|
openConnect(settings.data.appConfig.publicKey, settings.data.businessCountry.iso2);
|
|
333
407
|
return [2, data];
|
|
334
408
|
}
|
|
335
|
-
(
|
|
409
|
+
(_f = (_e = settings.data.appConfig).onStepCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, settings.data.activeScreen.name, params);
|
|
336
410
|
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep('AUTH_PREPARING_DATA_STEP')); });
|
|
337
411
|
return [2, data];
|
|
338
412
|
}
|
|
@@ -363,9 +437,9 @@ export var resendEmailAuthOTP = createAsyncThunk('auth/resendEmailAuthOTP', func
|
|
|
363
437
|
}); });
|
|
364
438
|
export var verifyEmailOtp = createAsyncThunk('auth/verifyEmailOtp', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
365
439
|
var _a, settings, auth, _b, responseData, leadId, _c, auth_token, device_token, service_name, auth_type, sign_in, scope, payload, data, stepName;
|
|
366
|
-
var _d, _e, _f
|
|
367
|
-
return __generator(this, function (
|
|
368
|
-
switch (
|
|
440
|
+
var _d, _e, _f;
|
|
441
|
+
return __generator(this, function (_g) {
|
|
442
|
+
switch (_g.label) {
|
|
369
443
|
case 0:
|
|
370
444
|
_a = thunkApi.getState(), settings = _a.settings, auth = _a.auth;
|
|
371
445
|
_b = auth.data || {}, responseData = _b.responseData, leadId = _b.leadId;
|
|
@@ -385,11 +459,14 @@ export var verifyEmailOtp = createAsyncThunk('auth/verifyEmailOtp', function (pa
|
|
|
385
459
|
step_name: AUTH_STEP_NAMES.VERIFY_AUTH_MOBILE,
|
|
386
460
|
encryption_contract: ['data']
|
|
387
461
|
};
|
|
388
|
-
return [4, API.authService.verifyAuth(payload)
|
|
462
|
+
return [4, API.authService.verifyAuth(payload).catch(function (err) {
|
|
463
|
+
if (isAuthenticationVerificationFailed(err === null || err === void 0 ? void 0 : err.message))
|
|
464
|
+
thunkApi.dispatch(handleNextScreenStep('AUTH_OTP_VERIFY_SECURITY_ERROR_STEP'));
|
|
465
|
+
throw new Error(err === null || err === void 0 ? void 0 : err.message);
|
|
466
|
+
})];
|
|
389
467
|
case 1:
|
|
390
|
-
data =
|
|
391
|
-
|
|
392
|
-
throw new Error(data.errors[0].description);
|
|
468
|
+
data = _g.sent();
|
|
469
|
+
setAuthSessionToGlobalHeaders(data === null || data === void 0 ? void 0 : data.auth_session);
|
|
393
470
|
sendCustomEventToGTM({
|
|
394
471
|
event: 'Send Event',
|
|
395
472
|
event_category: 'User Registration Flow',
|
|
@@ -402,7 +479,7 @@ export var verifyEmailOtp = createAsyncThunk('auth/verifyEmailOtp', function (pa
|
|
|
402
479
|
stepName = 'AUTH_PREPARING_DATA_STEP';
|
|
403
480
|
if ((data === null || data === void 0 ? void 0 : data.auth_type) === AuthTypeNumber.MIGRATION)
|
|
404
481
|
stepName = 'AUTH_MIGRATING_DATA_STEP';
|
|
405
|
-
(
|
|
482
|
+
(_f = (_e = settings.data.appConfig).onStepCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, settings.data.activeScreen.name, params);
|
|
406
483
|
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep(stepName)); });
|
|
407
484
|
return [2, data];
|
|
408
485
|
}
|
|
@@ -481,6 +558,7 @@ export var verifyNafath = createAsyncThunk('auth/verifyNafath', function (params
|
|
|
481
558
|
return [2, { value: data }];
|
|
482
559
|
}
|
|
483
560
|
if (isSuccess) {
|
|
561
|
+
setAuthSessionToGlobalHeaders(data === null || data === void 0 ? void 0 : data.auth_session);
|
|
484
562
|
if (scope === 'merchant') {
|
|
485
563
|
openConnect(settings.data.appConfig.publicKey, settings.data.businessCountry.iso2);
|
|
486
564
|
return [2, { value: data }];
|
|
@@ -606,6 +684,7 @@ export var verifyPACI = createAsyncThunk('auth/verifyPACI', function (params, th
|
|
|
606
684
|
case 5:
|
|
607
685
|
isSuccess = ((_b = data === null || data === void 0 ? void 0 : data.status) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === 'success';
|
|
608
686
|
if (isSuccess) {
|
|
687
|
+
setAuthSessionToGlobalHeaders(data === null || data === void 0 ? void 0 : data.auth_session);
|
|
609
688
|
if (scope === 'merchant') {
|
|
610
689
|
openConnect(settings.data.appConfig.publicKey, settings.data.businessCountry.iso2);
|
|
611
690
|
return [2, data];
|
|
@@ -677,36 +756,36 @@ export var checkMigrationStatus = createAsyncThunk('auth/checkMigrationStatus',
|
|
|
677
756
|
});
|
|
678
757
|
}); });
|
|
679
758
|
export var checkAccountAvailability = createAsyncThunk('auth/checkAccountAvailability', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
680
|
-
var _a, settings, auth, authConfigData, authDataHasValue, isDataHasIndividualOnly, data, authId, accountData,
|
|
681
|
-
var
|
|
682
|
-
return __generator(this, function (
|
|
683
|
-
switch (
|
|
759
|
+
var _a, settings, auth, authConfigData, authDataHasValue, isDataHasIndividualOnly, data, _b, authId, auth_session, accountData, _c, step_name, brands, entities, brandList, entityList, isExistingUser;
|
|
760
|
+
var _d;
|
|
761
|
+
return __generator(this, function (_e) {
|
|
762
|
+
switch (_e.label) {
|
|
684
763
|
case 0:
|
|
685
764
|
_a = thunkApi.getState(), settings = _a.settings, auth = _a.auth;
|
|
686
765
|
authConfigData = settings.data.appConfig.data;
|
|
687
766
|
authDataHasValue = authConfigData === null || authConfigData === void 0 ? void 0 : authConfigData.length;
|
|
688
767
|
isDataHasIndividualOnly = (authConfigData === null || authConfigData === void 0 ? void 0 : authConfigData.length) === 1 && authConfigData.includes('individual');
|
|
689
|
-
data = (
|
|
690
|
-
|
|
768
|
+
data = (_d = auth.data.responseData) === null || _d === void 0 ? void 0 : _d.authResponse;
|
|
769
|
+
_b = data || {}, authId = _b.id, auth_session = _b.auth_session;
|
|
691
770
|
accountData = undefined;
|
|
692
771
|
if (!isDataHasIndividualOnly) return [3, 2];
|
|
693
|
-
return [4, API.accountService.checkAccountAvailabilityStatus(data === null || data === void 0 ? void 0 : data.individual_id)];
|
|
772
|
+
return [4, API.accountService.checkAccountAvailabilityStatus(data === null || data === void 0 ? void 0 : data.individual_id, auth_session)];
|
|
694
773
|
case 1:
|
|
695
|
-
accountData =
|
|
774
|
+
accountData = _e.sent();
|
|
696
775
|
return [3, 4];
|
|
697
|
-
case 2: return [4, API.accountService.checkAccountAvailability(data === null || data === void 0 ? void 0 : data.individual_id)];
|
|
776
|
+
case 2: return [4, API.accountService.checkAccountAvailability(data === null || data === void 0 ? void 0 : data.individual_id, auth_session)];
|
|
698
777
|
case 3:
|
|
699
|
-
accountData =
|
|
700
|
-
|
|
778
|
+
accountData = _e.sent();
|
|
779
|
+
_e.label = 4;
|
|
701
780
|
case 4:
|
|
702
|
-
|
|
781
|
+
_c = accountData || {}, step_name = _c.step_name, brands = _c.brands, entities = _c.entities;
|
|
703
782
|
brandList = brands || [];
|
|
704
783
|
entityList = entities || [];
|
|
705
784
|
isExistingUser = step_name === 'select_account';
|
|
706
785
|
if (!(isExistingUser && isDataHasIndividualOnly && authId)) return [3, 6];
|
|
707
786
|
return [4, thunkApi.dispatch(confirmInfo({ authId: authId }))];
|
|
708
787
|
case 5:
|
|
709
|
-
|
|
788
|
+
_e.sent();
|
|
710
789
|
return [2, { brandList: brandList, entityList: entityList }];
|
|
711
790
|
case 6:
|
|
712
791
|
if (isExistingUser && authDataHasValue && brandList.length && entityList.length) {
|
|
@@ -803,7 +882,7 @@ export var confirmInfo = createAsyncThunk('auth/confirmInfo', function (_a, thun
|
|
|
803
882
|
entity_id: (entityInfo === null || entityInfo === void 0 ? void 0 : entityInfo.id) || '',
|
|
804
883
|
data: settings.data.appConfig.data || []
|
|
805
884
|
};
|
|
806
|
-
return [4, API.operatorService.confirm(body)];
|
|
885
|
+
return [4, API.operatorService.confirm(body, authResponse === null || authResponse === void 0 ? void 0 : authResponse.auth_session)];
|
|
807
886
|
case 1:
|
|
808
887
|
data = _k.sent();
|
|
809
888
|
(_g = (_f = settings.data.appConfig).onStepCompleted) === null || _g === void 0 ? void 0 : _g.call(_f, settings.data.activeScreen.name, data);
|
|
@@ -1027,9 +1106,40 @@ export var authSlice = createSlice({
|
|
|
1027
1106
|
state.data.passcodeData.skipPasscode = false;
|
|
1028
1107
|
state.data.passcodeData.allowOTPToPasscodeRedirection = false;
|
|
1029
1108
|
})
|
|
1030
|
-
.addCase(verifyMobileOtp.rejected, function (state,
|
|
1109
|
+
.addCase(verifyMobileOtp.rejected, function (state, _a) {
|
|
1110
|
+
var message = _a.error.message;
|
|
1111
|
+
state.loading = false;
|
|
1112
|
+
if (!isAuthenticationVerificationFailed(message))
|
|
1113
|
+
state.error = message;
|
|
1114
|
+
})
|
|
1115
|
+
.addCase(createAuthSessionExpired.pending, function (state) {
|
|
1116
|
+
state.loading = true;
|
|
1117
|
+
state.error = null;
|
|
1118
|
+
})
|
|
1119
|
+
.addCase(createAuthSessionExpired.fulfilled, function (state, action) {
|
|
1120
|
+
state.loading = false;
|
|
1121
|
+
state.data.otpData.authFor = AuthForType.MOBILE;
|
|
1122
|
+
state.data.responseData = __assign(__assign({}, state.data.responseData), { authResponse: action.payload.response });
|
|
1123
|
+
})
|
|
1124
|
+
.addCase(createAuthSessionExpired.rejected, function (state, action) {
|
|
1031
1125
|
state.loading = false;
|
|
1032
1126
|
state.error = action.error.message;
|
|
1127
|
+
})
|
|
1128
|
+
.addCase(verifySessionExpiredOtp.pending, function (state) {
|
|
1129
|
+
state.loading = true;
|
|
1130
|
+
state.error = null;
|
|
1131
|
+
})
|
|
1132
|
+
.addCase(verifySessionExpiredOtp.fulfilled, function (state, action) {
|
|
1133
|
+
var _a;
|
|
1134
|
+
state.loading = false;
|
|
1135
|
+
var data = action.payload;
|
|
1136
|
+
state.data.responseData = __assign(__assign({}, state.data.responseData), { authResponse: __assign(__assign({}, (_a = state.data.responseData) === null || _a === void 0 ? void 0 : _a.authResponse), data) });
|
|
1137
|
+
})
|
|
1138
|
+
.addCase(verifySessionExpiredOtp.rejected, function (state, _a) {
|
|
1139
|
+
var message = _a.error.message;
|
|
1140
|
+
state.loading = false;
|
|
1141
|
+
if (!isAuthenticationVerificationFailed(message))
|
|
1142
|
+
state.error = message;
|
|
1033
1143
|
})
|
|
1034
1144
|
.addCase(verifyPasscode.pending, function (state) {
|
|
1035
1145
|
state.loading = true;
|
|
@@ -1043,9 +1153,11 @@ export var authSlice = createSlice({
|
|
|
1043
1153
|
state.data.passcodeData.skipPasscode = ((_b = data === null || data === void 0 ? void 0 : data.status) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === 'pending';
|
|
1044
1154
|
state.data.passcodeData.allowOTPToPasscodeRedirection = false;
|
|
1045
1155
|
})
|
|
1046
|
-
.addCase(verifyPasscode.rejected, function (state,
|
|
1156
|
+
.addCase(verifyPasscode.rejected, function (state, _a) {
|
|
1157
|
+
var message = _a.error.message;
|
|
1047
1158
|
state.loading = false;
|
|
1048
|
-
|
|
1159
|
+
if (!isAuthenticationVerificationFailed(message))
|
|
1160
|
+
state.error = message;
|
|
1049
1161
|
})
|
|
1050
1162
|
.addCase(createEmailAuth.pending, function (state) {
|
|
1051
1163
|
state.loading = true;
|
|
@@ -1100,9 +1212,11 @@ export var authSlice = createSlice({
|
|
|
1100
1212
|
state.data.passcodeData.skipPasscode = false;
|
|
1101
1213
|
state.data.passcodeData.allowOTPToPasscodeRedirection = false;
|
|
1102
1214
|
})
|
|
1103
|
-
.addCase(verifyEmailOtp.rejected, function (state,
|
|
1215
|
+
.addCase(verifyEmailOtp.rejected, function (state, _a) {
|
|
1216
|
+
var message = _a.error.message;
|
|
1104
1217
|
state.loading = false;
|
|
1105
|
-
|
|
1218
|
+
if (!isAuthenticationVerificationFailed(message))
|
|
1219
|
+
state.error = message;
|
|
1106
1220
|
})
|
|
1107
1221
|
.addCase(createNafathAuth.pending, function (state) {
|
|
1108
1222
|
state.loading = true;
|
|
@@ -18,6 +18,13 @@ export declare const verifyBankLeadOTP: import("@reduxjs/toolkit").AsyncThunk<{
|
|
|
18
18
|
bankData: any;
|
|
19
19
|
formData: OTPFormValues;
|
|
20
20
|
}, OTPFormValues, {}>;
|
|
21
|
+
export declare const verifyTokenSessionExpired: import("@reduxjs/toolkit").AsyncThunk<{
|
|
22
|
+
data: any;
|
|
23
|
+
}, boolean, {}>;
|
|
24
|
+
export declare const verifyBankLeadOTPSessionExpired: import("@reduxjs/toolkit").AsyncThunk<{
|
|
25
|
+
data: any;
|
|
26
|
+
formData: OTPFormValues;
|
|
27
|
+
}, OTPFormValues, {}>;
|
|
21
28
|
export declare const retrieveBoardStatus: import("@reduxjs/toolkit").AsyncThunk<{
|
|
22
29
|
flows: any;
|
|
23
30
|
}, void, {}>;
|