idmission-web-sdk 1.0.110 → 1.0.113
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/DocumentCapture.d.ts +2 -2
- package/dist/sdk2.cjs.development.js +66 -66
- 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 +66 -66
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +73 -73
- 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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FC, PropsWithChildren, ReactNode } from 'react';
|
|
2
2
|
import { ThemeInput } from '../../themes';
|
|
3
3
|
import { LangOption } from '../../lib/locales';
|
|
4
|
-
import { SubmissionRequest
|
|
4
|
+
import { SubmissionRequest } from '../../contexts/SubmissionContext';
|
|
5
5
|
import { DocumentCaptureWizardClassNames } from '../document_capture/DocumentCaptureWizard';
|
|
6
6
|
import { CameraFeedMode } from '../document_capture/DocumentCaptureScreen';
|
|
7
7
|
export type DocumentCaptureClassNames = DocumentCaptureWizardClassNames;
|
|
@@ -19,7 +19,7 @@ export interface DocumentCaptureProps extends PropsWithChildren {
|
|
|
19
19
|
/** Callback function that fires when the user has completed the flow instead of making a call to IDmission's servers, allowing customers to specify their own submission logic. Arguments: the request payload that would have been dispatched to IDmission's API, which contains the images/documents/video submitted by the user. Note that when this parameter is supplied, `onComplete` will never fire, and the customer will need to implement their own error handling/retry logic. Use at your own risk! */
|
|
20
20
|
onSubmit?: (req: SubmissionRequest) => void;
|
|
21
21
|
/** Callback function that fires when the user completes the DocumentCapture flow. Arguments: the SubmissionResponse from IDmission's API is passed as an argument to the customer's application for further handling, which indicates whether the user passed the validation check, and the request payload dispatched to IDmission's API, which contains the images submitted by the user. */
|
|
22
|
-
onComplete?: (
|
|
22
|
+
onComplete?: () => void;
|
|
23
23
|
/** Callback function that fires when the user clicks the exit button during ID or selfie capture. */
|
|
24
24
|
onExitCapture?: () => void;
|
|
25
25
|
/** Callback function that fires when the user clicks the exit button from the loading overlay, declining to engage with IDmission. Binding this callback results in the cancel button being rendered on the loading overlay. */
|
|
@@ -47,7 +47,7 @@ var LanguageDetector__default = /*#__PURE__*/_interopDefaultLegacy(LanguageDetec
|
|
|
47
47
|
var i18n__default = /*#__PURE__*/_interopDefaultLegacy(i18n);
|
|
48
48
|
var SignatureCanvas__default = /*#__PURE__*/_interopDefaultLegacy(SignatureCanvas);
|
|
49
49
|
|
|
50
|
-
var webSdkVersion = '1.0.
|
|
50
|
+
var webSdkVersion = '1.0.113';
|
|
51
51
|
|
|
52
52
|
function getPlatform() {
|
|
53
53
|
if (typeof window === 'undefined') return;
|
|
@@ -733,78 +733,80 @@ var SubmissionProvider = function SubmissionProvider(_a) {
|
|
|
733
733
|
_t = _a.webhooksFireOnReview,
|
|
734
734
|
webhooksFireOnReview = _t === void 0 ? false : _t,
|
|
735
735
|
precapturedDocuments = _a.precapturedDocuments,
|
|
736
|
-
|
|
736
|
+
_u = _a.documentServiceUrl,
|
|
737
|
+
documentServiceUrl = _u === void 0 ? 'https://portal-api-dev.idmission.com/files/' : _u,
|
|
738
|
+
// 'http://localhost:10000/files/',
|
|
737
739
|
onSubmit = _a.onSubmit,
|
|
738
740
|
onBeforeSubmit = _a.onBeforeSubmit,
|
|
739
741
|
onBeforeLivenessCheck = _a.onBeforeLivenessCheck,
|
|
740
742
|
onResponseReceived = _a.onResponseReceived,
|
|
741
743
|
onRequestFailure = _a.onRequestFailure;
|
|
742
|
-
var
|
|
743
|
-
submissionStatus =
|
|
744
|
-
setSubmissionStatus =
|
|
745
|
-
var _v = React.useState(null),
|
|
746
|
-
submissionRequest = _v[0],
|
|
747
|
-
setSubmissionRequest = _v[1];
|
|
744
|
+
var _v = React.useState(SubmissionStatus.READY),
|
|
745
|
+
submissionStatus = _v[0],
|
|
746
|
+
setSubmissionStatus = _v[1];
|
|
748
747
|
var _w = React.useState(null),
|
|
749
|
-
|
|
750
|
-
|
|
748
|
+
submissionRequest = _w[0],
|
|
749
|
+
setSubmissionRequest = _w[1];
|
|
751
750
|
var _x = React.useState(null),
|
|
752
|
-
|
|
753
|
-
|
|
751
|
+
submissionResponse = _x[0],
|
|
752
|
+
setSubmissionResponse = _x[1];
|
|
754
753
|
var _y = React.useState(null),
|
|
755
|
-
|
|
756
|
-
|
|
754
|
+
submissionError = _y[0],
|
|
755
|
+
setSubmissionError = _y[1];
|
|
757
756
|
var _z = React.useState(null),
|
|
758
|
-
|
|
759
|
-
|
|
757
|
+
retrySubmission = _z[0],
|
|
758
|
+
setRetrySubmission = _z[1];
|
|
760
759
|
var _0 = React.useState(null),
|
|
761
|
-
|
|
762
|
-
|
|
760
|
+
livenessCheckRequest = _0[0],
|
|
761
|
+
setLivenessCheckRequest = _0[1];
|
|
763
762
|
var _1 = React.useState(null),
|
|
764
|
-
|
|
765
|
-
|
|
763
|
+
idFrontImage = _1[0],
|
|
764
|
+
setIdFrontImage = _1[1];
|
|
766
765
|
var _2 = React.useState(null),
|
|
767
|
-
|
|
768
|
-
|
|
766
|
+
idBackImage = _2[0],
|
|
767
|
+
setIdBackImage = _2[1];
|
|
769
768
|
var _3 = React.useState(null),
|
|
770
|
-
|
|
771
|
-
|
|
769
|
+
passportImage = _3[0],
|
|
770
|
+
setPassportImage = _3[1];
|
|
772
771
|
var _4 = React.useState(null),
|
|
773
|
-
|
|
774
|
-
|
|
772
|
+
selfieImage = _4[0],
|
|
773
|
+
setSelfieImage = _4[1];
|
|
775
774
|
var _5 = React.useState(null),
|
|
776
|
-
|
|
777
|
-
|
|
775
|
+
signatureData = _5[0],
|
|
776
|
+
setSignatureData = _5[1];
|
|
778
777
|
var _6 = React.useState(null),
|
|
779
|
-
|
|
780
|
-
|
|
778
|
+
signatureVideoUrl = _6[0],
|
|
779
|
+
setSignatureVideoUrl = _6[1];
|
|
781
780
|
var _7 = React.useState(null),
|
|
782
|
-
|
|
783
|
-
|
|
781
|
+
idCaptureVideoUrl = _7[0],
|
|
782
|
+
setIdCaptureVideoUrl = _7[1];
|
|
784
783
|
var _8 = React.useState(null),
|
|
785
|
-
|
|
786
|
-
|
|
784
|
+
idCaptureVideoIdFrontImage = _8[0],
|
|
785
|
+
setIdCaptureVideoIdFrontImage = _8[1];
|
|
787
786
|
var _9 = React.useState(null),
|
|
788
|
-
|
|
789
|
-
|
|
787
|
+
idCaptureVideoIdBackImage = _9[0],
|
|
788
|
+
setIdCaptureVideoIdBackImage = _9[1];
|
|
790
789
|
var _10 = React.useState(null),
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
var _11 = React.useState(
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
var _12 = React.useState(
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
var _13 = React.useState(
|
|
800
|
-
|
|
801
|
-
|
|
790
|
+
additionalDocuments = _10[0],
|
|
791
|
+
setAdditionalDocuments = _10[1];
|
|
792
|
+
var _11 = React.useState(null),
|
|
793
|
+
geolocationResult = _11[0],
|
|
794
|
+
setGeolocationResult = _11[1];
|
|
795
|
+
var _12 = React.useState(0),
|
|
796
|
+
geolocationAttempts = _12[0],
|
|
797
|
+
setGeolocationAttempts = _12[1];
|
|
798
|
+
var _13 = React.useState(false),
|
|
799
|
+
geolocationBlocked = _13[0],
|
|
800
|
+
setGeolocationBlocked = _13[1];
|
|
802
801
|
var _14 = React.useState([]),
|
|
803
|
-
|
|
804
|
-
|
|
802
|
+
idFrontCaptureAttempts = _14[0],
|
|
803
|
+
setIdFrontCaptureAttempts = _14[1];
|
|
805
804
|
var _15 = React.useState([]),
|
|
806
|
-
|
|
807
|
-
|
|
805
|
+
idBackCaptureAttempts = _15[0],
|
|
806
|
+
setIdBackCaptureAttempts = _15[1];
|
|
807
|
+
var _16 = React.useState([]),
|
|
808
|
+
selfieCaptureAttempts = _16[0],
|
|
809
|
+
setSelfieCaptureAttempts = _16[1];
|
|
808
810
|
var logIdFrontCaptureAttempt = React.useCallback(function (attempt) {
|
|
809
811
|
setIdFrontCaptureAttempts(function (attempts) {
|
|
810
812
|
return tslib.__spreadArray(tslib.__spreadArray([], attempts, true), [attempt], false);
|
|
@@ -1165,12 +1167,12 @@ var SubmissionProvider = function SubmissionProvider(_a) {
|
|
|
1165
1167
|
setSubmissionStatus(SubmissionStatus.READY);
|
|
1166
1168
|
retrySubmission();
|
|
1167
1169
|
}, [retrySubmission]);
|
|
1168
|
-
var
|
|
1169
|
-
tokenState =
|
|
1170
|
-
setTokenState =
|
|
1171
|
-
var
|
|
1172
|
-
tokenError =
|
|
1173
|
-
setTokenError =
|
|
1170
|
+
var _17 = React.useState('NOT_PARSED'),
|
|
1171
|
+
tokenState = _17[0],
|
|
1172
|
+
setTokenState = _17[1];
|
|
1173
|
+
var _18 = React.useState(null),
|
|
1174
|
+
tokenError = _18[0],
|
|
1175
|
+
setTokenError = _18[1];
|
|
1174
1176
|
React.useEffect(function () {
|
|
1175
1177
|
if (typeof window === 'undefined') return;
|
|
1176
1178
|
(function () {
|
|
@@ -16757,9 +16759,7 @@ var DocumentCapture = function DocumentCapture(_a) {
|
|
|
16757
16759
|
lang = _b === void 0 ? 'auto' : _b,
|
|
16758
16760
|
submissionToken = _a.submissionToken,
|
|
16759
16761
|
submissionUrl = _a.submissionUrl,
|
|
16760
|
-
|
|
16761
|
-
documentServiceUrl = _c === void 0 ? 'https://portal-api-dev.idmission.com/files/' : _c,
|
|
16762
|
-
// documentServiceUrl = 'http://localhost:10000/files/',
|
|
16762
|
+
documentServiceUrl = _a.documentServiceUrl,
|
|
16763
16763
|
onBeforeSubmit = _a.onBeforeSubmit,
|
|
16764
16764
|
onSubmit = _a.onSubmit,
|
|
16765
16765
|
onComplete = _a.onComplete,
|
|
@@ -16768,10 +16768,10 @@ var DocumentCapture = function DocumentCapture(_a) {
|
|
|
16768
16768
|
aspectRatio = _a.aspectRatio,
|
|
16769
16769
|
cameraFeedMode = _a.cameraFeedMode,
|
|
16770
16770
|
instructions = _a.instructions,
|
|
16771
|
-
|
|
16772
|
-
theme =
|
|
16773
|
-
|
|
16774
|
-
classNames =
|
|
16771
|
+
_c = _a.theme,
|
|
16772
|
+
theme = _c === void 0 ? 'default' : _c,
|
|
16773
|
+
_d = _a.classNames,
|
|
16774
|
+
classNames = _d === void 0 ? {} : _d;
|
|
16775
16775
|
useLanguage(lang);
|
|
16776
16776
|
return /*#__PURE__*/React__default['default'].createElement(ThemeProvider, {
|
|
16777
16777
|
theme: theme
|
|
@@ -16781,11 +16781,11 @@ var DocumentCapture = function DocumentCapture(_a) {
|
|
|
16781
16781
|
token: submissionToken,
|
|
16782
16782
|
documentServiceUrl: documentServiceUrl,
|
|
16783
16783
|
onBeforeSubmit: onBeforeSubmit,
|
|
16784
|
-
onSubmit: onSubmit
|
|
16785
|
-
onResponseReceived: onComplete
|
|
16784
|
+
onSubmit: onSubmit
|
|
16786
16785
|
}, /*#__PURE__*/React__default['default'].createElement(CameraProvider, {
|
|
16787
16786
|
preferContinuityCamera: true
|
|
16788
16787
|
}, /*#__PURE__*/React__default['default'].createElement(DocumentCaptureWizard, {
|
|
16788
|
+
onSuccess: onComplete,
|
|
16789
16789
|
onExitCapture: onExitCapture,
|
|
16790
16790
|
onUserCancel: onUserCancel,
|
|
16791
16791
|
aspectRatio: aspectRatio,
|