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.
- package/dist/components/customer_flows/CustomerBiometricsEnrollment.d.ts +4 -0
- package/dist/components/customer_flows/CustomerBiometricsEnrollment.d.ts.map +1 -1
- package/dist/components/customer_flows/CustomerIdAndBiometricsEnrollment.d.ts +2 -0
- package/dist/components/customer_flows/CustomerIdAndBiometricsEnrollment.d.ts.map +1 -1
- package/dist/components/customer_flows/FaceValidation.d.ts +4 -0
- package/dist/components/customer_flows/FaceValidation.d.ts.map +1 -1
- package/dist/components/customer_flows/IdAndFaceValidation.d.ts +2 -0
- package/dist/components/customer_flows/IdAndFaceValidation.d.ts.map +1 -1
- package/dist/components/customer_flows/IdValidation.d.ts +2 -0
- package/dist/components/customer_flows/IdValidation.d.ts.map +1 -1
- package/dist/components/customer_flows/VideoIdValidation.d.ts +2 -0
- package/dist/components/customer_flows/VideoIdValidation.d.ts.map +1 -1
- package/dist/components/submission/SubmissionProvider.d.ts +2 -1
- package/dist/components/submission/SubmissionProvider.d.ts.map +1 -1
- package/dist/components/submission/types.d.ts +1 -0
- package/dist/components/submission/types.d.ts.map +1 -1
- package/dist/sdk2.cjs.development.js +69 -39
- package/dist/sdk2.cjs.development.js.map +1 -1
- package/dist/sdk2.cjs.production.js +1 -1
- package/dist/sdk2.cjs.production.js.map +1 -1
- package/dist/sdk2.esm.js +69 -39
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +69 -39
- package/dist/sdk2.umd.development.js.map +1 -1
- package/dist/sdk2.umd.production.js +1 -1
- package/dist/sdk2.umd.production.js.map +1 -1
- package/dist/version.d.ts +1 -1
- 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.
|
|
206
|
+
var webSdkVersion = '2.2.81';
|
|
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;
|
|
@@ -1644,28 +1646,41 @@ var SubmissionProvider = function SubmissionProvider(_a) {
|
|
|
1644
1646
|
}, [buildSubmissionPayload, defaultOnSubmit]);
|
|
1645
1647
|
var buildLivenessCheckPayload = useCallback(function (imageDataUrl) {
|
|
1646
1648
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
1647
|
-
var request, onBeforeLivenessCheckResult;
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
switch (_d.label) {
|
|
1649
|
+
var selfie, request, onBeforeLivenessCheckResult;
|
|
1650
|
+
return __generator(this, function (_a) {
|
|
1651
|
+
switch (_a.label) {
|
|
1651
1652
|
case 0:
|
|
1652
|
-
|
|
1653
|
+
selfie = imageDataUrl;
|
|
1654
|
+
if (!documentServiceUrl) return [3 /*break*/, 2];
|
|
1655
|
+
if (!selfie.startsWith('data:')) {
|
|
1656
|
+
selfie = "data:image/jpeg;base64,".concat(selfie);
|
|
1657
|
+
}
|
|
1658
|
+
return [4 /*yield*/, uploadDocument(selfie, {
|
|
1659
|
+
filename: 'liveness',
|
|
1660
|
+
filetype: 'image/jpeg'
|
|
1661
|
+
})];
|
|
1662
|
+
case 1:
|
|
1663
|
+
selfie = _a.sent();
|
|
1664
|
+
_a.label = 2;
|
|
1665
|
+
case 2:
|
|
1666
|
+
request = {
|
|
1653
1667
|
securityData: {
|
|
1654
1668
|
userName: '',
|
|
1655
1669
|
password: '',
|
|
1656
1670
|
merchantId: 0
|
|
1671
|
+
},
|
|
1672
|
+
customerData: {
|
|
1673
|
+
biometricData: {
|
|
1674
|
+
selfie: selfie
|
|
1675
|
+
}
|
|
1676
|
+
},
|
|
1677
|
+
additionalData: {
|
|
1678
|
+
uniqueRequestId: new Date().getTime().toString(),
|
|
1679
|
+
stripSpecialCharacters: webhooksStripSpecialCharacters ? 'Y' : 'N',
|
|
1680
|
+
estimateAge: 'N',
|
|
1681
|
+
predictGender: 'N'
|
|
1657
1682
|
}
|
|
1658
1683
|
};
|
|
1659
|
-
_b = {};
|
|
1660
|
-
_c = {};
|
|
1661
|
-
return [4 /*yield*/, dataUrlToBase64(imageDataUrl)];
|
|
1662
|
-
case 1:
|
|
1663
|
-
request = (_a.customerData = (_b.biometricData = (_c.selfie = _d.sent(), _c), _b), _a.additionalData = {
|
|
1664
|
-
uniqueRequestId: new Date().getTime().toString(),
|
|
1665
|
-
stripSpecialCharacters: webhooksStripSpecialCharacters ? 'Y' : 'N',
|
|
1666
|
-
estimateAge: 'N',
|
|
1667
|
-
predictGender: 'N'
|
|
1668
|
-
}, _a);
|
|
1669
1684
|
if (clientRequestID) {
|
|
1670
1685
|
request.additionalData.clientRequestID = clientRequestID;
|
|
1671
1686
|
}
|
|
@@ -1684,19 +1699,19 @@ var SubmissionProvider = function SubmissionProvider(_a) {
|
|
|
1684
1699
|
idBackCaptureAttempts: idBackCaptureAttempts,
|
|
1685
1700
|
geolocationResult: geolocationResult
|
|
1686
1701
|
});
|
|
1687
|
-
if (!onBeforeLivenessCheck.current) return [3 /*break*/,
|
|
1702
|
+
if (!onBeforeLivenessCheck.current) return [3 /*break*/, 4];
|
|
1688
1703
|
return [4 /*yield*/, onBeforeLivenessCheck.current(request)];
|
|
1689
|
-
case 2:
|
|
1690
|
-
onBeforeLivenessCheckResult = _d.sent();
|
|
1691
|
-
if (onBeforeLivenessCheckResult) request = onBeforeLivenessCheckResult;
|
|
1692
|
-
_d.label = 3;
|
|
1693
1704
|
case 3:
|
|
1705
|
+
onBeforeLivenessCheckResult = _a.sent();
|
|
1706
|
+
if (onBeforeLivenessCheckResult) request = onBeforeLivenessCheckResult;
|
|
1707
|
+
_a.label = 4;
|
|
1708
|
+
case 4:
|
|
1694
1709
|
setLivenessCheckRequest(request);
|
|
1695
1710
|
return [2 /*return*/, request];
|
|
1696
1711
|
}
|
|
1697
1712
|
});
|
|
1698
1713
|
});
|
|
1699
|
-
}, [clientRequestID, geolocationResult, idBackCaptureAttempts, idCardForFaceMatch, idFrontCaptureAttempts, selfieCaptureAttempts, webhooksStripSpecialCharacters]);
|
|
1714
|
+
}, [clientRequestID, documentServiceUrl, geolocationResult, idBackCaptureAttempts, idCardForFaceMatch, idFrontCaptureAttempts, selfieCaptureAttempts, uploadDocument, webhooksStripSpecialCharacters]);
|
|
1700
1715
|
var checkLiveness = useCallback(function (imageDataUrl) {
|
|
1701
1716
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
1702
1717
|
var request, host, endpoint, response, statusMessage, submissionResponse_3, e_2, err;
|
|
@@ -14381,15 +14396,18 @@ var FaceValidation = function FaceValidation(_a) {
|
|
|
14381
14396
|
webhooksStripSpecialCharacters = _a.webhooksStripSpecialCharacters,
|
|
14382
14397
|
webhooksSendInputImages = _a.webhooksSendInputImages,
|
|
14383
14398
|
webhooksSendProcessedImages = _a.webhooksSendProcessedImages,
|
|
14399
|
+
_c = _a.webhooksFireOnReview,
|
|
14400
|
+
webhooksFireOnReview = _c === void 0 ? false : _c,
|
|
14401
|
+
webhooksFireOnReviewURL = _a.webhooksFireOnReviewURL,
|
|
14384
14402
|
sendBase64DocumentsInSwaggerProxy = _a.sendBase64DocumentsInSwaggerProxy,
|
|
14385
|
-
|
|
14386
|
-
loadingOverlayMode =
|
|
14387
|
-
|
|
14388
|
-
timeoutDurationMs =
|
|
14389
|
-
|
|
14390
|
-
modelLoadTimeoutMs =
|
|
14391
|
-
|
|
14392
|
-
skipSuccessScreen =
|
|
14403
|
+
_d = _a.loadingOverlayMode,
|
|
14404
|
+
loadingOverlayMode = _d === void 0 ? 'default' : _d,
|
|
14405
|
+
_e = _a.timeoutDurationMs,
|
|
14406
|
+
timeoutDurationMs = _e === void 0 ? 15000 : _e,
|
|
14407
|
+
_f = _a.modelLoadTimeoutMs,
|
|
14408
|
+
modelLoadTimeoutMs = _f === void 0 ? defaultSelfieCaptureModelLoadTimeoutMs : _f,
|
|
14409
|
+
_g = _a.skipSuccessScreen,
|
|
14410
|
+
skipSuccessScreen = _g === void 0 ? false : _g,
|
|
14393
14411
|
idCardForFaceMatch = _a.idCardForFaceMatch,
|
|
14394
14412
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
14395
14413
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
@@ -14404,18 +14422,18 @@ var FaceValidation = function FaceValidation(_a) {
|
|
|
14404
14422
|
onUserCancel = _a.onUserCancel,
|
|
14405
14423
|
onModelError = _a.onModelError,
|
|
14406
14424
|
onCameraAccessDenied = _a.onCameraAccessDenied,
|
|
14407
|
-
|
|
14408
|
-
theme =
|
|
14425
|
+
_h = _a.theme,
|
|
14426
|
+
theme = _h === void 0 ? 'default' : _h,
|
|
14409
14427
|
assets = _a.assets,
|
|
14410
14428
|
classNames = _a.classNames,
|
|
14411
14429
|
colors = _a.colors,
|
|
14412
14430
|
verbiage = _a.verbiage,
|
|
14413
|
-
|
|
14414
|
-
geolocationEnabled =
|
|
14415
|
-
|
|
14416
|
-
geolocationRequired =
|
|
14417
|
-
|
|
14418
|
-
debugMode =
|
|
14431
|
+
_j = _a.geolocationEnabled,
|
|
14432
|
+
geolocationEnabled = _j === void 0 ? true : _j,
|
|
14433
|
+
_k = _a.geolocationRequired,
|
|
14434
|
+
geolocationRequired = _k === void 0 ? false : _k,
|
|
14435
|
+
_l = _a.debugMode,
|
|
14436
|
+
debugMode = _l === void 0 ? false : _l;
|
|
14419
14437
|
useLanguage(lang);
|
|
14420
14438
|
useDebugLogging(debugMode);
|
|
14421
14439
|
var faceLivenessProps = useMemo(function () {
|
|
@@ -14455,6 +14473,8 @@ var FaceValidation = function FaceValidation(_a) {
|
|
|
14455
14473
|
webhooksStripSpecialCharacters: webhooksStripSpecialCharacters,
|
|
14456
14474
|
webhooksSendInputImages: webhooksSendInputImages,
|
|
14457
14475
|
webhooksSendProcessedImages: webhooksSendProcessedImages,
|
|
14476
|
+
webhooksFireOnReview: webhooksFireOnReview,
|
|
14477
|
+
webhooksFireOnReviewURL: webhooksFireOnReviewURL,
|
|
14458
14478
|
sendBase64DocumentsInSwaggerProxy: sendBase64DocumentsInSwaggerProxy,
|
|
14459
14479
|
idCardForFaceMatch: idCardForFaceMatch,
|
|
14460
14480
|
onBeforeDocumentUpload: onBeforeDocumentUpload,
|
|
@@ -14501,6 +14521,7 @@ var IdAndFaceValidation = function IdAndFaceValidation(_a) {
|
|
|
14501
14521
|
webhooksSendInputImages = _a.webhooksSendInputImages,
|
|
14502
14522
|
webhooksSendProcessedImages = _a.webhooksSendProcessedImages,
|
|
14503
14523
|
webhooksFireOnReview = _a.webhooksFireOnReview,
|
|
14524
|
+
webhooksFireOnReviewURL = _a.webhooksFireOnReviewURL,
|
|
14504
14525
|
sendBase64DocumentsInSwaggerProxy = _a.sendBase64DocumentsInSwaggerProxy,
|
|
14505
14526
|
customerDataMatchConfig = _a.customerDataMatchConfig,
|
|
14506
14527
|
precapturedDocuments = _a.precapturedDocuments,
|
|
@@ -14686,6 +14707,7 @@ var IdAndFaceValidation = function IdAndFaceValidation(_a) {
|
|
|
14686
14707
|
webhooksSendInputImages: webhooksSendInputImages,
|
|
14687
14708
|
webhooksSendProcessedImages: webhooksSendProcessedImages,
|
|
14688
14709
|
webhooksFireOnReview: webhooksFireOnReview,
|
|
14710
|
+
webhooksFireOnReviewURL: webhooksFireOnReviewURL,
|
|
14689
14711
|
sendBase64DocumentsInSwaggerProxy: sendBase64DocumentsInSwaggerProxy,
|
|
14690
14712
|
customerDataMatchConfig: customerDataMatchConfig,
|
|
14691
14713
|
precapturedDocuments: precapturedDocuments,
|
|
@@ -14744,6 +14766,7 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
|
|
|
14744
14766
|
webhooksSendInputImages = _a.webhooksSendInputImages,
|
|
14745
14767
|
webhooksSendProcessedImages = _a.webhooksSendProcessedImages,
|
|
14746
14768
|
webhooksFireOnReview = _a.webhooksFireOnReview,
|
|
14769
|
+
webhooksFireOnReviewURL = _a.webhooksFireOnReviewURL,
|
|
14747
14770
|
sendBase64DocumentsInSwaggerProxy = _a.sendBase64DocumentsInSwaggerProxy,
|
|
14748
14771
|
customerDataMatchConfig = _a.customerDataMatchConfig,
|
|
14749
14772
|
_c = _a.idCaptureLoadingOverlayMode,
|
|
@@ -14948,6 +14971,7 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
|
|
|
14948
14971
|
webhooksSendInputImages: webhooksSendInputImages,
|
|
14949
14972
|
webhooksSendProcessedImages: webhooksSendProcessedImages,
|
|
14950
14973
|
webhooksFireOnReview: webhooksFireOnReview,
|
|
14974
|
+
webhooksFireOnReviewURL: webhooksFireOnReviewURL,
|
|
14951
14975
|
sendBase64DocumentsInSwaggerProxy: sendBase64DocumentsInSwaggerProxy,
|
|
14952
14976
|
customerDataMatchConfig: customerDataMatchConfig,
|
|
14953
14977
|
onBeforeDocumentUpload: onBeforeDocumentUpload,
|
|
@@ -16211,6 +16235,7 @@ var VideoIdValidation = function VideoIdValidation(_a) {
|
|
|
16211
16235
|
webhooksSendInputImages = _a.webhooksSendInputImages,
|
|
16212
16236
|
webhooksSendProcessedImages = _a.webhooksSendProcessedImages,
|
|
16213
16237
|
webhooksFireOnReview = _a.webhooksFireOnReview,
|
|
16238
|
+
webhooksFireOnReviewURL = _a.webhooksFireOnReviewURL,
|
|
16214
16239
|
sendBase64DocumentsInSwaggerProxy = _a.sendBase64DocumentsInSwaggerProxy,
|
|
16215
16240
|
customerDataMatchConfig = _a.customerDataMatchConfig,
|
|
16216
16241
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
@@ -16379,6 +16404,7 @@ var VideoIdValidation = function VideoIdValidation(_a) {
|
|
|
16379
16404
|
webhooksSendInputImages: webhooksSendInputImages,
|
|
16380
16405
|
webhooksSendProcessedImages: webhooksSendProcessedImages,
|
|
16381
16406
|
webhooksFireOnReview: webhooksFireOnReview,
|
|
16407
|
+
webhooksFireOnReviewURL: webhooksFireOnReviewURL,
|
|
16382
16408
|
sendBase64DocumentsInSwaggerProxy: sendBase64DocumentsInSwaggerProxy,
|
|
16383
16409
|
customerDataMatchConfig: customerDataMatchConfig,
|
|
16384
16410
|
idCardForFaceMatch: idCardForFaceMatch,
|
|
@@ -16426,6 +16452,8 @@ var CustomerBiometricsEnrollment = function CustomerBiometricsEnrollment(_a) {
|
|
|
16426
16452
|
webhooksStripSpecialCharacters = _a.webhooksStripSpecialCharacters,
|
|
16427
16453
|
webhooksSendInputImages = _a.webhooksSendInputImages,
|
|
16428
16454
|
webhooksSendProcessedImages = _a.webhooksSendProcessedImages,
|
|
16455
|
+
webhooksFireOnReview = _a.webhooksFireOnReview,
|
|
16456
|
+
webhooksFireOnReviewURL = _a.webhooksFireOnReviewURL,
|
|
16429
16457
|
sendBase64DocumentsInSwaggerProxy = _a.sendBase64DocumentsInSwaggerProxy,
|
|
16430
16458
|
_c = _a.loadingOverlayMode,
|
|
16431
16459
|
loadingOverlayMode = _c === void 0 ? 'default' : _c,
|
|
@@ -16542,6 +16570,8 @@ var CustomerBiometricsEnrollment = function CustomerBiometricsEnrollment(_a) {
|
|
|
16542
16570
|
webhooksStripSpecialCharacters: webhooksStripSpecialCharacters,
|
|
16543
16571
|
webhooksSendInputImages: webhooksSendInputImages,
|
|
16544
16572
|
webhooksSendProcessedImages: webhooksSendProcessedImages,
|
|
16573
|
+
webhooksFireOnReview: webhooksFireOnReview,
|
|
16574
|
+
webhooksFireOnReviewURL: webhooksFireOnReviewURL,
|
|
16545
16575
|
sendBase64DocumentsInSwaggerProxy: sendBase64DocumentsInSwaggerProxy,
|
|
16546
16576
|
onBeforeDocumentUpload: onBeforeDocumentUpload,
|
|
16547
16577
|
onDocumentUploadProgress: onDocumentUploadProgress,
|