idmission-web-sdk 2.2.79 → 2.2.81

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 (28) 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/submission/SubmissionProvider.d.ts +2 -1
  14. package/dist/components/submission/SubmissionProvider.d.ts.map +1 -1
  15. package/dist/components/submission/types.d.ts +1 -0
  16. package/dist/components/submission/types.d.ts.map +1 -1
  17. package/dist/sdk2.cjs.development.js +69 -39
  18. package/dist/sdk2.cjs.development.js.map +1 -1
  19. package/dist/sdk2.cjs.production.js +1 -1
  20. package/dist/sdk2.cjs.production.js.map +1 -1
  21. package/dist/sdk2.esm.js +69 -39
  22. package/dist/sdk2.esm.js.map +1 -1
  23. package/dist/sdk2.umd.development.js +69 -39
  24. package/dist/sdk2.umd.development.js.map +1 -1
  25. package/dist/sdk2.umd.production.js +1 -1
  26. package/dist/sdk2.umd.production.js.map +1 -1
  27. package/dist/version.d.ts +1 -1
  28. package/package.json +1 -1
@@ -211,7 +211,7 @@
211
211
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
212
212
  };
213
213
 
214
- var webSdkVersion = '2.2.79';
214
+ var webSdkVersion = '2.2.81';
215
215
 
216
216
  function getPlatform() {
217
217
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -2127,6 +2127,7 @@
2127
2127
  webhooksSendProcessedImages = _t === void 0 ? false : _t,
2128
2128
  _u = _a.webhooksFireOnReview,
2129
2129
  webhooksFireOnReview = _u === void 0 ? false : _u,
2130
+ webhooksFireOnReviewURL = _a.webhooksFireOnReviewURL,
2130
2131
  customerDataMatchConfig = _a.customerDataMatchConfig,
2131
2132
  precapturedDocuments = _a.precapturedDocuments,
2132
2133
  _v = _a.documentServiceUrl,
@@ -2412,6 +2413,7 @@
2412
2413
  postDataAPIRequired: webhooksEnabled ? 'Y' : 'N',
2413
2414
  postDataAPIURL: webhooksURL,
2414
2415
  postDataOnReviewRequired: webhooksFireOnReview ? 'Y' : 'N',
2416
+ postDataOnReviewAPIURL: webhooksFireOnReviewURL,
2415
2417
  sendInputImagesInPost: webhooksSendInputImages ? 'Y' : 'N',
2416
2418
  sendProcessedImagesInPost: webhooksSendProcessedImages ? 'Y' : 'N',
2417
2419
  needImmediateResponse: needImmediateResponse ? 'Y' : 'N',
@@ -2516,7 +2518,7 @@
2516
2518
  }
2517
2519
  });
2518
2520
  });
2519
- }, [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]);
2521
+ }, [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]);
2520
2522
  var defaultOnSubmit = React.useCallback(function () {
2521
2523
  return __awaiter(void 0, void 0, void 0, function () {
2522
2524
  var submissionResponse_1, payload, host, endpoint, response, statusMessage, submissionResponse_2, e_1, err;
@@ -2616,28 +2618,41 @@
2616
2618
  }, [buildSubmissionPayload, defaultOnSubmit]);
2617
2619
  var buildLivenessCheckPayload = React.useCallback(function (imageDataUrl) {
2618
2620
  return __awaiter(void 0, void 0, void 0, function () {
2619
- var request, onBeforeLivenessCheckResult;
2620
- var _a, _b, _c;
2621
- return __generator(this, function (_d) {
2622
- switch (_d.label) {
2621
+ var selfie, request, onBeforeLivenessCheckResult;
2622
+ return __generator(this, function (_a) {
2623
+ switch (_a.label) {
2623
2624
  case 0:
2624
- _a = {
2625
+ selfie = imageDataUrl;
2626
+ if (!documentServiceUrl) return [3 /*break*/, 2];
2627
+ if (!selfie.startsWith('data:')) {
2628
+ selfie = "data:image/jpeg;base64,".concat(selfie);
2629
+ }
2630
+ return [4 /*yield*/, uploadDocument(selfie, {
2631
+ filename: 'liveness',
2632
+ filetype: 'image/jpeg'
2633
+ })];
2634
+ case 1:
2635
+ selfie = _a.sent();
2636
+ _a.label = 2;
2637
+ case 2:
2638
+ request = {
2625
2639
  securityData: {
2626
2640
  userName: '',
2627
2641
  password: '',
2628
2642
  merchantId: 0
2643
+ },
2644
+ customerData: {
2645
+ biometricData: {
2646
+ selfie: selfie
2647
+ }
2648
+ },
2649
+ additionalData: {
2650
+ uniqueRequestId: new Date().getTime().toString(),
2651
+ stripSpecialCharacters: webhooksStripSpecialCharacters ? 'Y' : 'N',
2652
+ estimateAge: 'N',
2653
+ predictGender: 'N'
2629
2654
  }
2630
2655
  };
2631
- _b = {};
2632
- _c = {};
2633
- return [4 /*yield*/, dataUrlToBase64(imageDataUrl)];
2634
- case 1:
2635
- request = (_a.customerData = (_b.biometricData = (_c.selfie = _d.sent(), _c), _b), _a.additionalData = {
2636
- uniqueRequestId: new Date().getTime().toString(),
2637
- stripSpecialCharacters: webhooksStripSpecialCharacters ? 'Y' : 'N',
2638
- estimateAge: 'N',
2639
- predictGender: 'N'
2640
- }, _a);
2641
2656
  if (clientRequestID) {
2642
2657
  request.additionalData.clientRequestID = clientRequestID;
2643
2658
  }
@@ -2656,19 +2671,19 @@
2656
2671
  idBackCaptureAttempts: idBackCaptureAttempts,
2657
2672
  geolocationResult: geolocationResult
2658
2673
  });
2659
- if (!onBeforeLivenessCheck.current) return [3 /*break*/, 3];
2674
+ if (!onBeforeLivenessCheck.current) return [3 /*break*/, 4];
2660
2675
  return [4 /*yield*/, onBeforeLivenessCheck.current(request)];
2661
- case 2:
2662
- onBeforeLivenessCheckResult = _d.sent();
2663
- if (onBeforeLivenessCheckResult) request = onBeforeLivenessCheckResult;
2664
- _d.label = 3;
2665
2676
  case 3:
2677
+ onBeforeLivenessCheckResult = _a.sent();
2678
+ if (onBeforeLivenessCheckResult) request = onBeforeLivenessCheckResult;
2679
+ _a.label = 4;
2680
+ case 4:
2666
2681
  setLivenessCheckRequest(request);
2667
2682
  return [2 /*return*/, request];
2668
2683
  }
2669
2684
  });
2670
2685
  });
2671
- }, [clientRequestID, geolocationResult, idBackCaptureAttempts, idCardForFaceMatch, idFrontCaptureAttempts, selfieCaptureAttempts, webhooksStripSpecialCharacters]);
2686
+ }, [clientRequestID, documentServiceUrl, geolocationResult, idBackCaptureAttempts, idCardForFaceMatch, idFrontCaptureAttempts, selfieCaptureAttempts, uploadDocument, webhooksStripSpecialCharacters]);
2672
2687
  var checkLiveness = React.useCallback(function (imageDataUrl) {
2673
2688
  return __awaiter(void 0, void 0, void 0, function () {
2674
2689
  var request, host, endpoint, response, statusMessage, submissionResponse_3, e_2, err;
@@ -24223,15 +24238,18 @@
24223
24238
  webhooksStripSpecialCharacters = _a.webhooksStripSpecialCharacters,
24224
24239
  webhooksSendInputImages = _a.webhooksSendInputImages,
24225
24240
  webhooksSendProcessedImages = _a.webhooksSendProcessedImages,
24241
+ _c = _a.webhooksFireOnReview,
24242
+ webhooksFireOnReview = _c === void 0 ? false : _c,
24243
+ webhooksFireOnReviewURL = _a.webhooksFireOnReviewURL,
24226
24244
  sendBase64DocumentsInSwaggerProxy = _a.sendBase64DocumentsInSwaggerProxy,
24227
- _c = _a.loadingOverlayMode,
24228
- loadingOverlayMode = _c === void 0 ? 'default' : _c,
24229
- _d = _a.timeoutDurationMs,
24230
- timeoutDurationMs = _d === void 0 ? 15000 : _d,
24231
- _e = _a.modelLoadTimeoutMs,
24232
- modelLoadTimeoutMs = _e === void 0 ? defaultSelfieCaptureModelLoadTimeoutMs : _e,
24233
- _f = _a.skipSuccessScreen,
24234
- skipSuccessScreen = _f === void 0 ? false : _f,
24245
+ _d = _a.loadingOverlayMode,
24246
+ loadingOverlayMode = _d === void 0 ? 'default' : _d,
24247
+ _e = _a.timeoutDurationMs,
24248
+ timeoutDurationMs = _e === void 0 ? 15000 : _e,
24249
+ _f = _a.modelLoadTimeoutMs,
24250
+ modelLoadTimeoutMs = _f === void 0 ? defaultSelfieCaptureModelLoadTimeoutMs : _f,
24251
+ _g = _a.skipSuccessScreen,
24252
+ skipSuccessScreen = _g === void 0 ? false : _g,
24235
24253
  idCardForFaceMatch = _a.idCardForFaceMatch,
24236
24254
  onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
24237
24255
  onDocumentUploadProgress = _a.onDocumentUploadProgress,
@@ -24246,18 +24264,18 @@
24246
24264
  onUserCancel = _a.onUserCancel,
24247
24265
  onModelError = _a.onModelError,
24248
24266
  onCameraAccessDenied = _a.onCameraAccessDenied,
24249
- _g = _a.theme,
24250
- theme = _g === void 0 ? 'default' : _g,
24267
+ _h = _a.theme,
24268
+ theme = _h === void 0 ? 'default' : _h,
24251
24269
  assets = _a.assets,
24252
24270
  classNames = _a.classNames,
24253
24271
  colors = _a.colors,
24254
24272
  verbiage = _a.verbiage,
24255
- _h = _a.geolocationEnabled,
24256
- geolocationEnabled = _h === void 0 ? true : _h,
24257
- _j = _a.geolocationRequired,
24258
- geolocationRequired = _j === void 0 ? false : _j,
24259
- _k = _a.debugMode,
24260
- debugMode = _k === void 0 ? false : _k;
24273
+ _j = _a.geolocationEnabled,
24274
+ geolocationEnabled = _j === void 0 ? true : _j,
24275
+ _k = _a.geolocationRequired,
24276
+ geolocationRequired = _k === void 0 ? false : _k,
24277
+ _l = _a.debugMode,
24278
+ debugMode = _l === void 0 ? false : _l;
24261
24279
  useLanguage(lang);
24262
24280
  useDebugLogging(debugMode);
24263
24281
  var faceLivenessProps = React.useMemo(function () {
@@ -24297,6 +24315,8 @@
24297
24315
  webhooksStripSpecialCharacters: webhooksStripSpecialCharacters,
24298
24316
  webhooksSendInputImages: webhooksSendInputImages,
24299
24317
  webhooksSendProcessedImages: webhooksSendProcessedImages,
24318
+ webhooksFireOnReview: webhooksFireOnReview,
24319
+ webhooksFireOnReviewURL: webhooksFireOnReviewURL,
24300
24320
  sendBase64DocumentsInSwaggerProxy: sendBase64DocumentsInSwaggerProxy,
24301
24321
  idCardForFaceMatch: idCardForFaceMatch,
24302
24322
  onBeforeDocumentUpload: onBeforeDocumentUpload,
@@ -24343,6 +24363,7 @@
24343
24363
  webhooksSendInputImages = _a.webhooksSendInputImages,
24344
24364
  webhooksSendProcessedImages = _a.webhooksSendProcessedImages,
24345
24365
  webhooksFireOnReview = _a.webhooksFireOnReview,
24366
+ webhooksFireOnReviewURL = _a.webhooksFireOnReviewURL,
24346
24367
  sendBase64DocumentsInSwaggerProxy = _a.sendBase64DocumentsInSwaggerProxy,
24347
24368
  customerDataMatchConfig = _a.customerDataMatchConfig,
24348
24369
  precapturedDocuments = _a.precapturedDocuments,
@@ -24528,6 +24549,7 @@
24528
24549
  webhooksSendInputImages: webhooksSendInputImages,
24529
24550
  webhooksSendProcessedImages: webhooksSendProcessedImages,
24530
24551
  webhooksFireOnReview: webhooksFireOnReview,
24552
+ webhooksFireOnReviewURL: webhooksFireOnReviewURL,
24531
24553
  sendBase64DocumentsInSwaggerProxy: sendBase64DocumentsInSwaggerProxy,
24532
24554
  customerDataMatchConfig: customerDataMatchConfig,
24533
24555
  precapturedDocuments: precapturedDocuments,
@@ -24586,6 +24608,7 @@
24586
24608
  webhooksSendInputImages = _a.webhooksSendInputImages,
24587
24609
  webhooksSendProcessedImages = _a.webhooksSendProcessedImages,
24588
24610
  webhooksFireOnReview = _a.webhooksFireOnReview,
24611
+ webhooksFireOnReviewURL = _a.webhooksFireOnReviewURL,
24589
24612
  sendBase64DocumentsInSwaggerProxy = _a.sendBase64DocumentsInSwaggerProxy,
24590
24613
  customerDataMatchConfig = _a.customerDataMatchConfig,
24591
24614
  _c = _a.idCaptureLoadingOverlayMode,
@@ -24790,6 +24813,7 @@
24790
24813
  webhooksSendInputImages: webhooksSendInputImages,
24791
24814
  webhooksSendProcessedImages: webhooksSendProcessedImages,
24792
24815
  webhooksFireOnReview: webhooksFireOnReview,
24816
+ webhooksFireOnReviewURL: webhooksFireOnReviewURL,
24793
24817
  sendBase64DocumentsInSwaggerProxy: sendBase64DocumentsInSwaggerProxy,
24794
24818
  customerDataMatchConfig: customerDataMatchConfig,
24795
24819
  onBeforeDocumentUpload: onBeforeDocumentUpload,
@@ -26053,6 +26077,7 @@
26053
26077
  webhooksSendInputImages = _a.webhooksSendInputImages,
26054
26078
  webhooksSendProcessedImages = _a.webhooksSendProcessedImages,
26055
26079
  webhooksFireOnReview = _a.webhooksFireOnReview,
26080
+ webhooksFireOnReviewURL = _a.webhooksFireOnReviewURL,
26056
26081
  sendBase64DocumentsInSwaggerProxy = _a.sendBase64DocumentsInSwaggerProxy,
26057
26082
  customerDataMatchConfig = _a.customerDataMatchConfig,
26058
26083
  onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
@@ -26221,6 +26246,7 @@
26221
26246
  webhooksSendInputImages: webhooksSendInputImages,
26222
26247
  webhooksSendProcessedImages: webhooksSendProcessedImages,
26223
26248
  webhooksFireOnReview: webhooksFireOnReview,
26249
+ webhooksFireOnReviewURL: webhooksFireOnReviewURL,
26224
26250
  sendBase64DocumentsInSwaggerProxy: sendBase64DocumentsInSwaggerProxy,
26225
26251
  customerDataMatchConfig: customerDataMatchConfig,
26226
26252
  idCardForFaceMatch: idCardForFaceMatch,
@@ -26268,6 +26294,8 @@
26268
26294
  webhooksStripSpecialCharacters = _a.webhooksStripSpecialCharacters,
26269
26295
  webhooksSendInputImages = _a.webhooksSendInputImages,
26270
26296
  webhooksSendProcessedImages = _a.webhooksSendProcessedImages,
26297
+ webhooksFireOnReview = _a.webhooksFireOnReview,
26298
+ webhooksFireOnReviewURL = _a.webhooksFireOnReviewURL,
26271
26299
  sendBase64DocumentsInSwaggerProxy = _a.sendBase64DocumentsInSwaggerProxy,
26272
26300
  _c = _a.loadingOverlayMode,
26273
26301
  loadingOverlayMode = _c === void 0 ? 'default' : _c,
@@ -26384,6 +26412,8 @@
26384
26412
  webhooksStripSpecialCharacters: webhooksStripSpecialCharacters,
26385
26413
  webhooksSendInputImages: webhooksSendInputImages,
26386
26414
  webhooksSendProcessedImages: webhooksSendProcessedImages,
26415
+ webhooksFireOnReview: webhooksFireOnReview,
26416
+ webhooksFireOnReviewURL: webhooksFireOnReviewURL,
26387
26417
  sendBase64DocumentsInSwaggerProxy: sendBase64DocumentsInSwaggerProxy,
26388
26418
  onBeforeDocumentUpload: onBeforeDocumentUpload,
26389
26419
  onDocumentUploadProgress: onDocumentUploadProgress,