idmission-web-sdk 2.2.78 → 2.2.80

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.
Files changed (31) hide show
  1. package/dist/components/customer_flows/CustomerBiometricsEnrollment.d.ts +4 -0
  2. package/dist/components/customer_flows/CustomerBiometricsEnrollment.d.ts.map +1 -1
  3. package/dist/components/customer_flows/CustomerIdAndBiometricsEnrollment.d.ts +2 -0
  4. package/dist/components/customer_flows/CustomerIdAndBiometricsEnrollment.d.ts.map +1 -1
  5. package/dist/components/customer_flows/FaceValidation.d.ts +4 -0
  6. package/dist/components/customer_flows/FaceValidation.d.ts.map +1 -1
  7. package/dist/components/customer_flows/IdAndFaceValidation.d.ts +2 -0
  8. package/dist/components/customer_flows/IdAndFaceValidation.d.ts.map +1 -1
  9. package/dist/components/customer_flows/IdValidation.d.ts +2 -0
  10. package/dist/components/customer_flows/IdValidation.d.ts.map +1 -1
  11. package/dist/components/customer_flows/VideoIdValidation.d.ts +2 -0
  12. package/dist/components/customer_flows/VideoIdValidation.d.ts.map +1 -1
  13. package/dist/components/face_liveness/FaceLivenessCapture.d.ts +3 -1
  14. package/dist/components/face_liveness/FaceLivenessCapture.d.ts.map +1 -1
  15. package/dist/components/face_liveness/FaceLivenessWizard.d.ts.map +1 -1
  16. package/dist/components/submission/SubmissionProvider.d.ts +2 -1
  17. package/dist/components/submission/SubmissionProvider.d.ts.map +1 -1
  18. package/dist/components/submission/types.d.ts +20 -0
  19. package/dist/components/submission/types.d.ts.map +1 -1
  20. package/dist/sdk2.cjs.development.js +48 -25
  21. package/dist/sdk2.cjs.development.js.map +1 -1
  22. package/dist/sdk2.cjs.production.js +1 -1
  23. package/dist/sdk2.cjs.production.js.map +1 -1
  24. package/dist/sdk2.esm.js +48 -25
  25. package/dist/sdk2.esm.js.map +1 -1
  26. package/dist/sdk2.umd.development.js +48 -25
  27. package/dist/sdk2.umd.development.js.map +1 -1
  28. package/dist/sdk2.umd.production.js +1 -1
  29. package/dist/sdk2.umd.production.js.map +1 -1
  30. package/dist/version.d.ts +1 -1
  31. package/package.json +1 -1
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.78';
206
+ var webSdkVersion = '2.2.80';
207
207
 
208
208
  function getPlatform() {
209
209
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -1155,6 +1155,7 @@ var SubmissionProvider = function SubmissionProvider(_a) {
1155
1155
  webhooksSendProcessedImages = _t === void 0 ? false : _t,
1156
1156
  _u = _a.webhooksFireOnReview,
1157
1157
  webhooksFireOnReview = _u === void 0 ? false : _u,
1158
+ webhooksFireOnReviewURL = _a.webhooksFireOnReviewURL,
1158
1159
  customerDataMatchConfig = _a.customerDataMatchConfig,
1159
1160
  precapturedDocuments = _a.precapturedDocuments,
1160
1161
  _v = _a.documentServiceUrl,
@@ -1440,6 +1441,7 @@ var SubmissionProvider = function SubmissionProvider(_a) {
1440
1441
  postDataAPIRequired: webhooksEnabled ? 'Y' : 'N',
1441
1442
  postDataAPIURL: webhooksURL,
1442
1443
  postDataOnReviewRequired: webhooksFireOnReview ? 'Y' : 'N',
1444
+ postDataOnReviewAPIURL: webhooksFireOnReviewURL,
1443
1445
  sendInputImagesInPost: webhooksSendInputImages ? 'Y' : 'N',
1444
1446
  sendProcessedImagesInPost: webhooksSendProcessedImages ? 'Y' : 'N',
1445
1447
  needImmediateResponse: needImmediateResponse ? 'Y' : 'N',
@@ -1544,7 +1546,7 @@ var SubmissionProvider = function SubmissionProvider(_a) {
1544
1546
  }
1545
1547
  });
1546
1548
  });
1547
- }, [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, webhooksURL]);
1549
+ }, [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, webhooksFireOnReviewURL, webhooksSendInputImages, webhooksSendProcessedImages, webhooksStripSpecialCharacters, webhooksURL]);
1548
1550
  var defaultOnSubmit = useCallback(function () {
1549
1551
  return __awaiter(void 0, void 0, void 0, function () {
1550
1552
  var submissionResponse_1, payload, host, endpoint, response, statusMessage, submissionResponse_2, e_1, err;
@@ -10611,6 +10613,7 @@ var reducer$2 = function reducer(state, action) {
10611
10613
  var FaceLivenessCapture = function FaceLivenessCapture(_a) {
10612
10614
  var _b, _c, _d, _e;
10613
10615
  var onCapture = _a.onCapture,
10616
+ onLivenessChecked = _a.onLivenessChecked,
10614
10617
  onSuccess = _a.onSuccess,
10615
10618
  onFailure = _a.onFailure,
10616
10619
  onTimeout = _a.onTimeout,
@@ -10683,6 +10686,7 @@ var FaceLivenessCapture = function FaceLivenessCapture(_a) {
10683
10686
  return [4 /*yield*/, _a.apply(void 0, [_b.sent()])];
10684
10687
  case 2:
10685
10688
  response = _b.sent();
10689
+ onLivenessChecked === null || onLivenessChecked === void 0 ? void 0 : onLivenessChecked(response);
10686
10690
  dispatch({
10687
10691
  type: 'livenessChecked',
10688
10692
  payload: {
@@ -10708,7 +10712,7 @@ var FaceLivenessCapture = function FaceLivenessCapture(_a) {
10708
10712
  });
10709
10713
  });
10710
10714
  })();
10711
- }, [checkLiveness, face, frame, isReady, submissionError]);
10715
+ }, [checkLiveness, face, frame, isReady, onLivenessChecked, submissionError]);
10712
10716
  var onFallbackImageCaptured = useCallback(function (imageUrl) {
10713
10717
  return __awaiter(void 0, void 0, void 0, function () {
10714
10718
  var imageData, response, e_2;
@@ -11350,6 +11354,7 @@ var FaceLivenessWizard = function FaceLivenessWizard(_a) {
11350
11354
  var captureStartedAt = useRef();
11351
11355
  var captureEndedAt = useRef();
11352
11356
  var operationStartedAt = useRef();
11357
+ var livenessScore = useRef();
11353
11358
  var _y = useContext(SelfieGuidanceModelsContext),
11354
11359
  start = _y.start,
11355
11360
  stop = _y.stop;
@@ -11360,19 +11365,21 @@ var FaceLivenessWizard = function FaceLivenessWizard(_a) {
11360
11365
  if (captureState !== 'CAPTURING') return;
11361
11366
  captureStartedAt.current = new Date();
11362
11367
  start();
11363
- return function () {
11364
- stop();
11365
- };
11368
+ return stop;
11366
11369
  }, [captureState, start, stop]);
11367
11370
  var onCapture = useCallback(function () {
11368
11371
  captureEndedAt.current = new Date();
11369
11372
  }, []);
11373
+ var onLivenessChecked = useCallback(function (resp) {
11374
+ livenessScore.current = resp.resultData.realScore;
11375
+ }, []);
11370
11376
  var logCaptureMetadata = useCallback(function () {
11371
11377
  var _a, _b, _c;
11372
11378
  logSelfieCaptureAttempt({
11373
11379
  autoCapture: 'Y',
11374
11380
  captureTime: ((_a = captureEndedAt.current) !== null && _a !== void 0 ? _a : new Date()).getTime() - ((_b = captureStartedAt.current) !== null && _b !== void 0 ? _b : new Date()).getTime(),
11375
- operationTime: new Date().getTime() - ((_c = operationStartedAt.current) !== null && _c !== void 0 ? _c : new Date()).getTime()
11381
+ operationTime: new Date().getTime() - ((_c = operationStartedAt.current) !== null && _c !== void 0 ? _c : new Date()).getTime(),
11382
+ livenessScore: livenessScore.current
11376
11383
  });
11377
11384
  operationStartedAt.current = new Date();
11378
11385
  }, [logSelfieCaptureAttempt]);
@@ -11417,7 +11424,7 @@ var FaceLivenessWizard = function FaceLivenessWizard(_a) {
11417
11424
  setCaptureState('LOADING');
11418
11425
  releaseCameraAccess();
11419
11426
  onExitCapture === null || onExitCapture === void 0 ? void 0 : onExitCapture();
11420
- requestCameraAccess();
11427
+ void requestCameraAccess();
11421
11428
  }, [onExitCapture, releaseCameraAccess, requestCameraAccess]);
11422
11429
  var onRetryCallback = useCallback(function () {
11423
11430
  logCaptureMetadata();
@@ -11429,7 +11436,7 @@ var FaceLivenessWizard = function FaceLivenessWizard(_a) {
11429
11436
  });
11430
11437
  setCaptureState('LOADING');
11431
11438
  releaseCameraAccess();
11432
- requestCameraAccess();
11439
+ void requestCameraAccess();
11433
11440
  }, [logCaptureMetadata, releaseCameraAccess, requestCameraAccess]);
11434
11441
  var onDoneCallback = useCallback(function () {
11435
11442
  logCaptureMetadata();
@@ -11467,6 +11474,7 @@ var FaceLivenessWizard = function FaceLivenessWizard(_a) {
11467
11474
  return /*#__PURE__*/React__default.createElement(FaceLivenessCapture, {
11468
11475
  key: "capture".concat(attempt),
11469
11476
  onCapture: onCapture,
11477
+ onLivenessChecked: onLivenessChecked,
11470
11478
  onSuccess: onSuccessCallback,
11471
11479
  onFailure: onFailureCallback,
11472
11480
  onTimeout: onTimeout,
@@ -14375,15 +14383,18 @@ var FaceValidation = function FaceValidation(_a) {
14375
14383
  webhooksStripSpecialCharacters = _a.webhooksStripSpecialCharacters,
14376
14384
  webhooksSendInputImages = _a.webhooksSendInputImages,
14377
14385
  webhooksSendProcessedImages = _a.webhooksSendProcessedImages,
14386
+ _c = _a.webhooksFireOnReview,
14387
+ webhooksFireOnReview = _c === void 0 ? false : _c,
14388
+ webhooksFireOnReviewURL = _a.webhooksFireOnReviewURL,
14378
14389
  sendBase64DocumentsInSwaggerProxy = _a.sendBase64DocumentsInSwaggerProxy,
14379
- _c = _a.loadingOverlayMode,
14380
- loadingOverlayMode = _c === void 0 ? 'default' : _c,
14381
- _d = _a.timeoutDurationMs,
14382
- timeoutDurationMs = _d === void 0 ? 15000 : _d,
14383
- _e = _a.modelLoadTimeoutMs,
14384
- modelLoadTimeoutMs = _e === void 0 ? defaultSelfieCaptureModelLoadTimeoutMs : _e,
14385
- _f = _a.skipSuccessScreen,
14386
- skipSuccessScreen = _f === void 0 ? false : _f,
14390
+ _d = _a.loadingOverlayMode,
14391
+ loadingOverlayMode = _d === void 0 ? 'default' : _d,
14392
+ _e = _a.timeoutDurationMs,
14393
+ timeoutDurationMs = _e === void 0 ? 15000 : _e,
14394
+ _f = _a.modelLoadTimeoutMs,
14395
+ modelLoadTimeoutMs = _f === void 0 ? defaultSelfieCaptureModelLoadTimeoutMs : _f,
14396
+ _g = _a.skipSuccessScreen,
14397
+ skipSuccessScreen = _g === void 0 ? false : _g,
14387
14398
  idCardForFaceMatch = _a.idCardForFaceMatch,
14388
14399
  onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
14389
14400
  onDocumentUploadProgress = _a.onDocumentUploadProgress,
@@ -14398,18 +14409,18 @@ var FaceValidation = function FaceValidation(_a) {
14398
14409
  onUserCancel = _a.onUserCancel,
14399
14410
  onModelError = _a.onModelError,
14400
14411
  onCameraAccessDenied = _a.onCameraAccessDenied,
14401
- _g = _a.theme,
14402
- theme = _g === void 0 ? 'default' : _g,
14412
+ _h = _a.theme,
14413
+ theme = _h === void 0 ? 'default' : _h,
14403
14414
  assets = _a.assets,
14404
14415
  classNames = _a.classNames,
14405
14416
  colors = _a.colors,
14406
14417
  verbiage = _a.verbiage,
14407
- _h = _a.geolocationEnabled,
14408
- geolocationEnabled = _h === void 0 ? true : _h,
14409
- _j = _a.geolocationRequired,
14410
- geolocationRequired = _j === void 0 ? false : _j,
14411
- _k = _a.debugMode,
14412
- debugMode = _k === void 0 ? false : _k;
14418
+ _j = _a.geolocationEnabled,
14419
+ geolocationEnabled = _j === void 0 ? true : _j,
14420
+ _k = _a.geolocationRequired,
14421
+ geolocationRequired = _k === void 0 ? false : _k,
14422
+ _l = _a.debugMode,
14423
+ debugMode = _l === void 0 ? false : _l;
14413
14424
  useLanguage(lang);
14414
14425
  useDebugLogging(debugMode);
14415
14426
  var faceLivenessProps = useMemo(function () {
@@ -14449,6 +14460,8 @@ var FaceValidation = function FaceValidation(_a) {
14449
14460
  webhooksStripSpecialCharacters: webhooksStripSpecialCharacters,
14450
14461
  webhooksSendInputImages: webhooksSendInputImages,
14451
14462
  webhooksSendProcessedImages: webhooksSendProcessedImages,
14463
+ webhooksFireOnReview: webhooksFireOnReview,
14464
+ webhooksFireOnReviewURL: webhooksFireOnReviewURL,
14452
14465
  sendBase64DocumentsInSwaggerProxy: sendBase64DocumentsInSwaggerProxy,
14453
14466
  idCardForFaceMatch: idCardForFaceMatch,
14454
14467
  onBeforeDocumentUpload: onBeforeDocumentUpload,
@@ -14495,6 +14508,7 @@ var IdAndFaceValidation = function IdAndFaceValidation(_a) {
14495
14508
  webhooksSendInputImages = _a.webhooksSendInputImages,
14496
14509
  webhooksSendProcessedImages = _a.webhooksSendProcessedImages,
14497
14510
  webhooksFireOnReview = _a.webhooksFireOnReview,
14511
+ webhooksFireOnReviewURL = _a.webhooksFireOnReviewURL,
14498
14512
  sendBase64DocumentsInSwaggerProxy = _a.sendBase64DocumentsInSwaggerProxy,
14499
14513
  customerDataMatchConfig = _a.customerDataMatchConfig,
14500
14514
  precapturedDocuments = _a.precapturedDocuments,
@@ -14680,6 +14694,7 @@ var IdAndFaceValidation = function IdAndFaceValidation(_a) {
14680
14694
  webhooksSendInputImages: webhooksSendInputImages,
14681
14695
  webhooksSendProcessedImages: webhooksSendProcessedImages,
14682
14696
  webhooksFireOnReview: webhooksFireOnReview,
14697
+ webhooksFireOnReviewURL: webhooksFireOnReviewURL,
14683
14698
  sendBase64DocumentsInSwaggerProxy: sendBase64DocumentsInSwaggerProxy,
14684
14699
  customerDataMatchConfig: customerDataMatchConfig,
14685
14700
  precapturedDocuments: precapturedDocuments,
@@ -14738,6 +14753,7 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
14738
14753
  webhooksSendInputImages = _a.webhooksSendInputImages,
14739
14754
  webhooksSendProcessedImages = _a.webhooksSendProcessedImages,
14740
14755
  webhooksFireOnReview = _a.webhooksFireOnReview,
14756
+ webhooksFireOnReviewURL = _a.webhooksFireOnReviewURL,
14741
14757
  sendBase64DocumentsInSwaggerProxy = _a.sendBase64DocumentsInSwaggerProxy,
14742
14758
  customerDataMatchConfig = _a.customerDataMatchConfig,
14743
14759
  _c = _a.idCaptureLoadingOverlayMode,
@@ -14942,6 +14958,7 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
14942
14958
  webhooksSendInputImages: webhooksSendInputImages,
14943
14959
  webhooksSendProcessedImages: webhooksSendProcessedImages,
14944
14960
  webhooksFireOnReview: webhooksFireOnReview,
14961
+ webhooksFireOnReviewURL: webhooksFireOnReviewURL,
14945
14962
  sendBase64DocumentsInSwaggerProxy: sendBase64DocumentsInSwaggerProxy,
14946
14963
  customerDataMatchConfig: customerDataMatchConfig,
14947
14964
  onBeforeDocumentUpload: onBeforeDocumentUpload,
@@ -16205,6 +16222,7 @@ var VideoIdValidation = function VideoIdValidation(_a) {
16205
16222
  webhooksSendInputImages = _a.webhooksSendInputImages,
16206
16223
  webhooksSendProcessedImages = _a.webhooksSendProcessedImages,
16207
16224
  webhooksFireOnReview = _a.webhooksFireOnReview,
16225
+ webhooksFireOnReviewURL = _a.webhooksFireOnReviewURL,
16208
16226
  sendBase64DocumentsInSwaggerProxy = _a.sendBase64DocumentsInSwaggerProxy,
16209
16227
  customerDataMatchConfig = _a.customerDataMatchConfig,
16210
16228
  onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
@@ -16373,6 +16391,7 @@ var VideoIdValidation = function VideoIdValidation(_a) {
16373
16391
  webhooksSendInputImages: webhooksSendInputImages,
16374
16392
  webhooksSendProcessedImages: webhooksSendProcessedImages,
16375
16393
  webhooksFireOnReview: webhooksFireOnReview,
16394
+ webhooksFireOnReviewURL: webhooksFireOnReviewURL,
16376
16395
  sendBase64DocumentsInSwaggerProxy: sendBase64DocumentsInSwaggerProxy,
16377
16396
  customerDataMatchConfig: customerDataMatchConfig,
16378
16397
  idCardForFaceMatch: idCardForFaceMatch,
@@ -16420,6 +16439,8 @@ var CustomerBiometricsEnrollment = function CustomerBiometricsEnrollment(_a) {
16420
16439
  webhooksStripSpecialCharacters = _a.webhooksStripSpecialCharacters,
16421
16440
  webhooksSendInputImages = _a.webhooksSendInputImages,
16422
16441
  webhooksSendProcessedImages = _a.webhooksSendProcessedImages,
16442
+ webhooksFireOnReview = _a.webhooksFireOnReview,
16443
+ webhooksFireOnReviewURL = _a.webhooksFireOnReviewURL,
16423
16444
  sendBase64DocumentsInSwaggerProxy = _a.sendBase64DocumentsInSwaggerProxy,
16424
16445
  _c = _a.loadingOverlayMode,
16425
16446
  loadingOverlayMode = _c === void 0 ? 'default' : _c,
@@ -16536,6 +16557,8 @@ var CustomerBiometricsEnrollment = function CustomerBiometricsEnrollment(_a) {
16536
16557
  webhooksStripSpecialCharacters: webhooksStripSpecialCharacters,
16537
16558
  webhooksSendInputImages: webhooksSendInputImages,
16538
16559
  webhooksSendProcessedImages: webhooksSendProcessedImages,
16560
+ webhooksFireOnReview: webhooksFireOnReview,
16561
+ webhooksFireOnReviewURL: webhooksFireOnReviewURL,
16539
16562
  sendBase64DocumentsInSwaggerProxy: sendBase64DocumentsInSwaggerProxy,
16540
16563
  onBeforeDocumentUpload: onBeforeDocumentUpload,
16541
16564
  onDocumentUploadProgress: onDocumentUploadProgress,