idmission-web-sdk 2.1.34 → 2.1.35

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. */
@@ -27,6 +27,8 @@ export type IdCaptureState = {
27
27
  documentTooClose: boolean;
28
28
  flipRequired: boolean;
29
29
  backDetectedFirst: boolean;
30
+ enableOverrideWrongDocumentTypeDialog: boolean;
31
+ allowOverrideWrongDocumentTypeAfterMs: number;
30
32
  allowOverrideFlipRequirement: boolean;
31
33
  overrideFlipRequirement: boolean;
32
34
  wrongDocumentTypePredictions: number;
@@ -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;
@@ -234,7 +234,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
234
234
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
235
235
  };
236
236
 
237
- var webSdkVersion = '2.1.34';
237
+ var webSdkVersion = '2.1.35';
238
238
 
239
239
  function getPlatform() {
240
240
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -6140,6 +6140,8 @@ var initialState$4 = {
6140
6140
  documentTooClose: false,
6141
6141
  flipRequired: false,
6142
6142
  backDetectedFirst: false,
6143
+ enableOverrideWrongDocumentTypeDialog: false,
6144
+ allowOverrideWrongDocumentTypeAfterMs: 8000,
6143
6145
  allowOverrideFlipRequirement: false,
6144
6146
  overrideFlipRequirement: false,
6145
6147
  wrongDocumentTypePredictions: 0,
@@ -6178,10 +6180,14 @@ var _reducer = function reducer(state, action) {
6178
6180
  var _c = action.payload,
6179
6181
  captureRequirement = _c.captureRequirement,
6180
6182
  precapturedDocuments = _c.precapturedDocuments,
6181
- allowIdCardBackToFrontCapture = _c.allowIdCardBackToFrontCapture;
6183
+ allowIdCardBackToFrontCapture = _c.allowIdCardBackToFrontCapture,
6184
+ enableOverrideWrongDocumentTypeDialog = _c.enableOverrideWrongDocumentTypeDialog,
6185
+ allowOverrideWrongDocumentTypeAfterMs = _c.allowOverrideWrongDocumentTypeAfterMs;
6182
6186
  var newState = _assign(_assign({}, state), {
6183
6187
  captureRequirement: captureRequirement,
6184
- allowIdCardBackToFrontCapture: allowIdCardBackToFrontCapture !== null && allowIdCardBackToFrontCapture !== void 0 ? allowIdCardBackToFrontCapture : false
6188
+ allowIdCardBackToFrontCapture: allowIdCardBackToFrontCapture !== null && allowIdCardBackToFrontCapture !== void 0 ? allowIdCardBackToFrontCapture : false,
6189
+ enableOverrideWrongDocumentTypeDialog: enableOverrideWrongDocumentTypeDialog,
6190
+ allowOverrideWrongDocumentTypeAfterMs: allowOverrideWrongDocumentTypeAfterMs
6185
6191
  });
6186
6192
  if (captureRequirement === 'idCardBack') newState.requestedDocumentType = 'idCardBack';
6187
6193
  if (captureRequirement === 'passport') newState.requestedDocumentType = 'passport';
@@ -6290,8 +6296,8 @@ var _reducer = function reducer(state, action) {
6290
6296
  }
6291
6297
  }
6292
6298
  var hasBeenRunningForLongEnough = !!state.captureStartedAt && new Date().getTime() - state.captureStartedAt.getTime() > 1000;
6293
- var overrideFlipRequirementThreshold = Math.ceil(8 * frameCaptureRate);
6294
- var allowOverrideFlipRequirement = hasBeenRunningForLongEnough && !state.overrideFlipRequirement && overrideFlipRequirementThreshold > 0 && (state.allowOverrideFlipRequirement || wrongDocumentTypePredictions >= overrideFlipRequirementThreshold);
6299
+ var overrideFlipRequirementThreshold = Math.ceil(state.allowOverrideWrongDocumentTypeAfterMs / 1000 * frameCaptureRate);
6300
+ var allowOverrideFlipRequirement = state.enableOverrideWrongDocumentTypeDialog && hasBeenRunningForLongEnough && !state.overrideFlipRequirement && overrideFlipRequirementThreshold > 0 && (state.allowOverrideFlipRequirement || wrongDocumentTypePredictions >= overrideFlipRequirementThreshold);
6295
6301
  return _assign(_assign({}, state), {
6296
6302
  videoWidth: frameWidth,
6297
6303
  videoHeight: frameHeight,
@@ -9650,50 +9656,56 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
9650
9656
  forceFallbackMode = _3 === void 0 ? false : _3,
9651
9657
  _4 = _a.allowIdCardBackToFrontCapture,
9652
9658
  allowIdCardBackToFrontCapture = _4 === void 0 ? false : _4,
9653
- _5 = _a.assets,
9654
- assets = _5 === void 0 ? {} : _5,
9655
- _6 = _a.classNames,
9656
- classNames = _6 === void 0 ? {} : _6,
9657
- _7 = _a.colors,
9658
- colors = _7 === void 0 ? {} : _7,
9659
- _8 = _a.verbiage,
9660
- verbiage = _8 === void 0 ? {} : _8,
9661
- _9 = _a.debugMode,
9662
- debugMode = _9 === void 0 ? false : _9;
9663
- var _10 = useIdCaptureState(),
9664
- state = _10[0],
9665
- dispatch = _10[1];
9666
- var _11 = React.useContext(CameraStateContext),
9667
- cameraAccessDenied = _11.cameraAccessDenied,
9668
- requestCameraAccess = _11.requestCameraAccess,
9669
- releaseCameraAccess = _11.releaseCameraAccess;
9670
- var _12 = React.useState(false),
9671
- overlayDismissed = _12[0],
9672
- setOverlayDismissed = _12[1];
9673
- var _13 = React.useContext(SubmissionContext),
9674
- submissionStatus = _13.submissionStatus,
9675
- setIdFrontImage = _13.setIdFrontImage,
9676
- setIdBackImage = _13.setIdBackImage,
9677
- setPassportImage = _13.setPassportImage,
9678
- logIdFrontCaptureAttempt = _13.logIdFrontCaptureAttempt,
9679
- logIdBackCaptureAttempt = _13.logIdBackCaptureAttempt;
9680
- var _14 = React.useContext(IdCaptureModelsContext),
9681
- start = _14.start,
9682
- stop = _14.stop,
9683
- onPredictionMade = _14.onPredictionMade,
9684
- setRequiredDocumentType = _14.setRequiredDocumentType,
9685
- modelError = _14.modelError,
9686
- resetBestFrame = _14.resetBestFrame;
9659
+ _5 = _a.enableOverrideWrongDocumentTypeDialog,
9660
+ enableOverrideWrongDocumentTypeDialog = _5 === void 0 ? false : _5,
9661
+ _6 = _a.allowOverrideWrongDocumentTypeAfterMs,
9662
+ allowOverrideWrongDocumentTypeAfterMs = _6 === void 0 ? 8000 : _6,
9663
+ _7 = _a.assets,
9664
+ assets = _7 === void 0 ? {} : _7,
9665
+ _8 = _a.classNames,
9666
+ classNames = _8 === void 0 ? {} : _8,
9667
+ _9 = _a.colors,
9668
+ colors = _9 === void 0 ? {} : _9,
9669
+ _10 = _a.verbiage,
9670
+ verbiage = _10 === void 0 ? {} : _10,
9671
+ _11 = _a.debugMode,
9672
+ debugMode = _11 === void 0 ? false : _11;
9673
+ var _12 = useIdCaptureState(),
9674
+ state = _12[0],
9675
+ dispatch = _12[1];
9676
+ var _13 = React.useContext(CameraStateContext),
9677
+ cameraAccessDenied = _13.cameraAccessDenied,
9678
+ requestCameraAccess = _13.requestCameraAccess,
9679
+ releaseCameraAccess = _13.releaseCameraAccess;
9680
+ var _14 = React.useState(false),
9681
+ overlayDismissed = _14[0],
9682
+ setOverlayDismissed = _14[1];
9683
+ var _15 = React.useContext(SubmissionContext),
9684
+ submissionStatus = _15.submissionStatus,
9685
+ setIdFrontImage = _15.setIdFrontImage,
9686
+ setIdBackImage = _15.setIdBackImage,
9687
+ setPassportImage = _15.setPassportImage,
9688
+ logIdFrontCaptureAttempt = _15.logIdFrontCaptureAttempt,
9689
+ logIdBackCaptureAttempt = _15.logIdBackCaptureAttempt;
9690
+ var _16 = React.useContext(IdCaptureModelsContext),
9691
+ start = _16.start,
9692
+ stop = _16.stop,
9693
+ onPredictionMade = _16.onPredictionMade,
9694
+ setRequiredDocumentType = _16.setRequiredDocumentType,
9695
+ modelError = _16.modelError,
9696
+ resetBestFrame = _16.resetBestFrame;
9687
9697
  React.useEffect(function () {
9688
9698
  dispatch({
9689
9699
  type: 'configureWizard',
9690
9700
  payload: {
9691
9701
  captureRequirement: captureRequirement,
9692
9702
  precapturedDocuments: precapturedDocuments,
9693
- allowIdCardBackToFrontCapture: allowIdCardBackToFrontCapture
9703
+ allowIdCardBackToFrontCapture: allowIdCardBackToFrontCapture,
9704
+ enableOverrideWrongDocumentTypeDialog: enableOverrideWrongDocumentTypeDialog,
9705
+ allowOverrideWrongDocumentTypeAfterMs: allowOverrideWrongDocumentTypeAfterMs
9694
9706
  }
9695
9707
  });
9696
- }, [allowIdCardBackToFrontCapture, captureRequirement, dispatch, precapturedDocuments]);
9708
+ }, [allowIdCardBackToFrontCapture, allowOverrideWrongDocumentTypeAfterMs, captureRequirement, dispatch, enableOverrideWrongDocumentTypeDialog, precapturedDocuments]);
9697
9709
  var documentCount = Object.keys(state.capturedDocuments).length;
9698
9710
  React.useEffect(function () {
9699
9711
  documentCount && resetBestFrame();
@@ -9773,9 +9785,9 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
9773
9785
  type: 'resetWizard'
9774
9786
  });
9775
9787
  }, [dispatch]);
9776
- var _15 = React.useState(0),
9777
- attempt = _15[0],
9778
- setAttempt = _15[1];
9788
+ var _17 = React.useState(0),
9789
+ attempt = _17[0],
9790
+ setAttempt = _17[1];
9779
9791
  var onExit = React.useCallback(function () {
9780
9792
  releaseCameraAccess();
9781
9793
  setOverlayDismissed(false);
@@ -9828,12 +9840,12 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
9828
9840
  })
9829
9841
  };
9830
9842
  var theme = styled.useTheme();
9831
- var _16 = useIdCaptureState()[0],
9832
- guideRectX = _16.guideRectX,
9833
- guideRectY = _16.guideRectY,
9834
- guideRectWidth = _16.guideRectWidth,
9835
- guideRectHeight = _16.guideRectHeight,
9836
- imageUrl = _16.imageUrl;
9843
+ var _18 = useIdCaptureState()[0],
9844
+ guideRectX = _18.guideRectX,
9845
+ guideRectY = _18.guideRectY,
9846
+ guideRectWidth = _18.guideRectWidth,
9847
+ guideRectHeight = _18.guideRectHeight,
9848
+ imageUrl = _18.imageUrl;
9837
9849
  var idCaptureAssets = assets[state.requestedDocumentType];
9838
9850
  var idCaptureVerbiage = idCaptureVerbiages[state.requestedDocumentType];
9839
9851
  React.useEffect(function () {
@@ -14168,6 +14180,10 @@ var IdValidation = function IdValidation(_a) {
14168
14180
  forceFallbackMode = _m === void 0 ? false : _m,
14169
14181
  _o = _a.allowIdCardBackToFrontCapture,
14170
14182
  allowIdCardBackToFrontCapture = _o === void 0 ? false : _o,
14183
+ _p = _a.enableOverrideWrongDocumentTypeDialog,
14184
+ enableOverrideWrongDocumentTypeDialog = _p === void 0 ? false : _p,
14185
+ _q = _a.allowOverrideWrongDocumentTypeAfterMs,
14186
+ allowOverrideWrongDocumentTypeAfterMs = _q === void 0 ? 8000 : _q,
14171
14187
  onBeforeSubmit = _a.onBeforeSubmit,
14172
14188
  onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
14173
14189
  onDocumentUploadProgress = _a.onDocumentUploadProgress,
@@ -14181,28 +14197,28 @@ var IdValidation = function IdValidation(_a) {
14181
14197
  onUserCancel = _a.onUserCancel,
14182
14198
  onModelError = _a.onModelError,
14183
14199
  onCameraAccessDenied = _a.onCameraAccessDenied,
14184
- _p = _a.theme,
14185
- theme = _p === void 0 ? 'default' : _p,
14186
- _q = _a.assets,
14187
- assets = _q === void 0 ? {} : _q,
14188
- _r = _a.classNames,
14189
- classNames = _r === void 0 ? {} : _r,
14190
- _s = _a.colors,
14191
- colors = _s === void 0 ? {} : _s,
14192
- _t = _a.verbiage,
14193
- verbiage = _t === void 0 ? {} : _t,
14194
- _u = _a.captureSignature,
14195
- captureSignature = _u === void 0 ? false : _u,
14196
- _v = _a.captureSignatureVideo,
14197
- captureSignatureVideo = _v === void 0 ? false : _v,
14198
- _w = _a.captureAdditionalDocuments,
14199
- captureAdditionalDocuments = _w === void 0 ? [] : _w,
14200
- _x = _a.geolocationEnabled,
14201
- geolocationEnabled = _x === void 0 ? true : _x,
14202
- _y = _a.geolocationRequired,
14203
- geolocationRequired = _y === void 0 ? false : _y,
14204
- _z = _a.debugMode,
14205
- debugMode = _z === void 0 ? false : _z;
14200
+ _r = _a.theme,
14201
+ theme = _r === void 0 ? 'default' : _r,
14202
+ _s = _a.assets,
14203
+ assets = _s === void 0 ? {} : _s,
14204
+ _t = _a.classNames,
14205
+ classNames = _t === void 0 ? {} : _t,
14206
+ _u = _a.colors,
14207
+ colors = _u === void 0 ? {} : _u,
14208
+ _v = _a.verbiage,
14209
+ verbiage = _v === void 0 ? {} : _v,
14210
+ _w = _a.captureSignature,
14211
+ captureSignature = _w === void 0 ? false : _w,
14212
+ _x = _a.captureSignatureVideo,
14213
+ captureSignatureVideo = _x === void 0 ? false : _x,
14214
+ _y = _a.captureAdditionalDocuments,
14215
+ captureAdditionalDocuments = _y === void 0 ? [] : _y,
14216
+ _z = _a.geolocationEnabled,
14217
+ geolocationEnabled = _z === void 0 ? true : _z,
14218
+ _0 = _a.geolocationRequired,
14219
+ geolocationRequired = _0 === void 0 ? false : _0,
14220
+ _1 = _a.debugMode,
14221
+ debugMode = _1 === void 0 ? false : _1;
14206
14222
  useLanguage(lang);
14207
14223
  useDebugLogging(debugMode);
14208
14224
  var idCaptureProps = React.useMemo(function () {
@@ -14223,13 +14239,15 @@ var IdValidation = function IdValidation(_a) {
14223
14239
  portraitGuidesOnMobile: portraitGuidesOnMobile,
14224
14240
  rotateLoadingOverlayImageWhenPortrait: rotateLoadingOverlayImageWhenPortrait,
14225
14241
  modelLoadTimeoutMs: modelLoadTimeoutMs,
14242
+ enableOverrideWrongDocumentTypeDialog: enableOverrideWrongDocumentTypeDialog,
14243
+ allowOverrideWrongDocumentTypeAfterMs: allowOverrideWrongDocumentTypeAfterMs,
14226
14244
  assets: assets,
14227
14245
  classNames: classNames,
14228
14246
  colors: colors,
14229
14247
  verbiage: verbiage,
14230
14248
  debugMode: debugMode
14231
14249
  };
14232
- }, [onExitCapture, onUserCancel, onModelError, precapturedDocuments, idCaptureRequirement, separateIdCardCaptureSequence, idCaptureThresholds, skipSuccessScreen, loadingOverlayMode, forceFallbackMode, allowIdCardBackToFrontCapture, instructions, guideType, portraitGuidesOnMobile, rotateLoadingOverlayImageWhenPortrait, modelLoadTimeoutMs, assets, classNames, colors, verbiage, debugMode]);
14250
+ }, [onExitCapture, onUserCancel, onModelError, precapturedDocuments, idCaptureRequirement, separateIdCardCaptureSequence, idCaptureThresholds, skipSuccessScreen, loadingOverlayMode, forceFallbackMode, allowIdCardBackToFrontCapture, instructions, guideType, portraitGuidesOnMobile, rotateLoadingOverlayImageWhenPortrait, modelLoadTimeoutMs, enableOverrideWrongDocumentTypeDialog, allowOverrideWrongDocumentTypeAfterMs, assets, classNames, colors, verbiage, debugMode]);
14233
14251
  var additionalDocumentCaptureProps = React.useMemo(function () {
14234
14252
  return {
14235
14253
  documents: captureAdditionalDocuments,
@@ -14475,6 +14493,10 @@ var IdAndFaceValidation = function IdAndFaceValidation(_a) {
14475
14493
  selfieCaptureModelLoadTimeoutMs = _o === void 0 ? defaultSelfieCaptureModelLoadTimeoutMs : _o,
14476
14494
  _p = _a.allowIdCardBackToFrontCapture,
14477
14495
  allowIdCardBackToFrontCapture = _p === void 0 ? false : _p,
14496
+ _q = _a.enableOverrideWrongDocumentTypeDialog,
14497
+ enableOverrideWrongDocumentTypeDialog = _q === void 0 ? false : _q,
14498
+ _r = _a.allowOverrideWrongDocumentTypeAfterMs,
14499
+ allowOverrideWrongDocumentTypeAfterMs = _r === void 0 ? 8000 : _r,
14478
14500
  onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
14479
14501
  onDocumentUploaded = _a.onDocumentUploaded,
14480
14502
  onDocumentUploadProgress = _a.onDocumentUploadProgress,
@@ -14491,28 +14513,28 @@ var IdAndFaceValidation = function IdAndFaceValidation(_a) {
14491
14513
  onIdCaptureModelError = _a.onIdCaptureModelError,
14492
14514
  onSelfieCaptureModelError = _a.onSelfieCaptureModelError,
14493
14515
  onCameraAccessDenied = _a.onCameraAccessDenied,
14494
- _q = _a.captureSignature,
14495
- captureSignature = _q === void 0 ? false : _q,
14496
- _r = _a.captureSignatureVideo,
14497
- captureSignatureVideo = _r === void 0 ? false : _r,
14498
- _s = _a.captureAdditionalDocuments,
14499
- captureAdditionalDocuments = _s === void 0 ? [] : _s,
14500
- _t = _a.theme,
14501
- theme = _t === void 0 ? 'default' : _t,
14502
- _u = _a.assets,
14503
- assets = _u === void 0 ? {} : _u,
14504
- _v = _a.classNames,
14505
- classNames = _v === void 0 ? {} : _v,
14506
- _w = _a.colors,
14507
- colors = _w === void 0 ? {} : _w,
14508
- _x = _a.verbiage,
14509
- verbiage = _x === void 0 ? {} : _x,
14510
- _y = _a.geolocationEnabled,
14511
- geolocationEnabled = _y === void 0 ? true : _y,
14512
- _z = _a.geolocationRequired,
14513
- geolocationRequired = _z === void 0 ? false : _z,
14514
- _0 = _a.debugMode,
14515
- debugMode = _0 === void 0 ? false : _0;
14516
+ _s = _a.captureSignature,
14517
+ captureSignature = _s === void 0 ? false : _s,
14518
+ _t = _a.captureSignatureVideo,
14519
+ captureSignatureVideo = _t === void 0 ? false : _t,
14520
+ _u = _a.captureAdditionalDocuments,
14521
+ captureAdditionalDocuments = _u === void 0 ? [] : _u,
14522
+ _v = _a.theme,
14523
+ theme = _v === void 0 ? 'default' : _v,
14524
+ _w = _a.assets,
14525
+ assets = _w === void 0 ? {} : _w,
14526
+ _x = _a.classNames,
14527
+ classNames = _x === void 0 ? {} : _x,
14528
+ _y = _a.colors,
14529
+ colors = _y === void 0 ? {} : _y,
14530
+ _z = _a.verbiage,
14531
+ verbiage = _z === void 0 ? {} : _z,
14532
+ _0 = _a.geolocationEnabled,
14533
+ geolocationEnabled = _0 === void 0 ? true : _0,
14534
+ _1 = _a.geolocationRequired,
14535
+ geolocationRequired = _1 === void 0 ? false : _1,
14536
+ _2 = _a.debugMode,
14537
+ debugMode = _2 === void 0 ? false : _2;
14516
14538
  useLanguage(lang);
14517
14539
  useDebugLogging(debugMode);
14518
14540
  var idCaptureProps = React.useMemo(function () {
@@ -14534,10 +14556,12 @@ var IdAndFaceValidation = function IdAndFaceValidation(_a) {
14534
14556
  rotateLoadingOverlayImageWhenPortrait: idCaptureRotateLoadingOverlayImageWhenPortrait,
14535
14557
  modelLoadTimeoutMs: idCaptureModelLoadTimeoutMs,
14536
14558
  allowIdCardBackToFrontCapture: allowIdCardBackToFrontCapture,
14559
+ enableOverrideWrongDocumentTypeDialog: enableOverrideWrongDocumentTypeDialog,
14560
+ allowOverrideWrongDocumentTypeAfterMs: allowOverrideWrongDocumentTypeAfterMs,
14537
14561
  skipSuccessScreen: skipSuccessScreen,
14538
14562
  debugMode: debugMode
14539
14563
  };
14540
- }, [onExitCapture, onUserCancel, onIdCaptureModelError, assets.idCapture, classNames.idCapture, colors.idCapture, verbiage.idCapture, precapturedDocuments, idCaptureRequirement, idCaptureThresholds, idCaptureLoadingOverlayMode, idCaptureInstructions, idCaptureGuideType, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, idCaptureModelLoadTimeoutMs, allowIdCardBackToFrontCapture, skipSuccessScreen, debugMode]);
14564
+ }, [onExitCapture, onUserCancel, onIdCaptureModelError, assets.idCapture, classNames.idCapture, colors.idCapture, verbiage.idCapture, precapturedDocuments, idCaptureRequirement, idCaptureThresholds, idCaptureLoadingOverlayMode, idCaptureInstructions, idCaptureGuideType, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, idCaptureModelLoadTimeoutMs, allowIdCardBackToFrontCapture, enableOverrideWrongDocumentTypeDialog, allowOverrideWrongDocumentTypeAfterMs, skipSuccessScreen, debugMode]);
14541
14565
  var faceLivenessProps = React.useMemo(function () {
14542
14566
  return {
14543
14567
  loadingOverlayMode: faceLivenessLoadingOverlayMode,
@@ -14700,6 +14724,10 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
14700
14724
  selfieCaptureModelLoadTimeoutMs = _o === void 0 ? defaultSelfieCaptureModelLoadTimeoutMs : _o,
14701
14725
  _p = _a.allowIdCardBackToFrontCapture,
14702
14726
  allowIdCardBackToFrontCapture = _p === void 0 ? false : _p,
14727
+ _q = _a.enableOverrideWrongDocumentTypeDialog,
14728
+ enableOverrideWrongDocumentTypeDialog = _q === void 0 ? false : _q,
14729
+ _r = _a.allowOverrideWrongDocumentTypeAfterMs,
14730
+ allowOverrideWrongDocumentTypeAfterMs = _r === void 0 ? 8000 : _r,
14703
14731
  onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
14704
14732
  onDocumentUploadProgress = _a.onDocumentUploadProgress,
14705
14733
  onDocumentUploaded = _a.onDocumentUploaded,
@@ -14715,28 +14743,28 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
14715
14743
  onIdCaptureModelError = _a.onIdCaptureModelError,
14716
14744
  onSelfieCaptureModelError = _a.onSelfieCaptureModelError,
14717
14745
  onCameraAccessDenied = _a.onCameraAccessDenied,
14718
- _q = _a.captureSignature,
14719
- captureSignature = _q === void 0 ? false : _q,
14720
- _r = _a.captureSignatureVideo,
14721
- captureSignatureVideo = _r === void 0 ? false : _r,
14722
- _s = _a.captureAdditionalDocuments,
14723
- captureAdditionalDocuments = _s === void 0 ? [] : _s,
14724
- _t = _a.theme,
14725
- theme = _t === void 0 ? 'default' : _t,
14726
- _u = _a.assets,
14727
- assets = _u === void 0 ? {} : _u,
14728
- _v = _a.classNames,
14729
- classNames = _v === void 0 ? {} : _v,
14730
- _w = _a.colors,
14731
- colors = _w === void 0 ? {} : _w,
14732
- _x = _a.verbiage,
14733
- verbiage = _x === void 0 ? {} : _x,
14734
- _y = _a.geolocationEnabled,
14735
- geolocationEnabled = _y === void 0 ? true : _y,
14736
- _z = _a.geolocationRequired,
14737
- geolocationRequired = _z === void 0 ? false : _z,
14738
- _0 = _a.debugMode,
14739
- debugMode = _0 === void 0 ? false : _0;
14746
+ _s = _a.captureSignature,
14747
+ captureSignature = _s === void 0 ? false : _s,
14748
+ _t = _a.captureSignatureVideo,
14749
+ captureSignatureVideo = _t === void 0 ? false : _t,
14750
+ _u = _a.captureAdditionalDocuments,
14751
+ captureAdditionalDocuments = _u === void 0 ? [] : _u,
14752
+ _v = _a.theme,
14753
+ theme = _v === void 0 ? 'default' : _v,
14754
+ _w = _a.assets,
14755
+ assets = _w === void 0 ? {} : _w,
14756
+ _x = _a.classNames,
14757
+ classNames = _x === void 0 ? {} : _x,
14758
+ _y = _a.colors,
14759
+ colors = _y === void 0 ? {} : _y,
14760
+ _z = _a.verbiage,
14761
+ verbiage = _z === void 0 ? {} : _z,
14762
+ _0 = _a.geolocationEnabled,
14763
+ geolocationEnabled = _0 === void 0 ? true : _0,
14764
+ _1 = _a.geolocationRequired,
14765
+ geolocationRequired = _1 === void 0 ? false : _1,
14766
+ _2 = _a.debugMode,
14767
+ debugMode = _2 === void 0 ? false : _2;
14740
14768
  useLanguage(lang);
14741
14769
  useDebugLogging(debugMode);
14742
14770
  var idCaptureProps = React.useMemo(function () {
@@ -14754,13 +14782,15 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
14754
14782
  rotateLoadingOverlayImageWhenPortrait: idCaptureRotateLoadingOverlayImageWhenPortrait,
14755
14783
  modelLoadTimeoutMs: idCaptureModelLoadTimeoutMs,
14756
14784
  allowIdCardBackToFrontCapture: allowIdCardBackToFrontCapture,
14785
+ enableOverrideWrongDocumentTypeDialog: enableOverrideWrongDocumentTypeDialog,
14786
+ allowOverrideWrongDocumentTypeAfterMs: allowOverrideWrongDocumentTypeAfterMs,
14757
14787
  onExitCapture: onExitCapture,
14758
14788
  onUserCancel: onUserCancel,
14759
14789
  onModelError: onIdCaptureModelError,
14760
14790
  skipSuccessScreen: skipSuccessScreen,
14761
14791
  debugMode: debugMode
14762
14792
  };
14763
- }, [assets.idCapture, classNames.idCapture, colors.idCapture, verbiage.idCapture, idCaptureRequirement, idCaptureThresholds, idCaptureLoadingOverlayMode, idCaptureInstructions, idCaptureGuideType, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, idCaptureModelLoadTimeoutMs, allowIdCardBackToFrontCapture, onExitCapture, onUserCancel, onIdCaptureModelError, skipSuccessScreen, debugMode]);
14793
+ }, [assets.idCapture, classNames.idCapture, colors.idCapture, verbiage.idCapture, idCaptureRequirement, idCaptureThresholds, idCaptureLoadingOverlayMode, idCaptureInstructions, idCaptureGuideType, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, idCaptureModelLoadTimeoutMs, allowIdCardBackToFrontCapture, enableOverrideWrongDocumentTypeDialog, allowOverrideWrongDocumentTypeAfterMs, onExitCapture, onUserCancel, onIdCaptureModelError, skipSuccessScreen, debugMode]);
14764
14794
  var faceLivenessProps = React.useMemo(function () {
14765
14795
  return {
14766
14796
  onExitCapture: onExitCapture,