idmission-web-sdk 2.2.53 → 2.2.54

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.54';
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;