idmission-web-sdk 2.2.52 → 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/components/submission/SubmissionProvider.d.ts.map +1 -1
- package/dist/components/video_id/IdVideoCapture.d.ts.map +1 -1
- package/dist/components/video_id/IdVideoCaptureGuides.d.ts +2 -1
- package/dist/components/video_id/IdVideoCaptureGuides.d.ts.map +1 -1
- package/dist/components/video_id/IdVideoCaptureWizard.d.ts.map +1 -1
- package/dist/sdk2.cjs.development.js +48 -41
- 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 +48 -41
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +48 -41
- 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.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 (
|
|
1389
|
-
switch (
|
|
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 =
|
|
1402
|
-
|
|
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 =
|
|
1410
|
-
|
|
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 =
|
|
1418
|
-
|
|
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
|
-
|
|
1446
|
-
|
|
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
|
-
(
|
|
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
|
-
(
|
|
1540
|
+
(_g = submissionRequest.customerData).biometricData || (_g.biometricData = {});
|
|
1538
1541
|
submissionRequest.customerData.biometricData.videoData = documents.idCaptureVideo;
|
|
1539
1542
|
}
|
|
1540
1543
|
if (documents.idCaptureVideoAudio) {
|
|
1541
|
-
(
|
|
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 =
|
|
1564
|
+
onBeforeSubmitResult = _j.sent();
|
|
1562
1565
|
if (onBeforeSubmitResult) submissionRequest = onBeforeSubmitResult;
|
|
1563
|
-
|
|
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;
|
|
@@ -11706,23 +11709,25 @@ var IdVideoCaptureGuides = function IdVideoCaptureGuides(_a) {
|
|
|
11706
11709
|
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
|
|
11707
11710
|
var _z = _a.requestedAction,
|
|
11708
11711
|
requestedAction = _z === void 0 ? 'SHOW_ID_FRONT' : _z,
|
|
11709
|
-
_0 = _a.
|
|
11710
|
-
|
|
11711
|
-
_1 = _a.
|
|
11712
|
-
|
|
11712
|
+
_0 = _a.idDocumentType,
|
|
11713
|
+
idDocumentType = _0 === void 0 ? 'idCard' : _0,
|
|
11714
|
+
_1 = _a.satisfied,
|
|
11715
|
+
satisfied = _1 === void 0 ? false : _1,
|
|
11716
|
+
_2 = _a.faceGuideStatus,
|
|
11717
|
+
faceGuideStatus = _2 === void 0 ? 'success' : _2,
|
|
11713
11718
|
faceGuideBorderWidth = _a.faceGuideBorderWidth,
|
|
11714
11719
|
faceGuideBorderColor = _a.faceGuideBorderColor,
|
|
11715
|
-
|
|
11716
|
-
idCardGuideStatus =
|
|
11720
|
+
_3 = _a.idCardGuideStatus,
|
|
11721
|
+
idCardGuideStatus = _3 === void 0 ? 'ready' : _3,
|
|
11717
11722
|
idCardGuideBorderWidth = _a.idCardGuideBorderWidth,
|
|
11718
11723
|
idCardGuideBorderColor = _a.idCardGuideBorderColor,
|
|
11719
11724
|
idCardCaptureProgress = _a.idCardCaptureProgress,
|
|
11720
|
-
|
|
11721
|
-
userSuppliedImages =
|
|
11722
|
-
|
|
11723
|
-
classNames =
|
|
11724
|
-
|
|
11725
|
-
rawVerbiage =
|
|
11725
|
+
_4 = _a.idCaptureGuideImages,
|
|
11726
|
+
userSuppliedImages = _4 === void 0 ? defaultIdCaptureGuideImages : _4,
|
|
11727
|
+
_5 = _a.classNames,
|
|
11728
|
+
classNames = _5 === void 0 ? {} : _5,
|
|
11729
|
+
_6 = _a.verbiage,
|
|
11730
|
+
rawVerbiage = _6 === void 0 ? {} : _6;
|
|
11726
11731
|
var isRearFacing = useCameraStore(function (state) {
|
|
11727
11732
|
return state.isRearFacing;
|
|
11728
11733
|
});
|
|
@@ -11739,17 +11744,17 @@ var IdVideoCaptureGuides = function IdVideoCaptureGuides(_a) {
|
|
|
11739
11744
|
if (faceGuideBorderColor === undefined) faceGuideBorderColor = (_j = satisfied ? (_f = (_e = theme.idVideoCapture) === null || _e === void 0 ? void 0 : _e.faceGuides) === null || _f === void 0 ? void 0 : _f.satisfiedColor : (_h = (_g = theme.idVideoCapture) === null || _g === void 0 ? void 0 : _g.faceGuides) === null || _h === void 0 ? void 0 : _h.unsatisfiedColor) !== null && _j !== void 0 ? _j : '#D6DCE7';
|
|
11740
11745
|
if (idCardGuideBorderWidth === undefined) idCardGuideBorderWidth = (_m = (_l = (_k = theme.idVideoCapture) === null || _k === void 0 ? void 0 : _k.idCardGuides) === null || _l === void 0 ? void 0 : _l.borderWidth) !== null && _m !== void 0 ? _m : 20;
|
|
11741
11746
|
if (idCardGuideBorderColor === undefined) idCardGuideBorderColor = (_s = satisfied ? (_p = (_o = theme.idVideoCapture) === null || _o === void 0 ? void 0 : _o.idCardGuides) === null || _p === void 0 ? void 0 : _p.satisfiedColor : (_r = (_q = theme.idVideoCapture) === null || _q === void 0 ? void 0 : _q.idCardGuides) === null || _r === void 0 ? void 0 : _r.unsatisfiedColor) !== null && _s !== void 0 ? _s : '#D6DCE7';
|
|
11742
|
-
var
|
|
11743
|
-
idCardGuideRef =
|
|
11744
|
-
|
|
11745
|
-
idCardGuideWidth =
|
|
11746
|
-
|
|
11747
|
-
idCardGuideHeight =
|
|
11747
|
+
var _7 = useResizeObserver(),
|
|
11748
|
+
idCardGuideRef = _7.ref,
|
|
11749
|
+
_8 = _7.width,
|
|
11750
|
+
idCardGuideWidth = _8 === void 0 ? 0 : _8,
|
|
11751
|
+
_9 = _7.height,
|
|
11752
|
+
idCardGuideHeight = _9 === void 0 ? 0 : _9;
|
|
11748
11753
|
var idCaptureGuideImages = useGuideImages(userSuppliedImages);
|
|
11749
11754
|
var idCaptureGuideImagesByUrl = useGuideImagesByUrl(idCaptureGuideImages);
|
|
11750
|
-
var
|
|
11751
|
-
aspectRatio =
|
|
11752
|
-
setAspectRatio =
|
|
11755
|
+
var _10 = useState(undefined),
|
|
11756
|
+
aspectRatio = _10[0],
|
|
11757
|
+
setAspectRatio = _10[1];
|
|
11753
11758
|
var onImageLoaded = useCallback(function (e) {
|
|
11754
11759
|
var _a, _b, _c, _d;
|
|
11755
11760
|
var img = e.currentTarget;
|
|
@@ -11798,7 +11803,7 @@ var IdVideoCaptureGuides = function IdVideoCaptureGuides(_a) {
|
|
|
11798
11803
|
className: classNames.idCardGuideImage,
|
|
11799
11804
|
"$isMirrored": !isRearFacing,
|
|
11800
11805
|
style: idCardImageStyle,
|
|
11801
|
-
src:
|
|
11806
|
+
src: idDocumentType === 'passport' ? idCaptureGuideImages.landscape.SHOW_PASSPORT.url : requestedAction === 'SHOW_ID_BACK' ? idCaptureGuideImages.landscape.SHOW_ID_BACK.url : idCaptureGuideImages.landscape.SHOW_ID_FRONT.url,
|
|
11802
11807
|
onLoad: onImageLoaded
|
|
11803
11808
|
})), requestedAction === 'FLIP_ID' && ( /*#__PURE__*/React__default.createElement(IdVideoCaptureFlipIdPrompt, {
|
|
11804
11809
|
idCaptureGuideImages: idCaptureGuideImages,
|
|
@@ -12347,6 +12352,7 @@ var IdVideoCapture = function IdVideoCapture(_a) {
|
|
|
12347
12352
|
classNames: classNames.guides,
|
|
12348
12353
|
verbiage: rawVerbiage.guides,
|
|
12349
12354
|
requestedAction: requestedAction,
|
|
12355
|
+
idDocumentType: idDocumentType,
|
|
12350
12356
|
satisfied: satisfied,
|
|
12351
12357
|
idCardGuideStatus: countdownStartedAt ? 'capturing' : 'ready',
|
|
12352
12358
|
idCardCaptureProgress: countdownStartedAt ? 1 : 0,
|
|
@@ -12657,10 +12663,11 @@ var VideoIdWizard = function VideoIdWizard(_a) {
|
|
|
12657
12663
|
var _b, _c, _d, _e;
|
|
12658
12664
|
var status = _a.status;
|
|
12659
12665
|
return /*#__PURE__*/React__default.createElement(IdVideoCaptureGuides, {
|
|
12660
|
-
idCaptureGuideImages: idCaptureGuideImages,
|
|
12661
12666
|
classNames: (_b = classNames.idVideoCapture) === null || _b === void 0 ? void 0 : _b.guides,
|
|
12662
12667
|
verbiage: (_c = verbiage.idVideoCapture) === null || _c === void 0 ? void 0 : _c.guides,
|
|
12663
12668
|
requestedAction: "VERIFY_LIVENESS",
|
|
12669
|
+
idCaptureGuideImages: idCaptureGuideImages,
|
|
12670
|
+
idDocumentType: idDocumentType,
|
|
12664
12671
|
faceGuideStatus: status,
|
|
12665
12672
|
faceGuideBorderColor: status === 'success' ? (_d = colors.idVideoCapture) === null || _d === void 0 ? void 0 : _d.guidesSatisfiedColor : (_e = colors.idVideoCapture) === null || _e === void 0 ? void 0 : _e.guidesUnsatisfiedColor,
|
|
12666
12673
|
idCardGuideStatus: "disabled"
|