@tap-payments/auth-jsconnect 2.0.48 → 2.0.49
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 +8 -6
- package/build/@types/form.d.ts +23 -22
- package/build/@types/theme.d.ts +1 -1
- package/build/api/account.d.ts +2 -2
- package/build/api/auth.d.ts +11 -11
- package/build/api/availabilityServices.d.ts +3 -3
- package/build/api/axios.js +1 -1
- package/build/api/board.d.ts +3 -3
- package/build/api/country.d.ts +1 -1
- package/build/api/data.d.ts +10 -10
- package/build/api/document.d.ts +25 -0
- package/build/api/document.js +38 -0
- package/build/api/entity.d.ts +10 -20
- package/build/api/entity.js +6 -5
- package/build/api/file.d.ts +2 -1
- package/build/api/file.js +14 -1
- package/build/api/index.d.ts +10 -3
- package/build/api/index.js +3 -1
- package/build/api/individual.d.ts +8 -8
- package/build/api/lead.d.ts +10 -10
- package/build/api/operator.d.ts +1 -1
- package/build/api/operator.js +1 -1
- package/build/api/user.d.ts +2 -2
- package/build/app/settings.d.ts +11 -2
- package/build/app/settings.js +1 -1
- package/build/app/store.d.ts +4 -4
- package/build/assets/locales/ar.json +3 -1
- package/build/assets/locales/en.json +3 -1
- package/build/components/Lottie/Lottie.d.ts +1 -2
- package/build/components/Lottie/Lottie.js +1 -1
- package/build/components/Lottie/index.d.ts +2 -2
- package/build/components/Lottie/index.js +2 -2
- package/build/components/Slide/Slide.d.ts +1 -1
- package/build/constants/app.d.ts +31 -0
- package/build/constants/app.js +43 -1
- package/build/features/app/bank/bankStore.d.ts +73 -10
- package/build/features/app/bank/bankStore.js +29 -15
- package/build/features/app/brand/brandStore.d.ts +104 -12
- package/build/features/app/brand/brandStore.js +65 -66
- package/build/features/app/business/businessStore.d.ts +163 -19
- package/build/features/app/business/businessStore.js +3 -3
- package/build/features/app/connect/connectStore.d.ts +121 -13
- package/build/features/app/connect/connectStore.js +1 -1
- package/build/features/app/connectExpress/connectExpressStore.d.ts +181 -19
- package/build/features/app/connectExpress/connectExpressStore.js +1 -1
- package/build/features/app/entity/entityStore.d.ts +76 -20
- package/build/features/app/entity/entityStore.js +67 -93
- package/build/features/app/individual/individualStore.d.ts +182 -20
- package/build/features/app/individual/individualStore.js +278 -135
- package/build/features/app/password/passwordStore.d.ts +102 -12
- package/build/features/app/password/passwordStore.js +1 -1
- package/build/features/app/signIn/signInStore.d.ts +61 -7
- package/build/features/app/signIn/signInStore.js +1 -1
- package/build/features/app/tax/taxStore.d.ts +62 -8
- package/build/features/app/tax/taxStore.js +25 -12
- package/build/features/bank/screens/BankDetails/BankStatement.d.ts +1 -1
- package/build/features/bank/screens/BankDetails/BankStatement.js +4 -3
- package/build/features/bank/screens/BankDetails/IBAN.js +1 -1
- package/build/features/bank/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +1 -1
- package/build/features/brand/screens/BrandActivities/ActivitiesList.d.ts +13 -13
- package/build/features/brand/screens/BrandActivities/ActivitiesList.js +6 -7
- package/build/features/brand/screens/BrandActivities/CustomerBase.d.ts +11 -11
- package/build/features/brand/screens/BrandActivities/CustomerBase.js +5 -7
- package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.js +5 -7
- package/build/features/brand/screens/BrandActivities/OperationStartDate.d.ts +2 -2
- package/build/features/brand/screens/BrandActivities/RefundPolicy.d.ts +5 -5
- package/build/features/brand/screens/BrandInfo/BrandName.js +1 -1
- package/build/features/brand/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +1 -1
- package/build/features/business/screens/Activities/ActivitiesList.d.ts +13 -13
- package/build/features/business/screens/Activities/OperationStartDate.d.ts +2 -2
- package/build/features/business/screens/BusinessType/Article.d.ts +1 -1
- package/build/features/business/screens/BusinessType/Article.js +1 -1
- package/build/features/business/screens/BusinessType/LicenseCertificate.js +2 -1
- package/build/features/business/screens/BusinessType/LicenseType.d.ts +5 -5
- package/build/features/business/screens/Customers/CustomerLocations.d.ts +11 -11
- package/build/features/business/screens/Customers/RefundPolicy.d.ts +5 -5
- package/build/features/business/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +1 -1
- package/build/features/connect/screens/Individual/Email.js +1 -1
- package/build/features/connect/screens/Merchant/BrandName.js +1 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/BrandName.js +1 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.d.ts +5 -5
- package/build/features/connectExpress/screens/CollectIndividualInfo/Email.js +1 -1
- package/build/features/entity/screens/EntityCapital/ActivityList.d.ts +13 -13
- package/build/features/entity/screens/EntityCapital/ActivityList.js +7 -7
- package/build/features/entity/screens/EntityCapital/CapitalPaid.js +3 -4
- package/build/features/entity/screens/EntityCapital/CapitalShareCount.js +3 -4
- package/build/features/entity/screens/EntityCapital/CapitalShareValue.js +3 -4
- package/build/features/entity/screens/EntityName/Article.d.ts +1 -1
- package/build/features/entity/screens/EntityName/Article.js +16 -53
- package/build/features/entity/screens/EntityName/EntityName.js +2 -3
- package/build/features/entity/screens/EntityName/EntityTypeList.d.ts +13 -13
- package/build/features/entity/screens/EntityName/EntityTypeList.js +4 -6
- package/build/features/entity/screens/EntityName/ExpiryDate.d.ts +2 -2
- package/build/features/entity/screens/EntityName/ExpiryDate.js +6 -6
- package/build/features/entity/screens/EntityName/IssuingDate.d.ts +2 -2
- package/build/features/entity/screens/EntityName/IssuingDate.js +4 -5
- package/build/features/entity/screens/EntityName/LegalName.js +2 -4
- package/build/features/entity/screens/EntityName/LicenseCertificate.js +4 -3
- package/build/features/entity/screens/EntityName/LicenseNumber.js +4 -4
- package/build/features/entity/screens/EntityName/UnifiedNumber.js +3 -4
- package/build/features/entity/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +1 -1
- package/build/features/featuresScreens.js +5 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.d.ts +2 -2
- package/build/features/individual/screens/AdditionalIndividualInfo/CivilIDFile.js +4 -3
- package/build/features/individual/screens/AdditionalIndividualInfo/InfluencerSwitch.js +2 -4
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +5 -6
- package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.js +5 -6
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.d.ts +4 -4
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.js +2 -4
- package/build/features/individual/screens/AdditionalIndividualInfo/SignatureFile.js +4 -3
- package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.js +5 -6
- package/build/features/individual/screens/IndividualList/CollectPhoneEmail.d.ts +2 -0
- package/build/features/individual/screens/IndividualList/CollectPhoneEmail.js +3 -2
- package/build/features/individual/screens/IndividualList/Email.d.ts +5 -1
- package/build/features/individual/screens/IndividualList/Email.js +73 -8
- package/build/features/individual/screens/IndividualList/IndividualList.d.ts +4 -4
- package/build/features/individual/screens/IndividualList/UserList.js +36 -19
- package/build/features/individual/screens/IndividualList/validation.js +2 -1
- package/build/features/individual/screens/IndividualPersonalInfo/Email.js +2 -3
- package/build/features/individual/screens/IndividualPersonalInfo/ExpiryDate.js +3 -4
- package/build/features/individual/screens/IndividualPersonalInfo/Gender.d.ts +5 -5
- package/build/features/individual/screens/IndividualPersonalInfo/ID.js +2 -3
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.d.ts +2 -2
- package/build/features/individual/screens/IndividualPersonalInfo/IssuedCountry.js +6 -7
- package/build/features/individual/screens/IndividualPersonalInfo/MobileNumber.js +5 -6
- package/build/features/individual/screens/IndividualPersonalInfo/Name.js +2 -3
- package/build/features/individual/screens/IndividualPersonalInfo/Nationality.js +6 -7
- package/build/features/individual/screens/IndividualPhoneInfo/MobileNumber.d.ts +12 -0
- package/build/features/individual/screens/IndividualPhoneInfo/MobileNumber.js +143 -0
- package/build/features/individual/screens/IndividualPhoneInfo/PhoneInfo.d.ts +5 -0
- package/build/features/individual/screens/IndividualPhoneInfo/PhoneInfo.js +60 -0
- package/build/features/individual/screens/IndividualPhoneInfo/index.d.ts +3 -0
- package/build/features/individual/screens/IndividualPhoneInfo/index.js +2 -0
- package/build/features/individual/screens/IndividualPhoneInfo/validation.d.ts +8 -0
- package/build/features/individual/screens/IndividualPhoneInfo/validation.js +31 -0
- package/build/features/individual/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +1 -1
- package/build/features/password/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +1 -1
- package/build/features/shared/Address/CountryList.d.ts +9 -9
- package/build/features/shared/Address/InputSelect.d.ts +9 -9
- package/build/features/shared/Address/InputSelect.js +1 -1
- package/build/features/shared/Button/Button.js +1 -1
- package/build/features/shared/Button/EmailProvidersButtons.d.ts +1 -1
- package/build/features/shared/Button/FlowsButtons.d.ts +1 -1
- package/build/features/shared/Button/FlowsButtons.js +1 -1
- package/build/features/shared/Button/{ListButton.d.ts → IndividualActionButtons.d.ts} +5 -4
- package/build/features/shared/Button/IndividualActionButtons.js +132 -0
- package/build/features/shared/Button/index.d.ts +1 -1
- package/build/features/shared/Button/index.js +1 -1
- package/build/features/shared/Containers/FeatureContainer.d.ts +1 -1
- package/build/features/shared/Containers/ScreenContainer.d.ts +1 -1
- package/build/features/shared/Input/Input.d.ts +3 -3
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +11 -1
- package/build/features/shared/UploadFile/FileUpload.d.ts +29 -0
- package/build/features/shared/UploadFile/FileUpload.js +263 -0
- package/build/features/shared/UploadFile/UploadFile.d.ts +2 -2
- package/build/features/shared/UploadFile/UploadWrapper.d.ts +33 -0
- package/build/features/shared/UploadFile/UploadWrapper.js +114 -0
- package/build/features/shared/UploadFile/index.d.ts +2 -1
- package/build/features/shared/UploadFile/index.js +2 -1
- package/build/features/shared/UploadMultipleFile/UploadFile.d.ts +9 -20
- package/build/features/shared/UploadMultipleFile/UploadFile.js +109 -24
- package/build/features/shared/UploadMultipleFile/UploadMultipleFile.d.ts +6 -4
- package/build/features/shared/UploadMultipleFile/UploadMultipleFile.js +26 -19
- package/build/features/tax/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +1 -1
- package/build/features/tax/screens/TaxDetails/TaxDocument.js +4 -3
- package/build/features/tax/screens/TaxDetails/VATId.js +3 -4
- package/build/index.d.ts +2 -2
- package/build/index.js +4 -3
- package/build/utils/array.d.ts +3 -1
- package/build/utils/array.js +35 -6
- package/package.json +1 -1
- package/build/features/shared/Button/ListButton.js +0 -125
|
@@ -24,7 +24,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
24
24
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
25
25
|
function step(op) {
|
|
26
26
|
if (f) throw new TypeError("Generator is already executing.");
|
|
27
|
-
while (_) try {
|
|
27
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
28
28
|
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;
|
|
29
29
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
30
30
|
switch (op[0]) {
|
|
@@ -59,11 +59,11 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
59
59
|
var _a;
|
|
60
60
|
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
61
61
|
import API from '../../../api';
|
|
62
|
-
import { BusinessType, DocumentPurpose,
|
|
62
|
+
import { BusinessType, DocumentPurpose, FlowsTypes } from '../../../@types';
|
|
63
63
|
import { handleNextScreenStep, handleSetCountryByIso2 } from '../../../app/settings';
|
|
64
64
|
import { ENTITY_STEP_NAMES } from '../../../constants';
|
|
65
65
|
import moment from 'moment';
|
|
66
|
-
import { convertNumbers2English } from '../../../utils';
|
|
66
|
+
import { convertNumbers2English, getRecentDocumentBasedOnPurpose } from '../../../utils';
|
|
67
67
|
export var verifyLeadToken = createAsyncThunk('entityVerifyLeadToken', function (_a, thunkApi) {
|
|
68
68
|
var token = _a.token, isInternally = _a.isInternally;
|
|
69
69
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -132,6 +132,7 @@ export var verifyLeadToken = createAsyncThunk('entityVerifyLeadToken', function
|
|
|
132
132
|
name: (_d = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _d === void 0 ? void 0 : _d.names,
|
|
133
133
|
contact: (_e = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _e === void 0 ? void 0 : _e.contact,
|
|
134
134
|
individuals: boardData === null || boardData === void 0 ? void 0 : boardData.individuals,
|
|
135
|
+
business: boardData === null || boardData === void 0 ? void 0 : boardData.business,
|
|
135
136
|
flows: (boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info) || [],
|
|
136
137
|
entityTypes: entityTypes
|
|
137
138
|
},
|
|
@@ -217,6 +218,7 @@ export var verifyEntityLeadOTP = createAsyncThunk('verifyEntityLeadOTP', functio
|
|
|
217
218
|
name: (_g = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _g === void 0 ? void 0 : _g.names,
|
|
218
219
|
contact: (_h = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _h === void 0 ? void 0 : _h.contact,
|
|
219
220
|
individuals: boardData === null || boardData === void 0 ? void 0 : boardData.individuals,
|
|
221
|
+
business: boardData === null || boardData === void 0 ? void 0 : boardData.business,
|
|
220
222
|
flows: (boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info) || [],
|
|
221
223
|
entityTypes: entityTypes
|
|
222
224
|
},
|
|
@@ -240,28 +242,53 @@ export var retrieveBoardDetails = createAsyncThunk('entityRetrieveEntityInfo', f
|
|
|
240
242
|
});
|
|
241
243
|
}); });
|
|
242
244
|
export var updateEntityName = createAsyncThunk('entityUpdateEntityName', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
243
|
-
var _a, settings, entity, entityData, _b, id, data_status,
|
|
244
|
-
var
|
|
245
|
-
return __generator(this, function (
|
|
246
|
-
switch (
|
|
245
|
+
var _a, settings, entity, entityData, _b, id, data_status, issuingDate, expiryDate, isFL, isLegalNameEditable, isLicenseTypeEditable, isEntityTypeEditable, isLicenseNumberEditable, isUnifiedNumberEditable, isIssuingDateEditable, isExpiryDateEditable, documentResponse, document, documentBody, documentBody, payload, data, list;
|
|
246
|
+
var _c, _d;
|
|
247
|
+
return __generator(this, function (_e) {
|
|
248
|
+
switch (_e.label) {
|
|
247
249
|
case 0:
|
|
248
250
|
_a = thunkApi.getState(), settings = _a.settings, entity = _a.entity;
|
|
249
251
|
entityData = (entity.data.verify.responseBody || {}).entity;
|
|
250
252
|
_b = entityData || {}, id = _b.id, data_status = _b.data_status;
|
|
251
|
-
articleId = entity.data.entityNameData.articleId;
|
|
252
253
|
issuingDate = new Date(params.issuingDate).getTime();
|
|
253
254
|
expiryDate = new Date(params.expiryDate).getTime();
|
|
254
255
|
isFL = params.licenseType === BusinessType.FL;
|
|
255
|
-
isLegalNameEditable =
|
|
256
|
-
isLicenseTypeEditable =
|
|
257
|
-
isEntityTypeEditable =
|
|
258
|
-
isLicenseNumberEditable =
|
|
259
|
-
isUnifiedNumberEditable =
|
|
260
|
-
isIssuingDateEditable =
|
|
261
|
-
isExpiryDateEditable =
|
|
256
|
+
isLegalNameEditable = true;
|
|
257
|
+
isLicenseTypeEditable = true;
|
|
258
|
+
isEntityTypeEditable = true;
|
|
259
|
+
isLicenseNumberEditable = true;
|
|
260
|
+
isUnifiedNumberEditable = true;
|
|
261
|
+
isIssuingDateEditable = true;
|
|
262
|
+
isExpiryDateEditable = true;
|
|
263
|
+
documentResponse = undefined;
|
|
264
|
+
document = getRecentDocumentBasedOnPurpose(entityData === null || entityData === void 0 ? void 0 : entityData.documents, DocumentPurpose.CR);
|
|
265
|
+
if (!((params.certificateId || []).length > 0)) return [3, 4];
|
|
266
|
+
if (!(document === null || document === void 0 ? void 0 : document.id)) return [3, 2];
|
|
267
|
+
documentBody = {
|
|
268
|
+
id: document.id,
|
|
269
|
+
images: params.certificateId
|
|
270
|
+
};
|
|
271
|
+
return [4, API.documentService.addFilesToExistingDocument(documentBody)];
|
|
272
|
+
case 1:
|
|
273
|
+
documentResponse = _e.sent();
|
|
274
|
+
return [3, 4];
|
|
275
|
+
case 2:
|
|
276
|
+
documentBody = {
|
|
277
|
+
entity_id: id || '',
|
|
278
|
+
documents: [
|
|
279
|
+
{
|
|
280
|
+
images: params.certificateId
|
|
281
|
+
}
|
|
282
|
+
]
|
|
283
|
+
};
|
|
284
|
+
return [4, API.documentService.updateDocumentInfo(documentBody)];
|
|
285
|
+
case 3:
|
|
286
|
+
documentResponse = _e.sent();
|
|
287
|
+
_e.label = 4;
|
|
288
|
+
case 4:
|
|
262
289
|
payload = {
|
|
263
290
|
id: id,
|
|
264
|
-
AOA_file_id: articleId,
|
|
291
|
+
AOA_file_id: params.articleId,
|
|
265
292
|
license: {
|
|
266
293
|
number: isLicenseNumberEditable && params.licenseNumber ? params.licenseNumber : undefined,
|
|
267
294
|
type: isLicenseTypeEditable ? (isFL ? 'freelance' : 'commercial_registration') : undefined,
|
|
@@ -292,73 +319,31 @@ export var updateEntityName = createAsyncThunk('entityUpdateEntityName', functio
|
|
|
292
319
|
]
|
|
293
320
|
};
|
|
294
321
|
return [4, API.entityService.updateEntity(payload)];
|
|
295
|
-
case
|
|
296
|
-
data =
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
{
|
|
302
|
-
images: params.certificateId
|
|
303
|
-
}
|
|
304
|
-
]
|
|
305
|
-
};
|
|
306
|
-
_c = data;
|
|
307
|
-
return [4, API.entityService.updateDocumentInfo(documentBody)];
|
|
308
|
-
case 2:
|
|
309
|
-
_c.documentData = _l.sent();
|
|
310
|
-
_l.label = 3;
|
|
311
|
-
case 3: return [4, API.dataService.getActivities()];
|
|
312
|
-
case 4:
|
|
313
|
-
list = (_l.sent()).list;
|
|
322
|
+
case 5:
|
|
323
|
+
data = _e.sent();
|
|
324
|
+
data.documentData = documentResponse;
|
|
325
|
+
return [4, API.dataService.getActivities()];
|
|
326
|
+
case 6:
|
|
327
|
+
list = (_e.sent()).list;
|
|
314
328
|
data.activityList = list;
|
|
315
329
|
thunkApi.dispatch(handleNextScreenStep());
|
|
316
|
-
(
|
|
330
|
+
(_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, id);
|
|
317
331
|
return [2, { data: data, formData: params }];
|
|
318
332
|
}
|
|
319
333
|
});
|
|
320
334
|
}); });
|
|
321
|
-
export var uploadArticle = createAsyncThunk('entityUploadArticle', function (_a) {
|
|
322
|
-
var file = _a.file, onProgress = _a.onProgress;
|
|
323
|
-
return __awaiter(void 0, void 0, void 0, function () {
|
|
324
|
-
var typeArray, type, uploadPayload, onUploadProgress, data;
|
|
325
|
-
var _b;
|
|
326
|
-
return __generator(this, function (_c) {
|
|
327
|
-
switch (_c.label) {
|
|
328
|
-
case 0:
|
|
329
|
-
typeArray = ((_b = file === null || file === void 0 ? void 0 : file.type) === null || _b === void 0 ? void 0 : _b.split('/')) || [];
|
|
330
|
-
type = typeArray[1] || '';
|
|
331
|
-
uploadPayload = {
|
|
332
|
-
file_link_create: true,
|
|
333
|
-
title: file === null || file === void 0 ? void 0 : file.name,
|
|
334
|
-
purpose: DocumentPurpose.ARTICLE_ASSOCIATION,
|
|
335
|
-
type: type,
|
|
336
|
-
file: file
|
|
337
|
-
};
|
|
338
|
-
onUploadProgress = function (progressEvent) {
|
|
339
|
-
var progress = ((progressEvent === null || progressEvent === void 0 ? void 0 : progressEvent.loaded) / (progressEvent === null || progressEvent === void 0 ? void 0 : progressEvent.total)) * 100;
|
|
340
|
-
onProgress === null || onProgress === void 0 ? void 0 : onProgress(Math.floor(progress));
|
|
341
|
-
};
|
|
342
|
-
return [4, API.fileService.uploadFileInfo(uploadPayload, { onUploadProgress: onUploadProgress })];
|
|
343
|
-
case 1:
|
|
344
|
-
data = _c.sent();
|
|
345
|
-
return [2, { data: data }];
|
|
346
|
-
}
|
|
347
|
-
});
|
|
348
|
-
});
|
|
349
|
-
});
|
|
350
335
|
export var updateEntityCapital = createAsyncThunk('entityUpdateEntityCapital', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
351
336
|
var _a, settings, entity, entityData, _b, id, data_status, isCapitalPaidEditable, isCapitalShareEditable, activities, payload, data;
|
|
352
|
-
var _c, _d, _e
|
|
353
|
-
return __generator(this, function (
|
|
354
|
-
switch (
|
|
337
|
+
var _c, _d, _e;
|
|
338
|
+
return __generator(this, function (_f) {
|
|
339
|
+
switch (_f.label) {
|
|
355
340
|
case 0:
|
|
356
341
|
_a = thunkApi.getState(), settings = _a.settings, entity = _a.entity;
|
|
357
342
|
entityData = (entity.data.verify.responseBody || {}).entity;
|
|
358
343
|
_b = entityData || {}, id = _b.id, data_status = _b.data_status;
|
|
359
|
-
isCapitalPaidEditable =
|
|
360
|
-
isCapitalShareEditable =
|
|
361
|
-
activities = (
|
|
344
|
+
isCapitalPaidEditable = true;
|
|
345
|
+
isCapitalShareEditable = true;
|
|
346
|
+
activities = (_c = (params.activities || [])) === null || _c === void 0 ? void 0 : _c.map(function (_a) {
|
|
362
347
|
var id = _a.id;
|
|
363
348
|
return ({ id: id, action: 'add' });
|
|
364
349
|
});
|
|
@@ -377,9 +362,9 @@ export var updateEntityCapital = createAsyncThunk('entityUpdateEntityCapital', f
|
|
|
377
362
|
};
|
|
378
363
|
return [4, API.entityService.updateEntity(payload)];
|
|
379
364
|
case 1:
|
|
380
|
-
data =
|
|
365
|
+
data = _f.sent();
|
|
381
366
|
thunkApi.dispatch(handleNextScreenStep());
|
|
382
|
-
(
|
|
367
|
+
(_e = (_d = settings.data.appConfig).onStepCompleted) === null || _e === void 0 ? void 0 : _e.call(_d, settings.data.activeScreen.name, id);
|
|
383
368
|
return [2, { data: data, formData: params }];
|
|
384
369
|
}
|
|
385
370
|
});
|
|
@@ -421,7 +406,6 @@ var initialState = {
|
|
|
421
406
|
customLoading: false,
|
|
422
407
|
uploading: false,
|
|
423
408
|
uploadingArticle: false,
|
|
424
|
-
uploadingArticleError: null,
|
|
425
409
|
data: {
|
|
426
410
|
flowName: FlowsTypes.ENTITY,
|
|
427
411
|
verify: {
|
|
@@ -463,8 +447,12 @@ export var entitySlice = createSlice({
|
|
|
463
447
|
uploadingStatus: function (state, action) {
|
|
464
448
|
state.uploading = action.payload;
|
|
465
449
|
},
|
|
466
|
-
|
|
467
|
-
state.
|
|
450
|
+
uploadingArticleStatus: function (state, action) {
|
|
451
|
+
state.uploadingArticle = action.payload;
|
|
452
|
+
},
|
|
453
|
+
clearAOAFile: function (state) {
|
|
454
|
+
var entity = (state.data.verify.responseBody || {}).entity;
|
|
455
|
+
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { entity: __assign(__assign({}, entity), { AOA_file: undefined, AOA_file_id: undefined }) });
|
|
468
456
|
}
|
|
469
457
|
},
|
|
470
458
|
extraReducers: function (builder) {
|
|
@@ -622,29 +610,15 @@ export var entitySlice = createSlice({
|
|
|
622
610
|
state.error = null;
|
|
623
611
|
var _a = action.payload, data = _a.data, formData = _a.formData;
|
|
624
612
|
var _b = data || {}, activityList = _b.activityList, rest = __rest(_b, ["activityList"]);
|
|
625
|
-
state.data.entityNameData = formData;
|
|
613
|
+
state.data.entityNameData = __assign(__assign({}, formData), { certificateId: undefined });
|
|
626
614
|
state.data.entityNameData.responseBody = __assign(__assign({}, state.data.entityNameData.responseBody), { rest: rest });
|
|
627
|
-
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { activityList: activityList });
|
|
615
|
+
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { entity: data === null || data === void 0 ? void 0 : data.entity, activityList: activityList });
|
|
628
616
|
if (rest === null || rest === void 0 ? void 0 : rest.activities)
|
|
629
617
|
state.data.entityCapitalData = __assign(__assign({}, state.data.entityCapitalData), { activities: rest === null || rest === void 0 ? void 0 : rest.activities });
|
|
630
618
|
})
|
|
631
619
|
.addCase(updateEntityName.rejected, function (state, action) {
|
|
632
620
|
state.loading = false;
|
|
633
621
|
state.error = action.error.message;
|
|
634
|
-
})
|
|
635
|
-
.addCase(uploadArticle.pending, function (state) {
|
|
636
|
-
state.uploadingArticleError = null;
|
|
637
|
-
state.uploadingArticle = true;
|
|
638
|
-
})
|
|
639
|
-
.addCase(uploadArticle.fulfilled, function (state, action) {
|
|
640
|
-
state.uploadingArticleError = null;
|
|
641
|
-
state.uploadingArticle = false;
|
|
642
|
-
var data = action.payload.data;
|
|
643
|
-
state.data.entityNameData.articleId = data === null || data === void 0 ? void 0 : data.id;
|
|
644
|
-
})
|
|
645
|
-
.addCase(uploadArticle.rejected, function (state) {
|
|
646
|
-
state.uploadingArticle = false;
|
|
647
|
-
state.uploadingArticleError = 'file_upload_article_error';
|
|
648
622
|
})
|
|
649
623
|
.addCase(updateEntityCapital.pending, function (state) {
|
|
650
624
|
state.loading = true;
|
|
@@ -698,6 +672,6 @@ export var entitySlice = createSlice({
|
|
|
698
672
|
});
|
|
699
673
|
}
|
|
700
674
|
});
|
|
701
|
-
export var clearError = (_a = entitySlice.actions, _a.clearError), stopLoader = _a.stopLoader, resetOTPScreen = _a.resetOTPScreen, uploadingStatus = _a.uploadingStatus,
|
|
675
|
+
export var clearError = (_a = entitySlice.actions, _a.clearError), stopLoader = _a.stopLoader, resetOTPScreen = _a.resetOTPScreen, uploadingStatus = _a.uploadingStatus, uploadingArticleStatus = _a.uploadingArticleStatus, clearAOAFile = _a.clearAOAFile;
|
|
702
676
|
export default entitySlice.reducer;
|
|
703
677
|
export var entitySelector = function (state) { return state.entity; };
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { RootState } from '../../../app/store';
|
|
2
|
-
import { CountryCode, FlowsTypes, IndividualExtraFormValues, OTPFormValues, ResponseData, SharedState, ActionState, User, IndividualPersonalInfoFormValues, IndividualEmailMobileFormValues } from '../../../@types';
|
|
2
|
+
import { CountryCode, FlowsTypes, IndividualExtraFormValues, OTPFormValues, ResponseData, SharedState, ActionState, User, IndividualPersonalInfoFormValues, IndividualEmailMobileFormValues, IndividualMobileFormValues } from '../../../@types';
|
|
3
|
+
import { CancelToken } from 'axios';
|
|
3
4
|
interface VerifyLeadTokenProps {
|
|
4
5
|
token: string;
|
|
5
6
|
isInternally?: boolean;
|
|
7
|
+
isUpdatePhoneInfo?: boolean;
|
|
6
8
|
}
|
|
7
|
-
export declare const
|
|
9
|
+
export declare const verifyToken: import("@reduxjs/toolkit").AsyncThunk<{
|
|
8
10
|
data: any;
|
|
9
11
|
boardResponse: {
|
|
10
12
|
brand: any;
|
|
@@ -18,31 +20,96 @@ export declare const verifyLeadToken: import("@reduxjs/toolkit").AsyncThunk<{
|
|
|
18
20
|
countries: CountryCode[];
|
|
19
21
|
countryCode: any;
|
|
20
22
|
notification: any;
|
|
23
|
+
business: any;
|
|
21
24
|
flows: any;
|
|
22
25
|
};
|
|
23
26
|
token: string;
|
|
24
|
-
}, VerifyLeadTokenProps, {
|
|
27
|
+
}, VerifyLeadTokenProps, {
|
|
28
|
+
state?: unknown;
|
|
29
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
30
|
+
extra?: unknown;
|
|
31
|
+
rejectValue?: unknown;
|
|
32
|
+
serializedErrorType?: unknown;
|
|
33
|
+
pendingMeta?: unknown;
|
|
34
|
+
fulfilledMeta?: unknown;
|
|
35
|
+
rejectedMeta?: unknown;
|
|
36
|
+
}>;
|
|
37
|
+
export declare const verifyLeadToken: import("@reduxjs/toolkit").AsyncThunk<void, VerifyLeadTokenProps, {
|
|
38
|
+
state?: unknown;
|
|
39
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
40
|
+
extra?: unknown;
|
|
41
|
+
rejectValue?: unknown;
|
|
42
|
+
serializedErrorType?: unknown;
|
|
43
|
+
pendingMeta?: unknown;
|
|
44
|
+
fulfilledMeta?: unknown;
|
|
45
|
+
rejectedMeta?: unknown;
|
|
46
|
+
}>;
|
|
25
47
|
export declare const resendOTP: import("@reduxjs/toolkit").AsyncThunk<{
|
|
26
48
|
data: any;
|
|
27
|
-
}, void, {
|
|
28
|
-
|
|
49
|
+
}, void, {
|
|
50
|
+
state?: unknown;
|
|
51
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
52
|
+
extra?: unknown;
|
|
53
|
+
rejectValue?: unknown;
|
|
54
|
+
serializedErrorType?: unknown;
|
|
55
|
+
pendingMeta?: unknown;
|
|
56
|
+
fulfilledMeta?: unknown;
|
|
57
|
+
rejectedMeta?: unknown;
|
|
58
|
+
}>;
|
|
59
|
+
type AddDetailsParams = {
|
|
29
60
|
user: User;
|
|
30
61
|
userList: User[];
|
|
31
62
|
};
|
|
32
63
|
export declare const addDetailsAsync: import("@reduxjs/toolkit").AsyncThunk<{
|
|
33
64
|
userList: User[];
|
|
34
|
-
}, AddDetailsParams, {
|
|
35
|
-
|
|
65
|
+
}, AddDetailsParams, {
|
|
66
|
+
state?: unknown;
|
|
67
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
68
|
+
extra?: unknown;
|
|
69
|
+
rejectValue?: unknown;
|
|
70
|
+
serializedErrorType?: unknown;
|
|
71
|
+
pendingMeta?: unknown;
|
|
72
|
+
fulfilledMeta?: unknown;
|
|
73
|
+
rejectedMeta?: unknown;
|
|
74
|
+
}>;
|
|
75
|
+
type RequestEmail = {
|
|
36
76
|
user: User;
|
|
37
77
|
collectInfo: IndividualEmailMobileFormValues;
|
|
38
78
|
};
|
|
39
79
|
export declare const requestDetailsByEmail: import("@reduxjs/toolkit").AsyncThunk<{
|
|
40
80
|
data: any;
|
|
41
81
|
userData: any;
|
|
42
|
-
}, RequestEmail, {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
82
|
+
}, RequestEmail, {
|
|
83
|
+
state?: unknown;
|
|
84
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
85
|
+
extra?: unknown;
|
|
86
|
+
rejectValue?: unknown;
|
|
87
|
+
serializedErrorType?: unknown;
|
|
88
|
+
pendingMeta?: unknown;
|
|
89
|
+
fulfilledMeta?: unknown;
|
|
90
|
+
rejectedMeta?: unknown;
|
|
91
|
+
}>;
|
|
92
|
+
export declare const getIndividualList: import("@reduxjs/toolkit").AsyncThunk<any[], string, {
|
|
93
|
+
state?: unknown;
|
|
94
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
95
|
+
extra?: unknown;
|
|
96
|
+
rejectValue?: unknown;
|
|
97
|
+
serializedErrorType?: unknown;
|
|
98
|
+
pendingMeta?: unknown;
|
|
99
|
+
fulfilledMeta?: unknown;
|
|
100
|
+
rejectedMeta?: unknown;
|
|
101
|
+
}>;
|
|
102
|
+
export declare const getCityList: import("@reduxjs/toolkit").AsyncThunk<any, string, {
|
|
103
|
+
state?: unknown;
|
|
104
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
105
|
+
extra?: unknown;
|
|
106
|
+
rejectValue?: unknown;
|
|
107
|
+
serializedErrorType?: unknown;
|
|
108
|
+
pendingMeta?: unknown;
|
|
109
|
+
fulfilledMeta?: unknown;
|
|
110
|
+
rejectedMeta?: unknown;
|
|
111
|
+
}>;
|
|
112
|
+
type RetrieveIndividualInfoParams = {
|
|
46
113
|
id: string;
|
|
47
114
|
type: string;
|
|
48
115
|
countryCode?: string;
|
|
@@ -51,15 +118,42 @@ export declare const retrieveIndividualInfo: import("@reduxjs/toolkit").AsyncThu
|
|
|
51
118
|
data: any;
|
|
52
119
|
countryCode: string | undefined;
|
|
53
120
|
countries: CountryCode[];
|
|
54
|
-
}, RetrieveIndividualInfoParams, {
|
|
121
|
+
}, RetrieveIndividualInfoParams, {
|
|
122
|
+
state?: unknown;
|
|
123
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
124
|
+
extra?: unknown;
|
|
125
|
+
rejectValue?: unknown;
|
|
126
|
+
serializedErrorType?: unknown;
|
|
127
|
+
pendingMeta?: unknown;
|
|
128
|
+
fulfilledMeta?: unknown;
|
|
129
|
+
rejectedMeta?: unknown;
|
|
130
|
+
}>;
|
|
55
131
|
export declare const retrieveDataList: import("@reduxjs/toolkit").AsyncThunk<{
|
|
56
132
|
sourceIncome: any;
|
|
57
133
|
monthlyIncome: any;
|
|
58
134
|
occupation: any;
|
|
59
|
-
}, string, {
|
|
135
|
+
}, string, {
|
|
136
|
+
state?: unknown;
|
|
137
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
138
|
+
extra?: unknown;
|
|
139
|
+
rejectValue?: unknown;
|
|
140
|
+
serializedErrorType?: unknown;
|
|
141
|
+
pendingMeta?: unknown;
|
|
142
|
+
fulfilledMeta?: unknown;
|
|
143
|
+
rejectedMeta?: unknown;
|
|
144
|
+
}>;
|
|
60
145
|
export declare const retrieveBoardDetails: import("@reduxjs/toolkit").AsyncThunk<{
|
|
61
146
|
data: any;
|
|
62
|
-
}, string, {
|
|
147
|
+
}, string, {
|
|
148
|
+
state?: unknown;
|
|
149
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
150
|
+
extra?: unknown;
|
|
151
|
+
rejectValue?: unknown;
|
|
152
|
+
serializedErrorType?: unknown;
|
|
153
|
+
pendingMeta?: unknown;
|
|
154
|
+
fulfilledMeta?: unknown;
|
|
155
|
+
rejectedMeta?: unknown;
|
|
156
|
+
}>;
|
|
63
157
|
export declare const verifyLeadOTP: import("@reduxjs/toolkit").AsyncThunk<{
|
|
64
158
|
data: any;
|
|
65
159
|
boardResponse: {
|
|
@@ -74,30 +168,98 @@ export declare const verifyLeadOTP: import("@reduxjs/toolkit").AsyncThunk<{
|
|
|
74
168
|
countries: CountryCode[];
|
|
75
169
|
countryCode: any;
|
|
76
170
|
notification: any;
|
|
171
|
+
business: any;
|
|
77
172
|
flows: any;
|
|
78
173
|
};
|
|
79
174
|
formData: {
|
|
80
175
|
otp: string;
|
|
81
176
|
};
|
|
82
|
-
}, OTPFormValues, {
|
|
177
|
+
}, OTPFormValues, {
|
|
178
|
+
state?: unknown;
|
|
179
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
180
|
+
extra?: unknown;
|
|
181
|
+
rejectValue?: unknown;
|
|
182
|
+
serializedErrorType?: unknown;
|
|
183
|
+
pendingMeta?: unknown;
|
|
184
|
+
fulfilledMeta?: unknown;
|
|
185
|
+
rejectedMeta?: unknown;
|
|
186
|
+
}>;
|
|
187
|
+
export declare const updatePhoneInfo: import("@reduxjs/toolkit").AsyncThunk<{
|
|
188
|
+
data: any;
|
|
189
|
+
formData: IndividualMobileFormValues;
|
|
190
|
+
}, IndividualMobileFormValues, {
|
|
191
|
+
state?: unknown;
|
|
192
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
193
|
+
extra?: unknown;
|
|
194
|
+
rejectValue?: unknown;
|
|
195
|
+
serializedErrorType?: unknown;
|
|
196
|
+
pendingMeta?: unknown;
|
|
197
|
+
fulfilledMeta?: unknown;
|
|
198
|
+
rejectedMeta?: unknown;
|
|
199
|
+
}>;
|
|
83
200
|
export declare const updateIndividualPersonalInfo: import("@reduxjs/toolkit").AsyncThunk<{
|
|
84
201
|
data: any;
|
|
85
202
|
formData: IndividualPersonalInfoFormValues;
|
|
86
|
-
}, IndividualPersonalInfoFormValues, {
|
|
203
|
+
}, IndividualPersonalInfoFormValues, {
|
|
204
|
+
state?: unknown;
|
|
205
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
206
|
+
extra?: unknown;
|
|
207
|
+
rejectValue?: unknown;
|
|
208
|
+
serializedErrorType?: unknown;
|
|
209
|
+
pendingMeta?: unknown;
|
|
210
|
+
fulfilledMeta?: unknown;
|
|
211
|
+
rejectedMeta?: unknown;
|
|
212
|
+
}>;
|
|
87
213
|
export declare const updateIndividualInfo: import("@reduxjs/toolkit").AsyncThunk<{
|
|
88
214
|
data: any;
|
|
89
215
|
formData: IndividualExtraFormValues;
|
|
90
|
-
}, IndividualExtraFormValues, {
|
|
216
|
+
}, IndividualExtraFormValues, {
|
|
217
|
+
state?: unknown;
|
|
218
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
219
|
+
extra?: unknown;
|
|
220
|
+
rejectValue?: unknown;
|
|
221
|
+
serializedErrorType?: unknown;
|
|
222
|
+
pendingMeta?: unknown;
|
|
223
|
+
fulfilledMeta?: unknown;
|
|
224
|
+
rejectedMeta?: unknown;
|
|
225
|
+
}>;
|
|
226
|
+
export declare const checkEmailAvailability: import("@reduxjs/toolkit").AsyncThunk<{
|
|
227
|
+
response: any;
|
|
228
|
+
formData: string;
|
|
229
|
+
} | undefined, {
|
|
230
|
+
email: string;
|
|
231
|
+
cancelToken: CancelToken;
|
|
232
|
+
onSuccess?: (() => void) | undefined;
|
|
233
|
+
}, {
|
|
234
|
+
state?: unknown;
|
|
235
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
236
|
+
extra?: unknown;
|
|
237
|
+
rejectValue?: unknown;
|
|
238
|
+
serializedErrorType?: unknown;
|
|
239
|
+
pendingMeta?: unknown;
|
|
240
|
+
fulfilledMeta?: unknown;
|
|
241
|
+
rejectedMeta?: unknown;
|
|
242
|
+
}>;
|
|
91
243
|
export declare const updateBoardSuccess: import("@reduxjs/toolkit").AsyncThunk<{
|
|
92
244
|
response: any;
|
|
93
245
|
formData: void;
|
|
94
|
-
} | undefined, void, {
|
|
95
|
-
|
|
246
|
+
} | undefined, void, {
|
|
247
|
+
state?: unknown;
|
|
248
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
249
|
+
extra?: unknown;
|
|
250
|
+
rejectValue?: unknown;
|
|
251
|
+
serializedErrorType?: unknown;
|
|
252
|
+
pendingMeta?: unknown;
|
|
253
|
+
fulfilledMeta?: unknown;
|
|
254
|
+
rejectedMeta?: unknown;
|
|
255
|
+
}>;
|
|
256
|
+
type VerifyData = {
|
|
96
257
|
token: string;
|
|
97
258
|
};
|
|
98
259
|
export interface IndividualData {
|
|
99
260
|
verify: ResponseData & VerifyData;
|
|
100
261
|
otpData: OTPFormValues & ResponseData;
|
|
262
|
+
individualPhoneInfo: IndividualMobileFormValues & ResponseData;
|
|
101
263
|
individualCollectData: IndividualEmailMobileFormValues & ResponseData;
|
|
102
264
|
individualPersonalData: IndividualPersonalInfoFormValues & ResponseData;
|
|
103
265
|
individualData: IndividualExtraFormValues & ResponseData;
|
|
@@ -115,7 +277,7 @@ export declare const individualSlice: import("@reduxjs/toolkit").Slice<Individua
|
|
|
115
277
|
civilIDUploadingStatus: (state: IndividualState, action: ActionState<boolean>) => void;
|
|
116
278
|
signatureFileUploadingStatus: (state: IndividualState, action: ActionState<boolean>) => void;
|
|
117
279
|
}, "individual/store">;
|
|
118
|
-
export declare const clearError: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<
|
|
280
|
+
export declare const clearError: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"individual/store/clearError">, stopLoader: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"individual/store/stopLoader">, resetOTPScreen: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"individual/store/resetOTPScreen">, civilIDUploadingStatus: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "individual/store/civilIDUploadingStatus">, signatureFileUploadingStatus: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "individual/store/signatureFileUploadingStatus">, resetIndividualData: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"individual/store/resetIndividualData">;
|
|
119
281
|
declare const _default: import("redux").Reducer<IndividualState, import("redux").AnyAction>;
|
|
120
282
|
export default _default;
|
|
121
283
|
export declare const individualSelector: (state: RootState) => IndividualState;
|