idmission-web-sdk 1.0.55 → 1.0.57

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
@@ -616,6 +616,7 @@ Render a fullscreen capture component that performs IDValidation and FaceValidat
616
616
  <tr><td><code>submissionToken</code></td><td>a token generated with your IDmission credentials.</td></tr>
617
617
  <tr><td><code>submissionUrl</code> (optional)</td><td>URL to hit with all API requests. Default: https://api.idmission.com</td></tr>
618
618
  <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>
619
+ <tr><td><code>onSubmit</code> (optional)</td><td>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!</td></tr>
619
620
  <tr><td><code>onComplete</code> (optional)</td><td>callback function that fires when the user has completed the VideoIdValidation 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>
620
621
  <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>
621
622
  <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>
@@ -637,6 +638,8 @@ Render a fullscreen capture component that performs IDValidation and FaceValidat
637
638
  <tr><td><code>readTextPrompt</code> (optional)</td><td>an optional text prompt to display on screen for the user to read during video capture after the ID card has been shown. Leave blank to skip the read text screen.</td></tr>
638
639
  <tr><td><code>readTextTimeoutDurationMs</code> (optional)</td><td>the duration of time in milliseconds that the user is allowed to spend reading the <code>readTextPrompt</code>. Defaults to 15000ms.</td></tr>
639
640
  <tr><td><code>skipSuccessScreen</code> (optional)</td><td>boolean or async function 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>
641
+ <tr><td><code>skipIdCapture</code> (optional)</td><td>boolean to indicate whether to skip the initial ID capture flow. Note that when this flag is set, submission to IDmission's servers will not be attempted; it should be used in tandem with onSubmit. Defaults to false.</td></tr>
642
+ <tr><td><code>skipShowIdCardBack</code> (optional)</td><td>boolean or async function to indicate whether to instruct the user to show the back of their ID card during video capture. If an async function is supplied returning a boolean, it will be evaluated at the time of ID front video capture completion. Defaults to false.</td></tr>
640
643
  <tr><td><code>assets</code> (optional)</td><td>object containing any asset overrides, for available options consult the Assets table below.</td></tr>
641
644
  <tr><td><code>colors</code> (optional)</td><td>object containing any asset overrides, for available options consult the Colors table below.</td></tr>
642
645
  <tr><td><code>verbiage</code> (optional)</td><td>object containing any verbiage overrides, for available options consult the Verbiage table below.</td></tr>
@@ -34,6 +34,8 @@ export interface VideoIdValidationProps extends PropsWithChildren {
34
34
  webhooksStripSpecialCharacters?: boolean;
35
35
  /** 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. */
36
36
  onBeforeSubmit?: (req: SubmissionRequest) => Promise<SubmissionRequest>;
37
+ /** 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! */
38
+ onSubmit?: (req: SubmissionRequest) => void;
37
39
  /** Callback function that fires when the user has completed all 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. */
38
40
  onComplete?: (resp: SubmissionResponse, req: SubmissionRequest) => void;
39
41
  /** Callback function that fires when the user clicks the exit button after completing the IDValidation flow and failing the realness check. */
@@ -56,6 +58,10 @@ export interface VideoIdValidationProps extends PropsWithChildren {
56
58
  readTextTimeoutDurationMs?: number;
57
59
  /** Boolean or async function 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`. */
58
60
  skipSuccessScreen?: boolean | (() => Promise<boolean>);
61
+ /** Boolean to indicate whether to skip the initial ID capture flow. Note that when this flag is set, submission to IDmission's servers will not be attempted; it should be used in tandem with `onSubmit`. Defaults to `false`. */
62
+ skipIdCapture?: boolean;
63
+ /** Boolean or async function to indicate whether to instruct the user to show the back of their ID card during video capture. If an async function is supplied returning a boolean, it will be evaluated at the time of ID front video capture completion. Defaults to `false`. */
64
+ skipShowIdCardBack?: boolean | (() => Promise<boolean>);
59
65
  /** Object containing any asset overrides. */
60
66
  assets?: VideoIdValidationAssets;
61
67
  /** Object containing any color overrides. */
@@ -20,9 +20,10 @@ export type SubmissionProviderProps = {
20
20
  webhooksEnabled?: boolean;
21
21
  webhooksClientTraceId?: string;
22
22
  webhooksStripSpecialCharacters?: boolean;
23
+ onSubmit?: (payload: SubmissionRequest) => void;
23
24
  onBeforeSubmit?: (req: SubmissionRequest) => Promise<SubmissionRequest>;
24
25
  onBeforeLivenessCheck?: (req: LivenessCheckRequest) => Promise<LivenessCheckRequest>;
25
26
  onResponseReceived?: (res: SubmissionResponse, req: SubmissionRequest) => void;
26
27
  onRequestFailure?: (err: Error) => void;
27
28
  };
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;
29
+ export declare const SubmissionProvider: ({ action, children, url, environment, token, companyId, enrollmentId, personalData, cardData, manualReviewRequired, idBackImageRequired, verifyIdWithExternalDatabases, deduplicationEnabled, deduplicationSynchronous, geolocationEnabled, geolocationRequired, webhooksEnabled, webhooksClientTraceId, webhooksStripSpecialCharacters, onSubmit, onBeforeSubmit, onBeforeLivenessCheck, onResponseReceived, onRequestFailure, }: SubmissionProviderProps) => ReactElement;
@@ -23,6 +23,7 @@ export type IdVideoCaptureProps = {
23
23
  idCardFrontFocusThreshold?: number;
24
24
  goodIdCardFrontFramesThreshold?: number;
25
25
  showIdCardBackDurationMs?: number;
26
+ skipShowIdCardBack?: boolean | (() => Promise<boolean>);
26
27
  readTextPrompt?: CustomerSuppliedVerbiage;
27
28
  readTextTimeoutDurationMs?: number;
28
29
  assets?: IdVideoCaptureAssets;
@@ -30,4 +31,4 @@ export type IdVideoCaptureProps = {
30
31
  verbiage?: IdVideoCaptureVerbiage;
31
32
  debugMode?: boolean;
32
33
  };
33
- export declare const IdVideoCapture: ({ onComplete, onFaceNotDetected, idCardFrontDetectionThreshold, idCardFrontFocusThreshold, goodIdCardFrontFramesThreshold, showIdCardBackDurationMs, readTextPrompt, readTextTimeoutDurationMs, assets, colors, verbiage: rawVerbiage, debugMode, }: IdVideoCaptureProps) => ReactElement;
34
+ export declare const IdVideoCapture: ({ onComplete, onFaceNotDetected, idCardFrontDetectionThreshold, idCardFrontFocusThreshold, goodIdCardFrontFramesThreshold, showIdCardBackDurationMs, skipShowIdCardBack, readTextPrompt, readTextTimeoutDurationMs, assets, colors, verbiage: rawVerbiage, debugMode, }: IdVideoCaptureProps) => ReactElement;
@@ -33,9 +33,11 @@ export type VideoIdWizardProps = {
33
33
  readTextPrompt?: CustomerSuppliedVerbiage;
34
34
  readTextTimeoutDurationMs?: number;
35
35
  skipSuccessScreen?: boolean | (() => Promise<boolean>);
36
+ skipIdCapture?: boolean;
37
+ skipShowIdCardBack?: boolean | (() => Promise<boolean>);
36
38
  assets?: VideoIdWizardAssets;
37
39
  colors?: VideoIdWizardColors;
38
40
  verbiage?: VideoIdWizardVerbiage;
39
41
  debugMode?: boolean;
40
42
  };
41
- export declare const VideoIdWizard: ({ idCaptureProps, faceLivenessProps, onExitAfterFailure, idCardFrontDetectionThreshold, idCardFrontFocusThreshold, goodIdCardFrontFramesThreshold, showIdCardBackDurationMs, readTextPrompt, readTextTimeoutDurationMs, assets, colors, verbiage, debugMode, }: VideoIdWizardProps) => ReactElement;
43
+ export declare const VideoIdWizard: ({ idCaptureProps, faceLivenessProps, onExitAfterFailure, idCardFrontDetectionThreshold, idCardFrontFocusThreshold, goodIdCardFrontFramesThreshold, showIdCardBackDurationMs, readTextPrompt, readTextTimeoutDurationMs, skipIdCapture, skipShowIdCardBack, assets, colors, verbiage, debugMode, }: VideoIdWizardProps) => ReactElement;