idmission-web-sdk 1.0.165 → 1.0.166

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.
@@ -9,6 +9,7 @@ import { SignatureCaptureClassNames, SignatureCaptureVerbiage } from '../signatu
9
9
  import { VideoSignatureClassNames, VideoSignatureColors, VideoSignatureVerbiage } from '../video_signature_capture/VideoSignatureWizard';
10
10
  import { ThemeInput } from '../../themes';
11
11
  import { IdCaptureRequirementOption } from '../id_capture/IdCaptureRequirementOption';
12
+ import { IdCaptureGuideType } from '../id_capture/IdCaptureGuides';
12
13
  export type CustomerEnrollmentAssets = {
13
14
  idCapture?: IdCaptureWizardAssets;
14
15
  faceLiveness?: FaceLivenessAssets;
@@ -95,7 +96,12 @@ export interface CustomerEnrollmentProps extends PropsWithChildren {
95
96
  faceLivenessTimeoutDurationMs?: number;
96
97
  /** 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`. */
97
98
  skipSuccessScreen?: boolean | (() => Promise<boolean>);
99
+ /** ReactNode to render within the ID capture instructions. */
98
100
  idCaptureInstructions?: ReactNode;
101
+ /** String to indicate what type of guides to use during capture. Using `fit` is highly recommended in order to capture the best quality image. Valid values: `fit`, `overlay`. Defaults to `fit`. */
102
+ idCaptureGuideType?: IdCaptureGuideType;
103
+ /** Boolean to indicate whether guide images should be rotated on mobile. Defaults to `false`. */
104
+ idCapturePortraitGuidesOnMobile?: boolean;
99
105
  /** 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. */
100
106
  onBeforeSubmit?: (req: SubmissionRequest) => Promise<SubmissionRequest>;
101
107
  /** 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! */
@@ -10,6 +10,7 @@ import { VideoSignatureClassNames, VideoSignatureColors, VideoSignatureVerbiage
10
10
  import { ThemeInput } from '../../themes';
11
11
  import { IdCaptureRequirementOption } from '../id_capture/IdCaptureRequirementOption';
12
12
  import { CapturedDocument, CapturedDocuments } from '../id_capture/CapturedDocuments';
13
+ import { IdCaptureGuideType } from '../id_capture/IdCaptureGuides';
13
14
  export type IdAndFaceValidationAssets = {
14
15
  idCapture?: IdCaptureWizardAssets;
15
16
  faceLiveness?: FaceLivenessAssets;
@@ -94,6 +95,10 @@ export interface IdAndFaceValidationProps extends PropsWithChildren {
94
95
  skipSuccessScreen?: boolean | (() => Promise<boolean>);
95
96
  /** React element or string to render on the instructions screen. */
96
97
  idCaptureInstructions?: ReactNode;
98
+ /** String to indicate what type of guides to use during capture. Using `fit` is highly recommended in order to capture the best quality image. Valid values: `fit`, `overlay`. Defaults to `fit`. */
99
+ idCaptureGuideType?: IdCaptureGuideType;
100
+ /** Boolean to indicate whether guide images should be rotated on mobile. Defaults to `false`. */
101
+ idCapturePortraitGuidesOnMobile?: boolean;
97
102
  /** 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. */
98
103
  onBeforeLivenessCheck?: (req: LivenessCheckRequest) => Promise<LivenessCheckRequest>;
99
104
  /** 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. */
@@ -79,6 +79,8 @@ export interface IdValidationProps extends PropsWithChildren {
79
79
  instructions?: ReactNode;
80
80
  /** String to indicate what type of guides to use during capture. Using `fit` is highly recommended in order to capture the best quality image. Valid values: `fit`, `overlay`. Defaults to `fit`. */
81
81
  guideType?: IdCaptureGuideType;
82
+ /** Boolean to indicate whether guide images should be rotated on mobile. Defaults to `false`. */
83
+ portraitGuidesOnMobile?: boolean;
82
84
  /** Object to allow documents that have been previously captured to be submitted. Valid keys: `idCardFront`, `idCardBack , `passport`.*/
83
85
  precapturedDocuments?: CapturedDocuments;
84
86
  /** 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. */
@@ -9,6 +9,7 @@ import { AdditionalDocument } from '../additional_document_capture/AdditionalDoc
9
9
  import { AdditionalDocumentCaptureWizardClassNames, AdditionalDocumentCaptureWizardVerbiage } from '../additional_document_capture/AdditionalDocumentCaptureWizard';
10
10
  import { SignatureCaptureClassNames, SignatureCaptureVerbiage } from '../signature_capture/SignatureCapture';
11
11
  import { VideoSignatureClassNames, VideoSignatureColors, VideoSignatureVerbiage } from '../video_signature_capture/VideoSignatureWizard';
12
+ import { IdCaptureGuideType } from '../id_capture/IdCaptureGuides';
12
13
  export type VideoIdValidationAssets = VideoIdWizardAssets;
13
14
  export type VideoIdValidationClassNames = VideoIdWizardClassNames & {
14
15
  additionalDocumentCapture?: AdditionalDocumentCaptureWizardClassNames;
@@ -100,6 +101,10 @@ export interface VideoIdValidationProps extends PropsWithChildren {
100
101
  skipIdCapture?: boolean;
101
102
  /** 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`. */
102
103
  skipShowIdCardBack?: boolean | (() => Promise<boolean>);
104
+ /** String to indicate what type of guides to use during capture. Using `fit` is highly recommended in order to capture the best quality image. Valid values: `fit`, `overlay`. Defaults to `fit`. */
105
+ idCaptureGuideType?: IdCaptureGuideType;
106
+ /** Boolean to indicate whether guide images should be rotated on mobile. Defaults to `false`. */
107
+ idCapturePortraitGuidesOnMobile?: boolean;
103
108
  /** Name of an included theme or object containing theme properties. **/
104
109
  theme?: ThemeInput;
105
110
  /** Object containing any asset overrides. */
@@ -1,12 +1,13 @@
1
1
  import { IdCaptureFitGuideClassNames } from './IdCaptureFitGuide';
2
2
  import React from 'react';
3
3
  import { IdCaptureAssets, IdCaptureColors, IdCaptureVerbiage } from './IdCapture';
4
+ import { FlipIdPromptAssets } from './FlipIdPrompt';
4
5
  export type IdCaptureGuideType = 'fit' | 'overlay';
5
- export declare function IdCaptureGuides({ guideType, requestingFlip, frontImageUrl, backImageUrl, classNames, assets, colors, verbiage: rawVerbiage, }: {
6
+ export declare function IdCaptureGuides({ guideType, portraitGuidesOnMobile, requestingFlip, flipIdPromptAssets, classNames, assets, colors, verbiage: rawVerbiage, }: {
6
7
  guideType?: IdCaptureGuideType;
8
+ portraitGuidesOnMobile?: boolean;
7
9
  requestingFlip?: boolean;
8
- frontImageUrl?: string;
9
- backImageUrl?: string;
10
+ flipIdPromptAssets?: FlipIdPromptAssets;
10
11
  classNames?: IdCaptureFitGuideClassNames;
11
12
  assets?: IdCaptureAssets;
12
13
  colors?: IdCaptureColors;
@@ -63,10 +63,11 @@ export type IdCaptureWizardProps = {
63
63
  instructions?: ReactNode;
64
64
  releaseCameraAccessOnExit?: boolean;
65
65
  guideType?: IdCaptureGuideType;
66
+ portraitGuidesOnMobile?: boolean;
66
67
  assets?: IdCaptureWizardAssets;
67
68
  classNames?: IdCaptureWizardClassNames;
68
69
  colors?: IdCaptureWizardColors;
69
70
  verbiage?: IdCaptureWizardVerbiage;
70
71
  debugMode?: boolean;
71
72
  };
72
- export declare const IdCaptureWizard: ({ onSuccess, onExitCapture, onUserCancel, precapturedDocuments, captureRequirement, autoCaptureEnabled, autoCaptureGoodFramesRequired, autoCaptureBarcodeRequired, barcodeScanningEnabled, idCardAutoCaptureScoreThreshold, passportAutoCaptureScoreThreshold, mrzDetectionScoreThreshold, idCardFocusScoreThreshold, passportFocusScoreThreshold, skipSuccessScreen, instructions, releaseCameraAccessOnExit, guideType, assets, classNames, colors, verbiage, debugMode, }: IdCaptureWizardProps) => ReactElement;
73
+ export declare const IdCaptureWizard: ({ onSuccess, onExitCapture, onUserCancel, precapturedDocuments, captureRequirement, autoCaptureEnabled, autoCaptureGoodFramesRequired, autoCaptureBarcodeRequired, barcodeScanningEnabled, idCardAutoCaptureScoreThreshold, passportAutoCaptureScoreThreshold, mrzDetectionScoreThreshold, idCardFocusScoreThreshold, passportFocusScoreThreshold, skipSuccessScreen, instructions, releaseCameraAccessOnExit, guideType, portraitGuidesOnMobile, assets, classNames, colors, verbiage, debugMode, }: IdCaptureWizardProps) => ReactElement;
@@ -5,6 +5,7 @@ import { IdVideoCaptureAssets, IdVideoCaptureClassNames, IdVideoCaptureColors, I
5
5
  import { IdVideoCaptureSuccessClassNames, IdVideoCaptureSuccessColors, IdVideoCaptureSuccessVerbiage } from './IdVideoCaptureSuccess';
6
6
  import { CustomerSuppliedVerbiage } from '../../lib/locales';
7
7
  import { LivenessCheckRequest, SubmissionResponse } from '../../contexts/SubmissionContext';
8
+ import { IdCaptureGuideType } from '../id_capture/IdCaptureGuides';
8
9
  export type VideoIdWizardAssets = {
9
10
  idCapture?: IdCaptureWizardAssets;
10
11
  faceLiveness?: FaceLivenessAssets;
@@ -44,10 +45,12 @@ export type VideoIdWizardProps = {
44
45
  skipSuccessScreen?: boolean | (() => Promise<boolean>);
45
46
  skipIdCapture?: boolean;
46
47
  skipShowIdCardBack?: boolean | (() => Promise<boolean>);
48
+ idCaptureGuideType?: IdCaptureGuideType;
49
+ idCapturePortraitGuidesOnMobile?: boolean;
47
50
  assets?: VideoIdWizardAssets;
48
51
  classNames?: VideoIdWizardClassNames;
49
52
  colors?: VideoIdWizardColors;
50
53
  verbiage?: VideoIdWizardVerbiage;
51
54
  debugMode?: boolean;
52
55
  };
53
- export declare const VideoIdWizard: ({ onComplete, onExitCapture, onExitAfterFailure, onUserCancel, idCaptureProps, faceLivenessProps, idCardFrontDetectionThreshold, idCardFrontFocusThreshold, goodIdCardFrontFramesThreshold, showIdCardBackDurationMs, readTextPrompt, readTextTimeoutDurationMs, skipIdCapture, skipShowIdCardBack, skipSuccessScreen, assets, classNames, colors, verbiage, debugMode, }: VideoIdWizardProps) => ReactElement;
56
+ export declare const VideoIdWizard: ({ onComplete, onExitCapture, onExitAfterFailure, onUserCancel, idCaptureProps, faceLivenessProps, idCardFrontDetectionThreshold, idCardFrontFocusThreshold, goodIdCardFrontFramesThreshold, showIdCardBackDurationMs, readTextPrompt, readTextTimeoutDurationMs, skipIdCapture, skipShowIdCardBack, skipSuccessScreen, idCaptureGuideType, idCapturePortraitGuidesOnMobile, assets, classNames, colors, verbiage, debugMode, }: VideoIdWizardProps) => ReactElement;