idmission-web-sdk 2.3.229 → 2.3.230
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 +8 -1
- package/dist/components/submission/SubmissionProvider.d.ts.map +1 -1
- package/dist/sdk2.cjs.development.js +107 -103
- 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 +107 -103
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +107 -103
- 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
|
@@ -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.3.
|
|
214
|
+
var webSdkVersion = '2.3.230';
|
|
215
215
|
|
|
216
216
|
function getPlatform() {
|
|
217
217
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -2881,106 +2881,108 @@
|
|
|
2881
2881
|
_z = _a.predictGender,
|
|
2882
2882
|
predictGender = _z === void 0 ? false : _z,
|
|
2883
2883
|
_0 = _a.throwErrorsOnFailure,
|
|
2884
|
-
throwErrorsOnFailure = _0 === void 0 ? !userSuppliedOnRequestFailure : _0
|
|
2884
|
+
throwErrorsOnFailure = _0 === void 0 ? !userSuppliedOnRequestFailure : _0,
|
|
2885
|
+
_1 = _a.forceServerSideBarcodeDecode,
|
|
2886
|
+
forceServerSideBarcodeDecode = _1 === void 0 ? false : _1;
|
|
2885
2887
|
var sessionId = useAuthContext()[0].sessionId;
|
|
2886
|
-
var
|
|
2887
|
-
submissionStatus =
|
|
2888
|
-
setSubmissionStatus =
|
|
2889
|
-
var _2 = React.useState(null),
|
|
2890
|
-
submissionRequest = _2[0],
|
|
2891
|
-
setSubmissionRequest = _2[1];
|
|
2888
|
+
var _2 = React.useState(SubmissionStatus.READY),
|
|
2889
|
+
submissionStatus = _2[0],
|
|
2890
|
+
setSubmissionStatus = _2[1];
|
|
2892
2891
|
var _3 = React.useState(null),
|
|
2893
|
-
|
|
2894
|
-
|
|
2892
|
+
submissionRequest = _3[0],
|
|
2893
|
+
setSubmissionRequest = _3[1];
|
|
2895
2894
|
var _4 = React.useState(null),
|
|
2896
|
-
|
|
2897
|
-
|
|
2895
|
+
submissionResponse = _4[0],
|
|
2896
|
+
setSubmissionResponse = _4[1];
|
|
2898
2897
|
var _5 = React.useState(null),
|
|
2899
|
-
|
|
2900
|
-
|
|
2898
|
+
submissionError = _5[0],
|
|
2899
|
+
setSubmissionError = _5[1];
|
|
2901
2900
|
var _6 = React.useState(null),
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
var _7 =
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
idFrontImageCapturedAt = _7[2];
|
|
2901
|
+
retrySubmission = _6[0],
|
|
2902
|
+
setRetrySubmission = _6[1];
|
|
2903
|
+
var _7 = React.useState(null),
|
|
2904
|
+
livenessCheckRequest = _7[0],
|
|
2905
|
+
setLivenessCheckRequest = _7[1];
|
|
2908
2906
|
var _8 = useStateWithCapturedAt(),
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
var _9 =
|
|
2913
|
-
|
|
2914
|
-
|
|
2907
|
+
idFrontImage = _8[0],
|
|
2908
|
+
setIdFrontImage = _8[1],
|
|
2909
|
+
idFrontImageCapturedAt = _8[2];
|
|
2910
|
+
var _9 = useStateWithCapturedAt(),
|
|
2911
|
+
idBackImage = _9[0],
|
|
2912
|
+
setIdBackImage = _9[1],
|
|
2913
|
+
idBackImageCapturedAt = _9[2];
|
|
2915
2914
|
var _10 = React.useState(null),
|
|
2916
|
-
|
|
2917
|
-
|
|
2915
|
+
idFrontIrImage = _10[0],
|
|
2916
|
+
setIdFrontIrImage = _10[1];
|
|
2918
2917
|
var _11 = React.useState(null),
|
|
2919
|
-
|
|
2920
|
-
|
|
2918
|
+
idBackIrImage = _11[0],
|
|
2919
|
+
setIdBackIrImage = _11[1];
|
|
2921
2920
|
var _12 = React.useState(null),
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
var _13 =
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
passportImageCapturedAt = _13[2];
|
|
2921
|
+
idFrontUvImage = _12[0],
|
|
2922
|
+
setIdFrontUvImage = _12[1];
|
|
2923
|
+
var _13 = React.useState(null),
|
|
2924
|
+
idBackUvImage = _13[0],
|
|
2925
|
+
setIdBackUvImage = _13[1];
|
|
2928
2926
|
var _14 = useStateWithCapturedAt(),
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2927
|
+
passportImage = _14[0],
|
|
2928
|
+
setPassportImage = _14[1],
|
|
2929
|
+
passportImageCapturedAt = _14[2];
|
|
2932
2930
|
var _15 = useStateWithCapturedAt(),
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2931
|
+
idBarcodeImage = _15[0],
|
|
2932
|
+
setIdBarcodeImage = _15[1],
|
|
2933
|
+
idBarcodeImageCapturedAt = _15[2];
|
|
2936
2934
|
var _16 = useStateWithCapturedAt(),
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2935
|
+
selfieImage = _16[0],
|
|
2936
|
+
setSelfieImage = _16[1],
|
|
2937
|
+
selfieImageCapturedAt = _16[2];
|
|
2940
2938
|
var _17 = useStateWithCapturedAt(),
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
var _18 =
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2939
|
+
signatureData = _17[0],
|
|
2940
|
+
setSignatureData = _17[1],
|
|
2941
|
+
signatureImageCapturedAt = _17[2];
|
|
2942
|
+
var _18 = useStateWithCapturedAt(),
|
|
2943
|
+
signatureVideoUrl = _18[0],
|
|
2944
|
+
setSignatureVideoUrl = _18[1],
|
|
2945
|
+
signatureVideoCapturedAt = _18[2];
|
|
2946
|
+
var _19 = React.useState(null),
|
|
2947
|
+
signatureVideoMetadata = _19[0],
|
|
2948
|
+
setSignatureVideoMetadata = _19[1];
|
|
2949
|
+
var _20 = React.useState({}),
|
|
2950
|
+
documentFileMetadata = _20[0],
|
|
2951
|
+
setDocumentFileMetadataState = _20[1];
|
|
2952
|
+
var _21 = React.useState([]),
|
|
2953
|
+
barcodeCaptureAttempts = _21[0],
|
|
2954
|
+
setBarcodeCaptureAttempts = _21[1];
|
|
2957
2955
|
var _22 = useStateWithCapturedAt(),
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2956
|
+
idCaptureVideoUrl = _22[0],
|
|
2957
|
+
setIdCaptureVideoUrl = _22[1],
|
|
2958
|
+
idCaptureVideoCapturedAt = _22[2];
|
|
2961
2959
|
var _23 = useStateWithCapturedAt(),
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2960
|
+
idCaptureVideoIdFrontImage = _23[0],
|
|
2961
|
+
setIdCaptureVideoIdFrontImage = _23[1],
|
|
2962
|
+
idCaptureVideoIdFrontImageCapturedAt = _23[2];
|
|
2965
2963
|
var _24 = useStateWithCapturedAt(),
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
var _25 =
|
|
2970
|
-
|
|
2971
|
-
|
|
2964
|
+
idCaptureVideoIdBackImage = _24[0],
|
|
2965
|
+
setIdCaptureVideoIdBackImage = _24[1],
|
|
2966
|
+
idCaptureVideoIdBackImageCapturedAt = _24[2];
|
|
2967
|
+
var _25 = useStateWithCapturedAt(),
|
|
2968
|
+
idCaptureVideoAudioUrl = _25[0],
|
|
2969
|
+
setIdCaptureVideoAudioUrl = _25[1],
|
|
2970
|
+
idCaptureVideoAudioCapturedAt = _25[2];
|
|
2972
2971
|
var _26 = React.useState(null),
|
|
2973
|
-
|
|
2974
|
-
|
|
2972
|
+
idCaptureVideoAudioStartsAt = _26[0],
|
|
2973
|
+
setIdCaptureVideoAudioStartsAt = _26[1];
|
|
2975
2974
|
var _27 = React.useState(null),
|
|
2976
|
-
|
|
2977
|
-
|
|
2975
|
+
expectedAudioText = _27[0],
|
|
2976
|
+
setExpectedAudioText = _27[1];
|
|
2978
2977
|
var _28 = React.useState(null),
|
|
2979
|
-
|
|
2980
|
-
|
|
2978
|
+
additionalDocuments = _28[0],
|
|
2979
|
+
setAdditionalDocuments = _28[1];
|
|
2981
2980
|
var _29 = React.useState(null),
|
|
2982
|
-
|
|
2983
|
-
|
|
2981
|
+
ocrMetadata = _29[0],
|
|
2982
|
+
setOcrMetadata = _29[1];
|
|
2983
|
+
var _30 = React.useState(null),
|
|
2984
|
+
barcodeDecodeSummary = _30[0],
|
|
2985
|
+
setBarcodeDecodeSummary = _30[1];
|
|
2984
2986
|
var setDocumentFileMetadata = React.useCallback(function (key, metadata) {
|
|
2985
2987
|
var sanitized = metadata ? sanitizeMetadata(metadata) : null;
|
|
2986
2988
|
setDocumentFileMetadataState(function (current) {
|
|
@@ -2997,24 +2999,24 @@
|
|
|
2997
2999
|
return _assign(_assign({}, current), (_a = {}, _a[key] = sanitized, _a));
|
|
2998
3000
|
});
|
|
2999
3001
|
}, []);
|
|
3000
|
-
var
|
|
3001
|
-
geolocationResult =
|
|
3002
|
-
setGeolocationResult =
|
|
3003
|
-
var
|
|
3004
|
-
geolocationAttempts =
|
|
3005
|
-
setGeolocationAttempts =
|
|
3006
|
-
var
|
|
3007
|
-
geolocationBlocked =
|
|
3008
|
-
setGeolocationBlocked =
|
|
3009
|
-
var _33 = React.useState([]),
|
|
3010
|
-
idFrontCaptureAttempts = _33[0],
|
|
3011
|
-
setIdFrontCaptureAttempts = _33[1];
|
|
3002
|
+
var _31 = React.useState(null),
|
|
3003
|
+
geolocationResult = _31[0],
|
|
3004
|
+
setGeolocationResult = _31[1];
|
|
3005
|
+
var _32 = React.useState(0),
|
|
3006
|
+
geolocationAttempts = _32[0],
|
|
3007
|
+
setGeolocationAttempts = _32[1];
|
|
3008
|
+
var _33 = React.useState(false),
|
|
3009
|
+
geolocationBlocked = _33[0],
|
|
3010
|
+
setGeolocationBlocked = _33[1];
|
|
3012
3011
|
var _34 = React.useState([]),
|
|
3013
|
-
|
|
3014
|
-
|
|
3012
|
+
idFrontCaptureAttempts = _34[0],
|
|
3013
|
+
setIdFrontCaptureAttempts = _34[1];
|
|
3015
3014
|
var _35 = React.useState([]),
|
|
3016
|
-
|
|
3017
|
-
|
|
3015
|
+
idBackCaptureAttempts = _35[0],
|
|
3016
|
+
setIdBackCaptureAttempts = _35[1];
|
|
3017
|
+
var _36 = React.useState([]),
|
|
3018
|
+
selfieCaptureAttempts = _36[0],
|
|
3019
|
+
setSelfieCaptureAttempts = _36[1];
|
|
3018
3020
|
var logIdFrontCaptureAttempt = React.useCallback(function (attempt, documentType) {
|
|
3019
3021
|
setIdFrontCaptureAttempts(function (attempts) {
|
|
3020
3022
|
return __spreadArray(__spreadArray([], attempts, true), [attempt], false);
|
|
@@ -3347,7 +3349,7 @@
|
|
|
3347
3349
|
submissionRequest.customerData.idData.idImageFrontCapturedAt = passportImageCapturedAt;
|
|
3348
3350
|
}
|
|
3349
3351
|
}
|
|
3350
|
-
if (documents.idBarcodeImage) {
|
|
3352
|
+
if (documents.idBarcodeImage && !forceServerSideBarcodeDecode) {
|
|
3351
3353
|
submissionRequest.customerData.idData.idBarcodeImage = documents.idBarcodeImage;
|
|
3352
3354
|
if (idBarcodeImageCapturedAt) {
|
|
3353
3355
|
submissionRequest.customerData.idData.idBarcodeImageCapturedAt = idBarcodeImageCapturedAt;
|
|
@@ -3394,10 +3396,12 @@
|
|
|
3394
3396
|
if (webhooksClientTraceId) {
|
|
3395
3397
|
submissionRequest.additionalData.clientTraceId = webhooksClientTraceId;
|
|
3396
3398
|
}
|
|
3397
|
-
if (
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3399
|
+
if (!forceServerSideBarcodeDecode) {
|
|
3400
|
+
if (ocrMetadata) {
|
|
3401
|
+
submissionRequest.additionalData.ocrMetadata = ocrMetadata;
|
|
3402
|
+
} else if (barcodeCaptureAttempts.length > 0) {
|
|
3403
|
+
submissionRequest.additionalData.ocrMetadata = JSON.stringify(buildNoBarcodeOCRMetadata(barcodeCaptureAttempts.length));
|
|
3404
|
+
}
|
|
3401
3405
|
}
|
|
3402
3406
|
if (signatureData) {
|
|
3403
3407
|
submissionRequest.customerData.signatureData = {
|
|
@@ -3473,7 +3477,7 @@
|
|
|
3473
3477
|
}
|
|
3474
3478
|
});
|
|
3475
3479
|
});
|
|
3476
|
-
}, [additionalDocuments, bypassAgeValidation, bypassNameMatching, cardData, clientRequestID, companyId, customerDataMatchConfig, deduplicationEnabled, deduplicationSynchronous, barcodeCaptureAttempts, documentFileMetadata, documentServiceUrl, enrollmentId, expectedAudioText, geolocationResult, idBackCaptureAttempts, idBackImage, idBackImageRequired, idBackIrImage, idBackImageCapturedAt, idBackUvImage, idBarcodeImage, idBarcodeImageCapturedAt, idCaptureVideoAudioCapturedAt, idCaptureVideoAudioStartsAt, idCaptureVideoAudioUrl, idCaptureVideoCapturedAt, idCaptureVideoIdBackImage, idCaptureVideoIdBackImageCapturedAt, idCaptureVideoIdFrontImage, idCaptureVideoIdFrontImageCapturedAt, idCaptureVideoUrl, idCardForFaceMatch, idData, idFrontCaptureAttempts, idFrontImage, idFrontImageCapturedAt, idFrontIrImage, idFrontUvImage, idImageResolutionCheck, jobId, manualReviewRequired, needImmediateResponse, ocrMetadata, barcodeDecodeSummary, passportImage, passportImageCapturedAt, personalData, selfieCaptureAttempts, selfieImage, selfieImageCapturedAt, signatureData, signatureImageCapturedAt, signatureVideoCapturedAt, signatureVideoUrl, signatureVideoMetadata, uploadDocument, verifyIdWithExternalDatabases, webhooksClientTraceId, webhooksEnabled, webhooksFireOnReview, webhooksFireOnReviewURL, webhooksSendInputImages, webhooksSendProcessedImages, webhooksStripSpecialCharacters, webhooksURL]);
|
|
3480
|
+
}, [additionalDocuments, bypassAgeValidation, bypassNameMatching, cardData, clientRequestID, companyId, customerDataMatchConfig, deduplicationEnabled, deduplicationSynchronous, barcodeCaptureAttempts, documentFileMetadata, documentServiceUrl, enrollmentId, forceServerSideBarcodeDecode, expectedAudioText, geolocationResult, idBackCaptureAttempts, idBackImage, idBackImageRequired, idBackIrImage, idBackImageCapturedAt, idBackUvImage, idBarcodeImage, idBarcodeImageCapturedAt, idCaptureVideoAudioCapturedAt, idCaptureVideoAudioStartsAt, idCaptureVideoAudioUrl, idCaptureVideoCapturedAt, idCaptureVideoIdBackImage, idCaptureVideoIdBackImageCapturedAt, idCaptureVideoIdFrontImage, idCaptureVideoIdFrontImageCapturedAt, idCaptureVideoUrl, idCardForFaceMatch, idData, idFrontCaptureAttempts, idFrontImage, idFrontImageCapturedAt, idFrontIrImage, idFrontUvImage, idImageResolutionCheck, jobId, manualReviewRequired, needImmediateResponse, ocrMetadata, barcodeDecodeSummary, passportImage, passportImageCapturedAt, personalData, selfieCaptureAttempts, selfieImage, selfieImageCapturedAt, signatureData, signatureImageCapturedAt, signatureVideoCapturedAt, signatureVideoUrl, signatureVideoMetadata, uploadDocument, verifyIdWithExternalDatabases, webhooksClientTraceId, webhooksEnabled, webhooksFireOnReview, webhooksFireOnReviewURL, webhooksSendInputImages, webhooksSendProcessedImages, webhooksStripSpecialCharacters, webhooksURL]);
|
|
3477
3481
|
var defaultOnSubmit = React.useCallback(function () {
|
|
3478
3482
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
3479
3483
|
var submissionResponse_1, payload, host, endpoint, response, _a, _b, statusMessage, submissionResponse_2, e_1, err;
|