idmission-web-sdk 1.0.49 → 1.0.51

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.
Files changed (35) hide show
  1. package/README.md +17 -15
  2. package/dist/components/customer_flows/CustomerBiometricsEnrollment.d.ts +2 -3
  3. package/dist/components/customer_flows/CustomerIdAndBiometricsEnrollment.d.ts +2 -3
  4. package/dist/components/customer_flows/CustomerIdentification.d.ts +1 -2
  5. package/dist/components/customer_flows/CustomerVerification.d.ts +1 -2
  6. package/dist/components/customer_flows/FaceValidation.d.ts +5 -6
  7. package/dist/components/customer_flows/IdAndFaceValidation.d.ts +3 -3
  8. package/dist/components/customer_flows/IdValidation.d.ts +1 -2
  9. package/dist/components/customer_flows/SignatureKYC.d.ts +1 -2
  10. package/dist/components/customer_flows/VideoIdValidation.d.ts +4 -5
  11. package/dist/components/face_liveness/FaceLivenessWizard.d.ts +5 -5
  12. package/dist/components/submission/SubmissionProvider.d.ts +3 -2
  13. package/dist/components/video_id/IdVideoCaptureWizard.d.ts +2 -2
  14. package/dist/contexts/SubmissionContext.d.ts +1 -0
  15. package/dist/sdk2.cjs.development.js +216 -225
  16. package/dist/sdk2.cjs.development.js.map +1 -1
  17. package/dist/sdk2.cjs.production.js +1 -1
  18. package/dist/sdk2.cjs.production.js.map +1 -1
  19. package/dist/sdk2.esm.js +216 -225
  20. package/dist/sdk2.esm.js.map +1 -1
  21. package/dist/sdk2.umd.development.js +216 -225
  22. package/dist/sdk2.umd.development.js.map +1 -1
  23. package/dist/sdk2.umd.production.js +1 -1
  24. package/dist/sdk2.umd.production.js.map +1 -1
  25. package/dist/stories/CustomerFlows/CustomerBiometricsEnrollment.stories.d.ts +0 -78
  26. package/dist/stories/CustomerFlows/CustomerIdAndBiometricsEnrollment.stories.d.ts +0 -108
  27. package/dist/stories/CustomerFlows/CustomerIdentification.stories.d.ts +0 -75
  28. package/dist/stories/CustomerFlows/CustomerVerification.stories.d.ts +0 -69
  29. package/dist/stories/CustomerFlows/FaceValidation.stories.d.ts +0 -69
  30. package/dist/stories/CustomerFlows/IdAndFaceValidation.stories.d.ts +1 -103
  31. package/dist/stories/CustomerFlows/IdValidation.stories.d.ts +1 -94
  32. package/dist/stories/CustomerFlows/SignatureKYC.stories.d.ts +0 -36
  33. package/dist/stories/CustomerFlows/VideoIdValidation.stories.d.ts +1 -87
  34. package/dist/version.d.ts +1 -1
  35. package/package.json +1 -1
package/README.md CHANGED
@@ -52,7 +52,7 @@ Render a fullscreen ID capture component that instructs the user to photograph b
52
52
 
53
53
  <table>
54
54
  <tr><td><code>submissionToken</code></td><td>a token generated with your IDmission credentials.</td></tr>
55
- <tr><td><code>submissionUrl</code></td><td>URL to hit with all API requests. Default: https://api.idmission.com</td></tr>
55
+ <tr><td><code>submissionUrl</code> (optional)</td><td>URL to hit with all API requests. Default: https://api.idmission.com</td></tr>
56
56
  <tr><td><code>onBeforeSubmit</code> (optional)</td><td>callback function that fires immediately prior to submission, giving the client application an opportunity to specify custom asynchronous logic that mutates the request before it executes. The submission request is passed in as a parameter and a promise resolving to the updated request should be returned.</td></tr>
57
57
  <tr><td><code>onComplete</code> (optional)</td><td>callback function that fires when the user completes the IDValidation 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.</td></tr>
58
58
  <tr><td><code>onApproved</code> (optional)</td><td>callback function that fires when the user completes the IDValidation flow with a valid ID. Arguments: same as onComplete.</td></tr>
@@ -186,12 +186,12 @@ Render a fullscreen capture component that analyzes frames from the user's front
186
186
 
187
187
  <table>
188
188
  <tr><td><code>submissionToken</code></td><td>a token generated with your IDmission credentials.</td></tr>
189
- <tr><td><code>submissionUrl</code></td><td>URL to hit with all API requests. Default: https://api.idmission.com</td></tr>
189
+ <tr><td><code>submissionUrl</code> (optional)</td><td>URL to hit with all API requests. Default: https://api.idmission.com</td></tr>
190
190
  <tr><td><code>onBeforeSubmit</code> (optional)</td><td>callback function that fires immediately prior to submission, giving the client application an opportunity to specify custom asynchronous logic that mutates the request before it executes. The submission request is passed in as a parameter and a promise resolving to the updated request should be returned.</td></tr>
191
191
  <tr><td><code>onComplete</code> (optional)</td><td>callback function that fires when the user has completed the FaceValidation flow, regardless of whether they are approved or denied. 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.</td></tr>
192
- <tr><td><code>onApproved</code> (optional)</td><td>callback function that fires when the user completes the IDValidation flow and passes the realness check. Arguments: same as onComplete.</td></tr>
193
- <tr><td><code>onDenied</code> (optional)</td><td>callback function that fires when the user completes the IDValidation flow and fails the realness check. Arguments: same as onComplete.</td></tr>
194
- <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>
192
+ <tr><td><code>onApproved</code> (optional)</td><td>callback function that fires when the user completes the FaceValidation flow and passes the realness check. Arguments: same as onComplete.</td></tr>
193
+ <tr><td><code>onDenied</code> (optional)</td><td>callback function that fires when the user completes the FaceValidation flow and fails the realness check. Arguments: same as onComplete.</td></tr>
194
+ <tr><td><code>onExitAfterFailure</code> (optional)</td><td>callback function that fires when the user clicks the exit button after completing the FaceValidation flow and failing the realness check.</td></tr>
195
195
  <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>
196
196
  <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>
197
197
  <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>
@@ -292,7 +292,8 @@ Render a fullscreen capture component that performs IDValidation and FaceValidat
292
292
 
293
293
  <table>
294
294
  <tr><td><code>submissionToken</code></td><td>a token generated with your IDmission credentials.</td></tr>
295
- <tr><td><code>submissionUrl</code></td><td>URL to hit with all API requests. Default: https://api.idmission.com</td></tr>
295
+ <tr><td><code>submissionUrl</code> (optional)</td><td>URL to hit with all API requests. Default: https://api.idmission.com</td></tr>
296
+ <tr><td><code>onBeforeLivenessCheck</code> (optional)</td><td>callback function that fires immediately prior to liveness check, giving the client application an opportunity to specify custom asynchronous logic that mutates the request before it executes. The liveness check request is passed in as a parameter and a promise resolving to the updated request should be returned.</td></tr>
296
297
  <tr><td><code>onBeforeSubmit</code> (optional)</td><td>callback function that fires immediately prior to submission, giving the client application an opportunity to specify custom asynchronous logic that mutates the request before it executes. The submission request is passed in as a parameter and a promise resolving to the updated request should be returned.</td></tr>
297
298
  <tr><td><code>onComplete</code> (optional)</td><td>callback function that fires when the user has completed both flows. 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.</td></tr>
298
299
  <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. Arguments: same as onComplete.</td></tr>
@@ -311,7 +312,7 @@ Render a fullscreen capture component that performs IDValidation and FaceValidat
311
312
  <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>
312
313
  <tr><td><code>companyId</code> (optional)</td><td>company identifier to include with submission.</td></tr>
313
314
  <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 the back of the ID card image will be considered in processing decisions. Default is `true</td></tr>
315
+ <tr><td><code>idBackImageRequired</code> (optional)</td><td>boolean flag to indicate whether the back of the ID card image will be considered in processing decisions. Default is `true`.</td></tr>
315
316
  <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>
316
317
  <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>
317
318
  <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>
@@ -353,7 +354,7 @@ Render a fullscreen capture component that performs IDValidation and FaceValidat
353
354
 
354
355
  <table>
355
356
  <tr><td><code>submissionToken</code></td><td>a token generated with your IDmission credentials.</td></tr>
356
- <tr><td><code>submissionUrl</code></td><td>URL to hit with all API requests. Default: https://api.idmission.com</td></tr>
357
+ <tr><td><code>submissionUrl</code> (optional)</td><td>URL to hit with all API requests. Default: https://api.idmission.com</td></tr>
357
358
  <tr><td><code>enrollmentId</code></td><td>the unique identifier to use for the customer to be enrolled. Overrides <code>personalData.uniqueNumber</code> if both are specified.</td></tr>
358
359
  <tr><td><code>onBeforeSubmit</code> (optional)</td><td>callback function that fires immediately prior to submission, giving the client application an opportunity to specify custom asynchronous logic that mutates the request before it executes. The submission request is passed in as a parameter and a promise resolving to the updated request should be returned.</td></tr>
359
360
  <tr><td><code>onComplete</code> (optional)</td><td>callback function that fires when the user has completed the CustomerIdAndBiometricsEnrollment 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.</td></tr>
@@ -414,12 +415,12 @@ Render a fullscreen capture component that performs FaceValidation, and then sto
414
415
 
415
416
  <table>
416
417
  <tr><td><code>submissionToken</code></td><td>a token generated with your IDmission credentials.</td></tr>
417
- <tr><td><code>submissionUrl</code></td><td>URL to hit with all API requests. Default: https://api.idmission.com</td></tr>
418
+ <tr><td><code>submissionUrl</code> (optional)</td><td>URL to hit with all API requests. Default: https://api.idmission.com</td></tr>
418
419
  <tr><td><code>enrollmentId</code></td><td>the unique identifier to use for the customer to be enrolled. Overrides <code>personalData.uniqueNumber</code> if both are specified.</td></tr>
419
420
  <tr><td><code>onBeforeSubmit</code> (optional)</td><td>callback function that fires immediately prior to submission, giving the client application an opportunity to specify custom asynchronous logic that mutates the request before it executes. The submission request is passed in as a parameter and a promise resolving to the updated request should be returned.</td></tr>
420
- <tr><td><code>onComplete</code> (optional)</td><td>callback function that fires when the user has completed the CustomerIdAndBiometricsEnrollment 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.</td></tr>
421
- <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>
422
- <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>
421
+ <tr><td><code>onComplete</code> (optional)</td><td>callback function that fires when the user has completed the CustomerBiometricsEnrollment 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.</td></tr>
422
+ <tr><td><code>onEnrolled</code> (optional)</td><td>callback function that fires when the user has completed the CustomerBiometricsEnrollment 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>
423
+ <tr><td><code>onDenied</code> (optional)</td><td>callback function that fires when the user has completed the CustomerBiometricsEnrollment 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>
423
424
  <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>
424
425
  <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>
425
426
  <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>
@@ -462,12 +463,13 @@ Render a fullscreen capture component that analyzes frames from the user's front
462
463
 
463
464
  <table>
464
465
  <tr><td><code>submissionToken</code></td><td>a token generated with your IDmission credentials.</td></tr>
465
- <tr><td><code>submissionUrl</code></td><td>URL to hit with all API requests. Default: https://api.idmission.com</td></tr>
466
+ <tr><td><code>submissionUrl</code> (optional)</td><td>URL to hit with all API requests. Default: https://api.idmission.com</td></tr>
466
467
  <tr><td><code>enrollmentId</code></td><td>the unique identifier to match from previously enrolled customers.</td></tr>
467
468
  <tr><td><code>onBeforeSubmit</code> (optional)</td><td>callback function that fires immediately prior to submission, giving the client application an opportunity to specify custom asynchronous logic that mutates the request before it executes. The submission request is passed in as a parameter and a promise resolving to the updated request should be returned.</td></tr>
468
469
  <tr><td><code>onComplete</code> (optional)</td><td>callback function that fires when the user has completed the CustomerVerification 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.</td></tr>
469
470
  <tr><td><code>onCustomerMatched</code> (optional)</td><td>callback function that fires when the user has completed the CustomerVerification flow and matches the specified customer <code>enrollmentId</code>. 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>
470
471
  <tr><td><code>onCustomerNotMatched</code> (optional)</td><td>callback function that fires when the user has completed the CustomerVerification flow but does not match the specified customer <code>enrollmentId</code>. 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>
472
+ <tr><td><code>onExitAfterFailure</code> (optional)</td><td>callback function that fires when the user clicks the exit button after failing the realness check.</td></tr>
471
473
  <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>
472
474
  <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>
473
475
  <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>
@@ -500,12 +502,12 @@ Render a fullscreen capture component that analyzes frames from the user's front
500
502
 
501
503
  <table>
502
504
  <tr><td><code>submissionToken</code></td><td>a token generated with your IDmission credentials.</td></tr>
503
- <tr><td><code>submissionUrl</code></td><td>URL to hit with all API requests. Default: https://api.idmission.com</td></tr>
505
+ <tr><td><code>submissionUrl</code> (optional)</td><td>URL to hit with all API requests. Default: https://api.idmission.com</td></tr>
504
506
  <tr><td><code>onBeforeSubmit</code> (optional)</td><td>callback function that fires immediately prior to submission, giving the client application an opportunity to specify custom asynchronous logic that mutates the request before it executes. The submission request is passed in as a parameter and a promise resolving to the updated request should be returned.</td></tr>
505
507
  <tr><td><code>onComplete</code> (optional)</td><td>callback function that fires when the user has completed the CustomerIdentification 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.</td></tr>
506
508
  <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>
507
509
  <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>
508
- <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>
510
+ <tr><td><code>onExitAfterFailure</code> (optional)</td><td>callback function that fires when the user clicks the exit button after failing the realness check.</td></tr>
509
511
  <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>
510
512
  <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>
511
513
  <tr><td><code>companyId</code> (optional)</td><td>company identifier to include with submission.</td></tr>
@@ -1,5 +1,5 @@
1
1
  import { FC, PropsWithChildren } from 'react';
2
- import { SubmissionEnvironment, SubmissionRequest, SubmissionResponse } from '../../contexts/SubmissionContext';
2
+ import { SubmissionRequest, SubmissionResponse } from '../../contexts/SubmissionContext';
3
3
  import { FaceLivenessAssets, FaceLivenessColors, FaceLivenessVerbiage } from '../face_liveness/FaceLivenessWizard';
4
4
  import { AdditionalDocumentCaptureWizardVerbiage } from '../additional_document_capture/AdditionalDocumentCaptureWizard';
5
5
  import { AdditionalDocument } from '../additional_document_capture/AdditionalDocumentCapture';
@@ -23,7 +23,6 @@ export interface CustomerBiometricsEnrollmentProps extends PropsWithChildren {
23
23
  enrollmentId: string;
24
24
  lang?: LangOption;
25
25
  submissionToken: string;
26
- submissionEnvironment?: SubmissionEnvironment;
27
26
  submissionUrl?: string;
28
27
  companyId?: string;
29
28
  deduplicationEnabled?: boolean;
@@ -38,9 +37,9 @@ export interface CustomerBiometricsEnrollmentProps extends PropsWithChildren {
38
37
  onEnrolled?: (resp: SubmissionResponse, req: SubmissionRequest) => void;
39
38
  onDenied?: (resp: SubmissionResponse, req: SubmissionRequest) => void;
40
39
  onExitAfterFailure?: () => void;
41
- captureAdditionalDocuments?: AdditionalDocument[];
42
40
  captureSignature?: boolean | (() => Promise<boolean>);
43
41
  captureSignatureVideo?: boolean | (() => Promise<boolean>);
42
+ captureAdditionalDocuments?: AdditionalDocument[];
44
43
  assets?: CustomerBiometricsEnrollmentAssets;
45
44
  colors?: CustomerBiometricsEnrollmentColors;
46
45
  verbiage?: CustomerBiometricsEnrollmentVerbiage;
@@ -1,5 +1,5 @@
1
1
  import { FC, PropsWithChildren } from 'react';
2
- import { CardData, PersonalData, SubmissionEnvironment, SubmissionRequest, SubmissionResponse } from '../../contexts/SubmissionContext';
2
+ import { CardData, PersonalData, SubmissionRequest, SubmissionResponse } from '../../contexts/SubmissionContext';
3
3
  import { FaceLivenessAssets, FaceLivenessColors, FaceLivenessVerbiage } from '../face_liveness/FaceLivenessWizard';
4
4
  import { IdCaptureWizardAssets, IdCaptureWizardColors, IdCaptureWizardVerbiage } from '../id_capture/IdCaptureWizard';
5
5
  import { AdditionalDocumentCaptureWizardVerbiage } from '../additional_document_capture/AdditionalDocumentCaptureWizard';
@@ -27,7 +27,6 @@ export interface CustomerEnrollmentProps extends PropsWithChildren {
27
27
  enrollmentId: string;
28
28
  lang?: LangOption;
29
29
  submissionToken: string;
30
- submissionEnvironment?: SubmissionEnvironment;
31
30
  submissionUrl?: string;
32
31
  companyId?: string;
33
32
  manualReviewRequired?: boolean;
@@ -53,9 +52,9 @@ export interface CustomerEnrollmentProps extends PropsWithChildren {
53
52
  onEnrolled?: (resp: SubmissionResponse, req: SubmissionRequest) => void;
54
53
  onDenied?: (resp: SubmissionResponse, req: SubmissionRequest) => void;
55
54
  onExitAfterFailure?: () => void;
56
- captureAdditionalDocuments?: AdditionalDocument[];
57
55
  captureSignature?: boolean | (() => Promise<boolean>);
58
56
  captureSignatureVideo?: boolean | (() => Promise<boolean>);
57
+ captureAdditionalDocuments?: AdditionalDocument[];
59
58
  assets?: CustomerEnrollmentAssets;
60
59
  colors?: CustomerEnrollmentColors;
61
60
  verbiage?: CustomerEnrollmentVerbiage;
@@ -1,11 +1,10 @@
1
1
  import { FC, PropsWithChildren } from 'react';
2
- import { SubmissionEnvironment, SubmissionRequest, SubmissionResponse } from '../../contexts/SubmissionContext';
2
+ import { SubmissionRequest, SubmissionResponse } from '../../contexts/SubmissionContext';
3
3
  import { CustomerIdentificationAssets, CustomerIdentificationColors, CustomerIdentificationVerbiage } from '../customer_identification/CustomerIdentificationWizard';
4
4
  import { LangOption } from '../../lib/locales';
5
5
  export interface CustomerIdentificationProps extends PropsWithChildren {
6
6
  lang?: LangOption;
7
7
  submissionToken: string;
8
- submissionEnvironment?: SubmissionEnvironment;
9
8
  submissionUrl?: string;
10
9
  companyId?: string;
11
10
  webhooksEnabled?: boolean;
@@ -1,12 +1,11 @@
1
1
  import { FC, PropsWithChildren } from 'react';
2
- import { SubmissionEnvironment, SubmissionRequest, SubmissionResponse } from '../../contexts/SubmissionContext';
2
+ import { SubmissionRequest, SubmissionResponse } from '../../contexts/SubmissionContext';
3
3
  import { LangOption } from '../../lib/locales';
4
4
  import { CustomerVerificationAssets, CustomerVerificationColors, CustomerVerificationVerbiage } from '../customer_verification/CustomerVerificationWizard';
5
5
  export interface CustomerVerificationProps extends PropsWithChildren {
6
6
  enrollmentId: string;
7
7
  lang?: LangOption;
8
8
  submissionToken: string;
9
- submissionEnvironment?: SubmissionEnvironment;
10
9
  submissionUrl?: string;
11
10
  companyId?: string;
12
11
  webhooksEnabled?: boolean;
@@ -1,11 +1,10 @@
1
1
  import { FC, PropsWithChildren } from 'react';
2
- import { SubmissionEnvironment, SubmissionRequest, SubmissionResponse } from '../../contexts/SubmissionContext';
2
+ import { LivenessCheckRequest, SubmissionResponse } from '../../contexts/SubmissionContext';
3
3
  import { FaceLivenessAssets, FaceLivenessColors, FaceLivenessVerbiage } from '../face_liveness/FaceLivenessWizard';
4
4
  import { LangOption } from '../../lib/locales';
5
5
  export interface FaceValidationProps extends PropsWithChildren {
6
6
  lang?: LangOption;
7
7
  submissionToken: string;
8
- submissionEnvironment?: SubmissionEnvironment;
9
8
  submissionUrl?: string;
10
9
  companyId?: string;
11
10
  webhooksEnabled?: boolean;
@@ -13,10 +12,10 @@ export interface FaceValidationProps extends PropsWithChildren {
13
12
  webhooksStripSpecialCharacters?: boolean;
14
13
  timeoutDurationMs?: number;
15
14
  skipSuccessScreen?: boolean | (() => Promise<boolean>);
16
- onBeforeSubmit?: (req: SubmissionRequest) => Promise<SubmissionRequest>;
17
- onComplete?: (resp: SubmissionResponse | null, req: SubmissionRequest | null) => void;
18
- onApproved?: (resp: SubmissionResponse, req: SubmissionRequest) => void;
19
- onDenied?: (resp: SubmissionResponse | null, req: SubmissionRequest | null) => void;
15
+ onBeforeSubmit?: (req: LivenessCheckRequest) => Promise<LivenessCheckRequest>;
16
+ onComplete?: (resp: SubmissionResponse | null, req: LivenessCheckRequest | null) => void;
17
+ onApproved?: (resp: SubmissionResponse, req: LivenessCheckRequest) => void;
18
+ onDenied?: (resp: SubmissionResponse | null, req: LivenessCheckRequest | null) => void;
20
19
  onExitAfterFailure?: () => void;
21
20
  assets?: FaceLivenessAssets;
22
21
  colors?: FaceLivenessColors;
@@ -1,5 +1,5 @@
1
1
  import { FC, PropsWithChildren } from 'react';
2
- import { CardData, PersonalData, SubmissionEnvironment, SubmissionRequest, SubmissionResponse } from '../../contexts/SubmissionContext';
2
+ import { CardData, LivenessCheckRequest, PersonalData, SubmissionRequest, SubmissionResponse } from '../../contexts/SubmissionContext';
3
3
  import { FaceLivenessAssets, FaceLivenessColors, FaceLivenessVerbiage } from '../face_liveness/FaceLivenessWizard';
4
4
  import { IdCaptureWizardAssets, IdCaptureWizardColors, IdCaptureWizardVerbiage } from '../id_capture/IdCaptureWizard';
5
5
  import { AdditionalDocumentCaptureWizardVerbiage } from '../additional_document_capture/AdditionalDocumentCaptureWizard';
@@ -26,7 +26,6 @@ export type IdAndFaceValidationVerbiage = {
26
26
  export interface IdAndFaceValidationProps extends PropsWithChildren {
27
27
  lang?: LangOption;
28
28
  submissionToken: string;
29
- submissionEnvironment?: SubmissionEnvironment;
30
29
  submissionUrl?: string;
31
30
  companyId?: string;
32
31
  manualReviewRequired?: boolean;
@@ -45,10 +44,11 @@ export interface IdAndFaceValidationProps extends PropsWithChildren {
45
44
  passportFocusScoreThreshold?: number;
46
45
  faceLivenessTimeoutDurationMs?: number;
47
46
  skipSuccessScreen?: boolean | (() => Promise<boolean>);
47
+ onBeforeLivenessCheck?: (req: LivenessCheckRequest) => Promise<LivenessCheckRequest>;
48
48
  onBeforeSubmit?: (req: SubmissionRequest) => Promise<SubmissionRequest>;
49
49
  onComplete?: (resp: SubmissionResponse, req: SubmissionRequest) => void;
50
50
  onApproved?: (resp: SubmissionResponse, req: SubmissionRequest) => void;
51
- onDenied?: (resp: SubmissionResponse | null, req: SubmissionRequest | null) => void;
51
+ onDenied?: (resp: SubmissionResponse | null, req: SubmissionRequest | LivenessCheckRequest | null) => void;
52
52
  onExitAfterFailure?: () => void;
53
53
  captureSignature?: boolean | (() => Promise<boolean>);
54
54
  captureSignatureVideo?: boolean | (() => Promise<boolean>);
@@ -1,5 +1,5 @@
1
1
  import { FC, PropsWithChildren } from 'react';
2
- import { CardData, PersonalData, SubmissionEnvironment, SubmissionRequest, SubmissionResponse } from '../../contexts/SubmissionContext';
2
+ import { CardData, PersonalData, SubmissionRequest, SubmissionResponse } from '../../contexts/SubmissionContext';
3
3
  import { IdCaptureWizardAssets, IdCaptureWizardColors, IdCaptureWizardVerbiage } from '../id_capture/IdCaptureWizard';
4
4
  import { AdditionalDocumentCaptureWizardVerbiage } from '../additional_document_capture/AdditionalDocumentCaptureWizard';
5
5
  import { AdditionalDocument } from '../additional_document_capture/AdditionalDocumentCapture';
@@ -18,7 +18,6 @@ export type IdValidationVerbiage = IdCaptureWizardVerbiage & {
18
18
  export interface IdValidationProps extends PropsWithChildren {
19
19
  lang?: LangOption;
20
20
  submissionToken: string;
21
- submissionEnvironment?: SubmissionEnvironment;
22
21
  submissionUrl?: string;
23
22
  companyId?: string;
24
23
  manualReviewRequired?: boolean;
@@ -1,11 +1,10 @@
1
1
  import { FC, PropsWithChildren } from 'react';
2
2
  import { LangOption } from '../../lib/locales';
3
- import { SubmissionEnvironment, SubmissionRequest, SubmissionResponse } from '../../contexts/SubmissionContext';
3
+ import { SubmissionRequest, SubmissionResponse } from '../../contexts/SubmissionContext';
4
4
  import { VideoSignatureColors, VideoSignatureVerbiage } from '../video_signature_capture/VideoSignatureWizard';
5
5
  export interface SignatureKYCProps extends PropsWithChildren {
6
6
  lang?: LangOption;
7
7
  submissionToken: string;
8
- submissionEnvironment?: SubmissionEnvironment;
9
8
  submissionUrl?: string;
10
9
  onBeforeSubmit?: (req: SubmissionRequest) => Promise<SubmissionRequest>;
11
10
  onComplete?: (resp: SubmissionResponse, req: SubmissionRequest) => void;
@@ -1,5 +1,5 @@
1
1
  import { FC, PropsWithChildren } from 'react';
2
- import { CardData, PersonalData, SubmissionEnvironment, SubmissionRequest, SubmissionResponse } from '../../contexts/SubmissionContext';
2
+ import { CardData, LivenessCheckRequest, PersonalData, SubmissionRequest, SubmissionResponse } from '../../contexts/SubmissionContext';
3
3
  import { CustomerSuppliedVerbiage, LangOption } from '../../lib/locales';
4
4
  import { VideoIdWizardAssets, VideoIdWizardColors, VideoIdWizardVerbiage } from '../video_id/IdVideoCaptureWizard';
5
5
  import { IdCaptureWizardProps } from '../id_capture/IdCaptureWizard';
@@ -10,7 +10,6 @@ export type VideoIdValidationVerbiage = VideoIdWizardVerbiage;
10
10
  export interface VideoIdValidationProps extends PropsWithChildren {
11
11
  lang?: LangOption;
12
12
  submissionToken: string;
13
- submissionEnvironment?: SubmissionEnvironment;
14
13
  submissionUrl?: string;
15
14
  companyId?: string;
16
15
  manualReviewRequired?: boolean;
@@ -23,7 +22,7 @@ export interface VideoIdValidationProps extends PropsWithChildren {
23
22
  webhooksStripSpecialCharacters?: boolean;
24
23
  onBeforeSubmit?: (req: SubmissionRequest) => Promise<SubmissionRequest>;
25
24
  onComplete?: (resp: SubmissionResponse, req: SubmissionRequest) => void;
26
- onExitAfterFailure?: (resp: SubmissionResponse | null, req: SubmissionRequest | null) => void;
25
+ onExitAfterFailure?: (resp: SubmissionResponse | null, req: LivenessCheckRequest | null) => void;
27
26
  idCaptureProps?: IdCaptureWizardProps;
28
27
  faceLivenessProps?: FaceLivenessWizardProps;
29
28
  idCardFrontDetectionThreshold?: number;
@@ -33,11 +32,11 @@ export interface VideoIdValidationProps extends PropsWithChildren {
33
32
  readTextPrompt?: CustomerSuppliedVerbiage;
34
33
  readTextTimeoutDurationMs?: number;
35
34
  skipSuccessScreen?: boolean | (() => Promise<boolean>);
36
- geolocationEnabled?: boolean;
37
- geolocationRequired?: boolean;
38
35
  assets?: VideoIdValidationAssets;
39
36
  colors?: VideoIdValidationColors;
40
37
  verbiage?: VideoIdValidationVerbiage;
38
+ geolocationEnabled?: boolean;
39
+ geolocationRequired?: boolean;
41
40
  debugMode?: boolean;
42
41
  }
43
42
  export declare const VideoIdValidation: FC<VideoIdValidationProps>;
@@ -3,7 +3,7 @@ import { FaceLivenessCaptureColors, FaceLivenessCaptureVerbiage } from './FaceLi
3
3
  import { SelfieCaptureLoadingOverlayAssets, SelfieCaptureLoadingOverlayColors, SelfieCaptureLoadingOverlayVerbiage } from '../selfie_capture/SelfieCaptureLoadingOverlay';
4
4
  import { FaceLivenessSuccessColors, FaceLivenessSuccessVerbiage } from './FaceLivenessSuccess';
5
5
  import { FaceLivenessFailureAssets, FaceLivenessFailureColors, FaceLivenessFailureVerbiage } from './FaceLivenessFailure';
6
- import { SubmissionRequest, SubmissionResponse } from '../../contexts/SubmissionContext';
6
+ import { LivenessCheckRequest, SubmissionResponse } from '../../contexts/SubmissionContext';
7
7
  export type FaceLivenessAssets = {
8
8
  loadingOverlay?: SelfieCaptureLoadingOverlayAssets;
9
9
  failure?: FaceLivenessFailureAssets;
@@ -19,10 +19,10 @@ export type FaceLivenessVerbiage = FaceLivenessCaptureVerbiage & {
19
19
  failure?: FaceLivenessFailureVerbiage;
20
20
  };
21
21
  export type FaceLivenessWizardProps = {
22
- onSuccess?: (resp: SubmissionResponse, req: SubmissionRequest) => void;
23
- onComplete?: (resp: SubmissionResponse | null, req: SubmissionRequest | null) => void;
24
- onTimeout?: (resp: SubmissionResponse | null, req: SubmissionRequest | null) => void;
25
- onExitAfterFailure?: (resp: SubmissionResponse | null, req: SubmissionRequest | null) => void;
22
+ onSuccess?: (resp: SubmissionResponse, req: LivenessCheckRequest) => void;
23
+ onComplete?: (resp: SubmissionResponse | null, req: LivenessCheckRequest | null) => void;
24
+ onTimeout?: (resp: SubmissionResponse | null, req: LivenessCheckRequest | null) => void;
25
+ onExitAfterFailure?: (resp: SubmissionResponse | null, req: LivenessCheckRequest | null) => void;
26
26
  timeoutDurationMs?: number;
27
27
  maxRetries?: number;
28
28
  skipSuccessScreen?: boolean | (() => Promise<boolean>);
@@ -1,5 +1,5 @@
1
1
  import { ReactElement } from 'react';
2
- import { CardData, PersonalData, SubmissionAction, SubmissionEnvironment, SubmissionRequest, SubmissionResponse } from '../../contexts/SubmissionContext';
2
+ import { CardData, LivenessCheckRequest, PersonalData, SubmissionAction, SubmissionEnvironment, SubmissionRequest, SubmissionResponse } from '../../contexts/SubmissionContext';
3
3
  export type SubmissionProviderProps = {
4
4
  action: SubmissionAction;
5
5
  children: ReactElement;
@@ -21,7 +21,8 @@ export type SubmissionProviderProps = {
21
21
  webhooksClientTraceId?: string;
22
22
  webhooksStripSpecialCharacters?: boolean;
23
23
  onBeforeSubmit?: (req: SubmissionRequest) => Promise<SubmissionRequest>;
24
+ onBeforeLivenessCheck?: (req: LivenessCheckRequest) => Promise<LivenessCheckRequest>;
24
25
  onResponseReceived?: (res: SubmissionResponse, req: SubmissionRequest) => void;
25
26
  onRequestFailure?: (err: Error) => void;
26
27
  };
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;
28
+ export declare const SubmissionProvider: ({ action, children, url, environment, token, companyId, enrollmentId, personalData, cardData, manualReviewRequired, idBackImageRequired, verifyIdWithExternalDatabases, deduplicationEnabled, deduplicationSynchronous, geolocationEnabled, geolocationRequired, webhooksEnabled, webhooksClientTraceId, webhooksStripSpecialCharacters, onBeforeSubmit, onBeforeLivenessCheck, onResponseReceived, onRequestFailure, }: SubmissionProviderProps) => ReactElement;
@@ -4,7 +4,7 @@ import { FaceLivenessAssets, FaceLivenessColors, FaceLivenessVerbiage, FaceLiven
4
4
  import { IdVideoCaptureAssets, IdVideoCaptureColors, IdVideoCaptureVerbiage } from './IdVideoCapture';
5
5
  import { IdVideoCaptureSuccessColors, IdVideoCaptureSuccessVerbiage } from './IdVideoCaptureSuccess';
6
6
  import { CustomerSuppliedVerbiage } from '../../lib/locales';
7
- import { SubmissionRequest, SubmissionResponse } from '../../contexts/SubmissionContext';
7
+ import { LivenessCheckRequest, SubmissionResponse } from '../../contexts/SubmissionContext';
8
8
  export type VideoIdWizardAssets = {
9
9
  idCapture?: IdCaptureWizardAssets;
10
10
  faceLiveness?: FaceLivenessAssets;
@@ -25,7 +25,7 @@ export type VideoIdWizardVerbiage = {
25
25
  export type VideoIdWizardProps = {
26
26
  idCaptureProps?: IdCaptureWizardProps;
27
27
  faceLivenessProps?: FaceLivenessWizardProps;
28
- onExitAfterFailure?: (resp: SubmissionResponse | null, req: SubmissionRequest | null) => void;
28
+ onExitAfterFailure?: (resp: SubmissionResponse | null, req: LivenessCheckRequest | null) => void;
29
29
  idCardFrontDetectionThreshold?: number;
30
30
  idCardFrontFocusThreshold?: number;
31
31
  goodIdCardFrontFramesThreshold?: number;
@@ -176,6 +176,7 @@ export type SubmissionState = {
176
176
  logIdFrontCaptureAttempt: (attempt: CaptureAttemptMetadata) => void;
177
177
  logIdBackCaptureAttempt: (attempt: CaptureAttemptMetadata) => void;
178
178
  logSelfieCaptureAttempt: (attempt: CaptureAttemptMetadata) => void;
179
+ livenessCheckRequest: LivenessCheckRequest | null;
179
180
  checkLiveness: (imageDataUrl: string) => Promise<LiveCheckResponse>;
180
181
  retryLocationAccess: () => void;
181
182
  };