@tap-payments/auth-jsconnect 2.4.9 → 2.4.10
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/api/lead.d.ts +3 -0
- package/build/features/app/bank/bankStore.js +5 -4
- package/build/features/app/brand/brandStore.js +5 -4
- package/build/features/app/business/businessStore.js +37 -28
- package/build/features/app/entity/entityStore.js +5 -4
- package/build/features/app/individual/individualStore.js +5 -4
- package/build/features/app/tax/taxStore.js +5 -4
- package/package.json +1 -1
package/build/api/lead.d.ts
CHANGED
|
@@ -60,10 +60,11 @@ export var verifyLeadToken = createAsyncThunk('bankVerifyLeadToken', function (_
|
|
|
60
60
|
return __generator(this, function (_k) {
|
|
61
61
|
switch (_k.label) {
|
|
62
62
|
case 0:
|
|
63
|
-
payload = {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
63
|
+
payload = __assign({ service_name: 'tap_email', verify_token: token }, (isInternally && {
|
|
64
|
+
notification: {
|
|
65
|
+
sms: false
|
|
66
|
+
}
|
|
67
|
+
}));
|
|
67
68
|
return [4, API.leadService.verifyLeadToken(payload)];
|
|
68
69
|
case 1:
|
|
69
70
|
data = (_k.sent()).data;
|
|
@@ -71,10 +71,11 @@ export var verifyLeadToken = createAsyncThunk('brandVerifyLeadToken', function (
|
|
|
71
71
|
return __generator(this, function (_j) {
|
|
72
72
|
switch (_j.label) {
|
|
73
73
|
case 0:
|
|
74
|
-
payload = {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
74
|
+
payload = __assign({ service_name: 'tap_email', verify_token: token }, (isInternally && {
|
|
75
|
+
notification: {
|
|
76
|
+
sms: false
|
|
77
|
+
}
|
|
78
|
+
}));
|
|
78
79
|
return [4, API.leadService.verifyLeadToken(payload)];
|
|
79
80
|
case 1:
|
|
80
81
|
data = (_j.sent()).data;
|
|
@@ -501,10 +501,10 @@ export var retrieveBoardDetails = createAsyncThunk('retrieveBoardDetails', funct
|
|
|
501
501
|
});
|
|
502
502
|
}); });
|
|
503
503
|
export var updateLeadBusinessType = createAsyncThunk('updateLeadBusinessType', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
504
|
-
var _a, settings, business, isKWCountry, selectedLicense, licenseNumber, entityLegalName, certificateId, articleId, selectedEntityLicense, isFL, _b, lead_id, brand, stepName, payload, data, accountBody, accountData, brandData, brandRes, _c, message, error, list, documentData, entityData, entityId, documentBody, payload_1;
|
|
505
|
-
var _d, _e;
|
|
506
|
-
return __generator(this, function (
|
|
507
|
-
switch (
|
|
504
|
+
var _a, settings, business, isKWCountry, selectedLicense, licenseNumber, entityLegalName, certificateId, articleId, selectedEntityLicense, isFL, _b, lead_id, brand, stepName, payload, data, accountBody, accountData, brandData, data_1, brandRes, _c, message, error, list, documentData, entityData, entityId, documentBody, payload_1;
|
|
505
|
+
var _d, _e, _f;
|
|
506
|
+
return __generator(this, function (_g) {
|
|
507
|
+
switch (_g.label) {
|
|
508
508
|
case 0:
|
|
509
509
|
_a = thunkApi.getState(), settings = _a.settings, business = _a.business;
|
|
510
510
|
isKWCountry = isKW(settings.data.businessCountry.iso2);
|
|
@@ -523,7 +523,7 @@ export var updateLeadBusinessType = createAsyncThunk('updateLeadBusinessType', f
|
|
|
523
523
|
})), { encryption_contract: ['license_number', 'business_type', 'license_type'] });
|
|
524
524
|
return [4, API.leadService.updateLead(payload)];
|
|
525
525
|
case 1:
|
|
526
|
-
data =
|
|
526
|
+
data = _g.sent();
|
|
527
527
|
accountBody = {
|
|
528
528
|
lead_id: lead_id,
|
|
529
529
|
notify: {
|
|
@@ -535,20 +535,29 @@ export var updateLeadBusinessType = createAsyncThunk('updateLeadBusinessType', f
|
|
|
535
535
|
step_name: BUSINESS_STEP_NAMES.BUSINESS_INFO_CONFIRM
|
|
536
536
|
};
|
|
537
537
|
brandData = undefined;
|
|
538
|
-
|
|
538
|
+
_g.label = 2;
|
|
539
539
|
case 2:
|
|
540
|
-
|
|
540
|
+
_g.trys.push([2, 7, , 8]);
|
|
541
541
|
return [4, API.accountService.createAccount(accountBody)];
|
|
542
542
|
case 3:
|
|
543
|
-
accountData =
|
|
543
|
+
accountData = _g.sent();
|
|
544
|
+
if (!!(accountData === null || accountData === void 0 ? void 0 : accountData.entity_id)) return [3, 5];
|
|
545
|
+
return [4, API.leadService.retrieveLead(lead_id)];
|
|
546
|
+
case 4:
|
|
547
|
+
data_1 = (_g.sent()).data;
|
|
548
|
+
if (!((_d = data_1 === null || data_1 === void 0 ? void 0 : data_1.entity) === null || _d === void 0 ? void 0 : _d.id))
|
|
549
|
+
throw new Error('Internal server error');
|
|
550
|
+
accountData = __assign(__assign({}, accountData), { entity_id: data_1.entity.id });
|
|
551
|
+
_g.label = 5;
|
|
552
|
+
case 5:
|
|
544
553
|
thunkApi.dispatch(updateStepName(BUSINESS_STEP_NAMES.BUSINESS_INFO_CONFIRM));
|
|
545
554
|
return [4, API.brandService.retrieveBrand(brand === null || brand === void 0 ? void 0 : brand.id)];
|
|
546
|
-
case
|
|
547
|
-
brandRes = (
|
|
555
|
+
case 6:
|
|
556
|
+
brandRes = (_g.sent()).brand;
|
|
548
557
|
brandData = brandRes;
|
|
549
|
-
return [3,
|
|
550
|
-
case
|
|
551
|
-
_c =
|
|
558
|
+
return [3, 8];
|
|
559
|
+
case 7:
|
|
560
|
+
_c = _g.sent();
|
|
552
561
|
message = _c.message;
|
|
553
562
|
error = message;
|
|
554
563
|
if ((error === null || error === void 0 ? void 0 : error.toLowerCase()) === 'entity with license already exist') {
|
|
@@ -556,13 +565,13 @@ export var updateLeadBusinessType = createAsyncThunk('updateLeadBusinessType', f
|
|
|
556
565
|
}
|
|
557
566
|
else
|
|
558
567
|
throw new Error(error);
|
|
559
|
-
return [3,
|
|
560
|
-
case
|
|
561
|
-
case
|
|
562
|
-
list = (
|
|
568
|
+
return [3, 8];
|
|
569
|
+
case 8: return [4, API.dataService.getActivitiesIsIc()];
|
|
570
|
+
case 9:
|
|
571
|
+
list = (_g.sent()).list;
|
|
563
572
|
entityData = undefined;
|
|
564
573
|
entityId = accountData === null || accountData === void 0 ? void 0 : accountData.entity_id;
|
|
565
|
-
if (!((certificateId || []).length > 0)) return [3,
|
|
574
|
+
if (!((certificateId || []).length > 0)) return [3, 11];
|
|
566
575
|
documentBody = {
|
|
567
576
|
entity_id: entityId || '',
|
|
568
577
|
documents: [
|
|
@@ -573,22 +582,22 @@ export var updateLeadBusinessType = createAsyncThunk('updateLeadBusinessType', f
|
|
|
573
582
|
]
|
|
574
583
|
};
|
|
575
584
|
return [4, API.documentService.updateDocumentInfo(documentBody)];
|
|
576
|
-
case
|
|
577
|
-
documentData =
|
|
578
|
-
|
|
579
|
-
case
|
|
580
|
-
if (!(articleId && entityId)) return [3,
|
|
585
|
+
case 10:
|
|
586
|
+
documentData = _g.sent();
|
|
587
|
+
_g.label = 11;
|
|
588
|
+
case 11:
|
|
589
|
+
if (!(articleId && entityId)) return [3, 13];
|
|
581
590
|
payload_1 = {
|
|
582
591
|
id: (accountData === null || accountData === void 0 ? void 0 : accountData.entity_id) || '',
|
|
583
592
|
AOA_file_id: articleId
|
|
584
593
|
};
|
|
585
594
|
return [4, API.entityService.updateEntity(payload_1)];
|
|
586
|
-
case
|
|
587
|
-
entityData =
|
|
588
|
-
|
|
589
|
-
case
|
|
595
|
+
case 12:
|
|
596
|
+
entityData = _g.sent();
|
|
597
|
+
_g.label = 13;
|
|
598
|
+
case 13:
|
|
590
599
|
thunkApi.dispatch(handleNextScreenStep(stepName));
|
|
591
|
-
(
|
|
600
|
+
(_f = (_e = settings.data.appConfig).onStepCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, settings.data.activeScreen.name, params);
|
|
592
601
|
return [2, { data: __assign(__assign({}, data), { brand: brandData }), formData: params, accountData: accountData, documentData: documentData, entityData: entityData, isicActivityList: list || [] }];
|
|
593
602
|
}
|
|
594
603
|
});
|
|
@@ -72,10 +72,11 @@ export var verifyLeadToken = createAsyncThunk('entityVerifyLeadToken', function
|
|
|
72
72
|
return __generator(this, function (_l) {
|
|
73
73
|
switch (_l.label) {
|
|
74
74
|
case 0:
|
|
75
|
-
payload = {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
75
|
+
payload = __assign({ service_name: 'tap_email', verify_token: token }, (isInternally && {
|
|
76
|
+
notification: {
|
|
77
|
+
sms: false
|
|
78
|
+
}
|
|
79
|
+
}));
|
|
79
80
|
return [4, API.leadService.verifyLeadToken(payload)];
|
|
80
81
|
case 1:
|
|
81
82
|
data = (_l.sent()).data;
|
|
@@ -80,10 +80,11 @@ export var verifyToken = createAsyncThunk('individual/verifyToken', function (_a
|
|
|
80
80
|
return __generator(this, function (_m) {
|
|
81
81
|
switch (_m.label) {
|
|
82
82
|
case 0:
|
|
83
|
-
payload = {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
83
|
+
payload = __assign({ service_name: 'tap_email', verify_token: token }, (isInternally && {
|
|
84
|
+
notification: {
|
|
85
|
+
sms: false
|
|
86
|
+
}
|
|
87
|
+
}));
|
|
87
88
|
settings = thunkApi.getState().settings;
|
|
88
89
|
return [4, API.leadService.verifyLeadToken(payload)];
|
|
89
90
|
case 1:
|
|
@@ -60,10 +60,11 @@ export var verifyLeadToken = createAsyncThunk('taxVerifyLeadToken', function (_a
|
|
|
60
60
|
return __generator(this, function (_j) {
|
|
61
61
|
switch (_j.label) {
|
|
62
62
|
case 0:
|
|
63
|
-
payload = {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
63
|
+
payload = __assign({ service_name: 'tap_email', verify_token: token }, (isInternally && {
|
|
64
|
+
notification: {
|
|
65
|
+
sms: false
|
|
66
|
+
}
|
|
67
|
+
}));
|
|
67
68
|
return [4, API.leadService.verifyLeadToken(payload)];
|
|
68
69
|
case 1:
|
|
69
70
|
data = (_j.sent()).data;
|