@ekyc_qoobiss/qbs-ect-cmp 1.5.11 → 1.5.13

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.
@@ -5128,6 +5128,9 @@ const CaptureError = class {
5128
5128
  if (this.type == 'timeout') {
5129
5129
  state.flowStatus = this.idSide == 'front' ? 'ID' : 'IDBACK';
5130
5130
  }
5131
+ else if (this.type == 'invalid') {
5132
+ state.flowStatus = 'HOWTOID';
5133
+ }
5131
5134
  else {
5132
5135
  state.flowStatus = 'ID';
5133
5136
  }
@@ -5717,6 +5720,7 @@ const IdentificationComponent = class {
5717
5720
  if (this.idFlow.photoFile == null || this.idFlow.recordingFile == null || this.idFlow.done) {
5718
5721
  return;
5719
5722
  }
5723
+ this.idSide = 'face';
5720
5724
  let uploadedPhoto = await this.apiCall.UploadFileForRequestB64(state.requestId, 'IdFront', this.idFlow.photoFile);
5721
5725
  if (uploadedPhoto === false) {
5722
5726
  this.idFlow.done = false;
@@ -5928,10 +5932,11 @@ const LandingValidation = class {
5928
5932
  this.apiCall = new ApiCall();
5929
5933
  }
5930
5934
  async componentWillLoad() {
5935
+ await new Promise(f => setTimeout(f, 500));
5936
+ await this.initRequest();
5937
+ }
5938
+ async initRequest() {
5931
5939
  this.saved = await this.apiCall.AddIdentificationRequest(state.requestId, JSON.stringify(this.device));
5932
- if (!this.saved) {
5933
- this.saved = await this.apiCall.AddIdentificationRequest(state.requestId, JSON.stringify(this.device));
5934
- }
5935
5940
  if (state.hasIdBack) {
5936
5941
  this.warningText = LandingValues.WarningMd;
5937
5942
  }
@@ -25,6 +25,9 @@ export class CaptureError {
25
25
  if (this.type == 'timeout') {
26
26
  store.flowStatus = this.idSide == 'front' ? 'ID' : 'IDBACK';
27
27
  }
28
+ else if (this.type == 'invalid') {
29
+ store.flowStatus = 'HOWTOID';
30
+ }
28
31
  else {
29
32
  store.flowStatus = 'ID';
30
33
  }
@@ -78,6 +78,7 @@ export class IdentificationComponent {
78
78
  if (this.idFlow.photoFile == null || this.idFlow.recordingFile == null || this.idFlow.done) {
79
79
  return;
80
80
  }
81
+ this.idSide = 'face';
81
82
  let uploadedPhoto = await this.apiCall.UploadFileForRequestB64(store.requestId, 'IdFront', this.idFlow.photoFile);
82
83
  if (uploadedPhoto === false) {
83
84
  this.idFlow.done = false;
@@ -15,10 +15,11 @@ export class LandingValidation {
15
15
  this.apiCall = new ApiCall();
16
16
  }
17
17
  async componentWillLoad() {
18
+ await new Promise(f => setTimeout(f, 500));
19
+ await this.initRequest();
20
+ }
21
+ async initRequest() {
18
22
  this.saved = await this.apiCall.AddIdentificationRequest(store.requestId, JSON.stringify(this.device));
19
- if (!this.saved) {
20
- this.saved = await this.apiCall.AddIdentificationRequest(store.requestId, JSON.stringify(this.device));
21
- }
22
23
  if (store.hasIdBack) {
23
24
  this.warningText = LandingValues.WarningMd;
24
25
  }
@@ -5124,6 +5124,9 @@ const CaptureError = class {
5124
5124
  if (this.type == 'timeout') {
5125
5125
  state.flowStatus = this.idSide == 'front' ? 'ID' : 'IDBACK';
5126
5126
  }
5127
+ else if (this.type == 'invalid') {
5128
+ state.flowStatus = 'HOWTOID';
5129
+ }
5127
5130
  else {
5128
5131
  state.flowStatus = 'ID';
5129
5132
  }
@@ -5713,6 +5716,7 @@ const IdentificationComponent = class {
5713
5716
  if (this.idFlow.photoFile == null || this.idFlow.recordingFile == null || this.idFlow.done) {
5714
5717
  return;
5715
5718
  }
5719
+ this.idSide = 'face';
5716
5720
  let uploadedPhoto = await this.apiCall.UploadFileForRequestB64(state.requestId, 'IdFront', this.idFlow.photoFile);
5717
5721
  if (uploadedPhoto === false) {
5718
5722
  this.idFlow.done = false;
@@ -5924,10 +5928,11 @@ const LandingValidation = class {
5924
5928
  this.apiCall = new ApiCall();
5925
5929
  }
5926
5930
  async componentWillLoad() {
5931
+ await new Promise(f => setTimeout(f, 500));
5932
+ await this.initRequest();
5933
+ }
5934
+ async initRequest() {
5927
5935
  this.saved = await this.apiCall.AddIdentificationRequest(state.requestId, JSON.stringify(this.device));
5928
- if (!this.saved) {
5929
- this.saved = await this.apiCall.AddIdentificationRequest(state.requestId, JSON.stringify(this.device));
5930
- }
5931
5936
  if (state.hasIdBack) {
5932
5937
  this.warningText = LandingValues.WarningMd;
5933
5938
  }