@tap-payments/auth-jsconnect 2.6.2-test → 2.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/build/@types/app.d.ts +150 -12
- package/build/@types/app.js +18 -1
- package/build/@types/config.d.ts +45 -0
- package/build/@types/config.js +1 -0
- package/build/@types/form.d.ts +19 -2
- package/build/@types/index.d.ts +1 -0
- package/build/@types/index.js +1 -0
- package/build/@types/redux.d.ts +1 -0
- package/build/@types/theme.d.ts +4 -0
- package/build/@types/theme.js +5 -0
- package/build/api/account.d.ts +5 -0
- package/build/api/account.js +16 -2
- package/build/api/auth.d.ts +25 -1
- package/build/api/auth.js +18 -1
- package/build/api/availabilityServices.d.ts +1 -0
- package/build/api/country.d.ts +1 -0
- package/build/api/country.js +8 -1
- package/build/api/data.d.ts +4 -17
- package/build/api/data.js +5 -45
- package/build/api/entity.d.ts +30 -2
- package/build/api/entity.js +49 -5
- package/build/api/firebase.js +68 -8
- package/build/api/index.d.ts +21 -25
- package/build/api/lead.d.ts +25 -3
- package/build/api/lead.js +47 -1
- package/build/api/operator.d.ts +10 -0
- package/build/api/operator.js +9 -1
- package/build/app/rootReducer.d.ts +2 -0
- package/build/app/rootReducer.js +5 -1
- package/build/app/settings.d.ts +14 -3
- package/build/app/settings.js +127 -41
- package/build/app/store.d.ts +4 -0
- package/build/assets/locales/ar.json +333 -131
- package/build/assets/locales/en.json +330 -131
- package/build/components/AnimationFlow/AnimationFlow.d.ts +14 -3
- package/build/components/AnimationFlow/AnimationFlow.js +16 -5
- package/build/components/AnimationFlow/BottomSheet.d.ts +7 -2
- package/build/components/AnimationFlow/BottomSheet.js +37 -12
- package/build/components/AnimationFlow/Dialog.d.ts +11 -2
- package/build/components/AnimationFlow/Dialog.js +7 -11
- package/build/components/AnimationFlow/Loader.d.ts +6 -1
- package/build/components/AnimationFlow/Loader.js +17 -5
- package/build/components/ArabicDatePicker/ArabicDatePicker.d.ts +1 -1
- package/build/components/ArabicDatePicker/ArabicDatePicker.js +2 -2
- package/build/components/DatePicker/DatePicker.d.ts +1 -1
- package/build/components/DatePicker/DatePicker.js +2 -2
- package/build/components/ExpandIcon/ExpandIcon.d.ts +2 -0
- package/build/components/Footer/Footer.js +2 -1
- package/build/components/Providers/ThemeProvider.js +3 -3
- package/build/components/SimpleList/SimpleList.js +1 -1
- package/build/components/Slide/Slide.d.ts +1 -1
- package/build/components/Tooltip/Tooltip.js +1 -1
- package/build/constants/api.d.ts +11 -7
- package/build/constants/api.js +22 -14
- package/build/constants/app.d.ts +47 -0
- package/build/constants/app.js +393 -22
- package/build/constants/assets.d.ts +4 -0
- package/build/constants/assets.js +5 -1
- package/build/constants/dummy.d.ts +43 -196
- package/build/constants/dummy.js +614 -6141
- package/build/constants/validation.d.ts +5 -0
- package/build/constants/validation.js +6 -1
- package/build/features/app/auth/authStore.d.ts +103 -0
- package/build/features/app/auth/authStore.js +1179 -0
- package/build/features/app/bank/bankStore.d.ts +14 -18
- package/build/features/app/bank/bankStore.js +218 -158
- package/build/features/app/board/boardStore.d.ts +33 -0
- package/build/features/app/board/boardStore.js +269 -0
- package/build/features/app/brand/brandStore.d.ts +18 -31
- package/build/features/app/brand/brandStore.js +296 -263
- package/build/features/app/business/businessStore.d.ts +28 -10
- package/build/features/app/business/businessStore.js +361 -215
- package/build/features/app/connect/connectStore.d.ts +39 -15
- package/build/features/app/connect/connectStore.js +308 -207
- package/build/features/app/connectExpress/connectExpressStore.d.ts +71 -26
- package/build/features/app/connectExpress/connectExpressStore.js +897 -302
- package/build/features/app/entity/entityStore.d.ts +21 -34
- package/build/features/app/entity/entityStore.js +248 -246
- package/build/features/app/individual/individualStore.d.ts +24 -33
- package/build/features/app/individual/individualStore.js +336 -274
- package/build/features/app/password/passwordStore.d.ts +34 -18
- package/build/features/app/password/passwordStore.js +286 -219
- package/build/features/app/tax/taxStore.d.ts +14 -7
- package/build/features/app/tax/taxStore.js +202 -141
- package/build/features/auth/Auth.d.ts +14 -0
- package/build/features/auth/Auth.js +168 -0
- package/build/features/auth/index.d.ts +1 -0
- package/build/features/auth/index.js +1 -0
- package/build/features/auth/screens/AccountCreatedLoader/AccountCreatedLoader.d.ts +5 -0
- package/build/features/auth/screens/AccountCreatedLoader/AccountCreatedLoader.js +36 -0
- package/build/features/auth/screens/AccountCreatedLoader/index.d.ts +2 -0
- package/build/features/auth/screens/AccountCreatedLoader/index.js +2 -0
- package/build/features/auth/screens/AccountNotFound/AccountNotFound.d.ts +5 -0
- package/build/features/auth/screens/AccountNotFound/AccountNotFound.js +71 -0
- package/build/features/auth/screens/AccountNotFound/index.d.ts +2 -0
- package/build/features/auth/screens/AccountNotFound/index.js +2 -0
- package/build/features/auth/screens/AuthMerchant/AuthMerchant.d.ts +5 -0
- package/build/features/auth/screens/AuthMerchant/AuthMerchant.js +73 -0
- package/build/features/auth/screens/AuthMerchant/MerchantList.d.ts +11 -0
- package/build/features/auth/screens/AuthMerchant/MerchantList.js +64 -0
- package/build/features/auth/screens/AuthMerchant/index.d.ts +2 -0
- package/build/features/auth/screens/AuthMerchant/index.js +2 -0
- package/build/features/auth/screens/AuthMerchant/validation.d.ts +8 -0
- package/build/features/auth/screens/AuthMerchant/validation.js +4 -0
- package/build/features/auth/screens/AuthSwitch/AuthSwitch.d.ts +5 -0
- package/build/features/auth/screens/AuthSwitch/AuthSwitch.js +58 -0
- package/build/features/auth/screens/AuthSwitch/index.d.ts +3 -0
- package/build/features/auth/screens/AuthSwitch/index.js +2 -0
- package/build/features/auth/screens/AuthenticationList/AuthenticationList.d.ts +5 -0
- package/build/features/auth/screens/AuthenticationList/AuthenticationList.js +96 -0
- package/build/features/auth/screens/AuthenticationList/BrandList.d.ts +10 -0
- package/build/features/auth/screens/AuthenticationList/BrandList.js +81 -0
- package/build/features/auth/screens/AuthenticationList/EntityLegalName.d.ts +3 -0
- package/build/features/auth/screens/AuthenticationList/EntityLegalName.js +48 -0
- package/build/features/auth/screens/AuthenticationList/EntityLicenseType.d.ts +31 -0
- package/build/features/auth/screens/AuthenticationList/EntityLicenseType.js +90 -0
- package/build/features/auth/screens/AuthenticationList/EntityList.d.ts +11 -0
- package/build/features/auth/screens/AuthenticationList/EntityList.js +138 -0
- package/build/features/auth/screens/AuthenticationList/LicenseNumber.d.ts +3 -0
- package/build/features/auth/screens/AuthenticationList/LicenseNumber.js +36 -0
- package/build/features/auth/screens/AuthenticationList/index.d.ts +3 -0
- package/build/features/auth/screens/AuthenticationList/index.js +2 -0
- package/build/features/auth/screens/AuthenticationList/validation.d.ts +20 -0
- package/build/features/auth/screens/AuthenticationList/validation.js +68 -0
- package/build/features/auth/screens/BusinessCountry/BusinessCountry.d.ts +5 -0
- package/build/features/auth/screens/BusinessCountry/BusinessCountry.js +111 -0
- package/build/features/auth/screens/BusinessCountry/index.d.ts +3 -0
- package/build/features/auth/screens/BusinessCountry/index.js +2 -0
- package/build/features/auth/screens/CivilID/CivilID.d.ts +5 -0
- package/build/features/auth/screens/CivilID/CivilID.js +57 -0
- package/build/features/auth/screens/CivilID/IDNumber.d.ts +8 -0
- package/build/features/auth/screens/CivilID/IDNumber.js +54 -0
- package/build/features/auth/screens/CivilID/index.d.ts +3 -0
- package/build/features/auth/screens/CivilID/index.js +2 -0
- package/build/features/auth/screens/CivilID/validation.d.ts +8 -0
- package/build/features/auth/screens/CivilID/validation.js +4 -0
- package/build/features/auth/screens/DOB/DOB.js +47 -0
- package/build/features/auth/screens/DOB/DOBForm.d.ts +5 -0
- package/build/features/auth/screens/DOB/DOBForm.js +59 -0
- package/build/features/auth/screens/DOB/index.d.ts +3 -0
- package/build/features/auth/screens/DOB/index.js +2 -0
- package/build/features/auth/screens/DOB/validation.d.ts +8 -0
- package/build/features/auth/screens/DOB/validation.js +4 -0
- package/build/features/auth/screens/Email/Email.d.ts +5 -0
- package/build/features/auth/screens/Email/Email.js +57 -0
- package/build/features/auth/screens/Email/EmailField.d.ts +8 -0
- package/build/features/auth/screens/Email/EmailField.js +52 -0
- package/build/features/auth/screens/Email/index.d.ts +3 -0
- package/build/features/auth/screens/Email/index.js +2 -0
- package/build/features/auth/screens/Email/validation.d.ts +8 -0
- package/build/features/auth/screens/Email/validation.js +4 -0
- package/build/features/auth/screens/EmailSent/EmailSent.d.ts +5 -0
- package/build/features/auth/screens/EmailSent/EmailSent.js +79 -0
- package/build/features/auth/screens/EmailSent/index.d.ts +2 -0
- package/build/features/auth/screens/EmailSent/index.js +2 -0
- package/build/features/auth/screens/MigratingData/MigratingData.d.ts +5 -0
- package/build/features/auth/screens/MigratingData/MigratingData.js +44 -0
- package/build/features/auth/screens/MigratingData/index.d.ts +2 -0
- package/build/features/auth/screens/MigratingData/index.js +2 -0
- package/build/features/auth/screens/Mobile/Mobile.d.ts +5 -0
- package/build/features/auth/screens/Mobile/Mobile.js +82 -0
- package/build/features/auth/screens/Mobile/MobileNumber.d.ts +13 -0
- package/build/features/auth/screens/Mobile/MobileNumber.js +158 -0
- package/build/features/auth/screens/Mobile/index.d.ts +3 -0
- package/build/features/auth/screens/Mobile/index.js +2 -0
- package/build/features/auth/screens/Mobile/validation.d.ts +8 -0
- package/build/features/auth/screens/Mobile/validation.js +35 -0
- package/build/features/auth/screens/NID/IDNumber.d.ts +7 -0
- package/build/features/auth/screens/NID/IDNumber.js +55 -0
- package/build/features/auth/screens/NID/NID.d.ts +5 -0
- package/build/features/auth/screens/NID/NID.js +56 -0
- package/build/features/auth/screens/NID/index.d.ts +3 -0
- package/build/features/auth/screens/NID/index.js +2 -0
- package/build/features/auth/screens/NID/validation.d.ts +8 -0
- package/build/features/auth/screens/NID/validation.js +10 -0
- package/build/features/auth/screens/OTP/OTP.js +118 -0
- package/build/features/{connectExpress/screens/IdentityOTP → auth/screens/OTP}/OTPInput.js +27 -7
- package/build/features/auth/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/auth/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/auth/screens/OperatorError/index.d.ts +3 -0
- package/build/features/auth/screens/OperatorError/index.js +2 -0
- package/build/features/auth/screens/Password/Password.d.ts +5 -0
- package/build/features/auth/screens/Password/Password.js +61 -0
- package/build/features/auth/screens/Password/PasswordField.d.ts +5 -0
- package/build/features/auth/screens/Password/PasswordField.js +28 -0
- package/build/features/auth/screens/Password/index.d.ts +3 -0
- package/build/features/auth/screens/Password/index.js +2 -0
- package/build/features/auth/screens/Password/validation.d.ts +8 -0
- package/build/features/auth/screens/Password/validation.js +4 -0
- package/build/features/auth/screens/PreparingData/PreparingData.d.ts +5 -0
- package/build/features/auth/screens/PreparingData/PreparingData.js +44 -0
- package/build/features/auth/screens/PreparingData/index.d.ts +2 -0
- package/build/features/auth/screens/PreparingData/index.js +2 -0
- package/build/features/auth/screens/ResetPasswordMessage/ResetPasswordMessage.d.ts +5 -0
- package/build/features/auth/screens/ResetPasswordMessage/ResetPasswordMessage.js +21 -0
- package/build/features/auth/screens/ResetPasswordMessage/index.d.ts +3 -0
- package/build/features/auth/screens/ResetPasswordMessage/index.js +2 -0
- package/build/features/auth/screens/VerifyNafath/VerifyNafath.d.ts +5 -0
- package/build/features/auth/screens/VerifyNafath/VerifyNafath.js +35 -0
- package/build/features/auth/screens/VerifyNafath/index.d.ts +3 -0
- package/build/features/auth/screens/VerifyNafath/index.js +2 -0
- package/build/features/auth/screens/VerifyPACI/VerifyPACI.d.ts +5 -0
- package/build/features/auth/screens/VerifyPACI/VerifyPACI.js +34 -0
- package/build/features/auth/screens/VerifyPACI/index.d.ts +3 -0
- package/build/features/auth/screens/VerifyPACI/index.js +2 -0
- package/build/features/bank/Bank.d.ts +2 -0
- package/build/features/bank/Bank.js +15 -9
- package/build/features/bank/screens/BankDetails/BankDetails.js +21 -7
- package/build/features/bank/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/bank/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/bank/screens/OperatorError/index.d.ts +3 -0
- package/build/features/bank/screens/OperatorError/index.js +2 -0
- package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +13 -5
- package/build/features/bank/screens/Verify/Verify.js +8 -7
- package/build/features/board/Board.d.ts +13 -0
- package/build/features/board/Board.js +87 -0
- package/build/features/board/index.d.ts +1 -0
- package/build/features/board/index.js +1 -0
- package/build/features/board/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/board/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/board/screens/OperatorError/index.d.ts +3 -0
- package/build/features/board/screens/OperatorError/index.js +2 -0
- package/build/features/board/screens/PrepareDataLoading/PrepareDataLoading.d.ts +4 -0
- package/build/features/board/screens/PrepareDataLoading/PrepareDataLoading.js +10 -0
- package/build/features/board/screens/PrepareDataLoading/index.d.ts +2 -0
- package/build/features/board/screens/PrepareDataLoading/index.js +2 -0
- package/build/features/board/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +5 -0
- package/build/features/board/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +21 -0
- package/build/features/board/screens/ResetPasswordSuccess/index.d.ts +3 -0
- package/build/features/board/screens/ResetPasswordSuccess/index.js +2 -0
- package/build/features/board/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +3 -0
- package/build/features/board/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +44 -0
- package/build/features/board/screens/SuccessWithFlowButtons/index.d.ts +2 -0
- package/build/features/board/screens/SuccessWithFlowButtons/index.js +2 -0
- package/build/features/board/screens/Verify/OTPInput.d.ts +7 -0
- package/build/features/{business/screens/OTP → board/screens/Verify}/OTPInput.js +9 -7
- package/build/features/{connectExpress/screens/IdentityOTP/OTP.js → board/screens/Verify/Verify.js} +25 -37
- package/build/features/board/screens/Verify/index.d.ts +2 -0
- package/build/features/board/screens/Verify/index.js +2 -0
- package/build/features/brand/Brand.d.ts +2 -0
- package/build/features/brand/Brand.js +15 -9
- package/build/features/brand/screens/BrandActivities/ActivitiesList.d.ts +9 -9
- package/build/features/brand/screens/BrandActivities/BrandActivities.js +49 -12
- package/build/features/brand/screens/BrandActivities/CustomerBase.d.ts +6 -6
- package/build/features/brand/screens/BrandActivities/CustomerBase.js +1 -1
- package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.js +5 -2
- package/build/features/brand/screens/BrandActivities/RefundPolicy.d.ts +4 -4
- package/build/features/brand/screens/BrandActivities/RefundPolicy.js +1 -1
- package/build/features/brand/screens/BrandActivities/TAC.d.ts +1 -1
- package/build/features/brand/screens/BrandActivities/TAC.js +1 -1
- package/build/features/brand/screens/BrandActivities/TransactionPolicy.js +1 -1
- package/build/features/brand/screens/BrandInfo/BrandInfo.js +27 -7
- package/build/features/brand/screens/BrandInfo/BrandName.js +5 -2
- package/build/features/brand/screens/BrandInfo/validation.js +2 -2
- package/build/features/brand/screens/BrandSegmentInfo/BrandSegmentInfo.js +23 -7
- package/build/features/brand/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/brand/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/brand/screens/OperatorError/index.d.ts +3 -0
- package/build/features/brand/screens/OperatorError/index.js +2 -0
- package/build/features/brand/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +13 -5
- package/build/features/brand/screens/Verify/Verify.js +4 -3
- package/build/features/business/Business.js +20 -12
- package/build/features/business/screens/Activities/Activities.js +27 -10
- package/build/features/business/screens/Activities/ActivitiesList.d.ts +4 -4
- package/build/features/business/screens/Activities/ActivitiesList.js +1 -1
- package/build/features/business/screens/Activities/OperationStartDate.d.ts +5 -3
- package/build/features/business/screens/Activities/OperationStartDate.js +2 -2
- package/build/features/business/screens/BrandDetails/SalesChannel.d.ts +2 -2
- package/build/features/business/screens/BusinessType/BusinessType.js +24 -8
- package/build/features/business/screens/BusinessType/EntityName.js +3 -3
- package/build/features/business/screens/BusinessType/LicenseList.js +3 -3
- package/build/features/business/screens/BusinessType/LicenseNumber.js +10 -9
- package/build/features/business/screens/BusinessType/LicenseType.d.ts +4 -4
- package/build/features/business/screens/BusinessType/validation.d.ts +10 -0
- package/build/features/business/screens/BusinessType/validation.js +16 -0
- package/build/features/business/screens/CivilID/CivilID.js +1 -1
- package/build/features/business/screens/Customers/CustomerLocations.d.ts +14 -12
- package/build/features/business/screens/Customers/CustomerLocations.js +5 -3
- package/build/features/business/screens/Customers/Customers.js +51 -11
- package/build/features/business/screens/Customers/ExpectedCustomers.d.ts +3 -1
- package/build/features/business/screens/Customers/ExpectedCustomers.js +5 -3
- package/build/features/business/screens/Customers/ExpectedSalesRange.d.ts +3 -1
- package/build/features/business/screens/Customers/ExpectedSalesRange.js +10 -4
- package/build/features/business/screens/Customers/RefundPolicy.d.ts +12 -5
- package/build/features/business/screens/Customers/RefundPolicy.js +13 -13
- package/build/features/business/screens/Customers/TransactionPolicy.d.ts +4 -1
- package/build/features/business/screens/Customers/TransactionPolicy.js +8 -5
- package/build/features/business/screens/Customers/validation.d.ts +6 -6
- package/build/features/business/screens/Customers/validation.js +3 -8
- package/build/features/business/screens/DOB/DOB.d.ts +6 -0
- package/build/features/business/screens/DOB/DOB.js +45 -0
- package/build/features/business/screens/DOB/DOBForm.d.ts +5 -0
- package/build/features/business/screens/DOB/DOBForm.js +72 -0
- package/build/features/business/screens/DOB/index.d.ts +3 -0
- package/build/features/business/screens/DOB/index.js +2 -0
- package/build/features/business/screens/DOB/validation.d.ts +8 -0
- package/build/features/business/screens/DOB/validation.js +4 -0
- package/build/features/business/screens/IDBOD/ID.js +6 -2
- package/build/features/business/screens/IDBOD/IDBOD.js +18 -19
- package/build/features/business/screens/IDBOD/validation.d.ts +7 -0
- package/build/features/business/screens/IDBOD/validation.js +4 -1
- package/build/features/business/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/business/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/business/screens/OperatorError/index.d.ts +3 -0
- package/build/features/business/screens/OperatorError/index.js +2 -0
- package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +14 -3
- package/build/features/business/screens/Verify/Verify.js +16 -5
- package/build/features/business/screens/VerifyNafath/VerifyNafath.d.ts +5 -0
- package/build/features/business/screens/VerifyNafath/VerifyNafath.js +35 -0
- package/build/features/business/screens/VerifyNafath/index.d.ts +3 -0
- package/build/features/business/screens/VerifyNafath/index.js +2 -0
- package/build/features/connect/Connect.d.ts +5 -1
- package/build/features/connect/Connect.js +48 -31
- package/build/features/connect/screens/BrandSegment/BrandSegment.js +4 -26
- package/build/features/connect/screens/BrandSegment/TeamSize.js +1 -1
- package/build/features/connect/screens/BrandSegment/validation.d.ts +0 -9
- package/build/features/connect/screens/BrandSegment/validation.js +0 -3
- package/build/features/connect/screens/BusinessCountry/BusinessCountry.d.ts +5 -0
- package/build/features/connect/screens/BusinessCountry/BusinessCountry.js +113 -0
- package/build/features/connect/screens/BusinessCountry/index.d.ts +3 -0
- package/build/features/connect/screens/BusinessCountry/index.js +2 -0
- package/build/features/connect/screens/CivilID/CivilID.js +12 -4
- package/build/features/{connectExpress/screens/NID → connect/screens/DOB}/DOB.d.ts +1 -2
- package/build/features/connect/screens/{NID → DOB}/DOB.js +2 -2
- package/build/features/connect/screens/DOB/DOBForm.d.ts +5 -0
- package/build/features/connect/screens/DOB/DOBForm.js +59 -0
- package/build/features/connect/screens/DOB/index.d.ts +3 -0
- package/build/features/connect/screens/DOB/index.js +2 -0
- package/build/features/connect/screens/DOB/validation.d.ts +8 -0
- package/build/features/connect/screens/DOB/validation.js +4 -0
- package/build/features/connect/screens/Individual/Individual.js +12 -6
- package/build/features/connect/screens/Individual/MobileNumber.js +6 -3
- package/build/features/connect/screens/Individual/validation.js +8 -3
- package/build/features/connect/screens/Merchant/BrandList.js +3 -3
- package/build/features/connect/screens/Merchant/BrandName.js +5 -2
- package/build/features/connect/screens/Merchant/Merchant.js +1 -1
- package/build/features/connect/screens/Merchant/SalesChannels.js +1 -1
- package/build/features/connect/screens/Merchant/validation.js +2 -2
- package/build/features/connect/screens/Mobile/Mobile.js +14 -7
- package/build/features/connect/screens/Mobile/MobileNumber.js +14 -8
- package/build/features/connect/screens/Mobile/validation.js +8 -3
- package/build/features/connect/screens/NID/IDNumber.d.ts +1 -0
- package/build/features/connect/screens/NID/IDNumber.js +2 -2
- package/build/features/connect/screens/NID/NID.js +10 -13
- package/build/features/connect/screens/NID/validation.d.ts +0 -3
- package/build/features/connect/screens/NID/validation.js +0 -1
- package/build/features/connect/screens/OTP/OTP.js +7 -7
- package/build/features/connect/screens/OTP/OTPInput.js +3 -11
- package/build/features/connect/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/connect/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/connect/screens/OperatorError/index.d.ts +3 -0
- package/build/features/connect/screens/OperatorError/index.js +2 -0
- package/build/features/connect/screens/VerifyNafath/VerifyNafath.d.ts +5 -0
- package/build/features/connect/screens/VerifyNafath/VerifyNafath.js +35 -0
- package/build/features/connect/screens/VerifyNafath/index.d.ts +3 -0
- package/build/features/connect/screens/VerifyNafath/index.js +2 -0
- package/build/features/connectExpress/ConnectExpress.d.ts +5 -3
- package/build/features/connectExpress/ConnectExpress.js +70 -40
- package/build/features/connectExpress/screens/AccountAlreadyCreated/AccountAlreadyCreated.js +14 -2
- package/build/features/connectExpress/screens/AccountCreatedLoader/AccountCreatedLoader.d.ts +5 -0
- package/build/features/connectExpress/screens/AccountCreatedLoader/AccountCreatedLoader.js +36 -0
- package/build/features/connectExpress/screens/AccountCreatedLoader/index.d.ts +2 -0
- package/build/features/connectExpress/screens/AccountCreatedLoader/index.js +2 -0
- package/build/features/connectExpress/screens/AuthMerchant/AuthMerchant.d.ts +5 -0
- package/build/features/connectExpress/screens/AuthMerchant/AuthMerchant.js +74 -0
- package/build/features/connectExpress/screens/AuthMerchant/MerchantList.d.ts +11 -0
- package/build/features/connectExpress/screens/AuthMerchant/MerchantList.js +64 -0
- package/build/features/connectExpress/screens/AuthMerchant/index.d.ts +2 -0
- package/build/features/connectExpress/screens/AuthMerchant/index.js +2 -0
- package/build/features/connectExpress/screens/AuthMerchant/validation.d.ts +8 -0
- package/build/features/connectExpress/screens/AuthMerchant/validation.js +4 -0
- package/build/features/connectExpress/screens/AuthenticationList/AuthenticationList.d.ts +5 -0
- package/build/features/connectExpress/screens/AuthenticationList/AuthenticationList.js +104 -0
- package/build/features/connectExpress/screens/AuthenticationList/BrandList.d.ts +10 -0
- package/build/features/connectExpress/screens/AuthenticationList/BrandList.js +81 -0
- package/build/features/connectExpress/screens/AuthenticationList/EntityLegalName.d.ts +3 -0
- package/build/features/connectExpress/screens/AuthenticationList/EntityLegalName.js +48 -0
- package/build/features/connectExpress/screens/AuthenticationList/EntityLicenseType.d.ts +31 -0
- package/build/features/connectExpress/screens/AuthenticationList/EntityLicenseType.js +90 -0
- package/build/features/connectExpress/screens/AuthenticationList/EntityList.d.ts +11 -0
- package/build/features/connectExpress/screens/AuthenticationList/EntityList.js +138 -0
- package/build/features/connectExpress/screens/AuthenticationList/LicenseNumber.d.ts +3 -0
- package/build/features/connectExpress/screens/AuthenticationList/LicenseNumber.js +36 -0
- package/build/features/connectExpress/screens/AuthenticationList/index.d.ts +3 -0
- package/build/features/connectExpress/screens/AuthenticationList/index.js +2 -0
- package/build/features/connectExpress/screens/AuthenticationList/validation.d.ts +20 -0
- package/build/features/connectExpress/screens/AuthenticationList/validation.js +68 -0
- package/build/features/connectExpress/screens/BusinessCountry/BusinessCountry.d.ts +5 -0
- package/build/features/connectExpress/screens/BusinessCountry/BusinessCountry.js +111 -0
- package/build/features/connectExpress/screens/BusinessCountry/index.d.ts +3 -0
- package/build/features/connectExpress/screens/BusinessCountry/index.js +2 -0
- package/build/features/connectExpress/screens/CivilID/CivilID.js +16 -5
- package/build/features/connectExpress/screens/CivilID/IDNumber.js +7 -2
- package/build/features/connectExpress/screens/CivilIDMissed/CivilID.js +2 -2
- package/build/features/connectExpress/screens/CollectBusinessInfo/BrandName.js +5 -2
- package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.js +20 -5
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.js +6 -5
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseNumber.js +9 -8
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.d.ts +4 -4
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.js +1 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.d.ts +1 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/validation.d.ts +13 -0
- package/build/features/connectExpress/screens/CollectBusinessInfo/validation.js +68 -1
- package/build/features/connectExpress/screens/CollectIndividualInfo/CollectIndividualInfo.js +34 -7
- package/build/features/connectExpress/screens/CollectIndividualInfo/MobileNumber.js +7 -4
- package/build/features/connectExpress/screens/CollectIndividualInfo/validation.js +8 -3
- package/build/features/connectExpress/screens/CreateAccountLoader/CreateAccountLoader.js +14 -24
- package/build/features/connectExpress/screens/DOB/DOB.d.ts +6 -0
- package/build/features/connectExpress/screens/{NID → DOB}/DOB.js +3 -3
- package/build/features/connectExpress/screens/DOB/DOBForm.d.ts +5 -0
- package/build/features/connectExpress/screens/DOB/DOBForm.js +63 -0
- package/build/features/connectExpress/screens/DOB/index.d.ts +3 -0
- package/build/features/connectExpress/screens/DOB/index.js +2 -0
- package/build/features/connectExpress/screens/DOB/validation.d.ts +8 -0
- package/build/features/connectExpress/screens/DOB/validation.js +4 -0
- package/build/features/connectExpress/screens/IdentityVerifyNafath/IdentityVerifyNafath.d.ts +5 -0
- package/build/features/connectExpress/screens/IdentityVerifyNafath/IdentityVerifyNafath.js +35 -0
- package/build/features/connectExpress/screens/IdentityVerifyNafath/index.d.ts +3 -0
- package/build/features/connectExpress/screens/IdentityVerifyNafath/index.js +2 -0
- package/build/features/connectExpress/screens/IdentityVerifyPACI/VerifyPACI.js +2 -2
- package/build/features/connectExpress/screens/Mobile/Mobile.js +17 -7
- package/build/features/connectExpress/screens/Mobile/MobileNumber.js +17 -11
- package/build/features/connectExpress/screens/Mobile/TAC.js +1 -1
- package/build/features/connectExpress/screens/Mobile/validation.js +16 -6
- package/build/features/connectExpress/screens/NID/IDNumber.d.ts +1 -0
- package/build/features/connectExpress/screens/NID/IDNumber.js +2 -2
- package/build/features/connectExpress/screens/NID/NID.js +15 -12
- package/build/features/connectExpress/screens/NID/TAC.d.ts +1 -1
- package/build/features/connectExpress/screens/NID/TAC.js +2 -2
- package/build/features/connectExpress/screens/NID/validation.d.ts +0 -3
- package/build/features/connectExpress/screens/NID/validation.js +0 -2
- package/build/features/connectExpress/screens/NIDMissed/IDNumber.js +6 -2
- package/build/features/connectExpress/screens/NIDMissed/NID.js +10 -8
- package/build/features/connectExpress/screens/NIDMissed/validation.d.ts +7 -0
- package/build/features/connectExpress/screens/NIDMissed/validation.js +4 -1
- package/build/features/connectExpress/screens/OTP/OTP.js +14 -16
- package/build/features/connectExpress/screens/OTP/OTPInput.js +12 -10
- package/build/features/connectExpress/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/connectExpress/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/connectExpress/screens/OperatorError/index.d.ts +3 -0
- package/build/features/connectExpress/screens/OperatorError/index.js +2 -0
- package/build/features/connectExpress/screens/PrepareDataLoading/PrepareDataLoading.d.ts +5 -0
- package/build/features/connectExpress/screens/PrepareDataLoading/PrepareDataLoading.js +34 -0
- package/build/features/connectExpress/screens/PrepareDataLoading/index.d.ts +2 -0
- package/build/features/connectExpress/screens/PrepareDataLoading/index.js +2 -0
- package/build/features/connectExpress/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +15 -7
- package/build/features/connectExpress/screens/VerifyNafath/VerifyNafath.d.ts +5 -0
- package/build/features/connectExpress/screens/VerifyNafath/VerifyNafath.js +35 -0
- package/build/features/connectExpress/screens/VerifyNafath/index.d.ts +3 -0
- package/build/features/connectExpress/screens/VerifyNafath/index.js +2 -0
- package/build/features/entity/Entity.d.ts +2 -0
- package/build/features/entity/Entity.js +15 -9
- package/build/features/entity/screens/EntityCapital/ActivityList.d.ts +4 -4
- package/build/features/entity/screens/EntityCapital/CapitalPaid.js +5 -3
- package/build/features/entity/screens/EntityCapital/CapitalShareValue.js +6 -4
- package/build/features/entity/screens/EntityCapital/EntityCapital.js +34 -10
- package/build/features/entity/screens/EntityName/EntityName.js +44 -19
- package/build/features/entity/screens/EntityName/EntityTypeList.d.ts +9 -9
- package/build/features/entity/screens/EntityName/EntityTypeList.js +2 -3
- package/build/features/entity/screens/EntityName/ExpiryDate.d.ts +2 -2
- package/build/features/entity/screens/EntityName/ExpiryDate.js +5 -7
- package/build/features/entity/screens/EntityName/IssuingDate.d.ts +2 -2
- package/build/features/entity/screens/EntityName/IssuingDate.js +5 -7
- package/build/features/entity/screens/EntityName/LegalName.js +1 -13
- package/build/features/entity/screens/EntityName/LicenseNumber.js +10 -11
- package/build/features/entity/screens/EntityName/UnifiedNumber.js +4 -6
- package/build/features/entity/screens/EntityName/validation.d.ts +31 -3
- package/build/features/entity/screens/EntityName/validation.js +38 -9
- package/build/features/entity/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/entity/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/entity/screens/OperatorError/index.d.ts +3 -0
- package/build/features/entity/screens/OperatorError/index.js +2 -0
- package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +13 -5
- package/build/features/entity/screens/Verify/Verify.js +4 -3
- package/build/features/featuresScreens.d.ts +2 -0
- package/build/features/featuresScreens.js +254 -15
- package/build/features/individual/Individual.d.ts +2 -0
- package/build/features/individual/Individual.js +15 -9
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.d.ts +2 -2
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +55 -15
- package/build/features/individual/screens/AdditionalIndividualInfo/IsAuthorizedSwitch.d.ts +36 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/IsAuthorizedSwitch.js +76 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +5 -2
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.d.ts +4 -4
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.js +7 -4
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.d.ts +4 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.js +4 -3
- package/build/features/individual/screens/IndividualList/IndividualList.d.ts +4 -4
- package/build/features/individual/screens/IndividualList/IndividualList.js +21 -6
- package/build/features/individual/screens/IndividualList/MobileNumber.js +6 -3
- package/build/features/individual/screens/IndividualList/UserList.js +13 -9
- package/build/features/individual/screens/IndividualList/validation.js +8 -3
- package/build/features/individual/screens/IndividualPersonalInfo/Gender.d.ts +4 -4
- package/build/features/individual/screens/IndividualPersonalInfo/ID.js +6 -2
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.d.ts +2 -2
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.js +79 -21
- package/build/features/individual/screens/IndividualPersonalInfo/MobileNumber.js +6 -3
- package/build/features/individual/screens/IndividualPersonalInfo/validation.d.ts +1 -1
- package/build/features/individual/screens/IndividualPersonalInfo/validation.js +72 -63
- package/build/features/individual/screens/IndividualPhoneInfo/MobileNumber.js +7 -4
- package/build/features/individual/screens/IndividualPhoneInfo/PhoneInfo.js +1 -1
- package/build/features/individual/screens/IndividualPhoneInfo/validation.js +8 -3
- package/build/features/individual/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/individual/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/individual/screens/OperatorError/index.d.ts +3 -0
- package/build/features/individual/screens/OperatorError/index.js +2 -0
- package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +13 -5
- package/build/features/individual/screens/Verify/Verify.js +4 -3
- package/build/features/password/Password.d.ts +2 -0
- package/build/features/password/Password.js +94 -32
- package/build/features/password/screens/CreatePassword/CreatePassword.js +10 -4
- package/build/features/password/screens/OTP/OTP.js +4 -4
- package/build/features/password/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/password/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/password/screens/OperatorError/index.d.ts +3 -0
- package/build/features/password/screens/OperatorError/index.js +2 -0
- package/build/features/password/screens/PrepareDataLoading/PrepareDataLoading.d.ts +4 -0
- package/build/features/password/screens/PrepareDataLoading/PrepareDataLoading.js +10 -0
- package/build/features/password/screens/PrepareDataLoading/index.d.ts +2 -0
- package/build/features/password/screens/PrepareDataLoading/index.js +2 -0
- package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +13 -5
- package/build/features/password/screens/Verify/Verify.js +8 -7
- package/build/features/shared/Address/CountryList.d.ts +7 -7
- package/build/features/shared/Address/InputSelect.d.ts +7 -7
- package/build/features/shared/Background/Background.d.ts +3 -1
- package/build/features/shared/Background/Background.js +9 -11
- package/build/features/shared/BusinessCountry/BusinessCountry.d.ts +15 -0
- package/build/features/shared/BusinessCountry/BusinessCountry.js +179 -0
- package/build/features/shared/BusinessCountry/index.d.ts +2 -0
- package/build/features/shared/BusinessCountry/index.js +2 -0
- package/build/features/shared/Button/Button.js +11 -5
- package/build/features/shared/Button/EmailProvidersButtons.js +2 -0
- package/build/features/shared/Button/FlowsButtons.d.ts +3 -1
- package/build/features/shared/Button/FlowsButtons.js +29 -14
- package/build/features/shared/Button/NafathButton.d.ts +8 -0
- package/build/features/shared/Button/{AbsherButton.js → NafathButton.js} +12 -3
- package/build/features/shared/Button/index.d.ts +2 -2
- package/build/features/shared/Button/index.js +2 -2
- package/build/features/shared/Calender/Calender.d.ts +2 -1
- package/build/features/shared/Calender/Calender.js +3 -3
- package/build/features/shared/Containers/FeatureContainer.d.ts +2 -1
- package/build/features/shared/Containers/FeatureContainer.js +3 -3
- package/build/features/shared/Containers/ScreenContainer.d.ts +1 -1
- package/build/features/shared/DataLoading/DataLoading.d.ts +4 -1
- package/build/features/shared/DataLoading/DataLoading.js +2 -2
- package/build/features/shared/Footer/Footer.js +2 -1
- package/build/features/shared/Input/Input.d.ts +2 -2
- package/build/features/shared/NafathVerification/NafathVerification.d.ts +14 -0
- package/build/features/shared/NafathVerification/NafathVerification.js +92 -0
- package/build/features/shared/NafathVerification/VerifyNafathLoading.d.ts +8 -0
- package/build/features/shared/NafathVerification/VerifyNafathLoading.js +53 -0
- package/build/features/shared/NafathVerification/VerifyNafathSuccess.d.ts +5 -0
- package/build/features/shared/NafathVerification/VerifyNafathSuccess.js +8 -0
- package/build/features/shared/NafathVerification/index.d.ts +2 -0
- package/build/features/shared/NafathVerification/index.js +2 -0
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.d.ts +8 -1
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +11 -14
- package/build/features/shared/SuccessScreen/SuccessScreen.js +1 -1
- package/build/features/shared/UploadFile/FileUpload.d.ts +1 -1
- package/build/features/shared/UploadFile/UploadFile.d.ts +1 -1
- package/build/features/shared/UploadFile/UploadWrapper.d.ts +1 -1
- package/build/features/shared/UploadMultipleFile/UploadFile.d.ts +1 -1
- package/build/features/shared/UploadMultipleFile/UploadMultipleFile.d.ts +1 -1
- package/build/features/signIn/SignIn.js +18 -7
- package/build/features/signIn/screens/Mobile/MobileNumber.js +6 -3
- package/build/features/signIn/screens/Mobile/validation.js +8 -3
- package/build/features/signIn/screens/OTP/OTP.js +5 -4
- package/build/features/signIn/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/signIn/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/signIn/screens/OperatorError/index.d.ts +3 -0
- package/build/features/signIn/screens/OperatorError/index.js +2 -0
- package/build/features/tax/Tax.d.ts +2 -0
- package/build/features/tax/Tax.js +15 -9
- package/build/features/tax/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/tax/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/tax/screens/OperatorError/index.d.ts +3 -0
- package/build/features/tax/screens/OperatorError/index.js +2 -0
- package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +13 -5
- package/build/features/tax/screens/TaxDetails/TaxDetails.js +9 -3
- package/build/features/tax/screens/Verify/Verify.js +8 -7
- package/build/hooks/index.d.ts +3 -0
- package/build/hooks/index.js +3 -0
- package/build/hooks/useAppConfig.d.ts +3 -3
- package/build/hooks/useAppConfig.js +9 -6
- package/build/hooks/useAppDispatch.d.ts +2 -0
- package/build/hooks/useAppTheme.js +4 -3
- package/build/hooks/useCountDown.d.ts +10 -0
- package/build/hooks/useCountDown.js +17 -0
- package/build/hooks/useCountry.d.ts +1 -0
- package/build/hooks/useCountry.js +4 -3
- package/build/hooks/useFormDirtyCheck.d.ts +10 -0
- package/build/hooks/useFormDirtyCheck.js +66 -0
- package/build/hooks/useSanitizedTranslation.d.ts +1 -0
- package/build/hooks/useSanitizedTranslation.js +15 -0
- package/build/hooks/useVerifyToken.d.ts +5 -2
- package/build/hooks/useVerifyToken.js +10 -5
- package/build/index.css +360 -120
- package/build/index.d.ts +4 -2
- package/build/index.js +6 -2
- package/build/theme/components.js +7 -0
- package/build/theme/palette.js +4 -2
- package/build/theme/theme.d.ts +1 -1
- package/build/theme/theme.js +2 -2
- package/build/utils/array.js +2 -2
- package/build/utils/common.d.ts +3 -0
- package/build/utils/common.js +38 -2
- package/build/utils/device.d.ts +2 -0
- package/build/utils/device.js +6 -0
- package/build/utils/locale.js +2 -1
- package/build/utils/object.d.ts +1 -0
- package/build/utils/object.js +4 -1
- package/build/utils/string.d.ts +5 -2
- package/build/utils/string.js +24 -5
- package/build/utils/validation.d.ts +5 -0
- package/build/utils/validation.js +16 -0
- package/package.json +2 -2
- package/build/features/business/screens/OTP/OTP.d.ts +0 -8
- package/build/features/business/screens/OTP/OTP.js +0 -90
- package/build/features/connect/screens/BrandSegment/SegmentLocations.d.ts +0 -8
- package/build/features/connect/screens/BrandSegment/SegmentLocations.js +0 -66
- package/build/features/connect/screens/BrandSegment/SegmentProfits.d.ts +0 -8
- package/build/features/connect/screens/BrandSegment/SegmentProfits.js +0 -66
- package/build/features/connect/screens/BrandSegment/SegmentTechs.d.ts +0 -8
- package/build/features/connect/screens/BrandSegment/SegmentTechs.js +0 -66
- package/build/features/connectExpress/screens/IdentityOTP/index.d.ts +0 -3
- package/build/features/connectExpress/screens/IdentityOTP/index.js +0 -2
- package/build/features/shared/Button/AbsherButton.d.ts +0 -8
- /package/build/features/{connect/screens/NID → auth/screens/DOB}/DOB.d.ts +0 -0
- /package/build/features/{connectExpress/screens/IdentityOTP → auth/screens/OTP}/OTP.d.ts +0 -0
- /package/build/features/{business → auth}/screens/OTP/OTPInput.d.ts +0 -0
- /package/build/features/{business → auth}/screens/OTP/index.d.ts +0 -0
- /package/build/features/{business → auth}/screens/OTP/index.js +0 -0
- /package/build/features/{business → auth}/screens/OTP/validation.d.ts +0 -0
- /package/build/features/{business → auth}/screens/OTP/validation.js +0 -0
- /package/build/features/{connectExpress/screens/IdentityOTP/OTPInput.d.ts → board/screens/Verify/Verify.d.ts} +0 -0
- /package/build/features/{connectExpress/screens/IdentityOTP → board/screens/Verify}/validation.d.ts +0 -0
- /package/build/features/{connectExpress/screens/IdentityOTP → board/screens/Verify}/validation.js +0 -0
|
@@ -49,74 +49,69 @@ var _a;
|
|
|
49
49
|
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
50
50
|
import API from '../../../api';
|
|
51
51
|
import { FlowsTypes } from '../../../@types';
|
|
52
|
-
import { handleCurrentActiveScreen, handleNextScreenStep, handlePublicKey, handleSetCountryByIso2 } from '../../../app/settings';
|
|
52
|
+
import { handleCurrentActiveScreen, handleNextScreenStep, handlePrevScreenStep, handlePublicKey, handleSetCountryByIso2, onCloseComplete } from '../../../app/settings';
|
|
53
53
|
import { PASSWORD_OPERATION_TYPE, PASSWORD_STEP_NAMES } from '../../../constants';
|
|
54
|
-
import { retrieveIndividualData } from '../../../utils';
|
|
55
|
-
export var verifyLeadToken = createAsyncThunk('passwordVerifyLeadToken', function (
|
|
56
|
-
var
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
verify_token: token
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
boardData = boardRes;
|
|
93
|
-
individualData = individualRes;
|
|
94
|
-
_j.label = 7;
|
|
95
|
-
case 7:
|
|
96
|
-
countryIso2 = (_e = boardData === null || boardData === void 0 ? void 0 : boardData.entity) === null || _e === void 0 ? void 0 : _e.country;
|
|
97
|
-
if (countryIso2)
|
|
98
|
-
thunkApi.dispatch(handleSetCountryByIso2(countryIso2));
|
|
99
|
-
info = (boardStatusData || {}).info;
|
|
100
|
-
hasPasswordCompleted = ((_f = info === null || info === void 0 ? void 0 : info.find(function (flow) { return flow.name === 'password'; })) === null || _f === void 0 ? void 0 : _f.status) === 'completed';
|
|
101
|
-
if (data.step_name === PASSWORD_STEP_NAMES.PHONE_AUTH) {
|
|
54
|
+
import { retrieveIndividualData, sendCustomEventToGTM, sleep } from '../../../utils';
|
|
55
|
+
export var verifyLeadToken = createAsyncThunk('passwordVerifyLeadToken', function (_a, thunkApi) {
|
|
56
|
+
var token = _a.token, isInternally = _a.isInternally;
|
|
57
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
58
|
+
var payload, data, _b, config, board_info_password_status, country_code, board_id, recipient, countryIso2, publicKey, data_1, flows, data_2;
|
|
59
|
+
var _c, _d;
|
|
60
|
+
return __generator(this, function (_e) {
|
|
61
|
+
switch (_e.label) {
|
|
62
|
+
case 0:
|
|
63
|
+
payload = __assign({ service_name: 'tap_email', verify_token: token }, (isInternally && {
|
|
64
|
+
notification: {
|
|
65
|
+
sms: false
|
|
66
|
+
}
|
|
67
|
+
}));
|
|
68
|
+
return [4, API.leadService.verifyLeadToken(payload)];
|
|
69
|
+
case 1:
|
|
70
|
+
data = (_e.sent()).data;
|
|
71
|
+
if (((_c = data === null || data === void 0 ? void 0 : data.errors) === null || _c === void 0 ? void 0 : _c.length) || (data === null || data === void 0 ? void 0 : data.mw_error))
|
|
72
|
+
throw new Error(data.errors[0].description || (data === null || data === void 0 ? void 0 : data.mw_error));
|
|
73
|
+
if (isInternally)
|
|
74
|
+
data.step_name = PASSWORD_STEP_NAMES.PASSWORD_INFO;
|
|
75
|
+
_b = data || {}, config = _b.config, board_info_password_status = _b.board_info_password_status, country_code = _b.country_code, board_id = _b.id, recipient = _b.recipient;
|
|
76
|
+
countryIso2 = country_code;
|
|
77
|
+
if (countryIso2)
|
|
78
|
+
thunkApi.dispatch(handleSetCountryByIso2(countryIso2));
|
|
79
|
+
publicKey = config === null || config === void 0 ? void 0 : config.public_key;
|
|
80
|
+
if (publicKey)
|
|
81
|
+
thunkApi.dispatch(handlePublicKey(publicKey));
|
|
82
|
+
if (!!country_code) return [3, 3];
|
|
83
|
+
return [4, API.boardService.retrieveBoardDetails(board_id)];
|
|
84
|
+
case 2:
|
|
85
|
+
data_1 = _e.sent();
|
|
86
|
+
if ((_d = data_1 === null || data_1 === void 0 ? void 0 : data_1.entity) === null || _d === void 0 ? void 0 : _d.country)
|
|
87
|
+
thunkApi.dispatch(handleSetCountryByIso2(data_1.entity.country));
|
|
88
|
+
_e.label = 3;
|
|
89
|
+
case 3:
|
|
90
|
+
flows = [];
|
|
91
|
+
if (!(data.step_name === PASSWORD_STEP_NAMES.PHONE_AUTH)) return [3, 4];
|
|
102
92
|
thunkApi.dispatch(handleCurrentActiveScreen('PASSWORD_VERIFY_STEP'));
|
|
103
|
-
|
|
104
|
-
|
|
93
|
+
return [3, 7];
|
|
94
|
+
case 4:
|
|
95
|
+
if (!(board_info_password_status === 'completed')) return [3, 6];
|
|
96
|
+
return [4, Promise.all([
|
|
97
|
+
API.boardService.retrieveBoardInfoStatus(board_id),
|
|
98
|
+
thunkApi.dispatch(retrieveBoardDetails({ boardId: board_id, individualId: recipient === null || recipient === void 0 ? void 0 : recipient.id, individualType: recipient === null || recipient === void 0 ? void 0 : recipient.type })).unwrap()
|
|
99
|
+
])];
|
|
100
|
+
case 5:
|
|
101
|
+
data_2 = (_e.sent())[0];
|
|
102
|
+
flows = (data_2 === null || data_2 === void 0 ? void 0 : data_2.info) || [];
|
|
105
103
|
thunkApi.dispatch(handleNextScreenStep('PASSWORD_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
token: token
|
|
116
|
-
}];
|
|
117
|
-
}
|
|
104
|
+
return [3, 7];
|
|
105
|
+
case 6:
|
|
106
|
+
if (data.step_name === PASSWORD_STEP_NAMES.PASSWORD_INFO) {
|
|
107
|
+
thunkApi.dispatch(handleNextScreenStep('PASSWORD_CREATE_PASSWORD_STEP'));
|
|
108
|
+
}
|
|
109
|
+
_e.label = 7;
|
|
110
|
+
case 7: return [2, { data: data, token: token, flows: flows }];
|
|
111
|
+
}
|
|
112
|
+
});
|
|
118
113
|
});
|
|
119
|
-
});
|
|
114
|
+
});
|
|
120
115
|
export var resendOTP = createAsyncThunk('resendOTPPassword', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
121
116
|
var password, payload, data;
|
|
122
117
|
return __generator(this, function (_a) {
|
|
@@ -134,54 +129,82 @@ export var resendOTP = createAsyncThunk('resendOTPPassword', function (params, t
|
|
|
134
129
|
}
|
|
135
130
|
});
|
|
136
131
|
}); });
|
|
137
|
-
export var retrieveBoardDetails = createAsyncThunk('retrievePasswordBoardDetails', function (
|
|
138
|
-
var
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
132
|
+
export var retrieveBoardDetails = createAsyncThunk('retrievePasswordBoardDetails', function (_a) {
|
|
133
|
+
var boardId = _a.boardId, id = _a.individualId, type = _a.individualType;
|
|
134
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
135
|
+
var data, individualData, boardData, serviceCallBack, _b, boardRes, individualRes;
|
|
136
|
+
var _c, _d, _e;
|
|
137
|
+
return __generator(this, function (_f) {
|
|
138
|
+
switch (_f.label) {
|
|
139
|
+
case 0: return [4, API.boardService.retrieveBoardDetails(boardId)];
|
|
140
|
+
case 1:
|
|
141
|
+
data = _f.sent();
|
|
142
|
+
individualData = data === null || data === void 0 ? void 0 : data.user;
|
|
143
|
+
boardData = data;
|
|
144
|
+
if (!(((_c = data === null || data === void 0 ? void 0 : data.user) === null || _c === void 0 ? void 0 : _c.id) !== id && id)) return [3, 3];
|
|
145
|
+
serviceCallBack = function () { return API.individualService.retrieveIndividual(id, type); };
|
|
146
|
+
return [4, retrieveIndividualData(type, data, serviceCallBack)];
|
|
147
|
+
case 2:
|
|
148
|
+
_b = _f.sent(), boardRes = _b.boardRes, individualRes = _b.individualRes;
|
|
149
|
+
individualData = individualRes;
|
|
150
|
+
boardData = boardRes;
|
|
151
|
+
_f.label = 3;
|
|
152
|
+
case 3: return [2, __assign(__assign({}, boardData), { brand: boardData === null || boardData === void 0 ? void 0 : boardData.brand, bank_account: boardData === null || boardData === void 0 ? void 0 : boardData.bank_account, entity: boardData === null || boardData === void 0 ? void 0 : boardData.entity, merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant, name: (_d = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _d === void 0 ? void 0 : _d.names, individuals: boardData === null || boardData === void 0 ? void 0 : boardData.individuals, contact: (_e = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _e === void 0 ? void 0 : _e.contact, user: individualData, board_status: boardData === null || boardData === void 0 ? void 0 : boardData.status })];
|
|
153
|
+
}
|
|
154
|
+
});
|
|
149
155
|
});
|
|
150
|
-
});
|
|
156
|
+
});
|
|
151
157
|
export var verifyPasswordLeadOTP = createAsyncThunk('verifyPasswordLeadOTP', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
152
|
-
var _a, password, settings, responseBody, payload, data, publicKey, flows,
|
|
153
|
-
var
|
|
154
|
-
return __generator(this, function (
|
|
155
|
-
switch (
|
|
158
|
+
var _a, password, settings, responseBody, payload, data, _b, config, board_info_password_status, country_code, board_id, recipient, countryIso2, publicKey, flows, data_3, data_4;
|
|
159
|
+
var _c, _d, _e, _f, _g;
|
|
160
|
+
return __generator(this, function (_h) {
|
|
161
|
+
switch (_h.label) {
|
|
156
162
|
case 0:
|
|
157
163
|
_a = thunkApi.getState(), password = _a.password, settings = _a.settings;
|
|
158
164
|
responseBody = password.data.verify.responseBody;
|
|
159
165
|
payload = {
|
|
160
166
|
data: params.otp,
|
|
161
|
-
service_name: (
|
|
167
|
+
service_name: (_c = responseBody === null || responseBody === void 0 ? void 0 : responseBody.verification_by) === null || _c === void 0 ? void 0 : _c.service_name,
|
|
162
168
|
verify_token: responseBody === null || responseBody === void 0 ? void 0 : responseBody.verify_token,
|
|
163
169
|
step_name: PASSWORD_STEP_NAMES.PHONE_AUTH,
|
|
164
170
|
encryption_contract: ['data']
|
|
165
171
|
};
|
|
166
172
|
return [4, API.leadService.verifyLeadOTP(payload)];
|
|
167
173
|
case 1:
|
|
168
|
-
data = (
|
|
169
|
-
if (
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
(
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
174
|
+
data = (_h.sent()).data;
|
|
175
|
+
if ((_d = data === null || data === void 0 ? void 0 : data.errors) === null || _d === void 0 ? void 0 : _d.length)
|
|
176
|
+
throw new Error(data.errors[0].description);
|
|
177
|
+
_b = data || {}, config = _b.config, board_info_password_status = _b.board_info_password_status, country_code = _b.country_code, board_id = _b.id, recipient = _b.recipient;
|
|
178
|
+
countryIso2 = country_code;
|
|
179
|
+
if (countryIso2)
|
|
180
|
+
thunkApi.dispatch(handleSetCountryByIso2(countryIso2));
|
|
181
|
+
publicKey = config === null || config === void 0 ? void 0 : config.public_key;
|
|
182
|
+
if (publicKey)
|
|
183
|
+
thunkApi.dispatch(handlePublicKey(publicKey));
|
|
184
|
+
(_f = (_e = settings.data.appConfig).onStepCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, settings.data.activeScreen.name, { otp: params.otp });
|
|
185
|
+
flows = [];
|
|
186
|
+
if (!(board_info_password_status === 'completed')) return [3, 3];
|
|
187
|
+
return [4, Promise.all([
|
|
188
|
+
API.boardService.retrieveBoardInfoStatus(board_id),
|
|
189
|
+
thunkApi.dispatch(retrieveBoardDetails({ boardId: board_id, individualId: recipient === null || recipient === void 0 ? void 0 : recipient.id, individualType: recipient === null || recipient === void 0 ? void 0 : recipient.type })).unwrap()
|
|
190
|
+
])];
|
|
191
|
+
case 2:
|
|
192
|
+
data_3 = (_h.sent())[0];
|
|
193
|
+
flows = (data_3 === null || data_3 === void 0 ? void 0 : data_3.info) || [];
|
|
194
|
+
thunkApi.dispatch(handleNextScreenStep('PASSWORD_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
|
|
195
|
+
return [3, 6];
|
|
196
|
+
case 3:
|
|
197
|
+
if (!!country_code) return [3, 5];
|
|
198
|
+
return [4, API.boardService.retrieveBoardDetails(board_id)];
|
|
199
|
+
case 4:
|
|
200
|
+
data_4 = _h.sent();
|
|
201
|
+
if ((_g = data_4 === null || data_4 === void 0 ? void 0 : data_4.entity) === null || _g === void 0 ? void 0 : _g.country)
|
|
202
|
+
thunkApi.dispatch(handleSetCountryByIso2(data_4.entity.country));
|
|
203
|
+
_h.label = 5;
|
|
204
|
+
case 5:
|
|
205
|
+
thunkApi.dispatch(handleNextScreenStep('PASSWORD_CREATE_PASSWORD_STEP'));
|
|
206
|
+
_h.label = 6;
|
|
207
|
+
case 6: return [2, { data: data, formData: __assign({}, params), flows: flows }];
|
|
185
208
|
}
|
|
186
209
|
});
|
|
187
210
|
}); });
|
|
@@ -201,90 +224,114 @@ export var createPassword = createAsyncThunk('createPassword', function (params,
|
|
|
201
224
|
return [4, API.authService.createPassword(requestBody)];
|
|
202
225
|
case 1:
|
|
203
226
|
data = _f.sent();
|
|
204
|
-
thunkApi.dispatch(handleNextScreenStep('PASSWORD_SUCCESS_STEP'));
|
|
227
|
+
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep('PASSWORD_SUCCESS_STEP')); });
|
|
205
228
|
(_e = (_d = settings.data.appConfig).onStepCompleted) === null || _e === void 0 ? void 0 : _e.call(_d, settings.data.activeScreen.name, requestBody);
|
|
206
229
|
return [2, { data: data, formData: params }];
|
|
207
230
|
}
|
|
208
231
|
});
|
|
209
232
|
}); });
|
|
210
233
|
export var updateBoardSuccess = createAsyncThunk('passwordUpdateBoardSuccess', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
211
|
-
var _a, settings, password, _b,
|
|
212
|
-
var
|
|
213
|
-
return __generator(this, function (
|
|
214
|
-
switch (
|
|
234
|
+
var _a, settings, password, _b, board_id, infoId, _c, showBoard, mode, payload, data, _d, id, type, boardInfoStatusData;
|
|
235
|
+
var _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
236
|
+
return __generator(this, function (_p) {
|
|
237
|
+
switch (_p.label) {
|
|
215
238
|
case 0:
|
|
216
239
|
_a = thunkApi.getState(), settings = _a.settings, password = _a.password;
|
|
217
|
-
_b = password.data.verify.responseBody || {},
|
|
218
|
-
|
|
240
|
+
_b = password.data.verify.responseBody || {}, board_id = _b.board_id, infoId = _b.board_info_id;
|
|
241
|
+
_c = settings.data.appConfig, showBoard = _c.showBoard, mode = _c.mode;
|
|
242
|
+
if (!board_id)
|
|
219
243
|
return [2];
|
|
220
244
|
payload = {
|
|
221
245
|
lang: settings.data.language,
|
|
222
|
-
step_name: PASSWORD_STEP_NAMES.PASSWORD_SUCCESS
|
|
223
|
-
id: id
|
|
246
|
+
step_name: PASSWORD_STEP_NAMES.PASSWORD_SUCCESS
|
|
224
247
|
};
|
|
225
|
-
return [4, API.boardService.updateBoardInfo(__assign({ id:
|
|
248
|
+
return [4, API.boardService.updateBoardInfo(__assign({ id: board_id, infoId: infoId }, payload))];
|
|
226
249
|
case 1:
|
|
227
|
-
data =
|
|
228
|
-
|
|
250
|
+
data = _p.sent();
|
|
251
|
+
sendCustomEventToGTM({
|
|
252
|
+
event: 'Send Event',
|
|
253
|
+
event_category: 'Board Flows - Password',
|
|
254
|
+
event_action: 'Password Update Success Page',
|
|
255
|
+
event_label: settings.data.businessCountry.iso2
|
|
256
|
+
});
|
|
257
|
+
if (!showBoard && mode === 'content') {
|
|
258
|
+
(_f = (_e = settings.data.appConfig).onStepCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, settings.data.activeScreen.name, {});
|
|
259
|
+
(_h = (_g = settings.data.appConfig).onFlowCompleted) === null || _h === void 0 ? void 0 : _h.call(_g, { data: data });
|
|
260
|
+
return [2, { data: data }];
|
|
261
|
+
}
|
|
262
|
+
_d = ((_j = data === null || data === void 0 ? void 0 : data.notification) === null || _j === void 0 ? void 0 : _j.recipient) || {}, id = _d.id, type = _d.type;
|
|
263
|
+
return [4, Promise.all([
|
|
264
|
+
API.boardService.retrieveBoardInfoStatus(board_id),
|
|
265
|
+
thunkApi.dispatch(retrieveBoardDetails({ boardId: board_id, individualId: id, individualType: type })).unwrap()
|
|
266
|
+
])];
|
|
229
267
|
case 2:
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
_g.sent();
|
|
234
|
-
(_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, {});
|
|
235
|
-
(_f = (_e = settings.data.appConfig).onFlowCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, { data: data });
|
|
268
|
+
boardInfoStatusData = (_p.sent())[0];
|
|
269
|
+
(_l = (_k = settings.data.appConfig).onStepCompleted) === null || _l === void 0 ? void 0 : _l.call(_k, settings.data.activeScreen.name, {});
|
|
270
|
+
(_o = (_m = settings.data.appConfig).onFlowCompleted) === null || _o === void 0 ? void 0 : _o.call(_m, { data: data });
|
|
236
271
|
thunkApi.dispatch(handleNextScreenStep());
|
|
237
|
-
return [2, {
|
|
272
|
+
return [2, { data: data, flows: (boardInfoStatusData === null || boardInfoStatusData === void 0 ? void 0 : boardInfoStatusData.info) || [] }];
|
|
273
|
+
}
|
|
274
|
+
});
|
|
275
|
+
}); });
|
|
276
|
+
export var retrieveBoardStatus = createAsyncThunk('password/retrieveBoardStatus', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
277
|
+
var password, _a, board_id, board_info_id, recipient, _b, id, type, data;
|
|
278
|
+
return __generator(this, function (_c) {
|
|
279
|
+
switch (_c.label) {
|
|
280
|
+
case 0:
|
|
281
|
+
password = thunkApi.getState().password;
|
|
282
|
+
_a = password.data.verify.responseBody || {}, board_id = _a.board_id, board_info_id = _a.board_info_id, recipient = _a.recipient;
|
|
283
|
+
if (!board_id || !board_info_id)
|
|
284
|
+
throw new Error('Internal server error');
|
|
285
|
+
_b = recipient || {}, id = _b.id, type = _b.type;
|
|
286
|
+
return [4, Promise.all([
|
|
287
|
+
API.boardService.retrieveBoardInfoStatus(board_id),
|
|
288
|
+
thunkApi.dispatch(retrieveBoardDetails({ boardId: board_id, individualId: id, individualType: type })).unwrap()
|
|
289
|
+
])];
|
|
290
|
+
case 1:
|
|
291
|
+
data = (_c.sent())[0];
|
|
292
|
+
thunkApi.dispatch(handlePrevScreenStep());
|
|
293
|
+
return [2, { flows: (data === null || data === void 0 ? void 0 : data.info) || [] }];
|
|
238
294
|
}
|
|
239
295
|
});
|
|
240
296
|
}); });
|
|
241
297
|
export var verifyOperationToken = createAsyncThunk('verifyOperationToken', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
242
|
-
var token, boardId, boardInfoId,
|
|
243
|
-
var
|
|
244
|
-
return __generator(this, function (
|
|
245
|
-
switch (
|
|
298
|
+
var token, boardId, boardInfoId, userId, userType, payload, data, countryIso2, publicKey, data_5;
|
|
299
|
+
var _a, _b, _c;
|
|
300
|
+
return __generator(this, function (_d) {
|
|
301
|
+
switch (_d.label) {
|
|
246
302
|
case 0:
|
|
247
|
-
token = params.token, boardId = params.boardId, boardInfoId = params.boardInfoId;
|
|
248
|
-
boardData = undefined;
|
|
303
|
+
token = params.token, boardId = params.boardId, boardInfoId = params.boardInfoId, userId = params.userId, userType = params.userType;
|
|
249
304
|
payload = {
|
|
250
305
|
auth_type: 7,
|
|
251
306
|
auth_token: token
|
|
252
307
|
};
|
|
253
308
|
return [4, API.authService.verifyAuth(payload)];
|
|
254
309
|
case 1:
|
|
255
|
-
data = (
|
|
256
|
-
if (
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
310
|
+
data = (_d.sent()).data;
|
|
311
|
+
if ((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a.length)
|
|
312
|
+
throw new Error(data.errors[0].description);
|
|
313
|
+
countryIso2 = data === null || data === void 0 ? void 0 : data.country;
|
|
314
|
+
if (countryIso2)
|
|
315
|
+
thunkApi.dispatch(handleSetCountryByIso2(countryIso2));
|
|
316
|
+
publicKey = (_b = data === null || data === void 0 ? void 0 : data.config) === null || _b === void 0 ? void 0 : _b.public_key;
|
|
317
|
+
if (publicKey)
|
|
318
|
+
thunkApi.dispatch(handlePublicKey(publicKey));
|
|
319
|
+
if (!!(data === null || data === void 0 ? void 0 : data.country)) return [3, 3];
|
|
260
320
|
return [4, API.boardService.retrieveBoardDetails(boardId)];
|
|
321
|
+
case 2:
|
|
322
|
+
data_5 = _d.sent();
|
|
323
|
+
if ((_c = data_5 === null || data_5 === void 0 ? void 0 : data_5.entity) === null || _c === void 0 ? void 0 : _c.country)
|
|
324
|
+
thunkApi.dispatch(handleSetCountryByIso2(data_5.entity.country));
|
|
325
|
+
_d.label = 3;
|
|
261
326
|
case 3:
|
|
262
|
-
boardData = _f.sent();
|
|
263
|
-
if (!boardInfoId) return [3, 5];
|
|
264
|
-
return [4, API.boardService.retrieveBoardInfo({ id: boardId, infoId: boardInfoId })];
|
|
265
|
-
case 4:
|
|
266
|
-
boardInfoData = _f.sent();
|
|
267
|
-
_f.label = 5;
|
|
268
|
-
case 5:
|
|
269
|
-
_a = ((_c = boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.notification) === null || _c === void 0 ? void 0 : _c.recipient) || {}, id_2 = _a.id, type_2 = _a.type;
|
|
270
|
-
serviceCallBack = function () { return API.individualService.retrieveIndividual(id_2, type_2); };
|
|
271
|
-
return [4, retrieveIndividualData(type_2, boardData, serviceCallBack)];
|
|
272
|
-
case 6:
|
|
273
|
-
_b = _f.sent(), boardRes = _b.boardRes, individualRes = _b.individualRes;
|
|
274
|
-
boardData = boardRes;
|
|
275
|
-
individualData = individualRes;
|
|
276
|
-
_f.label = 7;
|
|
277
|
-
case 7:
|
|
278
327
|
thunkApi.dispatch(handleNextScreenStep('PASSWORD_CREATE_PASSWORD_STEP'));
|
|
279
|
-
return [2, {
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
flows: (boardStatusData === null || boardStatusData === void 0 ? void 0 : boardStatusData.info) || []
|
|
287
|
-
}];
|
|
328
|
+
return [2, __assign({ data: data, token: token, boardId: boardId, boardInfoId: boardInfoId }, (userId &&
|
|
329
|
+
userType && {
|
|
330
|
+
recipient: {
|
|
331
|
+
id: userId,
|
|
332
|
+
type: userType
|
|
333
|
+
}
|
|
334
|
+
}))];
|
|
288
335
|
}
|
|
289
336
|
});
|
|
290
337
|
}); });
|
|
@@ -307,9 +354,9 @@ export var resendOperationOTP = createAsyncThunk('resendOperationOTPPassword', f
|
|
|
307
354
|
}); });
|
|
308
355
|
export var resetPassword = createAsyncThunk('resetPassword', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
309
356
|
var _a, password, settings, responseBody, passwordData, payload, data;
|
|
310
|
-
var _b, _c;
|
|
311
|
-
return __generator(this, function (
|
|
312
|
-
switch (
|
|
357
|
+
var _b, _c, _d;
|
|
358
|
+
return __generator(this, function (_e) {
|
|
359
|
+
switch (_e.label) {
|
|
313
360
|
case 0:
|
|
314
361
|
_a = thunkApi.getState(), password = _a.password, settings = _a.settings;
|
|
315
362
|
responseBody = password.data.verify.responseBody;
|
|
@@ -326,33 +373,56 @@ export var resetPassword = createAsyncThunk('resetPassword', function (params, t
|
|
|
326
373
|
};
|
|
327
374
|
return [4, API.authService.verifyAuth(payload)];
|
|
328
375
|
case 1:
|
|
329
|
-
data = (
|
|
376
|
+
data = (_e.sent()).data;
|
|
377
|
+
if ((_b = data === null || data === void 0 ? void 0 : data.errors) === null || _b === void 0 ? void 0 : _b.length)
|
|
378
|
+
throw new Error(data.errors[0].description);
|
|
330
379
|
if (!(data === null || data === void 0 ? void 0 : data.errors)) {
|
|
331
|
-
thunkApi.dispatch(handleNextScreenStep('PASSWORD_SUCCESS_STEP'));
|
|
332
|
-
(
|
|
380
|
+
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep('PASSWORD_SUCCESS_STEP')); });
|
|
381
|
+
(_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, payload);
|
|
333
382
|
}
|
|
334
383
|
return [2, { data: data, formData: __assign(__assign({}, params), passwordData) }];
|
|
335
384
|
}
|
|
336
385
|
});
|
|
337
386
|
}); });
|
|
338
387
|
export var retrieveBoardResetPasswordSuccess = createAsyncThunk('retrieveBoardResetPasswordSuccess', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
339
|
-
var _a, password, settings, id,
|
|
340
|
-
var
|
|
341
|
-
return __generator(this, function (
|
|
342
|
-
switch (
|
|
388
|
+
var _a, password, settings, _b, board_id, boardResponse, recipient, _c, showBoard, mode, _d, id, type, data;
|
|
389
|
+
var _e, _f, _g, _h, _j, _k, _l, _m;
|
|
390
|
+
return __generator(this, function (_o) {
|
|
391
|
+
switch (_o.label) {
|
|
343
392
|
case 0:
|
|
344
393
|
_a = thunkApi.getState(), password = _a.password, settings = _a.settings;
|
|
345
|
-
|
|
346
|
-
|
|
394
|
+
_b = password.data.verify.responseBody || { board_id: '' }, board_id = _b.board_id, boardResponse = _b.boardResponse, recipient = _b.recipient;
|
|
395
|
+
_c = settings.data.appConfig, showBoard = _c.showBoard, mode = _c.mode;
|
|
396
|
+
if (!showBoard && mode === 'content') {
|
|
397
|
+
(_f = (_e = settings.data.appConfig).onStepCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, settings.data.activeScreen.name, {});
|
|
398
|
+
(_h = (_g = settings.data.appConfig).onFlowCompleted) === null || _h === void 0 ? void 0 : _h.call(_g, { data: boardResponse });
|
|
399
|
+
return [2, { id: board_id, flows: [] }];
|
|
400
|
+
}
|
|
401
|
+
_d = recipient || {}, id = _d.id, type = _d.type;
|
|
402
|
+
return [4, Promise.all([
|
|
403
|
+
API.boardService.retrieveBoardInfoStatus(board_id),
|
|
404
|
+
thunkApi.dispatch(retrieveBoardDetails({ boardId: board_id, individualId: id, individualType: type })).unwrap()
|
|
405
|
+
])];
|
|
347
406
|
case 1:
|
|
348
|
-
|
|
349
|
-
return [4, thunkApi.dispatch(retrieveBoardDetails(id))];
|
|
350
|
-
case 2:
|
|
351
|
-
_f.sent();
|
|
407
|
+
data = (_o.sent())[0];
|
|
352
408
|
thunkApi.dispatch(handleNextScreenStep());
|
|
353
|
-
(
|
|
354
|
-
(
|
|
355
|
-
return [2, { id:
|
|
409
|
+
(_k = (_j = settings.data.appConfig).onStepCompleted) === null || _k === void 0 ? void 0 : _k.call(_j, settings.data.activeScreen.name, { id: id });
|
|
410
|
+
(_m = (_l = settings.data.appConfig).onFlowCompleted) === null || _m === void 0 ? void 0 : _m.call(_l, board_id);
|
|
411
|
+
return [2, { id: board_id, flows: (data === null || data === void 0 ? void 0 : data.info) || [] }];
|
|
412
|
+
}
|
|
413
|
+
});
|
|
414
|
+
}); });
|
|
415
|
+
export var onCloseCompletePassword = createAsyncThunk('password/onCloseCompletePassword', function (_, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
416
|
+
var password, _a, merchant, brand, entity;
|
|
417
|
+
return __generator(this, function (_b) {
|
|
418
|
+
switch (_b.label) {
|
|
419
|
+
case 0:
|
|
420
|
+
password = thunkApi.getState().password;
|
|
421
|
+
_a = password.data.verify.responseBody || {}, merchant = _a.merchant, brand = _a.brand, entity = _a.entity;
|
|
422
|
+
return [4, thunkApi.dispatch(onCloseComplete({ merchantId: merchant === null || merchant === void 0 ? void 0 : merchant.id, brandId: brand === null || brand === void 0 ? void 0 : brand.id, entityId: entity === null || entity === void 0 ? void 0 : entity.id }))];
|
|
423
|
+
case 1:
|
|
424
|
+
_b.sent();
|
|
425
|
+
return [2];
|
|
356
426
|
}
|
|
357
427
|
});
|
|
358
428
|
}); });
|
|
@@ -393,17 +463,13 @@ export var passwordSlice = createSlice({
|
|
|
393
463
|
extraReducers: function (builder) {
|
|
394
464
|
builder
|
|
395
465
|
.addCase(verifyLeadToken.fulfilled, function (state, action) {
|
|
396
|
-
var _a;
|
|
397
466
|
state.data.verify.operationType = PASSWORD_OPERATION_TYPE.SET_PASSWORD;
|
|
398
467
|
state.error = null;
|
|
399
468
|
state.customLoading = false;
|
|
400
|
-
var
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
return;
|
|
405
|
-
}
|
|
406
|
-
state.data.verify.responseBody = __assign(__assign(__assign(__assign({}, data), boardResponse), state.data.verify.responseBody), { board_id: data.id });
|
|
469
|
+
var _a = action.payload, data = _a.data, token = _a.token, flows = _a.flows;
|
|
470
|
+
state.data.verify.responseBody = __assign(__assign(__assign(__assign({}, data), state.data.verify.responseBody), { board_id: data.id }), ((flows === null || flows === void 0 ? void 0 : flows.length) && {
|
|
471
|
+
flows: flows
|
|
472
|
+
}));
|
|
407
473
|
state.data.verify.token = token;
|
|
408
474
|
})
|
|
409
475
|
.addCase(verifyLeadToken.pending, function (state) {
|
|
@@ -436,17 +502,14 @@ export var passwordSlice = createSlice({
|
|
|
436
502
|
state.error = null;
|
|
437
503
|
})
|
|
438
504
|
.addCase(verifyPasswordLeadOTP.fulfilled, function (state, action) {
|
|
439
|
-
var _a;
|
|
440
505
|
state.loading = false;
|
|
441
506
|
state.error = null;
|
|
442
|
-
var
|
|
443
|
-
var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
|
|
444
|
-
if (description) {
|
|
445
|
-
state.error = description;
|
|
446
|
-
return;
|
|
447
|
-
}
|
|
507
|
+
var _a = action.payload, data = _a.data, formData = _a.formData, flows = _a.flows;
|
|
448
508
|
state.data.otpData = formData;
|
|
449
509
|
state.data.otpData.responseBody = data;
|
|
510
|
+
state.data.verify.responseBody = __assign(__assign(__assign(__assign({}, data), state.data.verify.responseBody), { board_id: data.id }), ((flows === null || flows === void 0 ? void 0 : flows.length) && {
|
|
511
|
+
flows: flows
|
|
512
|
+
}));
|
|
450
513
|
})
|
|
451
514
|
.addCase(verifyPasswordLeadOTP.rejected, function (state, action) {
|
|
452
515
|
state.loading = false;
|
|
@@ -480,7 +543,7 @@ export var passwordSlice = createSlice({
|
|
|
480
543
|
.addCase(retrieveBoardDetails.fulfilled, function (state, action) {
|
|
481
544
|
state.error = null;
|
|
482
545
|
state.loading = false;
|
|
483
|
-
var data =
|
|
546
|
+
var data = action.payload || {};
|
|
484
547
|
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), data);
|
|
485
548
|
})
|
|
486
549
|
.addCase(retrieveBoardDetails.rejected, function (state, action) {
|
|
@@ -488,15 +551,11 @@ export var passwordSlice = createSlice({
|
|
|
488
551
|
state.loading = false;
|
|
489
552
|
})
|
|
490
553
|
.addCase(updateBoardSuccess.fulfilled, function (state, action) {
|
|
554
|
+
var _a;
|
|
491
555
|
state.loading = false;
|
|
492
556
|
state.error = null;
|
|
493
|
-
var
|
|
494
|
-
|
|
495
|
-
var _a = state.data.verify.responseBody || {}, individuals = _a.individuals, individualData = _a.individualData;
|
|
496
|
-
var data_state = (individualData || {}).data_state;
|
|
497
|
-
state.data.verify.responseBody = __assign(__assign(__assign(__assign({}, state.data.verify.responseBody), { flows: flows }), (individualData && { user: individualData })), (data_state && {
|
|
498
|
-
individuals: __assign(__assign({}, individuals), { data_state: data_state })
|
|
499
|
-
}));
|
|
557
|
+
var _b = action.payload || {}, flows = _b.flows, data = _b.data;
|
|
558
|
+
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { flows: flows, recipient: (_a = data === null || data === void 0 ? void 0 : data.notification) === null || _a === void 0 ? void 0 : _a.recipient });
|
|
500
559
|
})
|
|
501
560
|
.addCase(updateBoardSuccess.pending, function (state) {
|
|
502
561
|
state.loading = true;
|
|
@@ -505,20 +564,27 @@ export var passwordSlice = createSlice({
|
|
|
505
564
|
.addCase(updateBoardSuccess.rejected, function (state, action) {
|
|
506
565
|
state.loading = false;
|
|
507
566
|
state.error = action.error.message;
|
|
567
|
+
})
|
|
568
|
+
.addCase(retrieveBoardStatus.pending, function (state) {
|
|
569
|
+
state.error = null;
|
|
570
|
+
state.loading = true;
|
|
571
|
+
})
|
|
572
|
+
.addCase(retrieveBoardStatus.fulfilled, function (state, action) {
|
|
573
|
+
state.error = null;
|
|
574
|
+
state.loading = false;
|
|
575
|
+
var flows = (action.payload || {}).flows;
|
|
576
|
+
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { flows: flows });
|
|
577
|
+
})
|
|
578
|
+
.addCase(retrieveBoardStatus.rejected, function (state, action) {
|
|
579
|
+
state.error = action.error.message;
|
|
580
|
+
state.loading = false;
|
|
508
581
|
})
|
|
509
582
|
.addCase(verifyOperationToken.fulfilled, function (state, action) {
|
|
510
|
-
var _a;
|
|
511
583
|
state.data.verify.operationType = PASSWORD_OPERATION_TYPE.RESET_PASSWORD;
|
|
512
584
|
state.error = null;
|
|
513
585
|
state.customLoading = false;
|
|
514
|
-
var
|
|
515
|
-
state.data.verify.responseBody = __assign(__assign(__assign({},
|
|
516
|
-
var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
|
|
517
|
-
if (description) {
|
|
518
|
-
state.error = description;
|
|
519
|
-
return;
|
|
520
|
-
}
|
|
521
|
-
state.data.verify.responseBody = __assign(__assign(__assign(__assign({}, data), boardResponse), state.data.verify.responseBody), { board_id: boardId, board_info_id: boardInfoId, flows: flows });
|
|
586
|
+
var _a = action.payload, data = _a.data, token = _a.token, boardId = _a.boardId, boardInfoId = _a.boardInfoId, recipient = _a.recipient;
|
|
587
|
+
state.data.verify.responseBody = __assign(__assign(__assign(__assign({}, data), state.data.verify.responseBody), { board_id: boardId, board_info_id: boardInfoId }), (recipient && { recipient: recipient }));
|
|
522
588
|
state.data.verify.token = token;
|
|
523
589
|
})
|
|
524
590
|
.addCase(verifyOperationToken.pending, function (state) {
|
|
@@ -547,16 +613,10 @@ export var passwordSlice = createSlice({
|
|
|
547
613
|
state.error = action.error.message;
|
|
548
614
|
})
|
|
549
615
|
.addCase(resetPassword.fulfilled, function (state, action) {
|
|
550
|
-
var _a;
|
|
551
616
|
state.data.verify.operationType = PASSWORD_OPERATION_TYPE.RESET_PASSWORD;
|
|
552
617
|
state.error = null;
|
|
553
618
|
state.loading = false;
|
|
554
|
-
var
|
|
555
|
-
var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
|
|
556
|
-
if (description) {
|
|
557
|
-
state.error = description;
|
|
558
|
-
return;
|
|
559
|
-
}
|
|
619
|
+
var _a = action.payload, data = _a.data, formData = _a.formData;
|
|
560
620
|
state.data.passwordData = formData;
|
|
561
621
|
state.data.passwordData.responseBody = data;
|
|
562
622
|
})
|
|
@@ -571,13 +631,8 @@ export var passwordSlice = createSlice({
|
|
|
571
631
|
.addCase(retrieveBoardResetPasswordSuccess.fulfilled, function (state, action) {
|
|
572
632
|
state.loading = false;
|
|
573
633
|
state.error = null;
|
|
574
|
-
var
|
|
575
|
-
|
|
576
|
-
var _a = state.data.verify.responseBody || {}, individuals = _a.individuals, individualData = _a.individualData;
|
|
577
|
-
var data_state = (((individualData === null || individualData === void 0 ? void 0 : individualData.is_authorized) ? individuals : individualData) || {}).data_state;
|
|
578
|
-
state.data.verify.responseBody = __assign(__assign(__assign(__assign({}, state.data.verify.responseBody), { flows: flows }), (individualData && { user: individualData })), (data_state && {
|
|
579
|
-
individuals: __assign(__assign({}, individuals), { data_state: data_state })
|
|
580
|
-
}));
|
|
634
|
+
var flows = (action.payload || {}).flows;
|
|
635
|
+
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { flows: flows });
|
|
581
636
|
})
|
|
582
637
|
.addCase(retrieveBoardResetPasswordSuccess.pending, function (state) {
|
|
583
638
|
state.loading = true;
|
|
@@ -586,6 +641,18 @@ export var passwordSlice = createSlice({
|
|
|
586
641
|
.addCase(retrieveBoardResetPasswordSuccess.rejected, function (state, action) {
|
|
587
642
|
state.loading = false;
|
|
588
643
|
state.error = action.error.message;
|
|
644
|
+
})
|
|
645
|
+
.addCase(onCloseCompletePassword.pending, function (state) {
|
|
646
|
+
state.loading = true;
|
|
647
|
+
state.error = null;
|
|
648
|
+
})
|
|
649
|
+
.addCase(onCloseCompletePassword.fulfilled, function (state) {
|
|
650
|
+
state.loading = false;
|
|
651
|
+
state.error = null;
|
|
652
|
+
})
|
|
653
|
+
.addCase(onCloseCompletePassword.rejected, function (state, action) {
|
|
654
|
+
state.loading = false;
|
|
655
|
+
state.error = action.error.message;
|
|
589
656
|
});
|
|
590
657
|
}
|
|
591
658
|
});
|