@tap-payments/auth-jsconnect 2.0.43-test → 2.0.44
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 +50 -20
- package/build/@types/app.js +9 -3
- package/build/@types/form.d.ts +21 -12
- package/build/api/auth.d.ts +28 -5
- package/build/api/auth.js +36 -1
- package/build/api/axios.js +2 -2
- package/build/api/brand.d.ts +2 -1
- package/build/api/brand.js +10 -1
- package/build/api/country.d.ts +3 -1
- package/build/api/country.js +3 -1
- package/build/api/data.d.ts +38 -7
- package/build/api/data.js +57 -17
- package/build/api/entity.d.ts +51 -5
- package/build/api/entity.js +39 -9
- package/build/api/firebase.d.ts +1 -1
- package/build/api/firebase.js +3 -1
- package/build/api/index.d.ts +44 -14
- package/build/api/individual.d.ts +76 -19
- package/build/api/individual.js +29 -2
- package/build/api/lead.d.ts +9 -6
- package/build/api/lead.js +8 -1
- package/build/app/rootReducer.d.ts +0 -1
- package/build/app/rootReducer.js +0 -2
- package/build/app/settings.d.ts +9 -2
- package/build/app/settings.js +22 -11
- package/build/app/store.d.ts +0 -2
- package/build/assets/locales/ar.json +258 -183
- package/build/assets/locales/en.json +190 -108
- package/build/components/AnimationFlow/AnimationFlow.d.ts +4 -1
- package/build/components/AnimationFlow/AnimationFlow.js +6 -8
- package/build/components/AnimationFlow/BottomSheet.d.ts +2 -1
- package/build/components/AnimationFlow/BottomSheet.js +4 -3
- package/build/components/AnimationFlow/Dialog.d.ts +4 -1
- package/build/components/AnimationFlow/Dialog.js +5 -3
- package/build/components/ArabicDatePicker/ArabicDatePicker.d.ts +13 -0
- package/build/components/ArabicDatePicker/ArabicDatePicker.js +94 -0
- package/build/components/ArabicDatePicker/index.d.ts +2 -0
- package/build/components/ArabicDatePicker/index.js +2 -0
- package/build/components/ArabicDatePicker/style.css +24 -0
- package/build/components/FileInput/DragAndDrop.d.ts +10 -1
- package/build/components/FileInput/DragAndDrop.js +108 -8
- package/build/components/Lottie/Lottie.d.ts +878 -0
- package/build/components/Lottie/Lottie.js +58 -0
- package/build/components/Lottie/files/pulsating_circle_waves.json +236 -0
- package/build/components/Lottie/files/success.json +425 -0
- package/build/components/Lottie/index.d.ts +3 -0
- package/build/components/Lottie/index.js +3 -0
- package/build/components/OTPField/OTPField.d.ts +2 -1
- package/build/components/OTPField/OTPField.js +2 -2
- package/build/components/OTPTimer/OTPTimer.js +1 -1
- package/build/components/ProgressBar/CircularProgressBar.d.ts +14 -0
- package/build/components/ProgressBar/CircularProgressBar.js +48 -0
- package/build/components/ProgressBar/index.d.ts +2 -0
- package/build/components/ProgressBar/index.js +2 -0
- package/build/components/RadioLabel/RadioLabel.d.ts +2 -1
- package/build/components/RadioLabel/RadioLabel.js +2 -2
- package/build/components/SocialMediaGroup/SocialMediaGroup.d.ts +2 -6
- package/build/components/SocialMediaGroup/SocialMediaGroup.js +4 -49
- package/build/constants/api.d.ts +6 -0
- package/build/constants/api.js +14 -1
- package/build/constants/app.d.ts +5 -5
- package/build/constants/app.js +62 -32
- package/build/constants/assets.d.ts +14 -0
- package/build/constants/assets.js +16 -2
- package/build/constants/dummy.d.ts +1 -1
- package/build/constants/dummy.js +2 -2
- package/build/constants/validation.d.ts +10 -0
- package/build/constants/validation.js +11 -1
- package/build/features/app/auth/authStore.d.ts +30 -4
- package/build/features/app/auth/authStore.js +182 -20
- package/build/features/app/bank/bankStore.d.ts +16 -0
- package/build/features/app/bank/bankStore.js +88 -41
- package/build/features/app/business/businessStore.d.ts +22 -3
- package/build/features/app/business/businessStore.js +445 -296
- package/build/features/app/connect/connectStore.d.ts +34 -31
- package/build/features/app/connect/connectStore.js +427 -300
- package/build/features/app/entity/entityStore.d.ts +40 -8
- package/build/features/app/entity/entityStore.js +389 -149
- package/build/features/app/individual/individualStore.d.ts +18 -0
- package/build/features/app/individual/individualStore.js +178 -85
- package/build/features/app/password/passwordStore.d.ts +1 -7
- package/build/features/app/password/passwordStore.js +31 -20
- package/build/features/app/tax/taxStore.js +23 -16
- package/build/features/auth/Auth.d.ts +2 -1
- package/build/features/auth/Auth.js +37 -9
- package/build/features/auth/screens/NID/DOB.d.ts +7 -0
- package/build/features/auth/screens/NID/DOB.js +47 -0
- package/build/features/auth/screens/NID/IDNumber.d.ts +3 -0
- package/build/features/auth/screens/NID/IDNumber.js +64 -0
- package/build/features/auth/screens/NID/NID.d.ts +5 -0
- package/build/features/auth/screens/NID/NID.js +68 -0
- package/build/features/auth/screens/NID/TAC.d.ts +3 -0
- package/build/features/auth/screens/NID/TAC.js +87 -0
- package/build/features/auth/screens/NID/index.d.ts +3 -0
- package/build/features/auth/screens/NID/index.js +2 -0
- package/build/features/auth/screens/NID/validation.d.ts +27 -0
- package/build/features/auth/screens/NID/validation.js +19 -0
- package/build/features/auth/screens/OTP/OTP.js +8 -4
- package/build/features/auth/screens/OTP/OTPInput.js +9 -2
- package/build/features/bank/Bank.js +4 -4
- package/build/features/bank/screens/BankDetails/BankDetails.js +18 -5
- package/build/features/bank/screens/BankDetails/BankName.js +2 -1
- package/build/features/bank/screens/BankDetails/BankStatement.js +41 -8
- package/build/features/bank/screens/BankDetails/Beneficiary.js +10 -11
- package/build/features/bank/screens/BankDetails/validation.js +2 -2
- package/build/features/bank/screens/Success/Success.js +7 -3
- package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +15 -11
- package/build/features/business/Business.js +4 -4
- package/build/features/business/screens/Activities/Activities.js +16 -17
- package/build/features/business/screens/Activities/ActivitiesList.d.ts +37 -1
- package/build/features/business/screens/Activities/ActivitiesList.js +51 -12
- package/build/features/business/screens/Activities/OperationStartDate.d.ts +15 -1
- package/build/features/business/screens/Activities/OperationStartDate.js +21 -2
- package/build/features/business/screens/Activities/validation.d.ts +0 -51
- package/build/features/business/screens/Activities/validation.js +0 -9
- package/build/features/business/screens/BusinessType/BusinessType.js +20 -7
- package/build/features/business/screens/BusinessType/EntityName.d.ts +6 -0
- package/build/features/business/screens/BusinessType/EntityName.js +56 -0
- package/build/features/business/screens/BusinessType/LicenseCertificate.d.ts +6 -0
- package/build/features/business/screens/BusinessType/LicenseCertificate.js +76 -0
- package/build/features/business/screens/BusinessType/LicenseList.js +26 -7
- package/build/features/business/screens/BusinessType/LicenseNumber.js +12 -6
- package/build/features/business/screens/BusinessType/LicenseType.d.ts +6 -0
- package/build/features/business/screens/BusinessType/LicenseType.js +78 -0
- package/build/features/business/screens/BusinessType/validation.d.ts +19 -0
- package/build/features/business/screens/BusinessType/validation.js +52 -3
- package/build/features/business/screens/CivilID/CivilID.d.ts +5 -0
- package/build/features/business/screens/CivilID/CivilID.js +67 -0
- package/build/features/business/screens/CivilID/IDNumber.d.ts +7 -0
- package/build/features/business/screens/CivilID/IDNumber.js +59 -0
- package/build/features/business/screens/CivilID/index.d.ts +3 -0
- package/build/features/business/screens/CivilID/index.js +2 -0
- package/build/features/business/screens/CivilID/validation.d.ts +8 -0
- package/build/features/business/screens/CivilID/validation.js +4 -0
- package/build/features/business/screens/Customers/CustomerLocations.d.ts +15 -2
- package/build/features/business/screens/Customers/CustomerLocations.js +32 -8
- package/build/features/business/screens/Customers/Customers.js +15 -9
- package/build/features/business/screens/Customers/ExpectedCustomers.js +16 -4
- package/build/features/business/screens/Customers/ExpectedSalesRange.js +32 -14
- package/build/features/business/screens/Customers/RefundPolicy.js +8 -2
- package/build/features/business/screens/Customers/TransactionPolicy.js +8 -2
- package/build/features/business/screens/IDBOD/IDBOD.js +15 -2
- package/build/features/business/screens/OTP/OTP.js +15 -2
- package/build/features/business/screens/Success/Success.js +10 -3
- package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +13 -10
- package/build/features/business/screens/Verify/Verify.js +4 -4
- package/build/features/business/screens/VerifyPACI/VerifyPACI.d.ts +5 -0
- package/build/features/business/screens/VerifyPACI/VerifyPACI.js +159 -0
- package/build/features/business/screens/VerifyPACI/VerifyPACILoading.d.ts +6 -0
- package/build/features/business/screens/VerifyPACI/VerifyPACILoading.js +23 -0
- package/build/features/business/screens/VerifyPACI/VerifyPACISuccess.d.ts +5 -0
- package/build/features/business/screens/VerifyPACI/VerifyPACISuccess.js +8 -0
- package/build/features/business/screens/VerifyPACI/index.d.ts +3 -0
- package/build/features/business/screens/VerifyPACI/index.js +2 -0
- package/build/features/connect/Connect.d.ts +1 -0
- package/build/features/connect/Connect.js +38 -10
- package/build/features/connect/screens/CivilID/CivilID.d.ts +5 -0
- package/build/features/connect/screens/CivilID/CivilID.js +102 -0
- package/build/features/connect/screens/CivilID/IDNumber.d.ts +7 -0
- package/build/features/connect/screens/CivilID/IDNumber.js +59 -0
- package/build/features/connect/screens/CivilID/index.d.ts +3 -0
- package/build/features/connect/screens/CivilID/index.js +2 -0
- package/build/features/connect/screens/CivilID/validation.d.ts +8 -0
- package/build/features/connect/screens/CivilID/validation.js +4 -0
- package/build/features/connect/screens/Individual/Email.js +11 -3
- package/build/features/connect/screens/Individual/Individual.js +48 -28
- package/build/features/connect/screens/Merchant/BrandList.js +15 -7
- package/build/features/connect/screens/Merchant/BrandName.js +7 -4
- package/build/features/connect/screens/Merchant/Merchant.js +41 -64
- package/build/features/connect/screens/Merchant/SalesChannels.d.ts +3 -1
- package/build/features/connect/screens/Merchant/SalesChannels.js +30 -31
- package/build/features/connect/screens/Merchant/SocialMedia.d.ts +1 -4
- package/build/features/connect/screens/Merchant/SocialMedia.js +129 -109
- package/build/features/connect/screens/Merchant/TAC.js +8 -2
- package/build/features/connect/screens/Merchant/validation.d.ts +13 -123
- package/build/features/connect/screens/Merchant/validation.js +108 -173
- package/build/features/connect/screens/Mobile/Mobile.js +33 -12
- package/build/features/connect/screens/NID/NID.js +5 -1
- package/build/features/connect/screens/OTP/OTP.js +20 -6
- package/build/features/connect/screens/OTP/OTPInput.js +3 -2
- package/build/features/connect/screens/VerifyPACI/VerifyPACI.d.ts +5 -0
- package/build/features/connect/screens/VerifyPACI/VerifyPACI.js +159 -0
- package/build/features/connect/screens/VerifyPACI/VerifyPACILoading.d.ts +6 -0
- package/build/features/connect/screens/VerifyPACI/VerifyPACILoading.js +23 -0
- package/build/features/connect/screens/VerifyPACI/VerifyPACISuccess.d.ts +5 -0
- package/build/features/connect/screens/VerifyPACI/VerifyPACISuccess.js +8 -0
- package/build/features/connect/screens/VerifyPACI/index.d.ts +3 -0
- package/build/features/connect/screens/VerifyPACI/index.js +2 -0
- package/build/features/entity/Entity.js +6 -6
- package/build/features/entity/screens/Customers/CustomerLocations.d.ts +118 -0
- package/build/features/entity/screens/Customers/CustomerLocations.js +171 -0
- package/build/features/entity/screens/Customers/Customers.d.ts +5 -0
- package/build/features/entity/screens/Customers/Customers.js +90 -0
- package/build/features/entity/screens/Customers/ExpectedCustomers.d.ts +8 -0
- package/build/features/entity/screens/Customers/ExpectedCustomers.js +98 -0
- package/build/features/entity/screens/Customers/ExpectedSalesRange.d.ts +8 -0
- package/build/features/entity/screens/Customers/ExpectedSalesRange.js +127 -0
- package/build/features/entity/screens/Customers/RefundPolicy.d.ts +36 -0
- package/build/features/entity/screens/Customers/RefundPolicy.js +84 -0
- package/build/features/entity/screens/Customers/TransactionPolicy.d.ts +3 -0
- package/build/features/entity/screens/Customers/TransactionPolicy.js +44 -0
- package/build/features/entity/screens/Customers/index.d.ts +3 -0
- package/build/features/entity/screens/Customers/index.js +2 -0
- package/build/features/entity/screens/Customers/validation.d.ts +20 -0
- package/build/features/entity/screens/Customers/validation.js +13 -0
- package/build/features/entity/screens/EntityInfoConfirm/ActivitiesList.d.ts +2 -1
- package/build/features/entity/screens/EntityInfoConfirm/ActivitiesList.js +25 -15
- package/build/features/entity/screens/EntityInfoConfirm/Article.d.ts +3 -0
- package/build/features/entity/screens/EntityInfoConfirm/Article.js +73 -0
- package/build/features/entity/screens/EntityInfoConfirm/EntityInfo.js +38 -10
- package/build/features/entity/screens/EntityInfoConfirm/LicenseName.js +20 -5
- package/build/features/entity/screens/EntityInfoConfirm/LicenseNumber.d.ts +2 -1
- package/build/features/entity/screens/EntityInfoConfirm/LicenseNumber.js +34 -5
- package/build/features/entity/screens/EntityInfoConfirm/OperationStartDate.js +13 -18
- package/build/features/entity/screens/EntityInfoConfirm/validation.d.ts +75 -41
- package/build/features/entity/screens/EntityInfoConfirm/validation.js +76 -10
- package/build/features/entity/screens/Success/Success.js +7 -3
- package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +9 -8
- package/build/features/entity/screens/Verify/Verify.js +18 -5
- package/build/features/featuresScreens.d.ts +0 -1
- package/build/features/featuresScreens.js +30 -7
- package/build/features/individual/Individual.js +4 -4
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +18 -25
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +15 -3
- package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.js +11 -3
- package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.js +2 -2
- package/build/features/individual/screens/Success/Success.js +7 -3
- package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +15 -11
- package/build/features/individual/screens/Verify/Verify.js +18 -5
- package/build/features/password/Password.js +4 -4
- package/build/features/password/screens/CreatePassword/CreatePassword.js +16 -3
- package/build/features/password/screens/OTP/OTP.js +15 -2
- package/build/features/password/screens/Success/Success.js +7 -3
- package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +15 -12
- package/build/features/password/screens/Verify/Verify.js +16 -3
- package/build/features/shared/Background/Background.d.ts +2 -5
- package/build/features/shared/Background/Background.js +7 -3
- package/build/features/shared/Button/EmailProvidersButtons.d.ts +2 -1
- package/build/features/shared/Button/EmailProvidersButtons.js +7 -2
- package/build/features/shared/Button/MobileButton.d.ts +2 -1
- package/build/features/shared/Button/MobileButton.js +2 -2
- package/build/features/shared/Dialog/CloseDialog.d.ts +11 -0
- package/build/features/shared/Dialog/CloseDialog.js +71 -0
- package/build/features/shared/Dialog/DialogContainer.d.ts +8 -0
- package/build/features/shared/Dialog/DialogContainer.js +56 -0
- package/build/features/shared/Dialog/index.d.ts +4 -0
- package/build/features/shared/Dialog/index.js +4 -0
- package/build/features/shared/Input/Input.d.ts +1 -1
- package/build/features/shared/Input/Input.js +2 -2
- package/build/features/shared/SuccessScreen/SuccessScreen.js +3 -2
- package/build/features/shared/UploadFile/UploadFile.d.ts +10 -3
- package/build/features/shared/UploadFile/UploadFile.js +24 -9
- package/build/features/signIn/SignIn.js +4 -4
- package/build/features/signIn/screens/Email/Email.js +4 -2
- package/build/features/signIn/screens/Mobile/Mobile.js +5 -1
- package/build/features/signIn/screens/OTP/OTP.js +14 -1
- package/build/features/signIn/screens/Password/Password.js +15 -2
- package/build/features/tax/Tax.js +6 -6
- package/build/features/tax/screens/Success/Success.js +9 -3
- package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +14 -10
- package/build/features/tax/screens/TaxDetails/TaxDetails.js +16 -3
- package/build/features/tax/screens/Verify/Verify.js +16 -3
- package/build/hooks/index.d.ts +2 -0
- package/build/hooks/index.js +2 -0
- package/build/hooks/useAppConfig.d.ts +3 -1
- package/build/hooks/useAppConfig.js +2 -2
- package/build/hooks/useAppDispatch.d.ts +0 -1
- package/build/hooks/useErrorListener.js +0 -6
- package/build/hooks/useScreen.d.ts +3 -0
- package/build/hooks/useScreen.js +14 -0
- package/build/hooks/useSetFromDefaultValues.d.ts +2 -0
- package/build/hooks/useSetFromDefaultValues.js +24 -0
- package/build/index.d.ts +2 -3
- package/build/index.js +1 -4
- package/build/utils/array.d.ts +49 -1
- package/build/utils/array.js +58 -0
- package/build/utils/common.d.ts +1 -0
- package/build/utils/common.js +3 -0
- package/build/utils/device.d.ts +1 -0
- package/build/utils/device.js +13 -0
- package/build/utils/index.d.ts +1 -0
- package/build/utils/index.js +1 -0
- package/build/utils/locale.js +1 -1
- package/build/utils/object.d.ts +1 -0
- package/build/utils/object.js +12 -0
- package/build/utils/string.d.ts +13 -0
- package/build/utils/string.js +71 -1
- package/build/utils/validation.d.ts +2 -0
- package/build/utils/validation.js +6 -0
- package/package.json +4 -3
- package/build/features/app/otp/otpStore.d.ts +0 -28
- package/build/features/app/otp/otpStore.js +0 -153
- package/build/features/business/screens/Activities/SalesChannels.d.ts +0 -5
- package/build/features/business/screens/Activities/SalesChannels.js +0 -112
- package/build/features/entity/screens/EntityInfoConfirm/SalesChannels.d.ts +0 -5
- package/build/features/entity/screens/EntityInfoConfirm/SalesChannels.js +0 -112
- package/build/features/otp/OTP.d.ts +0 -7
- package/build/features/otp/OTP.js +0 -58
- package/build/features/otp/index.d.ts +0 -0
- package/build/features/otp/index.js +0 -1
- package/build/features/otp/screens/OTPVerify/OTPInput.d.ts +0 -6
- package/build/features/otp/screens/OTPVerify/OTPInput.js +0 -47
- package/build/features/otp/screens/OTPVerify/Verify.d.ts +0 -5
- package/build/features/otp/screens/OTPVerify/Verify.js +0 -49
- package/build/features/otp/screens/OTPVerify/index.d.ts +0 -2
- package/build/features/otp/screens/OTPVerify/index.js +0 -2
- package/build/features/otp/screens/OTPVerify/validation.d.ts +0 -8
- package/build/features/otp/screens/OTPVerify/validation.js +0 -4
package/build/api/entity.js
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
1
12
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
13
|
var t = {};
|
|
3
14
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -22,6 +33,20 @@ var updateEntityInfo = function (_a, config) {
|
|
|
22
33
|
var id = _a.id, data = __rest(_a, ["id"]);
|
|
23
34
|
return instance.put("".concat(ENDPOINT_PATHS.ENTITY, "/").concat(id), data, config);
|
|
24
35
|
};
|
|
36
|
+
var retrieveEntity = function (entity_id) {
|
|
37
|
+
return httpClient({
|
|
38
|
+
method: 'get',
|
|
39
|
+
url: "".concat(ENDPOINT_PATHS.ENTITY, "/").concat(entity_id)
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
var updateEntity = function (_a) {
|
|
43
|
+
var id = _a.id, data = __rest(_a, ["id"]);
|
|
44
|
+
return httpClient({
|
|
45
|
+
method: 'put',
|
|
46
|
+
url: "".concat(ENDPOINT_PATHS.ENTITY, "/").concat(id),
|
|
47
|
+
data: data
|
|
48
|
+
});
|
|
49
|
+
};
|
|
25
50
|
var createBankAccount = function (data, config) {
|
|
26
51
|
return instance.put("".concat(ENDPOINT_PATHS.BANK), data, config);
|
|
27
52
|
};
|
|
@@ -31,19 +56,21 @@ var retrieveBankAccount = function (id) {
|
|
|
31
56
|
url: "".concat(ENDPOINT_PATHS.BANK, "/").concat(id)
|
|
32
57
|
});
|
|
33
58
|
};
|
|
34
|
-
var uploadFileInfo = function (data) {
|
|
35
|
-
return httpClient({
|
|
36
|
-
method: 'post',
|
|
37
|
-
url: "".concat(ENDPOINT_PATHS.FILES_PATH),
|
|
38
|
-
data: data,
|
|
39
|
-
headers: { 'Content-Type': 'multipart/form-data' }
|
|
40
|
-
});
|
|
59
|
+
var uploadFileInfo = function (data, config) {
|
|
60
|
+
return httpClient(__assign({ method: 'post', url: "".concat(ENDPOINT_PATHS.FILES_PATH), data: data, headers: { 'Content-Type': 'multipart/form-data' } }, config));
|
|
41
61
|
};
|
|
42
62
|
var updateIndividualInfo = function (_a) {
|
|
43
63
|
var id = _a.id, data = __rest(_a, ["id"]);
|
|
44
64
|
return httpClient({
|
|
45
65
|
method: 'put',
|
|
46
|
-
url: "".concat(ENDPOINT_PATHS.
|
|
66
|
+
url: "".concat(ENDPOINT_PATHS.USER, "/").concat(id, "/info"),
|
|
67
|
+
data: data
|
|
68
|
+
});
|
|
69
|
+
};
|
|
70
|
+
var updateDocumentInfo = function (data) {
|
|
71
|
+
return httpClient({
|
|
72
|
+
method: 'post',
|
|
73
|
+
url: "".concat(ENDPOINT_PATHS.DOCUMENT),
|
|
47
74
|
data: data
|
|
48
75
|
});
|
|
49
76
|
};
|
|
@@ -54,6 +81,9 @@ var entityService = {
|
|
|
54
81
|
retrieveBankAccount: retrieveBankAccount,
|
|
55
82
|
retrieveEntityInfo: retrieveEntityInfo,
|
|
56
83
|
updateIndividualInfo: updateIndividualInfo,
|
|
57
|
-
uploadFileInfo: uploadFileInfo
|
|
84
|
+
uploadFileInfo: uploadFileInfo,
|
|
85
|
+
updateDocumentInfo: updateDocumentInfo,
|
|
86
|
+
retrieveEntity: retrieveEntity,
|
|
87
|
+
updateEntity: updateEntity
|
|
58
88
|
};
|
|
59
89
|
export { entityService };
|
package/build/api/firebase.d.ts
CHANGED
package/build/api/firebase.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { ENDPOINT_PATHS } from '../constants';
|
|
2
2
|
import { httpClient } from './axios';
|
|
3
|
-
var getLocale = function () {
|
|
3
|
+
var getLocale = function (disableLocale) {
|
|
4
|
+
if (disableLocale)
|
|
5
|
+
return Promise.resolve(null);
|
|
4
6
|
return httpClient({
|
|
5
7
|
method: 'get',
|
|
6
8
|
url: ENDPOINT_PATHS.FIREBASE_URL
|
package/build/api/index.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import axiosInstance, { setAxiosGlobalHeaders, removeAxiosGlobalHeaders, getAxiosHeaders } from './axios';
|
|
2
2
|
import { ValidateOperatorBody } from './operator';
|
|
3
|
-
import { CreateAuthBody, VerifyAuthBody, CreatePasswordBody, VerifyOperationAuthBody, ResetPasswordVerifyAuthBody } from './auth';
|
|
3
|
+
import { CreateAuthBody, VerifyAuthBody, CreatePasswordBody, VerifyOperationAuthBody, ResetPasswordVerifyAuthBody, VerifyAuthKitOTPBody } from './auth';
|
|
4
4
|
import { UpdateLeadBody, LeadVerifyBody, CreateLeadBody, LeadOTPVerifyBody, LeadIdentityUpdateBody } from './lead';
|
|
5
5
|
import { CheckEmailBody, CheckBrandBody } from './availabilityServices';
|
|
6
|
-
import { EntityInfoBody, EntityBankUpdateBody } from './entity';
|
|
6
|
+
import { EntityInfoBody, EntityBankUpdateBody, UploadFileBody, UpdateEntityBody, DocumentUpdateBody, DocumentInfo } from './entity';
|
|
7
7
|
import { CreateAccountBody } from './account';
|
|
8
|
-
import {
|
|
8
|
+
import { DataElementBody } from './data';
|
|
9
|
+
import { BrandListBody, UpdateBrandBody, UpdateIndividualBody } from './individual';
|
|
9
10
|
import { UpdateBoardBody } from './board';
|
|
10
11
|
declare const API: {
|
|
11
12
|
ipService: {
|
|
@@ -15,12 +16,18 @@ declare const API: {
|
|
|
15
16
|
validateOperator: (body: ValidateOperatorBody) => Promise<any>;
|
|
16
17
|
};
|
|
17
18
|
countryService: {
|
|
18
|
-
getCountries: () => Promise<any
|
|
19
|
+
getCountries: (disableCountries?: boolean | undefined) => Promise<any> | {
|
|
20
|
+
list: never[];
|
|
21
|
+
};
|
|
19
22
|
};
|
|
20
23
|
authService: {
|
|
21
24
|
createAuth: (data: CreateAuthBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
22
25
|
verifyAuth: (data: VerifyAuthBody | VerifyOperationAuthBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
23
26
|
createPassword: (data: CreatePasswordBody) => Promise<any>;
|
|
27
|
+
verifyAuthKitOTP: (data: VerifyAuthKitOTPBody) => Promise<any>;
|
|
28
|
+
getVerifyAuth: (token: string, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<any>;
|
|
29
|
+
getTokenVerify: (token: string, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<any>;
|
|
30
|
+
createAuthKitNID: (data: CreateAuthBody) => Promise<any>;
|
|
24
31
|
};
|
|
25
32
|
leadService: {
|
|
26
33
|
createLead: (data: CreateLeadBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
@@ -29,6 +36,7 @@ declare const API: {
|
|
|
29
36
|
verifyLeadToken: (data: LeadVerifyBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
30
37
|
verifyLeadOTP: (data: LeadOTPVerifyBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
31
38
|
retrieveEntityList: (leadId: string) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
39
|
+
retrieveLeadIdentity: (leadId: string) => Promise<any>;
|
|
32
40
|
};
|
|
33
41
|
entityService: {
|
|
34
42
|
createEntityInfo: ({ id, ...data }: EntityInfoBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
@@ -37,7 +45,10 @@ declare const API: {
|
|
|
37
45
|
retrieveBankAccount: (id: string) => Promise<any>;
|
|
38
46
|
retrieveEntityInfo: (entity_id: string, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
39
47
|
updateIndividualInfo: ({ id, ...data }: EntityInfoBody) => Promise<any>;
|
|
40
|
-
uploadFileInfo: (data: import("
|
|
48
|
+
uploadFileInfo: (data: UploadFileBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<any>;
|
|
49
|
+
updateDocumentInfo: (data: DocumentUpdateBody) => Promise<any>;
|
|
50
|
+
retrieveEntity: (entity_id: string) => Promise<any>;
|
|
51
|
+
updateEntity: ({ id, ...data }: UpdateEntityBody) => Promise<any>;
|
|
41
52
|
};
|
|
42
53
|
availabilityServices: {
|
|
43
54
|
checkEmail: (data: CheckEmailBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
@@ -45,22 +56,40 @@ declare const API: {
|
|
|
45
56
|
checkIbanBank: (data: import("./availabilityServices").CheckIBanBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
46
57
|
};
|
|
47
58
|
firebaseService: {
|
|
48
|
-
getLocale: () => Promise<any>;
|
|
59
|
+
getLocale: (disableLocale?: boolean | undefined) => Promise<any>;
|
|
49
60
|
};
|
|
50
61
|
accountService: {
|
|
51
62
|
createAccount: (data: CreateAccountBody) => Promise<any>;
|
|
52
63
|
};
|
|
53
64
|
dataService: {
|
|
54
|
-
getChannelsOfServices: (
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
65
|
+
getChannelsOfServices: (data: {
|
|
66
|
+
page: number;
|
|
67
|
+
}) => Promise<any>;
|
|
68
|
+
getCustomerBases: (data: {
|
|
69
|
+
page: number;
|
|
70
|
+
}) => Promise<any>;
|
|
71
|
+
getExpectedSales: (data: {
|
|
72
|
+
page: number;
|
|
73
|
+
}) => Promise<any>;
|
|
74
|
+
getExpectedCustomerSales: (data: {
|
|
75
|
+
page: number;
|
|
76
|
+
}) => Promise<any>;
|
|
77
|
+
getSourceOfIncome: (data: {
|
|
78
|
+
page: number;
|
|
79
|
+
}) => Promise<any>;
|
|
80
|
+
getMonthlyIncome: (data: {
|
|
81
|
+
page: number;
|
|
82
|
+
country_code: string[];
|
|
83
|
+
}) => Promise<any>;
|
|
84
|
+
getOccupation: (data: {
|
|
85
|
+
page: number;
|
|
86
|
+
}) => Promise<any>;
|
|
87
|
+
getActivities: (config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<any>;
|
|
61
88
|
};
|
|
62
89
|
individualService: {
|
|
63
90
|
retrieveIndividualInfo: (id: string) => Promise<any>;
|
|
91
|
+
retrieveIndividual: (id: string, type: string) => Promise<any>;
|
|
92
|
+
updateIndividual: ({ id, type, ...data }: UpdateIndividualBody) => Promise<any>;
|
|
64
93
|
};
|
|
65
94
|
boardService: {
|
|
66
95
|
retrieveBoard: (id: string) => Promise<any>;
|
|
@@ -76,8 +105,9 @@ declare const API: {
|
|
|
76
105
|
retrieveBrand: (id: string) => Promise<any>;
|
|
77
106
|
getBrandList: (data: BrandListBody) => Promise<any>;
|
|
78
107
|
updateBrandInfo: ({ id, ...data }: UpdateBrandBody) => Promise<any>;
|
|
108
|
+
updateBrandSales: ({ id, ...data }: import("./individual").UpdateSalesChannels) => void;
|
|
79
109
|
};
|
|
80
110
|
};
|
|
81
|
-
export type { ValidateOperatorBody, CreateAuthBody, VerifyAuthBody, CreateLeadBody, UpdateLeadBody, LeadVerifyBody, LeadOTPVerifyBody, CheckEmailBody, CheckBrandBody, LeadIdentityUpdateBody, EntityInfoBody, CreateAccountBody, EntityBankUpdateBody, CreatePasswordBody, BrandListBody, VerifyOperationAuthBody, ResetPasswordVerifyAuthBody, UpdateBoardBody, UpdateBrandBody };
|
|
111
|
+
export type { ValidateOperatorBody, CreateAuthBody, VerifyAuthBody, CreateLeadBody, UpdateLeadBody, LeadVerifyBody, LeadOTPVerifyBody, CheckEmailBody, CheckBrandBody, LeadIdentityUpdateBody, EntityInfoBody, CreateAccountBody, EntityBankUpdateBody, CreatePasswordBody, BrandListBody, VerifyOperationAuthBody, ResetPasswordVerifyAuthBody, UpdateBoardBody, UpdateBrandBody, DataElementBody, UploadFileBody, UpdateEntityBody, DocumentUpdateBody, DocumentInfo, VerifyAuthKitOTPBody, UpdateIndividualBody };
|
|
82
112
|
export { setAxiosGlobalHeaders, removeAxiosGlobalHeaders, axiosInstance, getAxiosHeaders };
|
|
83
113
|
export default API;
|
|
@@ -3,30 +3,87 @@ export declare type BrandListBody = {
|
|
|
3
3
|
};
|
|
4
4
|
export declare type UpdateBrandBody = {
|
|
5
5
|
id: string;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
6
|
+
name?: {
|
|
7
|
+
en: string;
|
|
8
|
+
ar: string;
|
|
9
|
+
};
|
|
10
|
+
sectors?: Array<{
|
|
11
|
+
id: string;
|
|
12
|
+
}>;
|
|
13
|
+
website?: string;
|
|
14
|
+
social?: Array<string>;
|
|
15
|
+
logo?: string;
|
|
16
|
+
content?: {
|
|
17
|
+
tag_line?: {
|
|
18
|
+
en: string;
|
|
19
|
+
ar: string;
|
|
20
|
+
zh: string;
|
|
21
|
+
};
|
|
22
|
+
about?: {
|
|
23
|
+
en: string;
|
|
24
|
+
ar: string;
|
|
25
|
+
zh: string;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
activities?: Array<{
|
|
29
|
+
id: string;
|
|
30
|
+
}>;
|
|
31
|
+
channel_services?: Array<{
|
|
32
|
+
id: string;
|
|
33
|
+
address: string;
|
|
34
|
+
sub?: Array<{
|
|
35
|
+
id: string;
|
|
36
|
+
address: string;
|
|
37
|
+
}>;
|
|
38
|
+
}>;
|
|
39
|
+
operations?: {
|
|
40
|
+
start_date?: string;
|
|
41
|
+
sales?: {
|
|
42
|
+
id: string;
|
|
43
|
+
period: string;
|
|
44
|
+
currency?: string;
|
|
45
|
+
};
|
|
46
|
+
customer_base?: {
|
|
47
|
+
id: string;
|
|
48
|
+
period: string;
|
|
49
|
+
locations?: Array<{
|
|
50
|
+
id: string;
|
|
51
|
+
}>;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
term?: Array<string>;
|
|
55
|
+
step_name?: string;
|
|
56
|
+
encryption_contract?: Array<string>;
|
|
57
|
+
};
|
|
58
|
+
export declare type UpdateSalesChannels = {
|
|
59
|
+
id?: string;
|
|
60
|
+
channel_services: Array<{
|
|
61
|
+
id: string;
|
|
62
|
+
address: string;
|
|
63
|
+
}>;
|
|
64
|
+
};
|
|
65
|
+
export declare type UpdateIndividualBody = {
|
|
66
|
+
id: string;
|
|
67
|
+
type: string;
|
|
68
|
+
employer_name?: string;
|
|
69
|
+
employer_country?: string | null;
|
|
70
|
+
source_income?: Array<{
|
|
71
|
+
id?: string;
|
|
72
|
+
}>;
|
|
73
|
+
monthly_income?: {
|
|
74
|
+
id?: string;
|
|
75
|
+
};
|
|
76
|
+
is_relative_PEP?: boolean | null;
|
|
77
|
+
is_influencer?: boolean | null;
|
|
78
|
+
occupation?: {
|
|
79
|
+
id?: string;
|
|
25
80
|
};
|
|
26
81
|
step_name: string;
|
|
27
82
|
encryption_contract?: Array<string>;
|
|
28
83
|
};
|
|
29
84
|
declare const individualService: {
|
|
30
85
|
retrieveIndividualInfo: (id: string) => Promise<any>;
|
|
86
|
+
retrieveIndividual: (id: string, type: string) => Promise<any>;
|
|
87
|
+
updateIndividual: ({ id, type, ...data }: UpdateIndividualBody) => Promise<any>;
|
|
31
88
|
};
|
|
32
89
|
export { individualService };
|
package/build/api/individual.js
CHANGED
|
@@ -1,12 +1,39 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
1
12
|
import { ENDPOINT_PATHS } from '../constants';
|
|
2
13
|
import { httpClient } from './axios';
|
|
3
14
|
var retrieveIndividualInfo = function (id) {
|
|
4
15
|
return httpClient({
|
|
5
16
|
method: 'get',
|
|
6
|
-
url: "".concat(ENDPOINT_PATHS.
|
|
17
|
+
url: "".concat(ENDPOINT_PATHS.USER, "/").concat(id, "/info")
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
var retrieveIndividual = function (id, type) {
|
|
21
|
+
return httpClient({
|
|
22
|
+
method: 'get',
|
|
23
|
+
url: "".concat(ENDPOINT_PATHS.INDIVIDUAL, "/").concat(type, "/").concat(id)
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
var updateIndividual = function (_a) {
|
|
27
|
+
var id = _a.id, type = _a.type, data = __rest(_a, ["id", "type"]);
|
|
28
|
+
return httpClient({
|
|
29
|
+
method: 'put',
|
|
30
|
+
url: "".concat(ENDPOINT_PATHS.INDIVIDUAL, "/").concat(type, "/").concat(id),
|
|
31
|
+
data: data
|
|
7
32
|
});
|
|
8
33
|
};
|
|
9
34
|
var individualService = {
|
|
10
|
-
retrieveIndividualInfo: retrieveIndividualInfo
|
|
35
|
+
retrieveIndividualInfo: retrieveIndividualInfo,
|
|
36
|
+
retrieveIndividual: retrieveIndividual,
|
|
37
|
+
updateIndividual: updateIndividual
|
|
11
38
|
};
|
|
12
39
|
export { individualService };
|
package/build/api/lead.d.ts
CHANGED
|
@@ -42,7 +42,7 @@ export declare type UpdateLeadBody = {
|
|
|
42
42
|
name?: Name;
|
|
43
43
|
contact?: Contact;
|
|
44
44
|
send_invite?: boolean;
|
|
45
|
-
|
|
45
|
+
business?: BusinessName;
|
|
46
46
|
business_type?: string;
|
|
47
47
|
country_code?: string;
|
|
48
48
|
brand?: BrandInfo;
|
|
@@ -75,11 +75,13 @@ export declare type CreateLeadBody = {
|
|
|
75
75
|
};
|
|
76
76
|
export declare type LeadIdentityUpdateBody = {
|
|
77
77
|
id: string;
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
78
|
+
identification: {
|
|
79
|
+
id: string;
|
|
80
|
+
issued_country_code: string;
|
|
81
|
+
type: string;
|
|
82
|
+
};
|
|
83
|
+
date_of_birth?: string;
|
|
84
|
+
step_name?: string;
|
|
83
85
|
encryption_contract: Array<string>;
|
|
84
86
|
};
|
|
85
87
|
declare const leadService: {
|
|
@@ -89,5 +91,6 @@ declare const leadService: {
|
|
|
89
91
|
verifyLeadToken: (data: LeadVerifyBody, config?: AxiosRequestConfig) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
90
92
|
verifyLeadOTP: (data: LeadOTPVerifyBody, config?: AxiosRequestConfig) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
91
93
|
retrieveEntityList: (leadId: string) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
94
|
+
retrieveLeadIdentity: (leadId: string) => Promise<any>;
|
|
92
95
|
};
|
|
93
96
|
export { leadService };
|
package/build/api/lead.js
CHANGED
|
@@ -34,12 +34,19 @@ var verifyLeadOTP = function (data, config) {
|
|
|
34
34
|
var retrieveEntityList = function (leadId) {
|
|
35
35
|
return instance.get("".concat(ENDPOINT_PATHS.RETRIEVE_ENTITY_LIST, "/").concat(leadId));
|
|
36
36
|
};
|
|
37
|
+
var retrieveLeadIdentity = function (leadId) {
|
|
38
|
+
return httpClient({
|
|
39
|
+
method: 'get',
|
|
40
|
+
url: "".concat(ENDPOINT_PATHS.LEAD, "/").concat(leadId, "/identity")
|
|
41
|
+
});
|
|
42
|
+
};
|
|
37
43
|
var leadService = {
|
|
38
44
|
createLead: createLead,
|
|
39
45
|
updateLead: updateLead,
|
|
40
46
|
retrieveLead: retrieveLead,
|
|
41
47
|
verifyLeadToken: verifyLeadToken,
|
|
42
48
|
verifyLeadOTP: verifyLeadOTP,
|
|
43
|
-
retrieveEntityList: retrieveEntityList
|
|
49
|
+
retrieveEntityList: retrieveEntityList,
|
|
50
|
+
retrieveLeadIdentity: retrieveLeadIdentity
|
|
44
51
|
};
|
|
45
52
|
export { leadService };
|
|
@@ -8,7 +8,6 @@ declare const rootReducer: {
|
|
|
8
8
|
password: import("redux").Reducer<import("../features/app/password/passwordStore").PasswordState, import("redux").AnyAction>;
|
|
9
9
|
signIn: import("redux").Reducer<import("../features/app/signIn/signInStore").SignInState, import("redux").AnyAction>;
|
|
10
10
|
entity: import("redux").Reducer<import("../features/app/entity/entityStore").EntityState, import("redux").AnyAction>;
|
|
11
|
-
otp: import("redux").Reducer<import("../features/app/otp/otpStore").OtpState, import("redux").AnyAction>;
|
|
12
11
|
auth: import("redux").Reducer<import("../features/app/auth/authStore").AuthState, import("redux").AnyAction>;
|
|
13
12
|
};
|
|
14
13
|
export default rootReducer;
|
package/build/app/rootReducer.js
CHANGED
|
@@ -7,7 +7,6 @@ import individual from '../features/app/individual/individualStore';
|
|
|
7
7
|
import password from '../features/app/password/passwordStore';
|
|
8
8
|
import signIn from '../features/app/signIn/signInStore';
|
|
9
9
|
import entity from '../features/app/entity/entityStore';
|
|
10
|
-
import otp from '../features/app/otp/otpStore';
|
|
11
10
|
import auth from '../features/app/auth/authStore';
|
|
12
11
|
var rootReducer = {
|
|
13
12
|
settings: settings,
|
|
@@ -19,7 +18,6 @@ var rootReducer = {
|
|
|
19
18
|
password: password,
|
|
20
19
|
signIn: signIn,
|
|
21
20
|
entity: entity,
|
|
22
|
-
otp: otp,
|
|
23
21
|
auth: auth
|
|
24
22
|
};
|
|
25
23
|
export default rootReducer;
|
package/build/app/settings.d.ts
CHANGED
|
@@ -5,7 +5,12 @@ export declare const fetchAppSettingsSync: import("@reduxjs/toolkit").AsyncThunk
|
|
|
5
5
|
businessCountry: CountryCode;
|
|
6
6
|
locale: any;
|
|
7
7
|
deviceInfo: DeviceInfo;
|
|
8
|
-
|
|
8
|
+
isValidOperator: boolean;
|
|
9
|
+
}, {
|
|
10
|
+
disableCountries?: boolean | undefined;
|
|
11
|
+
disableLocale?: boolean | undefined;
|
|
12
|
+
mdn: string;
|
|
13
|
+
}, {}>;
|
|
9
14
|
export interface SettingsData {
|
|
10
15
|
skin: ThemeMode;
|
|
11
16
|
language: LanguageMode;
|
|
@@ -17,6 +22,7 @@ export interface SettingsData {
|
|
|
17
22
|
isTapOrigin: boolean;
|
|
18
23
|
businessCountry: CountryCode;
|
|
19
24
|
countries: Array<CountryCode>;
|
|
25
|
+
isValidOperator: boolean;
|
|
20
26
|
}
|
|
21
27
|
export interface SettingsState extends SharedState<SettingsData> {
|
|
22
28
|
}
|
|
@@ -30,8 +36,9 @@ export declare const settingsSlice: import("@reduxjs/toolkit").Slice<SettingsSta
|
|
|
30
36
|
handlePrevScreenStep: (state: SettingsState, action: ActionState<string | undefined>) => void;
|
|
31
37
|
handleActiveFlowScreens: (state: SettingsState, action: ActionState<Array<ScreenStepNavigation>>) => void;
|
|
32
38
|
handleSetAppConfig: (state: SettingsState, action: ActionState<LibConfig>) => void;
|
|
39
|
+
handleSetCountryByIso2: (state: SettingsState, action: ActionState<string>) => void;
|
|
33
40
|
}, "settings">;
|
|
34
|
-
export declare const handleSkin: import("@reduxjs/toolkit").ActionCreatorWithPayload<ThemeMode, string>, handleLanguage: import("@reduxjs/toolkit").ActionCreatorWithPayload<LanguageMode, string>, handleActiveFlowScreens: import("@reduxjs/toolkit").ActionCreatorWithPayload<ScreenStepNavigation[], string>, handleNextScreenStep: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<string | undefined, string>, handlePrevScreenStep: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<string | undefined, string>, handleCurrentActiveScreen: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, string>, handleSetAppConfig: import("@reduxjs/toolkit").ActionCreatorWithPayload<LibConfig, string>, handleOpen: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, string>, handleIsTapOrigin: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, string>;
|
|
41
|
+
export declare const handleSkin: import("@reduxjs/toolkit").ActionCreatorWithPayload<ThemeMode, string>, handleLanguage: import("@reduxjs/toolkit").ActionCreatorWithPayload<LanguageMode, string>, handleActiveFlowScreens: import("@reduxjs/toolkit").ActionCreatorWithPayload<ScreenStepNavigation[], string>, handleNextScreenStep: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<string | undefined, string>, handlePrevScreenStep: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<string | undefined, string>, handleCurrentActiveScreen: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, string>, handleSetAppConfig: import("@reduxjs/toolkit").ActionCreatorWithPayload<LibConfig, string>, handleOpen: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, string>, handleSetCountryByIso2: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, string>, handleIsTapOrigin: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, string>;
|
|
35
42
|
declare const _default: import("redux").Reducer<SettingsState, import("redux").AnyAction>;
|
|
36
43
|
export default _default;
|
|
37
44
|
export declare const settingsSelector: (state: RootState) => SettingsState;
|
package/build/app/settings.js
CHANGED
|
@@ -52,19 +52,20 @@ import { defaultCountry, DefaultDeviceInfo, LOCAL_STORAGE_KEYS, DIALOG_ID, BACKG
|
|
|
52
52
|
import i18n from '../i18n';
|
|
53
53
|
import { updateLocale } from '../utils/locale';
|
|
54
54
|
import API, { setAxiosGlobalHeaders } from '../api';
|
|
55
|
-
export var fetchAppSettingsSync = createAsyncThunk('fetchAppSettingsSync', function (
|
|
56
|
-
var settings, _a, appConfig, language, _b, client, device, os, _c, visitorId, _d, ip, latitude, longitude, locale, list, operatorData, deviceInfo, countries, businessCountry;
|
|
55
|
+
export var fetchAppSettingsSync = createAsyncThunk('fetchAppSettingsSync', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
56
|
+
var settings, _a, appConfig, language, _b, client, device, os, disableCountries, disableLocale, _c, visitorId, _d, ip, latitude, longitude, locale, list, operatorData, deviceInfo, operatorStatus, isValidOperator, countries, businessCountry;
|
|
57
57
|
return __generator(this, function (_e) {
|
|
58
58
|
switch (_e.label) {
|
|
59
59
|
case 0:
|
|
60
60
|
settings = thunkApi.getState().settings;
|
|
61
61
|
_a = settings.data, appConfig = _a.appConfig, language = _a.language;
|
|
62
62
|
_b = getBrowserInfo(), client = _b.client, device = _b.device, os = _b.os;
|
|
63
|
+
disableCountries = params.disableCountries, disableLocale = params.disableLocale;
|
|
63
64
|
return [4, Promise.all([
|
|
64
65
|
getFingerPrint(),
|
|
65
66
|
API.ipService.getIP(),
|
|
66
|
-
API.firebaseService.getLocale(),
|
|
67
|
-
API.countryService.getCountries()
|
|
67
|
+
API.firebaseService.getLocale(disableLocale),
|
|
68
|
+
API.countryService.getCountries(disableCountries)
|
|
68
69
|
])];
|
|
69
70
|
case 1:
|
|
70
71
|
_c = _e.sent(), visitorId = _c[0].visitorId, _d = _c[1], ip = _d.ip, latitude = _d.latitude, longitude = _d.longitude, locale = _c[2], list = _c[3].list;
|
|
@@ -106,13 +107,14 @@ export var fetchAppSettingsSync = createAsyncThunk('fetchAppSettingsSync', funct
|
|
|
106
107
|
},
|
|
107
108
|
source: 'browser'
|
|
108
109
|
};
|
|
109
|
-
setAxiosGlobalHeaders(__assign(__assign({}, getRequestHeaders(deviceInfo)), { authorization: encryptString(appConfig.publicKey), mdn: encryptString(window.location.origin) }));
|
|
110
|
+
setAxiosGlobalHeaders(__assign(__assign({}, getRequestHeaders(deviceInfo)), { authorization: encryptString(appConfig.publicKey), mdn: encryptString(params.mdn || window.location.origin) }));
|
|
110
111
|
return [4, API.operatorService.validateOperator(operatorData)];
|
|
111
112
|
case 2:
|
|
112
|
-
_e.sent();
|
|
113
|
+
operatorStatus = _e.sent();
|
|
114
|
+
isValidOperator = operatorStatus === 'valid';
|
|
113
115
|
countries = sortCountries(list);
|
|
114
116
|
businessCountry = findCountryByIso2(countries, appConfig.businessCountryCode) || defaultCountry;
|
|
115
|
-
return [2, { countries: countries, businessCountry: businessCountry, locale: locale, deviceInfo: deviceInfo }];
|
|
117
|
+
return [2, { countries: countries, businessCountry: businessCountry, locale: locale, deviceInfo: deviceInfo, isValidOperator: isValidOperator }];
|
|
116
118
|
}
|
|
117
119
|
});
|
|
118
120
|
}); });
|
|
@@ -129,7 +131,8 @@ var initialState = {
|
|
|
129
131
|
deviceInfo: DefaultDeviceInfo,
|
|
130
132
|
appConfig: {},
|
|
131
133
|
businessCountry: defaultCountry,
|
|
132
|
-
countries: []
|
|
134
|
+
countries: [],
|
|
135
|
+
isValidOperator: false
|
|
133
136
|
}
|
|
134
137
|
};
|
|
135
138
|
export var settingsSlice = createSlice({
|
|
@@ -220,6 +223,10 @@ export var settingsSlice = createSlice({
|
|
|
220
223
|
if (typeof open !== 'boolean')
|
|
221
224
|
throw new Error('Open is required');
|
|
222
225
|
state.data.appConfig = action.payload;
|
|
226
|
+
},
|
|
227
|
+
handleSetCountryByIso2: function (state, action) {
|
|
228
|
+
var country = findCountryByIso2(state.data.countries, action.payload);
|
|
229
|
+
state.data.businessCountry = country || defaultCountry;
|
|
223
230
|
}
|
|
224
231
|
},
|
|
225
232
|
extraReducers: function (builder) {
|
|
@@ -228,12 +235,16 @@ export var settingsSlice = createSlice({
|
|
|
228
235
|
state.error = null;
|
|
229
236
|
});
|
|
230
237
|
builder.addCase(fetchAppSettingsSync.fulfilled, function (state, action) {
|
|
231
|
-
var _a = action.payload, businessCountry = _a.businessCountry, countries = _a.countries, locale = _a.locale, deviceInfo = _a.deviceInfo;
|
|
238
|
+
var _a = action.payload, businessCountry = _a.businessCountry, countries = _a.countries, locale = _a.locale, deviceInfo = _a.deviceInfo, isValidOperator = _a.isValidOperator;
|
|
232
239
|
state.data.countries = countries;
|
|
233
240
|
state.data.businessCountry = businessCountry;
|
|
234
241
|
state.data.deviceInfo = deviceInfo;
|
|
235
|
-
|
|
242
|
+
state.data.isValidOperator = isValidOperator;
|
|
243
|
+
if (locale)
|
|
244
|
+
updateLocale(locale, businessCountry.iso2);
|
|
236
245
|
state.loading = false;
|
|
246
|
+
if (state.data.appConfig.onReady)
|
|
247
|
+
state.data.appConfig.onReady();
|
|
237
248
|
});
|
|
238
249
|
builder.addCase(fetchAppSettingsSync.rejected, function (state, action) {
|
|
239
250
|
state.loading = false;
|
|
@@ -241,6 +252,6 @@ export var settingsSlice = createSlice({
|
|
|
241
252
|
});
|
|
242
253
|
}
|
|
243
254
|
});
|
|
244
|
-
export var handleSkin = (_a = settingsSlice.actions, _a.handleSkin), handleLanguage = _a.handleLanguage, handleActiveFlowScreens = _a.handleActiveFlowScreens, handleNextScreenStep = _a.handleNextScreenStep, handlePrevScreenStep = _a.handlePrevScreenStep, handleCurrentActiveScreen = _a.handleCurrentActiveScreen, handleSetAppConfig = _a.handleSetAppConfig, handleOpen = _a.handleOpen, handleIsTapOrigin = _a.handleIsTapOrigin;
|
|
255
|
+
export var handleSkin = (_a = settingsSlice.actions, _a.handleSkin), handleLanguage = _a.handleLanguage, handleActiveFlowScreens = _a.handleActiveFlowScreens, handleNextScreenStep = _a.handleNextScreenStep, handlePrevScreenStep = _a.handlePrevScreenStep, handleCurrentActiveScreen = _a.handleCurrentActiveScreen, handleSetAppConfig = _a.handleSetAppConfig, handleOpen = _a.handleOpen, handleSetCountryByIso2 = _a.handleSetCountryByIso2, handleIsTapOrigin = _a.handleIsTapOrigin;
|
|
245
256
|
export default settingsSlice.reducer;
|
|
246
257
|
export var settingsSelector = function (state) { return state.settings; };
|
package/build/app/store.d.ts
CHANGED
|
@@ -9,7 +9,6 @@ export declare const store: import("@reduxjs/toolkit").EnhancedStore<{
|
|
|
9
9
|
password: import("../features/app/password/passwordStore").PasswordState;
|
|
10
10
|
signIn: import("../features/app/signIn/signInStore").SignInState;
|
|
11
11
|
entity: import("../features/app/entity/entityStore").EntityState;
|
|
12
|
-
otp: import("../features/app/otp/otpStore").OtpState;
|
|
13
12
|
auth: import("../features/app/auth/authStore").AuthState;
|
|
14
13
|
}, import("redux").AnyAction, import("@reduxjs/toolkit").MiddlewareArray<[import("@reduxjs/toolkit").ThunkMiddleware<{
|
|
15
14
|
settings: import("./settings").SettingsState;
|
|
@@ -21,7 +20,6 @@ export declare const store: import("@reduxjs/toolkit").EnhancedStore<{
|
|
|
21
20
|
password: import("../features/app/password/passwordStore").PasswordState;
|
|
22
21
|
signIn: import("../features/app/signIn/signInStore").SignInState;
|
|
23
22
|
entity: import("../features/app/entity/entityStore").EntityState;
|
|
24
|
-
otp: import("../features/app/otp/otpStore").OtpState;
|
|
25
23
|
auth: import("../features/app/auth/authStore").AuthState;
|
|
26
24
|
}, import("redux").AnyAction, undefined>]>>;
|
|
27
25
|
export declare type AppDispatch = typeof store.dispatch;
|