idmission-web-sdk 2.1.34 → 2.1.36

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.
@@ -118,6 +118,10 @@ export interface CustomerEnrollmentProps extends PropsWithChildren {
118
118
  selfieCaptureModelLoadTimeoutMs?: number;
119
119
  /** Boolean to indicate whether to allow the user to capture the back of the ID card before capturing the front. Defaults to `false`. */
120
120
  allowIdCardBackToFrontCapture?: boolean;
121
+ /** Boolean to indicate whether to show the user a dialog to disable the wrong document type guidance after a configurable amount of time. Defaults to `false`. */
122
+ enableOverrideWrongDocumentTypeDialog?: boolean;
123
+ /** Number of milliseconds to wait before showing the user a dialog to disable the wrong document type guidance. Defaults to `8000`. */
124
+ allowOverrideWrongDocumentTypeAfterMs?: number;
121
125
  /** 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. */
122
126
  onBeforeDocumentUpload?: OnBeforeDocumentUpload;
123
127
  /** Callback function that fires when progress information is available for a document upload. The progress info and metadata are passed in as parameters. */
@@ -115,6 +115,10 @@ export interface IdAndFaceValidationProps extends PropsWithChildren {
115
115
  selfieCaptureModelLoadTimeoutMs?: number;
116
116
  /** Boolean to indicate whether to allow the user to capture the back of the ID card before capturing the front. Defaults to `false`. */
117
117
  allowIdCardBackToFrontCapture?: boolean;
118
+ /** Boolean to indicate whether to show the user a dialog to disable the wrong document type guidance after a configurable amount of time. Defaults to `false`. */
119
+ enableOverrideWrongDocumentTypeDialog?: boolean;
120
+ /** Number of milliseconds to wait before showing the user a dialog to disable the wrong document type guidance. Defaults to `8000`. */
121
+ allowOverrideWrongDocumentTypeAfterMs?: 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. */
@@ -100,6 +100,10 @@ export interface IdValidationProps extends PropsWithChildren {
100
100
  forceFallbackMode?: boolean;
101
101
  /** Boolean to indicate whether to allow the user to capture the back of the ID card before capturing the front. Defaults to `false`. */
102
102
  allowIdCardBackToFrontCapture?: boolean;
103
+ /** Boolean to indicate whether to show the user a dialog to disable the wrong document type guidance after a configurable amount of time. Defaults to `false`. */
104
+ enableOverrideWrongDocumentTypeDialog?: boolean;
105
+ /** Number of milliseconds to wait before showing the user a dialog to disable the wrong document type guidance. Defaults to `8000`. */
106
+ allowOverrideWrongDocumentTypeAfterMs?: number;
103
107
  /** Object to allow documents that have been previously captured to be submitted. Valid keys: `idCardFront`, `idCardBack`, `passport`.*/
104
108
  precapturedDocuments?: CapturedDocuments;
105
109
  /** 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. */
@@ -5,6 +5,7 @@ import { IdCaptureImagePreviewClassNames } from '../common/SelfieProgressPreview
5
5
  import { CustomerSuppliedVerbiage } from '../../lib/locales';
6
6
  import { CapturedDocumentType } from './CapturedDocuments';
7
7
  import { IdCaptureFitGuideClassNames } from './IdCaptureFitGuide';
8
+ import { OverrideWrongDocumentTypeGuidanceDialogClassNames, OverrideWrongDocumentTypeGuidanceDialogVerbiage } from './OverrideWrongDocumentTypeGuidanceDialog';
8
9
  export type IdCaptureAssets = {
9
10
  portraitGuidesImageUrl?: string;
10
11
  landscapeGuidesImageUrl?: string;
@@ -16,6 +17,7 @@ export type IdCaptureClassNames = {
16
17
  guidanceMessage?: string;
17
18
  imagePreview?: IdCaptureImagePreviewClassNames;
18
19
  exitCaptureBtn?: string;
20
+ overrideWrongDocumentTypeGuidanceDialog?: OverrideWrongDocumentTypeGuidanceDialogClassNames;
19
21
  };
20
22
  export type IdCaptureColors = {
21
23
  guideBoxUnsatisfiedColor?: string;
@@ -37,6 +39,7 @@ export type IdCaptureVerbiage = {
37
39
  guidanceNotCenteredText?: CustomerSuppliedVerbiage;
38
40
  guidanceTooCloseText?: CustomerSuppliedVerbiage;
39
41
  guidanceNotDetectedText?: CustomerSuppliedVerbiage;
42
+ overrideWrongDocumentTypeGuidanceDialog?: OverrideWrongDocumentTypeGuidanceDialogVerbiage;
40
43
  };
41
44
  export type IdCaptureProps = {
42
45
  requiredDocumentType?: CapturedDocumentType;
@@ -27,8 +27,10 @@ export type IdCaptureState = {
27
27
  documentTooClose: boolean;
28
28
  flipRequired: boolean;
29
29
  backDetectedFirst: boolean;
30
- allowOverrideFlipRequirement: boolean;
31
- overrideFlipRequirement: boolean;
30
+ enableOverrideWrongDocumentTypeDialog: boolean;
31
+ allowOverrideWrongDocumentTypeAfterMs: number;
32
+ allowOverrideWrongDocumentTypeGuidance: boolean;
33
+ overrideWrongDocumentTypeGuidance: boolean;
32
34
  wrongDocumentTypePredictions: number;
33
35
  idCardFrontDetectionScore: number;
34
36
  idCardFrontDetectionThresholdMet: boolean;
@@ -61,6 +63,8 @@ export type IdCaptureAction = {
61
63
  captureRequirement: IdCaptureRequirementOption;
62
64
  precapturedDocuments?: CapturedDocuments;
63
65
  allowIdCardBackToFrontCapture?: boolean;
66
+ enableOverrideWrongDocumentTypeDialog: boolean;
67
+ allowOverrideWrongDocumentTypeAfterMs: number;
64
68
  };
65
69
  } | {
66
70
  type: 'setRequiredDocumentType';
@@ -65,10 +65,12 @@ export type IdCaptureWizardProps = {
65
65
  silentFallback?: boolean;
66
66
  forceFallbackMode?: boolean;
67
67
  allowIdCardBackToFrontCapture?: boolean;
68
+ enableOverrideWrongDocumentTypeDialog?: boolean;
69
+ allowOverrideWrongDocumentTypeAfterMs?: number;
68
70
  assets?: IdCaptureWizardAssets;
69
71
  classNames?: IdCaptureWizardClassNames;
70
72
  colors?: IdCaptureWizardColors;
71
73
  verbiage?: IdCaptureWizardVerbiage;
72
74
  debugMode?: boolean;
73
75
  };
74
- export declare const IdCaptureWizard: ({ onSuccess, onExitCapture, onUserCancel, loadingOverlayMode, precapturedDocuments, captureRequirement, separateIdCardCaptureSequence, thresholds, skipSuccessScreen, instructions, releaseCameraAccessOnExit, guideType, portraitGuidesOnMobile, rotateLoadingOverlayImageWhenPortrait, silentFallback, forceFallbackMode, allowIdCardBackToFrontCapture, assets, classNames, colors, verbiage, debugMode, }: IdCaptureWizardProps) => ReactElement;
76
+ export declare const IdCaptureWizard: ({ onSuccess, onExitCapture, onUserCancel, loadingOverlayMode, precapturedDocuments, captureRequirement, separateIdCardCaptureSequence, thresholds, skipSuccessScreen, instructions, releaseCameraAccessOnExit, guideType, portraitGuidesOnMobile, rotateLoadingOverlayImageWhenPortrait, silentFallback, forceFallbackMode, allowIdCardBackToFrontCapture, enableOverrideWrongDocumentTypeDialog, allowOverrideWrongDocumentTypeAfterMs, assets, classNames, colors, verbiage, debugMode, }: IdCaptureWizardProps) => ReactElement;
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ import { CustomerSuppliedVerbiage } from '../../lib/locales';
3
+ export type OverrideWrongDocumentTypeGuidanceDialogClassNames = {
4
+ container?: string;
5
+ inner?: string;
6
+ message?: string;
7
+ buttonContainer?: string;
8
+ button?: string;
9
+ };
10
+ export type OverrideWrongDocumentTypeGuidanceDialogVerbiage = {
11
+ messageText?: CustomerSuppliedVerbiage;
12
+ buttonText?: CustomerSuppliedVerbiage;
13
+ };
14
+ export type OverrideWrongDocumentTypeGuidanceDialogProps = {
15
+ classNames?: OverrideWrongDocumentTypeGuidanceDialogClassNames;
16
+ verbiage?: OverrideWrongDocumentTypeGuidanceDialogVerbiage;
17
+ };
18
+ export default function OverrideWrongDocumentTypeGuidanceDialog({ classNames, verbiage: rawVerbiage, }: OverrideWrongDocumentTypeGuidanceDialogProps): React.JSX.Element | null;
@@ -99,5 +99,7 @@ declare const _default: {
99
99
  'Loading guided capture experience...': string;
100
100
  'Guided capture experience ready': string;
101
101
  "Let's Go!": string;
102
+ 'We are having trouble identifying the correct side of your id, do you want to continue with capture anyway?': string;
103
+ OK: string;
102
104
  };
103
105
  export default _default;
@@ -107,6 +107,8 @@ export declare const resources: {
107
107
  'Loading guided capture experience...': string;
108
108
  'Guided capture experience ready': string;
109
109
  "Let's Go!": string;
110
+ 'We are having trouble identifying the correct side of your id, do you want to continue with capture anyway?': string;
111
+ OK: string;
110
112
  };
111
113
  };
112
114
  };