@ekyc_qoobiss/qbs-ect-cmp 1.8.5 → 1.8.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.
@@ -1817,7 +1817,7 @@ class IDML5Detector {
1817
1817
  if (this.full == 1 && this.tilted == 1) {
1818
1818
  if (this.start == null)
1819
1819
  this.start = Date.now();
1820
- if (Date.now() > this.start + 3000) {
1820
+ if (Date.now() > this.start + 100) {
1821
1821
  this.continue = false;
1822
1822
  this.stream.verificationReady();
1823
1823
  }
@@ -5319,6 +5319,7 @@ const IdBackCapture = class {
5319
5319
  if (this.verified)
5320
5320
  return;
5321
5321
  this.verified = true;
5322
+ this.titleMesage = IdCaptureValues.Loading;
5322
5323
  this.closeCamera();
5323
5324
  }
5324
5325
  takePhoto() {
@@ -5444,6 +5445,7 @@ const IdCapture = class {
5444
5445
  if (this.verified)
5445
5446
  return;
5446
5447
  this.verified = true;
5448
+ this.titleMesage = IdCaptureValues.Loading;
5447
5449
  this.closeCamera();
5448
5450
  }
5449
5451
  render() {
@@ -5623,7 +5625,8 @@ const IdSingleSide = class {
5623
5625
  this.showHowTo = undefined;
5624
5626
  this.idFlow = {
5625
5627
  verificationFinished: false,
5626
- done: false,
5628
+ photoDone: false,
5629
+ recordingDone: false,
5627
5630
  photoFile: null,
5628
5631
  recordingFile: null,
5629
5632
  };
@@ -5644,7 +5647,7 @@ const IdSingleSide = class {
5644
5647
  let idPhoto = event.detail;
5645
5648
  try {
5646
5649
  this.idFlow.photoFile = new File([idPhoto], 'idImage.png', { type: 'image/png' });
5647
- await this.runIdFlow();
5650
+ await this.runIdFlowPhoto();
5648
5651
  }
5649
5652
  catch (e) {
5650
5653
  this.apiErrorEvent.emit(e);
@@ -5652,7 +5655,7 @@ const IdSingleSide = class {
5652
5655
  }
5653
5656
  async verificationFinished(_event) {
5654
5657
  this.idFlow.verificationFinished = true;
5655
- if (this.idFlow.done) {
5658
+ if (this.idFlow.photoDone && this.idFlow.recordingDone) {
5656
5659
  state.flowStatus = FlowStatus.LIVENESS;
5657
5660
  }
5658
5661
  }
@@ -5663,29 +5666,36 @@ const IdSingleSide = class {
5663
5666
  if (state.flowStatus == FlowStatus.ID) {
5664
5667
  try {
5665
5668
  this.idFlow.recordingFile = new File([idRecording], 'idVideo.' + extension, { type: mimeType });
5666
- await this.runIdFlow();
5669
+ await this.runIdFlowRecording();
5667
5670
  }
5668
5671
  catch (e) {
5669
5672
  this.apiErrorEvent.emit(e);
5670
5673
  }
5671
5674
  }
5672
5675
  }
5673
- async runIdFlow() {
5674
- if (this.idFlow.photoFile == null || this.idFlow.recordingFile == null || this.idFlow.done) {
5676
+ async runIdFlowPhoto() {
5677
+ if (this.idFlow.photoFile == null || this.idFlow.photoDone) {
5675
5678
  return;
5676
5679
  }
5677
5680
  let uploadedPhoto = await this.apiCall.UploadFileForRequestB64(state.requestId, 'IdFront', this.idFlow.photoFile);
5678
- if (uploadedPhoto === false) {
5679
- this.idFlow.done = false;
5681
+ this.idFlow.photoDone = uploadedPhoto;
5682
+ if (uploadedPhoto === true && this.idFlow.recordingDone && this.idFlow.verificationFinished) {
5683
+ state.flowStatus = FlowStatus.LIVENESS;
5684
+ }
5685
+ else {
5680
5686
  this.idFlow.photoFile = null;
5681
5687
  this.idFlow.recordingFile = null;
5682
5688
  this.switchCamera();
5683
5689
  this.showTimeout = true;
5690
+ }
5691
+ }
5692
+ async runIdFlowRecording() {
5693
+ if (this.idFlow.recordingFile == null || this.idFlow.recordingDone) {
5684
5694
  return;
5685
5695
  }
5686
5696
  let uploadedRecording = await this.apiCall.UploadFileForRequestB64(state.requestId, 'IdFrontVideo', this.idFlow.recordingFile);
5687
- this.idFlow.done = uploadedRecording;
5688
- if (uploadedRecording === true && this.idFlow.verificationFinished) {
5697
+ this.idFlow.recordingDone = uploadedRecording;
5698
+ if (uploadedRecording === true && this.idFlow.photoDone && this.idFlow.verificationFinished) {
5689
5699
  state.flowStatus = FlowStatus.LIVENESS;
5690
5700
  }
5691
5701
  else {
@@ -6028,7 +6038,6 @@ const SelfieCapture = class {
6028
6038
  if (this.captureTaken)
6029
6039
  return;
6030
6040
  this.captureTaken = true;
6031
- this.titleMesage = SelfieCaptureValues.Loading;
6032
6041
  Stream.getInstance()
6033
6042
  .takePhoto()
6034
6043
  .then(res => {
@@ -6039,6 +6048,7 @@ const SelfieCapture = class {
6039
6048
  if (this.verified)
6040
6049
  return;
6041
6050
  this.verified = true;
6051
+ this.titleMesage = SelfieCaptureValues.Loading;
6042
6052
  this.closeCamera();
6043
6053
  }
6044
6054
  render() {
@@ -83,6 +83,7 @@ export class IdBackCapture {
83
83
  if (this.verified)
84
84
  return;
85
85
  this.verified = true;
86
+ this.titleMesage = IdCaptureValues.Loading;
86
87
  this.closeCamera();
87
88
  }
88
89
  takePhoto() {
@@ -93,6 +93,7 @@ export class IdCapture {
93
93
  if (this.verified)
94
94
  return;
95
95
  this.verified = true;
96
+ this.titleMesage = IdCaptureValues.Loading;
96
97
  this.closeCamera();
97
98
  }
98
99
  render() {
@@ -80,7 +80,6 @@ export class SelfieCapture {
80
80
  if (this.captureTaken)
81
81
  return;
82
82
  this.captureTaken = true;
83
- this.titleMesage = SelfieCaptureValues.Loading;
84
83
  Stream.getInstance()
85
84
  .takePhoto()
86
85
  .then(res => {
@@ -91,6 +90,7 @@ export class SelfieCapture {
91
90
  if (this.verified)
92
91
  return;
93
92
  this.verified = true;
93
+ this.titleMesage = SelfieCaptureValues.Loading;
94
94
  this.closeCamera();
95
95
  }
96
96
  render() {
@@ -10,7 +10,8 @@ export class IdSingleSide {
10
10
  this.showHowTo = undefined;
11
11
  this.idFlow = {
12
12
  verificationFinished: false,
13
- done: false,
13
+ photoDone: false,
14
+ recordingDone: false,
14
15
  photoFile: null,
15
16
  recordingFile: null,
16
17
  };
@@ -31,7 +32,7 @@ export class IdSingleSide {
31
32
  let idPhoto = event.detail;
32
33
  try {
33
34
  this.idFlow.photoFile = new File([idPhoto], 'idImage.png', { type: 'image/png' });
34
- await this.runIdFlow();
35
+ await this.runIdFlowPhoto();
35
36
  }
36
37
  catch (e) {
37
38
  this.apiErrorEvent.emit(e);
@@ -39,7 +40,7 @@ export class IdSingleSide {
39
40
  }
40
41
  async verificationFinished(_event) {
41
42
  this.idFlow.verificationFinished = true;
42
- if (this.idFlow.done) {
43
+ if (this.idFlow.photoDone && this.idFlow.recordingDone) {
43
44
  store.flowStatus = FlowStatus.LIVENESS;
44
45
  }
45
46
  }
@@ -50,29 +51,36 @@ export class IdSingleSide {
50
51
  if (store.flowStatus == FlowStatus.ID) {
51
52
  try {
52
53
  this.idFlow.recordingFile = new File([idRecording], 'idVideo.' + extension, { type: mimeType });
53
- await this.runIdFlow();
54
+ await this.runIdFlowRecording();
54
55
  }
55
56
  catch (e) {
56
57
  this.apiErrorEvent.emit(e);
57
58
  }
58
59
  }
59
60
  }
60
- async runIdFlow() {
61
- if (this.idFlow.photoFile == null || this.idFlow.recordingFile == null || this.idFlow.done) {
61
+ async runIdFlowPhoto() {
62
+ if (this.idFlow.photoFile == null || this.idFlow.photoDone) {
62
63
  return;
63
64
  }
64
65
  let uploadedPhoto = await this.apiCall.UploadFileForRequestB64(store.requestId, 'IdFront', this.idFlow.photoFile);
65
- if (uploadedPhoto === false) {
66
- this.idFlow.done = false;
66
+ this.idFlow.photoDone = uploadedPhoto;
67
+ if (uploadedPhoto === true && this.idFlow.recordingDone && this.idFlow.verificationFinished) {
68
+ store.flowStatus = FlowStatus.LIVENESS;
69
+ }
70
+ else {
67
71
  this.idFlow.photoFile = null;
68
72
  this.idFlow.recordingFile = null;
69
73
  this.switchCamera();
70
74
  this.showTimeout = true;
75
+ }
76
+ }
77
+ async runIdFlowRecording() {
78
+ if (this.idFlow.recordingFile == null || this.idFlow.recordingDone) {
71
79
  return;
72
80
  }
73
81
  let uploadedRecording = await this.apiCall.UploadFileForRequestB64(store.requestId, 'IdFrontVideo', this.idFlow.recordingFile);
74
- this.idFlow.done = uploadedRecording;
75
- if (uploadedRecording === true && this.idFlow.verificationFinished) {
82
+ this.idFlow.recordingDone = uploadedRecording;
83
+ if (uploadedRecording === true && this.idFlow.photoDone && this.idFlow.verificationFinished) {
76
84
  store.flowStatus = FlowStatus.LIVENESS;
77
85
  }
78
86
  else {
@@ -37,7 +37,7 @@ export class IDML5Detector {
37
37
  if (this.full == 1 && this.tilted == 1) {
38
38
  if (this.start == null)
39
39
  this.start = Date.now();
40
- if (Date.now() > this.start + 3000) {
40
+ if (Date.now() > this.start + 100) {
41
41
  this.continue = false;
42
42
  this.stream.verificationReady();
43
43
  }
@@ -1813,7 +1813,7 @@ class IDML5Detector {
1813
1813
  if (this.full == 1 && this.tilted == 1) {
1814
1814
  if (this.start == null)
1815
1815
  this.start = Date.now();
1816
- if (Date.now() > this.start + 3000) {
1816
+ if (Date.now() > this.start + 100) {
1817
1817
  this.continue = false;
1818
1818
  this.stream.verificationReady();
1819
1819
  }
@@ -5315,6 +5315,7 @@ const IdBackCapture = class {
5315
5315
  if (this.verified)
5316
5316
  return;
5317
5317
  this.verified = true;
5318
+ this.titleMesage = IdCaptureValues.Loading;
5318
5319
  this.closeCamera();
5319
5320
  }
5320
5321
  takePhoto() {
@@ -5440,6 +5441,7 @@ const IdCapture = class {
5440
5441
  if (this.verified)
5441
5442
  return;
5442
5443
  this.verified = true;
5444
+ this.titleMesage = IdCaptureValues.Loading;
5443
5445
  this.closeCamera();
5444
5446
  }
5445
5447
  render() {
@@ -5619,7 +5621,8 @@ const IdSingleSide = class {
5619
5621
  this.showHowTo = undefined;
5620
5622
  this.idFlow = {
5621
5623
  verificationFinished: false,
5622
- done: false,
5624
+ photoDone: false,
5625
+ recordingDone: false,
5623
5626
  photoFile: null,
5624
5627
  recordingFile: null,
5625
5628
  };
@@ -5640,7 +5643,7 @@ const IdSingleSide = class {
5640
5643
  let idPhoto = event.detail;
5641
5644
  try {
5642
5645
  this.idFlow.photoFile = new File([idPhoto], 'idImage.png', { type: 'image/png' });
5643
- await this.runIdFlow();
5646
+ await this.runIdFlowPhoto();
5644
5647
  }
5645
5648
  catch (e) {
5646
5649
  this.apiErrorEvent.emit(e);
@@ -5648,7 +5651,7 @@ const IdSingleSide = class {
5648
5651
  }
5649
5652
  async verificationFinished(_event) {
5650
5653
  this.idFlow.verificationFinished = true;
5651
- if (this.idFlow.done) {
5654
+ if (this.idFlow.photoDone && this.idFlow.recordingDone) {
5652
5655
  state.flowStatus = FlowStatus.LIVENESS;
5653
5656
  }
5654
5657
  }
@@ -5659,29 +5662,36 @@ const IdSingleSide = class {
5659
5662
  if (state.flowStatus == FlowStatus.ID) {
5660
5663
  try {
5661
5664
  this.idFlow.recordingFile = new File([idRecording], 'idVideo.' + extension, { type: mimeType });
5662
- await this.runIdFlow();
5665
+ await this.runIdFlowRecording();
5663
5666
  }
5664
5667
  catch (e) {
5665
5668
  this.apiErrorEvent.emit(e);
5666
5669
  }
5667
5670
  }
5668
5671
  }
5669
- async runIdFlow() {
5670
- if (this.idFlow.photoFile == null || this.idFlow.recordingFile == null || this.idFlow.done) {
5672
+ async runIdFlowPhoto() {
5673
+ if (this.idFlow.photoFile == null || this.idFlow.photoDone) {
5671
5674
  return;
5672
5675
  }
5673
5676
  let uploadedPhoto = await this.apiCall.UploadFileForRequestB64(state.requestId, 'IdFront', this.idFlow.photoFile);
5674
- if (uploadedPhoto === false) {
5675
- this.idFlow.done = false;
5677
+ this.idFlow.photoDone = uploadedPhoto;
5678
+ if (uploadedPhoto === true && this.idFlow.recordingDone && this.idFlow.verificationFinished) {
5679
+ state.flowStatus = FlowStatus.LIVENESS;
5680
+ }
5681
+ else {
5676
5682
  this.idFlow.photoFile = null;
5677
5683
  this.idFlow.recordingFile = null;
5678
5684
  this.switchCamera();
5679
5685
  this.showTimeout = true;
5686
+ }
5687
+ }
5688
+ async runIdFlowRecording() {
5689
+ if (this.idFlow.recordingFile == null || this.idFlow.recordingDone) {
5680
5690
  return;
5681
5691
  }
5682
5692
  let uploadedRecording = await this.apiCall.UploadFileForRequestB64(state.requestId, 'IdFrontVideo', this.idFlow.recordingFile);
5683
- this.idFlow.done = uploadedRecording;
5684
- if (uploadedRecording === true && this.idFlow.verificationFinished) {
5693
+ this.idFlow.recordingDone = uploadedRecording;
5694
+ if (uploadedRecording === true && this.idFlow.photoDone && this.idFlow.verificationFinished) {
5685
5695
  state.flowStatus = FlowStatus.LIVENESS;
5686
5696
  }
5687
5697
  else {
@@ -6024,7 +6034,6 @@ const SelfieCapture = class {
6024
6034
  if (this.captureTaken)
6025
6035
  return;
6026
6036
  this.captureTaken = true;
6027
- this.titleMesage = SelfieCaptureValues.Loading;
6028
6037
  Stream.getInstance()
6029
6038
  .takePhoto()
6030
6039
  .then(res => {
@@ -6035,6 +6044,7 @@ const SelfieCapture = class {
6035
6044
  if (this.verified)
6036
6045
  return;
6037
6046
  this.verified = true;
6047
+ this.titleMesage = SelfieCaptureValues.Loading;
6038
6048
  this.closeCamera();
6039
6049
  }
6040
6050
  render() {