idmission-web-sdk 2.2.53 → 2.2.55

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/sdk2.esm.js CHANGED
@@ -203,7 +203,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
203
203
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
204
204
  };
205
205
 
206
- var webSdkVersion = '2.2.53';
206
+ var webSdkVersion = '2.2.55';
207
207
 
208
208
  function getPlatform() {
209
209
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -1384,9 +1384,9 @@ var SubmissionProvider = function SubmissionProvider(_a) {
1384
1384
  }
1385
1385
  var documents, _a, _b, _c, submissionRequest, onBeforeSubmitResult;
1386
1386
  var _d;
1387
- var _e, _f, _g;
1388
- return __generator(this, function (_h) {
1389
- switch (_h.label) {
1387
+ var _e, _f, _g, _h;
1388
+ return __generator(this, function (_j) {
1389
+ switch (_j.label) {
1390
1390
  case 0:
1391
1391
  _d = {
1392
1392
  idFrontImage: idFrontImage,
@@ -1398,24 +1398,24 @@ var SubmissionProvider = function SubmissionProvider(_a) {
1398
1398
  if (!_a) return [3 /*break*/, 2];
1399
1399
  return [4 /*yield*/, videoDataUrlToB64(signatureVideoUrl)];
1400
1400
  case 1:
1401
- _a = _h.sent();
1402
- _h.label = 2;
1401
+ _a = _j.sent();
1402
+ _j.label = 2;
1403
1403
  case 2:
1404
1404
  _d.signatureVideo = _a;
1405
1405
  _b = idCaptureVideoUrl;
1406
1406
  if (!_b) return [3 /*break*/, 4];
1407
1407
  return [4 /*yield*/, videoDataUrlToB64(idCaptureVideoUrl)];
1408
1408
  case 3:
1409
- _b = _h.sent();
1410
- _h.label = 4;
1409
+ _b = _j.sent();
1410
+ _j.label = 4;
1411
1411
  case 4:
1412
1412
  _d.idCaptureVideo = _b;
1413
1413
  _c = idCaptureVideoAudioUrl;
1414
1414
  if (!_c) return [3 /*break*/, 6];
1415
1415
  return [4 /*yield*/, videoDataUrlToB64(idCaptureVideoAudioUrl)];
1416
1416
  case 5:
1417
- _c = _h.sent();
1418
- _h.label = 6;
1417
+ _c = _j.sent();
1418
+ _j.label = 6;
1419
1419
  case 6:
1420
1420
  documents = (_d.idCaptureVideoAudio = _c, _d.idCaptureVideoIdFrontImage = idCaptureVideoIdFrontImage, _d.idCaptureVideoIdBackImage = idCaptureVideoIdBackImage, _d);
1421
1421
  if (signatureData) {
@@ -1442,8 +1442,8 @@ var SubmissionProvider = function SubmissionProvider(_a) {
1442
1442
  });
1443
1443
  }))];
1444
1444
  case 7:
1445
- _h.sent();
1446
- _h.label = 8;
1445
+ _j.sent();
1446
+ _j.label = 8;
1447
1447
  case 8:
1448
1448
  submissionRequest = {
1449
1449
  securityData: {
@@ -1498,6 +1498,9 @@ var SubmissionProvider = function SubmissionProvider(_a) {
1498
1498
  selfie: documents.selfieImage
1499
1499
  };
1500
1500
  }
1501
+ if (idCardForFaceMatch) {
1502
+ (_e = submissionRequest.customerData.idData).idImageFront || (_e.idImageFront = idCardForFaceMatch);
1503
+ }
1501
1504
  if (companyId) {
1502
1505
  submissionRequest.employee = {
1503
1506
  companyId: companyId
@@ -1510,7 +1513,7 @@ var SubmissionProvider = function SubmissionProvider(_a) {
1510
1513
  submissionRequest.customerData.cardData = cardData;
1511
1514
  }
1512
1515
  if (enrollmentId) {
1513
- (_e = submissionRequest.customerData).personalData || (_e.personalData = {});
1516
+ (_f = submissionRequest.customerData).personalData || (_f.personalData = {});
1514
1517
  submissionRequest.customerData.personalData.uniqueNumber = enrollmentId;
1515
1518
  }
1516
1519
  if (webhooksClientTraceId) {
@@ -1534,11 +1537,11 @@ var SubmissionProvider = function SubmissionProvider(_a) {
1534
1537
  });
1535
1538
  }
1536
1539
  if (documents.idCaptureVideo) {
1537
- (_f = submissionRequest.customerData).biometricData || (_f.biometricData = {});
1540
+ (_g = submissionRequest.customerData).biometricData || (_g.biometricData = {});
1538
1541
  submissionRequest.customerData.biometricData.videoData = documents.idCaptureVideo;
1539
1542
  }
1540
1543
  if (documents.idCaptureVideoAudio) {
1541
- (_g = submissionRequest.customerData).biometricData || (_g.biometricData = {});
1544
+ (_h = submissionRequest.customerData).biometricData || (_h.biometricData = {});
1542
1545
  submissionRequest.customerData.biometricData.voiceData = documents.idCaptureVideoAudio;
1543
1546
  submissionRequest.customerData.biometricData.voiceStartTime = idCaptureVideoAudioStartsAt !== null && idCaptureVideoAudioStartsAt !== void 0 ? idCaptureVideoAudioStartsAt : undefined;
1544
1547
  submissionRequest.customerData.biometricData.expectedAudioText = expectedAudioText !== null && expectedAudioText !== void 0 ? expectedAudioText : undefined;
@@ -1558,15 +1561,15 @@ var SubmissionProvider = function SubmissionProvider(_a) {
1558
1561
  if (!onBeforeSubmit.current) return [3 /*break*/, 10];
1559
1562
  return [4 /*yield*/, onBeforeSubmit.current(submissionRequest)];
1560
1563
  case 9:
1561
- onBeforeSubmitResult = _h.sent();
1564
+ onBeforeSubmitResult = _j.sent();
1562
1565
  if (onBeforeSubmitResult) submissionRequest = onBeforeSubmitResult;
1563
- _h.label = 10;
1566
+ _j.label = 10;
1564
1567
  case 10:
1565
1568
  return [2 /*return*/, submissionRequest];
1566
1569
  }
1567
1570
  });
1568
1571
  });
1569
- }, [additionalDocuments, bypassAgeValidation, bypassNameMatching, cardData, clientRequestID, companyId, customerDataMatchConfig, deduplicationEnabled, deduplicationSynchronous, documentServiceUrl, enrollmentId, expectedAudioText, geolocationResult, idBackCaptureAttempts, idBackImage, idBackImageRequired, idCaptureVideoAudioStartsAt, idCaptureVideoAudioUrl, idCaptureVideoIdBackImage, idCaptureVideoIdFrontImage, idCaptureVideoUrl, idData, idFrontCaptureAttempts, idFrontImage, idImageResolutionCheck, manualReviewRequired, needImmediateResponse, passportImage, personalData, selfieCaptureAttempts, selfieImage, signatureData, signatureVideoUrl, uploadDocument, verifyIdWithExternalDatabases, webhooksClientTraceId, webhooksEnabled, webhooksFireOnReview, webhooksSendInputImages, webhooksSendProcessedImages, webhooksStripSpecialCharacters]);
1572
+ }, [additionalDocuments, bypassAgeValidation, bypassNameMatching, cardData, clientRequestID, companyId, customerDataMatchConfig, deduplicationEnabled, deduplicationSynchronous, documentServiceUrl, enrollmentId, expectedAudioText, geolocationResult, idBackCaptureAttempts, idBackImage, idBackImageRequired, idCaptureVideoAudioStartsAt, idCaptureVideoAudioUrl, idCaptureVideoIdBackImage, idCaptureVideoIdFrontImage, idCaptureVideoUrl, idCardForFaceMatch, idData, idFrontCaptureAttempts, idFrontImage, idImageResolutionCheck, manualReviewRequired, needImmediateResponse, passportImage, personalData, selfieCaptureAttempts, selfieImage, signatureData, signatureVideoUrl, uploadDocument, verifyIdWithExternalDatabases, webhooksClientTraceId, webhooksEnabled, webhooksFireOnReview, webhooksSendInputImages, webhooksSendProcessedImages, webhooksStripSpecialCharacters]);
1570
1573
  var defaultOnSubmit = useCallback(function () {
1571
1574
  return __awaiter(void 0, void 0, void 0, function () {
1572
1575
  var submissionResponse_1, payload, host, endpoint, response, statusMessage, submissionResponse_2, e_1, err;
@@ -12810,15 +12813,17 @@ function CompositeWizard(_a) {
12810
12813
  _o = _a.captureSignatureVideo,
12811
12814
  captureSignatureVideo = _o === void 0 ? false : _o,
12812
12815
  onCameraAccessDenied = _a.onCameraAccessDenied,
12813
- onMicrophoneAccessDenied = _a.onMicrophoneAccessDenied;
12814
- var _p = useContext(SubmissionContext),
12815
- submit = _p.submit,
12816
- submissionStatus = _p.submissionStatus,
12817
- setSignatureData = _p.setSignatureData,
12818
- setAdditionalDocuments = _p.setAdditionalDocuments;
12819
- var _q = useState(0),
12820
- checkIndex = _q[0],
12821
- setCheckIndex = _q[1];
12816
+ onMicrophoneAccessDenied = _a.onMicrophoneAccessDenied,
12817
+ _p = _a.debugMode,
12818
+ debugMode = _p === void 0 ? false : _p;
12819
+ var _q = useContext(SubmissionContext),
12820
+ submit = _q.submit,
12821
+ submissionStatus = _q.submissionStatus,
12822
+ setSignatureData = _q.setSignatureData,
12823
+ setAdditionalDocuments = _q.setAdditionalDocuments;
12824
+ var _r = useState(0),
12825
+ checkIndex = _r[0],
12826
+ setCheckIndex = _r[1];
12822
12827
  var checks = useMemo(function () {
12823
12828
  var _a, _b;
12824
12829
  var checks = __spreadArray([], userChecks, true);
@@ -12915,9 +12920,11 @@ function CompositeWizard(_a) {
12915
12920
  className: "flex"
12916
12921
  }, /*#__PURE__*/React__default.createElement(Spinner, null));
12917
12922
  case SubmissionStatus.SUBMITTED:
12918
- return /*#__PURE__*/React__default.createElement(SubmissionSuccess, null);
12923
+ if (debugMode) return /*#__PURE__*/React__default.createElement(SubmissionSuccess, null);
12924
+ return /*#__PURE__*/React__default.createElement(React__default.Fragment, null);
12919
12925
  case SubmissionStatus.FAILED:
12920
- return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, "Submission failed!");
12926
+ if (debugMode) return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, "Submission failed!");
12927
+ return /*#__PURE__*/React__default.createElement(React__default.Fragment, null);
12921
12928
  default:
12922
12929
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null);
12923
12930
  }
@@ -13427,7 +13434,8 @@ var IdValidation = function IdValidation(_a) {
13427
13434
  videoSignatureCaptureProps: videoSignatureCaptureProps,
13428
13435
  captureSignature: captureSignature,
13429
13436
  captureSignatureVideo: captureSignatureVideo,
13430
- onCameraAccessDenied: onCameraAccessDenied
13437
+ onCameraAccessDenied: onCameraAccessDenied,
13438
+ debugMode: debugMode
13431
13439
  }))));
13432
13440
  };
13433
13441
 
@@ -13533,7 +13541,8 @@ var FaceValidation = function FaceValidation(_a) {
13533
13541
  return ['FaceLiveness'];
13534
13542
  }, []),
13535
13543
  faceLivenessProps: faceLivenessProps,
13536
- onCameraAccessDenied: onCameraAccessDenied
13544
+ onCameraAccessDenied: onCameraAccessDenied,
13545
+ debugMode: debugMode
13537
13546
  }))));
13538
13547
  };
13539
13548
 
@@ -13766,7 +13775,8 @@ var IdAndFaceValidation = function IdAndFaceValidation(_a) {
13766
13775
  additionalDocumentCaptureProps: additionalDocumentCaptureProps,
13767
13776
  captureSignature: captureSignature,
13768
13777
  captureSignatureVideo: captureSignatureVideo,
13769
- onCameraAccessDenied: onCameraAccessDenied
13778
+ onCameraAccessDenied: onCameraAccessDenied,
13779
+ debugMode: debugMode
13770
13780
  }))));
13771
13781
  };
13772
13782
 
@@ -14021,7 +14031,8 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
14021
14031
  videoSignatureCaptureProps: videoSignatureCaptureProps,
14022
14032
  captureSignature: captureSignature,
14023
14033
  captureSignatureVideo: captureSignatureVideo,
14024
- onCameraAccessDenied: onCameraAccessDenied
14034
+ onCameraAccessDenied: onCameraAccessDenied,
14035
+ debugMode: debugMode
14025
14036
  }))));
14026
14037
  };
14027
14038
 
@@ -15205,6 +15216,7 @@ var SignatureKYC = function SignatureKYC(_a) {
15205
15216
  geolocationEnabled: geolocationEnabled,
15206
15217
  geolocationRequired: geolocationRequired
15207
15218
  }, /*#__PURE__*/React__default.createElement(CompositeWizard, {
15219
+ debugMode: debugMode,
15208
15220
  checks: useMemo(function () {
15209
15221
  return ['VideoSignatureCapture'];
15210
15222
  }, []),
@@ -15446,7 +15458,8 @@ var VideoIdValidation = function VideoIdValidation(_a) {
15446
15458
  captureSignature: captureSignature,
15447
15459
  captureSignatureVideo: captureSignatureVideo,
15448
15460
  onCameraAccessDenied: onCameraAccessDenied,
15449
- onMicrophoneAccessDenied: onMicrophoneAccessDenied
15461
+ onMicrophoneAccessDenied: onMicrophoneAccessDenied,
15462
+ debugMode: debugMode
15450
15463
  }))));
15451
15464
  };
15452
15465
 
@@ -15603,7 +15616,8 @@ var CustomerBiometricsEnrollment = function CustomerBiometricsEnrollment(_a) {
15603
15616
  videoSignatureCaptureProps: videoSignatureCaptureProps,
15604
15617
  captureSignature: captureSignature,
15605
15618
  captureSignatureVideo: captureSignatureVideo,
15606
- onCameraAccessDenied: onCameraAccessDenied
15619
+ onCameraAccessDenied: onCameraAccessDenied,
15620
+ debugMode: debugMode
15607
15621
  }))));
15608
15622
  };
15609
15623