idmission-web-sdk 2.0.3 → 2.1.0
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 +36 -28
- package/dist/components/customer_flows/CustomerIdAndBiometricsEnrollment.d.ts +3 -12
- package/dist/components/customer_flows/IdAndFaceValidation.d.ts +3 -12
- package/dist/components/customer_flows/IdValidation.d.ts +3 -12
- package/dist/components/customer_flows/VideoIdValidation.d.ts +3 -12
- package/dist/components/id_capture/CapturedDocuments.d.ts +2 -0
- package/dist/components/id_capture/FocusModelProvider.d.ts +2 -1
- package/dist/components/id_capture/IdCapture.d.ts +4 -14
- package/dist/components/id_capture/IdCaptureModelsProvider.d.ts +7 -22
- package/dist/components/id_capture/IdCaptureStateProvider.d.ts +11 -38
- package/dist/components/id_capture/IdCaptureSuccess.d.ts +2 -3
- package/dist/components/id_capture/IdCaptureWizard.d.ts +3 -9
- package/dist/components/video_id/IdVideoCapture.d.ts +12 -7
- package/dist/components/video_id/IdVideoCaptureWizard.d.ts +3 -8
- package/dist/lib/models/DocumentDetection.d.ts +15 -12
- package/dist/lib/models/Focus.d.ts +6 -2
- package/dist/sdk2.cjs.development.js +754 -920
- package/dist/sdk2.cjs.development.js.map +1 -1
- package/dist/sdk2.cjs.production.js +1 -1
- package/dist/sdk2.cjs.production.js.map +1 -1
- package/dist/sdk2.esm.js +754 -920
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +754 -920
- package/dist/sdk2.umd.development.js.map +1 -1
- package/dist/sdk2.umd.production.js +1 -1
- package/dist/sdk2.umd.production.js.map +1 -1
- package/dist/stories/Components/IdCapture/LicenseBackCapture.stories.d.ts +0 -48
- package/dist/stories/Components/IdCapture/LicenseFrontCapture.stories.d.ts +0 -45
- package/dist/stories/Components/IdCapture/PassportCapture.stories.d.ts +0 -47
- package/dist/stories/Components/IdCapture/Wizard.stories.d.ts +1 -77
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -87,11 +87,7 @@ Render a fullscreen ID capture component that instructs the user to photograph b
|
|
|
87
87
|
<tr><td><code>captureAdditionalDocuments</code> (optional)</td><td>array of additional documents to be captured. Each element includes a name and description.</td></tr>
|
|
88
88
|
<tr><td><code>loadingOverlayMode</code> (optional)</td><td>string indicating which ID capture loading overlay screen should be used. Supported values: default and legacy. Defaults to default.</td></tr>
|
|
89
89
|
<tr><td><code>idCaptureRequirement</code> (optional)</td><td>string to indicate which types of documents should be captured. Valid values: idCard, passport, idCardOrPassport, idCardAndPassport. Default is idCardOrPassport.</td></tr>
|
|
90
|
-
<tr><td><code>
|
|
91
|
-
<tr><td><code>idCardAutoCaptureScoreThreshold</code> (optional)</td><td>number between 0 and 1 at which document detection guidance score condition is considered to be met for ID cards. Defaults to 0.8.</td></tr>
|
|
92
|
-
<tr><td><code>passportAutoCaptureScoreThreshold</code> (optional)</td><td>number between 0 and 1 at which document detection guidance score condition is considered to be met for passports. Defaults to 0.75.</td></tr>
|
|
93
|
-
<tr><td><code>idCardFocusScoreThreshold</code> (optional)</td><td>number between 0 and 1 at which focus guidance score condition is considered to be met for ID cards. Defaults to 0.3.</td></tr>
|
|
94
|
-
<tr><td><code>passportFocusScoreThreshold</code> (optional)</td><td>number between 0 and 1 at which focus guidance score condition is considered to be met for passports. Defaults to 0.3.</td></tr>
|
|
90
|
+
<tr><td><code>idCaptureThresholds</code> (optional)</td><td>object containing overrides for thresholds outlined in the ID Capture Thresholds table below.</td></tr>
|
|
95
91
|
<tr><td><code>skipSuccessScreen</code> (optional)</td><td>boolean 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>
|
|
96
92
|
<tr><td><code>instructions</code> (optional)</td><td>React element or string to render on the instructions screen.</td></tr>
|
|
97
93
|
<tr><td><code>guideType</code> (optional)</td><td>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.</td></tr>
|
|
@@ -204,6 +200,20 @@ Render a fullscreen ID capture component that instructs the user to photograph b
|
|
|
204
200
|
<tr><td><code>success.submitText</code></td><td>Default: "Submit"</td></tr>
|
|
205
201
|
</table>
|
|
206
202
|
|
|
203
|
+
**ID Capture Thresholds**
|
|
204
|
+
|
|
205
|
+
<table>
|
|
206
|
+
<tr><td><code>detection.idCardFront</code></td><td>Default: 0.8</td></tr>
|
|
207
|
+
<tr><td><code>detection.idCardBack</code></td><td>Default: 0.8</td></tr>
|
|
208
|
+
<tr><td><code>detection.passport</code></td><td>Default: 0.5</td></tr>
|
|
209
|
+
<tr><td><code>detection.focus.idCardFront.desktop</code></td><td>Default: 0</td></tr>
|
|
210
|
+
<tr><td><code>detection.focus.idCardFront.mobile</code></td><td>Default: 0.3</td></tr>
|
|
211
|
+
<tr><td><code>detection.focus.idCardBack.desktop</code></td><td>Default: 0</td></tr>
|
|
212
|
+
<tr><td><code>detection.focus.idCardBack.mobile</code></td><td>Default: 0.3</td></tr>
|
|
213
|
+
<tr><td><code>detection.focus.passport.desktop</code></td><td>Default: 0</td></tr>
|
|
214
|
+
<tr><td><code>detection.focus.passport.mobile</code></td><td>Default: 0.3</td></tr>
|
|
215
|
+
</table>
|
|
216
|
+
|
|
207
217
|
**Example**
|
|
208
218
|
|
|
209
219
|
```js
|
|
@@ -369,18 +379,14 @@ Render a fullscreen capture component that performs IDValidation and FaceValidat
|
|
|
369
379
|
<tr><td><code>precapturedDocuments</code> (optional)</td><td>object to allow documents that have been previously captured to be submitted. Valid keys: idCardFront, idCardBack, passport.</td></tr>
|
|
370
380
|
<tr><td><code>idCaptureLoadingOverlayMode</code> (optional)</td><td>string indicating which ID capture loading overlay screen should be used. Supported values: default and legacy. Defaults to default.</td></tr>
|
|
371
381
|
<tr><td><code>idCaptureRequirement</code> (optional)</td><td>string to indicate which types of documents should be captured. Valid values: idCard, passport, idCardOrPassport, idCardAndPassport. Default is idCardOrPassport.</td></tr>
|
|
372
|
-
<tr><td><code>
|
|
373
|
-
<tr><td><code>idCardAutoCaptureScoreThreshold</code> (optional)</td><td>number between 0 and 1 at which document detection guidance score condition is considered to be met for ID cards. Defaults to 0.8.</td></tr>
|
|
374
|
-
<tr><td><code>passportAutoCaptureScoreThreshold</code> (optional)</td><td>number between 0 and 1 at which document detection guidance score condition is considered to be met for passports. Defaults to 0.75.</td></tr>
|
|
375
|
-
<tr><td><code>idCardFocusScoreThreshold</code> (optional)</td><td>number between 0 and 1 at which focus guidance score condition is considered to be met for ID cards. Defaults to 0.3.</td></tr>
|
|
376
|
-
<tr><td><code>passportFocusScoreThreshold</code> (optional)</td><td>number between 0 and 1 at which focus guidance score condition is considered to be met for passports. Defaults to 0.3.</td></tr>
|
|
377
|
-
<tr><td><code>faceLivenessLoadingOverlayMode</code> (optional)</td><td>string indicating which face liveness loading overlay screen should be used. Supported values: default and legacy. Defaults to default.</td></tr>
|
|
378
|
-
<tr><td><code>faceLivenessTimeoutDurationMs</code> (optional)</td><td>the duration of time in milliseconds that the user may try to pass the realness check. Defaults to 15000 (15 seconds).</td></tr>
|
|
379
|
-
<tr><td><code>skipSuccessScreen</code> (optional)</td><td>boolean 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>
|
|
382
|
+
<tr><td><code>idCaptureThresholds</code> (optional)</td><td>object containing overrides for thresholds outlined in the ID Capture Thresholds table above.</td></tr>
|
|
380
383
|
<tr><td><code>idCaptureInstructions</code> (optional)</td><td>React element or string to render on the instructions screen.</td></tr>
|
|
381
384
|
<tr><td><code>idCaptureGuideType</code> (optional)</td><td>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.</td></tr>
|
|
382
385
|
<tr><td><code>idCapturePortraitGuidesOnMobile</code> (optional)</td><td>boolean to indicate whether guide images should be rotated on mobile. Defaults to false.</td></tr>
|
|
383
386
|
<tr><td><code>idCaptureRotateLoadingOverlayImageWhenPortrait</code> (optional)</td><td>boolean to indicate whether loading overlay image should be rotated on when mobile guides are rotated. Defaults to true.</td></tr>
|
|
387
|
+
<tr><td><code>faceLivenessLoadingOverlayMode</code> (optional)</td><td>string indicating which face liveness loading overlay screen should be used. Supported values: default and legacy. Defaults to default.</td></tr>
|
|
388
|
+
<tr><td><code>faceLivenessTimeoutDurationMs</code> (optional)</td><td>the duration of time in milliseconds that the user may try to pass the realness check. Defaults to 15000 (15 seconds).</td></tr>
|
|
389
|
+
<tr><td><code>skipSuccessScreen</code> (optional)</td><td>boolean 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>
|
|
384
390
|
<tr><td><code>companyId</code> (optional)</td><td>company identifier to include with submission.</td></tr>
|
|
385
391
|
<tr><td><code>needImmediateResponse</code> (optional)</td><td>boolean to indicate if validation of the minimum resolution for an ID document image should be triggered. Defaults to true.</td></tr>
|
|
386
392
|
<tr><td><code>manualReviewRequired</code> (optional)</td><td>boolean flag to indicate whether responses should always be reviewed by a human. Defaults to false.</td></tr>
|
|
@@ -456,18 +462,14 @@ Render a fullscreen capture component that performs IDValidation and FaceValidat
|
|
|
456
462
|
<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>
|
|
457
463
|
<tr><td><code>idCaptureLoadingOverlayMode</code> (optional)</td><td>string indicating which ID capture loading overlay screen should be used. Supported values: default and legacy. Defaults to default.</td></tr>
|
|
458
464
|
<tr><td><code>idCaptureRequirement</code> (optional)</td><td>string to indicate which types of documents should be captured. Valid values: idCard, passport, idCardOrPassport, idCardAndPassport. Default is idCardOrPassport.</td></tr>
|
|
459
|
-
<tr><td><code>
|
|
460
|
-
<tr><td><code>idCardAutoCaptureScoreThreshold</code> (optional)</td><td>number between 0 and 1 at which document detection guidance score condition is considered to be met for ID cards. Defaults to 0.8.</td></tr>
|
|
461
|
-
<tr><td><code>passportAutoCaptureScoreThreshold</code> (optional)</td><td>number between 0 and 1 at which document detection guidance score condition is considered to be met for passports. Defaults to 0.75.</td></tr>
|
|
462
|
-
<tr><td><code>idCardFocusScoreThreshold</code> (optional)</td><td>number between 0 and 1 at which focus guidance score condition is considered to be met for ID cards. Defaults to 0.3.</td></tr>
|
|
463
|
-
<tr><td><code>passportFocusScoreThreshold</code> (optional)</td><td>number between 0 and 1 at which focus guidance score condition is considered to be met for passports. Defaults to 0.3.</td></tr>
|
|
464
|
-
<tr><td><code>faceLivenessLoadingOverlayMode</code> (optional)</td><td>string indicating which face liveness loading overlay screen should be used. Supported values: default and legacy. Defaults to default.</td></tr>
|
|
465
|
-
<tr><td><code>faceLivenessTimeoutDurationMs</code> (optional)</td><td>the duration of time in milliseconds that the user may try to pass the realness check. Defaults to 15000 (15 seconds).</td></tr>
|
|
466
|
-
<tr><td><code>skipSuccessScreen</code> (optional)</td><td>boolean 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>
|
|
465
|
+
<tr><td><code>idCaptureThresholds</code> (optional)</td><td>object containing overrides for thresholds outlined in the ID Capture Thresholds table above.</td></tr>
|
|
467
466
|
<tr><td><code>idCaptureInstructions</code> (optional)</td><td>React element or string to render on the instructions screen.</td></tr>
|
|
468
467
|
<tr><td><code>idCaptureGuideType</code> (optional)</td><td>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.</td></tr>
|
|
469
468
|
<tr><td><code>idCapturePortraitGuidesOnMobile</code> (optional)</td><td>boolean to indicate whether guide images should be rotated on mobile. Defaults to false.</td></tr>
|
|
470
469
|
<tr><td><code>idCaptureRotateLoadingOverlayImageWhenPortrait</code> (optional)</td><td>boolean to indicate whether loading overlay image should be rotated on when mobile guides are rotated. Defaults to true.</td></tr>
|
|
470
|
+
<tr><td><code>faceLivenessLoadingOverlayMode</code> (optional)</td><td>string indicating which face liveness loading overlay screen should be used. Supported values: default and legacy. Defaults to default.</td></tr>
|
|
471
|
+
<tr><td><code>faceLivenessTimeoutDurationMs</code> (optional)</td><td>the duration of time in milliseconds that the user may try to pass the realness check. Defaults to 15000 (15 seconds).</td></tr>
|
|
472
|
+
<tr><td><code>skipSuccessScreen</code> (optional)</td><td>boolean 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>
|
|
471
473
|
<tr><td><code>companyId</code> (optional)</td><td>company identifier to include with submission.</td></tr>
|
|
472
474
|
<tr><td><code>needImmediateResponse</code> (optional)</td><td>boolean to indicate if validation of the minimum resolution for an ID document image should be triggered. Defaults to true.</td></tr>
|
|
473
475
|
<tr><td><code>manualReviewRequired</code> (optional)</td><td>boolean flag to indicate whether responses should always be reviewed by a human. Defaults to false.</td></tr>
|
|
@@ -783,10 +785,7 @@ Render a fullscreen capture component that performs IDValidation and FaceValidat
|
|
|
783
785
|
<tr><td><code>webhooksFireOnReview</code> (optional)</td><td>boolean flag to indicate whether customer-configured webhooks should be invoked upon ID being marked for manual review. Defaults to false.</td></tr>
|
|
784
786
|
<tr><td><code>idCaptureProps</code> (optional)</td><td>object containing any overrides for IDValidation.</td></tr>
|
|
785
787
|
<tr><td><code>faceLivenessProps</code> (optional)</td><td>object containing any overrides for IDValidation.</td></tr>
|
|
786
|
-
<tr><td><code>
|
|
787
|
-
<tr><td><code>idCardFrontFocusThreshold</code> (optional)</td><td>number between 0 and 1 at which focus guidance score condition is considered to be met for the ID card front during video capture. Defaults to 0.15.</td></tr>
|
|
788
|
-
<tr><td><code>goodIdCardFrontFramesThreshold</code> (optional)</td><td>number of good frames of the ID card front that must be captured before moving on during video capture. Defaults to 3.</td></tr>
|
|
789
|
-
<tr><td><code>showIdCardBackDurationMs</code> (optional)</td><td>the duration of time in milliseconds that the user is instructed to show the back of their ID card during video capture. Defaults to 5000ms.</td></tr>
|
|
788
|
+
<tr><td><code>videoIdCaptureThresholds</code> (optional)</td><td>object containing overrides for thresholds outlined in the Video ID Capture Thresholds table below.</td></tr>
|
|
790
789
|
<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>
|
|
791
790
|
<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 15000 (15 seconds).</td></tr>
|
|
792
791
|
<tr><td><code>readTextMinReadingMs</code> (optional)</td><td>the duration of time in milliseconds that the user is forced to spend reading the `readTextPrompt` before they can click the Done button. Defaults to 10000 (10 seconds).</td></tr>
|
|
@@ -809,7 +808,7 @@ Render a fullscreen capture component that performs IDValidation and FaceValidat
|
|
|
809
808
|
<tr><td><code>debugMode</code> (optional)</td><td>boolean flag to enable on-screen prediction information output. Defaults to false.</td></tr>
|
|
810
809
|
</table>
|
|
811
810
|
|
|
812
|
-
**Video ID
|
|
811
|
+
**Video ID Capture Assets**
|
|
813
812
|
|
|
814
813
|
<table>
|
|
815
814
|
<tr><td><code>idCapture</code> (optional)</td><td>object containing any asset overrides, for available options consult the ID Capture Assets table above.</td></tr>
|
|
@@ -818,7 +817,7 @@ Render a fullscreen capture component that performs IDValidation and FaceValidat
|
|
|
818
817
|
<tr><td><code>videoIdCapture.guides.backImageUrl</code></td><td>Default: https://websdk-cdn-dev.idmission.com/assets/Shieldout-IDCard-Back-SVG-Landscape-2.svg</td></tr>
|
|
819
818
|
</table>
|
|
820
819
|
|
|
821
|
-
**Video ID
|
|
820
|
+
**Video ID Capture Colors**
|
|
822
821
|
|
|
823
822
|
<table>
|
|
824
823
|
<tr><td><code>idCapture</code> (optional)</td><td>object containing any color overrides, for available options consult the ID Capture Colors table above.</td></tr>
|
|
@@ -833,7 +832,7 @@ Render a fullscreen capture component that performs IDValidation and FaceValidat
|
|
|
833
832
|
<tr><td><code>success.retryBtn.textColor</code></td><td>Default: white</td></tr>
|
|
834
833
|
</table>
|
|
835
834
|
|
|
836
|
-
**Video ID
|
|
835
|
+
**Video ID Capture Verbiage**
|
|
837
836
|
|
|
838
837
|
<table>
|
|
839
838
|
<tr><td><code>idCapture</code> (optional)</td><td>object containing any verbiage overrides, for available options consult the ID Capture Verbiage table above.</td></tr>
|
|
@@ -848,6 +847,15 @@ Render a fullscreen capture component that performs IDValidation and FaceValidat
|
|
|
848
847
|
<tr><td><code>success.doneBtnText</code></td><td>Default: "Done"</td></tr>
|
|
849
848
|
</table>
|
|
850
849
|
|
|
850
|
+
**Video ID Capture Thresholds**
|
|
851
|
+
|
|
852
|
+
Contains all the thresholds defined in the ID Capture Thresholds table above, plus:
|
|
853
|
+
|
|
854
|
+
<table>
|
|
855
|
+
<tr><td><code>goodFrames.idCardFront</code></td><td>Default: 1</td></tr>
|
|
856
|
+
<tr><td><code>goodFrames.idCardBack</code></td><td>Default: 1</td></tr>
|
|
857
|
+
</table>
|
|
858
|
+
|
|
851
859
|
**Example**
|
|
852
860
|
|
|
853
861
|
```js
|
|
@@ -13,6 +13,7 @@ import { IdCaptureRequirementOption } from '../id_capture/IdCaptureRequirementOp
|
|
|
13
13
|
import { IdCaptureGuideType } from '../id_capture/IdCaptureGuides';
|
|
14
14
|
import { SelfieCaptureLoadingOverlayMode } from '../selfie_capture/SelfieCaptureLoadingOverlay';
|
|
15
15
|
import { IdCaptureLoadingOverlayMode } from '../id_capture/IdCaptureLoadingOverlay';
|
|
16
|
+
import { IdCaptureThresholds } from '../id_capture/IdCaptureModelsProvider';
|
|
16
17
|
export type CustomerEnrollmentAssets = {
|
|
17
18
|
idCapture?: IdCaptureWizardAssets;
|
|
18
19
|
faceLiveness?: FaceLivenessAssets;
|
|
@@ -91,18 +92,8 @@ export interface CustomerEnrollmentProps extends PropsWithChildren {
|
|
|
91
92
|
idCaptureLoadingOverlayMode?: IdCaptureLoadingOverlayMode;
|
|
92
93
|
/** String to indicate which types of ID documents should be captured. Valid values: `idCard`, `passport`, `idCardOrPassport`, `idCardAndPassport`. Default is `idCardOrPassport`. */
|
|
93
94
|
idCaptureRequirement?: IdCaptureRequirementOption;
|
|
94
|
-
/**
|
|
95
|
-
|
|
96
|
-
/** Number between 0 and 1 at which document detection guidance score condition is considered to be met for ID cards. Defaults to 0.8. */
|
|
97
|
-
idCardAutoCaptureScoreThreshold?: number;
|
|
98
|
-
/** Number between 0 and 1 at which document detection guidance score condition is considered to be met for passports. Defaults to 0.75. */
|
|
99
|
-
passportAutoCaptureScoreThreshold?: number;
|
|
100
|
-
/** Number between 0 and 1 at which document detection guidance score condition is considered to be met for Machine Readable Zones. Defaults to 0.5. */
|
|
101
|
-
mrzDetectionScoreThreshold?: number;
|
|
102
|
-
/** Number between 0 and 1 at which focus guidance score condition is considered to be met for ID cards. Defaults to 0.3. */
|
|
103
|
-
idCardFocusScoreThreshold?: number;
|
|
104
|
-
/** Number between 0 and 1 at which focus guidance score condition is considered to be met for passports. Defaults to 0.3. */
|
|
105
|
-
passportFocusScoreThreshold?: number;
|
|
95
|
+
/** Object containing threshold overrides for ID capture. */
|
|
96
|
+
idCaptureThresholds?: IdCaptureThresholds;
|
|
106
97
|
/** String indicating which face liveness loading overlay screen should be used. Supported values: 'default' and 'legacy'. Defaults to 'default'. */
|
|
107
98
|
faceLivenessLoadingOverlayMode?: SelfieCaptureLoadingOverlayMode;
|
|
108
99
|
/** The duration of time in milliseconds that the user may try to pass the realness check. Defaults to `15000` (15 seconds). */
|
|
@@ -14,6 +14,7 @@ import { CapturedDocument, CapturedDocuments } from '../id_capture/CapturedDocum
|
|
|
14
14
|
import { IdCaptureGuideType } from '../id_capture/IdCaptureGuides';
|
|
15
15
|
import { SelfieCaptureLoadingOverlayMode } from '../selfie_capture/SelfieCaptureLoadingOverlay';
|
|
16
16
|
import { IdCaptureLoadingOverlayMode } from '../id_capture/IdCaptureLoadingOverlay';
|
|
17
|
+
import { IdCaptureThresholds } from '../id_capture/IdCaptureModelsProvider';
|
|
17
18
|
export type IdAndFaceValidationAssets = {
|
|
18
19
|
idCapture?: IdCaptureWizardAssets;
|
|
19
20
|
faceLiveness?: FaceLivenessAssets;
|
|
@@ -88,18 +89,8 @@ export interface IdAndFaceValidationProps extends PropsWithChildren {
|
|
|
88
89
|
idCaptureLoadingOverlayMode?: IdCaptureLoadingOverlayMode;
|
|
89
90
|
/** String to indicate which types of ID documents should be captured. Valid values: `idCard`, `passport`, `idCardOrPassport`, `idCardAndPassport`. Default is `idCardOrPassport`. */
|
|
90
91
|
idCaptureRequirement?: IdCaptureRequirementOption;
|
|
91
|
-
/**
|
|
92
|
-
|
|
93
|
-
/** Number between 0 and 1 at which document detection guidance score condition is considered to be met for ID cards. Defaults to 0.8. */
|
|
94
|
-
idCardAutoCaptureScoreThreshold?: number;
|
|
95
|
-
/** Number between 0 and 1 at which document detection guidance score condition is considered to be met for passports. Defaults to 0.75. */
|
|
96
|
-
passportAutoCaptureScoreThreshold?: number;
|
|
97
|
-
/** Number between 0 and 1 at which document detection guidance score condition is considered to be met for Machine Readable Zones. Defaults to 0.5. */
|
|
98
|
-
mrzDetectionScoreThreshold?: number;
|
|
99
|
-
/** Number between 0 and 1 at which focus guidance score condition is considered to be met for ID cards. Defaults to 0.3. */
|
|
100
|
-
idCardFocusScoreThreshold?: number;
|
|
101
|
-
/** Number between 0 and 1 at which focus guidance score condition is considered to be met for passports. Defaults to 0.3. */
|
|
102
|
-
passportFocusScoreThreshold?: number;
|
|
92
|
+
/** Object containing threshold overrides for ID capture. */
|
|
93
|
+
idCaptureThresholds?: IdCaptureThresholds;
|
|
103
94
|
/** String indicating which face liveness loading overlay screen should be used. Supported values: 'default' and 'legacy'. Defaults to 'default'. */
|
|
104
95
|
faceLivenessLoadingOverlayMode?: SelfieCaptureLoadingOverlayMode;
|
|
105
96
|
/** The duration of time in milliseconds that the user may try to pass the realness check. Defaults to `15000` (15 seconds). */
|
|
@@ -12,6 +12,7 @@ import { IdCaptureRequirementOption } from '../id_capture/IdCaptureRequirementOp
|
|
|
12
12
|
import { CapturedDocuments } from '../id_capture/CapturedDocuments';
|
|
13
13
|
import { IdCaptureGuideType } from '../id_capture/IdCaptureGuides';
|
|
14
14
|
import { IdCaptureLoadingOverlayMode } from '../id_capture/IdCaptureLoadingOverlay';
|
|
15
|
+
import { IdCaptureThresholds } from '../id_capture/IdCaptureModelsProvider';
|
|
15
16
|
export type IdValidationAssets = IdCaptureWizardAssets;
|
|
16
17
|
export type IdValidationClassNames = IdCaptureWizardClassNames & {
|
|
17
18
|
additionalDocumentCapture?: AdditionalDocumentCaptureWizardClassNames;
|
|
@@ -77,18 +78,8 @@ export interface IdValidationProps extends PropsWithChildren {
|
|
|
77
78
|
idCaptureRequirement?: IdCaptureRequirementOption;
|
|
78
79
|
/** Boolean to indicate whether the success screen should be shown in after the ID card front is captured, rather than the flip animation. Defaults to `false`. */
|
|
79
80
|
separateIdCardCaptureSequence?: boolean;
|
|
80
|
-
/**
|
|
81
|
-
|
|
82
|
-
/** Number between 0 and 1 at which document detection guidance score condition is considered to be met for ID cards. Defaults to 0.8. */
|
|
83
|
-
idCardAutoCaptureScoreThreshold?: number;
|
|
84
|
-
/** Number between 0 and 1 at which document detection guidance score condition is considered to be met for passports. Defaults to 0.75. */
|
|
85
|
-
passportAutoCaptureScoreThreshold?: number;
|
|
86
|
-
/** Number between 0 and 1 at which document detection guidance score condition is considered to be met for Machine Readable Zones. Defaults to 0.5. */
|
|
87
|
-
mrzDetectionScoreThreshold?: number;
|
|
88
|
-
/** Number between 0 and 1 at which focus guidance score condition is considered to be met for ID cards. Defaults to 0.3. */
|
|
89
|
-
idCardFocusScoreThreshold?: number;
|
|
90
|
-
/** Number between 0 and 1 at which focus guidance score condition is considered to be met for passports. Defaults to 0.3. */
|
|
91
|
-
passportFocusScoreThreshold?: number;
|
|
81
|
+
/** Object containing threshold overrides for ID capture. */
|
|
82
|
+
idCaptureThresholds?: IdCaptureThresholds;
|
|
92
83
|
/** 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`. */
|
|
93
84
|
skipSuccessScreen?: boolean | (() => Promise<boolean>);
|
|
94
85
|
/** React element or string to render on the instructions screen. */
|
|
@@ -13,6 +13,7 @@ import { VideoSignatureClassNames, VideoSignatureColors, VideoSignatureVerbiage
|
|
|
13
13
|
import { IdCaptureGuideType } from '../id_capture/IdCaptureGuides';
|
|
14
14
|
import { SelfieCaptureLoadingOverlayMode } from '../selfie_capture/SelfieCaptureLoadingOverlay';
|
|
15
15
|
import { IdCaptureLoadingOverlayMode } from '../id_capture/IdCaptureLoadingOverlay';
|
|
16
|
+
import { VideoIdCaptureThresholds } from '../video_id/IdVideoCapture';
|
|
16
17
|
export type VideoIdValidationAssets = VideoIdWizardAssets;
|
|
17
18
|
export type VideoIdValidationClassNames = VideoIdWizardClassNames & {
|
|
18
19
|
additionalDocumentCapture?: AdditionalDocumentCaptureWizardClassNames;
|
|
@@ -108,18 +109,8 @@ export interface VideoIdValidationProps extends PropsWithChildren {
|
|
|
108
109
|
captureAdditionalDocuments?: AdditionalDocument[];
|
|
109
110
|
/** Boolean indicating whether ID guided capture experience should be utilized for automatic capture. Setting to false enables the manual capture button. Defaults to true. */
|
|
110
111
|
idCaptureModelsEnabled?: boolean;
|
|
111
|
-
/**
|
|
112
|
-
|
|
113
|
-
/** Number between 0 and 1 at which focus guidance score condition is considered to be met for the ID card front during video capture. */
|
|
114
|
-
idCardFrontFocusThreshold?: number;
|
|
115
|
-
/** Number of good frames of the ID card front that must be captured before moving on during video capture. */
|
|
116
|
-
goodIdCardFrontFramesThreshold?: number;
|
|
117
|
-
/** Number between 0 and 1 at which document detection guidance score condition is considered to be met for the ID card back during video capture. */
|
|
118
|
-
idCardBackDetectionThreshold?: number;
|
|
119
|
-
/** Number between 0 and 1 at which focus guidance score condition is considered to be met for the ID card back during video capture. */
|
|
120
|
-
idCardBackFocusThreshold?: number;
|
|
121
|
-
/** Number of good frames of the ID card back that must be captured before moving on during video capture. */
|
|
122
|
-
goodIdCardBackFramesThreshold?: number;
|
|
112
|
+
/** Object containing threshold overrides for ID capture. */
|
|
113
|
+
videoIdCaptureThresholds?: VideoIdCaptureThresholds;
|
|
123
114
|
/** An optional text prompt to display on screen for the user to read during video capture after the ID card has been shown. */
|
|
124
115
|
readTextPrompt?: CustomerSuppliedVerbiage;
|
|
125
116
|
/** The duration of time in milliseconds that the user is allowed to spend reading the `readTextPrompt`. Defaults to 15000 (15 seconds). */
|
|
@@ -7,6 +7,8 @@ export type CapturedDocument = {
|
|
|
7
7
|
height: number;
|
|
8
8
|
boundingBox?: DetectedObjectBox;
|
|
9
9
|
documentType: CapturedDocumentType;
|
|
10
|
+
detectionScore?: number;
|
|
11
|
+
focusScore?: number;
|
|
10
12
|
};
|
|
11
13
|
export type CapturedDocuments = {
|
|
12
14
|
[k in CapturedDocumentType]?: CapturedDocument;
|
|
@@ -17,6 +17,7 @@ export type FocusModelProviderProps = {
|
|
|
17
17
|
focusModelPath?: string;
|
|
18
18
|
focusModelLoadTimeoutMs?: number;
|
|
19
19
|
onFocusModelError?: (error: Error) => void;
|
|
20
|
+
showCanvases?: boolean;
|
|
20
21
|
};
|
|
21
|
-
export declare function FocusModelProvider({ children, focusModelPath, focusModelLoadTimeoutMs, onFocusModelError, }: FocusModelProviderProps): React.JSX.Element;
|
|
22
|
+
export declare function FocusModelProvider({ children, focusModelPath, focusModelLoadTimeoutMs, onFocusModelError, showCanvases, }: FocusModelProviderProps): React.JSX.Element;
|
|
22
23
|
export {};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { PDF417DetectionResult } from '../../lib/barcode/Native';
|
|
3
2
|
import { CaptureAttemptMetadata } from '../../contexts/SubmissionContext';
|
|
4
|
-
import { IdCapturePrediction } from './IdCaptureModelsProvider';
|
|
3
|
+
import { IdCapturePrediction, IdCaptureThresholds } from './IdCaptureModelsProvider';
|
|
5
4
|
import { IdCaptureImagePreviewClassNames } from '../common/SelfieProgressPreview';
|
|
6
5
|
import { CustomerSuppliedVerbiage } from '../../lib/locales';
|
|
7
6
|
import { CapturedDocumentType } from './CapturedDocuments';
|
|
@@ -32,6 +31,7 @@ export type IdCaptureVerbiage = {
|
|
|
32
31
|
capturingText?: CustomerSuppliedVerbiage;
|
|
33
32
|
captureFailedText?: CustomerSuppliedVerbiage;
|
|
34
33
|
guidanceSatisfiedText?: CustomerSuppliedVerbiage;
|
|
34
|
+
guidancePleaseFlipText?: CustomerSuppliedVerbiage;
|
|
35
35
|
guidanceTooBlurryText?: CustomerSuppliedVerbiage;
|
|
36
36
|
guidanceNotCenteredText?: CustomerSuppliedVerbiage;
|
|
37
37
|
guidanceTooCloseText?: CustomerSuppliedVerbiage;
|
|
@@ -39,20 +39,10 @@ export type IdCaptureVerbiage = {
|
|
|
39
39
|
};
|
|
40
40
|
export type IdCaptureProps = {
|
|
41
41
|
requiredDocumentType?: CapturedDocumentType;
|
|
42
|
-
|
|
43
|
-
idCardDetectionThreshold?: number;
|
|
44
|
-
passportDetectionThreshold?: number;
|
|
45
|
-
autoCaptureBarcodeRequired?: boolean | 'mobile';
|
|
46
|
-
mrzDetectionScoreThreshold?: number;
|
|
47
|
-
pdf417DetectionThreshold?: number;
|
|
48
|
-
barcodeScanningEnabled?: boolean;
|
|
49
|
-
maxBarcodeScanAttempts?: number;
|
|
50
|
-
idCardFocusScoreThreshold?: number;
|
|
51
|
-
passportFocusScoreThreshold?: number;
|
|
42
|
+
thresholds?: IdCaptureThresholds;
|
|
52
43
|
guidanceMessage?: string;
|
|
53
44
|
guidanceSatisfied?: boolean;
|
|
54
45
|
onPrediction?: (prediction: IdCapturePrediction) => void;
|
|
55
|
-
onBarcodeScanned?: (result: PDF417DetectionResult) => void;
|
|
56
46
|
onCapture?: (frame: string, width: number, height: number, documentType: CapturedDocumentType, metadata: CaptureAttemptMetadata) => void;
|
|
57
47
|
assets?: IdCaptureAssets;
|
|
58
48
|
classNames?: IdCaptureClassNames;
|
|
@@ -60,4 +50,4 @@ export type IdCaptureProps = {
|
|
|
60
50
|
verbiage?: IdCaptureVerbiage;
|
|
61
51
|
debugMode?: boolean;
|
|
62
52
|
};
|
|
63
|
-
export declare const IdCapture: ({ requiredDocumentType,
|
|
53
|
+
export declare const IdCapture: ({ requiredDocumentType, thresholds, guidanceMessage, guidanceSatisfied, onCapture, assets, classNames, colors, verbiage: rawVerbiage, debugMode, }: IdCaptureProps) => React.ReactElement;
|
|
@@ -1,35 +1,18 @@
|
|
|
1
1
|
import React, { ReactElement, ReactNode } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { DetectedObjectBox, DocumentDetectionPrediction, DocumentDetectionThresholds, DocumentType } from '../../lib/models/DocumentDetection';
|
|
3
3
|
import { DocumentDetectionModelProviderProps } from './DocumentDetectionModelProvider';
|
|
4
4
|
import { FocusModelProviderProps } from './FocusModelProvider';
|
|
5
5
|
import { FocusThresholds } from '../../lib/models/Focus';
|
|
6
|
-
export type IdCapturePrediction = {
|
|
7
|
-
detectedObjects: DetectedObject[];
|
|
8
|
-
detectionTime: number;
|
|
9
|
-
detectionScore: number;
|
|
10
|
-
detectionThresholdMet: boolean;
|
|
11
|
-
detectedDocumentType: DocumentType;
|
|
12
|
-
passportDetectionScore: number;
|
|
13
|
-
passportDetectionThresholdMet: boolean;
|
|
14
|
-
mrzDetectionScore: number;
|
|
15
|
-
mrzDetectionThresholdMet: boolean;
|
|
16
|
-
pdf417DetectionScore: number;
|
|
17
|
-
pdf417DetectionThresholdMet: boolean;
|
|
18
|
-
bestDocument: DetectedObject | undefined;
|
|
19
|
-
bestMrz: DetectedObject | undefined;
|
|
20
|
-
bestPdf417: DetectedObject | undefined;
|
|
21
|
-
documentInBounds: boolean;
|
|
22
|
-
documentTooClose: boolean;
|
|
6
|
+
export type IdCapturePrediction = DocumentDetectionPrediction & {
|
|
23
7
|
focusScore: number;
|
|
24
8
|
focusThresholdMet: boolean;
|
|
25
9
|
focusPredictionTime: number;
|
|
26
|
-
frameWidth: number;
|
|
27
|
-
frameHeight: number;
|
|
28
|
-
allZero: boolean;
|
|
29
10
|
};
|
|
30
|
-
export type IdCaptureThresholds =
|
|
11
|
+
export type IdCaptureThresholds = {
|
|
12
|
+
detection?: DocumentDetectionThresholds;
|
|
31
13
|
focus?: FocusThresholds;
|
|
32
14
|
};
|
|
15
|
+
export declare const defaultIdCaptureThresholds: IdCaptureThresholds;
|
|
33
16
|
export type BestFrameDetails = {
|
|
34
17
|
boundingBox?: DetectedObjectBox;
|
|
35
18
|
documentType: DocumentType;
|
|
@@ -53,6 +36,8 @@ export type IdCaptureModelsState = {
|
|
|
53
36
|
bestFrameDetails: BestFrameDetails | null;
|
|
54
37
|
getBestFrame: () => BestFrame | null;
|
|
55
38
|
resetBestFrame: () => void;
|
|
39
|
+
requiredDocumentType: DocumentType;
|
|
40
|
+
setRequiredDocumentType: (value: DocumentType) => void;
|
|
56
41
|
};
|
|
57
42
|
export declare const IdCaptureModelsContext: React.Context<IdCaptureModelsState>;
|
|
58
43
|
export type IdCaptureModelsProviderProps = {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React, { Dispatch, ReactNode } from 'react';
|
|
2
2
|
import { CapturedDocument, CapturedDocuments, CapturedDocumentType } from './CapturedDocuments';
|
|
3
3
|
import { IdCapturePrediction } from './IdCaptureModelsProvider';
|
|
4
|
-
import { PDF417DetectionResult } from '../../lib/barcode/Native';
|
|
5
4
|
import { DetectedObject, DocumentType } from '../../lib/models/DocumentDetection';
|
|
6
5
|
import { IdCaptureRequirementOption } from './IdCaptureRequirementOption';
|
|
7
6
|
export type CaptureState = 'capturing' | 'complete' | 'requestingFlip';
|
|
@@ -21,29 +20,20 @@ export type IdCaptureState = {
|
|
|
21
20
|
videoHeight: number;
|
|
22
21
|
detectedObjects: DetectedObject[];
|
|
23
22
|
bestDocument: DetectedObject | undefined;
|
|
24
|
-
bestMrz: DetectedObject | undefined;
|
|
25
|
-
bestPdf417: DetectedObject | undefined;
|
|
26
|
-
documentType: DocumentType;
|
|
27
23
|
requiredDocumentType?: CapturedDocumentType;
|
|
24
|
+
detectedDocumentType: DocumentType;
|
|
25
|
+
detectionThresholdMet: boolean;
|
|
28
26
|
documentInBounds: boolean;
|
|
29
27
|
documentTooClose: boolean;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
28
|
+
flipRequired: boolean;
|
|
29
|
+
idCardFrontDetectionScore: number;
|
|
30
|
+
idCardFrontDetectionThresholdMet: boolean;
|
|
31
|
+
idCardBackDetectionScore: number;
|
|
32
|
+
idCardBackDetectionThresholdMet: boolean;
|
|
33
|
+
passportDetectionScore: number;
|
|
34
|
+
passportDetectionThresholdMet: boolean;
|
|
36
35
|
focusScore: number;
|
|
37
36
|
focusThresholdMet: boolean;
|
|
38
|
-
pdf417DetectionScore: number;
|
|
39
|
-
pdf417DetectionThresholdMet: boolean;
|
|
40
|
-
barcodeScanningEnabled: boolean;
|
|
41
|
-
barcodeResult: PDF417DetectionResult | null;
|
|
42
|
-
waitingForBarcodeScan: boolean;
|
|
43
|
-
shouldScanBarcode: boolean;
|
|
44
|
-
autoCaptureBarcodeRequired: boolean | 'mobile';
|
|
45
|
-
barcodeScanFailedAttempts: number;
|
|
46
|
-
maxBarcodeScanAttempts: number;
|
|
47
37
|
isGoodFrame: boolean;
|
|
48
38
|
goodFramesCount: number;
|
|
49
39
|
goodFramesThreshold: number;
|
|
@@ -57,8 +47,6 @@ export type IdCaptureState = {
|
|
|
57
47
|
capturedDocuments: CapturedDocuments;
|
|
58
48
|
captureRequirement: IdCaptureRequirementOption;
|
|
59
49
|
requestedDocumentType: CapturedDocumentType;
|
|
60
|
-
detectedDocumentType: DocumentType;
|
|
61
|
-
differentDocumentTypeDetections: number;
|
|
62
50
|
operationStartedAt: Date | null;
|
|
63
51
|
captureStartedAt: Date | null;
|
|
64
52
|
};
|
|
@@ -68,13 +56,6 @@ export type IdCaptureAction = {
|
|
|
68
56
|
captureRequirement: IdCaptureRequirementOption;
|
|
69
57
|
precapturedDocuments?: CapturedDocuments;
|
|
70
58
|
};
|
|
71
|
-
} | {
|
|
72
|
-
type: 'configureCapture';
|
|
73
|
-
payload: {
|
|
74
|
-
autoCaptureBarcodeRequired: boolean | 'mobile';
|
|
75
|
-
barcodeScanningEnabled: boolean;
|
|
76
|
-
maxBarcodeScanAttempts: number;
|
|
77
|
-
};
|
|
78
59
|
} | {
|
|
79
60
|
type: 'setRequiredDocumentType';
|
|
80
61
|
payload: CapturedDocumentType;
|
|
@@ -121,16 +102,6 @@ export type IdCaptureAction = {
|
|
|
121
102
|
payload: {
|
|
122
103
|
prediction: IdCapturePrediction;
|
|
123
104
|
};
|
|
124
|
-
} | {
|
|
125
|
-
type: 'barcodeScanned';
|
|
126
|
-
payload: {
|
|
127
|
-
result: PDF417DetectionResult;
|
|
128
|
-
};
|
|
129
|
-
} | {
|
|
130
|
-
type: 'barcodeScanFailed';
|
|
131
|
-
} | {
|
|
132
|
-
type: 'predictionMade';
|
|
133
|
-
payload: IdCapturePrediction;
|
|
134
105
|
} | {
|
|
135
106
|
type: 'documentCaptured';
|
|
136
107
|
payload: CapturedDocument;
|
|
@@ -143,6 +114,8 @@ export type IdCaptureAction = {
|
|
|
143
114
|
type: 'flipRequestCompleted';
|
|
144
115
|
} | {
|
|
145
116
|
type: 'resetWizard';
|
|
117
|
+
} | {
|
|
118
|
+
type: 'resetBestFrame';
|
|
146
119
|
};
|
|
147
120
|
export type IdCaptureDispatch = Dispatch<IdCaptureAction>;
|
|
148
121
|
export declare const IdCaptureStateContext: React.Context<IdCaptureState>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React, { ReactElement } from 'react';
|
|
2
2
|
import { CapturedDocuments } from './CapturedDocuments';
|
|
3
|
-
import { PDF417DetectionResult } from '../../lib/barcode/Native';
|
|
4
3
|
import { LoaderButtonColors } from '../common/LoaderButton';
|
|
5
4
|
import { CustomerSuppliedVerbiage } from '../../lib/locales';
|
|
6
5
|
export declare const OverlayInstruction: import("styled-components").IStyledComponent<"web", {
|
|
@@ -306,11 +305,11 @@ export type IdCaptureSuccessColors = {
|
|
|
306
305
|
};
|
|
307
306
|
export type IdCaptureSuccessProps = {
|
|
308
307
|
capturedDocuments: CapturedDocuments;
|
|
309
|
-
barcodeResult?: PDF417DetectionResult | null;
|
|
310
308
|
onSubmitClick?: () => void;
|
|
311
309
|
onRetryClick?: () => void;
|
|
312
310
|
classNames?: IdCaptureSuccessClassNames;
|
|
313
311
|
colors?: IdCaptureSuccessColors;
|
|
314
312
|
verbiage?: IdCaptureSuccessVerbiage;
|
|
313
|
+
debugMode?: boolean;
|
|
315
314
|
};
|
|
316
|
-
export declare const IdCaptureSuccess: ({ capturedDocuments, onSubmitClick, onRetryClick, classNames, colors, verbiage: rawVerbiage, }: IdCaptureSuccessProps) => ReactElement;
|
|
315
|
+
export declare const IdCaptureSuccess: ({ capturedDocuments, onSubmitClick, onRetryClick, classNames, colors, verbiage: rawVerbiage, debugMode, }: IdCaptureSuccessProps) => ReactElement;
|
|
@@ -4,6 +4,7 @@ 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 { IdCaptureThresholds } from './IdCaptureModelsProvider';
|
|
7
8
|
import { IdCaptureRequirementOption } from './IdCaptureRequirementOption';
|
|
8
9
|
import { IdCaptureGuideType } from './IdCaptureGuides';
|
|
9
10
|
import { IdCaptureFallbackClassNames, IdCaptureFallbackColors, IdCaptureFallbackVerbiage } from '../fallback_flows/IdCapture';
|
|
@@ -54,14 +55,7 @@ export type IdCaptureWizardProps = {
|
|
|
54
55
|
precapturedDocuments?: CapturedDocuments;
|
|
55
56
|
captureRequirement?: IdCaptureRequirementOption;
|
|
56
57
|
separateIdCardCaptureSequence?: boolean;
|
|
57
|
-
|
|
58
|
-
autoCaptureBarcodeRequired?: 'mobile' | boolean;
|
|
59
|
-
barcodeScanningEnabled?: boolean;
|
|
60
|
-
idCardAutoCaptureScoreThreshold?: number;
|
|
61
|
-
passportAutoCaptureScoreThreshold?: number;
|
|
62
|
-
mrzDetectionScoreThreshold?: number;
|
|
63
|
-
idCardFocusScoreThreshold?: number;
|
|
64
|
-
passportFocusScoreThreshold?: number;
|
|
58
|
+
thresholds?: IdCaptureThresholds;
|
|
65
59
|
skipSuccessScreen?: boolean | (() => Promise<boolean>);
|
|
66
60
|
instructions?: ReactNode;
|
|
67
61
|
releaseCameraAccessOnExit?: boolean;
|
|
@@ -75,4 +69,4 @@ export type IdCaptureWizardProps = {
|
|
|
75
69
|
verbiage?: IdCaptureWizardVerbiage;
|
|
76
70
|
debugMode?: boolean;
|
|
77
71
|
};
|
|
78
|
-
export declare const IdCaptureWizard: ({ onSuccess, onExitCapture, onUserCancel, loadingOverlayMode, precapturedDocuments, captureRequirement, separateIdCardCaptureSequence,
|
|
72
|
+
export declare const IdCaptureWizard: ({ onSuccess, onExitCapture, onUserCancel, loadingOverlayMode, precapturedDocuments, captureRequirement, separateIdCardCaptureSequence, thresholds, skipSuccessScreen, instructions, releaseCameraAccessOnExit, guideType, portraitGuidesOnMobile, rotateLoadingOverlayImageWhenPortrait, silentFallback, assets, classNames, colors, verbiage, debugMode, }: IdCaptureWizardProps) => ReactElement;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
|
+
import { IdCaptureThresholds } from '../id_capture/IdCaptureModelsProvider';
|
|
2
3
|
import { IdVideoCaptureGuidesAssets, IdVideoCaptureGuidesClassNames, IdVideoCaptureGuidesVerbiage } from './IdVideoCaptureGuides';
|
|
3
4
|
import { CustomerSuppliedVerbiage } from '../../lib/locales';
|
|
4
5
|
import { LoaderButtonColors } from '../common/LoaderButton';
|
|
@@ -31,6 +32,15 @@ export type IdVideoCaptureVerbiage = {
|
|
|
31
32
|
searchingForIdCardText?: CustomerSuppliedVerbiage;
|
|
32
33
|
captureBtnText?: CustomerSuppliedVerbiage;
|
|
33
34
|
};
|
|
35
|
+
export type VideoIdCaptureThresholds = IdCaptureThresholds & {
|
|
36
|
+
goodFrames: {
|
|
37
|
+
/** Number of good frames of the ID card front that must be captured before moving on during video capture. */
|
|
38
|
+
idCardFront: number;
|
|
39
|
+
/** Number of good frames of the ID card back that must be captured before moving on during video capture. */
|
|
40
|
+
idCardBack: number;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
export declare const defaultVideoIdCaptureThresholds: VideoIdCaptureThresholds;
|
|
34
44
|
export type IdVideoCaptureProps = {
|
|
35
45
|
onComplete?: (videoUrl: string, audioUrl: string | null) => void;
|
|
36
46
|
onIdFrontImageCaptured?: (imageUrl: string) => void;
|
|
@@ -38,13 +48,8 @@ export type IdVideoCaptureProps = {
|
|
|
38
48
|
onFaceNotDetected?: () => void;
|
|
39
49
|
onRecordingFailed?: () => void;
|
|
40
50
|
idCaptureModelsEnabled?: boolean;
|
|
51
|
+
videoIdCaptureThresholds?: VideoIdCaptureThresholds;
|
|
41
52
|
idCardFrontDelay?: number;
|
|
42
|
-
idCardFrontDetectionThreshold?: number;
|
|
43
|
-
idCardBackDetectionThreshold?: number;
|
|
44
|
-
idCardFrontFocusThreshold?: number;
|
|
45
|
-
idCardBackFocusThreshold?: number;
|
|
46
|
-
goodIdCardFrontFramesThreshold?: number;
|
|
47
|
-
goodIdCardBackFramesThreshold?: number;
|
|
48
53
|
skipShowIdCardBack?: boolean | (() => Promise<boolean>);
|
|
49
54
|
captureCountdownSeconds?: number;
|
|
50
55
|
readTextPrompt?: CustomerSuppliedVerbiage;
|
|
@@ -59,4 +64,4 @@ export type IdVideoCaptureProps = {
|
|
|
59
64
|
verbiage?: IdVideoCaptureVerbiage;
|
|
60
65
|
debugMode?: boolean;
|
|
61
66
|
};
|
|
62
|
-
export declare const IdVideoCapture: ({ onComplete, onIdFrontImageCaptured, onIdBackImageCaptured, onFaceNotDetected, onRecordingFailed, idCaptureModelsEnabled, idCardFrontDelay,
|
|
67
|
+
export declare const IdVideoCapture: ({ onComplete, onIdFrontImageCaptured, onIdBackImageCaptured, onFaceNotDetected, onRecordingFailed, idCaptureModelsEnabled, idCardFrontDelay, videoIdCaptureThresholds, skipShowIdCardBack, captureCountdownSeconds, readTextPrompt, readTextTimeoutDurationMs, readTextMinReadingMs, disableFaceDetectionWhileAudioCapture, disableFaceDetectionWhileAudioCaptureMsDelay, mergeAVStreams, assets, classNames, colors, verbiage: rawVerbiage, debugMode, }: IdVideoCaptureProps) => ReactElement;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
import { IdCaptureWizardAssets, IdCaptureWizardClassNames, IdCaptureWizardColors, IdCaptureWizardProps, IdCaptureWizardVerbiage } from '../id_capture/IdCaptureWizard';
|
|
3
3
|
import { FaceLivenessAssets, FaceLivenessClassNames, FaceLivenessColors, FaceLivenessVerbiage, FaceLivenessWizardProps } from '../face_liveness/FaceLivenessWizard';
|
|
4
|
-
import { IdVideoCaptureAssets, IdVideoCaptureClassNames, IdVideoCaptureColors, IdVideoCaptureVerbiage } from './IdVideoCapture';
|
|
4
|
+
import { IdVideoCaptureAssets, IdVideoCaptureClassNames, IdVideoCaptureColors, IdVideoCaptureVerbiage, VideoIdCaptureThresholds } from './IdVideoCapture';
|
|
5
5
|
import { IdVideoCaptureSuccessClassNames, IdVideoCaptureSuccessColors, IdVideoCaptureSuccessVerbiage } from './IdVideoCaptureSuccess';
|
|
6
6
|
import { CustomerSuppliedVerbiage } from '../../lib/locales';
|
|
7
7
|
import { LivenessCheckRequest, SubmissionResponse } from '../../contexts/SubmissionContext';
|
|
@@ -44,12 +44,7 @@ export type VideoIdWizardProps = {
|
|
|
44
44
|
idCaptureProps?: IdCaptureWizardProps;
|
|
45
45
|
faceLivenessProps?: FaceLivenessWizardProps;
|
|
46
46
|
idCaptureModelsEnabled?: boolean;
|
|
47
|
-
|
|
48
|
-
idCardBackDetectionThreshold?: number;
|
|
49
|
-
idCardFrontFocusThreshold?: number;
|
|
50
|
-
idCardBackFocusThreshold?: number;
|
|
51
|
-
goodIdCardFrontFramesThreshold?: number;
|
|
52
|
-
goodIdCardBackFramesThreshold?: number;
|
|
47
|
+
videoIdCaptureThresholds?: VideoIdCaptureThresholds;
|
|
53
48
|
readTextPrompt?: CustomerSuppliedVerbiage;
|
|
54
49
|
readTextTimeoutDurationMs?: number;
|
|
55
50
|
readTextMinReadingMs?: number;
|
|
@@ -72,4 +67,4 @@ export type VideoIdWizardProps = {
|
|
|
72
67
|
verbiage?: VideoIdWizardVerbiage;
|
|
73
68
|
debugMode?: boolean;
|
|
74
69
|
};
|
|
75
|
-
export declare const VideoIdWizard: ({ onComplete, onExitCapture, onExitAfterFailure, onUserCancel, onIdCaptureModelError, onCameraAccessDenied, onMicrophoneAccessDenied, idCaptureProps, faceLivenessProps, idCaptureModelsEnabled,
|
|
70
|
+
export declare const VideoIdWizard: ({ onComplete, onExitCapture, onExitAfterFailure, onUserCancel, onIdCaptureModelError, onCameraAccessDenied, onMicrophoneAccessDenied, idCaptureProps, faceLivenessProps, idCaptureModelsEnabled, videoIdCaptureThresholds, readTextPrompt, readTextTimeoutDurationMs, readTextMinReadingMs, skipIdCapture, skipShowIdCardBack, skipSuccessScreen, idCaptureLoadingOverlayMode, idCaptureGuideType, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, idCaptureModelLoadTimeoutMs, faceLivenessLoadingOverlayMode, disableFaceDetectionWhileAudioCapture, disableFaceDetectionWhileAudioCaptureMsDelay, silentFallback, mergeAVStreams, assets, classNames, colors, verbiage, debugMode, }: VideoIdWizardProps) => ReactElement;
|