@ekyc_qoobiss/qbs-ect-cmp 3.3.5 → 3.3.6
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/dist/cjs/agreement-check_18.cjs.entry.js +13 -11
- package/dist/collection/components/identification-component/identification-component.js +9 -8
- package/dist/collection/helpers/ApiCall.js +3 -2
- package/dist/esm/agreement-check_18.entry.js +13 -11
- package/dist/qbs-ect-cmp/{p-bab68c5f.entry.js → p-39a47904.entry.js} +2 -2
- package/dist/qbs-ect-cmp/qbs-ect-cmp.esm.js +1 -1
- package/dist/types/components/identification-component/identification-component.d.ts +1 -1
- package/dist/types/helpers/ApiCall.d.ts +1 -0
- package/package.json +1 -1
|
@@ -431,6 +431,7 @@ var FlowMoments;
|
|
|
431
431
|
|
|
432
432
|
class ApiCall {
|
|
433
433
|
constructor() {
|
|
434
|
+
this.serviceUnavailableError = 'Service Unavailable';
|
|
434
435
|
this.toBase64 = (file) => new Promise((resolve, reject) => {
|
|
435
436
|
const reader = new FileReader();
|
|
436
437
|
reader.readAsDataURL(file);
|
|
@@ -489,7 +490,7 @@ class ApiCall {
|
|
|
489
490
|
return await this.http(request);
|
|
490
491
|
}
|
|
491
492
|
catch (ex) {
|
|
492
|
-
if (!withRetry) {
|
|
493
|
+
if (!withRetry || ex.message == this.serviceUnavailableError) {
|
|
493
494
|
throw ex;
|
|
494
495
|
}
|
|
495
496
|
this.AddLog('Error in post ', ex);
|
|
@@ -514,7 +515,7 @@ class ApiCall {
|
|
|
514
515
|
return await this.http(request);
|
|
515
516
|
}
|
|
516
517
|
catch (ex) {
|
|
517
|
-
if (!withRetry) {
|
|
518
|
+
if (!withRetry || ex.message == this.serviceUnavailableError) {
|
|
518
519
|
throw ex;
|
|
519
520
|
}
|
|
520
521
|
this.AddLog('Error in get ', ex);
|
|
@@ -6374,7 +6375,7 @@ function v4(options, buf, offset) {
|
|
|
6374
6375
|
}
|
|
6375
6376
|
|
|
6376
6377
|
const name = "@ekyc_qoobiss/qbs-ect-cmp";
|
|
6377
|
-
const version$1 = "3.3.
|
|
6378
|
+
const version$1 = "3.3.6";
|
|
6378
6379
|
const description = "Person Identification Component";
|
|
6379
6380
|
const main = "./dist/index.cjs.js";
|
|
6380
6381
|
const module$1 = "./dist/index.js";
|
|
@@ -6517,25 +6518,26 @@ const IdentificationComponent = class {
|
|
|
6517
6518
|
}
|
|
6518
6519
|
}
|
|
6519
6520
|
async apiErrorEmitter(data, zone) {
|
|
6520
|
-
var _a, _b;
|
|
6521
|
-
let apiLogData = { message: '', stack: '', zone };
|
|
6521
|
+
var _a, _b, _c, _d, _e, _f;
|
|
6522
6522
|
if (data.detail) {
|
|
6523
|
-
this.errorTitle = (_a = data.detail.message) !== null && _a !== void 0 ? _a : '';
|
|
6524
|
-
this.errorMessage = (
|
|
6525
|
-
apiLogData.message = data.detail.message;
|
|
6526
|
-
apiLogData.stack = data.detail.stack;
|
|
6523
|
+
this.errorTitle = (_b = (_a = data.detail.message) !== null && _a !== void 0 ? _a : data.detail.status) !== null && _b !== void 0 ? _b : '';
|
|
6524
|
+
this.errorMessage = (_d = (_c = data.detail.stack) !== null && _c !== void 0 ? _c : data.detail.statusText) !== null && _d !== void 0 ? _d : '';
|
|
6527
6525
|
}
|
|
6528
6526
|
else if (data.message) {
|
|
6529
6527
|
this.errorTitle = data.message;
|
|
6530
|
-
|
|
6528
|
+
}
|
|
6529
|
+
else if (data.status) {
|
|
6530
|
+
this.errorTitle = (_e = data.status) !== null && _e !== void 0 ? _e : '';
|
|
6531
|
+
this.errorMessage = (_f = data.statusText) !== null && _f !== void 0 ? _f : '';
|
|
6531
6532
|
}
|
|
6532
6533
|
else {
|
|
6533
6534
|
this.errorTitle = data;
|
|
6534
6535
|
}
|
|
6536
|
+
let apiLogData = { message: this.errorTitle, stack: this.errorMessage, zone };
|
|
6535
6537
|
try {
|
|
6536
6538
|
await this.baseComponent.apiCall.AddLog(apiLogData, getLogMessage(this.order_id, this.redirect_id, this.token));
|
|
6537
6539
|
}
|
|
6538
|
-
catch (
|
|
6540
|
+
catch (_g) { }
|
|
6539
6541
|
Events.flowError(this.errorTitle);
|
|
6540
6542
|
state.flowStatus = FlowStatus.ERROREND;
|
|
6541
6543
|
}
|
|
@@ -82,25 +82,26 @@ export class IdentificationComponent {
|
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
async apiErrorEmitter(data, zone) {
|
|
85
|
-
var _a, _b;
|
|
86
|
-
let apiLogData = { message: '', stack: '', zone };
|
|
85
|
+
var _a, _b, _c, _d, _e, _f;
|
|
87
86
|
if (data.detail) {
|
|
88
|
-
this.errorTitle = (_a = data.detail.message) !== null && _a !== void 0 ? _a : '';
|
|
89
|
-
this.errorMessage = (
|
|
90
|
-
apiLogData.message = data.detail.message;
|
|
91
|
-
apiLogData.stack = data.detail.stack;
|
|
87
|
+
this.errorTitle = (_b = (_a = data.detail.message) !== null && _a !== void 0 ? _a : data.detail.status) !== null && _b !== void 0 ? _b : '';
|
|
88
|
+
this.errorMessage = (_d = (_c = data.detail.stack) !== null && _c !== void 0 ? _c : data.detail.statusText) !== null && _d !== void 0 ? _d : '';
|
|
92
89
|
}
|
|
93
90
|
else if (data.message) {
|
|
94
91
|
this.errorTitle = data.message;
|
|
95
|
-
|
|
92
|
+
}
|
|
93
|
+
else if (data.status) {
|
|
94
|
+
this.errorTitle = (_e = data.status) !== null && _e !== void 0 ? _e : '';
|
|
95
|
+
this.errorMessage = (_f = data.statusText) !== null && _f !== void 0 ? _f : '';
|
|
96
96
|
}
|
|
97
97
|
else {
|
|
98
98
|
this.errorTitle = data;
|
|
99
99
|
}
|
|
100
|
+
let apiLogData = { message: this.errorTitle, stack: this.errorMessage, zone };
|
|
100
101
|
try {
|
|
101
102
|
await this.baseComponent.apiCall.AddLog(apiLogData, getLogMessage(this.order_id, this.redirect_id, this.token));
|
|
102
103
|
}
|
|
103
|
-
catch (
|
|
104
|
+
catch (_g) { }
|
|
104
105
|
Events.flowError(this.errorTitle);
|
|
105
106
|
store.flowStatus = FlowStatus.ERROREND;
|
|
106
107
|
}
|
|
@@ -5,6 +5,7 @@ import { FlowStatus } from '../models/FlowStatus';
|
|
|
5
5
|
import { FlowMoments, FlowSteps } from '../models/FlowSteps';
|
|
6
6
|
export class ApiCall {
|
|
7
7
|
constructor() {
|
|
8
|
+
this.serviceUnavailableError = 'Service Unavailable';
|
|
8
9
|
this.toBase64 = (file) => new Promise((resolve, reject) => {
|
|
9
10
|
const reader = new FileReader();
|
|
10
11
|
reader.readAsDataURL(file);
|
|
@@ -63,7 +64,7 @@ export class ApiCall {
|
|
|
63
64
|
return await this.http(request);
|
|
64
65
|
}
|
|
65
66
|
catch (ex) {
|
|
66
|
-
if (!withRetry) {
|
|
67
|
+
if (!withRetry || ex.message == this.serviceUnavailableError) {
|
|
67
68
|
throw ex;
|
|
68
69
|
}
|
|
69
70
|
this.AddLog('Error in post ', ex);
|
|
@@ -88,7 +89,7 @@ export class ApiCall {
|
|
|
88
89
|
return await this.http(request);
|
|
89
90
|
}
|
|
90
91
|
catch (ex) {
|
|
91
|
-
if (!withRetry) {
|
|
92
|
+
if (!withRetry || ex.message == this.serviceUnavailableError) {
|
|
92
93
|
throw ex;
|
|
93
94
|
}
|
|
94
95
|
this.AddLog('Error in get ', ex);
|
|
@@ -427,6 +427,7 @@ var FlowMoments;
|
|
|
427
427
|
|
|
428
428
|
class ApiCall {
|
|
429
429
|
constructor() {
|
|
430
|
+
this.serviceUnavailableError = 'Service Unavailable';
|
|
430
431
|
this.toBase64 = (file) => new Promise((resolve, reject) => {
|
|
431
432
|
const reader = new FileReader();
|
|
432
433
|
reader.readAsDataURL(file);
|
|
@@ -485,7 +486,7 @@ class ApiCall {
|
|
|
485
486
|
return await this.http(request);
|
|
486
487
|
}
|
|
487
488
|
catch (ex) {
|
|
488
|
-
if (!withRetry) {
|
|
489
|
+
if (!withRetry || ex.message == this.serviceUnavailableError) {
|
|
489
490
|
throw ex;
|
|
490
491
|
}
|
|
491
492
|
this.AddLog('Error in post ', ex);
|
|
@@ -510,7 +511,7 @@ class ApiCall {
|
|
|
510
511
|
return await this.http(request);
|
|
511
512
|
}
|
|
512
513
|
catch (ex) {
|
|
513
|
-
if (!withRetry) {
|
|
514
|
+
if (!withRetry || ex.message == this.serviceUnavailableError) {
|
|
514
515
|
throw ex;
|
|
515
516
|
}
|
|
516
517
|
this.AddLog('Error in get ', ex);
|
|
@@ -6370,7 +6371,7 @@ function v4(options, buf, offset) {
|
|
|
6370
6371
|
}
|
|
6371
6372
|
|
|
6372
6373
|
const name = "@ekyc_qoobiss/qbs-ect-cmp";
|
|
6373
|
-
const version$1 = "3.3.
|
|
6374
|
+
const version$1 = "3.3.6";
|
|
6374
6375
|
const description = "Person Identification Component";
|
|
6375
6376
|
const main = "./dist/index.cjs.js";
|
|
6376
6377
|
const module = "./dist/index.js";
|
|
@@ -6513,25 +6514,26 @@ const IdentificationComponent = class {
|
|
|
6513
6514
|
}
|
|
6514
6515
|
}
|
|
6515
6516
|
async apiErrorEmitter(data, zone) {
|
|
6516
|
-
var _a, _b;
|
|
6517
|
-
let apiLogData = { message: '', stack: '', zone };
|
|
6517
|
+
var _a, _b, _c, _d, _e, _f;
|
|
6518
6518
|
if (data.detail) {
|
|
6519
|
-
this.errorTitle = (_a = data.detail.message) !== null && _a !== void 0 ? _a : '';
|
|
6520
|
-
this.errorMessage = (
|
|
6521
|
-
apiLogData.message = data.detail.message;
|
|
6522
|
-
apiLogData.stack = data.detail.stack;
|
|
6519
|
+
this.errorTitle = (_b = (_a = data.detail.message) !== null && _a !== void 0 ? _a : data.detail.status) !== null && _b !== void 0 ? _b : '';
|
|
6520
|
+
this.errorMessage = (_d = (_c = data.detail.stack) !== null && _c !== void 0 ? _c : data.detail.statusText) !== null && _d !== void 0 ? _d : '';
|
|
6523
6521
|
}
|
|
6524
6522
|
else if (data.message) {
|
|
6525
6523
|
this.errorTitle = data.message;
|
|
6526
|
-
|
|
6524
|
+
}
|
|
6525
|
+
else if (data.status) {
|
|
6526
|
+
this.errorTitle = (_e = data.status) !== null && _e !== void 0 ? _e : '';
|
|
6527
|
+
this.errorMessage = (_f = data.statusText) !== null && _f !== void 0 ? _f : '';
|
|
6527
6528
|
}
|
|
6528
6529
|
else {
|
|
6529
6530
|
this.errorTitle = data;
|
|
6530
6531
|
}
|
|
6532
|
+
let apiLogData = { message: this.errorTitle, stack: this.errorMessage, zone };
|
|
6531
6533
|
try {
|
|
6532
6534
|
await this.baseComponent.apiCall.AddLog(apiLogData, getLogMessage(this.order_id, this.redirect_id, this.token));
|
|
6533
6535
|
}
|
|
6534
|
-
catch (
|
|
6536
|
+
catch (_g) { }
|
|
6535
6537
|
Events.flowError(this.errorTitle);
|
|
6536
6538
|
state.flowStatus = FlowStatus.ERROREND;
|
|
6537
6539
|
}
|