idmission-web-sdk 0.0.1
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/LICENSE +21 -0
- package/README.md +398 -0
- package/dist/components/CompositeWizard.d.ts +27 -0
- package/dist/components/Example.d.ts +2 -0
- package/dist/components/GuideOrientationProvider.d.ts +4 -0
- package/dist/components/additional_document_capture/AdditionalDocumentCapture.d.ts +17 -0
- package/dist/components/additional_document_capture/AdditionalDocumentCaptureWizard.d.ts +16 -0
- package/dist/components/additional_document_capture/CapturedDocuments.d.ts +8 -0
- package/dist/components/camera/CameraAccessDeniedOverlay.d.ts +4 -0
- package/dist/components/camera/CameraProvider.d.ts +9 -0
- package/dist/components/camera/CameraVideoTag.d.ts +5 -0
- package/dist/components/common/Page.d.ts +12 -0
- package/dist/components/common/cdn.d.ts +1 -0
- package/dist/components/common/overlay.d.ts +790 -0
- package/dist/components/common/spinner.d.ts +261 -0
- package/dist/components/customer_flows/CustomerBiometricsEnrollment.d.ts +29 -0
- package/dist/components/customer_flows/CustomerIdAndBiometricsEnrollment.d.ts +37 -0
- package/dist/components/customer_flows/CustomerIdentification.d.ts +23 -0
- package/dist/components/customer_flows/CustomerVerification.d.ts +22 -0
- package/dist/components/customer_flows/FaceValidation.d.ts +21 -0
- package/dist/components/customer_flows/IdAndFaceValidation.d.ts +36 -0
- package/dist/components/customer_flows/IdValidation.d.ts +33 -0
- package/dist/components/customer_flows/SignatureKYC.d.ts +14 -0
- package/dist/components/customer_identification/CustomerIdentificationCapture.d.ts +13 -0
- package/dist/components/customer_identification/CustomerIdentificationFailure.d.ts +11 -0
- package/dist/components/customer_identification/CustomerIdentificationSuccess.d.ts +10 -0
- package/dist/components/customer_identification/CustomerIdentificationWizard.d.ts +33 -0
- package/dist/components/customer_verification/CustomerVerificationCapture.d.ts +13 -0
- package/dist/components/customer_verification/CustomerVerificationFailure.d.ts +11 -0
- package/dist/components/customer_verification/CustomerVerificationSuccess.d.ts +10 -0
- package/dist/components/customer_verification/CustomerVerificationWizard.d.ts +33 -0
- package/dist/components/face_liveness/FaceCaptureGuideOverlay.d.ts +6 -0
- package/dist/components/face_liveness/FaceLivenessCapture.d.ts +16 -0
- package/dist/components/face_liveness/FaceLivenessFailure.d.ts +11 -0
- package/dist/components/face_liveness/FaceLivenessSuccess.d.ts +10 -0
- package/dist/components/face_liveness/FaceLivenessWizard.d.ts +33 -0
- package/dist/components/id_capture/DocumentCaptureGuideOverlay.d.ts +14 -0
- package/dist/components/id_capture/FlipIdPrompt.d.ts +9 -0
- package/dist/components/id_capture/IdCapture.d.ts +46 -0
- package/dist/components/id_capture/IdCaptureLoadingOverlay.d.ts +13 -0
- package/dist/components/id_capture/IdCaptureModelsProvider.d.ts +7 -0
- package/dist/components/id_capture/IdCaptureSubmitBtn.d.ts +7 -0
- package/dist/components/id_capture/IdCaptureSuccess.d.ts +18 -0
- package/dist/components/id_capture/IdCaptureWizard.d.ts +56 -0
- package/dist/components/selfie_capture/HighPerformanceSelfieGuidanceModelsProvider.d.ts +34 -0
- package/dist/components/selfie_capture/SelfieCapture.d.ts +20 -0
- package/dist/components/selfie_capture/SelfieCaptureLoadingOverlay.d.ts +12 -0
- package/dist/components/selfie_capture/SelfieGuidanceModelsProvider.d.ts +5 -0
- package/dist/components/signature_capture/SignatureCapture.d.ts +18 -0
- package/dist/components/signature_capture/VideoSignatureCapture.d.ts +9 -0
- package/dist/components/signature_capture/data.d.ts +9 -0
- package/dist/components/signature_kyc/SignatureKYCLoadingOverlay.d.ts +12 -0
- package/dist/components/signature_kyc/SignatureKYCWizard.d.ts +5 -0
- package/dist/components/submission/GeolocationAccessDeniedOverlay.d.ts +5 -0
- package/dist/components/submission/SubmissionProvider.d.ts +16 -0
- package/dist/components/submission/SubmissionSuccess.d.ts +2 -0
- package/dist/contexts/CameraStateContext.d.ts +18 -0
- package/dist/contexts/GuideOrientationContext.d.ts +15 -0
- package/dist/contexts/IdCaptureModelsContext.d.ts +11 -0
- package/dist/contexts/SelfieGuidanceModelsContext.d.ts +14 -0
- package/dist/contexts/SubmissionContext.d.ts +156 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.js +7 -0
- package/dist/lib/barcode/Native.d.ts +1 -0
- package/dist/lib/barcode/Parse.d.ts +53 -0
- package/dist/lib/barcode/Scan.d.ts +3 -0
- package/dist/lib/barcode/ZXing.d.ts +1 -0
- package/dist/lib/camera/Camera.d.ts +59 -0
- package/dist/lib/camera/hooks.d.ts +9 -0
- package/dist/lib/camera/useVideoRecorder.d.ts +7 -0
- package/dist/lib/locales/en/translation.d.ts +2 -0
- package/dist/lib/locales/es/translation.d.ts +50 -0
- package/dist/lib/locales/index.d.ts +60 -0
- package/dist/lib/models/DocumentDetection.d.ts +27 -0
- package/dist/lib/models/FaceDetection.d.ts +5 -0
- package/dist/lib/models/Focus.d.ts +7 -0
- package/dist/lib/models/preloadModels.d.ts +5 -0
- package/dist/lib/tfworker/Actions.d.ts +29 -0
- package/dist/lib/tfworker/Client.d.ts +14 -0
- package/dist/lib/tfworker/TfWorker.d.ts +8 -0
- package/dist/lib/utils/OffscreenCanvasPolyfill.d.ts +0 -0
- package/dist/lib/utils/cropToShoulders.d.ts +2 -0
- package/dist/lib/utils/dataUrlToBase64.d.ts +3 -0
- package/dist/lib/utils/deviceDetection.d.ts +2 -0
- package/dist/lib/utils/getBlobDimensions.d.ts +1 -0
- package/dist/sdk2.cjs.development.js +13219 -0
- package/dist/sdk2.cjs.development.js.map +1 -0
- package/dist/sdk2.cjs.production.js +2 -0
- package/dist/sdk2.cjs.production.js.map +1 -0
- package/dist/sdk2.esm.js +13167 -0
- package/dist/sdk2.esm.js.map +1 -0
- package/dist/sdk2.umd.development.js +17456 -0
- package/dist/sdk2.umd.development.js.map +1 -0
- package/dist/sdk2.umd.production.js +2 -0
- package/dist/sdk2.umd.production.js.map +1 -0
- package/dist/stories/AdditionalDocumentCapture/AdditionalDocumentCapture.stories.d.ts +18 -0
- package/dist/stories/BarcodeReader.stories.d.ts +7 -0
- package/dist/stories/Camera.stories.d.ts +7 -0
- package/dist/stories/CompositeWizard/FaceLivenessAndIdCapture.stories.d.ts +24 -0
- package/dist/stories/CompositeWizard/IdCaptureAndFaceLiveness.stories.d.ts +24 -0
- package/dist/stories/CustomerFlows/CustomerBiometricsEnrollment.stories.d.ts +30 -0
- package/dist/stories/CustomerFlows/CustomerIdAndBiometricsEnrollment.stories.d.ts +29 -0
- package/dist/stories/CustomerFlows/CustomerIdentification.stories.d.ts +28 -0
- package/dist/stories/CustomerFlows/CustomerVerification.stories.d.ts +29 -0
- package/dist/stories/CustomerFlows/FaceValidation.stories.d.ts +29 -0
- package/dist/stories/CustomerFlows/IdAndFaceValidation.stories.d.ts +28 -0
- package/dist/stories/CustomerFlows/IdValidation.stories.d.ts +30 -0
- package/dist/stories/CustomerFlows/SignatureKYC.stories.d.ts +28 -0
- package/dist/stories/DocumentCaptureGuideOverlay/LicenseBack.stories.d.ts +14 -0
- package/dist/stories/DocumentCaptureGuideOverlay/LicenseFront.stories.d.ts +15 -0
- package/dist/stories/DocumentCaptureGuideOverlay/Passport.stories.d.ts +15 -0
- package/dist/stories/FaceLiveness/Capture.stories.d.ts +21 -0
- package/dist/stories/FaceLiveness/Wizard.stories.d.ts +23 -0
- package/dist/stories/FlipIdPrompt.stories.d.ts +15 -0
- package/dist/stories/FrameLoop.stories.d.ts +7 -0
- package/dist/stories/IdCapture/LicenseBackCapture.stories.d.ts +65 -0
- package/dist/stories/IdCapture/LicenseFrontCapture.stories.d.ts +65 -0
- package/dist/stories/IdCapture/PassportCapture.stories.d.ts +65 -0
- package/dist/stories/IdCapture/Wizard.stories.d.ts +89 -0
- package/dist/stories/MultiCamera.stories.d.ts +7 -0
- package/dist/stories/SignatureCapture/SignatureCapture.stories.d.ts +7 -0
- package/dist/stories/SignatureCapture/VideoSignatureCapture.stories.d.ts +7 -0
- package/dist/stories/TokenGeneration.stories.d.ts +7 -0
- package/dist/stories/VideoCapture.stories.d.ts +7 -0
- package/dist/stories/WebSdkExample.stories.d.ts +7 -0
- package/dist/stories/WebWorker.stories.d.ts +7 -0
- package/dist/stories/models/DocumentDetection.stories.d.ts +7 -0
- package/dist/stories/models/FaceDetection.stories.d.ts +9 -0
- package/dist/stories/models/FocusModel.stories.d.ts +7 -0
- package/dist/stories/models/HighPerformanceFaceDetectionMinimal.stories.d.ts +12 -0
- package/dist/stories/models/HighPerformanceFaceDetectionOriginal.stories.d.ts +7 -0
- package/dist/stories/utils/cdnUrl.d.ts +1 -0
- package/dist/stories/utils/getToken.d.ts +8 -0
- package/dist/stories/utils/makeRandomString.d.ts +1 -0
- package/package.json +130 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 MacKinley Smith <smithmackinley@gmail.com>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,398 @@
|
|
|
1
|
+
# sdk2
|
|
2
|
+
|
|
3
|
+
## Basic Usage in Typescript/React
|
|
4
|
+
|
|
5
|
+
```jsx
|
|
6
|
+
import React from 'react'
|
|
7
|
+
import { render } from 'react-dom'
|
|
8
|
+
import { IdValidation } from 'idmission-web-sdk-2'
|
|
9
|
+
|
|
10
|
+
render(<IdValidation submissionToken={YOUR_TOKEN} />, document.getElementById('root'))
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Basic Usage in HTML
|
|
14
|
+
|
|
15
|
+
Add the following script tag to your page's `<head>`:
|
|
16
|
+
```html
|
|
17
|
+
<script type="module" src="https://websdk-cdn-dev.idmission.com/assets/loader.js"></script>
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Then you may call any render method below, for example `renderIdValidation`, like so:
|
|
21
|
+
```html
|
|
22
|
+
<script type="module">
|
|
23
|
+
IDmissionSDK.renderIdValidation('#target-element', { submissionToken: 'my-idmission-token' });
|
|
24
|
+
</script>
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Customer Flows
|
|
28
|
+
|
|
29
|
+
### IDValidation
|
|
30
|
+
|
|
31
|
+
Render a fullscreen ID capture component that instructs the user to photograph both sides of their ID card, or full page of their passport.
|
|
32
|
+
|
|
33
|
+
**Props**
|
|
34
|
+
|
|
35
|
+
<table>
|
|
36
|
+
<tr><td><code>submissionToken</code></td><td>a token generated with your IDmission credentials.</td></tr>
|
|
37
|
+
<tr><td><code>submissionUrl</code></td><td>URL to hit with all API requests. Default: https://api.idmission.com</td></tr>
|
|
38
|
+
<tr><td><code>onBeforeSubmit</code> (optional)</td><td>callback function that fires immediately prior to submission, giving the client application an opportunity to specify custom asynchronous logic that mutates the request before it executes. The submission request is passed in as a parameter and a promise resolving to the updated request should be returned.</td></tr>
|
|
39
|
+
<tr><td><code>onComplete</code> (optional)</td><td>callback function that fires when the user completes the IDValidation flow. The SubmissionResponse from IDmission's API is passed as an argument to the customer's application for further handling, which indicates whether the user passed the validation check.</td></tr>
|
|
40
|
+
<tr><td><code>onApproved</code> (optional)</td><td>callback function that fires when the user completes the IDValidation flow with a valid ID. The SubmissionResponse from IDmission's API is passed as an argument to the customer's application for further handling.</td></tr>
|
|
41
|
+
<tr><td><code>onDenied</code> (optional)</td><td>callback function that fires when the user completes the IDValidation flow with an invalid ID. The SubmissionResponse from IDmission's API is passed as an argument to the customer's application for further handling.</td></tr>
|
|
42
|
+
<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>
|
|
43
|
+
<tr><td><code>captureSignature</code> (optional)</td><td>boolean indicating whether the user should be prompted to sign the screen before submission. Defaults to false.</td></tr>
|
|
44
|
+
<tr><td><code>captureSignatureVideo</code> (optional)</td><td>boolean indicating whether the user should be prompted to record themselves signing the screen before submission. Defaults to false.</td></tr>
|
|
45
|
+
<tr><td><code>captureAdditionalDocuments</code> (optional)</td><td>array of additional documents to be captured. Each element includes a name and description.</td></tr>
|
|
46
|
+
<tr><td><code>documentDetectionNonMaxSuppressionEnabled</code> (optional)</td><td>boolean to indicate whether to remove document predictions below the max score.</td></tr>
|
|
47
|
+
<tr><td><code>idAutoCaptureEnabled</code> (optional)</td><td>boolean to indicate whether photos should be captured automatically when guidance conditions are met. Default is `true`.</td></tr>
|
|
48
|
+
<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.</td></tr>
|
|
49
|
+
<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.</td></tr>
|
|
50
|
+
<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.</td></tr>
|
|
51
|
+
<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.</td></tr>
|
|
52
|
+
<tr><td><code>assets</code> (optional)</td><td>object containing any asset overrides, for available options consult the Assets table below.</td></tr>
|
|
53
|
+
<tr><td><code>verbiage</code> (optional)</td><td>object containing any verbiage overrides, for available options consult the Verbiage table below.</td></tr>
|
|
54
|
+
<tr><td><code>geolocationEnabled</code> (optional)</td><td>boolean flag to indicate whether users should be prompted to share their location. Default is `true`.</td></tr>
|
|
55
|
+
<tr><td><code>geolocationRequired</code> (optional)</td><td>boolean flag to indicate whether users should be blocked from proceeding if they block location access. Default is `false`.</td></tr>
|
|
56
|
+
<tr><td><code>debugMode</code> (optional)</td><td>boolean flag to enable on-screen prediction information output. Default is `false`.</td></tr>
|
|
57
|
+
</table>
|
|
58
|
+
|
|
59
|
+
**ID Capture Assets**
|
|
60
|
+
|
|
61
|
+
<table>
|
|
62
|
+
<tr><td><code>documentDetectionModelUrl</code></td><td>Default: https://websdk-cdn-dev.idmission.com/assets/models/documentdetection448/model.json</td></tr>
|
|
63
|
+
<tr><td><code>focusModelUrl</code></td><td>Default: https://websdk-cdn-dev.idmission.com/assets/models/focus/model.json</td></tr>
|
|
64
|
+
<tr><td><code>loadingOverlayInstructionImageUrl</code></td><td>Default: https://websdk-cdn-dev.idmission.com/assets/WebSDK-Instruction-DL-Capture-3-Portrait.png</td></tr>
|
|
65
|
+
<tr><td><code>idCardFrontPortraitGuidesImageUrl</code></td><td>Default: https://websdk-cdn-dev.idmission.com/assets/Shieldout-IDCard-Front-SVG-Portrait-2.svg</td></tr>
|
|
66
|
+
<tr><td><code>idCardFrontLandscapeGuidesImageUrl</code></td><td>Default: https://websdk-cdn-dev.idmission.com/assets/Shieldout-IDCard-Landscape-SVG-Portrait-2.svg</td></tr>
|
|
67
|
+
<tr><td><code>idCardBackPortraitGuidesImageUrl</code></td><td>Default: https://websdk-cdn-dev.idmission.com/assets/Shieldout-IDCard-Back-SVG-Portrait-2.svg</td></tr>
|
|
68
|
+
<tr><td><code>idCardBackLandscapeGuidesImageUrl</code></td><td>Default: https://websdk-cdn-dev.idmission.com/assets/Shieldout-IDCard-Back-SVG-Landscape-2.svg</td></tr>
|
|
69
|
+
<tr><td><code>passportPortraitGuidesImageUrl</code></td><td>Default: https://websdk-cdn-dev.idmission.com/assets/Shieldout-Passport-Front-SVG-Portrait-2.svg</td></tr>
|
|
70
|
+
<tr><td><code>passportLandscapeGuidesImageUrl</code></td><td>Default: https://websdk-cdn-dev.idmission.com/assets/Shieldout-Passport-Front-SVG-Landscape-2.svg</td></tr>
|
|
71
|
+
</table>
|
|
72
|
+
|
|
73
|
+
**ID Capture Verbiage**
|
|
74
|
+
|
|
75
|
+
<table>
|
|
76
|
+
<tr><td><code>loadingOverlayHeadingText</code></td><td>Default: "Use your device camera to capture your ID"</td></tr>
|
|
77
|
+
<tr><td><code>loadingOverlayUseContinuityCameraText</code></td><td>Default: "Use your iPhone as a webcam"</td></tr>
|
|
78
|
+
<tr><td><code>loadingOverlayModelsWarmingUpText</code></td><td>Default: "Models warming up..."</td></tr>
|
|
79
|
+
<tr><td><code>loadingOverlayCameraInitializingText</code></td><td>Default: "Camera initializing..."</td></tr>
|
|
80
|
+
<tr><td><code>loadingOverlayCameraAccessBlockedText</code></td><td>Default: "Camera access blocked"</td></tr>
|
|
81
|
+
<tr><td><code>loadingOverlayContinueText</code></td><td>Default: "Continue"</td></tr>
|
|
82
|
+
<tr><td><code>idCardFrontInstructionText</code></td><td>Default: "Scan the front of ID"</td></tr>
|
|
83
|
+
<tr><td><code>idCardBackInstructionText</code></td><td>Default: "Scan the back of ID"</td></tr>
|
|
84
|
+
<tr><td><code>passportInstructionText</code></td><td>Default: "Scan the ID page of passport"</td></tr>
|
|
85
|
+
<tr><td><code>flipIdInstructionText</code></td><td>Default: "Please flip your ID card..."</td></tr>
|
|
86
|
+
<tr><td><code>capturingText</code></td><td>Default: "Capturing..."</td></tr>
|
|
87
|
+
<tr><td><code>captureFailedText</code></td><td>Default: "Capture failed!"</td></tr>
|
|
88
|
+
<tr><td><code>signatureCaptureHeadingText</code></td><td>Default: "Please sign the box below"</td></tr>
|
|
89
|
+
<tr><td><code>signatureCaptureAcceptBtnText</code></td><td>Default: "Accept"</td></tr>
|
|
90
|
+
<tr><td><code>signatureCaptureClearBtnText</code></td><td>Default: "Clear"</td></tr>
|
|
91
|
+
<tr><td><code>additionalDocumentsHeadingText</code></td><td>Default: "Additional document capture"</td></tr>
|
|
92
|
+
<tr><td><code>additionalDocumentsNextBtnText</code></td><td>Default: "Next"</td></tr>
|
|
93
|
+
<tr><td><code>successHeadingText</code></td><td>Default: "ID Capture Successful"</td></tr>
|
|
94
|
+
<tr><td><code>successIdCardFrontText</code></td><td>Default: "ID Card Front"</td></tr>
|
|
95
|
+
<tr><td><code>successIdCardBackText</code></td><td>Default: "ID Card Back"</td></tr>
|
|
96
|
+
<tr><td><code>successPassportText</code></td><td>Default: "Passport"</td></tr>
|
|
97
|
+
<tr><td><code>successInstructionText</code></td><td>Default: "Verify the entire ID was captured clearly with no glare."</td></tr>
|
|
98
|
+
<tr><td><code>successRetryText</code></td><td>Default: "Retry"</td></tr>
|
|
99
|
+
<tr><td><code>successSubmittingText</code></td><td>Default: "Submitting..."</td></tr>
|
|
100
|
+
<tr><td><code>successSubmitText</code></td><td>Default: "Submit"</td></tr>
|
|
101
|
+
</table>
|
|
102
|
+
|
|
103
|
+
**Example**
|
|
104
|
+
|
|
105
|
+
```js
|
|
106
|
+
IDmissionSDK.renderIdValidation('#target-element', {
|
|
107
|
+
submissionToken: 'my-idmission-token',
|
|
108
|
+
onApproved: (submissionResponse) => {
|
|
109
|
+
alert('Your ID has been validated, proceed to the next checkpoint.')
|
|
110
|
+
},
|
|
111
|
+
onDenied: (submissionResponse) => {
|
|
112
|
+
alert('Your ID could not be validated, you shall not pass!')
|
|
113
|
+
},
|
|
114
|
+
});
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### FaceValidation
|
|
118
|
+
|
|
119
|
+
Render a fullscreen capture component that analyzes frames from the user's front-facing camera to determine whether a live human face is present.
|
|
120
|
+
|
|
121
|
+
**Props**
|
|
122
|
+
|
|
123
|
+
<table>
|
|
124
|
+
<tr><td><code>submissionToken</code></td><td>a token generated with your IDmission credentials.</td></tr>
|
|
125
|
+
<tr><td><code>submissionUrl</code></td><td>URL to hit with all API requests. Default: https://api.idmission.com</td></tr>
|
|
126
|
+
<tr><td><code>onBeforeSubmit</code> (optional)</td><td>callback function that fires immediately prior to submission, giving the client application an opportunity to specify custom asynchronous logic that mutates the request before it executes. The submission request is passed in as a parameter and a promise resolving to the updated request should be returned.</td></tr>
|
|
127
|
+
<tr><td><code>onComplete</code> (optional)</td><td>callback function that fires when the user has completed the FaceValidation flow. The SubmissionResponse from IDmission's API is passed as an argument to the customer's application for further handling, which indicates whether the user passed the validation check.</td></tr>
|
|
128
|
+
<tr><td><code>onApproved</code> (optional)</td><td>callback function that fires when the user completes the IDValidation flow and passes the realness check. The SubmissionResponse from IDmission's API is passed as an argument to the customer's application for further handling.</td></tr>
|
|
129
|
+
<tr><td><code>onDenied</code> (optional)</td><td>callback function that fires when the user completes the IDValidation flow and fails the realness check. The SubmissionResponse from IDmission's API is passed as an argument to the customer's application for further handling.</td></tr>
|
|
130
|
+
<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>
|
|
131
|
+
<tr><td><code>timeoutDurationMs</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>
|
|
132
|
+
<tr><td><code>assets</code> (optional)</td><td>object containing any asset overrides, for available options consult the Assets table below.</td></tr>
|
|
133
|
+
<tr><td><code>verbiage</code> (optional)</td><td>object containing any verbiage overrides, for available options consult the Verbiage table below.</td></tr>
|
|
134
|
+
<tr><td><code>geolocationEnabled</code> (optional)</td><td>boolean flag to indicate whether users should be prompted to share their location. Default is `true`.</td></tr>
|
|
135
|
+
<tr><td><code>geolocationRequired</code> (optional)</td><td>boolean flag to indicate whether users should be blocked from proceeding if they block location access. Default is `false`.</td></tr>
|
|
136
|
+
<tr><td><code>geolocationEnabled</code> (optional)</td><td>boolean flag to indicate whether users should be prompted to share their location. Default is `true`.</td></tr>
|
|
137
|
+
<tr><td><code>geolocationRequired</code> (optional)</td><td>boolean flag to indicate whether users should be blocked from proceeding if they block location access. Default is `false`.</td></tr>
|
|
138
|
+
<tr><td><code>debugMode</code> (optional)</td><td>boolean flag to enable on-screen prediction information output. Default is `false`.</td></tr>
|
|
139
|
+
</table>
|
|
140
|
+
|
|
141
|
+
**Face Liveness Assets**
|
|
142
|
+
|
|
143
|
+
<table>
|
|
144
|
+
<tr><td><code>instructionImageUrl</code></td><td>Default: https://websdk-cdn-dev.idmission.com/assets/Selfie-Image-1.png</td></tr>
|
|
145
|
+
<tr><td><code>failureImageUrl</code></td><td>Default: https://websdk-cdn-dev.idmission.com/assets/manual_capture.png</td></tr>
|
|
146
|
+
</table>
|
|
147
|
+
|
|
148
|
+
**Face Liveness Verbiage**
|
|
149
|
+
|
|
150
|
+
<table>
|
|
151
|
+
<tr><td><code>loadingOverlayHeadingText</code></td><td>Default: "Use your device camera to capture your face"</td></tr>
|
|
152
|
+
<tr><td><code>loadingOverlayRemoveEyeCoveringsText</code></td><td>Default: "Remove Sunglasses & Hat"</td></tr>
|
|
153
|
+
<tr><td><code>loadingOverlayAvoidExcessiveBacklightingText</code></td><td>Default: "Avoid Excessive Backlighting"</td></tr>
|
|
154
|
+
<tr><td><code>loadingOverlayContinueText</code></td><td>Default: "Continue"</td></tr>
|
|
155
|
+
<tr><td><code>loadingOverlayCameraInitializingText</code></td><td>Default: "Camera initializing..."</td></tr>
|
|
156
|
+
<tr><td><code>loadingOverlayModelsWarmingUpText</code></td><td>Default: "Models warming up..."</td></tr>
|
|
157
|
+
<tr><td><code>guidanceHoldStillText</code></td><td>Default: "Hold still for a few seconds..."</td></tr>
|
|
158
|
+
<tr><td><code>guidanceLookStraightText</code></td><td>Default: "Look straight into the camera..."</td></tr>
|
|
159
|
+
<tr><td><code>guidanceMoveBackText</code></td><td>Default: "Move back..."</td></tr>
|
|
160
|
+
<tr><td><code>guidanceMoveForwardText</code></td><td>Default: "Move forward..."</td></tr>
|
|
161
|
+
<tr><td><code>guidanceMoveToCenterText</code></td><td>Default: "Move to the center..."</td></tr>
|
|
162
|
+
<tr><td><code>guidanceRemoveEyeCoveringsText</code></td><td>Default: "Please remove your eye coverings (sunglasses, eye patch, etc.)..."</td></tr>
|
|
163
|
+
<tr><td><code>guidanceRemoveHeadCoveringsText</code></td><td>Default: "Please remove your head coverings (hat, scarf, etc.)..."</td></tr>
|
|
164
|
+
<tr><td><code>guidanceRemoveMaskText</code></td><td>Default: "Please remove your mask..."</td></tr>
|
|
165
|
+
<tr><td><code>successHeadingText</code></td><td>Default: "Face liveness has been verified!"</td></tr>
|
|
166
|
+
<tr><td><code>successRetryBtnText</code></td><td>Default: "Retry"</td></tr>
|
|
167
|
+
<tr><td><code>successDoneBtnText</code></td><td>Default: "Done"</td></tr>
|
|
168
|
+
<tr><td><code>failureHeadingText</code></td><td>Default: "Live face not detected, please try again"</td></tr>
|
|
169
|
+
<tr><td><code>failureRetryBtnText</code></td><td>Default: "Retry"</td></tr>
|
|
170
|
+
<tr><td><code>failureExitBtnText</code></td><td>Default: "Exit"</td></tr>
|
|
171
|
+
</table>
|
|
172
|
+
|
|
173
|
+
**Example**
|
|
174
|
+
|
|
175
|
+
```js
|
|
176
|
+
IDmissionSDK.renderFaceValidation('#target-element', {
|
|
177
|
+
submissionToken: 'my-idmission-token',
|
|
178
|
+
onApproved: (submissionResponse) => {
|
|
179
|
+
alert('Your face is real, proceed to the next checkpoint.')
|
|
180
|
+
},
|
|
181
|
+
onDenied: (submissionResponse) => {
|
|
182
|
+
alert('Your face realness could not be validated, you shall not pass!')
|
|
183
|
+
},
|
|
184
|
+
});
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
### IdAndFaceValidation
|
|
188
|
+
|
|
189
|
+
Render a fullscreen capture component that performs IDValidation and FaceValidation sequentially.
|
|
190
|
+
|
|
191
|
+
**Props**
|
|
192
|
+
|
|
193
|
+
<table>
|
|
194
|
+
<tr><td><code>submissionToken</code></td><td>a token generated with your IDmission credentials.</td></tr>
|
|
195
|
+
<tr><td><code>submissionUrl</code></td><td>URL to hit with all API requests. Default: https://api.idmission.com</td></tr>
|
|
196
|
+
<tr><td><code>onBeforeSubmit</code> (optional)</td><td>callback function that fires immediately prior to submission, giving the client application an opportunity to specify custom asynchronous logic that mutates the request before it executes. The submission request is passed in as a parameter and a promise resolving to the updated request should be returned.</td></tr>
|
|
197
|
+
<tr><td><code>onComplete</code> (optional)</td><td>callback function that fires when the user has completed both flows. The SubmissionResponse from IDmission's API is passed as an argument to the customer's application for further handling, which indicates whether the user passed the validation check.</td></tr>
|
|
198
|
+
<tr><td><code>onApproved</code> (optional)</td><td>callback function that fires when the user completes both flows with a valid ID and passes the realness check. The SubmissionResponse from IDmission's API is passed as an argument to the customer's application for further handling.</td></tr>
|
|
199
|
+
<tr><td><code>onDenied</code> (optional)</td><td>callback function that fires when the user completes both flows with an invalid ID or fails the realness check. The SubmissionResponse from IDmission's API is passed as an argument to the customer's application for further handling.</td></tr>
|
|
200
|
+
<tr><td><code>captureSignature</code> (optional)</td><td>boolean indicating whether the user should be prompted to sign the screen before submission. Defaults to false.</td></tr>
|
|
201
|
+
<tr><td><code>captureSignatureVideo</code> (optional)</td><td>boolean indicating whether the user should be prompted to record themselves signing the screen before submission. Defaults to false.</td></tr>
|
|
202
|
+
<tr><td><code>captureAdditionalDocuments</code> (optional)</td><td>array of additional documents to be captured. Each element includes a name and description.</td></tr>
|
|
203
|
+
<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>
|
|
204
|
+
<tr><td><code>documentDetectionNonMaxSuppressionEnabled</code> (optional)</td><td>boolean to indicate whether to remove document predictions below the max score.</td></tr>
|
|
205
|
+
<tr><td><code>idAutoCaptureEnabled</code> (optional)</td><td>boolean to indicate whether photos should be captured automatically when guidance conditions are met. Default is `true`.</td></tr>
|
|
206
|
+
<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.</td></tr>
|
|
207
|
+
<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.</td></tr>
|
|
208
|
+
<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.</td></tr>
|
|
209
|
+
<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.</td></tr>
|
|
210
|
+
<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>
|
|
211
|
+
<tr><td><code>idCaptureAssets</code> (optional)</td><td>object containing any asset overrides, for available options consult the ID Capture Assets table above.</td></tr>
|
|
212
|
+
<tr><td><code>idCaptureVerbiage</code> (optional)</td><td>object containing any verbiage overrides, for available options consult the ID Capture Verbiage table above.</td></tr>
|
|
213
|
+
<tr><td><code>faceLivenessAssets</code> (optional)</td><td>object containing any asset overrides, for available options consult the Face Liveness Assets table above.</td></tr>
|
|
214
|
+
<tr><td><code>faceLivenessVerbiage</code> (optional)</td><td>object containing any verbiage overrides, for available options consult the Face Liveness Verbiage table above.</td></tr>
|
|
215
|
+
<tr><td><code>geolocationEnabled</code> (optional)</td><td>boolean flag to indicate whether users should be prompted to share their location. Default is `true`.</td></tr>
|
|
216
|
+
<tr><td><code>geolocationRequired</code> (optional)</td><td>boolean flag to indicate whether users should be blocked from proceeding if they block location access. Default is `false`.</td></tr>
|
|
217
|
+
<tr><td><code>debugMode</code> (optional)</td><td>boolean flag to enable on-screen prediction information output. Default is `false`.</td></tr>
|
|
218
|
+
</table>
|
|
219
|
+
|
|
220
|
+
**Example**
|
|
221
|
+
|
|
222
|
+
```js
|
|
223
|
+
IDmissionSDK.renderIdAndFaceValidation('#target-element', {
|
|
224
|
+
submissionToken: 'my-idmission-token',
|
|
225
|
+
onApproved: (submissionResponse) => {
|
|
226
|
+
alert('Your ID has been validated and your face is real, proceed to the next checkpoint.')
|
|
227
|
+
},
|
|
228
|
+
onDenied: (submissionResponse) => {
|
|
229
|
+
alert('Your ID or face realness could not be validated, you shall not pass!')
|
|
230
|
+
},
|
|
231
|
+
});
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
### CustomerIdAndBiometricsEnrollment
|
|
235
|
+
|
|
236
|
+
Render a fullscreen capture component that performs IDValidation and FaceValidation sequentially, and then stores the results in IDmission's customer database using the supplied `enrollmentId` for later verification or 1:N matching.
|
|
237
|
+
|
|
238
|
+
**Props**
|
|
239
|
+
|
|
240
|
+
<table>
|
|
241
|
+
<tr><td><code>submissionToken</code></td><td>a token generated with your IDmission credentials.</td></tr>
|
|
242
|
+
<tr><td><code>submissionUrl</code></td><td>URL to hit with all API requests. Default: https://api.idmission.com</td></tr>
|
|
243
|
+
<tr><td><code>enrollmentId</code></td><td>the unique identifier to use for the customer to be enrolled.</td></tr>
|
|
244
|
+
<tr><td><code>onBeforeSubmit</code> (optional)</td><td>callback function that fires immediately prior to submission, giving the client application an opportunity to specify custom asynchronous logic that mutates the request before it executes. The submission request is passed in as a parameter and a promise resolving to the updated request should be returned.</td></tr>
|
|
245
|
+
<tr><td><code>onComplete</code> (optional)</td><td>callback function that fires when the user has completed the CustomerIdAndBiometricsEnrollment flow. The SubmissionResponse from IDmission's API is passed as an argument to the customer's application for further handling, which indicates whether the user passed the validation check.</td></tr>
|
|
246
|
+
<tr><td><code>onEnrolled</code> (optional)</td><td>callback function that fires when the user has completed the CustomerIdAndBiometricsEnrollment flow successfully. The SubmissionResponse from IDmission's API is passed as an argument to the customer's application for further handling, which indicates whether the user passed the validation check.</td></tr>
|
|
247
|
+
<tr><td><code>onDenied</code> (optional)</td><td>callback function that fires when the user has completed the CustomerIdAndBiometricsEnrollment flow but could not be enrolled. The SubmissionResponse from IDmission's API is passed as an argument to the customer's application for further handling, which indicates whether the user passed the validation check.</td></tr>
|
|
248
|
+
<tr><td><code>captureSignature</code> (optional)</td><td>boolean indicating whether the user should be prompted to sign the screen before submission. Defaults to false.</td></tr>
|
|
249
|
+
<tr><td><code>captureSignatureVideo</code> (optional)</td><td>boolean indicating whether the user should be prompted to record themselves signing the screen before submission. Defaults to false.</td></tr>
|
|
250
|
+
<tr><td><code>captureAdditionalDocuments</code> (optional)</td><td>array of additional documents to be captured. Each element includes a name and description.</td></tr>
|
|
251
|
+
<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>
|
|
252
|
+
<tr><td><code>documentDetectionNonMaxSuppressionEnabled</code> (optional)</td><td>boolean to indicate whether to remove document predictions below the max score.</td></tr>
|
|
253
|
+
<tr><td><code>idAutoCaptureEnabled</code> (optional)</td><td>boolean to indicate whether photos should be captured automatically when guidance conditions are met. Default is `true`.</td></tr>
|
|
254
|
+
<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.</td></tr>
|
|
255
|
+
<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.</td></tr>
|
|
256
|
+
<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.</td></tr>
|
|
257
|
+
<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.</td></tr>
|
|
258
|
+
<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>
|
|
259
|
+
<tr><td><code>idCaptureAssets</code> (optional)</td><td>object containing any asset overrides, for available options consult the ID Capture Assets table above.</td></tr>
|
|
260
|
+
<tr><td><code>idCaptureVerbiage</code> (optional)</td><td>object containing any verbiage overrides, for available options consult the ID Capture Verbiage table above.</td></tr>
|
|
261
|
+
<tr><td><code>faceLivenessAssets</code> (optional)</td><td>object containing any asset overrides, for available options consult the Face Liveness Assets table above.</td></tr>
|
|
262
|
+
<tr><td><code>faceLivenessVerbiage</code> (optional)</td><td>object containing any verbiage overrides, for available options consult the Face Liveness Verbiage table above.</td></tr>
|
|
263
|
+
<tr><td><code>geolocationEnabled</code> (optional)</td><td>boolean flag to indicate whether users should be prompted to share their location. Default is `true`.</td></tr>
|
|
264
|
+
<tr><td><code>geolocationRequired</code> (optional)</td><td>boolean flag to indicate whether users should be blocked from proceeding if they block location access. Default is `false`.</td></tr>
|
|
265
|
+
<tr><td><code>debugMode</code> (optional)</td><td>boolean flag to enable on-screen prediction information output. Default is `false`.</td></tr>
|
|
266
|
+
</table>
|
|
267
|
+
|
|
268
|
+
**Example**
|
|
269
|
+
|
|
270
|
+
```js
|
|
271
|
+
IDmissionSDK.renderCustomerIdAndBiometricsEnrollment('#target-element', {
|
|
272
|
+
submissionToken: 'my-idmission-token',
|
|
273
|
+
enrollmentId: 'some-guy',
|
|
274
|
+
});
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
### CustomerBiometricsEnrollment
|
|
278
|
+
|
|
279
|
+
Render a fullscreen capture component that performs FaceValidation, and then stores the results in IDmission's customer database using the supplied `enrollmentId` for later verification or 1:N matching.
|
|
280
|
+
|
|
281
|
+
**Props**
|
|
282
|
+
|
|
283
|
+
<table>
|
|
284
|
+
<tr><td><code>submissionToken</code></td><td>a token generated with your IDmission credentials.</td></tr>
|
|
285
|
+
<tr><td><code>submissionUrl</code></td><td>URL to hit with all API requests. Default: https://api.idmission.com</td></tr>
|
|
286
|
+
<tr><td><code>enrollmentId</code></td><td>the unique identifier to use for the customer to be enrolled.</td></tr>
|
|
287
|
+
<tr><td><code>onBeforeSubmit</code> (optional)</td><td>callback function that fires immediately prior to submission, giving the client application an opportunity to specify custom asynchronous logic that mutates the request before it executes. The submission request is passed in as a parameter and a promise resolving to the updated request should be returned.</td></tr>
|
|
288
|
+
<tr><td><code>onComplete</code> (optional)</td><td>callback function that fires when the user has completed the CustomerIdAndBiometricsEnrollment flow. The SubmissionResponse from IDmission's API is passed as an argument to the customer's application for further handling, which indicates whether the user passed the validation check.</td></tr>
|
|
289
|
+
<tr><td><code>onEnrolled</code> (optional)</td><td>callback function that fires when the user has completed the CustomerIdAndBiometricsEnrollment flow successfully. The SubmissionResponse from IDmission's API is passed as an argument to the customer's application for further handling, which indicates whether the user passed the validation check.</td></tr>
|
|
290
|
+
<tr><td><code>onDenied</code> (optional)</td><td>callback function that fires when the user has completed the CustomerIdAndBiometricsEnrollment flow but could not be enrolled. The SubmissionResponse from IDmission's API is passed as an argument to the customer's application for further handling, which indicates whether the user passed the validation check.</td></tr>
|
|
291
|
+
<tr><td><code>captureSignature</code> (optional)</td><td>boolean indicating whether the user should be prompted to sign the screen before submission. Defaults to false.</td></tr>
|
|
292
|
+
<tr><td><code>captureSignatureVideo</code> (optional)</td><td>boolean indicating whether the user should be prompted to record themselves signing the screen before submission. Defaults to false.</td></tr>
|
|
293
|
+
<tr><td><code>captureAdditionalDocuments</code> (optional)</td><td>array of additional documents to be captured. Each element includes a name and description.</td></tr>
|
|
294
|
+
<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>
|
|
295
|
+
<tr><td><code>timeoutDurationMs</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>
|
|
296
|
+
<tr><td><code>assets</code> (optional)</td><td>object containing any asset overrides, for available options consult the Face Liveness Assets table above.</td></tr>
|
|
297
|
+
<tr><td><code>verbiage</code> (optional)</td><td>object containing any verbiage overrides, for available options consult the Face Liveness Verbiage table above.</td></tr>
|
|
298
|
+
<tr><td><code>geolocationEnabled</code> (optional)</td><td>boolean flag to indicate whether users should be prompted to share their location. Default is `true`.</td></tr>
|
|
299
|
+
<tr><td><code>geolocationRequired</code> (optional)</td><td>boolean flag to indicate whether users should be blocked from proceeding if they block location access. Default is `false`.</td></tr>
|
|
300
|
+
<tr><td><code>debugMode</code> (optional)</td><td>boolean flag to enable on-screen prediction information output. Default is `false`.</td></tr>
|
|
301
|
+
</table>
|
|
302
|
+
|
|
303
|
+
**Example**
|
|
304
|
+
|
|
305
|
+
```js
|
|
306
|
+
IDmissionSDK.renderCustomerBiometricsEnrollment('#target-element', {
|
|
307
|
+
submissionToken: 'my-idmission-token',
|
|
308
|
+
enrollmentId: 'some-guy',
|
|
309
|
+
});
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
### CustomerVerification
|
|
313
|
+
|
|
314
|
+
Render a fullscreen capture component that analyzes frames from the user's front-facing camera to determine whether the user matches a specified `enrollmentId` that they have previously registered in IDmission's customer database.
|
|
315
|
+
|
|
316
|
+
**Props**
|
|
317
|
+
|
|
318
|
+
<table>
|
|
319
|
+
<tr><td><code>submissionToken</code></td><td>a token generated with your IDmission credentials.</td></tr>
|
|
320
|
+
<tr><td><code>submissionUrl</code></td><td>URL to hit with all API requests. Default: https://api.idmission.com</td></tr>
|
|
321
|
+
<tr><td><code>enrollmentId</code></td><td>the unique identifier to match from previously enrolled customers.</td></tr>
|
|
322
|
+
<tr><td><code>onBeforeSubmit</code> (optional)</td><td>callback function that fires immediately prior to submission, giving the client application an opportunity to specify custom asynchronous logic that mutates the request before it executes. The submission request is passed in as a parameter and a promise resolving to the updated request should be returned.</td></tr>
|
|
323
|
+
<tr><td><code>onComplete</code> (optional)</td><td>callback function that fires when the user has completed the CustomerVerification flow. The SubmissionResponse from IDmission's API is passed as an argument to the customer's application for further handling, which indicates whether the user passed the validation check.</td></tr>
|
|
324
|
+
<tr><td><code>onCustomerMatched</code> (optional)</td><td>callback function that fires when the user has completed the CustomerVerification flow and matches the specified customer <code>enrollmentId</code>. The SubmissionResponse from IDmission's API is passed as an argument to the customer's application for further handling, which indicates whether the user passed the validation check.</td></tr>
|
|
325
|
+
<tr><td><code>onCustomerNotMatched</code> (optional)</td><td>callback function that fires when the user has completed the CustomerVerification flow but does not match the specified customer <code>enrollmentId</code>. The SubmissionResponse from IDmission's API is passed as an argument to the customer's application for further handling, which indicates whether the user passed the validation check.</td></tr>
|
|
326
|
+
<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>
|
|
327
|
+
<tr><td><code>timeoutDurationMs</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>
|
|
328
|
+
<tr><td><code>assets</code> (optional)</td><td>object containing any asset overrides, for available options consult the Face Liveness Assets table above.</td></tr>
|
|
329
|
+
<tr><td><code>verbiage</code> (optional)</td><td>object containing any verbiage overrides, for available options consult the Face Liveness Verbiage table above.</td></tr>
|
|
330
|
+
<tr><td><code>geolocationEnabled</code> (optional)</td><td>boolean flag to indicate whether users should be prompted to share their location. Default is `true`.</td></tr>
|
|
331
|
+
<tr><td><code>geolocationRequired</code> (optional)</td><td>boolean flag to indicate whether users should be blocked from proceeding if they block location access. Default is `false`.</td></tr>
|
|
332
|
+
<tr><td><code>debugMode</code> (optional)</td><td>boolean flag to enable on-screen prediction information output. Default is `false`.</td></tr>
|
|
333
|
+
</table>
|
|
334
|
+
|
|
335
|
+
**Example**
|
|
336
|
+
|
|
337
|
+
```js
|
|
338
|
+
IDmissionSDK.renderCustomerVerification('#target-element', {
|
|
339
|
+
submissionToken: 'my-idmission-token',
|
|
340
|
+
enrollmentId: 'some-guy',
|
|
341
|
+
});
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
### CustomerIdentification
|
|
345
|
+
|
|
346
|
+
Render a fullscreen capture component that analyzes frames from the user's front-facing camera to determine whether the user matches any previously registered customer in IDmission's customer database.
|
|
347
|
+
|
|
348
|
+
**Props**
|
|
349
|
+
|
|
350
|
+
<table>
|
|
351
|
+
<tr><td><code>submissionToken</code></td><td>a token generated with your IDmission credentials.</td></tr>
|
|
352
|
+
<tr><td><code>submissionUrl</code></td><td>URL to hit with all API requests. Default: https://api.idmission.com</td></tr>
|
|
353
|
+
<tr><td><code>onBeforeSubmit</code> (optional)</td><td>callback function that fires immediately prior to submission, giving the client application an opportunity to specify custom asynchronous logic that mutates the request before it executes. The submission request is passed in as a parameter and a promise resolving to the updated request should be returned.</td></tr>
|
|
354
|
+
<tr><td><code>onComplete</code> (optional)</td><td>callback function that fires when the user has completed the CustomerIdentification flow. The SubmissionResponse from IDmission's API is passed as an argument to the customer's application for further handling, which indicates whether the user passed the validation check.</td></tr>
|
|
355
|
+
<tr><td><code>onCustomerMatched</code> (optional)</td><td>callback function that fires when the user has completed the CustomerIdentification flow and matches a pre-registered customer <code>enrollmentId</code> in IDmission's database. The SubmissionResponse from IDmission's API is passed as an argument to the customer's application for further handling, which indicates whether the user passed the validation check.</td></tr>
|
|
356
|
+
<tr><td><code>onCustomerNotMatched</code> (optional)</td><td>callback function that fires when the user has completed the CustomerIdentification flow but does not match any registered customer. The SubmissionResponse from IDmission's API is passed as an argument to the customer's application for further handling, which indicates whether the user passed the validation check.</td></tr>
|
|
357
|
+
<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>
|
|
358
|
+
<tr><td><code>assets</code> (optional)</td><td>object containing any asset overrides, for available options consult the Assets table below.</td></tr>
|
|
359
|
+
<tr><td><code>verbiage</code> (optional)</td><td>object containing any verbiage overrides, for available options consult the Verbiage table below.</td></tr>
|
|
360
|
+
<tr><td><code>geolocationEnabled</code> (optional)</td><td>boolean flag to indicate whether users should be prompted to share their location. Default is `true`.</td></tr>
|
|
361
|
+
<tr><td><code>geolocationRequired</code> (optional)</td><td>boolean flag to indicate whether users should be blocked from proceeding if they block location access. Default is `false`.</td></tr>
|
|
362
|
+
<tr><td><code>debugMode</code> (optional)</td><td>boolean flag to enable on-screen prediction information output. Default is `false`.</td></tr>
|
|
363
|
+
</table>
|
|
364
|
+
|
|
365
|
+
**Customer Identification Assets**
|
|
366
|
+
|
|
367
|
+
<table>
|
|
368
|
+
<tr><td><code>instructionImageUrl</code></td><td>Default: https://websdk-cdn-dev.idmission.com/assets/Selfie-Image-1.png</td></tr>
|
|
369
|
+
<tr><td><code>failureImageUrl</code></td><td>Default: https://websdk-cdn-dev.idmission.com/assets/manual_capture.png</td></tr>
|
|
370
|
+
</table>
|
|
371
|
+
|
|
372
|
+
**Customer Identification Verbiage**
|
|
373
|
+
|
|
374
|
+
<table>
|
|
375
|
+
<tr><td><code>loadingOverlayHeadingText</code></td><td>Default: "Use your device camera to capture your face"</td></tr>
|
|
376
|
+
<tr><td><code>loadingOverlayRemoveEyeCoveringsText</code></td><td>Default: "Remove Sunglasses & Hat"</td></tr>
|
|
377
|
+
<tr><td><code>loadingOverlayAvoidExcessiveBacklightingText</code></td><td>Default: "Avoid Excessive Backlighting"</td></tr>
|
|
378
|
+
<tr><td><code>loadingOverlayContinueText</code></td><td>Default: "Continue"</td></tr>
|
|
379
|
+
<tr><td><code>loadingOverlayCameraInitializingText</code></td><td>Default: "Camera initializing..."</td></tr>
|
|
380
|
+
<tr><td><code>loadingOverlayModelsWarmingUpText</code></td><td>Default: "Models warming up..."</td></tr>
|
|
381
|
+
<tr><td><code>guidanceHoldStillText</code></td><td>Default: "Hold still for a few seconds..."</td></tr>
|
|
382
|
+
<tr><td><code>guidanceLookStraightText</code></td><td>Default: "Look straight into the camera..."</td></tr>
|
|
383
|
+
<tr><td><code>guidanceMoveBackText</code></td><td>Default: "Move back..."</td></tr>
|
|
384
|
+
<tr><td><code>guidanceMoveForwardText</code></td><td>Default: "Move forward..."</td></tr>
|
|
385
|
+
<tr><td><code>guidanceMoveToCenterText</code></td><td>Default: "Move to the center..."</td></tr>
|
|
386
|
+
<tr><td><code>successHeadingText</code></td><td>Default: "Customer has been identified!"</td></tr>
|
|
387
|
+
<tr><td><code>successRetryBtnText</code></td><td>Default: "Retry"</td></tr>
|
|
388
|
+
<tr><td><code>successDoneBtnText</code></td><td>Default: "Done"</td></tr>
|
|
389
|
+
<tr><td><code>failureHeadingText</code></td><td>Default: "Customer not found"</td></tr>
|
|
390
|
+
<tr><td><code>failureRetryBtnText</code></td><td>Default: "Retry"</td></tr>
|
|
391
|
+
<tr><td><code>failureExitBtnText</code></td><td>Default: "Exit"</td></tr>
|
|
392
|
+
</table>
|
|
393
|
+
|
|
394
|
+
**Example**
|
|
395
|
+
|
|
396
|
+
```js
|
|
397
|
+
IDmissionSDK.renderCustomerIdentification('#target-element', { submissionToken: 'my-idmission-token' });
|
|
398
|
+
```
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { IdCaptureWizardProps } from './id_capture/IdCaptureWizard';
|
|
3
|
+
import { FaceLivenessWizardProps } from './face_liveness/FaceLivenessWizard';
|
|
4
|
+
import { SubmissionAction, SubmissionEnvironment, SubmissionResponse } from '../contexts/SubmissionContext';
|
|
5
|
+
import { AdditionalDocumentCaptureWizardProps } from './additional_document_capture/AdditionalDocumentCaptureWizard';
|
|
6
|
+
import { SignatureCaptureProps } from './signature_capture/SignatureCapture';
|
|
7
|
+
import { SignatureKYCWizardProps } from './signature_kyc/SignatureKYCWizard';
|
|
8
|
+
export type CompositeWizardCheck = 'IdCapture' | 'FaceLiveness' | 'SignatureCapture' | 'SignatureKYC' | 'AdditionalDocumentCapture';
|
|
9
|
+
export type CompositeWizardComponentProps = {
|
|
10
|
+
checks: CompositeWizardCheck[];
|
|
11
|
+
idCaptureProps?: IdCaptureWizardProps;
|
|
12
|
+
faceLivenessProps?: FaceLivenessWizardProps;
|
|
13
|
+
signatureCaptureProps?: SignatureCaptureProps;
|
|
14
|
+
signatureKYCProps?: SignatureKYCWizardProps;
|
|
15
|
+
additionalDocumentCaptureProps?: AdditionalDocumentCaptureWizardProps;
|
|
16
|
+
captureSignature?: boolean | (() => Promise<boolean>);
|
|
17
|
+
captureSignatureVideo?: boolean | (() => Promise<boolean>);
|
|
18
|
+
};
|
|
19
|
+
export type CompositeWizardProps = CompositeWizardComponentProps & {
|
|
20
|
+
submissionToken: string;
|
|
21
|
+
submissionAction?: SubmissionAction;
|
|
22
|
+
submissionEnvironment?: SubmissionEnvironment;
|
|
23
|
+
submissionUrl?: string;
|
|
24
|
+
onComplete?: (submissionResponse: SubmissionResponse) => void;
|
|
25
|
+
};
|
|
26
|
+
export declare const CompositeWizard: (props: CompositeWizardProps) => ReactElement;
|
|
27
|
+
export declare const CompositeWizardComponent: ({ checks: userChecks, idCaptureProps, faceLivenessProps, signatureCaptureProps, signatureKYCProps, additionalDocumentCaptureProps, captureSignature, captureSignatureVideo, }: CompositeWizardComponentProps) => ReactElement;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
export type AdditionalDocument = {
|
|
3
|
+
name: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
skip?: () => Promise<boolean>;
|
|
6
|
+
};
|
|
7
|
+
export type UploadedDocument = {
|
|
8
|
+
documentName: string;
|
|
9
|
+
additionalDocument: string | Record<string, string>;
|
|
10
|
+
};
|
|
11
|
+
export type AdditionalDocumentCaptureProps = {
|
|
12
|
+
document: AdditionalDocument;
|
|
13
|
+
onComplete?: (uploadedDocument: UploadedDocument) => void;
|
|
14
|
+
headingText?: string;
|
|
15
|
+
nextBtnText?: string;
|
|
16
|
+
};
|
|
17
|
+
export declare const AdditionalDocumentCapture: ({ document, onComplete, headingText, nextBtnText, }: AdditionalDocumentCaptureProps) => ReactElement;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { AdditionalDocument, UploadedDocument } from './AdditionalDocumentCapture';
|
|
3
|
+
export type NamespacedAdditionalDocumentsVerbiage = {
|
|
4
|
+
additionalDocumentsHeadingText?: string;
|
|
5
|
+
additionalDocumentsNextBtnText?: string;
|
|
6
|
+
};
|
|
7
|
+
export type AdditionalDocumentCaptureVerbiage = {
|
|
8
|
+
headingText?: string;
|
|
9
|
+
nextBtnText?: string;
|
|
10
|
+
};
|
|
11
|
+
export type AdditionalDocumentCaptureWizardProps = {
|
|
12
|
+
documents: AdditionalDocument[];
|
|
13
|
+
onComplete?: (uploadedDocuments: UploadedDocument[]) => void;
|
|
14
|
+
verbiage?: AdditionalDocumentCaptureVerbiage;
|
|
15
|
+
};
|
|
16
|
+
export declare const AdditionalDocumentCaptureWizard: ({ documents, onComplete, verbiage, }: AdditionalDocumentCaptureWizardProps) => ReactElement;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
type CameraProviderProps = {
|
|
3
|
+
children: ReactElement;
|
|
4
|
+
preferFrontFacingCamera?: boolean;
|
|
5
|
+
preferContinuityCamera?: boolean;
|
|
6
|
+
requestMicrophoneAccess?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare const CameraProvider: ({ children, preferFrontFacingCamera, preferContinuityCamera, requestMicrophoneAccess, }: CameraProviderProps) => ReactElement;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React, { ReactElement } from 'react';
|
|
2
|
+
export declare const CameraVideoTag: () => ReactElement;
|
|
3
|
+
export declare const FullscreenVideoTag: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, {
|
|
4
|
+
$isRearFacing?: boolean | undefined;
|
|
5
|
+
}>>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
export declare const PageContainerDiv: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
3
|
+
$heightOffset?: number | undefined;
|
|
4
|
+
}>>;
|
|
5
|
+
export declare const PageContainer: React.ForwardRefExoticComponent<Pick<{
|
|
6
|
+
ref?: React.RefCallback<HTMLDivElement> | undefined;
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
className?: string | undefined;
|
|
9
|
+
heightOffset?: number | undefined;
|
|
10
|
+
style?: React.CSSProperties | undefined;
|
|
11
|
+
onClick?: (() => void) | undefined;
|
|
12
|
+
}, "className" | "style" | "children" | "onClick" | "heightOffset"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const DEFAULT_CDN_URL = "https://websdk-cdn-dev.idmission.com/assets";
|