@tap-payments/auth-jsconnect 2.7.9-test → 2.7.9
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 +47 -4
- package/build/@types/app.js +22 -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 +9 -8
- 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 +3 -1
- package/build/components/AnimationFlow/BottomSheet.js +42 -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 +40 -0
- package/build/constants/app.js +368 -36
- 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 +64 -27
- package/build/features/app/connectExpress/connectExpressStore.js +807 -394
- 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/{connectExpress/screens/IdentityOTP → 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/business/screens/DOB/validation.d.ts +8 -0
- 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/{business/screens/OTP → connectExpress/screens/VerifyMobileAuthOTP}/OTPInput.js +3 -3
- package/build/features/connectExpress/screens/VerifyMobileAuthOTP/VerifyMobileAuthOTP.d.ts +5 -0
- package/build/features/connectExpress/screens/{IdentityOTP/OTP.js → VerifyMobileAuthOTP/VerifyMobileAuthOTP.js} +22 -21
- package/build/features/connectExpress/screens/VerifyMobileAuthOTP/index.d.ts +3 -0
- package/build/features/connectExpress/screens/VerifyMobileAuthOTP/index.js +2 -0
- 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 +216 -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/index.d.ts +0 -3
- package/build/features/business/screens/OTP/index.js +0 -2
- 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
- /package/build/features/{business/screens/OTP → connectExpress/screens/VerifyMobileAuthOTP}/OTPInput.d.ts +0 -0
- /package/build/features/{business/screens/OTP → connectExpress/screens/VerifyMobileAuthOTP}/validation.d.ts +0 -0
- /package/build/features/{business/screens/OTP → connectExpress/screens/VerifyMobileAuthOTP}/validation.js +0 -0
package/build/@types/app.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { PaymentProvider, SettingAsyncData } from './config';
|
|
2
|
+
import { PaymentProvider, SDKNotification, SettingAsyncData } from './config';
|
|
3
3
|
import { LanguageMode, DialogEdgeFormat } from './theme';
|
|
4
4
|
export interface CountryCode {
|
|
5
5
|
created: number;
|
|
@@ -26,6 +26,8 @@ export interface CountryCode {
|
|
|
26
26
|
logo: string;
|
|
27
27
|
digits: number;
|
|
28
28
|
supported_by_tap: boolean;
|
|
29
|
+
min_digits: number;
|
|
30
|
+
max_digits: number;
|
|
29
31
|
}
|
|
30
32
|
export interface City {
|
|
31
33
|
id: string;
|
|
@@ -208,8 +210,8 @@ interface LibCallbacks {
|
|
|
208
210
|
onBoardButtonClick?: (data: Record<string, any>) => void;
|
|
209
211
|
onCreated?: (res: Record<string, any>) => void;
|
|
210
212
|
onBoardCompleted?: () => void;
|
|
211
|
-
onMaturityChanged?: (maturity: 'full' | 'express') => void
|
|
212
|
-
|
|
213
|
+
onMaturityChanged?: (maturity: 'full' | 'express') => Promise<void>;
|
|
214
|
+
onSwitchToBoard?: (boardId: string, authId: string) => void;
|
|
213
215
|
}
|
|
214
216
|
export interface LibConfig extends LibCallbacks {
|
|
215
217
|
publicKey: string;
|
|
@@ -219,13 +221,28 @@ export interface LibConfig extends LibCallbacks {
|
|
|
219
221
|
appInfo: AppInfo;
|
|
220
222
|
businessCountryCode?: string;
|
|
221
223
|
scope: string;
|
|
224
|
+
showBoard?: boolean;
|
|
222
225
|
platforms?: Array<string>;
|
|
223
226
|
dialogEdgeFormat?: DialogEdgeFormat;
|
|
224
227
|
paymentProvider?: PaymentProvider;
|
|
228
|
+
features?: {
|
|
229
|
+
poweredBy?: boolean;
|
|
230
|
+
merchantLogo?: boolean;
|
|
231
|
+
switchLanguage?: boolean;
|
|
232
|
+
overlay?: boolean;
|
|
233
|
+
loaderOverlay?: boolean;
|
|
234
|
+
tapTextLogo?: boolean;
|
|
235
|
+
closeButton?: boolean;
|
|
236
|
+
disableNafath?: boolean;
|
|
237
|
+
disablePaci?: boolean;
|
|
238
|
+
dialogStartTransition?: 'left' | 'right' | 'up' | 'down';
|
|
239
|
+
dialogEndTransition?: 'left' | 'right' | 'up' | 'down';
|
|
240
|
+
};
|
|
225
241
|
postURL?: string;
|
|
226
242
|
redirectUrl?: string;
|
|
227
243
|
data?: Array<string>;
|
|
228
244
|
mode?: 'popup' | 'page' | 'content';
|
|
245
|
+
notification?: SDKNotification;
|
|
229
246
|
boardMaturity?: boolean;
|
|
230
247
|
settingData?: SettingAsyncData;
|
|
231
248
|
}
|
|
@@ -320,7 +337,8 @@ export declare enum FlowsTypes {
|
|
|
320
337
|
ENTITY = "entity",
|
|
321
338
|
OTP = "otp",
|
|
322
339
|
BRAND = "brand",
|
|
323
|
-
BOARD = "board"
|
|
340
|
+
BOARD = "board",
|
|
341
|
+
kyc = "kyc"
|
|
324
342
|
}
|
|
325
343
|
export declare type FlowInfo = {
|
|
326
344
|
name: string;
|
|
@@ -333,6 +351,23 @@ export declare enum AuthForType {
|
|
|
333
351
|
NATIONAL_ID = "national_id",
|
|
334
352
|
NATIONAL_ID_MISSED = "national_id_missed"
|
|
335
353
|
}
|
|
354
|
+
export declare enum AuthForScreen {
|
|
355
|
+
INDIVIDUAL = "individual",
|
|
356
|
+
DOB = "dob",
|
|
357
|
+
MOBILE_OWNERSHIP = "mobile_ownership"
|
|
358
|
+
}
|
|
359
|
+
export declare enum AuthTypeNumber {
|
|
360
|
+
EMAIL_OTP = 5,
|
|
361
|
+
MOBILE_OTP = 2,
|
|
362
|
+
PASSWORD = 1,
|
|
363
|
+
MIGRATION = 10,
|
|
364
|
+
RESET_PASSWORD = 7
|
|
365
|
+
}
|
|
366
|
+
export declare enum MigrationStatus {
|
|
367
|
+
IN_PROGRESS = "IN_PROGRESS",
|
|
368
|
+
MIGRATED = "MIGRATED",
|
|
369
|
+
FAILED = "FAILED"
|
|
370
|
+
}
|
|
336
371
|
export declare enum AddressFormateType {
|
|
337
372
|
SELECT = "select",
|
|
338
373
|
NUMBER = "number",
|
|
@@ -383,6 +418,7 @@ export declare enum DocumentPurpose {
|
|
|
383
418
|
CR = "commercial_registration",
|
|
384
419
|
ARTICLE_ASSOCIATION = "article_of_association",
|
|
385
420
|
BANK_STATEMENT = "bank_statement",
|
|
421
|
+
BANK_CERTIFICATE = "bank_certificate",
|
|
386
422
|
IDENTITY_DOCUMENT = "identity_document",
|
|
387
423
|
CUSTOMER_SIGNATURE = "customer_signature",
|
|
388
424
|
TAX_DOCUMENT = "tax_document_user_upload",
|
|
@@ -644,6 +680,7 @@ export interface EventPageTrackingData extends CommonDataLayer {
|
|
|
644
680
|
}
|
|
645
681
|
export interface PageTrackingData {
|
|
646
682
|
title?: string;
|
|
683
|
+
connect_flow?: string;
|
|
647
684
|
}
|
|
648
685
|
export declare type VerifyExpressTokenParams = {
|
|
649
686
|
public_key: string;
|
|
@@ -681,6 +718,8 @@ export interface AuthMerchantInfo {
|
|
|
681
718
|
terminal_id: string;
|
|
682
719
|
acceptance_status: string;
|
|
683
720
|
payout_status: string;
|
|
721
|
+
board_id: string;
|
|
722
|
+
board_info_id: string;
|
|
684
723
|
}
|
|
685
724
|
export interface AuthTerminalInfo {
|
|
686
725
|
id: string;
|
|
@@ -734,17 +773,21 @@ export declare type CountryInfo = {
|
|
|
734
773
|
id: number;
|
|
735
774
|
label: string;
|
|
736
775
|
country: {
|
|
776
|
+
id: number;
|
|
737
777
|
name_en: string;
|
|
738
778
|
name_ar: string;
|
|
739
779
|
iso2: string;
|
|
740
780
|
iso3: string;
|
|
741
781
|
idd_prefix: string;
|
|
742
782
|
logo: string;
|
|
783
|
+
min_digits: number;
|
|
784
|
+
max_digits: number;
|
|
743
785
|
};
|
|
744
786
|
};
|
|
745
787
|
export declare type BusinessCountryInfo = {
|
|
746
788
|
id: number;
|
|
747
789
|
title: string;
|
|
790
|
+
title_ar: string;
|
|
748
791
|
countries: Array<CountryInfo>;
|
|
749
792
|
};
|
|
750
793
|
export {};
|
package/build/@types/app.js
CHANGED
|
@@ -34,6 +34,7 @@ export var FlowsTypes;
|
|
|
34
34
|
FlowsTypes["OTP"] = "otp";
|
|
35
35
|
FlowsTypes["BRAND"] = "brand";
|
|
36
36
|
FlowsTypes["BOARD"] = "board";
|
|
37
|
+
FlowsTypes["kyc"] = "kyc";
|
|
37
38
|
})(FlowsTypes || (FlowsTypes = {}));
|
|
38
39
|
export var AuthForType;
|
|
39
40
|
(function (AuthForType) {
|
|
@@ -42,6 +43,26 @@ export var AuthForType;
|
|
|
42
43
|
AuthForType["NATIONAL_ID"] = "national_id";
|
|
43
44
|
AuthForType["NATIONAL_ID_MISSED"] = "national_id_missed";
|
|
44
45
|
})(AuthForType || (AuthForType = {}));
|
|
46
|
+
export var AuthForScreen;
|
|
47
|
+
(function (AuthForScreen) {
|
|
48
|
+
AuthForScreen["INDIVIDUAL"] = "individual";
|
|
49
|
+
AuthForScreen["DOB"] = "dob";
|
|
50
|
+
AuthForScreen["MOBILE_OWNERSHIP"] = "mobile_ownership";
|
|
51
|
+
})(AuthForScreen || (AuthForScreen = {}));
|
|
52
|
+
export var AuthTypeNumber;
|
|
53
|
+
(function (AuthTypeNumber) {
|
|
54
|
+
AuthTypeNumber[AuthTypeNumber["EMAIL_OTP"] = 5] = "EMAIL_OTP";
|
|
55
|
+
AuthTypeNumber[AuthTypeNumber["MOBILE_OTP"] = 2] = "MOBILE_OTP";
|
|
56
|
+
AuthTypeNumber[AuthTypeNumber["PASSWORD"] = 1] = "PASSWORD";
|
|
57
|
+
AuthTypeNumber[AuthTypeNumber["MIGRATION"] = 10] = "MIGRATION";
|
|
58
|
+
AuthTypeNumber[AuthTypeNumber["RESET_PASSWORD"] = 7] = "RESET_PASSWORD";
|
|
59
|
+
})(AuthTypeNumber || (AuthTypeNumber = {}));
|
|
60
|
+
export var MigrationStatus;
|
|
61
|
+
(function (MigrationStatus) {
|
|
62
|
+
MigrationStatus["IN_PROGRESS"] = "IN_PROGRESS";
|
|
63
|
+
MigrationStatus["MIGRATED"] = "MIGRATED";
|
|
64
|
+
MigrationStatus["FAILED"] = "FAILED";
|
|
65
|
+
})(MigrationStatus || (MigrationStatus = {}));
|
|
45
66
|
export var AddressFormateType;
|
|
46
67
|
(function (AddressFormateType) {
|
|
47
68
|
AddressFormateType["SELECT"] = "select";
|
|
@@ -71,6 +92,7 @@ export var DocumentPurpose;
|
|
|
71
92
|
DocumentPurpose["CR"] = "commercial_registration";
|
|
72
93
|
DocumentPurpose["ARTICLE_ASSOCIATION"] = "article_of_association";
|
|
73
94
|
DocumentPurpose["BANK_STATEMENT"] = "bank_statement";
|
|
95
|
+
DocumentPurpose["BANK_CERTIFICATE"] = "bank_certificate";
|
|
74
96
|
DocumentPurpose["IDENTITY_DOCUMENT"] = "identity_document";
|
|
75
97
|
DocumentPurpose["CUSTOMER_SIGNATURE"] = "customer_signature";
|
|
76
98
|
DocumentPurpose["TAX_DOCUMENT"] = "tax_document_user_upload";
|
package/build/@types/config.d.ts
CHANGED
|
@@ -18,6 +18,10 @@ export interface PaymentProvider {
|
|
|
18
18
|
interface Redirect {
|
|
19
19
|
url: string;
|
|
20
20
|
}
|
|
21
|
+
export interface SDKNotification {
|
|
22
|
+
email: boolean;
|
|
23
|
+
mobile?: boolean;
|
|
24
|
+
}
|
|
21
25
|
interface Interface {
|
|
22
26
|
locale?: 'dynamic' | 'ar' | 'en';
|
|
23
27
|
edges?: 'straight' | 'curved';
|
package/build/@types/form.d.ts
CHANGED
|
@@ -15,13 +15,19 @@ export declare type PasswordFormValues = {
|
|
|
15
15
|
};
|
|
16
16
|
export declare type NIDFormValues = {
|
|
17
17
|
nid: string;
|
|
18
|
-
dob
|
|
18
|
+
dob?: any;
|
|
19
19
|
termAndConditionChecked?: boolean;
|
|
20
20
|
};
|
|
21
|
+
export declare type DOBFormValues = {
|
|
22
|
+
dob: any;
|
|
23
|
+
};
|
|
21
24
|
export declare type CivilFormValues = {
|
|
22
25
|
civilId: string;
|
|
23
26
|
termAndConditionChecked?: boolean;
|
|
24
27
|
};
|
|
28
|
+
export declare type AuthEmailFormValues = {
|
|
29
|
+
email: string;
|
|
30
|
+
};
|
|
25
31
|
export declare type IndividualFormValues = {
|
|
26
32
|
name: string;
|
|
27
33
|
email: string;
|
|
@@ -154,3 +160,7 @@ export declare type AuthenticationListFormValues = {
|
|
|
154
160
|
export declare type AuthMerchantFormValues = {
|
|
155
161
|
merchantInfo?: AuthMerchantInfo;
|
|
156
162
|
};
|
|
163
|
+
export declare type MobileOwnershipFormValues = {
|
|
164
|
+
mobile: string;
|
|
165
|
+
countryCode: CountryCode;
|
|
166
|
+
};
|
package/build/@types/redux.d.ts
CHANGED
package/build/api/account.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PaymentProvider } from '../@types';
|
|
1
|
+
import { PaymentProvider, SDKNotification } from '../@types';
|
|
2
2
|
export declare type CreateAccountBody = {
|
|
3
3
|
lead_id: string;
|
|
4
4
|
notify: {
|
|
@@ -14,10 +14,13 @@ export declare type ExpressCreateAccountBody = {
|
|
|
14
14
|
lead_id: string;
|
|
15
15
|
platforms?: string[];
|
|
16
16
|
payment_provider?: PaymentProvider;
|
|
17
|
+
notification?: SDKNotification;
|
|
17
18
|
};
|
|
18
19
|
declare const accountService: {
|
|
19
20
|
createAccount: (data: CreateAccountBody) => Promise<any>;
|
|
20
21
|
expressCreateAccount: (data: ExpressCreateAccountBody) => Promise<any>;
|
|
21
22
|
checkAccountAvailability: (individualId: string) => Promise<any>;
|
|
23
|
+
checkAccountAvailabilityStatus: (individualId: string) => Promise<any>;
|
|
24
|
+
checkMigrationStatus: (jobId: string) => Promise<any>;
|
|
22
25
|
};
|
|
23
26
|
export { accountService };
|
package/build/api/account.js
CHANGED
|
@@ -20,9 +20,23 @@ var checkAccountAvailability = function (individualId) {
|
|
|
20
20
|
url: "".concat(ENDPOINT_PATHS.INDIVIDUAL, "/").concat(individualId, "/accounts")
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
|
+
var checkAccountAvailabilityStatus = function (individualId) {
|
|
24
|
+
return httpClient({
|
|
25
|
+
method: 'get',
|
|
26
|
+
url: "".concat(ENDPOINT_PATHS.INDIVIDUAL, "/").concat(individualId, "/accounts?data=status")
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
var checkMigrationStatus = function (jobId) {
|
|
30
|
+
return httpClient({
|
|
31
|
+
method: 'get',
|
|
32
|
+
url: "".concat(ENDPOINT_PATHS.MIGRATION_STATUS, "/").concat(jobId)
|
|
33
|
+
});
|
|
34
|
+
};
|
|
23
35
|
var accountService = {
|
|
24
36
|
createAccount: createAccount,
|
|
25
37
|
expressCreateAccount: expressCreateAccount,
|
|
26
|
-
checkAccountAvailability: checkAccountAvailability
|
|
38
|
+
checkAccountAvailability: checkAccountAvailability,
|
|
39
|
+
checkAccountAvailabilityStatus: checkAccountAvailabilityStatus,
|
|
40
|
+
checkMigrationStatus: checkMigrationStatus
|
|
27
41
|
};
|
|
28
42
|
export { accountService };
|
package/build/api/auth.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AxiosRequestConfig } from 'axios';
|
|
2
|
-
import { LanguageMode } from '../@types';
|
|
2
|
+
import { ConfigInfo, LanguageMode } from '../@types';
|
|
3
3
|
export declare type MobileCredential = {
|
|
4
4
|
code: string;
|
|
5
5
|
phone: string;
|
|
@@ -29,6 +29,37 @@ export declare type CreateAuthBody = {
|
|
|
29
29
|
encryption_contract: Array<string>;
|
|
30
30
|
lang?: LanguageMode;
|
|
31
31
|
lead_id?: string;
|
|
32
|
+
board_id?: string;
|
|
33
|
+
user_id?: string;
|
|
34
|
+
};
|
|
35
|
+
export declare type CreateNafathAuthBody = {
|
|
36
|
+
country: string;
|
|
37
|
+
scope: string;
|
|
38
|
+
user_credentail: IDCredential;
|
|
39
|
+
auth_type?: number;
|
|
40
|
+
email_url?: string;
|
|
41
|
+
sign_in?: boolean;
|
|
42
|
+
is_lead?: boolean;
|
|
43
|
+
step_name?: string;
|
|
44
|
+
encryption_contract: Array<string>;
|
|
45
|
+
lang?: LanguageMode;
|
|
46
|
+
lead_id?: string;
|
|
47
|
+
board_id?: string;
|
|
48
|
+
user_id?: string;
|
|
49
|
+
};
|
|
50
|
+
export declare type CreateKYCAuthBody = {
|
|
51
|
+
country: string;
|
|
52
|
+
scope: string;
|
|
53
|
+
auth_type?: number;
|
|
54
|
+
email_url?: string;
|
|
55
|
+
sign_in?: boolean;
|
|
56
|
+
is_lead?: boolean;
|
|
57
|
+
step_name?: string;
|
|
58
|
+
encryption_contract: Array<string>;
|
|
59
|
+
lang?: LanguageMode;
|
|
60
|
+
lead_id?: string;
|
|
61
|
+
board_id?: string;
|
|
62
|
+
user_id?: string;
|
|
32
63
|
};
|
|
33
64
|
export declare type VerifyAuthBody = {
|
|
34
65
|
auth_token: string;
|
|
@@ -39,6 +70,7 @@ export declare type VerifyAuthBody = {
|
|
|
39
70
|
service_name: string;
|
|
40
71
|
new_user?: boolean;
|
|
41
72
|
sign_in: boolean;
|
|
73
|
+
is_lead?: boolean;
|
|
42
74
|
encryption_contract: Array<string>;
|
|
43
75
|
remember_me?: boolean;
|
|
44
76
|
lead_id?: string;
|
|
@@ -84,26 +116,9 @@ export declare type getExpressTokenVerifyParams = {
|
|
|
84
116
|
token: string;
|
|
85
117
|
leadId: string;
|
|
86
118
|
};
|
|
87
|
-
export declare type ConfigBody =
|
|
88
|
-
board: boolean;
|
|
89
|
-
public_key: string;
|
|
90
|
-
domain: string;
|
|
91
|
-
language: string;
|
|
92
|
-
country: string;
|
|
93
|
-
scope: string;
|
|
94
|
-
lead_id: string;
|
|
95
|
-
maturity: boolean;
|
|
96
|
-
board_maturity?: boolean;
|
|
97
|
-
notification?: {
|
|
98
|
-
email: boolean;
|
|
99
|
-
sms: boolean;
|
|
100
|
-
};
|
|
101
|
-
post?: {
|
|
102
|
-
url: string;
|
|
103
|
-
};
|
|
104
|
-
};
|
|
119
|
+
export declare type ConfigBody = Pick<ConfigInfo, 'scope' | 'data' | 'lead' | 'board' | 'interface' | 'redirect' | 'post'>;
|
|
105
120
|
declare const authService: {
|
|
106
|
-
createAuth: (data: CreateAuthBody, config?: AxiosRequestConfig) => Promise<any>;
|
|
121
|
+
createAuth: (data: CreateAuthBody | CreateKYCAuthBody, config?: AxiosRequestConfig) => Promise<any>;
|
|
107
122
|
verifyAuth: (data: VerifyAuthBody | VerifyOperationAuthBody, config?: AxiosRequestConfig) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
108
123
|
createPassword: (data: CreatePasswordBody) => Promise<any>;
|
|
109
124
|
verifyExpressAuth: (data: VerifyAuthExpressOTPBody) => Promise<any>;
|
package/build/api/auth.js
CHANGED
package/build/api/axios.js
CHANGED
|
@@ -42,8 +42,7 @@ var instance = axios.create({
|
|
|
42
42
|
headers: {
|
|
43
43
|
'Content-Type': 'application/json',
|
|
44
44
|
'Access-Control-Allow-Headers': true
|
|
45
|
-
}
|
|
46
|
-
timeout: 180000
|
|
45
|
+
}
|
|
47
46
|
});
|
|
48
47
|
instance.interceptors.request.use(function (config) {
|
|
49
48
|
return encryptionContractTransformer(config);
|
package/build/api/data.d.ts
CHANGED
|
@@ -4,14 +4,11 @@ declare type GetOccupationBody = {
|
|
|
4
4
|
};
|
|
5
5
|
declare type GetSegmentsBody = {
|
|
6
6
|
page: number;
|
|
7
|
+
limit: number;
|
|
7
8
|
};
|
|
8
9
|
declare type GetTeamSizeBody = {
|
|
9
10
|
page: number;
|
|
10
11
|
};
|
|
11
|
-
declare type SegmentDataListBody = {
|
|
12
|
-
page: number;
|
|
13
|
-
limit: number;
|
|
14
|
-
};
|
|
15
12
|
declare type GetMonthlyIncomeBody = {
|
|
16
13
|
page: number;
|
|
17
14
|
country_code: Array<string>;
|
|
@@ -23,14 +20,9 @@ export declare type DataElementBody = {
|
|
|
23
20
|
ar: string;
|
|
24
21
|
};
|
|
25
22
|
};
|
|
26
|
-
declare type
|
|
27
|
-
page: number;
|
|
28
|
-
};
|
|
29
|
-
declare type GetExpectedSalesBody = {
|
|
30
|
-
page: number;
|
|
31
|
-
};
|
|
32
|
-
declare type GetExpectedCustomerSalesBody = {
|
|
23
|
+
declare type GetBrandOperationsBody = {
|
|
33
24
|
page: number;
|
|
25
|
+
country_code: string[];
|
|
34
26
|
};
|
|
35
27
|
declare type GetSourceOfIncomeBody = {
|
|
36
28
|
page: number;
|
|
@@ -40,9 +32,7 @@ declare type GetChannelsOfServicesBody = {
|
|
|
40
32
|
};
|
|
41
33
|
declare const dataService: {
|
|
42
34
|
getChannelsOfServices: (data: GetChannelsOfServicesBody) => Promise<any>;
|
|
43
|
-
|
|
44
|
-
getExpectedSales: (data: GetExpectedSalesBody) => Promise<any>;
|
|
45
|
-
getExpectedCustomerSales: (data: GetExpectedCustomerSalesBody) => Promise<any>;
|
|
35
|
+
getBrandOperations: (data: GetBrandOperationsBody) => Promise<any>;
|
|
46
36
|
getSourceOfIncome: (data: GetSourceOfIncomeBody) => Promise<any>;
|
|
47
37
|
getMonthlyIncome: (data: GetMonthlyIncomeBody) => Promise<any>;
|
|
48
38
|
getOccupation: (data: GetOccupationBody) => Promise<any>;
|
|
@@ -50,8 +40,5 @@ declare const dataService: {
|
|
|
50
40
|
getTeamSize: (data: GetTeamSizeBody) => Promise<any>;
|
|
51
41
|
getActivities: (config?: AxiosRequestConfig) => Promise<any>;
|
|
52
42
|
getActivitiesIsIc: () => Promise<any>;
|
|
53
|
-
getSegmentLocation: (data: SegmentDataListBody) => Promise<any>;
|
|
54
|
-
getSegmentProfit: (data: SegmentDataListBody) => Promise<any>;
|
|
55
|
-
getSegmentTech: (data: SegmentDataListBody) => Promise<any>;
|
|
56
43
|
};
|
|
57
44
|
export { dataService };
|
package/build/api/data.js
CHANGED
|
@@ -18,24 +18,10 @@ var getChannelsOfServices = function (data) {
|
|
|
18
18
|
data: data
|
|
19
19
|
});
|
|
20
20
|
};
|
|
21
|
-
var
|
|
21
|
+
var getBrandOperations = function (data) {
|
|
22
22
|
return httpClient({
|
|
23
23
|
method: 'post',
|
|
24
|
-
url: "".concat(ENDPOINT_PATHS.
|
|
25
|
-
data: data
|
|
26
|
-
});
|
|
27
|
-
};
|
|
28
|
-
var getExpectedSales = function (data) {
|
|
29
|
-
return httpClient({
|
|
30
|
-
method: 'post',
|
|
31
|
-
url: "".concat(ENDPOINT_PATHS.SALES),
|
|
32
|
-
data: data
|
|
33
|
-
});
|
|
34
|
-
};
|
|
35
|
-
var getExpectedCustomerSales = function (data) {
|
|
36
|
-
return httpClient({
|
|
37
|
-
method: 'post',
|
|
38
|
-
url: "".concat(ENDPOINT_PATHS.EXPECTED_CUSTOMERS),
|
|
24
|
+
url: "".concat(ENDPOINT_PATHS.BRAND_OPERATIONS),
|
|
39
25
|
data: data
|
|
40
26
|
});
|
|
41
27
|
};
|
|
@@ -73,7 +59,7 @@ var getActivitiesIsIc = function () {
|
|
|
73
59
|
var getSegments = function (data) {
|
|
74
60
|
return httpClient({
|
|
75
61
|
method: 'post',
|
|
76
|
-
url: "".concat(ENDPOINT_PATHS.
|
|
62
|
+
url: "".concat(ENDPOINT_PATHS.SEGMENT_LIST),
|
|
77
63
|
data: data
|
|
78
64
|
});
|
|
79
65
|
};
|
|
@@ -84,41 +70,15 @@ var getTeamSize = function (data) {
|
|
|
84
70
|
data: data
|
|
85
71
|
});
|
|
86
72
|
};
|
|
87
|
-
var getSegmentLocation = function (data) {
|
|
88
|
-
return httpClient({
|
|
89
|
-
method: 'post',
|
|
90
|
-
url: "".concat(ENDPOINT_PATHS.SEGMENT_LOCATION, "/list"),
|
|
91
|
-
data: data
|
|
92
|
-
});
|
|
93
|
-
};
|
|
94
|
-
var getSegmentProfit = function (data) {
|
|
95
|
-
return httpClient({
|
|
96
|
-
method: 'post',
|
|
97
|
-
url: "".concat(ENDPOINT_PATHS.SEGMENT_PROFIT, "/list"),
|
|
98
|
-
data: data
|
|
99
|
-
});
|
|
100
|
-
};
|
|
101
|
-
var getSegmentTech = function (data) {
|
|
102
|
-
return httpClient({
|
|
103
|
-
method: 'post',
|
|
104
|
-
url: "".concat(ENDPOINT_PATHS.SEGMENT_TECH, "/list"),
|
|
105
|
-
data: data
|
|
106
|
-
});
|
|
107
|
-
};
|
|
108
73
|
var dataService = {
|
|
109
74
|
getChannelsOfServices: getChannelsOfServices,
|
|
110
|
-
|
|
111
|
-
getExpectedSales: getExpectedSales,
|
|
112
|
-
getExpectedCustomerSales: getExpectedCustomerSales,
|
|
75
|
+
getBrandOperations: getBrandOperations,
|
|
113
76
|
getSourceOfIncome: getSourceOfIncome,
|
|
114
77
|
getMonthlyIncome: getMonthlyIncome,
|
|
115
78
|
getOccupation: getOccupation,
|
|
116
79
|
getSegments: getSegments,
|
|
117
80
|
getTeamSize: getTeamSize,
|
|
118
81
|
getActivities: getActivities,
|
|
119
|
-
getActivitiesIsIc: getActivitiesIsIc
|
|
120
|
-
getSegmentLocation: getSegmentLocation,
|
|
121
|
-
getSegmentProfit: getSegmentProfit,
|
|
122
|
-
getSegmentTech: getSegmentTech
|
|
82
|
+
getActivitiesIsIc: getActivitiesIsIc
|
|
123
83
|
};
|
|
124
84
|
export { dataService };
|
package/build/api/entity.d.ts
CHANGED
|
@@ -118,6 +118,7 @@ export declare type RemoveEntityActivity = {
|
|
|
118
118
|
export declare type MerchantListBody = {
|
|
119
119
|
business_entity_id: string;
|
|
120
120
|
brand_id: string;
|
|
121
|
+
lead_id?: string;
|
|
121
122
|
create_if_not_present: boolean;
|
|
122
123
|
platforms?: Array<string>;
|
|
123
124
|
payment_provider?: PaymentProvider;
|
|
@@ -139,8 +140,8 @@ export declare type CreateEntityBody = {
|
|
|
139
140
|
};
|
|
140
141
|
declare const entityService: {
|
|
141
142
|
createEntityInfo: ({ id, ...data }: EntityInfoBody, config?: AxiosRequestConfig) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
142
|
-
updateEntityInfo: ({ id, ...data }: EntityInfoBody
|
|
143
|
-
createBankAccount: (data: EntityBankUpdateBody
|
|
143
|
+
updateEntityInfo: ({ id, ...data }: EntityInfoBody) => Promise<any>;
|
|
144
|
+
createBankAccount: (data: EntityBankUpdateBody) => Promise<any>;
|
|
144
145
|
retrieveBankAccount: (id: string) => Promise<any>;
|
|
145
146
|
retrieveEntityInfo: (entity_id: string, config?: AxiosRequestConfig) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
146
147
|
updateIndividualInfo: ({ id, ...data }: EntityInfoBody) => Promise<any>;
|
package/build/api/entity.js
CHANGED
|
@@ -18,9 +18,13 @@ var createEntityInfo = function (_a, config) {
|
|
|
18
18
|
var id = _a.id, data = __rest(_a, ["id"]);
|
|
19
19
|
return instance.post("".concat(ENDPOINT_PATHS.ENTITY, "/").concat(id, "/info"), data, config);
|
|
20
20
|
};
|
|
21
|
-
var updateEntityInfo = function (_a
|
|
21
|
+
var updateEntityInfo = function (_a) {
|
|
22
22
|
var id = _a.id, data = __rest(_a, ["id"]);
|
|
23
|
-
return
|
|
23
|
+
return httpClient({
|
|
24
|
+
method: 'put',
|
|
25
|
+
url: "".concat(ENDPOINT_PATHS.ENTITY, "/").concat(id),
|
|
26
|
+
data: data
|
|
27
|
+
});
|
|
24
28
|
};
|
|
25
29
|
var retrieveEntity = function (entity_id) {
|
|
26
30
|
return httpClient({
|
|
@@ -52,8 +56,12 @@ var updateEntityCapital = function (_a) {
|
|
|
52
56
|
data: data
|
|
53
57
|
});
|
|
54
58
|
};
|
|
55
|
-
var createBankAccount = function (data
|
|
56
|
-
return
|
|
59
|
+
var createBankAccount = function (data) {
|
|
60
|
+
return httpClient({
|
|
61
|
+
method: 'put',
|
|
62
|
+
url: "".concat(ENDPOINT_PATHS.BANK),
|
|
63
|
+
data: data
|
|
64
|
+
});
|
|
57
65
|
};
|
|
58
66
|
var retrieveBankAccount = function (id) {
|
|
59
67
|
return httpClient({
|
package/build/api/firebase.js
CHANGED
|
@@ -1,13 +1,73 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
url: ENDPOINT_PATHS.FIREBASE_URL
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
8
|
});
|
|
10
9
|
};
|
|
10
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
11
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
12
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
13
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
|
+
function step(op) {
|
|
15
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
+
while (_) try {
|
|
17
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
|
+
switch (op[0]) {
|
|
20
|
+
case 0: case 1: t = op; break;
|
|
21
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
22
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
23
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24
|
+
default:
|
|
25
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
26
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
27
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
28
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
29
|
+
if (t[2]) _.ops.pop();
|
|
30
|
+
_.trys.pop(); continue;
|
|
31
|
+
}
|
|
32
|
+
op = body.call(thisArg, _);
|
|
33
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
34
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
import { ENDPOINT_PATHS } from '../constants';
|
|
38
|
+
import instance from './axios';
|
|
39
|
+
import translationEN from '../assets/locales/en.json';
|
|
40
|
+
import translationAR from '../assets/locales/ar.json';
|
|
41
|
+
var getLocale = function (disableLocale) { return __awaiter(void 0, void 0, void 0, function () {
|
|
42
|
+
var data, error_1;
|
|
43
|
+
return __generator(this, function (_a) {
|
|
44
|
+
switch (_a.label) {
|
|
45
|
+
case 0:
|
|
46
|
+
if (disableLocale)
|
|
47
|
+
return [2, Promise.resolve(null)];
|
|
48
|
+
_a.label = 1;
|
|
49
|
+
case 1:
|
|
50
|
+
_a.trys.push([1, 3, , 4]);
|
|
51
|
+
return [4, instance.get("".concat(ENDPOINT_PATHS.FIREBASE_URL))];
|
|
52
|
+
case 2:
|
|
53
|
+
data = (_a.sent()).data;
|
|
54
|
+
return [2, data];
|
|
55
|
+
case 3:
|
|
56
|
+
error_1 = _a.sent();
|
|
57
|
+
return [2, {
|
|
58
|
+
default: {
|
|
59
|
+
en: {
|
|
60
|
+
translation: translationEN
|
|
61
|
+
},
|
|
62
|
+
ar: {
|
|
63
|
+
translation: translationAR
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}];
|
|
67
|
+
case 4: return [2];
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
}); };
|
|
11
71
|
var firebaseService = {
|
|
12
72
|
getLocale: getLocale
|
|
13
73
|
};
|