@tap-payments/auth-jsconnect 2.7.8-test → 2.7.8
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 +42 -4
- package/build/@types/app.js +16 -0
- package/build/@types/config.d.ts +4 -0
- package/build/@types/form.d.ts +11 -1
- package/build/@types/redux.d.ts +1 -0
- package/build/api/account.d.ts +4 -1
- package/build/api/account.js +15 -1
- package/build/api/auth.d.ts +35 -20
- package/build/api/auth.js +1 -1
- package/build/api/axios.js +1 -2
- package/build/api/data.d.ts +4 -17
- package/build/api/data.js +5 -45
- package/build/api/entity.d.ts +3 -2
- package/build/api/entity.js +12 -4
- package/build/api/firebase.js +68 -8
- package/build/api/index.d.ts +14 -25
- package/build/api/lead.d.ts +16 -3
- package/build/api/lead.js +16 -0
- package/build/api/user.d.ts +7 -0
- package/build/api/user.js +9 -1
- package/build/app/rootReducer.d.ts +1 -0
- package/build/app/rootReducer.js +3 -1
- package/build/app/settings.js +15 -15
- package/build/app/store.d.ts +2 -0
- package/build/assets/locales/ar.json +353 -151
- package/build/assets/locales/en.json +349 -150
- package/build/components/AnimationFlow/AnimationFlow.d.ts +9 -5
- package/build/components/AnimationFlow/AnimationFlow.js +5 -5
- package/build/components/AnimationFlow/BottomSheet.d.ts +5 -2
- package/build/components/AnimationFlow/BottomSheet.js +43 -14
- package/build/components/AnimationFlow/Dialog.d.ts +4 -3
- package/build/components/AnimationFlow/Dialog.js +5 -3
- package/build/components/ArabicDatePicker/ArabicDatePicker.d.ts +1 -1
- package/build/components/ArabicDatePicker/ArabicDatePicker.js +2 -2
- package/build/components/ArabicDatePicker/style.css +32 -3
- package/build/components/DatePicker/DatePicker.d.ts +1 -1
- package/build/components/DatePicker/DatePicker.js +2 -2
- package/build/components/Footer/Footer.js +2 -1
- package/build/components/Input/Input.js +1 -1
- package/build/components/Providers/ThemeProvider.js +3 -3
- package/build/components/Tooltip/Tooltip.js +1 -1
- package/build/constants/api.d.ts +5 -7
- package/build/constants/api.js +11 -15
- package/build/constants/app.d.ts +39 -0
- package/build/constants/app.js +345 -35
- package/build/constants/assets.d.ts +3 -0
- package/build/constants/assets.js +4 -1
- package/build/constants/dummy.d.ts +4 -219
- package/build/constants/dummy.js +64 -6194
- package/build/constants/flows.d.ts +26 -0
- package/build/constants/flows.js +27 -0
- package/build/constants/index.d.ts +1 -0
- package/build/constants/index.js +1 -0
- package/build/constants/validation.d.ts +3 -0
- package/build/constants/validation.js +3 -0
- package/build/features/app/auth/authStore.d.ts +29 -8
- package/build/features/app/auth/authStore.js +495 -149
- package/build/features/app/bank/bankStore.d.ts +13 -18
- package/build/features/app/bank/bankStore.js +186 -153
- package/build/features/app/board/boardStore.d.ts +5 -1
- package/build/features/app/board/boardStore.js +82 -51
- package/build/features/app/brand/brandStore.d.ts +17 -33
- package/build/features/app/brand/brandStore.js +254 -257
- package/build/features/app/business/businessStore.d.ts +37 -15
- package/build/features/app/business/businessStore.js +443 -235
- package/build/features/app/connect/connectStore.d.ts +33 -5
- package/build/features/app/connect/connectStore.js +355 -120
- package/build/features/app/connectExpress/connectExpressStore.d.ts +56 -27
- package/build/features/app/connectExpress/connectExpressStore.js +676 -392
- package/build/features/app/entity/entityStore.d.ts +20 -36
- package/build/features/app/entity/entityStore.js +204 -238
- package/build/features/app/individual/individualStore.d.ts +18 -34
- package/build/features/app/individual/individualStore.js +269 -292
- package/build/features/app/kyc/kycStore.d.ts +67 -0
- package/build/features/app/kyc/kycStore.js +432 -0
- package/build/features/app/password/passwordStore.d.ts +33 -18
- package/build/features/app/password/passwordStore.js +260 -219
- package/build/features/app/signIn/signInStore.js +19 -15
- package/build/features/app/tax/taxStore.d.ts +13 -7
- package/build/features/app/tax/taxStore.js +170 -136
- package/build/features/auth/Auth.d.ts +5 -6
- package/build/features/auth/Auth.js +40 -15
- package/build/features/auth/screens/AccountNotFound/AccountNotFound.js +2 -5
- 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.js +2 -8
- package/build/features/auth/screens/AuthenticationList/LicenseNumber.js +2 -2
- package/build/features/auth/screens/BusinessCountry/BusinessCountry.js +8 -2
- package/build/features/auth/screens/CivilID/CivilID.js +4 -35
- package/build/features/auth/screens/{NID → DOB}/DOB.js +3 -3
- 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/{business/screens/OTP → auth/screens/DOB}/validation.d.ts +4 -4
- 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.js +6 -38
- package/build/features/auth/screens/Mobile/MobileNumber.js +13 -15
- package/build/features/auth/screens/Mobile/validation.js +11 -3
- package/build/features/auth/screens/NID/IDNumber.js +1 -1
- package/build/features/auth/screens/NID/NID.js +7 -43
- package/build/features/auth/screens/NID/validation.d.ts +0 -3
- package/build/features/auth/screens/NID/validation.js +0 -1
- package/build/features/auth/screens/OTP/OTP.js +41 -10
- package/build/features/auth/screens/OTP/OTPInput.js +23 -6
- 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.js +3 -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/bank/Bank.d.ts +5 -1
- package/build/features/bank/Bank.js +22 -9
- package/build/features/bank/screens/BankDetails/BankDetails.js +18 -5
- 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 +2 -2
- package/build/features/bank/screens/Verify/Verify.js +7 -6
- package/build/features/board/Board.d.ts +2 -0
- package/build/features/board/Board.js +24 -13
- 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/SuccessWithFlowButtons/SuccessWithFlowButtons.js +13 -4
- package/build/features/board/screens/Verify/Verify.js +3 -2
- package/build/features/brand/Brand.d.ts +5 -1
- package/build/features/brand/Brand.js +22 -9
- package/build/features/brand/screens/BrandActivities/ActivitiesList.d.ts +5 -5
- package/build/features/brand/screens/BrandActivities/BrandActivities.js +48 -11
- 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 +6 -3
- 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 +22 -4
- 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 +22 -6
- 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 +2 -2
- package/build/features/brand/screens/Verify/Verify.js +3 -2
- package/build/features/business/Business.js +20 -12
- package/build/features/business/screens/Activities/Activities.js +26 -9
- 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 +11 -3
- package/build/features/business/screens/BusinessType/LicenseNumber.js +3 -3
- package/build/features/business/screens/Customers/CustomerLocations.d.ts +10 -8
- package/build/features/business/screens/Customers/CustomerLocations.js +5 -3
- package/build/features/business/screens/Customers/Customers.js +50 -10
- 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 +11 -5
- 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/{connectExpress/screens/IdentityOTP → business/screens/DOB}/validation.d.ts +4 -4
- package/build/features/business/screens/DOB/validation.js +4 -0
- package/build/features/business/screens/IDBOD/IDBOD.js +10 -2
- package/build/features/business/screens/IDBOD/validation.d.ts +0 -3
- package/build/features/business/screens/IDBOD/validation.js +0 -1
- package/build/features/business/screens/MobileOwnership/CollectMobileOwnership.d.ts +3 -0
- package/build/features/business/screens/MobileOwnership/CollectMobileOwnership.js +103 -0
- package/build/features/{connectExpress/screens/IdentityOTP/OTP.d.ts → business/screens/MobileOwnership/MobileNumber.d.ts} +0 -2
- package/build/features/business/screens/MobileOwnership/MobileNumber.js +72 -0
- package/build/features/business/screens/MobileOwnership/index.d.ts +2 -0
- package/build/features/business/screens/MobileOwnership/index.js +2 -0
- package/build/features/business/screens/MobileOwnership/validation.d.ts +8 -0
- package/build/features/business/screens/MobileOwnership/validation.js +38 -0
- 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 +15 -4
- 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 +16 -9
- package/build/features/connect/screens/BusinessCountry/BusinessCountry.js +7 -1
- package/build/features/connect/screens/CivilID/CivilID.js +6 -1
- package/build/features/{auth/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/Email.js +1 -3
- package/build/features/connect/screens/Individual/Individual.js +11 -5
- package/build/features/connect/screens/Individual/MobileNumber.js +8 -7
- package/build/features/connect/screens/Individual/validation.js +11 -3
- package/build/features/connect/screens/Merchant/BrandName.js +5 -2
- package/build/features/connect/screens/Merchant/validation.js +2 -2
- package/build/features/connect/screens/Mobile/Mobile.js +12 -9
- package/build/features/connect/screens/Mobile/MobileNumber.js +8 -7
- package/build/features/connect/screens/Mobile/validation.js +11 -3
- package/build/features/connect/screens/MobileOwnership/CollectMobileOwnership.d.ts +3 -0
- package/build/features/connect/screens/MobileOwnership/CollectMobileOwnership.js +104 -0
- package/build/features/connect/screens/MobileOwnership/MobileNumber.d.ts +3 -0
- package/build/features/connect/screens/MobileOwnership/MobileNumber.js +72 -0
- package/build/features/connect/screens/MobileOwnership/index.d.ts +2 -0
- package/build/features/connect/screens/MobileOwnership/index.js +2 -0
- package/build/features/connect/screens/MobileOwnership/validation.d.ts +8 -0
- package/build/features/connect/screens/MobileOwnership/validation.js +38 -0
- 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 +5 -11
- 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 +6 -6
- package/build/features/connect/screens/OTP/OTPInput.js +3 -11
- package/build/features/connect/screens/OperatorError/OperatorError.js +1 -1
- 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 -2
- package/build/features/connectExpress/ConnectExpress.js +62 -39
- package/build/features/connectExpress/screens/AuthenticationList/LicenseNumber.js +2 -2
- package/build/features/connectExpress/screens/BusinessCountry/BusinessCountry.js +7 -1
- package/build/features/connectExpress/screens/CivilID/CivilID.js +6 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/BrandName.js +5 -2
- package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.js +8 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseNumber.js +2 -2
- package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.d.ts +1 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/validation.js +2 -2
- package/build/features/connectExpress/screens/CollectIndividualInfo/CollectIndividualInfo.js +30 -7
- package/build/features/connectExpress/screens/CollectIndividualInfo/Email.js +1 -3
- package/build/features/connectExpress/screens/CollectIndividualInfo/MobileNumber.js +9 -8
- package/build/features/connectExpress/screens/CollectIndividualInfo/validation.js +11 -3
- package/build/features/connectExpress/screens/CreateAccountLoader/CreateAccountLoader.js +14 -24
- package/build/features/connectExpress/screens/{NID → DOB}/DOB.d.ts +1 -2
- 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/GenericPrepareDataLoading/GenericPrepareDataLoading.d.ts +3 -0
- package/build/features/connectExpress/screens/GenericPrepareDataLoading/GenericPrepareDataLoading.js +9 -0
- package/build/features/connectExpress/screens/GenericPrepareDataLoading/index.d.ts +2 -0
- package/build/features/connectExpress/screens/GenericPrepareDataLoading/index.js +2 -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/Mobile/Mobile.js +10 -3
- package/build/features/connectExpress/screens/Mobile/MobileNumber.js +9 -8
- package/build/features/connectExpress/screens/Mobile/validation.js +21 -6
- package/build/features/connectExpress/screens/MobileOwnership/CollectMobileOwnership.d.ts +3 -0
- package/build/features/connectExpress/screens/MobileOwnership/CollectMobileOwnership.js +106 -0
- package/build/features/connectExpress/screens/MobileOwnership/MobileNumber.d.ts +3 -0
- package/build/features/connectExpress/screens/MobileOwnership/MobileNumber.js +72 -0
- package/build/features/connectExpress/screens/MobileOwnership/index.d.ts +2 -0
- package/build/features/connectExpress/screens/MobileOwnership/index.js +2 -0
- package/build/features/connectExpress/screens/MobileOwnership/validation.d.ts +8 -0
- package/build/features/connectExpress/screens/MobileOwnership/validation.js +38 -0
- 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 +10 -10
- 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/NID.js +3 -3
- package/build/features/connectExpress/screens/NIDMissed/validation.d.ts +0 -3
- package/build/features/connectExpress/screens/NIDMissed/validation.js +0 -1
- package/build/features/connectExpress/screens/OTP/OTP.js +13 -15
- 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 +3 -3
- package/build/features/connectExpress/screens/VerifyNafath/VerifyNafath.d.ts +5 -0
- package/build/features/connectExpress/screens/VerifyNafath/VerifyNafath.js +41 -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 +4 -1
- package/build/features/entity/Entity.js +22 -9
- package/build/features/entity/screens/EntityCapital/ActivityList.d.ts +4 -4
- package/build/features/entity/screens/EntityCapital/CapitalPaid.js +8 -4
- package/build/features/entity/screens/EntityCapital/CapitalShareValue.js +8 -4
- package/build/features/entity/screens/EntityCapital/EntityCapital.js +33 -9
- package/build/features/entity/screens/EntityName/EntityName.js +31 -14
- package/build/features/entity/screens/EntityName/EntityTypeList.d.ts +5 -5
- 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 +13 -8
- package/build/features/entity/screens/EntityName/IssuingDate.d.ts +2 -2
- package/build/features/entity/screens/EntityName/IssuingDate.js +15 -8
- package/build/features/entity/screens/EntityName/LegalName.js +1 -13
- package/build/features/entity/screens/EntityName/LicenseNumber.js +6 -8
- package/build/features/entity/screens/EntityName/UnifiedNumber.js +4 -6
- package/build/features/entity/screens/EntityName/validation.d.ts +3 -3
- package/build/features/entity/screens/EntityName/validation.js +1 -10
- 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 +2 -2
- package/build/features/entity/screens/Verify/Verify.js +3 -2
- package/build/features/featuresScreens.d.ts +1 -0
- package/build/features/featuresScreens.js +211 -13
- package/build/features/individual/Individual.d.ts +4 -1
- package/build/features/individual/Individual.js +22 -9
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.d.ts +2 -2
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +44 -11
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +5 -2
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.js +8 -3
- package/build/features/individual/screens/IndividualList/Email.js +2 -3
- package/build/features/individual/screens/IndividualList/IndividualList.d.ts +4 -4
- package/build/features/individual/screens/IndividualList/IndividualList.js +18 -5
- package/build/features/individual/screens/IndividualList/MobileNumber.js +8 -10
- package/build/features/individual/screens/IndividualList/UserList.js +7 -7
- package/build/features/individual/screens/IndividualList/validation.js +11 -4
- package/build/features/individual/screens/IndividualPersonalInfo/Email.js +2 -4
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.d.ts +2 -2
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.js +73 -18
- package/build/features/individual/screens/IndividualPersonalInfo/MobileNumber.js +6 -5
- package/build/features/individual/screens/IndividualPersonalInfo/validation.js +11 -3
- package/build/features/individual/screens/IndividualPhoneInfo/MobileNumber.js +9 -11
- package/build/features/individual/screens/IndividualPhoneInfo/validation.js +11 -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 +2 -2
- package/build/features/individual/screens/Verify/Verify.js +3 -2
- package/build/features/kyc/KYC.d.ts +11 -0
- package/build/features/kyc/KYC.js +99 -0
- package/build/features/kyc/index.d.ts +1 -0
- package/build/features/kyc/index.js +1 -0
- package/build/features/kyc/screens/AlreadySubmitted/AlreadySubmitted.d.ts +5 -0
- package/build/features/kyc/screens/AlreadySubmitted/AlreadySubmitted.js +19 -0
- package/build/features/kyc/screens/AlreadySubmitted/index.d.ts +2 -0
- package/build/features/kyc/screens/AlreadySubmitted/index.js +2 -0
- package/build/features/kyc/screens/Loading/Loading.d.ts +4 -0
- package/build/features/kyc/screens/Loading/Loading.js +10 -0
- package/build/features/kyc/screens/Loading/index.d.ts +2 -0
- package/build/features/kyc/screens/Loading/index.js +2 -0
- package/build/features/kyc/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/kyc/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/kyc/screens/OperatorError/index.d.ts +2 -0
- package/build/features/kyc/screens/OperatorError/index.js +2 -0
- package/build/features/kyc/screens/Success/Success.d.ts +5 -0
- package/build/features/kyc/screens/Success/Success.js +32 -0
- package/build/features/kyc/screens/Success/index.d.ts +2 -0
- package/build/features/kyc/screens/Success/index.js +2 -0
- package/build/features/kyc/screens/Terms/Header.d.ts +6 -0
- package/build/features/kyc/screens/Terms/Header.js +36 -0
- package/build/features/kyc/screens/Terms/Terms.d.ts +4 -0
- package/build/features/kyc/screens/Terms/Terms.js +87 -0
- package/build/features/kyc/screens/Terms/index.d.ts +2 -0
- package/build/features/kyc/screens/Terms/index.js +2 -0
- package/build/features/kyc/screens/TokenError/TokenError.d.ts +5 -0
- package/build/features/kyc/screens/TokenError/TokenError.js +9 -0
- package/build/features/kyc/screens/TokenError/index.d.ts +2 -0
- package/build/features/kyc/screens/TokenError/index.js +2 -0
- package/build/features/kyc/screens/Users/Users.d.ts +3 -0
- package/build/features/kyc/screens/Users/Users.js +76 -0
- package/build/features/kyc/screens/Users/index.d.ts +2 -0
- package/build/features/kyc/screens/Users/index.js +2 -0
- package/build/features/kyc/screens/VerifyNafath/VerifyNafath.d.ts +5 -0
- package/build/features/kyc/screens/VerifyNafath/VerifyNafath.js +45 -0
- package/build/features/kyc/screens/VerifyNafath/index.d.ts +3 -0
- package/build/features/kyc/screens/VerifyNafath/index.js +2 -0
- package/build/features/kyc/screens/VerifyPaci/VerifyPACI.d.ts +5 -0
- package/build/features/kyc/screens/VerifyPaci/VerifyPACI.js +44 -0
- package/build/features/kyc/screens/VerifyPaci/index.d.ts +3 -0
- package/build/features/kyc/screens/VerifyPaci/index.js +2 -0
- package/build/features/password/Password.d.ts +4 -1
- package/build/features/password/Password.js +88 -31
- package/build/features/password/screens/CreatePassword/CreatePassword.js +8 -4
- package/build/features/password/screens/OTP/OTP.js +3 -3
- 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 +2 -2
- package/build/features/password/screens/Verify/Verify.js +7 -6
- package/build/features/shared/Address/CountryList.d.ts +5 -5
- package/build/features/shared/Address/InputSelect.d.ts +5 -5
- package/build/features/shared/Background/Background.js +1 -1
- package/build/features/shared/BusinessCountry/BusinessCountry.js +1 -1
- package/build/features/shared/Button/Button.js +3 -1
- package/build/features/shared/Button/EmailProvidersButtons.js +2 -0
- package/build/features/shared/Button/FlowsButtons.js +18 -4
- 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 +5 -3
- package/build/features/shared/Containers/ScreenContainer.d.ts +1 -1
- package/build/features/shared/Dialog/DialogContainer.js +5 -4
- 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 +6 -1
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +10 -13
- 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 +8 -7
- package/build/features/signIn/screens/Mobile/validation.js +11 -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 +4 -1
- package/build/features/tax/Tax.js +22 -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 +2 -2
- package/build/features/tax/screens/TaxDetails/TaxDetails.js +7 -2
- package/build/features/tax/screens/Verify/Verify.js +7 -6
- package/build/hooks/index.d.ts +3 -0
- package/build/hooks/index.js +3 -0
- package/build/hooks/useAppConfig.d.ts +1 -1
- package/build/hooks/useAppConfig.js +2 -2
- package/build/hooks/useAppDispatch.d.ts +1 -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/useFormDirtyCheck.d.ts +10 -0
- package/build/hooks/useFormDirtyCheck.js +66 -0
- package/build/hooks/useSanitizedTranslation.d.ts +2 -0
- package/build/hooks/useSanitizedTranslation.js +15 -0
- package/build/hooks/useVerifyToken.d.ts +4 -2
- package/build/hooks/useVerifyToken.js +9 -4
- package/build/index.css +360 -120
- package/build/index.d.ts +3 -2
- package/build/index.js +4 -2
- package/build/theme/components.js +7 -0
- package/build/theme/palette.js +2 -1
- package/build/theme/shadows.js +1 -1
- 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 +1 -0
- package/build/utils/common.js +16 -3
- package/build/utils/error.d.ts +1 -0
- package/build/utils/error.js +3 -0
- package/build/utils/object.d.ts +1 -0
- package/build/utils/object.js +3 -0
- package/build/utils/string.d.ts +6 -2
- package/build/utils/string.js +28 -3
- package/build/utils/validation.d.ts +2 -0
- package/build/utils/validation.js +6 -0
- package/package.json +3 -4
- package/build/features/business/screens/OTP/OTP.d.ts +0 -8
- package/build/features/business/screens/OTP/OTP.js +0 -90
- package/build/features/business/screens/OTP/OTPInput.d.ts +0 -5
- package/build/features/business/screens/OTP/OTPInput.js +0 -49
- package/build/features/business/screens/OTP/index.d.ts +0 -3
- package/build/features/business/screens/OTP/index.js +0 -2
- package/build/features/business/screens/OTP/validation.js +0 -4
- package/build/features/connectExpress/screens/IdentityOTP/OTP.js +0 -87
- package/build/features/connectExpress/screens/IdentityOTP/OTPInput.d.ts +0 -5
- package/build/features/connectExpress/screens/IdentityOTP/OTPInput.js +0 -54
- package/build/features/connectExpress/screens/IdentityOTP/index.d.ts +0 -3
- package/build/features/connectExpress/screens/IdentityOTP/index.js +0 -2
- package/build/features/connectExpress/screens/IdentityOTP/validation.js +0 -4
- package/build/features/shared/Button/AbsherButton.d.ts +0 -8
- /package/build/features/{connect/screens/NID → auth/screens/DOB}/DOB.d.ts +0 -0
|
@@ -56,19 +56,21 @@ var redirection = function (type) {
|
|
|
56
56
|
return handleNextScreenStep('SIGIN_OTP_STEP');
|
|
57
57
|
};
|
|
58
58
|
export var createMobileAuth = createAsyncThunk('signIn/createMobileAuth', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
59
|
-
var settings, requestBody, data;
|
|
60
|
-
var _a, _b, _c, _d;
|
|
61
|
-
return __generator(this, function (
|
|
62
|
-
switch (
|
|
59
|
+
var settings, isStartWithZero, mobileNumber, requestBody, data;
|
|
60
|
+
var _a, _b, _c, _d, _e;
|
|
61
|
+
return __generator(this, function (_f) {
|
|
62
|
+
switch (_f.label) {
|
|
63
63
|
case 0:
|
|
64
64
|
settings = thunkApi.getState().settings;
|
|
65
|
+
isStartWithZero = (_a = params.mobile) === null || _a === void 0 ? void 0 : _a.startsWith('0');
|
|
66
|
+
mobileNumber = isStartWithZero ? params.mobile.slice(1) : params.mobile;
|
|
65
67
|
requestBody = {
|
|
66
68
|
country: settings.data.businessCountry.iso2,
|
|
67
69
|
scope: settings.data.appConfig.scope,
|
|
68
70
|
lang: settings.data.language,
|
|
69
71
|
user_credentail: {
|
|
70
|
-
phone:
|
|
71
|
-
code: (
|
|
72
|
+
phone: mobileNumber || '',
|
|
73
|
+
code: (_c = (_b = params.countryCode) === null || _b === void 0 ? void 0 : _b.idd_prefix) === null || _c === void 0 ? void 0 : _c.toString()
|
|
72
74
|
},
|
|
73
75
|
sign_in: true,
|
|
74
76
|
step_name: SignIn_STEP_NAMES.CREATE_AUTH_MOBILE,
|
|
@@ -76,28 +78,30 @@ export var createMobileAuth = createAsyncThunk('signIn/createMobileAuth', functi
|
|
|
76
78
|
};
|
|
77
79
|
return [4, API.authService.createAuth(requestBody)];
|
|
78
80
|
case 1:
|
|
79
|
-
data =
|
|
81
|
+
data = _f.sent();
|
|
80
82
|
thunkApi.dispatch(redirection(data === null || data === void 0 ? void 0 : data.auth_type));
|
|
81
|
-
(
|
|
83
|
+
(_e = (_d = settings.data.appConfig).onStepCompleted) === null || _e === void 0 ? void 0 : _e.call(_d, settings.data.activeScreen.name, requestBody.user_credentail);
|
|
82
84
|
return [2, { data: data, formData: params }];
|
|
83
85
|
}
|
|
84
86
|
});
|
|
85
87
|
}); });
|
|
86
88
|
export var resendOTPMobile = createAsyncThunk('signIn/resendOTPMobile', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
87
|
-
var _a, settings, signIn, authData, requestBody, data;
|
|
88
|
-
var _b, _c;
|
|
89
|
-
return __generator(this, function (
|
|
90
|
-
switch (
|
|
89
|
+
var _a, settings, signIn, authData, isStartWithZero, mobileNumber, requestBody, data;
|
|
90
|
+
var _b, _c, _d, _e;
|
|
91
|
+
return __generator(this, function (_f) {
|
|
92
|
+
switch (_f.label) {
|
|
91
93
|
case 0:
|
|
92
94
|
_a = thunkApi.getState(), settings = _a.settings, signIn = _a.signIn;
|
|
93
95
|
authData = signIn.data.auth;
|
|
96
|
+
isStartWithZero = (_b = authData.mobile) === null || _b === void 0 ? void 0 : _b.startsWith('0');
|
|
97
|
+
mobileNumber = isStartWithZero ? (_c = authData.mobile) === null || _c === void 0 ? void 0 : _c.slice(1) : authData.mobile;
|
|
94
98
|
requestBody = {
|
|
95
99
|
country: settings.data.businessCountry.iso2,
|
|
96
100
|
scope: settings.data.appConfig.scope,
|
|
97
101
|
lang: settings.data.language,
|
|
98
102
|
user_credentail: {
|
|
99
|
-
phone:
|
|
100
|
-
code: ((
|
|
103
|
+
phone: mobileNumber || '',
|
|
104
|
+
code: ((_e = (_d = authData.countryCode) === null || _d === void 0 ? void 0 : _d.idd_prefix) === null || _e === void 0 ? void 0 : _e.toString()) || ''
|
|
101
105
|
},
|
|
102
106
|
sign_in: true,
|
|
103
107
|
step_name: SignIn_STEP_NAMES.CREATE_AUTH_MOBILE,
|
|
@@ -105,7 +109,7 @@ export var resendOTPMobile = createAsyncThunk('signIn/resendOTPMobile', function
|
|
|
105
109
|
};
|
|
106
110
|
return [4, API.authService.createAuth(requestBody)];
|
|
107
111
|
case 1:
|
|
108
|
-
data =
|
|
112
|
+
data = _f.sent();
|
|
109
113
|
return [2, data];
|
|
110
114
|
}
|
|
111
115
|
});
|
|
@@ -6,8 +6,7 @@ interface VerifyLeadTokenProps {
|
|
|
6
6
|
}
|
|
7
7
|
export declare const verifyLeadToken: import("@reduxjs/toolkit").AsyncThunk<{
|
|
8
8
|
data: any;
|
|
9
|
-
|
|
10
|
-
boardResponse: any;
|
|
9
|
+
entityData: any;
|
|
11
10
|
token: string;
|
|
12
11
|
}, VerifyLeadTokenProps, {}>;
|
|
13
12
|
export declare const resendOTP: import("@reduxjs/toolkit").AsyncThunk<{
|
|
@@ -16,11 +15,15 @@ export declare const resendOTP: import("@reduxjs/toolkit").AsyncThunk<{
|
|
|
16
15
|
export declare const retrieveBoardStatus: import("@reduxjs/toolkit").AsyncThunk<{
|
|
17
16
|
flows: any;
|
|
18
17
|
}, void, {}>;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
declare type RetrieveBoardProps = {
|
|
19
|
+
boardId: string;
|
|
20
|
+
individualId: string;
|
|
21
|
+
individualType: string;
|
|
22
|
+
};
|
|
23
|
+
export declare const retrieveBoardDetails: import("@reduxjs/toolkit").AsyncThunk<any, RetrieveBoardProps, {}>;
|
|
22
24
|
export declare const verifyTaxLeadOTP: import("@reduxjs/toolkit").AsyncThunk<{
|
|
23
25
|
data: any;
|
|
26
|
+
entityData: any;
|
|
24
27
|
formData: OTPFormValues;
|
|
25
28
|
}, OTPFormValues, {}>;
|
|
26
29
|
export declare const updateTaxInfo: import("@reduxjs/toolkit").AsyncThunk<{
|
|
@@ -28,8 +31,11 @@ export declare const updateTaxInfo: import("@reduxjs/toolkit").AsyncThunk<{
|
|
|
28
31
|
formData: TaxFormValues;
|
|
29
32
|
}, AsyncThunkParams<TaxFormValues>, {}>;
|
|
30
33
|
export declare const updateLeadSuccess: import("@reduxjs/toolkit").AsyncThunk<{
|
|
31
|
-
|
|
32
|
-
|
|
34
|
+
data: any;
|
|
35
|
+
flows?: undefined;
|
|
36
|
+
} | {
|
|
37
|
+
data: any;
|
|
38
|
+
flows: any;
|
|
33
39
|
} | undefined, void, {}>;
|
|
34
40
|
export declare const onCloseCompleteTax: import("@reduxjs/toolkit").AsyncThunk<void, void, {}>;
|
|
35
41
|
declare type VerifyData = {
|
|
@@ -55,10 +55,10 @@ import { getRecentDocumentBasedOnPurpose, hasNoneEditableValue, retrieveIndividu
|
|
|
55
55
|
export var verifyLeadToken = createAsyncThunk('taxVerifyLeadToken', function (_a, thunkApi) {
|
|
56
56
|
var token = _a.token, isInternally = _a.isInternally;
|
|
57
57
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
58
|
-
var payload, data,
|
|
59
|
-
var _d, _e
|
|
60
|
-
return __generator(this, function (
|
|
61
|
-
switch (
|
|
58
|
+
var payload, data, entityData, _b, config, country_code, entity_id, boardId, publicKey, data_1;
|
|
59
|
+
var _c, _d, _e;
|
|
60
|
+
return __generator(this, function (_f) {
|
|
61
|
+
switch (_f.label) {
|
|
62
62
|
case 0:
|
|
63
63
|
payload = __assign({ service_name: 'tap_email', verify_token: token }, (isInternally && {
|
|
64
64
|
notification: {
|
|
@@ -67,49 +67,48 @@ export var verifyLeadToken = createAsyncThunk('taxVerifyLeadToken', function (_a
|
|
|
67
67
|
}));
|
|
68
68
|
return [4, API.leadService.verifyLeadToken(payload)];
|
|
69
69
|
case 1:
|
|
70
|
-
data = (
|
|
71
|
-
|
|
72
|
-
if (((
|
|
70
|
+
data = (_f.sent()).data;
|
|
71
|
+
entityData = undefined;
|
|
72
|
+
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))
|
|
73
73
|
throw new Error(data.errors[0].description || (data === null || data === void 0 ? void 0 : data.mw_error));
|
|
74
74
|
if (isInternally)
|
|
75
75
|
data.step_name = TAX_STEP_NAMES.TAX_INFO;
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
_b = data || {}, config = _b.config, country_code = _b.country_code, entity_id = _b.entity_id, boardId = _b.id;
|
|
77
|
+
publicKey = config === null || config === void 0 ? void 0 : config.public_key;
|
|
78
|
+
if (publicKey)
|
|
78
79
|
thunkApi.dispatch(handlePublicKey(publicKey));
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
if (!data.
|
|
82
|
-
|
|
80
|
+
if (country_code)
|
|
81
|
+
thunkApi.dispatch(handleSetCountryByIso2(country_code));
|
|
82
|
+
if (!(data.step_name === TAX_STEP_NAMES.PHONE_AUTH)) return [3, 2];
|
|
83
|
+
thunkApi.dispatch(handleCurrentActiveScreen('TAX_VERIFY_STEP'));
|
|
84
|
+
return [3, 7];
|
|
83
85
|
case 2:
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
case
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
86
|
+
if (!(data.step_name === TAX_STEP_NAMES.TAX_INFO)) return [3, 7];
|
|
87
|
+
if (!!entity_id) return [3, 4];
|
|
88
|
+
return [4, API.boardService.retrieveBoardDetails(boardId)];
|
|
89
|
+
case 3:
|
|
90
|
+
data_1 = _f.sent();
|
|
91
|
+
if (!((_d = data_1 === null || data_1 === void 0 ? void 0 : data_1.entity) === null || _d === void 0 ? void 0 : _d.id))
|
|
92
|
+
throw new Error('entity_id_missing');
|
|
93
|
+
entityData = data_1;
|
|
94
|
+
return [3, 6];
|
|
95
|
+
case 4: return [4, API.entityService.retrieveEntity(entity_id)];
|
|
92
96
|
case 5:
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
individualData = individualRes;
|
|
96
|
-
_j.label = 6;
|
|
97
|
+
entityData = _f.sent();
|
|
98
|
+
_f.label = 6;
|
|
97
99
|
case 6:
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
}
|
|
104
|
-
else if (data.step_name === TAX_STEP_NAMES.TAX_INFO) {
|
|
100
|
+
if (!country_code && ((_e = entityData === null || entityData === void 0 ? void 0 : entityData.entity) === null || _e === void 0 ? void 0 : _e.country))
|
|
101
|
+
thunkApi.dispatch(handleSetCountryByIso2(entityData.entity.country));
|
|
102
|
+
if (isInternally)
|
|
103
|
+
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep('TAX_TAX_DETAILS_STEP')); });
|
|
104
|
+
else
|
|
105
105
|
thunkApi.dispatch(handleNextScreenStep('TAX_TAX_DETAILS_STEP'));
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
}];
|
|
106
|
+
_f.label = 7;
|
|
107
|
+
case 7: return [2, {
|
|
108
|
+
data: data,
|
|
109
|
+
entityData: entityData === null || entityData === void 0 ? void 0 : entityData.entity,
|
|
110
|
+
token: token
|
|
111
|
+
}];
|
|
113
112
|
}
|
|
114
113
|
});
|
|
115
114
|
});
|
|
@@ -132,98 +131,139 @@ export var resendOTP = createAsyncThunk('resendOTPTax', function (params, thunkA
|
|
|
132
131
|
});
|
|
133
132
|
}); });
|
|
134
133
|
export var retrieveBoardStatus = createAsyncThunk('tax/retrieveBoardStatus', function (parmas, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
135
|
-
var tax, board_id, data;
|
|
136
|
-
return __generator(this, function (
|
|
137
|
-
switch (
|
|
134
|
+
var tax, _a, board_id, board_info_id, recipient, _b, id, type, data;
|
|
135
|
+
return __generator(this, function (_c) {
|
|
136
|
+
switch (_c.label) {
|
|
138
137
|
case 0:
|
|
139
138
|
tax = thunkApi.getState().tax;
|
|
140
|
-
|
|
141
|
-
|
|
139
|
+
_a = tax.data.verify.responseBody || {}, board_id = _a.board_id, board_info_id = _a.board_info_id, recipient = _a.recipient;
|
|
140
|
+
if (!board_id || !board_info_id)
|
|
141
|
+
throw new Error('Internal server error');
|
|
142
|
+
_b = recipient || {}, id = _b.id, type = _b.type;
|
|
143
|
+
return [4, Promise.all([
|
|
144
|
+
API.boardService.retrieveBoardInfoStatus(board_id),
|
|
145
|
+
thunkApi.dispatch(retrieveBoardDetails({ boardId: board_id, individualId: id, individualType: type })).unwrap()
|
|
146
|
+
])];
|
|
142
147
|
case 1:
|
|
143
|
-
data =
|
|
148
|
+
data = (_c.sent())[0];
|
|
144
149
|
thunkApi.dispatch(handlePrevScreenStep());
|
|
145
150
|
return [2, { flows: (data === null || data === void 0 ? void 0 : data.info) || [] }];
|
|
146
151
|
}
|
|
147
152
|
});
|
|
148
153
|
}); });
|
|
149
|
-
export var
|
|
150
|
-
var
|
|
151
|
-
return
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
return [
|
|
157
|
-
|
|
154
|
+
export var retrieveBoardDetails = createAsyncThunk('tax/retrieveBrandInfo', function (_a) {
|
|
155
|
+
var boardId = _a.boardId, id = _a.individualId, type = _a.individualType;
|
|
156
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
157
|
+
var data, individualData, boardData, serviceCallBack, _b, boardRes, individualRes;
|
|
158
|
+
var _c, _d, _e, _f;
|
|
159
|
+
return __generator(this, function (_g) {
|
|
160
|
+
switch (_g.label) {
|
|
161
|
+
case 0: return [4, API.boardService.retrieveBoardDetails(boardId)];
|
|
162
|
+
case 1:
|
|
163
|
+
data = _g.sent();
|
|
164
|
+
individualData = data === null || data === void 0 ? void 0 : data.user;
|
|
165
|
+
boardData = data;
|
|
166
|
+
if (!(((_c = data === null || data === void 0 ? void 0 : data.user) === null || _c === void 0 ? void 0 : _c.id) !== id)) return [3, 3];
|
|
167
|
+
serviceCallBack = function () { return API.individualService.retrieveIndividual(id, type); };
|
|
168
|
+
return [4, retrieveIndividualData(type, data, serviceCallBack)];
|
|
169
|
+
case 2:
|
|
170
|
+
_b = _g.sent(), boardRes = _b.boardRes, individualRes = _b.individualRes;
|
|
171
|
+
individualData = individualRes;
|
|
172
|
+
boardData = boardRes;
|
|
173
|
+
_g.label = 3;
|
|
174
|
+
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, vatID: (_e = boardData === null || boardData === void 0 ? void 0 : boardData.entity) === null || _e === void 0 ? void 0 : _e.vat_id, individuals: boardData === null || boardData === void 0 ? void 0 : boardData.individuals, contact: (_f = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _f === void 0 ? void 0 : _f.contact, user: individualData, board_status: boardData === null || boardData === void 0 ? void 0 : boardData.status })];
|
|
175
|
+
}
|
|
176
|
+
});
|
|
158
177
|
});
|
|
159
|
-
});
|
|
178
|
+
});
|
|
160
179
|
export var verifyTaxLeadOTP = createAsyncThunk('verifyTaxLeadOTP', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
161
|
-
var _a, tax, settings, responseBody, payload, data, publicKey;
|
|
162
|
-
var
|
|
163
|
-
return __generator(this, function (
|
|
164
|
-
switch (
|
|
180
|
+
var _a, tax, settings, responseBody, payload, data, _b, config, entity_id, boardId, country_code, entityData, publicKey, countryIso2, data_2;
|
|
181
|
+
var _c, _d, _e, _f, _g, _h;
|
|
182
|
+
return __generator(this, function (_j) {
|
|
183
|
+
switch (_j.label) {
|
|
165
184
|
case 0:
|
|
166
185
|
_a = thunkApi.getState(), tax = _a.tax, settings = _a.settings;
|
|
167
186
|
responseBody = tax.data.verify.responseBody;
|
|
168
187
|
payload = {
|
|
169
188
|
data: params.otp,
|
|
170
|
-
service_name: (
|
|
189
|
+
service_name: (_c = responseBody === null || responseBody === void 0 ? void 0 : responseBody.verification_by) === null || _c === void 0 ? void 0 : _c.service_name,
|
|
171
190
|
verify_token: responseBody === null || responseBody === void 0 ? void 0 : responseBody.verify_token,
|
|
172
191
|
step_name: TAX_STEP_NAMES.PHONE_AUTH,
|
|
173
192
|
encryption_contract: ['data']
|
|
174
193
|
};
|
|
175
194
|
return [4, API.leadService.verifyLeadOTP(payload)];
|
|
176
195
|
case 1:
|
|
177
|
-
data = (
|
|
178
|
-
if ((
|
|
196
|
+
data = (_j.sent()).data;
|
|
197
|
+
if ((_d = data.errors) === null || _d === void 0 ? void 0 : _d.length)
|
|
179
198
|
throw new Error(data.errors[0].description);
|
|
180
|
-
|
|
181
|
-
|
|
199
|
+
_b = data || {}, config = _b.config, entity_id = _b.entity_id, boardId = _b.id, country_code = _b.country_code;
|
|
200
|
+
entityData = undefined;
|
|
201
|
+
publicKey = config === null || config === void 0 ? void 0 : config.public_key;
|
|
202
|
+
countryIso2 = country_code || (responseBody === null || responseBody === void 0 ? void 0 : responseBody.country_code);
|
|
203
|
+
if (publicKey)
|
|
182
204
|
thunkApi.dispatch(handlePublicKey(publicKey));
|
|
183
|
-
|
|
184
|
-
|
|
205
|
+
if (countryIso2)
|
|
206
|
+
thunkApi.dispatch(handleSetCountryByIso2(countryIso2));
|
|
207
|
+
if (!!entity_id) return [3, 3];
|
|
208
|
+
return [4, API.boardService.retrieveBoardDetails(boardId)];
|
|
209
|
+
case 2:
|
|
210
|
+
data_2 = _j.sent();
|
|
211
|
+
if (!((_e = data_2 === null || data_2 === void 0 ? void 0 : data_2.entity) === null || _e === void 0 ? void 0 : _e.id))
|
|
212
|
+
throw new Error('entity_id_missing');
|
|
213
|
+
entityData = data_2;
|
|
214
|
+
return [3, 5];
|
|
215
|
+
case 3: return [4, API.entityService.retrieveEntity(entity_id)];
|
|
216
|
+
case 4:
|
|
217
|
+
entityData = _j.sent();
|
|
218
|
+
_j.label = 5;
|
|
219
|
+
case 5:
|
|
220
|
+
if (!countryIso2 && ((_f = entityData === null || entityData === void 0 ? void 0 : entityData.entity) === null || _f === void 0 ? void 0 : _f.country))
|
|
221
|
+
thunkApi.dispatch(handleSetCountryByIso2(entityData.entity.country));
|
|
222
|
+
(_h = (_g = settings.data.appConfig).onStepCompleted) === null || _h === void 0 ? void 0 : _h.call(_g, settings.data.activeScreen.name, { otp: params.otp });
|
|
185
223
|
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep('TAX_TAX_DETAILS_STEP')); });
|
|
186
|
-
return [2, { data: data, formData: params }];
|
|
224
|
+
return [2, { data: data, entityData: entityData === null || entityData === void 0 ? void 0 : entityData.entity, formData: params }];
|
|
187
225
|
}
|
|
188
226
|
});
|
|
189
227
|
}); });
|
|
190
228
|
export var updateTaxInfo = createAsyncThunk('updateTaxInfo', function (_a, thunkApi) {
|
|
191
|
-
var formData = _a.formData, originalFormData = _a.originalFormData;
|
|
229
|
+
var formData = _a.formData, originalFormData = _a.originalFormData, isDirty = _a.isDirty;
|
|
192
230
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
193
|
-
var _b, settings, tax, _c, entity,
|
|
194
|
-
var
|
|
195
|
-
return __generator(this, function (
|
|
196
|
-
switch (
|
|
231
|
+
var _b, settings, tax, _c, entity, recipient, _d, id, data_status, documents, isTaxNumberNonEditable, isConfirmPolicyNonEditable, isDocumentsNonEditable, document, vatId, confirmPolicy, documentId, data, requestBody, documentBody, documentData, documentBody, documentData;
|
|
232
|
+
var _e, _f;
|
|
233
|
+
return __generator(this, function (_g) {
|
|
234
|
+
switch (_g.label) {
|
|
197
235
|
case 0:
|
|
198
236
|
_b = thunkApi.getState(), settings = _b.settings, tax = _b.tax;
|
|
199
|
-
_c = tax.data.verify.responseBody || {}, entity = _c.entity,
|
|
237
|
+
_c = tax.data.verify.responseBody || {}, entity = _c.entity, recipient = _c.recipient;
|
|
200
238
|
_d = entity || {}, id = _d.id, data_status = _d.data_status, documents = _d.documents;
|
|
201
239
|
isTaxNumberNonEditable = hasNoneEditableValue(data_status, 'tax_number');
|
|
202
240
|
isConfirmPolicyNonEditable = hasNoneEditableValue(data_status, 'is_vat_acknowledged');
|
|
203
241
|
isDocumentsNonEditable = hasNoneEditableValue(data_status, 'documents');
|
|
204
242
|
document = getRecentDocumentBasedOnPurpose(documents, DocumentPurpose.TAX_DOCUMENT);
|
|
205
243
|
vatId = formData.vatId, confirmPolicy = formData.confirmPolicy, documentId = formData.documentId;
|
|
244
|
+
data = entity || {};
|
|
206
245
|
requestBody = __assign(__assign({ id: id, vat_id: isTaxNumberNonEditable ? undefined : vatId }, (!isConfirmPolicyNonEditable && {
|
|
207
|
-
vat_acknowledged_by:
|
|
246
|
+
vat_acknowledged_by: recipient === null || recipient === void 0 ? void 0 : recipient.id,
|
|
208
247
|
is_vat_acknowledged: confirmPolicy
|
|
209
248
|
})), { step_name: TAX_STEP_NAMES.TAX_INFO });
|
|
249
|
+
if (!isDirty) return [3, 2];
|
|
210
250
|
return [4, API.entityService.updateEntityInfo(requestBody)];
|
|
211
251
|
case 1:
|
|
212
|
-
data =
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
if (!(!isDocumentsNonEditable && (documentId || []).length > 0)) return [3,
|
|
216
|
-
if (!(document === null || document === void 0 ? void 0 : document.id)) return [3,
|
|
252
|
+
data = _g.sent();
|
|
253
|
+
_g.label = 2;
|
|
254
|
+
case 2:
|
|
255
|
+
if (!(!isDocumentsNonEditable && (documentId || []).length > 0)) return [3, 6];
|
|
256
|
+
if (!(document === null || document === void 0 ? void 0 : document.id)) return [3, 4];
|
|
217
257
|
documentBody = {
|
|
218
258
|
id: document === null || document === void 0 ? void 0 : document.id,
|
|
219
259
|
images: documentId
|
|
220
260
|
};
|
|
221
|
-
_e = data;
|
|
222
261
|
return [4, API.documentService.addFilesToExistingDocument(documentBody)];
|
|
223
|
-
case 2:
|
|
224
|
-
_e.documentData = _l.sent();
|
|
225
|
-
return [3, 5];
|
|
226
262
|
case 3:
|
|
263
|
+
documentData = _g.sent();
|
|
264
|
+
data = __assign(__assign({}, data), { documentData: documentData });
|
|
265
|
+
return [3, 6];
|
|
266
|
+
case 4:
|
|
227
267
|
documentBody = {
|
|
228
268
|
entity_id: id || '',
|
|
229
269
|
documents: [
|
|
@@ -233,49 +273,53 @@ export var updateTaxInfo = createAsyncThunk('updateTaxInfo', function (_a, thunk
|
|
|
233
273
|
}
|
|
234
274
|
]
|
|
235
275
|
};
|
|
236
|
-
_f = data;
|
|
237
276
|
return [4, API.documentService.updateDocumentInfo(documentBody)];
|
|
238
|
-
case 4:
|
|
239
|
-
_f.documentData = _l.sent();
|
|
240
|
-
_l.label = 5;
|
|
241
277
|
case 5:
|
|
278
|
+
documentData = _g.sent();
|
|
279
|
+
data = __assign(__assign({}, data), { documentData: documentData });
|
|
280
|
+
_g.label = 6;
|
|
281
|
+
case 6:
|
|
242
282
|
thunkApi.dispatch(handleNextScreenStep());
|
|
243
|
-
(
|
|
283
|
+
(_f = (_e = settings.data.appConfig).onStepCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, settings.data.activeScreen.name, requestBody);
|
|
244
284
|
return [2, { data: data, formData: originalFormData }];
|
|
245
285
|
}
|
|
246
286
|
});
|
|
247
287
|
});
|
|
248
288
|
});
|
|
249
289
|
export var updateLeadSuccess = createAsyncThunk('taxUpdateLeadSuccess', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
250
|
-
var _a, settings, tax, _b,
|
|
251
|
-
var
|
|
252
|
-
return __generator(this, function (
|
|
253
|
-
switch (
|
|
290
|
+
var _a, settings, tax, _b, board_id, infoId, _c, showBoard, mode, payload, data, _d, id, type, boardInfoStatusData;
|
|
291
|
+
var _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
292
|
+
return __generator(this, function (_p) {
|
|
293
|
+
switch (_p.label) {
|
|
254
294
|
case 0:
|
|
255
295
|
_a = thunkApi.getState(), settings = _a.settings, tax = _a.tax;
|
|
256
|
-
_b = tax.data.verify.responseBody || {},
|
|
257
|
-
|
|
296
|
+
_b = tax.data.verify.responseBody || {}, board_id = _b.board_id, infoId = _b.board_info_id;
|
|
297
|
+
_c = settings.data.appConfig, showBoard = _c.showBoard, mode = _c.mode;
|
|
298
|
+
if (!board_id)
|
|
258
299
|
return [2];
|
|
259
300
|
payload = {
|
|
260
301
|
lang: settings.data.language,
|
|
261
302
|
step_name: TAX_STEP_NAMES.TAX_SUCCESS
|
|
262
303
|
};
|
|
263
|
-
return [4, API.boardService.updateBoardInfo(__assign({ id:
|
|
304
|
+
return [4, API.boardService.updateBoardInfo(__assign({ id: board_id, infoId: infoId }, payload))];
|
|
264
305
|
case 1:
|
|
265
|
-
data =
|
|
266
|
-
|
|
306
|
+
data = _p.sent();
|
|
307
|
+
if (!showBoard && mode === 'content') {
|
|
308
|
+
(_f = (_e = settings.data.appConfig).onStepCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, settings.data.activeScreen.name, {});
|
|
309
|
+
(_h = (_g = settings.data.appConfig).onFlowCompleted) === null || _h === void 0 ? void 0 : _h.call(_g, { data: data });
|
|
310
|
+
return [2, { data: data }];
|
|
311
|
+
}
|
|
312
|
+
_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;
|
|
313
|
+
return [4, Promise.all([
|
|
314
|
+
API.boardService.retrieveBoardInfoStatus(board_id),
|
|
315
|
+
thunkApi.dispatch(retrieveBoardDetails({ boardId: board_id, individualId: id, individualType: type })).unwrap()
|
|
316
|
+
])];
|
|
267
317
|
case 2:
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
boardData = _h.sent();
|
|
272
|
-
(_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, {});
|
|
273
|
-
(_f = (_e = settings.data.appConfig).onFlowCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, { data: data });
|
|
318
|
+
boardInfoStatusData = (_p.sent())[0];
|
|
319
|
+
(_l = (_k = settings.data.appConfig).onStepCompleted) === null || _l === void 0 ? void 0 : _l.call(_k, settings.data.activeScreen.name, {});
|
|
320
|
+
(_o = (_m = settings.data.appConfig).onFlowCompleted) === null || _o === void 0 ? void 0 : _o.call(_m, { data: data });
|
|
274
321
|
thunkApi.dispatch(handleNextScreenStep());
|
|
275
|
-
return [2, {
|
|
276
|
-
response: __assign(__assign({}, data), { flows: (boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info) || [], user: boardData === null || boardData === void 0 ? void 0 : boardData.user, entity: boardData === null || boardData === void 0 ? void 0 : boardData.entity, brand: boardData === null || boardData === void 0 ? void 0 : boardData.brand, bank_account: boardData === null || boardData === void 0 ? void 0 : boardData.bank_account, vatID: (_g = boardData === null || boardData === void 0 ? void 0 : boardData.entity) === null || _g === void 0 ? void 0 : _g.vat_id, merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant, individuals: boardData === null || boardData === void 0 ? void 0 : boardData.individuals, business: boardData === null || boardData === void 0 ? void 0 : boardData.business }),
|
|
277
|
-
formData: params
|
|
278
|
-
}];
|
|
322
|
+
return [2, { data: data, flows: (boardInfoStatusData === null || boardInfoStatusData === void 0 ? void 0 : boardInfoStatusData.info) || [] }];
|
|
279
323
|
}
|
|
280
324
|
});
|
|
281
325
|
}); });
|
|
@@ -333,13 +377,13 @@ export var taxSlice = createSlice({
|
|
|
333
377
|
.addCase(verifyLeadToken.fulfilled, function (state, action) {
|
|
334
378
|
state.error = null;
|
|
335
379
|
state.customLoading = false;
|
|
336
|
-
var _a = action.payload, data = _a.data, token = _a.token,
|
|
337
|
-
var
|
|
338
|
-
state.data.verify.responseBody = __assign(__assign(
|
|
380
|
+
var _a = action.payload, data = _a.data, token = _a.token, entityData = _a.entityData;
|
|
381
|
+
var _b = entityData || {}, vat_id = _b.vat_id, is_vat_acknowledged = _b.is_vat_acknowledged;
|
|
382
|
+
state.data.verify.responseBody = __assign(__assign({}, data), { entity: entityData, board_id: data.id });
|
|
339
383
|
state.data.verify.token = token;
|
|
340
|
-
state.data.taxData.vatId =
|
|
341
|
-
if (
|
|
342
|
-
state.data.taxData.confirmPolicy =
|
|
384
|
+
state.data.taxData.vatId = vat_id;
|
|
385
|
+
if (is_vat_acknowledged)
|
|
386
|
+
state.data.taxData.confirmPolicy = is_vat_acknowledged;
|
|
343
387
|
})
|
|
344
388
|
.addCase(verifyLeadToken.pending, function (state) {
|
|
345
389
|
state.error = null;
|
|
@@ -373,9 +417,14 @@ export var taxSlice = createSlice({
|
|
|
373
417
|
.addCase(verifyTaxLeadOTP.fulfilled, function (state, action) {
|
|
374
418
|
state.loading = false;
|
|
375
419
|
state.error = null;
|
|
376
|
-
var _a = action.payload, data = _a.data, formData = _a.formData;
|
|
420
|
+
var _a = action.payload, data = _a.data, entityData = _a.entityData, formData = _a.formData;
|
|
377
421
|
state.data.otpData = formData;
|
|
378
422
|
state.data.otpData.responseBody = data;
|
|
423
|
+
var _b = entityData || {}, vat_id = _b.vat_id, is_vat_acknowledged = _b.is_vat_acknowledged;
|
|
424
|
+
state.data.verify.responseBody = __assign(__assign(__assign({}, state.data.verify.responseBody), data), { board_id: data.id, entity: entityData });
|
|
425
|
+
state.data.taxData.vatId = vat_id;
|
|
426
|
+
if (is_vat_acknowledged)
|
|
427
|
+
state.data.taxData.confirmPolicy = is_vat_acknowledged;
|
|
379
428
|
})
|
|
380
429
|
.addCase(verifyTaxLeadOTP.rejected, function (state, action) {
|
|
381
430
|
state.loading = false;
|
|
@@ -390,29 +439,24 @@ export var taxSlice = createSlice({
|
|
|
390
439
|
state.error = null;
|
|
391
440
|
var _a = action.payload, data = _a.data, formData = _a.formData;
|
|
392
441
|
state.data.taxData = formData;
|
|
442
|
+
state.data.taxData = __assign(__assign({}, formData), { documentId: undefined });
|
|
393
443
|
state.data.taxData.responseBody = data;
|
|
394
444
|
})
|
|
395
445
|
.addCase(updateTaxInfo.rejected, function (state, action) {
|
|
396
446
|
state.loading = false;
|
|
397
447
|
state.error = action.error.message;
|
|
398
448
|
})
|
|
399
|
-
.addCase(
|
|
449
|
+
.addCase(retrieveBoardDetails.pending, function (state) {
|
|
400
450
|
state.error = null;
|
|
401
451
|
state.loading = true;
|
|
402
452
|
})
|
|
403
|
-
.addCase(
|
|
404
|
-
var _a;
|
|
453
|
+
.addCase(retrieveBoardDetails.fulfilled, function (state, action) {
|
|
405
454
|
state.error = null;
|
|
406
455
|
state.loading = false;
|
|
407
|
-
var data =
|
|
408
|
-
var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
|
|
409
|
-
if (description) {
|
|
410
|
-
state.error = description;
|
|
411
|
-
return;
|
|
412
|
-
}
|
|
456
|
+
var data = action.payload || {};
|
|
413
457
|
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), data);
|
|
414
458
|
})
|
|
415
|
-
.addCase(
|
|
459
|
+
.addCase(retrieveBoardDetails.rejected, function (state, action) {
|
|
416
460
|
state.error = action.error.message;
|
|
417
461
|
state.loading = false;
|
|
418
462
|
})
|
|
@@ -433,19 +477,9 @@ export var taxSlice = createSlice({
|
|
|
433
477
|
.addCase(updateLeadSuccess.fulfilled, function (state, action) {
|
|
434
478
|
var _a;
|
|
435
479
|
state.loading = false;
|
|
436
|
-
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { updateBoardSuccessLoading: false });
|
|
437
480
|
state.error = null;
|
|
438
|
-
var
|
|
439
|
-
|
|
440
|
-
if (description) {
|
|
441
|
-
state.error = description;
|
|
442
|
-
return;
|
|
443
|
-
}
|
|
444
|
-
var flows = response.flows, steps = response.steps, user = response.user, bank_account = response.bank_account, vatID = response.vatID, merchant = response.merchant, individuals = response.individuals, entity = response.entity, brand = response.brand, individualData = response.individualData;
|
|
445
|
-
var data_state = (((individualData === null || individualData === void 0 ? void 0 : individualData.is_authorized) ? individuals : individualData) || {}).data_state;
|
|
446
|
-
state.data.verify.responseBody = __assign(__assign(__assign(__assign({}, state.data.verify.responseBody), { flows: flows, steps: steps, bank_account: bank_account, name: user === null || user === void 0 ? void 0 : user.names, vatID: vatID, merchant: merchant, individuals: individuals, entity: entity, brand: brand }), (individualData && { user: individualData })), (data_state && {
|
|
447
|
-
individuals: __assign(__assign({}, individuals), { data_state: data_state })
|
|
448
|
-
}));
|
|
481
|
+
var _b = action.payload || {}, flows = _b.flows, data = _b.data;
|
|
482
|
+
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, updateBoardSuccessLoading: false });
|
|
449
483
|
})
|
|
450
484
|
.addCase(updateLeadSuccess.pending, function (state) {
|
|
451
485
|
state.loading = true;
|
|
@@ -2,14 +2,13 @@
|
|
|
2
2
|
import { LibConfig } from '../../@types';
|
|
3
3
|
export interface AuthLibProps extends Pick<LibConfig, 'open' | 'mode' | 'scope' | 'merchantDomain' | 'publicKey' | 'redirectUrl' | 'data' | 'postURL' | 'appInfo' | 'businessCountryCode' | 'language' | 'onFlowCompleted' | 'onError' | 'onStepCompleted' | 'onReady' | 'onClose' | 'onStepStarted'> {
|
|
4
4
|
leadId?: string;
|
|
5
|
-
hideOverlay?: boolean;
|
|
6
5
|
configToken?: string;
|
|
7
|
-
hideMerchantLogo?: boolean;
|
|
8
|
-
hideLoaderOverlay?: boolean;
|
|
9
|
-
openAnimationDirection?: 'left' | 'right' | 'up' | 'down';
|
|
10
|
-
closeAnimationDirection?: 'left' | 'right' | 'up' | 'down';
|
|
11
6
|
}
|
|
12
|
-
|
|
7
|
+
interface ConnectAuthProps extends AuthLibProps {
|
|
8
|
+
unmount?: () => void;
|
|
9
|
+
}
|
|
10
|
+
export declare function AuthElement(props: ConnectAuthProps): JSX.Element;
|
|
13
11
|
export declare function renderAuthLib(config: AuthLibProps, elementId: string): {
|
|
14
12
|
unmount: () => void;
|
|
15
13
|
};
|
|
14
|
+
export {};
|