idmission-web-sdk 0.0.10 → 0.0.12

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 CHANGED
@@ -137,6 +137,7 @@ Render a fullscreen capture component that analyzes frames from the user's front
137
137
  <tr><td><code>onComplete</code> (optional)</td><td>callback function that fires when the user has completed the FaceValidation flow. 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.</td></tr>
138
138
  <tr><td><code>onApproved</code> (optional)</td><td>callback function that fires when the user completes the IDValidation flow and passes the realness check. The SubmissionResponse from IDmission's API is passed as an argument to the customer's application for further handling.</td></tr>
139
139
  <tr><td><code>onDenied</code> (optional)</td><td>callback function that fires when the user completes the IDValidation flow and fails the realness check. The SubmissionResponse from IDmission's API is passed as an argument to the customer's application for further handling.</td></tr>
140
+ <tr><td><code>onExitAfterFailure</code> (optional)</td><td>callback function that fires when the user clicks the exit button after completing the IDValidation flow and failing the realness check.</td></tr>
140
141
  <tr><td><code>lang</code> (optional)</td><td>language code to use. Supported values: 'auto' (detect based on user's OS), 'en' (English), 'es' (Spanish). Defaults to auto.</td></tr>
141
142
  <tr><td><code>timeoutDurationMs</code> (optional)</td><td>the duration of time in milliseconds that the user may try to pass the realness check. Defaults to `15000` (15 seconds).</td></tr>
142
143
  <tr><td><code>assets</code> (optional)</td><td>object containing any asset overrides, for available options consult the Assets table below.</td></tr>
@@ -207,6 +208,7 @@ Render a fullscreen capture component that performs IDValidation and FaceValidat
207
208
  <tr><td><code>onComplete</code> (optional)</td><td>callback function that fires when the user has completed both flows. 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.</td></tr>
208
209
  <tr><td><code>onApproved</code> (optional)</td><td>callback function that fires when the user completes both flows with a valid ID and passes the realness check. The SubmissionResponse from IDmission's API is passed as an argument to the customer's application for further handling.</td></tr>
209
210
  <tr><td><code>onDenied</code> (optional)</td><td>callback function that fires when the user completes both flows with an invalid ID or fails the realness check. The SubmissionResponse from IDmission's API is passed as an argument to the customer's application for further handling.</td></tr>
211
+ <tr><td><code>onExitAfterFailure</code> (optional)</td><td>callback function that fires when the user clicks the exit button after completing the IDValidation flow and failing the realness check.</td></tr>
210
212
  <tr><td><code>captureSignature</code> (optional)</td><td>boolean indicating whether the user should be prompted to sign the screen before submission. Defaults to false.</td></tr>
211
213
  <tr><td><code>captureSignatureVideo</code> (optional)</td><td>boolean indicating whether the user should be prompted to record themselves signing the screen before submission. Defaults to false.</td></tr>
212
214
  <tr><td><code>captureAdditionalDocuments</code> (optional)</td><td>array of additional documents to be captured. Each element includes a name and description.</td></tr>
@@ -255,6 +257,7 @@ Render a fullscreen capture component that performs IDValidation and FaceValidat
255
257
  <tr><td><code>onComplete</code> (optional)</td><td>callback function that fires when the user has completed the CustomerIdAndBiometricsEnrollment flow. 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.</td></tr>
256
258
  <tr><td><code>onEnrolled</code> (optional)</td><td>callback function that fires when the user has completed the CustomerIdAndBiometricsEnrollment flow successfully. 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.</td></tr>
257
259
  <tr><td><code>onDenied</code> (optional)</td><td>callback function that fires when the user has completed the CustomerIdAndBiometricsEnrollment flow but could not be enrolled. 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.</td></tr>
260
+ <tr><td><code>onExitAfterFailure</code> (optional)</td><td>callback function that fires when the user clicks the exit button after completing the IDValidation flow and failing the realness check.</td></tr>
258
261
  <tr><td><code>captureSignature</code> (optional)</td><td>boolean indicating whether the user should be prompted to sign the screen before submission. Defaults to false.</td></tr>
259
262
  <tr><td><code>captureSignatureVideo</code> (optional)</td><td>boolean indicating whether the user should be prompted to record themselves signing the screen before submission. Defaults to false.</td></tr>
260
263
  <tr><td><code>captureAdditionalDocuments</code> (optional)</td><td>array of additional documents to be captured. Each element includes a name and description.</td></tr>
@@ -298,6 +301,7 @@ Render a fullscreen capture component that performs FaceValidation, and then sto
298
301
  <tr><td><code>onComplete</code> (optional)</td><td>callback function that fires when the user has completed the CustomerIdAndBiometricsEnrollment flow. 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.</td></tr>
299
302
  <tr><td><code>onEnrolled</code> (optional)</td><td>callback function that fires when the user has completed the CustomerIdAndBiometricsEnrollment flow successfully. 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.</td></tr>
300
303
  <tr><td><code>onDenied</code> (optional)</td><td>callback function that fires when the user has completed the CustomerIdAndBiometricsEnrollment flow but could not be enrolled. 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.</td></tr>
304
+ <tr><td><code>onExitAfterFailure</code> (optional)</td><td>callback function that fires when the user clicks the exit button after completing the IDValidation flow and failing the realness check.</td></tr>
301
305
  <tr><td><code>captureSignature</code> (optional)</td><td>boolean indicating whether the user should be prompted to sign the screen before submission. Defaults to false.</td></tr>
302
306
  <tr><td><code>captureSignatureVideo</code> (optional)</td><td>boolean indicating whether the user should be prompted to record themselves signing the screen before submission. Defaults to false.</td></tr>
303
307
  <tr><td><code>captureAdditionalDocuments</code> (optional)</td><td>array of additional documents to be captured. Each element includes a name and description.</td></tr>
@@ -364,6 +368,7 @@ Render a fullscreen capture component that analyzes frames from the user's front
364
368
  <tr><td><code>onComplete</code> (optional)</td><td>callback function that fires when the user has completed the CustomerIdentification flow. 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.</td></tr>
365
369
  <tr><td><code>onCustomerMatched</code> (optional)</td><td>callback function that fires when the user has completed the CustomerIdentification flow and matches a pre-registered customer <code>enrollmentId</code> in IDmission's database. 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.</td></tr>
366
370
  <tr><td><code>onCustomerNotMatched</code> (optional)</td><td>callback function that fires when the user has completed the CustomerIdentification flow but does not match any registered customer. 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.</td></tr>
371
+ <tr><td><code>onExitAfterFailure</code> (optional)</td><td>callback function that fires when the user clicks the exit button after completing the IDValidation flow and failing the realness check.</td></tr>
367
372
  <tr><td><code>lang</code> (optional)</td><td>language code to use. Supported values: 'auto' (detect based on user's OS), 'en' (English), 'es' (Spanish). Defaults to auto.</td></tr>
368
373
  <tr><td><code>assets</code> (optional)</td><td>object containing any asset overrides, for available options consult the Assets table below.</td></tr>
369
374
  <tr><td><code>verbiage</code> (optional)</td><td>object containing any verbiage overrides, for available options consult the Verbiage table below.</td></tr>
@@ -19,6 +19,7 @@ export type CustomerBiometricsEnrollmentProps = {
19
19
  onComplete?: (submissionResponse: SubmissionResponse) => void;
20
20
  onEnrolled?: (submissionResponse: SubmissionResponse) => void;
21
21
  onDenied?: (submissionResponse: SubmissionResponse) => void;
22
+ onExitAfterFailure?: () => void;
22
23
  captureSignature?: boolean | (() => Promise<boolean>);
23
24
  captureSignatureVideo?: boolean | (() => Promise<boolean>);
24
25
  captureAdditionalDocuments?: AdditionalDocument[];
@@ -26,4 +27,4 @@ export type CustomerBiometricsEnrollmentProps = {
26
27
  geolocationRequired?: boolean;
27
28
  debugMode?: boolean;
28
29
  };
29
- export declare const CustomerBiometricsEnrollment: ({ enrollmentId, lang, submissionToken, submissionEnvironment, submissionUrl, timeoutDurationMs, assets, verbiage, onBeforeSubmit, onComplete, onEnrolled, onDenied, captureSignature, captureSignatureVideo, captureAdditionalDocuments, geolocationEnabled, geolocationRequired, debugMode, }: CustomerBiometricsEnrollmentProps) => ReactElement;
30
+ export declare const CustomerBiometricsEnrollment: ({ enrollmentId, lang, submissionToken, submissionEnvironment, submissionUrl, timeoutDurationMs, assets, verbiage, onBeforeSubmit, onComplete, onEnrolled, onDenied, onExitAfterFailure, captureSignature, captureSignatureVideo, captureAdditionalDocuments, geolocationEnabled, geolocationRequired, debugMode, }: CustomerBiometricsEnrollmentProps) => ReactElement;
@@ -27,6 +27,7 @@ export type CustomerEnrollmentProps = {
27
27
  onComplete?: (submissionResponse: SubmissionResponse) => void;
28
28
  onEnrolled?: (submissionResponse: SubmissionResponse) => void;
29
29
  onDenied?: (submissionResponse: SubmissionResponse) => void;
30
+ onExitAfterFailure?: () => void;
30
31
  captureSignature?: boolean | (() => Promise<boolean>);
31
32
  captureSignatureVideo?: boolean | (() => Promise<boolean>);
32
33
  captureAdditionalDocuments?: AdditionalDocument[];
@@ -34,4 +35,4 @@ export type CustomerEnrollmentProps = {
34
35
  geolocationRequired?: boolean;
35
36
  debugMode?: boolean;
36
37
  };
37
- export declare const CustomerIdAndBiometricsEnrollment: ({ enrollmentId, lang, submissionToken, submissionEnvironment, submissionUrl, documentDetectionNonMaxSuppressionEnabled, idAutoCaptureEnabled, idCardAutoCaptureScoreThreshold, mrzDetectionScoreThreshold, passportAutoCaptureScoreThreshold, idCardFocusScoreThreshold, passportFocusScoreThreshold, idCaptureAssets, idCaptureVerbiage, faceLivenessTimeoutDurationMs, faceLivenessAssets, faceLivenessVerbiage, onBeforeSubmit, onComplete, onEnrolled, onDenied, captureSignature, captureSignatureVideo, captureAdditionalDocuments, geolocationEnabled, geolocationRequired, debugMode, }: CustomerEnrollmentProps) => ReactElement;
38
+ export declare const CustomerIdAndBiometricsEnrollment: ({ enrollmentId, lang, submissionToken, submissionEnvironment, submissionUrl, documentDetectionNonMaxSuppressionEnabled, idAutoCaptureEnabled, idCardAutoCaptureScoreThreshold, mrzDetectionScoreThreshold, passportAutoCaptureScoreThreshold, idCardFocusScoreThreshold, passportFocusScoreThreshold, idCaptureAssets, idCaptureVerbiage, faceLivenessTimeoutDurationMs, faceLivenessAssets, faceLivenessVerbiage, onBeforeSubmit, onComplete, onEnrolled, onDenied, onExitAfterFailure, captureSignature, captureSignatureVideo, captureAdditionalDocuments, geolocationEnabled, geolocationRequired, debugMode, }: CustomerEnrollmentProps) => ReactElement;
@@ -15,8 +15,9 @@ export type CustomerVerificationProps = {
15
15
  onComplete?: (submissionResponse: SubmissionResponse) => void;
16
16
  onCustomerMatched?: (submissionResponse: SubmissionResponse) => void;
17
17
  onCustomerNotMatched?: (submissionResponse: SubmissionResponse) => void;
18
+ onExitAfterFailure?: () => void;
18
19
  geolocationEnabled?: boolean;
19
20
  geolocationRequired?: boolean;
20
21
  debugMode?: boolean;
21
22
  };
22
- export declare const CustomerVerification: ({ lang, enrollmentId, submissionToken, submissionEnvironment, submissionUrl, timeoutDurationMs, assets, verbiage, onBeforeSubmit, onComplete, onCustomerMatched, onCustomerNotMatched, geolocationEnabled, geolocationRequired, debugMode, }: CustomerVerificationProps) => ReactElement;
23
+ export declare const CustomerVerification: ({ lang, enrollmentId, submissionToken, submissionEnvironment, submissionUrl, timeoutDurationMs, assets, verbiage, onBeforeSubmit, onComplete, onCustomerMatched, onCustomerNotMatched, onExitAfterFailure, geolocationEnabled, geolocationRequired, debugMode, }: CustomerVerificationProps) => ReactElement;
@@ -12,10 +12,11 @@ export type FaceValidationProps = {
12
12
  onComplete?: (submissionResponse: SubmissionResponse | null) => void;
13
13
  onApproved?: (submissionResponse: SubmissionResponse | null) => void;
14
14
  onDenied?: (submissionResponse: SubmissionResponse | null) => void;
15
+ onExitAfterFailure?: () => void;
15
16
  assets?: FaceLivenessAssets;
16
17
  verbiage?: FaceLivenessVerbiage;
17
18
  geolocationEnabled?: boolean;
18
19
  geolocationRequired?: boolean;
19
20
  debugMode?: boolean;
20
21
  };
21
- export declare const FaceValidation: ({ lang, submissionToken, submissionEnvironment, submissionUrl, timeoutDurationMs, onBeforeSubmit, onComplete, onApproved, onDenied, assets, verbiage, geolocationEnabled, geolocationRequired, debugMode, }: FaceValidationProps) => ReactElement;
22
+ export declare const FaceValidation: ({ lang, submissionToken, submissionEnvironment, submissionUrl, timeoutDurationMs, onBeforeSubmit, onComplete, onApproved, onDenied, onExitAfterFailure, assets, verbiage, geolocationEnabled, geolocationRequired, debugMode, }: FaceValidationProps) => ReactElement;
@@ -26,6 +26,7 @@ export type IdAndFaceValidationProps = {
26
26
  onComplete?: (submissionResponse: SubmissionResponse) => void;
27
27
  onApproved?: (submissionResponse: SubmissionResponse) => void;
28
28
  onDenied?: (submissionResponse: SubmissionResponse | null) => void;
29
+ onExitAfterFailure?: () => void;
29
30
  captureSignature?: boolean | (() => Promise<boolean>);
30
31
  captureSignatureVideo?: boolean | (() => Promise<boolean>);
31
32
  captureAdditionalDocuments?: AdditionalDocument[];
@@ -33,4 +34,4 @@ export type IdAndFaceValidationProps = {
33
34
  geolocationRequired?: boolean;
34
35
  debugMode?: boolean;
35
36
  };
36
- export declare const IdAndFaceValidation: ({ lang, submissionToken, submissionEnvironment, submissionUrl, documentDetectionNonMaxSuppressionEnabled, idAutoCaptureEnabled, idCardAutoCaptureScoreThreshold, mrzDetectionScoreThreshold, passportAutoCaptureScoreThreshold, idCardFocusScoreThreshold, passportFocusScoreThreshold, idCaptureAssets, idCaptureVerbiage, faceLivenessTimeoutDurationMs, faceLivenessAssets, faceLivenessVerbiage, onBeforeSubmit, onComplete, onApproved, onDenied, captureSignature, captureSignatureVideo, captureAdditionalDocuments, geolocationEnabled, geolocationRequired, debugMode, }: IdAndFaceValidationProps) => ReactElement;
37
+ export declare const IdAndFaceValidation: ({ lang, submissionToken, submissionEnvironment, submissionUrl, documentDetectionNonMaxSuppressionEnabled, idAutoCaptureEnabled, idCardAutoCaptureScoreThreshold, mrzDetectionScoreThreshold, passportAutoCaptureScoreThreshold, idCardFocusScoreThreshold, passportFocusScoreThreshold, idCaptureAssets, idCaptureVerbiage, faceLivenessTimeoutDurationMs, faceLivenessAssets, faceLivenessVerbiage, onBeforeSubmit, onComplete, onApproved, onDenied, onExitAfterFailure, captureSignature, captureSignatureVideo, captureAdditionalDocuments, geolocationEnabled, geolocationRequired, debugMode, }: IdAndFaceValidationProps) => ReactElement;
@@ -11879,6 +11879,7 @@ var FaceValidation = function FaceValidation(_a) {
11879
11879
  onComplete = _a.onComplete,
11880
11880
  onApproved = _a.onApproved,
11881
11881
  onDenied = _a.onDenied,
11882
+ onExitAfterFailure = _a.onExitAfterFailure,
11882
11883
  assets = _a.assets,
11883
11884
  verbiage = _a.verbiage,
11884
11885
  _e = _a.geolocationEnabled,
@@ -11894,12 +11895,12 @@ var FaceValidation = function FaceValidation(_a) {
11894
11895
  onComplete: onComplete,
11895
11896
  onSuccess: onApproved,
11896
11897
  onTimeout: onDenied,
11897
- onExitAfterFailure: onDenied,
11898
+ onExitAfterFailure: onExitAfterFailure,
11898
11899
  assets: assets,
11899
11900
  verbiage: verbiage,
11900
11901
  debugMode: debugMode
11901
11902
  };
11902
- }, [assets, debugMode, onApproved, onComplete, onDenied, timeoutDurationMs, verbiage]);
11903
+ }, [assets, debugMode, onApproved, onComplete, onDenied, onExitAfterFailure, timeoutDurationMs, verbiage]);
11903
11904
  return /*#__PURE__*/React__default['default'].createElement(SubmissionProvider, {
11904
11905
  action: SubmissionAction.NONE,
11905
11906
  environment: submissionEnvironment,
@@ -11948,6 +11949,7 @@ var IdAndFaceValidation = function IdAndFaceValidation(_a) {
11948
11949
  onComplete = _a.onComplete,
11949
11950
  onApproved = _a.onApproved,
11950
11951
  onDenied = _a.onDenied,
11952
+ onExitAfterFailure = _a.onExitAfterFailure,
11951
11953
  _m = _a.captureSignature,
11952
11954
  captureSignature = _m === void 0 ? false : _m,
11953
11955
  _o = _a.captureSignatureVideo,
@@ -11979,12 +11981,12 @@ var IdAndFaceValidation = function IdAndFaceValidation(_a) {
11979
11981
  return {
11980
11982
  timeoutDurationMs: faceLivenessTimeoutDurationMs,
11981
11983
  onTimeout: onDenied,
11982
- onExitAfterFailure: onDenied,
11984
+ onExitAfterFailure: onExitAfterFailure,
11983
11985
  assets: faceLivenessAssets,
11984
11986
  verbiage: faceLivenessVerbiage,
11985
11987
  debugMode: debugMode
11986
11988
  };
11987
- }, [debugMode, faceLivenessAssets, faceLivenessTimeoutDurationMs, faceLivenessVerbiage, onDenied]);
11989
+ }, [debugMode, faceLivenessAssets, faceLivenessTimeoutDurationMs, faceLivenessVerbiage, onDenied, onExitAfterFailure]);
11988
11990
  var signatureCaptureProps = React.useMemo(function () {
11989
11991
  return {
11990
11992
  verbiage: {
@@ -12065,6 +12067,7 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
12065
12067
  onComplete = _a.onComplete,
12066
12068
  onEnrolled = _a.onEnrolled,
12067
12069
  onDenied = _a.onDenied,
12070
+ onExitAfterFailure = _a.onExitAfterFailure,
12068
12071
  _m = _a.captureSignature,
12069
12072
  captureSignature = _m === void 0 ? false : _m,
12070
12073
  _o = _a.captureSignatureVideo,
@@ -12094,12 +12097,13 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
12094
12097
  }, [debugMode, documentDetectionNonMaxSuppressionEnabled, idAutoCaptureEnabled, idCaptureAssets, idCaptureVerbiage, idCardAutoCaptureScoreThreshold, idCardFocusScoreThreshold, mrzDetectionScoreThreshold, passportAutoCaptureScoreThreshold, passportFocusScoreThreshold]);
12095
12098
  var faceLivenessProps = React.useMemo(function () {
12096
12099
  return {
12100
+ onExitAfterFailure: onExitAfterFailure,
12097
12101
  timeoutDurationMs: faceLivenessTimeoutDurationMs,
12098
12102
  assets: faceLivenessAssets,
12099
12103
  verbiage: faceLivenessVerbiage,
12100
12104
  debugMode: debugMode
12101
12105
  };
12102
- }, [debugMode, faceLivenessAssets, faceLivenessTimeoutDurationMs, faceLivenessVerbiage]);
12106
+ }, [debugMode, faceLivenessAssets, faceLivenessTimeoutDurationMs, faceLivenessVerbiage, onExitAfterFailure]);
12103
12107
  var signatureCaptureProps = React.useMemo(function () {
12104
12108
  return {
12105
12109
  verbiage: {
@@ -12524,6 +12528,7 @@ var CustomerVerification = function CustomerVerification(_a) {
12524
12528
  onComplete = _a.onComplete,
12525
12529
  onCustomerMatched = _a.onCustomerMatched,
12526
12530
  onCustomerNotMatched = _a.onCustomerNotMatched,
12531
+ onExitAfterFailure = _a.onExitAfterFailure,
12527
12532
  _e = _a.geolocationEnabled,
12528
12533
  geolocationEnabled = _e === void 0 ? true : _e,
12529
12534
  _f = _a.geolocationRequired,
@@ -12546,6 +12551,7 @@ var CustomerVerification = function CustomerVerification(_a) {
12546
12551
  onComplete: onComplete,
12547
12552
  onCustomerMatched: onCustomerMatched,
12548
12553
  onCustomerNotMatched: onCustomerNotMatched,
12554
+ onExitAfterFailure: onExitAfterFailure,
12549
12555
  captureGuidanceTimeoutDurationMs: timeoutDurationMs,
12550
12556
  assets: assets,
12551
12557
  verbiage: verbiage,
@@ -13010,6 +13016,7 @@ var CustomerBiometricsEnrollment = function CustomerBiometricsEnrollment(_a) {
13010
13016
  onComplete = _a.onComplete,
13011
13017
  onEnrolled = _a.onEnrolled,
13012
13018
  onDenied = _a.onDenied,
13019
+ onExitAfterFailure = _a.onExitAfterFailure,
13013
13020
  _e = _a.captureSignature,
13014
13021
  captureSignature = _e === void 0 ? false : _e,
13015
13022
  _f = _a.captureSignatureVideo,
@@ -13025,12 +13032,13 @@ var CustomerBiometricsEnrollment = function CustomerBiometricsEnrollment(_a) {
13025
13032
  useLanguage(lang);
13026
13033
  var faceLivenessProps = React.useMemo(function () {
13027
13034
  return {
13035
+ onExitAfterFailure: onExitAfterFailure,
13028
13036
  timeoutDurationMs: timeoutDurationMs,
13029
13037
  assets: assets,
13030
13038
  verbiage: verbiage,
13031
13039
  debugMode: debugMode
13032
13040
  };
13033
- }, [assets, debugMode, timeoutDurationMs, verbiage]);
13041
+ }, [assets, debugMode, onExitAfterFailure, timeoutDurationMs, verbiage]);
13034
13042
  var signatureCaptureProps = React.useMemo(function () {
13035
13043
  return {
13036
13044
  verbiage: {