@ekyc_qoobiss/qbs-ect-cmp 3.3.5 → 3.3.7
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 +18 -16
- package/dist/collection/components/identification-component/identification-component.js +14 -13
- package/dist/collection/helpers/ApiCall.js +3 -2
- package/dist/esm/agreement-check_18.entry.js +18 -16
- package/dist/qbs-ect-cmp/{p-bab68c5f.entry.js → p-c72172b2.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.7";
|
|
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
|
}
|
|
@@ -6639,17 +6641,17 @@ const IdentificationComponent = class {
|
|
|
6639
6641
|
state.initialised = true;
|
|
6640
6642
|
return;
|
|
6641
6643
|
}
|
|
6644
|
+
if (state.device.browser == Browser.Mi) {
|
|
6645
|
+
//this.apiErrorEmitter('Mi Browser nu este acceptat. Va rugam utilizati Chrome.', 'Request Initialisation RequestId:' + store.requestId + ' RedirectId:' + store.redirectId);
|
|
6646
|
+
//return;
|
|
6647
|
+
alert('Mi Browser detectat.');
|
|
6648
|
+
}
|
|
6642
6649
|
try {
|
|
6643
6650
|
if (state.debug)
|
|
6644
6651
|
this.baseComponent.apiCall.AddLog({ phase: 'debug mode' }, this.logInit);
|
|
6645
6652
|
}
|
|
6646
6653
|
catch (_a) { }
|
|
6647
6654
|
try {
|
|
6648
|
-
if (state.device.browser == Browser.Mi) {
|
|
6649
|
-
//this.apiErrorEmitter('Mi Browser nu este acceptat. Va rugam utilizati Chrome.', 'Request Initialisation RequestId:' + store.requestId + ' RedirectId:' + store.redirectId);
|
|
6650
|
-
//return;
|
|
6651
|
-
alert('Mi Browser detectat.');
|
|
6652
|
-
}
|
|
6653
6655
|
if (!state.device.isMobile && state.redirectId == '') {
|
|
6654
6656
|
state.redirectId = v4();
|
|
6655
6657
|
this.redirect_id = state.redirectId;
|
|
@@ -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
|
}
|
|
@@ -203,17 +204,17 @@ export class IdentificationComponent {
|
|
|
203
204
|
store.initialised = true;
|
|
204
205
|
return;
|
|
205
206
|
}
|
|
207
|
+
if (store.device.browser == Browser.Mi) {
|
|
208
|
+
//this.apiErrorEmitter('Mi Browser nu este acceptat. Va rugam utilizati Chrome.', 'Request Initialisation RequestId:' + store.requestId + ' RedirectId:' + store.redirectId);
|
|
209
|
+
//return;
|
|
210
|
+
alert('Mi Browser detectat.');
|
|
211
|
+
}
|
|
206
212
|
try {
|
|
207
213
|
if (store.debug)
|
|
208
214
|
this.baseComponent.apiCall.AddLog({ phase: 'debug mode' }, this.logInit);
|
|
209
215
|
}
|
|
210
216
|
catch (_a) { }
|
|
211
217
|
try {
|
|
212
|
-
if (store.device.browser == Browser.Mi) {
|
|
213
|
-
//this.apiErrorEmitter('Mi Browser nu este acceptat. Va rugam utilizati Chrome.', 'Request Initialisation RequestId:' + store.requestId + ' RedirectId:' + store.redirectId);
|
|
214
|
-
//return;
|
|
215
|
-
alert('Mi Browser detectat.');
|
|
216
|
-
}
|
|
217
218
|
if (!store.device.isMobile && store.redirectId == '') {
|
|
218
219
|
store.redirectId = uuid.v4();
|
|
219
220
|
this.redirect_id = store.redirectId;
|
|
@@ -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.7";
|
|
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
|
}
|
|
@@ -6635,17 +6637,17 @@ const IdentificationComponent = class {
|
|
|
6635
6637
|
state.initialised = true;
|
|
6636
6638
|
return;
|
|
6637
6639
|
}
|
|
6640
|
+
if (state.device.browser == Browser.Mi) {
|
|
6641
|
+
//this.apiErrorEmitter('Mi Browser nu este acceptat. Va rugam utilizati Chrome.', 'Request Initialisation RequestId:' + store.requestId + ' RedirectId:' + store.redirectId);
|
|
6642
|
+
//return;
|
|
6643
|
+
alert('Mi Browser detectat.');
|
|
6644
|
+
}
|
|
6638
6645
|
try {
|
|
6639
6646
|
if (state.debug)
|
|
6640
6647
|
this.baseComponent.apiCall.AddLog({ phase: 'debug mode' }, this.logInit);
|
|
6641
6648
|
}
|
|
6642
6649
|
catch (_a) { }
|
|
6643
6650
|
try {
|
|
6644
|
-
if (state.device.browser == Browser.Mi) {
|
|
6645
|
-
//this.apiErrorEmitter('Mi Browser nu este acceptat. Va rugam utilizati Chrome.', 'Request Initialisation RequestId:' + store.requestId + ' RedirectId:' + store.redirectId);
|
|
6646
|
-
//return;
|
|
6647
|
-
alert('Mi Browser detectat.');
|
|
6648
|
-
}
|
|
6649
6651
|
if (!state.device.isMobile && state.redirectId == '') {
|
|
6650
6652
|
state.redirectId = v4();
|
|
6651
6653
|
this.redirect_id = state.redirectId;
|