@ekyc_qoobiss/qbs-ect-cmp 3.4.0 → 3.4.2
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 +29 -30
- package/dist/collection/helpers/ApiCall.js +28 -29
- package/dist/esm/agreement-check_18.entry.js +29 -30
- package/dist/qbs-ect-cmp/{p-297d8af2.entry.js → p-4144c7ed.entry.js} +2 -2
- package/dist/qbs-ect-cmp/qbs-ect-cmp.esm.js +1 -1
- package/dist/types/helpers/ApiCall.d.ts +1 -2
- package/package.json +1 -1
|
@@ -431,7 +431,7 @@ var FlowMoments;
|
|
|
431
431
|
|
|
432
432
|
class ApiCall {
|
|
433
433
|
constructor() {
|
|
434
|
-
this.
|
|
434
|
+
this.serviceErrors = ['Service Unavailable', 'Unauthorized'];
|
|
435
435
|
this.toBase64 = (file) => new Promise((resolve, reject) => {
|
|
436
436
|
const reader = new FileReader();
|
|
437
437
|
reader.readAsDataURL(file);
|
|
@@ -440,30 +440,29 @@ class ApiCall {
|
|
|
440
440
|
});
|
|
441
441
|
this.urls = new ApiUrls();
|
|
442
442
|
}
|
|
443
|
-
async http2(method, url, data) {
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
}
|
|
443
|
+
// private async http2<T>(method: string, url: string, data: string): Promise<T> {
|
|
444
|
+
// return new Promise((resolve, reject) => {
|
|
445
|
+
// var xhr = new XMLHttpRequest();
|
|
446
|
+
// xhr.open(method, url);
|
|
447
|
+
// xhr.onload = function () {
|
|
448
|
+
// if (xhr.status >= 200 && xhr.status < 300) {
|
|
449
|
+
// resolve(xhr.response);
|
|
450
|
+
// } else {
|
|
451
|
+
// reject({
|
|
452
|
+
// status: xhr.status,
|
|
453
|
+
// statusText: xhr.statusText,
|
|
454
|
+
// });
|
|
455
|
+
// }
|
|
456
|
+
// };
|
|
457
|
+
// xhr.onerror = function () {
|
|
458
|
+
// reject({
|
|
459
|
+
// status: xhr.status,
|
|
460
|
+
// statusText: xhr.statusText,
|
|
461
|
+
// });
|
|
462
|
+
// };
|
|
463
|
+
// xhr.send(data);
|
|
464
|
+
// });
|
|
465
|
+
// }
|
|
467
466
|
async http(request) {
|
|
468
467
|
const response = await fetch(request);
|
|
469
468
|
if (!response.ok) {
|
|
@@ -490,7 +489,7 @@ class ApiCall {
|
|
|
490
489
|
return await this.http(request);
|
|
491
490
|
}
|
|
492
491
|
catch (ex) {
|
|
493
|
-
if (!withRetry || ex.message
|
|
492
|
+
if (!withRetry || this.serviceErrors.includes(ex.message)) {
|
|
494
493
|
throw ex;
|
|
495
494
|
}
|
|
496
495
|
this.AddLog('Error in post ', ex);
|
|
@@ -499,7 +498,7 @@ class ApiCall {
|
|
|
499
498
|
}
|
|
500
499
|
catch (ex2) {
|
|
501
500
|
this.AddLog('Error in post ', ex2);
|
|
502
|
-
return await this.
|
|
501
|
+
return await this.http(request);
|
|
503
502
|
}
|
|
504
503
|
}
|
|
505
504
|
}
|
|
@@ -515,7 +514,7 @@ class ApiCall {
|
|
|
515
514
|
return await this.http(request);
|
|
516
515
|
}
|
|
517
516
|
catch (ex) {
|
|
518
|
-
if (!withRetry || ex.message
|
|
517
|
+
if (!withRetry || this.serviceErrors.includes(ex.message)) {
|
|
519
518
|
throw ex;
|
|
520
519
|
}
|
|
521
520
|
this.AddLog('Error in get ', ex);
|
|
@@ -524,7 +523,7 @@ class ApiCall {
|
|
|
524
523
|
}
|
|
525
524
|
catch (ex2) {
|
|
526
525
|
this.AddLog('Error in get ', ex2);
|
|
527
|
-
return await this.
|
|
526
|
+
return await this.http(request);
|
|
528
527
|
}
|
|
529
528
|
}
|
|
530
529
|
}
|
|
@@ -6375,7 +6374,7 @@ function v4(options, buf, offset) {
|
|
|
6375
6374
|
}
|
|
6376
6375
|
|
|
6377
6376
|
const name = "@ekyc_qoobiss/qbs-ect-cmp";
|
|
6378
|
-
const version$1 = "3.4.
|
|
6377
|
+
const version$1 = "3.4.2";
|
|
6379
6378
|
const description = "Person Identification Component";
|
|
6380
6379
|
const main = "./dist/index.cjs.js";
|
|
6381
6380
|
const module$1 = "./dist/index.js";
|
|
@@ -5,7 +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.
|
|
8
|
+
this.serviceErrors = ['Service Unavailable', 'Unauthorized'];
|
|
9
9
|
this.toBase64 = (file) => new Promise((resolve, reject) => {
|
|
10
10
|
const reader = new FileReader();
|
|
11
11
|
reader.readAsDataURL(file);
|
|
@@ -14,30 +14,29 @@ export class ApiCall {
|
|
|
14
14
|
});
|
|
15
15
|
this.urls = new ApiUrls();
|
|
16
16
|
}
|
|
17
|
-
async http2(method, url, data) {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
17
|
+
// private async http2<T>(method: string, url: string, data: string): Promise<T> {
|
|
18
|
+
// return new Promise((resolve, reject) => {
|
|
19
|
+
// var xhr = new XMLHttpRequest();
|
|
20
|
+
// xhr.open(method, url);
|
|
21
|
+
// xhr.onload = function () {
|
|
22
|
+
// if (xhr.status >= 200 && xhr.status < 300) {
|
|
23
|
+
// resolve(xhr.response);
|
|
24
|
+
// } else {
|
|
25
|
+
// reject({
|
|
26
|
+
// status: xhr.status,
|
|
27
|
+
// statusText: xhr.statusText,
|
|
28
|
+
// });
|
|
29
|
+
// }
|
|
30
|
+
// };
|
|
31
|
+
// xhr.onerror = function () {
|
|
32
|
+
// reject({
|
|
33
|
+
// status: xhr.status,
|
|
34
|
+
// statusText: xhr.statusText,
|
|
35
|
+
// });
|
|
36
|
+
// };
|
|
37
|
+
// xhr.send(data);
|
|
38
|
+
// });
|
|
39
|
+
// }
|
|
41
40
|
async http(request) {
|
|
42
41
|
const response = await fetch(request);
|
|
43
42
|
if (!response.ok) {
|
|
@@ -64,7 +63,7 @@ export class ApiCall {
|
|
|
64
63
|
return await this.http(request);
|
|
65
64
|
}
|
|
66
65
|
catch (ex) {
|
|
67
|
-
if (!withRetry || ex.message
|
|
66
|
+
if (!withRetry || this.serviceErrors.includes(ex.message)) {
|
|
68
67
|
throw ex;
|
|
69
68
|
}
|
|
70
69
|
this.AddLog('Error in post ', ex);
|
|
@@ -73,7 +72,7 @@ export class ApiCall {
|
|
|
73
72
|
}
|
|
74
73
|
catch (ex2) {
|
|
75
74
|
this.AddLog('Error in post ', ex2);
|
|
76
|
-
return await this.
|
|
75
|
+
return await this.http(request);
|
|
77
76
|
}
|
|
78
77
|
}
|
|
79
78
|
}
|
|
@@ -89,7 +88,7 @@ export class ApiCall {
|
|
|
89
88
|
return await this.http(request);
|
|
90
89
|
}
|
|
91
90
|
catch (ex) {
|
|
92
|
-
if (!withRetry || ex.message
|
|
91
|
+
if (!withRetry || this.serviceErrors.includes(ex.message)) {
|
|
93
92
|
throw ex;
|
|
94
93
|
}
|
|
95
94
|
this.AddLog('Error in get ', ex);
|
|
@@ -98,7 +97,7 @@ export class ApiCall {
|
|
|
98
97
|
}
|
|
99
98
|
catch (ex2) {
|
|
100
99
|
this.AddLog('Error in get ', ex2);
|
|
101
|
-
return await this.
|
|
100
|
+
return await this.http(request);
|
|
102
101
|
}
|
|
103
102
|
}
|
|
104
103
|
}
|
|
@@ -427,7 +427,7 @@ var FlowMoments;
|
|
|
427
427
|
|
|
428
428
|
class ApiCall {
|
|
429
429
|
constructor() {
|
|
430
|
-
this.
|
|
430
|
+
this.serviceErrors = ['Service Unavailable', 'Unauthorized'];
|
|
431
431
|
this.toBase64 = (file) => new Promise((resolve, reject) => {
|
|
432
432
|
const reader = new FileReader();
|
|
433
433
|
reader.readAsDataURL(file);
|
|
@@ -436,30 +436,29 @@ class ApiCall {
|
|
|
436
436
|
});
|
|
437
437
|
this.urls = new ApiUrls();
|
|
438
438
|
}
|
|
439
|
-
async http2(method, url, data) {
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
}
|
|
439
|
+
// private async http2<T>(method: string, url: string, data: string): Promise<T> {
|
|
440
|
+
// return new Promise((resolve, reject) => {
|
|
441
|
+
// var xhr = new XMLHttpRequest();
|
|
442
|
+
// xhr.open(method, url);
|
|
443
|
+
// xhr.onload = function () {
|
|
444
|
+
// if (xhr.status >= 200 && xhr.status < 300) {
|
|
445
|
+
// resolve(xhr.response);
|
|
446
|
+
// } else {
|
|
447
|
+
// reject({
|
|
448
|
+
// status: xhr.status,
|
|
449
|
+
// statusText: xhr.statusText,
|
|
450
|
+
// });
|
|
451
|
+
// }
|
|
452
|
+
// };
|
|
453
|
+
// xhr.onerror = function () {
|
|
454
|
+
// reject({
|
|
455
|
+
// status: xhr.status,
|
|
456
|
+
// statusText: xhr.statusText,
|
|
457
|
+
// });
|
|
458
|
+
// };
|
|
459
|
+
// xhr.send(data);
|
|
460
|
+
// });
|
|
461
|
+
// }
|
|
463
462
|
async http(request) {
|
|
464
463
|
const response = await fetch(request);
|
|
465
464
|
if (!response.ok) {
|
|
@@ -486,7 +485,7 @@ class ApiCall {
|
|
|
486
485
|
return await this.http(request);
|
|
487
486
|
}
|
|
488
487
|
catch (ex) {
|
|
489
|
-
if (!withRetry || ex.message
|
|
488
|
+
if (!withRetry || this.serviceErrors.includes(ex.message)) {
|
|
490
489
|
throw ex;
|
|
491
490
|
}
|
|
492
491
|
this.AddLog('Error in post ', ex);
|
|
@@ -495,7 +494,7 @@ class ApiCall {
|
|
|
495
494
|
}
|
|
496
495
|
catch (ex2) {
|
|
497
496
|
this.AddLog('Error in post ', ex2);
|
|
498
|
-
return await this.
|
|
497
|
+
return await this.http(request);
|
|
499
498
|
}
|
|
500
499
|
}
|
|
501
500
|
}
|
|
@@ -511,7 +510,7 @@ class ApiCall {
|
|
|
511
510
|
return await this.http(request);
|
|
512
511
|
}
|
|
513
512
|
catch (ex) {
|
|
514
|
-
if (!withRetry || ex.message
|
|
513
|
+
if (!withRetry || this.serviceErrors.includes(ex.message)) {
|
|
515
514
|
throw ex;
|
|
516
515
|
}
|
|
517
516
|
this.AddLog('Error in get ', ex);
|
|
@@ -520,7 +519,7 @@ class ApiCall {
|
|
|
520
519
|
}
|
|
521
520
|
catch (ex2) {
|
|
522
521
|
this.AddLog('Error in get ', ex2);
|
|
523
|
-
return await this.
|
|
522
|
+
return await this.http(request);
|
|
524
523
|
}
|
|
525
524
|
}
|
|
526
525
|
}
|
|
@@ -6371,7 +6370,7 @@ function v4(options, buf, offset) {
|
|
|
6371
6370
|
}
|
|
6372
6371
|
|
|
6373
6372
|
const name = "@ekyc_qoobiss/qbs-ect-cmp";
|
|
6374
|
-
const version$1 = "3.4.
|
|
6373
|
+
const version$1 = "3.4.2";
|
|
6375
6374
|
const description = "Person Identification Component";
|
|
6376
6375
|
const main = "./dist/index.cjs.js";
|
|
6377
6376
|
const module = "./dist/index.js";
|