idmission-web-sdk 1.0.297 → 1.0.299

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 (30) hide show
  1. package/dist/components/customer_flows/CustomerBiometricsEnrollment.d.ts +4 -0
  2. package/dist/components/customer_flows/CustomerIdAndBiometricsEnrollment.d.ts +8 -0
  3. package/dist/components/customer_flows/CustomerIdentification.d.ts +4 -0
  4. package/dist/components/customer_flows/CustomerVerification.d.ts +4 -0
  5. package/dist/components/customer_flows/FaceValidation.d.ts +4 -0
  6. package/dist/components/customer_flows/IdAndFaceValidation.d.ts +8 -0
  7. package/dist/components/customer_flows/IdValidation.d.ts +4 -0
  8. package/dist/components/customer_flows/SignatureKYC.d.ts +4 -0
  9. package/dist/components/document_capture/DocumentCaptureStateProvider.d.ts +6 -1
  10. package/dist/components/document_capture/DocumentCaptureWizard.d.ts +3 -2
  11. package/dist/components/face_liveness/FaceLivenessWizard.d.ts +2 -0
  12. package/dist/components/id_capture/IdCaptureModelsProvider.d.ts +3 -1
  13. package/dist/components/id_capture/IdCaptureRequirementOption.d.ts +1 -0
  14. package/dist/components/id_capture/IdCaptureWizard.d.ts +3 -1
  15. package/dist/components/selfie_capture/HighPerformanceSelfieGuidanceModelsProvider.d.ts +3 -1
  16. package/dist/components/video_id/IdVideoCaptureWizard.d.ts +3 -1
  17. package/dist/components/video_signature_capture/VideoSignatureWizard.d.ts +3 -1
  18. package/dist/sdk2.cjs.development.js +6154 -6037
  19. package/dist/sdk2.cjs.development.js.map +1 -1
  20. package/dist/sdk2.cjs.production.js +1 -1
  21. package/dist/sdk2.cjs.production.js.map +1 -1
  22. package/dist/sdk2.esm.js +6154 -6038
  23. package/dist/sdk2.esm.js.map +1 -1
  24. package/dist/sdk2.umd.development.js +6822 -6705
  25. package/dist/sdk2.umd.development.js.map +1 -1
  26. package/dist/sdk2.umd.production.js +1 -1
  27. package/dist/sdk2.umd.production.js.map +1 -1
  28. package/dist/stories/FallbackFlows/IdCapture.stories.d.ts +1 -1
  29. package/dist/version.d.ts +1 -1
  30. package/package.json +1 -1
@@ -63,6 +63,8 @@ export interface CustomerBiometricsEnrollmentProps extends PropsWithChildren {
63
63
  loadingOverlayMode?: SelfieCaptureLoadingOverlayMode;
64
64
  /** The duration of time in milliseconds that the user may try to pass the realness check. Defaults to `15000` (15 seconds). */
65
65
  timeoutDurationMs?: number;
66
+ /** Number of milliseconds indicating the maximum amount of time that should be spent trying to load the guided capture experience before giving up and resorting to the stock camera instead. Defaults to 60000 (1 minute). */
67
+ modelLoadTimeoutMs?: number;
66
68
  /** 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`. */
67
69
  skipSuccessScreen?: boolean | (() => Promise<boolean>);
68
70
  /** Callback function that fires immediately prior to each document upload, giving the client application an opportunity to specify custom asynchronous logic that captures the document contents before it is exchanged for a document token. The document content and metadata are passed in as parameters and a promise resolving to void or false should be returned. If the returned promise resolves to false, the document will not be uploaded. */
@@ -89,6 +91,8 @@ export interface CustomerBiometricsEnrollmentProps extends PropsWithChildren {
89
91
  onExitAfterFailure?: () => void;
90
92
  /** Callback function that fires when the user clicks the exit button from the loading overlay, declining to engage with IDmission. Binding this callback results in the cancel button being rendered on the loading overlay. */
91
93
  onUserCancel?: () => void;
94
+ /** Callback function that fires when the selfie capture models fail to load or fail during runtime. */
95
+ onModelError?: (error: Error) => void;
92
96
  /** Boolean or async function indicating whether the user should be prompted to sign the screen before submission. Defaults to `false`. */
93
97
  captureSignature?: boolean | (() => Promise<boolean>);
94
98
  /** Boolean or async function indicating whether the user should be prompted to record themselves signing the screen before submission. Defaults to `false`. */
@@ -115,6 +115,10 @@ export interface CustomerEnrollmentProps extends PropsWithChildren {
115
115
  idCapturePortraitGuidesOnMobile?: boolean;
116
116
  /** Boolean to indicate whether loading overlay image should be rotated on when mobile guides are rotated. Defaults to `true`. */
117
117
  idCaptureRotateLoadingOverlayImageWhenPortrait?: boolean;
118
+ /** Number of milliseconds indicating the maximum amount of time that should be spent trying to load the guided capture experience before giving up and resorting to the stock camera instead. Defaults to 60000 (1 minute). */
119
+ idCaptureModelLoadTimeoutMs?: number;
120
+ /** Number of milliseconds indicating the maximum amount of time that should be spent trying to load the guided capture experience before giving up and resorting to the stock camera instead. Defaults to 60000 (1 minute). */
121
+ selfieCaptureModelLoadTimeoutMs?: number;
118
122
  /** Callback function that fires immediately prior to each document upload, giving the client application an opportunity to specify custom asynchronous logic that captures the document contents before it is exchanged for a document token. The document content and metadata are passed in as parameters and a promise resolving to void or false should be returned. If the returned promise resolves to false, the document will not be uploaded. */
119
123
  onBeforeDocumentUpload?: OnBeforeDocumentUpload;
120
124
  /** Callback function that fires when progress information is available for a document upload. The progress info and metadata are passed in as parameters. */
@@ -139,6 +143,10 @@ export interface CustomerEnrollmentProps extends PropsWithChildren {
139
143
  onExitAfterFailure?: () => void;
140
144
  /** Callback function that fires when the user clicks the exit button from the loading overlay, declining to engage with IDmission. Binding this callback results in the cancel button being rendered on the loading overlay. */
141
145
  onUserCancel?: () => void;
146
+ /** Callback function that fires when the ID capture models fail to load or fail during runtime. */
147
+ onIdCaptureModelError?: (error: Error) => void;
148
+ /** Callback function that fires when the selfie capture models fail to load or fail during runtime. */
149
+ onSelfieCaptureModelError?: (error: Error) => void;
142
150
  /** Boolean or async function indicating whether the user should be prompted to sign the screen before submission. Defaults to `false`. */
143
151
  captureSignature?: boolean | (() => Promise<boolean>);
144
152
  /** Boolean or async function indicating whether the user should be prompted to record themselves signing the screen before submission. Defaults to `false`. */
@@ -34,6 +34,8 @@ export interface CustomerIdentificationProps extends PropsWithChildren {
34
34
  loadingOverlayMode?: SelfieCaptureLoadingOverlayMode;
35
35
  /** The duration of time in milliseconds that the user may try to pass the realness check. Defaults to `15000` (15 seconds). */
36
36
  timeoutDurationMs?: number;
37
+ /** Number of milliseconds indicating the maximum amount of time that should be spent trying to load the guided capture experience before giving up and resorting to the stock camera instead. Defaults to 60000 (1 minute). */
38
+ modelLoadTimeoutMs?: number;
37
39
  /** 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`. */
38
40
  skipSuccessScreen?: boolean | (() => Promise<boolean>);
39
41
  /** Callback function that fires immediately prior to each document upload, giving the client application an opportunity to specify custom asynchronous logic that captures the document contents before it is exchanged for a document token. The document content and metadata are passed in as parameters and a promise resolving to void or false should be returned. If the returned promise resolves to false, the document will not be uploaded. */
@@ -63,6 +65,8 @@ export interface CustomerIdentificationProps extends PropsWithChildren {
63
65
  onExitAfterFailure?: () => void;
64
66
  /** Callback function that fires when the user clicks the exit button from the loading overlay, declining to engage with IDmission. Binding this callback results in the cancel button being rendered on the loading overlay. */
65
67
  onUserCancel?: () => void;
68
+ /** Callback function that fires when the selfie capture models fail to load or fail during runtime. */
69
+ onModelError?: (error: Error) => void;
66
70
  /** Name of an included theme or object containing theme properties. **/
67
71
  theme?: ThemeInput;
68
72
  /** Object containing any asset overrides. */
@@ -36,6 +36,8 @@ export interface CustomerVerificationProps extends PropsWithChildren {
36
36
  loadingOverlayMode?: SelfieCaptureLoadingOverlayMode;
37
37
  /** The duration of time in milliseconds that the user may try to pass the realness check. Defaults to `15000` (15 seconds). */
38
38
  timeoutDurationMs?: number;
39
+ /** Number of milliseconds indicating the maximum amount of time that should be spent trying to load the guided capture experience before giving up and resorting to the stock camera instead. Defaults to 60000 (1 minute). */
40
+ modelLoadTimeoutMs?: number;
39
41
  /** 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`. */
40
42
  skipSuccessScreen?: boolean | (() => Promise<boolean>);
41
43
  /** Name of an included theme or object containing theme properties. **/
@@ -72,6 +74,8 @@ export interface CustomerVerificationProps extends PropsWithChildren {
72
74
  onExitAfterFailure?: () => void;
73
75
  /** Callback function that fires when the user clicks the exit button from the loading overlay, declining to engage with IDmission. Binding this callback results in the cancel button being rendered on the loading overlay. */
74
76
  onUserCancel?: () => void;
77
+ /** Callback function that fires when the selfie capture models fail to load or fail during runtime. */
78
+ onModelError?: (error: Error) => void;
75
79
  /** Boolean flag to indicate whether users should be prompted to share their location. Default is `true`. */
76
80
  geolocationEnabled?: boolean;
77
81
  /** Boolean flag to indicate whether users should be blocked from proceeding if they block location access. Default is `false`. */
@@ -38,6 +38,8 @@ export interface FaceValidationProps extends PropsWithChildren {
38
38
  loadingOverlayMode?: SelfieCaptureLoadingOverlayMode;
39
39
  /** The duration of time in milliseconds that the user may try to pass the realness check. Defaults to `15000` (15 seconds). */
40
40
  timeoutDurationMs?: number;
41
+ /** Number of milliseconds indicating the maximum amount of time that should be spent trying to load the guided capture experience before giving up and resorting to the stock camera instead. Defaults to 60000 (1 minute). */
42
+ modelLoadTimeoutMs?: number;
41
43
  /** 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`. */
42
44
  skipSuccessScreen?: boolean | (() => Promise<boolean>);
43
45
  /** String containing a base64 image or document service ID pointing to an ID card front image that should be used to match the user's face against. Leave blank to disable face matching. */
@@ -64,6 +66,8 @@ export interface FaceValidationProps extends PropsWithChildren {
64
66
  onExitAfterFailure?: () => void;
65
67
  /** Callback function that fires when the user clicks the exit button from the loading overlay, declining to engage with IDmission. Binding this callback results in the cancel button being rendered on the loading overlay. */
66
68
  onUserCancel?: () => void;
69
+ /** Callback function that fires when the selfie capture models fail to load or fail during runtime. */
70
+ onModelError?: (error: Error) => void;
67
71
  /** Name of an included theme or object containing theme properties. **/
68
72
  theme?: ThemeInput;
69
73
  /** Object containing any asset overrides. */
@@ -112,6 +112,10 @@ export interface IdAndFaceValidationProps extends PropsWithChildren {
112
112
  idCapturePortraitGuidesOnMobile?: boolean;
113
113
  /** Boolean to indicate whether loading overlay image should be rotated on when mobile guides are rotated. Defaults to `true`. */
114
114
  idCaptureRotateLoadingOverlayImageWhenPortrait?: boolean;
115
+ /** Number of milliseconds indicating the maximum amount of time that should be spent trying to load the guided capture experience before giving up and resorting to the stock camera instead. Defaults to 60000 (1 minute). */
116
+ idCaptureModelLoadTimeoutMs?: number;
117
+ /** Number of milliseconds indicating the maximum amount of time that should be spent trying to load the guided capture experience before giving up and resorting to the stock camera instead. Defaults to 60000 (1 minute). */
118
+ selfieCaptureModelLoadTimeoutMs?: number;
115
119
  /** Callback function that fires immediately prior to each document upload, giving the client application an opportunity to specify custom asynchronous logic that captures the document contents before it is exchanged for a document token. The document content and metadata are passed in as parameters and a promise resolving to void or false should be returned. If the returned promise resolves to false, the document will not be uploaded. */
116
120
  onBeforeDocumentUpload?: OnBeforeDocumentUpload;
117
121
  /** Callback function that fires when progress information is available for a document upload. The progress info and metadata are passed in as parameters. */
@@ -138,6 +142,10 @@ export interface IdAndFaceValidationProps extends PropsWithChildren {
138
142
  onExitAfterFailure?: () => void;
139
143
  /** Callback function that fires when the user clicks the exit button from the loading overlay, declining to engage with IDmission. Binding this callback results in the cancel button being rendered on the loading overlay. */
140
144
  onUserCancel?: () => void;
145
+ /** Callback function that fires when the ID capture models fail to load or fail during runtime. */
146
+ onIdCaptureModelError?: (error: Error) => void;
147
+ /** Callback function that fires when the selfie capture models fail to load or fail during runtime. */
148
+ onSelfieCaptureModelError?: (error: Error) => void;
141
149
  /** Boolean or async function indicating whether the user should be prompted to sign the screen before submission. Defaults to `false`. */
142
150
  captureSignature?: boolean | (() => Promise<boolean>);
143
151
  /** Boolean or async function indicating whether the user should be prompted to record themselves signing the screen before submission. Defaults to `false`. */
@@ -91,6 +91,8 @@ export interface IdValidationProps extends PropsWithChildren {
91
91
  portraitGuidesOnMobile?: boolean;
92
92
  /** Boolean to indicate whether loading overlay image should be rotated on when mobile guides are rotated. Defaults to `true`. */
93
93
  rotateLoadingOverlayImageWhenPortrait?: boolean;
94
+ /** Number of milliseconds indicating the maximum amount of time that should be spent trying to load the guided capture experience before giving up and resorting to the stock camera instead. Defaults to 60000 (1 minute). */
95
+ modelLoadTimeoutMs?: number;
94
96
  /** Object to allow documents that have been previously captured to be submitted. Valid keys: `idCardFront`, `idCardBack`, `passport`.*/
95
97
  precapturedDocuments?: CapturedDocuments;
96
98
  /** Callback function that fires immediately prior to each document upload, giving the client application an opportunity to specify custom asynchronous logic that captures the document contents before it is exchanged for a document token. The document content and metadata are passed in as parameters and a promise resolving to void or false should be returned. If the returned promise resolves to false, the document will not be uploaded. */
@@ -115,6 +117,8 @@ export interface IdValidationProps extends PropsWithChildren {
115
117
  onExitCapture?: () => void;
116
118
  /** Callback function that fires when the user clicks the exit button from the loading overlay, declining to engage with IDmission. Binding this callback results in the cancel button being rendered on the loading overlay. */
117
119
  onUserCancel?: () => void;
120
+ /** Callback function that fires when the ID capture models fail to load or fail during runtime. */
121
+ onModelError?: (error: Error) => void;
118
122
  /** Boolean or async function indicating whether the user should be prompted to sign the screen before submission. Defaults to `false`. */
119
123
  captureSignature?: boolean | (() => Promise<boolean>);
120
124
  /** Boolean or async function indicating whether the user should be prompted to record themselves signing the screen before submission. Defaults to `false`. */
@@ -32,12 +32,16 @@ export interface SignatureKYCProps extends PropsWithChildren {
32
32
  onComplete?: (resp: SubmissionResponse, req: SubmissionRequest) => void;
33
33
  /** Callback function that fires when the user clicks the exit button from the loading overlay, declining to engage with IDmission. Binding this callback results in the cancel button being rendered on the loading overlay. */
34
34
  onUserCancel?: () => void;
35
+ /** Callback function that fires when the selfie capture models fail to load or fail during runtime. */
36
+ onModelError?: (error: Error) => void;
35
37
  /** String indicating which loading overlay screen should be used. Supported values: 'default' and 'legacy'. Defaults to 'default'. */
36
38
  loadingOverlayMode?: SelfieCaptureLoadingOverlayMode;
37
39
  /** 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`. */
38
40
  skipSuccessScreen?: boolean | (() => Promise<boolean>);
39
41
  /** String containing a base64 image or document service ID pointing to an ID card front image that should be used to match the user's face against. Leave blank to disable face matching. */
40
42
  idCardForFaceMatch?: string;
43
+ /** Number of milliseconds indicating the maximum amount of time that should be spent trying to load the guided capture experience before giving up and resorting to the stock camera instead. Defaults to 60000 (1 minute). */
44
+ modelLoadTimeoutMs?: number;
41
45
  /** Name of an included theme or object containing theme properties. **/
42
46
  theme?: ThemeInput;
43
47
  /** Object containing any classNames for inner components. **/
@@ -1,5 +1,6 @@
1
1
  import React, { Dispatch, ReactNode } from 'react';
2
2
  import { CameraFeedMode } from '../../lib/camera/CameraFeedWrapper';
3
+ export type OnDocumentCaptured = (document: CapturedDocument) => void;
3
4
  export type OnDocumentUploaded = (document: CapturedDocument) => void;
4
5
  export type OnAllDocumentsUploaded = (documents: CapturedDocument[]) => Promise<void>;
5
6
  export type CapturedDocument = {
@@ -11,6 +12,7 @@ export type CapturedDocument = {
11
12
  content?: Blob;
12
13
  contentUrl?: string;
13
14
  uploadState?: DocumentCaptureUploadState;
15
+ onCaptured?: OnDocumentCaptured;
14
16
  onUploaded?: OnDocumentUploaded;
15
17
  };
16
18
  type DocumentCaptureUploadState = 'not_started' | 'in_progress' | 'succeeded' | 'failed';
@@ -25,6 +27,7 @@ export type DocumentCaptureState = {
25
27
  rectHeight: number;
26
28
  rectOffsetTop: number;
27
29
  capturing: boolean;
30
+ onDocumentCaptured?: OnDocumentCaptured;
28
31
  onDocumentUploaded?: OnDocumentUploaded;
29
32
  onAllDocumentsUploaded?: OnAllDocumentsUploaded;
30
33
  };
@@ -51,6 +54,7 @@ export type DocumentCaptureAction = {
51
54
  } | {
52
55
  type: 'setHooks';
53
56
  payload: {
57
+ onDocumentCaptured?: OnDocumentCaptured;
54
58
  onDocumentUploaded?: OnDocumentUploaded;
55
59
  onAllDocumentsUploaded?: OnAllDocumentsUploaded;
56
60
  };
@@ -90,11 +94,12 @@ export type DocumentCaptureAction = {
90
94
  export type DocumentCaptureDispatch = Dispatch<DocumentCaptureAction>;
91
95
  export declare const DocumentCaptureDispatchContext: React.Context<DocumentCaptureDispatch>;
92
96
  export declare const documentCaptureStateReducer: (state: DocumentCaptureState, action: DocumentCaptureAction) => DocumentCaptureState;
93
- export declare const DocumentCaptureStateProvider: ({ documents, aspectRatio, cameraFeedMode, instructions, onDocumentUploaded, onAllDocumentsUploaded, children, }: {
97
+ export declare const DocumentCaptureStateProvider: ({ documents, aspectRatio, cameraFeedMode, instructions, onDocumentCaptured, onDocumentUploaded, onAllDocumentsUploaded, children, }: {
94
98
  documents?: CapturedDocument[] | undefined;
95
99
  aspectRatio?: number | undefined;
96
100
  cameraFeedMode?: CameraFeedMode | undefined;
97
101
  instructions?: ReactNode;
102
+ onDocumentCaptured?: OnDocumentCaptured | undefined;
98
103
  onDocumentUploaded?: OnDocumentUploaded | undefined;
99
104
  onAllDocumentsUploaded?: OnAllDocumentsUploaded | undefined;
100
105
  children: ReactNode;
@@ -1,11 +1,12 @@
1
1
  import React, { ReactNode } from 'react';
2
2
  import { DocumentCaptureScreenClassNames, DocumentCaptureScreenVerbiage } from './DocumentCaptureScreen';
3
- import { CapturedDocument, OnAllDocumentsUploaded, OnDocumentUploaded } from './DocumentCaptureStateProvider';
3
+ import { CapturedDocument, OnAllDocumentsUploaded, OnDocumentCaptured, OnDocumentUploaded } from './DocumentCaptureStateProvider';
4
4
  import { CameraFeedMode } from '../../lib/camera/CameraFeedWrapper';
5
5
  export type DocumentCaptureWizardClassNames = DocumentCaptureScreenClassNames;
6
6
  export type DocumentCaptureWizardVerbiage = DocumentCaptureScreenVerbiage;
7
7
  export type DocumentCaptureWizardProps = {
8
8
  onSuccess?: OnAllDocumentsUploaded;
9
+ onDocumentCaptured?: OnDocumentCaptured;
9
10
  onDocumentUploaded?: OnDocumentUploaded;
10
11
  onExitCapture?: () => void;
11
12
  onUserCancel?: () => void;
@@ -16,4 +17,4 @@ export type DocumentCaptureWizardProps = {
16
17
  classNames?: DocumentCaptureWizardClassNames;
17
18
  verbiage?: DocumentCaptureWizardVerbiage;
18
19
  };
19
- export declare const DocumentCaptureWizard: ({ onSuccess, onDocumentUploaded, documents, aspectRatio, cameraFeedMode, instructions, classNames, verbiage, }: DocumentCaptureWizardProps) => React.JSX.Element;
20
+ export declare const DocumentCaptureWizard: ({ onSuccess, onDocumentCaptured, onDocumentUploaded, documents, aspectRatio, cameraFeedMode, instructions, classNames, verbiage, }: DocumentCaptureWizardProps) => React.JSX.Element;
@@ -31,8 +31,10 @@ export type FaceLivenessWizardProps = {
31
31
  onExitCapture?: () => void;
32
32
  onExitAfterFailure?: (resp: SubmissionResponse | null, req: LivenessCheckRequest | null) => void;
33
33
  onUserCancel?: () => void;
34
+ onModelError?: (error: Error) => void;
34
35
  loadingOverlayMode?: SelfieCaptureLoadingOverlayMode;
35
36
  timeoutDurationMs?: number;
37
+ modelLoadTimeoutMs?: number;
36
38
  maxRetries?: number;
37
39
  skipSuccessScreen?: boolean | (() => Promise<boolean>);
38
40
  renderCameraFeed?: boolean;
@@ -64,10 +64,12 @@ export type IdCaptureModelsProviderProps = {
64
64
  documentDetectionModelUrl?: string | undefined;
65
65
  focusModelUrl?: string | undefined;
66
66
  logPredictions?: boolean;
67
+ onModelError?: (error: Error) => void;
68
+ modelLoadTimeoutMs?: number;
67
69
  };
68
70
  export declare const defaultDocumentDetectionModelUrl: string;
69
71
  export declare const defaultFocusModelUrl: string;
70
- export declare const IdCaptureModelsProvider: ({ children, documentDetectionModelUrl, focusModelUrl, logPredictions, }: IdCaptureModelsProviderProps) => ReactElement;
72
+ export declare const IdCaptureModelsProvider: ({ children, documentDetectionModelUrl, focusModelUrl, logPredictions, onModelError, modelLoadTimeoutMs, }: IdCaptureModelsProviderProps) => ReactElement;
71
73
  type Canvases = {
72
74
  lastPredictionCanvas: HTMLCanvasElement;
73
75
  cropCanvas: HTMLCanvasElement;
@@ -4,3 +4,4 @@ export declare const requiredDocumentsForOption: {
4
4
  [key in IdCaptureRequirementOption]: Array<CapturedDocumentType>;
5
5
  };
6
6
  export declare function requiredImageCountForOption(idCaptureRequirement: IdCaptureRequirementOption): number;
7
+ export declare function allowedImageCountForOption(idCaptureRequirement: IdCaptureRequirementOption): number;
@@ -4,9 +4,9 @@ import { IdCaptureLoadingOverlayAssets, IdCaptureLoadingOverlayClassNames, IdCap
4
4
  import { FlipIdPromptAssets, FlipIdPromptClassNames, FlipIdPromptVerbiage } from './FlipIdPrompt';
5
5
  import { CapturedDocuments } from './CapturedDocuments';
6
6
  import { IdCaptureSuccessClassNames, IdCaptureSuccessColors, IdCaptureSuccessVerbiage } from './IdCaptureSuccess';
7
- import { IdCaptureFallbackClassNames, IdCaptureFallbackColors, IdCaptureFallbackVerbiage } from '../fallback_flows/IdCapture';
8
7
  import { IdCaptureRequirementOption } from './IdCaptureRequirementOption';
9
8
  import { IdCaptureGuideType } from './IdCaptureGuides';
9
+ import { IdCaptureFallbackClassNames, IdCaptureFallbackColors, IdCaptureFallbackVerbiage } from '../fallback_flows/IdCapture';
10
10
  export type IdCaptureWizardAssets = {
11
11
  documentDetectionModelUrl?: string;
12
12
  focusModelUrl?: string;
@@ -48,7 +48,9 @@ export type IdCaptureWizardProps = {
48
48
  onSuccess?: (submission: IdCaptureSubmission) => void;
49
49
  onExitCapture?: () => void;
50
50
  onUserCancel?: () => void;
51
+ onModelError?: (error: Error) => void;
51
52
  loadingOverlayMode?: IdCaptureLoadingOverlayMode;
53
+ modelLoadTimeoutMs?: number;
52
54
  precapturedDocuments?: CapturedDocuments;
53
55
  captureRequirement?: IdCaptureRequirementOption;
54
56
  autoCaptureEnabled?: boolean;
@@ -31,9 +31,11 @@ type HighPerformanceSelfieGuidanceModelsState = {
31
31
  modelDownloadProgress: number;
32
32
  };
33
33
  export declare const HighPerformanceSelfieGuidanceModelsContext: React.Context<HighPerformanceSelfieGuidanceModelsState>;
34
- export declare const HighPerformanceSelfieGuidanceModelsProvider: ({ autoStart, children, throttleMs, }: {
34
+ export declare const HighPerformanceSelfieGuidanceModelsProvider: ({ autoStart, children, throttleMs, onModelError, modelLoadTimeoutMs, }: {
35
35
  autoStart?: boolean | undefined;
36
36
  children: ReactNode;
37
37
  throttleMs?: number | undefined;
38
+ onModelError?: ((error: Error) => void) | undefined;
39
+ modelLoadTimeoutMs?: number | undefined;
38
40
  }) => ReactElement;
39
41
  export {};
@@ -38,6 +38,7 @@ export type VideoIdWizardProps = {
38
38
  onExitCapture?: () => void;
39
39
  onExitAfterFailure?: (resp: SubmissionResponse | null, req: LivenessCheckRequest | null) => void;
40
40
  onUserCancel?: () => void;
41
+ onIdCaptureModelError?: (error: Error) => void;
41
42
  idCaptureProps?: IdCaptureWizardProps;
42
43
  faceLivenessProps?: FaceLivenessWizardProps;
43
44
  idCardFrontDetectionThreshold?: number;
@@ -55,6 +56,7 @@ export type VideoIdWizardProps = {
55
56
  idCaptureGuideType?: IdCaptureGuideType;
56
57
  idCapturePortraitGuidesOnMobile?: boolean;
57
58
  idCaptureRotateLoadingOverlayImageWhenPortrait?: boolean;
59
+ idCaptureModelLoadTimeoutMs?: number;
58
60
  faceLivenessLoadingOverlayMode?: SelfieCaptureLoadingOverlayMode;
59
61
  assets?: VideoIdWizardAssets;
60
62
  classNames?: VideoIdWizardClassNames;
@@ -62,4 +64,4 @@ export type VideoIdWizardProps = {
62
64
  verbiage?: VideoIdWizardVerbiage;
63
65
  debugMode?: boolean;
64
66
  };
65
- export declare const VideoIdWizard: ({ onComplete, onExitCapture, onExitAfterFailure, onUserCancel, idCaptureProps, faceLivenessProps, idCardFrontDetectionThreshold, idCardBackDetectionThreshold, idCardFrontFocusThreshold, idCardBackFocusThreshold, goodIdCardFrontFramesThreshold, goodIdCardBackFramesThreshold, readTextPrompt, readTextTimeoutDurationMs, skipIdCapture, skipShowIdCardBack, skipSuccessScreen, idCaptureLoadingOverlayMode, idCaptureGuideType, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, faceLivenessLoadingOverlayMode, assets, classNames, colors, verbiage, debugMode, }: VideoIdWizardProps) => ReactElement;
67
+ export declare const VideoIdWizard: ({ onComplete, onExitCapture, onExitAfterFailure, onUserCancel, onIdCaptureModelError, idCaptureProps, faceLivenessProps, idCardFrontDetectionThreshold, idCardBackDetectionThreshold, idCardFrontFocusThreshold, idCardBackFocusThreshold, goodIdCardFrontFramesThreshold, goodIdCardBackFramesThreshold, readTextPrompt, readTextTimeoutDurationMs, skipIdCapture, skipShowIdCardBack, skipSuccessScreen, idCaptureLoadingOverlayMode, idCaptureGuideType, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, idCaptureModelLoadTimeoutMs, faceLivenessLoadingOverlayMode, assets, classNames, colors, verbiage, debugMode, }: VideoIdWizardProps) => ReactElement;
@@ -29,7 +29,9 @@ export type VideoSignatureWizardProps = {
29
29
  onRetryClicked?: () => void;
30
30
  onExitCapture?: () => void;
31
31
  onUserCancel?: () => void;
32
+ onModelError?: (error: Error) => void;
32
33
  loadingOverlayMode?: SelfieCaptureLoadingOverlayMode;
34
+ modelLoadTimeoutMs?: number;
33
35
  skipSuccessScreen?: boolean | (() => Promise<boolean>);
34
36
  assets?: VideoSignatureAssets;
35
37
  classNames?: VideoSignatureClassNames;
@@ -37,4 +39,4 @@ export type VideoSignatureWizardProps = {
37
39
  verbiage?: VideoSignatureVerbiage;
38
40
  debugMode?: boolean;
39
41
  };
40
- export declare const VideoSignatureWizard: ({ onComplete, onVideoCaptured, onRetryClicked, onExitCapture, onUserCancel, loadingOverlayMode, skipSuccessScreen, assets, classNames, colors, verbiage, debugMode, }: VideoSignatureWizardProps) => ReactElement;
42
+ export declare const VideoSignatureWizard: ({ onComplete, onVideoCaptured, onRetryClicked, onExitCapture, onUserCancel, onModelError, loadingOverlayMode, modelLoadTimeoutMs, skipSuccessScreen, assets, classNames, colors, verbiage, debugMode, }: VideoSignatureWizardProps) => ReactElement;