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
@@ -234,7 +234,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
234
234
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
235
235
  };
236
236
 
237
- var webSdkVersion = '2.2.78';
237
+ var webSdkVersion = '2.2.80';
238
238
 
239
239
  function getPlatform() {
240
240
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -1186,6 +1186,7 @@ var SubmissionProvider = function SubmissionProvider(_a) {
1186
1186
  webhooksSendProcessedImages = _t === void 0 ? false : _t,
1187
1187
  _u = _a.webhooksFireOnReview,
1188
1188
  webhooksFireOnReview = _u === void 0 ? false : _u,
1189
+ webhooksFireOnReviewURL = _a.webhooksFireOnReviewURL,
1189
1190
  customerDataMatchConfig = _a.customerDataMatchConfig,
1190
1191
  precapturedDocuments = _a.precapturedDocuments,
1191
1192
  _v = _a.documentServiceUrl,
@@ -1471,6 +1472,7 @@ var SubmissionProvider = function SubmissionProvider(_a) {
1471
1472
  postDataAPIRequired: webhooksEnabled ? 'Y' : 'N',
1472
1473
  postDataAPIURL: webhooksURL,
1473
1474
  postDataOnReviewRequired: webhooksFireOnReview ? 'Y' : 'N',
1475
+ postDataOnReviewAPIURL: webhooksFireOnReviewURL,
1474
1476
  sendInputImagesInPost: webhooksSendInputImages ? 'Y' : 'N',
1475
1477
  sendProcessedImagesInPost: webhooksSendProcessedImages ? 'Y' : 'N',
1476
1478
  needImmediateResponse: needImmediateResponse ? 'Y' : 'N',
@@ -1575,7 +1577,7 @@ var SubmissionProvider = function SubmissionProvider(_a) {
1575
1577
  }
1576
1578
  });
1577
1579
  });
1578
- }, [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]);
1580
+ }, [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]);
1579
1581
  var defaultOnSubmit = React.useCallback(function () {
1580
1582
  return __awaiter(void 0, void 0, void 0, function () {
1581
1583
  var submissionResponse_1, payload, host, endpoint, response, statusMessage, submissionResponse_2, e_1, err;
@@ -10642,6 +10644,7 @@ var reducer$2 = function reducer(state, action) {
10642
10644
  var FaceLivenessCapture = function FaceLivenessCapture(_a) {
10643
10645
  var _b, _c, _d, _e;
10644
10646
  var onCapture = _a.onCapture,
10647
+ onLivenessChecked = _a.onLivenessChecked,
10645
10648
  onSuccess = _a.onSuccess,
10646
10649
  onFailure = _a.onFailure,
10647
10650
  onTimeout = _a.onTimeout,
@@ -10714,6 +10717,7 @@ var FaceLivenessCapture = function FaceLivenessCapture(_a) {
10714
10717
  return [4 /*yield*/, _a.apply(void 0, [_b.sent()])];
10715
10718
  case 2:
10716
10719
  response = _b.sent();
10720
+ onLivenessChecked === null || onLivenessChecked === void 0 ? void 0 : onLivenessChecked(response);
10717
10721
  dispatch({
10718
10722
  type: 'livenessChecked',
10719
10723
  payload: {
@@ -10739,7 +10743,7 @@ var FaceLivenessCapture = function FaceLivenessCapture(_a) {
10739
10743
  });
10740
10744
  });
10741
10745
  })();
10742
- }, [checkLiveness, face, frame, isReady, submissionError]);
10746
+ }, [checkLiveness, face, frame, isReady, onLivenessChecked, submissionError]);
10743
10747
  var onFallbackImageCaptured = React.useCallback(function (imageUrl) {
10744
10748
  return __awaiter(void 0, void 0, void 0, function () {
10745
10749
  var imageData, response, e_2;
@@ -11381,6 +11385,7 @@ var FaceLivenessWizard = function FaceLivenessWizard(_a) {
11381
11385
  var captureStartedAt = React.useRef();
11382
11386
  var captureEndedAt = React.useRef();
11383
11387
  var operationStartedAt = React.useRef();
11388
+ var livenessScore = React.useRef();
11384
11389
  var _y = React.useContext(SelfieGuidanceModelsContext),
11385
11390
  start = _y.start,
11386
11391
  stop = _y.stop;
@@ -11391,19 +11396,21 @@ var FaceLivenessWizard = function FaceLivenessWizard(_a) {
11391
11396
  if (captureState !== 'CAPTURING') return;
11392
11397
  captureStartedAt.current = new Date();
11393
11398
  start();
11394
- return function () {
11395
- stop();
11396
- };
11399
+ return stop;
11397
11400
  }, [captureState, start, stop]);
11398
11401
  var onCapture = React.useCallback(function () {
11399
11402
  captureEndedAt.current = new Date();
11400
11403
  }, []);
11404
+ var onLivenessChecked = React.useCallback(function (resp) {
11405
+ livenessScore.current = resp.resultData.realScore;
11406
+ }, []);
11401
11407
  var logCaptureMetadata = React.useCallback(function () {
11402
11408
  var _a, _b, _c;
11403
11409
  logSelfieCaptureAttempt({
11404
11410
  autoCapture: 'Y',
11405
11411
  captureTime: ((_a = captureEndedAt.current) !== null && _a !== void 0 ? _a : new Date()).getTime() - ((_b = captureStartedAt.current) !== null && _b !== void 0 ? _b : new Date()).getTime(),
11406
- operationTime: new Date().getTime() - ((_c = operationStartedAt.current) !== null && _c !== void 0 ? _c : new Date()).getTime()
11412
+ operationTime: new Date().getTime() - ((_c = operationStartedAt.current) !== null && _c !== void 0 ? _c : new Date()).getTime(),
11413
+ livenessScore: livenessScore.current
11407
11414
  });
11408
11415
  operationStartedAt.current = new Date();
11409
11416
  }, [logSelfieCaptureAttempt]);
@@ -11448,7 +11455,7 @@ var FaceLivenessWizard = function FaceLivenessWizard(_a) {
11448
11455
  setCaptureState('LOADING');
11449
11456
  releaseCameraAccess();
11450
11457
  onExitCapture === null || onExitCapture === void 0 ? void 0 : onExitCapture();
11451
- requestCameraAccess();
11458
+ void requestCameraAccess();
11452
11459
  }, [onExitCapture, releaseCameraAccess, requestCameraAccess]);
11453
11460
  var onRetryCallback = React.useCallback(function () {
11454
11461
  logCaptureMetadata();
@@ -11460,7 +11467,7 @@ var FaceLivenessWizard = function FaceLivenessWizard(_a) {
11460
11467
  });
11461
11468
  setCaptureState('LOADING');
11462
11469
  releaseCameraAccess();
11463
- requestCameraAccess();
11470
+ void requestCameraAccess();
11464
11471
  }, [logCaptureMetadata, releaseCameraAccess, requestCameraAccess]);
11465
11472
  var onDoneCallback = React.useCallback(function () {
11466
11473
  logCaptureMetadata();
@@ -11498,6 +11505,7 @@ var FaceLivenessWizard = function FaceLivenessWizard(_a) {
11498
11505
  return /*#__PURE__*/React__namespace.default.createElement(FaceLivenessCapture, {
11499
11506
  key: "capture".concat(attempt),
11500
11507
  onCapture: onCapture,
11508
+ onLivenessChecked: onLivenessChecked,
11501
11509
  onSuccess: onSuccessCallback,
11502
11510
  onFailure: onFailureCallback,
11503
11511
  onTimeout: onTimeout,
@@ -14406,15 +14414,18 @@ var FaceValidation = function FaceValidation(_a) {
14406
14414
  webhooksStripSpecialCharacters = _a.webhooksStripSpecialCharacters,
14407
14415
  webhooksSendInputImages = _a.webhooksSendInputImages,
14408
14416
  webhooksSendProcessedImages = _a.webhooksSendProcessedImages,
14417
+ _c = _a.webhooksFireOnReview,
14418
+ webhooksFireOnReview = _c === void 0 ? false : _c,
14419
+ webhooksFireOnReviewURL = _a.webhooksFireOnReviewURL,
14409
14420
  sendBase64DocumentsInSwaggerProxy = _a.sendBase64DocumentsInSwaggerProxy,
14410
- _c = _a.loadingOverlayMode,
14411
- loadingOverlayMode = _c === void 0 ? 'default' : _c,
14412
- _d = _a.timeoutDurationMs,
14413
- timeoutDurationMs = _d === void 0 ? 15000 : _d,
14414
- _e = _a.modelLoadTimeoutMs,
14415
- modelLoadTimeoutMs = _e === void 0 ? defaultSelfieCaptureModelLoadTimeoutMs : _e,
14416
- _f = _a.skipSuccessScreen,
14417
- skipSuccessScreen = _f === void 0 ? false : _f,
14421
+ _d = _a.loadingOverlayMode,
14422
+ loadingOverlayMode = _d === void 0 ? 'default' : _d,
14423
+ _e = _a.timeoutDurationMs,
14424
+ timeoutDurationMs = _e === void 0 ? 15000 : _e,
14425
+ _f = _a.modelLoadTimeoutMs,
14426
+ modelLoadTimeoutMs = _f === void 0 ? defaultSelfieCaptureModelLoadTimeoutMs : _f,
14427
+ _g = _a.skipSuccessScreen,
14428
+ skipSuccessScreen = _g === void 0 ? false : _g,
14418
14429
  idCardForFaceMatch = _a.idCardForFaceMatch,
14419
14430
  onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
14420
14431
  onDocumentUploadProgress = _a.onDocumentUploadProgress,
@@ -14429,18 +14440,18 @@ var FaceValidation = function FaceValidation(_a) {
14429
14440
  onUserCancel = _a.onUserCancel,
14430
14441
  onModelError = _a.onModelError,
14431
14442
  onCameraAccessDenied = _a.onCameraAccessDenied,
14432
- _g = _a.theme,
14433
- theme = _g === void 0 ? 'default' : _g,
14443
+ _h = _a.theme,
14444
+ theme = _h === void 0 ? 'default' : _h,
14434
14445
  assets = _a.assets,
14435
14446
  classNames = _a.classNames,
14436
14447
  colors = _a.colors,
14437
14448
  verbiage = _a.verbiage,
14438
- _h = _a.geolocationEnabled,
14439
- geolocationEnabled = _h === void 0 ? true : _h,
14440
- _j = _a.geolocationRequired,
14441
- geolocationRequired = _j === void 0 ? false : _j,
14442
- _k = _a.debugMode,
14443
- debugMode = _k === void 0 ? false : _k;
14449
+ _j = _a.geolocationEnabled,
14450
+ geolocationEnabled = _j === void 0 ? true : _j,
14451
+ _k = _a.geolocationRequired,
14452
+ geolocationRequired = _k === void 0 ? false : _k,
14453
+ _l = _a.debugMode,
14454
+ debugMode = _l === void 0 ? false : _l;
14444
14455
  useLanguage(lang);
14445
14456
  useDebugLogging(debugMode);
14446
14457
  var faceLivenessProps = React.useMemo(function () {
@@ -14480,6 +14491,8 @@ var FaceValidation = function FaceValidation(_a) {
14480
14491
  webhooksStripSpecialCharacters: webhooksStripSpecialCharacters,
14481
14492
  webhooksSendInputImages: webhooksSendInputImages,
14482
14493
  webhooksSendProcessedImages: webhooksSendProcessedImages,
14494
+ webhooksFireOnReview: webhooksFireOnReview,
14495
+ webhooksFireOnReviewURL: webhooksFireOnReviewURL,
14483
14496
  sendBase64DocumentsInSwaggerProxy: sendBase64DocumentsInSwaggerProxy,
14484
14497
  idCardForFaceMatch: idCardForFaceMatch,
14485
14498
  onBeforeDocumentUpload: onBeforeDocumentUpload,
@@ -14526,6 +14539,7 @@ var IdAndFaceValidation = function IdAndFaceValidation(_a) {
14526
14539
  webhooksSendInputImages = _a.webhooksSendInputImages,
14527
14540
  webhooksSendProcessedImages = _a.webhooksSendProcessedImages,
14528
14541
  webhooksFireOnReview = _a.webhooksFireOnReview,
14542
+ webhooksFireOnReviewURL = _a.webhooksFireOnReviewURL,
14529
14543
  sendBase64DocumentsInSwaggerProxy = _a.sendBase64DocumentsInSwaggerProxy,
14530
14544
  customerDataMatchConfig = _a.customerDataMatchConfig,
14531
14545
  precapturedDocuments = _a.precapturedDocuments,
@@ -14711,6 +14725,7 @@ var IdAndFaceValidation = function IdAndFaceValidation(_a) {
14711
14725
  webhooksSendInputImages: webhooksSendInputImages,
14712
14726
  webhooksSendProcessedImages: webhooksSendProcessedImages,
14713
14727
  webhooksFireOnReview: webhooksFireOnReview,
14728
+ webhooksFireOnReviewURL: webhooksFireOnReviewURL,
14714
14729
  sendBase64DocumentsInSwaggerProxy: sendBase64DocumentsInSwaggerProxy,
14715
14730
  customerDataMatchConfig: customerDataMatchConfig,
14716
14731
  precapturedDocuments: precapturedDocuments,
@@ -14769,6 +14784,7 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
14769
14784
  webhooksSendInputImages = _a.webhooksSendInputImages,
14770
14785
  webhooksSendProcessedImages = _a.webhooksSendProcessedImages,
14771
14786
  webhooksFireOnReview = _a.webhooksFireOnReview,
14787
+ webhooksFireOnReviewURL = _a.webhooksFireOnReviewURL,
14772
14788
  sendBase64DocumentsInSwaggerProxy = _a.sendBase64DocumentsInSwaggerProxy,
14773
14789
  customerDataMatchConfig = _a.customerDataMatchConfig,
14774
14790
  _c = _a.idCaptureLoadingOverlayMode,
@@ -14973,6 +14989,7 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
14973
14989
  webhooksSendInputImages: webhooksSendInputImages,
14974
14990
  webhooksSendProcessedImages: webhooksSendProcessedImages,
14975
14991
  webhooksFireOnReview: webhooksFireOnReview,
14992
+ webhooksFireOnReviewURL: webhooksFireOnReviewURL,
14976
14993
  sendBase64DocumentsInSwaggerProxy: sendBase64DocumentsInSwaggerProxy,
14977
14994
  customerDataMatchConfig: customerDataMatchConfig,
14978
14995
  onBeforeDocumentUpload: onBeforeDocumentUpload,
@@ -16236,6 +16253,7 @@ var VideoIdValidation = function VideoIdValidation(_a) {
16236
16253
  webhooksSendInputImages = _a.webhooksSendInputImages,
16237
16254
  webhooksSendProcessedImages = _a.webhooksSendProcessedImages,
16238
16255
  webhooksFireOnReview = _a.webhooksFireOnReview,
16256
+ webhooksFireOnReviewURL = _a.webhooksFireOnReviewURL,
16239
16257
  sendBase64DocumentsInSwaggerProxy = _a.sendBase64DocumentsInSwaggerProxy,
16240
16258
  customerDataMatchConfig = _a.customerDataMatchConfig,
16241
16259
  onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
@@ -16404,6 +16422,7 @@ var VideoIdValidation = function VideoIdValidation(_a) {
16404
16422
  webhooksSendInputImages: webhooksSendInputImages,
16405
16423
  webhooksSendProcessedImages: webhooksSendProcessedImages,
16406
16424
  webhooksFireOnReview: webhooksFireOnReview,
16425
+ webhooksFireOnReviewURL: webhooksFireOnReviewURL,
16407
16426
  sendBase64DocumentsInSwaggerProxy: sendBase64DocumentsInSwaggerProxy,
16408
16427
  customerDataMatchConfig: customerDataMatchConfig,
16409
16428
  idCardForFaceMatch: idCardForFaceMatch,
@@ -16451,6 +16470,8 @@ var CustomerBiometricsEnrollment = function CustomerBiometricsEnrollment(_a) {
16451
16470
  webhooksStripSpecialCharacters = _a.webhooksStripSpecialCharacters,
16452
16471
  webhooksSendInputImages = _a.webhooksSendInputImages,
16453
16472
  webhooksSendProcessedImages = _a.webhooksSendProcessedImages,
16473
+ webhooksFireOnReview = _a.webhooksFireOnReview,
16474
+ webhooksFireOnReviewURL = _a.webhooksFireOnReviewURL,
16454
16475
  sendBase64DocumentsInSwaggerProxy = _a.sendBase64DocumentsInSwaggerProxy,
16455
16476
  _c = _a.loadingOverlayMode,
16456
16477
  loadingOverlayMode = _c === void 0 ? 'default' : _c,
@@ -16567,6 +16588,8 @@ var CustomerBiometricsEnrollment = function CustomerBiometricsEnrollment(_a) {
16567
16588
  webhooksStripSpecialCharacters: webhooksStripSpecialCharacters,
16568
16589
  webhooksSendInputImages: webhooksSendInputImages,
16569
16590
  webhooksSendProcessedImages: webhooksSendProcessedImages,
16591
+ webhooksFireOnReview: webhooksFireOnReview,
16592
+ webhooksFireOnReviewURL: webhooksFireOnReviewURL,
16570
16593
  sendBase64DocumentsInSwaggerProxy: sendBase64DocumentsInSwaggerProxy,
16571
16594
  onBeforeDocumentUpload: onBeforeDocumentUpload,
16572
16595
  onDocumentUploadProgress: onDocumentUploadProgress,