idmission-web-sdk 1.0.313 → 1.0.314

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/README.md +122 -46
  2. package/dist/components/CompositeWizard.d.ts +3 -3
  3. package/dist/components/customer_flows/CustomerBiometricsEnrollment.d.ts +15 -2
  4. package/dist/components/customer_flows/CustomerIdAndBiometricsEnrollment.d.ts +17 -4
  5. package/dist/components/customer_flows/CustomerIdentification.d.ts +15 -2
  6. package/dist/components/customer_flows/CustomerVerification.d.ts +15 -2
  7. package/dist/components/customer_flows/DocumentCapture.d.ts +15 -6
  8. package/dist/components/customer_flows/FaceValidation.d.ts +17 -2
  9. package/dist/components/customer_flows/IdAndFaceValidation.d.ts +18 -5
  10. package/dist/components/customer_flows/IdValidation.d.ts +18 -5
  11. package/dist/components/customer_flows/SignatureKYC.d.ts +17 -2
  12. package/dist/components/customer_flows/VideoIdValidation.d.ts +17 -2
  13. package/dist/components/document_capture/DocumentCaptureStateProvider.d.ts +1 -1
  14. package/dist/components/submission/AuthUrlNotAllowedOverlay.d.ts +2 -0
  15. package/dist/components/submission/Errors.d.ts +1 -1
  16. package/dist/components/submission/SessionIdMissingOverlay.d.ts +2 -0
  17. package/dist/components/submission/SessionValidationErrorOverlay.d.ts +6 -0
  18. package/dist/components/submission/SessionValidationFailedOverlay.d.ts +2 -0
  19. package/dist/components/submission/SubmissionProvider.d.ts +24 -5
  20. package/dist/contexts/AuthStateContext.d.ts +33 -0
  21. package/dist/contexts/SubmissionContext.d.ts +9 -3
  22. package/dist/index.d.ts +7 -1
  23. package/dist/lib/utils/dataUrlToBase64.d.ts +2 -0
  24. package/dist/sdk2.cjs.development.js +832 -562
  25. package/dist/sdk2.cjs.development.js.map +1 -1
  26. package/dist/sdk2.cjs.production.js +1 -1
  27. package/dist/sdk2.cjs.production.js.map +1 -1
  28. package/dist/sdk2.esm.js +832 -565
  29. package/dist/sdk2.esm.js.map +1 -1
  30. package/dist/sdk2.umd.development.js +835 -566
  31. package/dist/sdk2.umd.development.js.map +1 -1
  32. package/dist/sdk2.umd.production.js +1 -1
  33. package/dist/sdk2.umd.production.js.map +1 -1
  34. package/dist/stories/Auth.stories.d.ts +8 -0
  35. package/dist/stories/Components/CompositeWizard/FaceLivenessAndIdCapture.stories.d.ts +0 -9
  36. package/dist/stories/CustomerFlows/CustomerBiometricsEnrollment.stories.d.ts +5 -1
  37. package/dist/stories/CustomerFlows/CustomerIdAndBiometricsEnrollment.stories.d.ts +5 -1
  38. package/dist/stories/CustomerFlows/CustomerIdentification.stories.d.ts +5 -1
  39. package/dist/stories/CustomerFlows/CustomerVerification.stories.d.ts +5 -1
  40. package/dist/stories/CustomerFlows/DocumentCapture.stories.d.ts +5 -1
  41. package/dist/stories/CustomerFlows/FaceValidation.stories.d.ts +5 -1
  42. package/dist/stories/CustomerFlows/IdAndFaceValidation.stories.d.ts +5 -1
  43. package/dist/stories/CustomerFlows/IdValidation.stories.d.ts +5 -1
  44. package/dist/stories/CustomerFlows/SignatureKYC.stories.d.ts +5 -1
  45. package/dist/stories/CustomerFlows/VideoIdValidation.stories.d.ts +14 -1
  46. package/dist/stories/utils/sessions.d.ts +13 -0
  47. package/dist/stories/utils/useLocalStorage.d.ts +1 -0
  48. package/dist/version.d.ts +1 -1
  49. package/package.json +1 -1
  50. package/dist/components/submission/TokenIssuerNotAllowedErrorOverlay.d.ts +0 -2
  51. package/dist/components/submission/TokenMissingErrorOverlay.d.ts +0 -2
  52. package/dist/components/submission/TokenPublicKeyErrorOverlay.d.ts +0 -5
package/README.md CHANGED
@@ -6,21 +6,16 @@ Storybook: https://websdk2test.idmission.com
6
6
 
7
7
  ## Getting Started
8
8
 
9
- Before using the IDmission WebSDK, you should make sure you can fetch a token. New customers receive their token generation credentials via email. If you haven't received them, reach out to support@idmission.com.
9
+ Before using the IDmission WebSDK, you will need to obtain an API key. New customers receive their API credentials via email. If you haven't received them, reach out to support@idmission.com.
10
10
 
11
11
  To test that your credentials are valid:
12
12
  ```bash
13
- curl --location --request POST 'https://auth.idmission.com/auth/realms/identity/protocol/openid-connect/token' \
14
- --header 'Content-Type: application/x-www-form-urlencoded' \
15
- --data-urlencode 'grant_type=password' \
16
- --data-urlencode 'client_id=' \
17
- --data-urlencode 'client_secret=' \
18
- --data-urlencode 'username=' \
19
- --data-urlencode 'password=' \
20
- --data-urlencode 'scope=api_access'
13
+ curl -s -H "Content-Type: application/json" \
14
+ -d '{"api_key_id": "your-api-key-id", "api_key_secret": "your-api-secret"}' \
15
+ https://portal-api.idmission.com/portal.sessions.v1.SessionsService/CreateSession
21
16
  ```
22
17
 
23
- Prior to initializing the WebSDK on the client, you should generate a token on your server using these credentials. Be careful not to leak them on the client side! The generated token is safe to pass to the client, but the secrets used to generate them are not. If you have inadvertently leaked your client secret, react out to support@idmission.com to rotate your credentials.
18
+ Prior to initializing the WebSDK on the client, you should generate a session on your server using these credentials. Be careful not to leak them on the client side! The generated session id is safe to pass to the client, but the secrets used to generate them are not. If you have inadvertently leaked your credentials, react out to support@idmission.com to rotate them.
24
19
 
25
20
  If you are using NodeJS, check out our [auth client for server-side JavaScript](https://www.npmjs.com/package/idmission-auth-client).
26
21
 
@@ -35,7 +30,7 @@ import React from 'react'
35
30
  import { render } from 'react-dom'
36
31
  import { IdValidation } from 'idmission-web-sdk'
37
32
 
38
- render(<IdValidation submissionToken={YOUR_TOKEN} />, document.getElementById('root'))
33
+ render(<IdValidation sessionId={YOUR_SESSION_ID} />, document.getElementById('root'))
39
34
  ```
40
35
 
41
36
  ## Basic Usage in HTML
@@ -58,7 +53,7 @@ You may subscribe to the `idmission-web-sdk.ready` event to be notified when loa
58
53
  Then you may call any render method below, for example `renderIdValidation`, like so:
59
54
  ```html
60
55
  <script type="module">
61
- IDmissionSDK.renderIdValidation('#target-element', { submissionToken: 'my-idmission-token' });
56
+ IDmissionSDK.renderIdValidation('#target-element', { sessionId: 'my-idmission-session-id' });
62
57
  </script>
63
58
  ```
64
59
 
@@ -71,8 +66,14 @@ Render a fullscreen ID capture component that instructs the user to photograph b
71
66
  **Props**
72
67
 
73
68
  <table>
74
- <tr><td><code>submissionToken</code></td><td>a token generated with your IDmission credentials.</td></tr>
75
- <tr><td><code>submissionUrl</code> (optional)</td><td>URL to hit with all API requests. Default: https://api.idmission.com</td></tr>
69
+ <tr><td><code>sessionId</code></td><td>a session id generated with your IDmission credentials, or an async function that resolves to one.</td></tr>
70
+ <tr><td><code>authUrl</code> (optional)</td><td>URL to authenticate against. Default: https://portal-api.idmission.com</td></tr>
71
+ <tr><td><code>submissionUrl</code> (optional)</td><td>URL to submit data to. Default: https://portal-api.idmission.com/swagger</td></tr>
72
+ <tr><td><code>documentServiceUrl</code> (optional)</td><td>URL to upload image/video/audio assets to via [tus](https://tus.io/). Default: https://portal-api.idmission.com/files/</td></tr>
73
+ <tr><td><code>onBeforeDocumentUpload</code> (optional)</td><td>callback function that fires immediately prior to each document upload, giving the client application an opportunity to specify custom asynchronous logic that captures the document contents before it is exchanged for a document token. The document content and metadata are passed in as parameters and a promise resolving to void or false should be returned. If the returned promise resolves to false, the document will not be uploaded.</td></tr>
74
+ <tr><td><code>onDocumentUploadProgress</code> (optional)</td><td>callback function that fires when progress information is available for a document upload. The progress info and metadata are passed in as parameters.</td></tr>
75
+ <tr><td><code>onDocumentUploaded</code> (optional)</td><td>callback function that fires immediately after each document upload, giving the client application an opportunity to specify custom asynchronous logic that captures the document token. The document token and metadata are passed in as parameters.</td></tr>
76
+ <tr><td><code>onDocumentUploadFailed</code> (optional)</td><td>callback function that fires when a document failed to upload. The error and metadata are passed in as parameters.</td></tr>
76
77
  <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>
77
78
  <tr><td><code>onComplete</code> (optional)</td><td>callback function that fires when the user completes the IDValidation flow. Arguments: 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, and the request payload dispatched to IDmission's API, which contains the images submitted by the user.</td></tr>
78
79
  <tr><td><code>onApproved</code> (optional)</td><td>callback function that fires when the user completes the IDValidation flow with a valid ID. Arguments: same as onComplete.</td></tr>
@@ -83,14 +84,19 @@ Render a fullscreen ID capture component that instructs the user to photograph b
83
84
  <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>
84
85
  <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>
85
86
  <tr><td><code>captureAdditionalDocuments</code> (optional)</td><td>array of additional documents to be captured. Each element includes a name and description.</td></tr>
86
- <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>
87
+ <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>
87
88
  <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>
88
89
  <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>
89
90
  <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>
90
91
  <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>
91
- <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>
92
- <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>
92
+ <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>
93
+ <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>
93
94
  <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>
95
+ <tr><td><code>instructions</code> (optional)</td><td>React element or string to render on the instructions screen.</td></tr>
96
+ <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>
97
+ <tr><td><code>portraitGuidesOnMobile</code> (optional)</td><td>boolean to indicate whether guide images should be rotated on mobile. Defaults to false.</td></tr>
98
+ <tr><td><code>rotateLoadingOverlayImageWhenPortrait</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>
99
+ <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>
94
100
  <tr><td><code>companyId</code> (optional)</td><td>company identifier to include with submission.</td></tr>
95
101
  <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>
96
102
  <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>
@@ -109,6 +115,7 @@ Render a fullscreen ID capture component that instructs the user to photograph b
109
115
  <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>
110
116
  <tr><td><code>assets</code> (optional)</td><td>object containing any asset overrides, for available options consult the Assets table below.</td></tr>
111
117
  <tr><td><code>colors</code> (optional)</td><td>object containing any color overrides, for available options consult the Colors table below.</td></tr>
118
+ <tr><td><code>theme</code> (optional)</td><td>name of an included theme or object containing theme properties.</td></tr>
112
119
  <tr><td><code>verbiage</code> (optional)</td><td>object containing any verbiage overrides, for available options consult the Verbiage table below.</td></tr>
113
120
  <tr><td><code>geolocationEnabled</code> (optional)</td><td>boolean flag to indicate whether users should be prompted to share their location. Defaults to true.</td></tr>
114
121
  <tr><td><code>geolocationRequired</code> (optional)</td><td>boolean flag to indicate whether users should be blocked from proceeding if they block location access. Defaults to false.</td></tr>
@@ -199,7 +206,7 @@ Render a fullscreen ID capture component that instructs the user to photograph b
199
206
 
200
207
  ```js
201
208
  IDmissionSDK.renderIdValidation('#target-element', {
202
- submissionToken: 'my-idmission-token',
209
+ sessionId: 'my-idmission-session-id',
203
210
  onApproved: (submissionResponse) => {
204
211
  alert('Your ID has been validated, proceed to the next checkpoint.')
205
212
  },
@@ -216,8 +223,14 @@ Render a fullscreen capture component that analyzes frames from the user's front
216
223
  **Props**
217
224
 
218
225
  <table>
219
- <tr><td><code>submissionToken</code></td><td>a token generated with your IDmission credentials.</td></tr>
220
- <tr><td><code>submissionUrl</code> (optional)</td><td>URL to hit with all API requests. Default: https://api.idmission.com</td></tr>
226
+ <tr><td><code>sessionId</code></td><td>a session id generated with your IDmission credentials, or an async function that resolves to one.</td></tr>
227
+ <tr><td><code>authUrl</code> (optional)</td><td>URL to authenticate against. Default: https://portal-api.idmission.com</td></tr>
228
+ <tr><td><code>submissionUrl</code> (optional)</td><td>URL to submit data to. Default: https://portal-api.idmission.com/swagger</td></tr>
229
+ <tr><td><code>documentServiceUrl</code> (optional)</td><td>URL to upload image/video/audio assets to via [tus](https://tus.io/). Default: https://portal-api.idmission.com/files/</td></tr>
230
+ <tr><td><code>onBeforeDocumentUpload</code> (optional)</td><td>callback function that fires immediately prior to each document upload, giving the client application an opportunity to specify custom asynchronous logic that captures the document contents before it is exchanged for a document token. The document content and metadata are passed in as parameters and a promise resolving to void or false should be returned. If the returned promise resolves to false, the document will not be uploaded.</td></tr>
231
+ <tr><td><code>onDocumentUploadProgress</code> (optional)</td><td>callback function that fires when progress information is available for a document upload. The progress info and metadata are passed in as parameters.</td></tr>
232
+ <tr><td><code>onDocumentUploaded</code> (optional)</td><td>callback function that fires immediately after each document upload, giving the client application an opportunity to specify custom asynchronous logic that captures the document token. The document token and metadata are passed in as parameters.</td></tr>
233
+ <tr><td><code>onDocumentUploadFailed</code> (optional)</td><td>callback function that fires when a document failed to upload. The error and metadata are passed in as parameters.</td></tr>
221
234
  <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>
222
235
  <tr><td><code>onComplete</code> (optional)</td><td>callback function that fires when the user has completed the FaceValidation flow, regardless of whether they are approved or denied. Arguments: 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, and the request payload dispatched to IDmission's API, which contains the images submitted by the user.</td></tr>
223
236
  <tr><td><code>onApproved</code> (optional)</td><td>callback function that fires when the user completes the FaceValidation flow and passes the realness check. Arguments: same as onComplete.</td></tr>
@@ -226,6 +239,7 @@ Render a fullscreen capture component that analyzes frames from the user's front
226
239
  <tr><td><code>onExitAfterFailure</code> (optional)</td><td>callback function that fires when the user clicks the exit button after completing the FaceValidation flow and failing the realness check.</td></tr>
227
240
  <tr><td><code>onUserCancel</code> (optional)</td><td>callback function that fires when the user clicks the exit button from the loading overlay, declining to engage with IDmission. Binding this callback results in the cancel button being rendered on the loading overlay.</td></tr>
228
241
  <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>
242
+ <tr><td><code>loadingOverlayMode</code> (optional)</td><td>string indicating which loading overlay screen should be used. Supported values: default and legacy. Defaults to default.</td></tr>
229
243
  <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>
230
244
  <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>
231
245
  <tr><td><code>companyId</code> (optional)</td><td>company identifier to include with submission.</td></tr>
@@ -237,11 +251,10 @@ Render a fullscreen capture component that analyzes frames from the user's front
237
251
  <tr><td><code>webhooksSendProcessedImages</code> (optional)</td><td>boolean flag to indicate whether processed user-captured images should be included in the submission data when customer-configured webhooks are invoked. Defaults to false.</td></tr>
238
252
  <tr><td><code>assets</code> (optional)</td><td>object containing any asset overrides, for available options consult the Assets table below.</td></tr>
239
253
  <tr><td><code>colors</code> (optional)</td><td>object containing any color overrides, for available options consult the Colors table below.</td></tr>
254
+ <tr><td><code>theme</code> (optional)</td><td>name of an included theme or object containing theme properties.</td></tr>
240
255
  <tr><td><code>verbiage</code> (optional)</td><td>object containing any verbiage overrides, for available options consult the Verbiage table below.</td></tr>
241
256
  <tr><td><code>geolocationEnabled</code> (optional)</td><td>boolean flag to indicate whether users should be prompted to share their location. Defaults to true.</td></tr>
242
257
  <tr><td><code>geolocationRequired</code> (optional)</td><td>boolean flag to indicate whether users should be blocked from proceeding if they block location access. Defaults to false.</td></tr>
243
- <tr><td><code>geolocationEnabled</code> (optional)</td><td>boolean flag to indicate whether users should be prompted to share their location. Defaults to true.</td></tr>
244
- <tr><td><code>geolocationRequired</code> (optional)</td><td>boolean flag to indicate whether users should be blocked from proceeding if they block location access. Defaults to false.</td></tr>
245
258
  <tr><td><code>debugMode</code> (optional)</td><td>boolean flag to enable on-screen prediction information output. Defaults to false.</td></tr>
246
259
  </table>
247
260
 
@@ -311,7 +324,7 @@ Render a fullscreen capture component that analyzes frames from the user's front
311
324
 
312
325
  ```js
313
326
  IDmissionSDK.renderFaceValidation('#target-element', {
314
- submissionToken: 'my-idmission-token',
327
+ sessionId: 'my-idmission-session-id',
315
328
  onApproved: (submissionResponse) => {
316
329
  alert('Your face is real, proceed to the next checkpoint.')
317
330
  },
@@ -328,8 +341,14 @@ Render a fullscreen capture component that performs IDValidation and FaceValidat
328
341
  **Props**
329
342
 
330
343
  <table>
331
- <tr><td><code>submissionToken</code></td><td>a token generated with your IDmission credentials.</td></tr>
332
- <tr><td><code>submissionUrl</code> (optional)</td><td>URL to hit with all API requests. Default: https://api.idmission.com</td></tr>
344
+ <tr><td><code>sessionId</code></td><td>a session id generated with your IDmission credentials, or an async function that resolves to one.</td></tr>
345
+ <tr><td><code>authUrl</code> (optional)</td><td>URL to authenticate against. Default: https://portal-api.idmission.com</td></tr>
346
+ <tr><td><code>submissionUrl</code> (optional)</td><td>URL to submit data to. Default: https://portal-api.idmission.com/swagger</td></tr>
347
+ <tr><td><code>documentServiceUrl</code> (optional)</td><td>URL to upload image/video/audio assets to via [tus](https://tus.io/). Default: https://portal-api.idmission.com/files/</td></tr>
348
+ <tr><td><code>onBeforeDocumentUpload</code> (optional)</td><td>callback function that fires immediately prior to each document upload, giving the client application an opportunity to specify custom asynchronous logic that captures the document contents before it is exchanged for a document token. The document content and metadata are passed in as parameters and a promise resolving to void or false should be returned. If the returned promise resolves to false, the document will not be uploaded.</td></tr>
349
+ <tr><td><code>onDocumentUploadProgress</code> (optional)</td><td>callback function that fires when progress information is available for a document upload. The progress info and metadata are passed in as parameters.</td></tr>
350
+ <tr><td><code>onDocumentUploaded</code> (optional)</td><td>callback function that fires immediately after each document upload, giving the client application an opportunity to specify custom asynchronous logic that captures the document token. The document token and metadata are passed in as parameters.</td></tr>
351
+ <tr><td><code>onDocumentUploadFailed</code> (optional)</td><td>callback function that fires when a document failed to upload. The error and metadata are passed in as parameters.</td></tr>
333
352
  <tr><td><code>onBeforeLivenessCheck</code> (optional)</td><td>callback function that fires immediately prior to liveness check, giving the client application an opportunity to specify custom asynchronous logic that mutates the request before it executes. The liveness check request is passed in as a parameter and a promise resolving to the updated request should be returned.</td></tr>
334
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>
335
354
  <tr><td><code>onComplete</code> (optional)</td><td>callback function that fires when the user has completed both flows. Arguments: 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, and the request payload dispatched to IDmission's API, which contains the images submitted by the user.</td></tr>
@@ -342,15 +361,21 @@ Render a fullscreen capture component that performs IDValidation and FaceValidat
342
361
  <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>
343
362
  <tr><td><code>captureAdditionalDocuments</code> (optional)</td><td>array of additional documents to be captured. Each element includes a name and description.</td></tr>
344
363
  <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>
345
- <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>
364
+ <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>
365
+ <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>
346
366
  <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>
347
367
  <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>
348
368
  <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>
349
369
  <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>
350
- <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>
351
- <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>
370
+ <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>
371
+ <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>
372
+ <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>
352
373
  <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>
353
374
  <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>
375
+ <tr><td><code>idCaptureInstructions</code> (optional)</td><td>React element or string to render on the instructions screen.</td></tr>
376
+ <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>
377
+ <tr><td><code>idCapturePortraitGuidesOnMobile</code> (optional)</td><td>boolean to indicate whether guide images should be rotated on mobile. Defaults to false.</td></tr>
378
+ <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>
354
379
  <tr><td><code>companyId</code> (optional)</td><td>company identifier to include with submission.</td></tr>
355
380
  <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>
356
381
  <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>
@@ -367,6 +392,7 @@ Render a fullscreen capture component that performs IDValidation and FaceValidat
367
392
  <tr><td><code>webhooksSendInputImages</code> (optional)</td><td>boolean flag to indicate whether raw user-captured images should be included in the submission data when customer-configured webhooks are invoked. Defaults to false.</td></tr>
368
393
  <tr><td><code>webhooksSendProcessedImages</code> (optional)</td><td>boolean flag to indicate whether processed user-captured images should be included in the submission data when customer-configured webhooks are invoked. Defaults to false.</td></tr>
369
394
  <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>
395
+ <tr><td><code>theme</code> (optional)</td><td>name of an included theme or object containing theme properties.</td></tr>
370
396
  <tr><td><code>assets.idCapture</code> (optional)</td><td>object containing any asset overrides, for available options consult the ID Capture Assets table above.</td></tr>
371
397
  <tr><td><code>assets.faceLiveness</code> (optional)</td><td>object containing any asset overrides, for available options consult the Face Liveness Assets table above.</td></tr>
372
398
  <tr><td><code>colors.idCapture</code> (optional)</td><td>object containing any color overrides, for available options consult the ID Capture Colors table above.</td></tr>
@@ -384,7 +410,7 @@ Render a fullscreen capture component that performs IDValidation and FaceValidat
384
410
 
385
411
  ```js
386
412
  IDmissionSDK.renderIdAndFaceValidation('#target-element', {
387
- submissionToken: 'my-idmission-token',
413
+ sessionId: 'my-idmission-session-id',
388
414
  onApproved: (submissionResponse) => {
389
415
  alert('Your ID has been validated and your face is real, proceed to the next checkpoint.')
390
416
  },
@@ -401,8 +427,14 @@ Render a fullscreen capture component that performs IDValidation and FaceValidat
401
427
  **Props**
402
428
 
403
429
  <table>
404
- <tr><td><code>submissionToken</code></td><td>a token generated with your IDmission credentials.</td></tr>
405
- <tr><td><code>submissionUrl</code> (optional)</td><td>URL to hit with all API requests. Default: https://api.idmission.com</td></tr>
430
+ <tr><td><code>sessionId</code></td><td>a session id generated with your IDmission credentials, or an async function that resolves to one.</td></tr>
431
+ <tr><td><code>authUrl</code> (optional)</td><td>URL to authenticate against. Default: https://portal-api.idmission.com</td></tr>
432
+ <tr><td><code>submissionUrl</code> (optional)</td><td>URL to submit data to. Default: https://portal-api.idmission.com/swagger</td></tr>
433
+ <tr><td><code>documentServiceUrl</code> (optional)</td><td>URL to upload image/video/audio assets to via [tus](https://tus.io/). Default: https://portal-api.idmission.com/files/</td></tr>
434
+ <tr><td><code>onBeforeDocumentUpload</code> (optional)</td><td>callback function that fires immediately prior to each document upload, giving the client application an opportunity to specify custom asynchronous logic that captures the document contents before it is exchanged for a document token. The document content and metadata are passed in as parameters and a promise resolving to void or false should be returned. If the returned promise resolves to false, the document will not be uploaded.</td></tr>
435
+ <tr><td><code>onDocumentUploadProgress</code> (optional)</td><td>callback function that fires when progress information is available for a document upload. The progress info and metadata are passed in as parameters.</td></tr>
436
+ <tr><td><code>onDocumentUploaded</code> (optional)</td><td>callback function that fires immediately after each document upload, giving the client application an opportunity to specify custom asynchronous logic that captures the document token. The document token and metadata are passed in as parameters.</td></tr>
437
+ <tr><td><code>onDocumentUploadFailed</code> (optional)</td><td>callback function that fires when a document failed to upload. The error and metadata are passed in as parameters.</td></tr>
406
438
  <tr><td><code>enrollmentId</code></td><td>the unique identifier to use for the customer to be enrolled. Overrides <code>personalData.uniqueNumber</code> if both are specified.</td></tr>
407
439
  <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>
408
440
  <tr><td><code>onComplete</code> (optional)</td><td>callback function that fires when the user has completed the CustomerIdAndBiometricsEnrollment flow. Arguments: 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, and the request payload dispatched to IDmission's API, which contains the images submitted by the user.</td></tr>
@@ -415,14 +447,20 @@ Render a fullscreen capture component that performs IDValidation and FaceValidat
415
447
  <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>
416
448
  <tr><td><code>captureAdditionalDocuments</code> (optional)</td><td>array of additional documents to be captured. Each element includes a name and description.</td></tr>
417
449
  <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>
450
+ <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>
418
451
  <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>
419
452
  <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>
420
453
  <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>
421
454
  <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>
422
- <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>
423
- <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>
455
+ <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>
456
+ <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>
457
+ <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>
424
458
  <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>
425
459
  <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>
460
+ <tr><td><code>idCaptureInstructions</code> (optional)</td><td>React element or string to render on the instructions screen.</td></tr>
461
+ <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>
462
+ <tr><td><code>idCapturePortraitGuidesOnMobile</code> (optional)</td><td>boolean to indicate whether guide images should be rotated on mobile. Defaults to false.</td></tr>
463
+ <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>
426
464
  <tr><td><code>companyId</code> (optional)</td><td>company identifier to include with submission.</td></tr>
427
465
  <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>
428
466
  <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>
@@ -441,6 +479,7 @@ Render a fullscreen capture component that performs IDValidation and FaceValidat
441
479
  <tr><td><code>webhooksSendInputImages</code> (optional)</td><td>boolean flag to indicate whether raw user-captured images should be included in the submission data when customer-configured webhooks are invoked. Defaults to false.</td></tr>
442
480
  <tr><td><code>webhooksSendProcessedImages</code> (optional)</td><td>boolean flag to indicate whether processed user-captured images should be included in the submission data when customer-configured webhooks are invoked. Defaults to false.</td></tr>
443
481
  <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>
482
+ <tr><td><code>theme</code> (optional)</td><td>name of an included theme or object containing theme properties.</td></tr>
444
483
  <tr><td><code>assets.idCapture</code> (optional)</td><td>object containing any asset overrides, for available options consult the ID Capture Assets table above.</td></tr>
445
484
  <tr><td><code>assets.faceLiveness</code> (optional)</td><td>object containing any asset overrides, for available options consult the Face Liveness Assets table above.</td></tr>
446
485
  <tr><td><code>colors.idCapture</code> (optional)</td><td>object containing any color overrides, for available options consult the ID Capture Colors table above.</td></tr>
@@ -460,7 +499,7 @@ Render a fullscreen capture component that performs IDValidation and FaceValidat
460
499
 
461
500
  ```js
462
501
  IDmissionSDK.renderCustomerIdAndBiometricsEnrollment('#target-element', {
463
- submissionToken: 'my-idmission-token',
502
+ sessionId: 'my-idmission-session-id',
464
503
  enrollmentId: 'some-guy',
465
504
  });
466
505
  ```
@@ -472,8 +511,14 @@ Render a fullscreen capture component that performs FaceValidation, and then sto
472
511
  **Props**
473
512
 
474
513
  <table>
475
- <tr><td><code>submissionToken</code></td><td>a token generated with your IDmission credentials.</td></tr>
476
- <tr><td><code>submissionUrl</code> (optional)</td><td>URL to hit with all API requests. Default: https://api.idmission.com</td></tr>
514
+ <tr><td><code>sessionId</code></td><td>a session id generated with your IDmission credentials, or an async function that resolves to one.</td></tr>
515
+ <tr><td><code>authUrl</code> (optional)</td><td>URL to authenticate against. Default: https://portal-api.idmission.com</td></tr>
516
+ <tr><td><code>submissionUrl</code> (optional)</td><td>URL to submit data to. Default: https://portal-api.idmission.com/swagger</td></tr>
517
+ <tr><td><code>documentServiceUrl</code> (optional)</td><td>URL to upload image/video/audio assets to via [tus](https://tus.io/). Default: https://portal-api.idmission.com/files/</td></tr>
518
+ <tr><td><code>onBeforeDocumentUpload</code> (optional)</td><td>callback function that fires immediately prior to each document upload, giving the client application an opportunity to specify custom asynchronous logic that captures the document contents before it is exchanged for a document token. The document content and metadata are passed in as parameters and a promise resolving to void or false should be returned. If the returned promise resolves to false, the document will not be uploaded.</td></tr>
519
+ <tr><td><code>onDocumentUploadProgress</code> (optional)</td><td>callback function that fires when progress information is available for a document upload. The progress info and metadata are passed in as parameters.</td></tr>
520
+ <tr><td><code>onDocumentUploaded</code> (optional)</td><td>callback function that fires immediately after each document upload, giving the client application an opportunity to specify custom asynchronous logic that captures the document token. The document token and metadata are passed in as parameters.</td></tr>
521
+ <tr><td><code>onDocumentUploadFailed</code> (optional)</td><td>callback function that fires when a document failed to upload. The error and metadata are passed in as parameters.</td></tr>
477
522
  <tr><td><code>enrollmentId</code></td><td>the unique identifier to use for the customer to be enrolled. Overrides <code>personalData.uniqueNumber</code> if both are specified.</td></tr>
478
523
  <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>
479
524
  <tr><td><code>onComplete</code> (optional)</td><td>callback function that fires when the user has completed the CustomerBiometricsEnrollment flow. Arguments: 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, and the request payload dispatched to IDmission's API, which contains the images submitted by the user.</td></tr>
@@ -486,6 +531,7 @@ Render a fullscreen capture component that performs FaceValidation, and then sto
486
531
  <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>
487
532
  <tr><td><code>captureAdditionalDocuments</code> (optional)</td><td>array of additional documents to be captured. Each element includes a name and description.</td></tr>
488
533
  <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>
534
+ <tr><td><code>loadingOverlayMode</code> (optional)</td><td>string indicating which loading overlay screen should be used. Supported values: default and legacy. Defaults to default.</td></tr>
489
535
  <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>
490
536
  <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>
491
537
  <tr><td><code>companyId</code> (optional)</td><td>company identifier to include with submission.</td></tr>
@@ -497,6 +543,7 @@ Render a fullscreen capture component that performs FaceValidation, and then sto
497
543
  <tr><td><code>webhooksStripSpecialCharacters</code> (optional)</td><td>boolean flag to indicate whether non-alphanumeric characters should be removed from the submission data when customer-configured webhooks are invoked. Defaults to true.</td></tr>
498
544
  <tr><td><code>webhooksSendInputImages</code> (optional)</td><td>boolean flag to indicate whether raw user-captured images should be included in the submission data when customer-configured webhooks are invoked. Defaults to false.</td></tr>
499
545
  <tr><td><code>webhooksSendProcessedImages</code> (optional)</td><td>boolean flag to indicate whether processed user-captured images should be included in the submission data when customer-configured webhooks are invoked. Defaults to false.</td></tr>
546
+ <tr><td><code>theme</code> (optional)</td><td>name of an included theme or object containing theme properties.</td></tr>
500
547
  <tr><td><code>assets.faceLiveness</code> (optional)</td><td>object containing any asset overrides, for available options consult the Face Liveness Assets table above.</td></tr>
501
548
  <tr><td><code>colors.faceLiveness</code> (optional)</td><td>object containing any color overrides, for available options consult the Face Liveness Colors table above.</td></tr>
502
549
  <tr><td><code>colors.videoSignatureCapture</code> (optional)</td><td>object containing any color overrides, for available options consult the videoSignatureCapture fields in the ID Capture Colors table above.</td></tr>
@@ -513,7 +560,7 @@ Render a fullscreen capture component that performs FaceValidation, and then sto
513
560
 
514
561
  ```js
515
562
  IDmissionSDK.renderCustomerBiometricsEnrollment('#target-element', {
516
- submissionToken: 'my-idmission-token',
563
+ sessionId: 'my-idmission-session-id',
517
564
  enrollmentId: 'some-guy',
518
565
  });
519
566
  ```
@@ -525,8 +572,14 @@ Render a fullscreen capture component that analyzes frames from the user's front
525
572
  **Props**
526
573
 
527
574
  <table>
528
- <tr><td><code>submissionToken</code></td><td>a token generated with your IDmission credentials.</td></tr>
529
- <tr><td><code>submissionUrl</code> (optional)</td><td>URL to hit with all API requests. Default: https://api.idmission.com</td></tr>
575
+ <tr><td><code>sessionId</code></td><td>a session id generated with your IDmission credentials, or an async function that resolves to one.</td></tr>
576
+ <tr><td><code>authUrl</code> (optional)</td><td>URL to authenticate against. Default: https://portal-api.idmission.com</td></tr>
577
+ <tr><td><code>submissionUrl</code> (optional)</td><td>URL to submit data to. Default: https://portal-api.idmission.com/swagger</td></tr>
578
+ <tr><td><code>documentServiceUrl</code> (optional)</td><td>URL to upload image/video/audio assets to via [tus](https://tus.io/). Default: https://portal-api.idmission.com/files/</td></tr>
579
+ <tr><td><code>onBeforeDocumentUpload</code> (optional)</td><td>callback function that fires immediately prior to each document upload, giving the client application an opportunity to specify custom asynchronous logic that captures the document contents before it is exchanged for a document token. The document content and metadata are passed in as parameters and a promise resolving to void or false should be returned. If the returned promise resolves to false, the document will not be uploaded.</td></tr>
580
+ <tr><td><code>onDocumentUploadProgress</code> (optional)</td><td>callback function that fires when progress information is available for a document upload. The progress info and metadata are passed in as parameters.</td></tr>
581
+ <tr><td><code>onDocumentUploaded</code> (optional)</td><td>callback function that fires immediately after each document upload, giving the client application an opportunity to specify custom asynchronous logic that captures the document token. The document token and metadata are passed in as parameters.</td></tr>
582
+ <tr><td><code>onDocumentUploadFailed</code> (optional)</td><td>callback function that fires when a document failed to upload. The error and metadata are passed in as parameters.</td></tr>
530
583
  <tr><td><code>enrollmentId</code></td><td>the unique identifier to match from previously enrolled customers.</td></tr>
531
584
  <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>
532
585
  <tr><td><code>onComplete</code> (optional)</td><td>callback function that fires when the user has completed the CustomerVerification flow. Arguments: 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, and the request payload dispatched to IDmission's API, which contains the images submitted by the user.</td></tr>
@@ -536,6 +589,7 @@ Render a fullscreen capture component that analyzes frames from the user's front
536
589
  <tr><td><code>onExitAfterFailure</code> (optional)</td><td>callback function that fires when the user clicks the exit button after failing the realness check.</td></tr>
537
590
  <tr><td><code>onUserCancel</code> (optional)</td><td>callback function that fires when the user clicks the exit button from the loading overlay, declining to engage with IDmission. Binding this callback results in the cancel button being rendered on the loading overlay.</td></tr>
538
591
  <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>
592
+ <tr><td><code>loadingOverlayMode</code> (optional)</td><td>string indicating which loading overlay screen should be used. Supported values: default and legacy. Defaults to default.</td></tr>
539
593
  <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>
540
594
  <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>
541
595
  <tr><td><code>companyId</code> (optional)</td><td>company identifier to include with submission.</td></tr>
@@ -545,6 +599,7 @@ Render a fullscreen capture component that analyzes frames from the user's front
545
599
  <tr><td><code>webhooksStripSpecialCharacters</code> (optional)</td><td>boolean flag to indicate whether non-alphanumeric characters should be removed from the submission data when customer-configured webhooks are invoked. Defaults to true.</td></tr>
546
600
  <tr><td><code>webhooksSendInputImages</code> (optional)</td><td>boolean flag to indicate whether raw user-captured images should be included in the submission data when customer-configured webhooks are invoked. Defaults to false.</td></tr>
547
601
  <tr><td><code>webhooksSendProcessedImages</code> (optional)</td><td>boolean flag to indicate whether processed user-captured images should be included in the submission data when customer-configured webhooks are invoked. Defaults to false.</td></tr>
602
+ <tr><td><code>theme</code> (optional)</td><td>name of an included theme or object containing theme properties.</td></tr>
548
603
  <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>
549
604
  <tr><td><code>colors</code> (optional)</td><td>object containing any color overrides, for available options consult the Face Liveness Colors table above.</td></tr>
550
605
  <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>
@@ -557,7 +612,7 @@ Render a fullscreen capture component that analyzes frames from the user's front
557
612
 
558
613
  ```js
559
614
  IDmissionSDK.renderCustomerVerification('#target-element', {
560
- submissionToken: 'my-idmission-token',
615
+ sessionId: 'my-idmission-session-id',
561
616
  enrollmentId: 'some-guy',
562
617
  });
563
618
  ```
@@ -569,8 +624,14 @@ Render a fullscreen capture component that analyzes frames from the user's front
569
624
  **Props**
570
625
 
571
626
  <table>
572
- <tr><td><code>submissionToken</code></td><td>a token generated with your IDmission credentials.</td></tr>
573
- <tr><td><code>submissionUrl</code> (optional)</td><td>URL to hit with all API requests. Default: https://api.idmission.com</td></tr>
627
+ <tr><td><code>sessionId</code></td><td>a session id generated with your IDmission credentials, or an async function that resolves to one.</td></tr>
628
+ <tr><td><code>authUrl</code> (optional)</td><td>URL to authenticate against. Default: https://portal-api.idmission.com</td></tr>
629
+ <tr><td><code>submissionUrl</code> (optional)</td><td>URL to submit data to. Default: https://portal-api.idmission.com/swagger</td></tr>
630
+ <tr><td><code>documentServiceUrl</code> (optional)</td><td>URL to upload image/video/audio assets to via [tus](https://tus.io/). Default: https://portal-api.idmission.com/files/</td></tr>
631
+ <tr><td><code>onBeforeDocumentUpload</code> (optional)</td><td>callback function that fires immediately prior to each document upload, giving the client application an opportunity to specify custom asynchronous logic that captures the document contents before it is exchanged for a document token. The document content and metadata are passed in as parameters and a promise resolving to void or false should be returned. If the returned promise resolves to false, the document will not be uploaded.</td></tr>
632
+ <tr><td><code>onDocumentUploadProgress</code> (optional)</td><td>callback function that fires when progress information is available for a document upload. The progress info and metadata are passed in as parameters.</td></tr>
633
+ <tr><td><code>onDocumentUploaded</code> (optional)</td><td>callback function that fires immediately after each document upload, giving the client application an opportunity to specify custom asynchronous logic that captures the document token. The document token and metadata are passed in as parameters.</td></tr>
634
+ <tr><td><code>onDocumentUploadFailed</code> (optional)</td><td>callback function that fires when a document failed to upload. The error and metadata are passed in as parameters.</td></tr>
574
635
  <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>
575
636
  <tr><td><code>onComplete</code> (optional)</td><td>callback function that fires when the user has completed the CustomerIdentification flow. Arguments: 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, and the request payload dispatched to IDmission's API, which contains the images submitted by the user.</td></tr>
576
637
  <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>
@@ -578,6 +639,8 @@ Render a fullscreen capture component that analyzes frames from the user's front
578
639
  <tr><td><code>onExitCapture</code> (optional)</td><td>callback function that fires when the user clicks the X button during capture.</td></tr>
579
640
  <tr><td><code>onExitAfterFailure</code> (optional)</td><td>callback function that fires when the user clicks the exit button after failing the realness check.</td></tr>
580
641
  <tr><td><code>onUserCancel</code> (optional)</td><td>callback function that fires when the user clicks the exit button from the loading overlay, declining to engage with IDmission. Binding this callback results in the cancel button being rendered on the loading overlay.</td></tr>
642
+ <tr><td><code>loadingOverlayMode</code> (optional)</td><td>string indicating which loading overlay screen should be used. Supported values: default and legacy. Defaults to default.</td></tr>
643
+ <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>
581
644
  <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>
582
645
  <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>
583
646
  <tr><td><code>companyId</code> (optional)</td><td>company identifier to include with submission.</td></tr>
@@ -587,6 +650,7 @@ Render a fullscreen capture component that analyzes frames from the user's front
587
650
  <tr><td><code>webhooksStripSpecialCharacters</code> (optional)</td><td>boolean flag to indicate whether non-alphanumeric characters should be removed from the submission data when customer-configured webhooks are invoked. Defaults to true.</td></tr>
588
651
  <tr><td><code>webhooksSendInputImages</code> (optional)</td><td>boolean flag to indicate whether raw user-captured images should be included in the submission data when customer-configured webhooks are invoked. Defaults to false.</td></tr>
589
652
  <tr><td><code>webhooksSendProcessedImages</code> (optional)</td><td>boolean flag to indicate whether processed user-captured images should be included in the submission data when customer-configured webhooks are invoked. Defaults to false.</td></tr>
653
+ <tr><td><code>theme</code> (optional)</td><td>name of an included theme or object containing theme properties.</td></tr>
590
654
  <tr><td><code>assets</code> (optional)</td><td>object containing any asset overrides, for available options consult the Assets table below.</td></tr>
591
655
  <tr><td><code>colors</code> (optional)</td><td>object containing any asset overrides, for available options consult the Colors table below.</td></tr>
592
656
  <tr><td><code>verbiage</code> (optional)</td><td>object containing any verbiage overrides, for available options consult the Verbiage table below.</td></tr>
@@ -657,7 +721,7 @@ Render a fullscreen capture component that analyzes frames from the user's front
657
721
  **Example**
658
722
 
659
723
  ```js
660
- IDmissionSDK.renderCustomerIdentification('#target-element', { submissionToken: 'my-idmission-token' });
724
+ IDmissionSDK.renderCustomerIdentification('#target-element', { sessionId: 'my-idmission-session-id' });
661
725
  ```
662
726
 
663
727
  ### VideoIdValidation
@@ -667,8 +731,14 @@ Render a fullscreen capture component that performs IDValidation and FaceValidat
667
731
  **Props**
668
732
 
669
733
  <table>
670
- <tr><td><code>submissionToken</code></td><td>a token generated with your IDmission credentials.</td></tr>
671
- <tr><td><code>submissionUrl</code> (optional)</td><td>URL to hit with all API requests. Default: https://api.idmission.com</td></tr>
734
+ <tr><td><code>sessionId</code></td><td>a session id generated with your IDmission credentials, or an async function that resolves to one.</td></tr>
735
+ <tr><td><code>authUrl</code> (optional)</td><td>URL to authenticate against. Default: https://portal-api.idmission.com</td></tr>
736
+ <tr><td><code>submissionUrl</code> (optional)</td><td>URL to submit data to. Default: https://portal-api.idmission.com/swagger</td></tr>
737
+ <tr><td><code>documentServiceUrl</code> (optional)</td><td>URL to upload image/video/audio assets to via [tus](https://tus.io/). Default: https://portal-api.idmission.com/files/</td></tr>
738
+ <tr><td><code>onBeforeDocumentUpload</code> (optional)</td><td>callback function that fires immediately prior to each document upload, giving the client application an opportunity to specify custom asynchronous logic that captures the document contents before it is exchanged for a document token. The document content and metadata are passed in as parameters and a promise resolving to void or false should be returned. If the returned promise resolves to false, the document will not be uploaded.</td></tr>
739
+ <tr><td><code>onDocumentUploadProgress</code> (optional)</td><td>callback function that fires when progress information is available for a document upload. The progress info and metadata are passed in as parameters.</td></tr>
740
+ <tr><td><code>onDocumentUploaded</code> (optional)</td><td>callback function that fires immediately after each document upload, giving the client application an opportunity to specify custom asynchronous logic that captures the document token. The document token and metadata are passed in as parameters.</td></tr>
741
+ <tr><td><code>onDocumentUploadFailed</code> (optional)</td><td>callback function that fires when a document failed to upload. The error and metadata are passed in as parameters.</td></tr>
672
742
  <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>
673
743
  <tr><td><code>onSubmit</code> (optional)</td><td>callback function that fires when the user has completed the flow instead of making a call to IDmission's servers, allowing customers to specify their own submission logic. Arguments: the request payload that would have been dispatched to IDmission's API, which contains the images/documents/video submitted by the user. Note that when this parameter is supplied, `onComplete` will never fire, and the customer will need to implement their own error handling/retry logic. Use at your own risk!</td></tr>
674
744
  <tr><td><code>onComplete</code> (optional)</td><td>callback function that fires when the user has completed the VideoIdValidation flow. Arguments: 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, and the request payload dispatched to IDmission's API, which contains the images submitted by the user.</td></tr>
@@ -706,6 +776,12 @@ Render a fullscreen capture component that performs IDValidation and FaceValidat
706
776
  <tr><td><code>skipSuccessScreen</code> (optional)</td><td>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.</td></tr>
707
777
  <tr><td><code>skipIdCapture</code> (optional)</td><td>boolean to indicate whether to skip the initial ID capture flow. Note that when this flag is set, submission to IDmission's servers will not be attempted; it should be used in tandem with onSubmit. Defaults to false.</td></tr>
708
778
  <tr><td><code>skipShowIdCardBack</code> (optional)</td><td>boolean or async function to indicate whether to instruct the user to show the back of their ID card during video capture. If an async function is supplied returning a boolean, it will be evaluated at the time of ID front video capture completion. Defaults to false.</td></tr>
779
+ <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>
780
+ <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>
781
+ <tr><td><code>idCapturePortraitGuidesOnMobile</code> (optional)</td><td>boolean to indicate whether guide images should be rotated on mobile. Defaults to false.</td></tr>
782
+ <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>
783
+ <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>
784
+ <tr><td><code>theme</code> (optional)</td><td>name of an included theme or object containing theme properties.</td></tr>
709
785
  <tr><td><code>assets</code> (optional)</td><td>object containing any asset overrides, for available options consult the Assets table below.</td></tr>
710
786
  <tr><td><code>colors</code> (optional)</td><td>object containing any asset overrides, for available options consult the Colors table below.</td></tr>
711
787
  <tr><td><code>verbiage</code> (optional)</td><td>object containing any verbiage overrides, for available options consult the Verbiage table below.</td></tr>
@@ -756,7 +832,7 @@ Render a fullscreen capture component that performs IDValidation and FaceValidat
756
832
  **Example**
757
833
 
758
834
  ```js
759
- IDmissionSDK.renderVideoIdValidation('#target-element', { submissionToken: 'my-idmission-token' });
835
+ IDmissionSDK.renderVideoIdValidation('#target-element', { sessionId: 'my-idmission-session-id' });
760
836
  ```
761
837
 
762
838
  ## Other Functionality
@@ -1,7 +1,7 @@
1
1
  import { ReactElement } from 'react';
2
2
  import { IdCaptureWizardProps } from './id_capture/IdCaptureWizard';
3
3
  import { FaceLivenessWizardProps } from './face_liveness/FaceLivenessWizard';
4
- import { SubmissionAction, SubmissionEnvironment, SubmissionResponse } from '../contexts/SubmissionContext';
4
+ import { SubmissionAction, SubmissionResponse } from '../contexts/SubmissionContext';
5
5
  import { AdditionalDocumentCaptureWizardProps } from './additional_document_capture/AdditionalDocumentCaptureWizard';
6
6
  import { SignatureCaptureProps } from './signature_capture/SignatureCapture';
7
7
  import { VideoSignatureWizardProps } from './video_signature_capture/VideoSignatureWizard';
@@ -20,10 +20,10 @@ export type CompositeWizardComponentProps = {
20
20
  debugMode?: boolean;
21
21
  };
22
22
  export type CompositeWizardProps = CompositeWizardComponentProps & {
23
- submissionToken: string;
23
+ sessionId: string;
24
24
  submissionAction?: SubmissionAction;
25
- submissionEnvironment?: SubmissionEnvironment;
26
25
  submissionUrl?: string;
26
+ authUrl?: string;
27
27
  onComplete?: (submissionResponse: SubmissionResponse) => void;
28
28
  };
29
29
  export declare const CompositeWizard: (props: CompositeWizardProps) => ReactElement;
@@ -1,4 +1,5 @@
1
1
  import { FC, PropsWithChildren } from 'react';
2
+ import { OnBeforeDocumentUpload, OnDocumentUploaded, OnDocumentUploadFailed, OnDocumentUploadProgress } from '../submission/SubmissionProvider';
2
3
  import { SubmissionRequest, SubmissionResponse } from '../../contexts/SubmissionContext';
3
4
  import { FaceLivenessAssets, FaceLivenessClassNames, FaceLivenessColors, FaceLivenessVerbiage } from '../face_liveness/FaceLivenessWizard';
4
5
  import { AdditionalDocumentCaptureWizardClassNames, AdditionalDocumentCaptureWizardVerbiage } from '../additional_document_capture/AdditionalDocumentCaptureWizard';
@@ -32,10 +33,14 @@ export interface CustomerBiometricsEnrollmentProps extends PropsWithChildren {
32
33
  enrollmentId: string;
33
34
  /** Language code to use. Supported values: 'auto' (detect based on user's OS), 'en' (English), 'es' (Spanish). Defaults to auto. */
34
35
  lang?: LangOption;
35
- /** A token generated with your IDmission credentials. */
36
- submissionToken: string;
36
+ /** A session identifier generated with your IDmission credentials. */
37
+ sessionId: string | (() => Promise<string>);
37
38
  /** URL to hit with all API requests. Defaults to the value specified in your decoded `submissionToken`. */
38
39
  submissionUrl?: string;
40
+ /** URL to validate session against. Defaults to https://portal-api.idmission.com. */
41
+ authUrl?: string;
42
+ /** URL to upload captured documents to via Tus. */
43
+ documentServiceUrl?: string;
39
44
  /** Company identifier to include with submission. */
40
45
  companyId?: string;
41
46
  /** Boolean flag to indicate if validation of the minimum resolution for an ID document image should be triggered. Defaults to true. */
@@ -62,6 +67,14 @@ export interface CustomerBiometricsEnrollmentProps extends PropsWithChildren {
62
67
  modelLoadTimeoutMs?: number;
63
68
  /** Boolean or async function to indicate whether to proceed automatically after capture guidance is satisfied. If an async function is supplied returning a boolean, it will be evaluated at the time of capture guidance satisfaction. Defaults to `false`. */
64
69
  skipSuccessScreen?: boolean | (() => Promise<boolean>);
70
+ /** Callback function that fires immediately prior to each document upload, giving the client application an opportunity to specify custom asynchronous logic that captures the document contents before it is exchanged for a document token. The document content and metadata are passed in as parameters and a promise resolving to void or false should be returned. If the returned promise resolves to false, the document will not be uploaded. */
71
+ onBeforeDocumentUpload?: OnBeforeDocumentUpload;
72
+ /** Callback function that fires when progress information is available for a document upload. The progress info and metadata are passed in as parameters. */
73
+ onDocumentUploadProgress?: OnDocumentUploadProgress;
74
+ /** Callback function that fires immediately after each document upload, giving the client application an opportunity to specify custom asynchronous logic that captures the document token. The document token and metadata are passed in as parameters. */
75
+ onDocumentUploaded?: OnDocumentUploaded;
76
+ /** Callback function that fires when a document failed to upload. The error and metadata are passed in as parameters. */
77
+ onDocumentUploadFailed?: OnDocumentUploadFailed;
65
78
  /** 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. */
66
79
  onBeforeSubmit?: (req: SubmissionRequest) => Promise<SubmissionRequest>;
67
80
  /** Callback function that fires when the user has completed the flow instead of making a call to IDmission's servers, allowing customers to specify their own submission logic. Arguments: the request payload that would have been dispatched to IDmission's API, which contains the images/documents/video submitted by the user. Note that when this parameter is supplied, `onComplete` will never fire, and the customer will need to implement their own error handling/retry logic. Use at your own risk! */