idmission-web-sdk 1.0.45 → 1.0.47
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/README.md +3 -0
- package/dist/components/customer_flows/CustomerIdAndBiometricsEnrollment.d.ts +1 -0
- package/dist/components/customer_flows/IdAndFaceValidation.d.ts +1 -0
- package/dist/components/customer_flows/IdValidation.d.ts +1 -0
- package/dist/components/submission/SubmissionProvider.d.ts +2 -1
- package/dist/sdk2.cjs.development.js +70 -62
- 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 +70 -62
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +70 -62
- 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/README.md
CHANGED
|
@@ -69,6 +69,7 @@ Render a fullscreen ID capture component that instructs the user to photograph b
|
|
|
69
69
|
<tr><td><code>skipSuccessScreen</code> (optional)</td><td>boolean to indicate whether to proceed automatically after capture guidance is satisfied. If an async function is supplied returning a boolean, it will be evaluated at the time of capture guidance satisfaction. Defaults to false.</td></tr>
|
|
70
70
|
<tr><td><code>companyId</code> (optional)</td><td>company identifier to include with submission.</td></tr>
|
|
71
71
|
<tr><td><code>manualReviewRequired</code> (optional)</td><td>boolean flag to indicate whether responses should always be reviewed by a human.</td></tr>
|
|
72
|
+
<tr><td><code>idBackImageRequired</code> (optional)</td><td>boolean flag to indicate whether ID card back image should be processed on the server. Default is `true`.</td></tr>
|
|
72
73
|
<tr><td><code>verifyIdWithExternalDatabases</code> (optional)</td><td>boolean flag to indicate whether ID data should be verified with government databases such as AAMVA, watch lists, etc.</td></tr>
|
|
73
74
|
<tr><td><code>personalData</code> (optional)</td><td>object of personal data to store with the submitted ID. Valid keys: uniqueNumber, name, phone, phoneCountryCode, email, dob, gender, addressLine1, addressLine2, city, district, postalCode, country.</td></tr>
|
|
74
75
|
<tr><td><code>cardData</code> (optional)</td><td>object of credit/debit card data to store with the submitted ID. Valid keys: cardToken, cardLast4, cardExpDate, nameOnCard.</td></tr>
|
|
@@ -310,6 +311,7 @@ Render a fullscreen capture component that performs IDValidation and FaceValidat
|
|
|
310
311
|
<tr><td><code>skipSuccessScreen</code> (optional)</td><td>boolean to indicate whether to proceed automatically after capture guidance is satisfied. If an async function is supplied returning a boolean, it will be evaluated at the time of capture guidance satisfaction. Defaults to false.</td></tr>
|
|
311
312
|
<tr><td><code>companyId</code> (optional)</td><td>company identifier to include with submission.</td></tr>
|
|
312
313
|
<tr><td><code>manualReviewRequired</code> (optional)</td><td>boolean flag to indicate whether responses should always be reviewed by a human.</td></tr>
|
|
314
|
+
<tr><td><code>idBackImageRequired</code> (optional)</td><td>boolean flag to indicate whether ID card back image should be processed on the server. Default is `true</td></tr>
|
|
313
315
|
<tr><td><code>verifyIdWithExternalDatabases</code> (optional)</td><td>boolean flag to indicate whether ID data should be verified with government databases such as AAMVA, watch lists, etc.</td></tr>
|
|
314
316
|
<tr><td><code>personalData</code> (optional)</td><td>object of personal data to store with the submitted ID. Valid keys: uniqueNumber, name, phone, phoneCountryCode, email, dob, gender, addressLine1, addressLine2, city, district, postalCode, country.</td></tr>
|
|
315
317
|
<tr><td><code>cardData</code> (optional)</td><td>object of credit/debit card data to store with the submitted ID. Valid keys: cardToken, cardLast4, cardExpDate, nameOnCard.</td></tr>
|
|
@@ -371,6 +373,7 @@ Render a fullscreen capture component that performs IDValidation and FaceValidat
|
|
|
371
373
|
<tr><td><code>skipSuccessScreen</code> (optional)</td><td>boolean to indicate whether to proceed automatically after capture guidance is satisfied. If an async function is supplied returning a boolean, it will be evaluated at the time of capture guidance satisfaction. Defaults to false.</td></tr>
|
|
372
374
|
<tr><td><code>companyId</code> (optional)</td><td>company identifier to include with submission.</td></tr>
|
|
373
375
|
<tr><td><code>manualReviewRequired</code> (optional)</td><td>boolean flag to indicate whether responses should always be reviewed by a human.</td></tr>
|
|
376
|
+
<tr><td><code>idBackImageRequired</code> (optional)</td><td>boolean flag to indicate whether ID card back image should be processed on the server. Default is `true</td></tr>
|
|
374
377
|
<tr><td><code>verifyIdWithExternalDatabases</code> (optional)</td><td>boolean flag to indicate whether ID data should be verified with government databases such as AAMVA, watch lists, etc.</td></tr>
|
|
375
378
|
<tr><td><code>personalData</code> (optional)</td><td>object of personal data to store with the submitted ID. Valid keys: uniqueNumber, name, phone, phoneCountryCode, email, dob, gender, addressLine1, addressLine2, city, district, postalCode, country.</td></tr>
|
|
376
379
|
<tr><td><code>cardData</code> (optional)</td><td>object of credit/debit card data to store with the submitted ID. Valid keys: cardToken, cardLast4, cardExpDate, nameOnCard.</td></tr>
|
|
@@ -31,6 +31,7 @@ export interface CustomerEnrollmentProps extends PropsWithChildren {
|
|
|
31
31
|
submissionUrl?: string;
|
|
32
32
|
companyId?: string;
|
|
33
33
|
manualReviewRequired?: boolean;
|
|
34
|
+
idBackImageRequired?: boolean;
|
|
34
35
|
verifyIdWithExternalDatabases?: boolean;
|
|
35
36
|
personalData?: PersonalData;
|
|
36
37
|
cardData?: CardData;
|
|
@@ -30,6 +30,7 @@ export interface IdAndFaceValidationProps extends PropsWithChildren {
|
|
|
30
30
|
submissionUrl?: string;
|
|
31
31
|
companyId?: string;
|
|
32
32
|
manualReviewRequired?: boolean;
|
|
33
|
+
idBackImageRequired?: boolean;
|
|
33
34
|
verifyIdWithExternalDatabases?: boolean;
|
|
34
35
|
personalData?: PersonalData;
|
|
35
36
|
cardData?: CardData;
|
|
@@ -22,6 +22,7 @@ export interface IdValidationProps extends PropsWithChildren {
|
|
|
22
22
|
submissionUrl?: string;
|
|
23
23
|
companyId?: string;
|
|
24
24
|
manualReviewRequired?: boolean;
|
|
25
|
+
idBackImageRequired?: boolean;
|
|
25
26
|
verifyIdWithExternalDatabases?: boolean;
|
|
26
27
|
personalData?: PersonalData;
|
|
27
28
|
cardData?: CardData;
|
|
@@ -11,6 +11,7 @@ export type SubmissionProviderProps = {
|
|
|
11
11
|
personalData?: PersonalData;
|
|
12
12
|
cardData?: CardData;
|
|
13
13
|
manualReviewRequired?: boolean;
|
|
14
|
+
idBackImageRequired?: boolean;
|
|
14
15
|
verifyIdWithExternalDatabases?: boolean;
|
|
15
16
|
deduplicationEnabled?: boolean;
|
|
16
17
|
deduplicationSynchronous?: boolean;
|
|
@@ -23,4 +24,4 @@ export type SubmissionProviderProps = {
|
|
|
23
24
|
onResponseReceived?: (response: SubmissionResponse) => void;
|
|
24
25
|
onRequestFailure?: (err: Error) => void;
|
|
25
26
|
};
|
|
26
|
-
export declare const SubmissionProvider: ({ action, children, url, environment, token, companyId, enrollmentId, personalData, cardData, manualReviewRequired, verifyIdWithExternalDatabases, deduplicationEnabled, deduplicationSynchronous, geolocationEnabled, geolocationRequired, webhooksEnabled, webhooksClientTraceId, webhooksStripSpecialCharacters, onBeforeSubmit, onResponseReceived, onRequestFailure, }: SubmissionProviderProps) => ReactElement;
|
|
27
|
+
export declare const SubmissionProvider: ({ action, children, url, environment, token, companyId, enrollmentId, personalData, cardData, manualReviewRequired, idBackImageRequired, verifyIdWithExternalDatabases, deduplicationEnabled, deduplicationSynchronous, geolocationEnabled, geolocationRequired, webhooksEnabled, webhooksClientTraceId, webhooksStripSpecialCharacters, onBeforeSubmit, onResponseReceived, onRequestFailure, }: SubmissionProviderProps) => ReactElement;
|
|
@@ -48,7 +48,7 @@ var tf__namespace = /*#__PURE__*/_interopNamespace(tf);
|
|
|
48
48
|
var useResizeObserver__default = /*#__PURE__*/_interopDefaultLegacy(useResizeObserver);
|
|
49
49
|
var SignatureCanvas__default = /*#__PURE__*/_interopDefaultLegacy(SignatureCanvas);
|
|
50
50
|
|
|
51
|
-
var webSdkVersion = '1.0.
|
|
51
|
+
var webSdkVersion = '1.0.47';
|
|
52
52
|
|
|
53
53
|
function getPlatform() {
|
|
54
54
|
return window.platform;
|
|
@@ -494,81 +494,83 @@ var SubmissionProvider = function SubmissionProvider(_a) {
|
|
|
494
494
|
cardData = _a.cardData,
|
|
495
495
|
_c = _a.manualReviewRequired,
|
|
496
496
|
manualReviewRequired = _c === void 0 ? false : _c,
|
|
497
|
-
_d = _a.
|
|
498
|
-
|
|
499
|
-
_e = _a.
|
|
500
|
-
|
|
501
|
-
_f = _a.
|
|
502
|
-
|
|
503
|
-
_g = _a.
|
|
504
|
-
|
|
505
|
-
_h = _a.
|
|
506
|
-
|
|
507
|
-
_j = _a.
|
|
508
|
-
|
|
497
|
+
_d = _a.idBackImageRequired,
|
|
498
|
+
idBackImageRequired = _d === void 0 ? true : _d,
|
|
499
|
+
_e = _a.verifyIdWithExternalDatabases,
|
|
500
|
+
verifyIdWithExternalDatabases = _e === void 0 ? false : _e,
|
|
501
|
+
_f = _a.deduplicationEnabled,
|
|
502
|
+
deduplicationEnabled = _f === void 0 ? false : _f,
|
|
503
|
+
_g = _a.deduplicationSynchronous,
|
|
504
|
+
deduplicationSynchronous = _g === void 0 ? false : _g,
|
|
505
|
+
_h = _a.geolocationEnabled,
|
|
506
|
+
geolocationEnabled = _h === void 0 ? true : _h,
|
|
507
|
+
_j = _a.geolocationRequired,
|
|
508
|
+
geolocationRequired = _j === void 0 ? false : _j,
|
|
509
|
+
_k = _a.webhooksEnabled,
|
|
510
|
+
webhooksEnabled = _k === void 0 ? false : _k,
|
|
509
511
|
webhooksClientTraceId = _a.webhooksClientTraceId,
|
|
510
|
-
|
|
511
|
-
webhooksStripSpecialCharacters =
|
|
512
|
+
_l = _a.webhooksStripSpecialCharacters,
|
|
513
|
+
webhooksStripSpecialCharacters = _l === void 0 ? true : _l,
|
|
512
514
|
onBeforeSubmit = _a.onBeforeSubmit,
|
|
513
515
|
onResponseReceived = _a.onResponseReceived,
|
|
514
516
|
onRequestFailure = _a.onRequestFailure;
|
|
515
|
-
var
|
|
516
|
-
submissionStatus =
|
|
517
|
-
setSubmissionStatus =
|
|
518
|
-
var _m = React.useState(null),
|
|
519
|
-
submissionRequest = _m[0],
|
|
520
|
-
setSubmissionRequest = _m[1];
|
|
517
|
+
var _m = React.useState(SubmissionStatus.READY),
|
|
518
|
+
submissionStatus = _m[0],
|
|
519
|
+
setSubmissionStatus = _m[1];
|
|
521
520
|
var _o = React.useState(null),
|
|
522
|
-
|
|
523
|
-
|
|
521
|
+
submissionRequest = _o[0],
|
|
522
|
+
setSubmissionRequest = _o[1];
|
|
524
523
|
var _p = React.useState(null),
|
|
525
|
-
|
|
526
|
-
|
|
524
|
+
submissionResponse = _p[0],
|
|
525
|
+
setSubmissionResponse = _p[1];
|
|
527
526
|
var _q = React.useState(null),
|
|
528
|
-
|
|
529
|
-
|
|
527
|
+
submissionError = _q[0],
|
|
528
|
+
setSubmissionError = _q[1];
|
|
530
529
|
var _r = React.useState(null),
|
|
531
|
-
|
|
532
|
-
|
|
530
|
+
retrySubmission = _r[0],
|
|
531
|
+
setRetrySubmission = _r[1];
|
|
533
532
|
var _s = React.useState(null),
|
|
534
|
-
|
|
535
|
-
|
|
533
|
+
idFrontImage = _s[0],
|
|
534
|
+
setIdFrontImage = _s[1];
|
|
536
535
|
var _t = React.useState(null),
|
|
537
|
-
|
|
538
|
-
|
|
536
|
+
idBackImage = _t[0],
|
|
537
|
+
setIdBackImage = _t[1];
|
|
539
538
|
var _u = React.useState(null),
|
|
540
|
-
|
|
541
|
-
|
|
539
|
+
passportImage = _u[0],
|
|
540
|
+
setPassportImage = _u[1];
|
|
542
541
|
var _v = React.useState(null),
|
|
543
|
-
|
|
544
|
-
|
|
542
|
+
selfieImage = _v[0],
|
|
543
|
+
setSelfieImage = _v[1];
|
|
545
544
|
var _w = React.useState(null),
|
|
546
|
-
|
|
547
|
-
|
|
545
|
+
signatureData = _w[0],
|
|
546
|
+
setSignatureData = _w[1];
|
|
548
547
|
var _x = React.useState(null),
|
|
549
|
-
|
|
550
|
-
|
|
548
|
+
signatureVideoUrl = _x[0],
|
|
549
|
+
setSignatureVideoUrl = _x[1];
|
|
551
550
|
var _y = React.useState(null),
|
|
552
|
-
|
|
553
|
-
|
|
551
|
+
idCaptureVideoUrl = _y[0],
|
|
552
|
+
setIdCaptureVideoUrl = _y[1];
|
|
554
553
|
var _z = React.useState(null),
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
var _0 = React.useState(
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
var _1 = React.useState(
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
var _2 = React.useState(
|
|
564
|
-
|
|
565
|
-
|
|
554
|
+
additionalDocuments = _z[0],
|
|
555
|
+
setAdditionalDocuments = _z[1];
|
|
556
|
+
var _0 = React.useState(null),
|
|
557
|
+
geolocationResult = _0[0],
|
|
558
|
+
setGeolocationResult = _0[1];
|
|
559
|
+
var _1 = React.useState(0),
|
|
560
|
+
geolocationAttempts = _1[0],
|
|
561
|
+
setGeolocationAttempts = _1[1];
|
|
562
|
+
var _2 = React.useState(false),
|
|
563
|
+
geolocationBlocked = _2[0],
|
|
564
|
+
setGeolocationBlocked = _2[1];
|
|
566
565
|
var _3 = React.useState([]),
|
|
567
|
-
|
|
568
|
-
|
|
566
|
+
idFrontCaptureAttempts = _3[0],
|
|
567
|
+
setIdFrontCaptureAttempts = _3[1];
|
|
569
568
|
var _4 = React.useState([]),
|
|
570
|
-
|
|
571
|
-
|
|
569
|
+
idBackCaptureAttempts = _4[0],
|
|
570
|
+
setIdBackCaptureAttempts = _4[1];
|
|
571
|
+
var _5 = React.useState([]),
|
|
572
|
+
selfieCaptureAttempts = _5[0],
|
|
573
|
+
setSelfieCaptureAttempts = _5[1];
|
|
572
574
|
var logIdFrontCaptureAttempt = React.useCallback(function (attempt) {
|
|
573
575
|
setIdFrontCaptureAttempts(function (attempts) {
|
|
574
576
|
return tslib.__spreadArray(tslib.__spreadArray([], attempts, true), [attempt], false);
|
|
@@ -632,7 +634,7 @@ var SubmissionProvider = function SubmissionProvider(_a) {
|
|
|
632
634
|
needImmediateResponse: 'N',
|
|
633
635
|
deduplicationSynchronous: deduplicationSynchronous ? 'Y' : 'N',
|
|
634
636
|
verifyDataWithHost: verifyIdWithExternalDatabases ? 'Y' : 'N',
|
|
635
|
-
idBackImageRequired: 'N',
|
|
637
|
+
idBackImageRequired: idBackImageRequired ? 'Y' : 'N',
|
|
636
638
|
stripSpecialCharacters: webhooksStripSpecialCharacters ? 'Y' : 'N',
|
|
637
639
|
idImageResolutionCheck: 'Y'
|
|
638
640
|
}
|
|
@@ -762,7 +764,7 @@ var SubmissionProvider = function SubmissionProvider(_a) {
|
|
|
762
764
|
}
|
|
763
765
|
});
|
|
764
766
|
});
|
|
765
|
-
}, [action,
|
|
767
|
+
}, [action, manualReviewRequired, deduplicationEnabled, webhooksEnabled, deduplicationSynchronous, verifyIdWithExternalDatabases, idBackImageRequired, webhooksStripSpecialCharacters, idFrontImage, idBackImage, passportImage, selfieImage, companyId, personalData, cardData, enrollmentId, webhooksClientTraceId, signatureData, additionalDocuments, idCaptureVideoUrl, signatureVideoUrl, selfieCaptureAttempts, idFrontCaptureAttempts, idBackCaptureAttempts, geolocationResult, onBeforeSubmit, url, environment, token, onResponseReceived, onRequestFailure]);
|
|
766
768
|
var checkLiveness = React.useCallback(function (imageDataUrl) {
|
|
767
769
|
return tslib.__awaiter(void 0, void 0, void 0, function () {
|
|
768
770
|
var request, host, endpoint, response, statusMessage, submissionResponse_3, e_2, err;
|
|
@@ -784,7 +786,7 @@ var SubmissionProvider = function SubmissionProvider(_a) {
|
|
|
784
786
|
case 1:
|
|
785
787
|
request = (_a.customerData = (_b.biometricData = (_c.selfie = _d.sent(), _c), _b), _a.additionalData = {
|
|
786
788
|
uniqueRequestId: new Date().getTime().toString(),
|
|
787
|
-
stripSpecialCharacters: 'Y',
|
|
789
|
+
stripSpecialCharacters: webhooksStripSpecialCharacters ? 'Y' : 'N',
|
|
788
790
|
estimateAge: 'N',
|
|
789
791
|
predictGender: 'N'
|
|
790
792
|
}, _a);
|
|
@@ -843,7 +845,7 @@ var SubmissionProvider = function SubmissionProvider(_a) {
|
|
|
843
845
|
}
|
|
844
846
|
});
|
|
845
847
|
});
|
|
846
|
-
}, [environment, geolocationResult, idBackCaptureAttempts, idFrontCaptureAttempts, onRequestFailure, selfieCaptureAttempts, token, url]);
|
|
848
|
+
}, [environment, geolocationResult, idBackCaptureAttempts, idFrontCaptureAttempts, onRequestFailure, selfieCaptureAttempts, token, url, webhooksStripSpecialCharacters]);
|
|
847
849
|
var retryLocationAccess = React.useCallback(function () {
|
|
848
850
|
setGeolocationAttempts(function (n) {
|
|
849
851
|
return n + 1;
|
|
@@ -12657,6 +12659,7 @@ var IdValidation = function IdValidation(_a) {
|
|
|
12657
12659
|
submissionUrl = _a.submissionUrl,
|
|
12658
12660
|
companyId = _a.companyId,
|
|
12659
12661
|
manualReviewRequired = _a.manualReviewRequired,
|
|
12662
|
+
idBackImageRequired = _a.idBackImageRequired,
|
|
12660
12663
|
verifyIdWithExternalDatabases = _a.verifyIdWithExternalDatabases,
|
|
12661
12664
|
personalData = _a.personalData,
|
|
12662
12665
|
cardData = _a.cardData,
|
|
@@ -12748,6 +12751,7 @@ var IdValidation = function IdValidation(_a) {
|
|
|
12748
12751
|
token: submissionToken,
|
|
12749
12752
|
companyId: companyId,
|
|
12750
12753
|
manualReviewRequired: manualReviewRequired,
|
|
12754
|
+
idBackImageRequired: idBackImageRequired,
|
|
12751
12755
|
verifyIdWithExternalDatabases: verifyIdWithExternalDatabases,
|
|
12752
12756
|
personalData: personalData,
|
|
12753
12757
|
cardData: cardData,
|
|
@@ -12846,6 +12850,7 @@ var IdAndFaceValidation = function IdAndFaceValidation(_a) {
|
|
|
12846
12850
|
submissionUrl = _a.submissionUrl,
|
|
12847
12851
|
companyId = _a.companyId,
|
|
12848
12852
|
manualReviewRequired = _a.manualReviewRequired,
|
|
12853
|
+
idBackImageRequired = _a.idBackImageRequired,
|
|
12849
12854
|
verifyIdWithExternalDatabases = _a.verifyIdWithExternalDatabases,
|
|
12850
12855
|
personalData = _a.personalData,
|
|
12851
12856
|
cardData = _a.cardData,
|
|
@@ -12953,6 +12958,7 @@ var IdAndFaceValidation = function IdAndFaceValidation(_a) {
|
|
|
12953
12958
|
token: submissionToken,
|
|
12954
12959
|
companyId: companyId,
|
|
12955
12960
|
manualReviewRequired: manualReviewRequired,
|
|
12961
|
+
idBackImageRequired: idBackImageRequired,
|
|
12956
12962
|
verifyIdWithExternalDatabases: verifyIdWithExternalDatabases,
|
|
12957
12963
|
personalData: personalData,
|
|
12958
12964
|
cardData: cardData,
|
|
@@ -12988,6 +12994,7 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
|
|
|
12988
12994
|
submissionUrl = _a.submissionUrl,
|
|
12989
12995
|
companyId = _a.companyId,
|
|
12990
12996
|
manualReviewRequired = _a.manualReviewRequired,
|
|
12997
|
+
idBackImageRequired = _a.idBackImageRequired,
|
|
12991
12998
|
verifyIdWithExternalDatabases = _a.verifyIdWithExternalDatabases,
|
|
12992
12999
|
personalData = _a.personalData,
|
|
12993
13000
|
cardData = _a.cardData,
|
|
@@ -13097,6 +13104,7 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
|
|
|
13097
13104
|
companyId: companyId,
|
|
13098
13105
|
enrollmentId: enrollmentId,
|
|
13099
13106
|
manualReviewRequired: manualReviewRequired,
|
|
13107
|
+
idBackImageRequired: idBackImageRequired,
|
|
13100
13108
|
verifyIdWithExternalDatabases: verifyIdWithExternalDatabases,
|
|
13101
13109
|
personalData: personalData,
|
|
13102
13110
|
cardData: cardData,
|