idmission-web-sdk 1.0.312 → 1.0.313

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 +46 -122
  2. package/dist/components/CompositeWizard.d.ts +3 -3
  3. package/dist/components/customer_flows/CustomerBiometricsEnrollment.d.ts +2 -15
  4. package/dist/components/customer_flows/CustomerIdAndBiometricsEnrollment.d.ts +4 -17
  5. package/dist/components/customer_flows/CustomerIdentification.d.ts +2 -15
  6. package/dist/components/customer_flows/CustomerVerification.d.ts +2 -15
  7. package/dist/components/customer_flows/DocumentCapture.d.ts +6 -15
  8. package/dist/components/customer_flows/FaceValidation.d.ts +2 -17
  9. package/dist/components/customer_flows/IdAndFaceValidation.d.ts +5 -18
  10. package/dist/components/customer_flows/IdValidation.d.ts +5 -18
  11. package/dist/components/customer_flows/SignatureKYC.d.ts +2 -17
  12. package/dist/components/customer_flows/VideoIdValidation.d.ts +2 -17
  13. package/dist/components/document_capture/DocumentCaptureStateProvider.d.ts +1 -1
  14. package/dist/components/submission/Errors.d.ts +1 -1
  15. package/dist/components/submission/SubmissionProvider.d.ts +5 -24
  16. package/dist/components/submission/TokenIssuerNotAllowedErrorOverlay.d.ts +2 -0
  17. package/dist/components/submission/TokenMissingErrorOverlay.d.ts +2 -0
  18. package/dist/components/submission/TokenPublicKeyErrorOverlay.d.ts +5 -0
  19. package/dist/contexts/SubmissionContext.d.ts +3 -9
  20. package/dist/index.d.ts +1 -7
  21. package/dist/lib/utils/dataUrlToBase64.d.ts +0 -2
  22. package/dist/sdk2.cjs.development.js +563 -833
  23. package/dist/sdk2.cjs.development.js.map +1 -1
  24. package/dist/sdk2.cjs.production.js +1 -1
  25. package/dist/sdk2.cjs.production.js.map +1 -1
  26. package/dist/sdk2.esm.js +566 -833
  27. package/dist/sdk2.esm.js.map +1 -1
  28. package/dist/sdk2.umd.development.js +567 -836
  29. package/dist/sdk2.umd.development.js.map +1 -1
  30. package/dist/sdk2.umd.production.js +1 -1
  31. package/dist/sdk2.umd.production.js.map +1 -1
  32. package/dist/stories/Components/CompositeWizard/FaceLivenessAndIdCapture.stories.d.ts +9 -0
  33. package/dist/stories/CustomerFlows/CustomerBiometricsEnrollment.stories.d.ts +1 -5
  34. package/dist/stories/CustomerFlows/CustomerIdAndBiometricsEnrollment.stories.d.ts +1 -5
  35. package/dist/stories/CustomerFlows/CustomerIdentification.stories.d.ts +1 -5
  36. package/dist/stories/CustomerFlows/CustomerVerification.stories.d.ts +1 -5
  37. package/dist/stories/CustomerFlows/DocumentCapture.stories.d.ts +1 -5
  38. package/dist/stories/CustomerFlows/FaceValidation.stories.d.ts +1 -5
  39. package/dist/stories/CustomerFlows/IdAndFaceValidation.stories.d.ts +1 -5
  40. package/dist/stories/CustomerFlows/IdValidation.stories.d.ts +1 -5
  41. package/dist/stories/CustomerFlows/SignatureKYC.stories.d.ts +1 -5
  42. package/dist/stories/CustomerFlows/VideoIdValidation.stories.d.ts +1 -14
  43. package/dist/version.d.ts +1 -1
  44. package/package.json +1 -1
  45. package/dist/components/submission/AuthUrlNotAllowedOverlay.d.ts +0 -2
  46. package/dist/components/submission/SessionIdMissingOverlay.d.ts +0 -2
  47. package/dist/components/submission/SessionValidationErrorOverlay.d.ts +0 -6
  48. package/dist/components/submission/SessionValidationFailedOverlay.d.ts +0 -2
  49. package/dist/contexts/AuthStateContext.d.ts +0 -33
  50. package/dist/stories/Auth.stories.d.ts +0 -8
  51. package/dist/stories/utils/sessions.d.ts +0 -13
  52. package/dist/stories/utils/useLocalStorage.d.ts +0 -1
package/README.md CHANGED
@@ -6,16 +6,21 @@ Storybook: https://websdk2test.idmission.com
6
6
 
7
7
  ## Getting Started
8
8
 
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.
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.
10
10
 
11
11
  To test that your credentials are valid:
12
12
  ```bash
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
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'
16
21
  ```
17
22
 
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.
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.
19
24
 
20
25
  If you are using NodeJS, check out our [auth client for server-side JavaScript](https://www.npmjs.com/package/idmission-auth-client).
21
26
 
@@ -30,7 +35,7 @@ import React from 'react'
30
35
  import { render } from 'react-dom'
31
36
  import { IdValidation } from 'idmission-web-sdk'
32
37
 
33
- render(<IdValidation sessionId={YOUR_SESSION_ID} />, document.getElementById('root'))
38
+ render(<IdValidation submissionToken={YOUR_TOKEN} />, document.getElementById('root'))
34
39
  ```
35
40
 
36
41
  ## Basic Usage in HTML
@@ -53,7 +58,7 @@ You may subscribe to the `idmission-web-sdk.ready` event to be notified when loa
53
58
  Then you may call any render method below, for example `renderIdValidation`, like so:
54
59
  ```html
55
60
  <script type="module">
56
- IDmissionSDK.renderIdValidation('#target-element', { sessionId: 'my-idmission-session-id' });
61
+ IDmissionSDK.renderIdValidation('#target-element', { submissionToken: 'my-idmission-token' });
57
62
  </script>
58
63
  ```
59
64
 
@@ -66,14 +71,8 @@ Render a fullscreen ID capture component that instructs the user to photograph b
66
71
  **Props**
67
72
 
68
73
  <table>
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>
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>
77
76
  <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>
78
77
  <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>
79
78
  <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>
@@ -84,19 +83,14 @@ Render a fullscreen ID capture component that instructs the user to photograph b
84
83
  <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>
85
84
  <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>
86
85
  <tr><td><code>captureAdditionalDocuments</code> (optional)</td><td>array of additional documents to be captured. Each element includes a name and description.</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>
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>
88
87
  <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>
89
88
  <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>
90
89
  <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>
91
90
  <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>
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>
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>
94
93
  <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>
100
94
  <tr><td><code>companyId</code> (optional)</td><td>company identifier to include with submission.</td></tr>
101
95
  <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>
102
96
  <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>
@@ -115,7 +109,6 @@ Render a fullscreen ID capture component that instructs the user to photograph b
115
109
  <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>
116
110
  <tr><td><code>assets</code> (optional)</td><td>object containing any asset overrides, for available options consult the Assets table below.</td></tr>
117
111
  <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>
119
112
  <tr><td><code>verbiage</code> (optional)</td><td>object containing any verbiage overrides, for available options consult the Verbiage table below.</td></tr>
120
113
  <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>
121
114
  <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>
@@ -206,7 +199,7 @@ Render a fullscreen ID capture component that instructs the user to photograph b
206
199
 
207
200
  ```js
208
201
  IDmissionSDK.renderIdValidation('#target-element', {
209
- sessionId: 'my-idmission-session-id',
202
+ submissionToken: 'my-idmission-token',
210
203
  onApproved: (submissionResponse) => {
211
204
  alert('Your ID has been validated, proceed to the next checkpoint.')
212
205
  },
@@ -223,14 +216,8 @@ Render a fullscreen capture component that analyzes frames from the user's front
223
216
  **Props**
224
217
 
225
218
  <table>
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>
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>
234
221
  <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>
235
222
  <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>
236
223
  <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>
@@ -239,7 +226,6 @@ Render a fullscreen capture component that analyzes frames from the user's front
239
226
  <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>
240
227
  <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>
241
228
  <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>
243
229
  <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>
244
230
  <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>
245
231
  <tr><td><code>companyId</code> (optional)</td><td>company identifier to include with submission.</td></tr>
@@ -251,10 +237,11 @@ Render a fullscreen capture component that analyzes frames from the user's front
251
237
  <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>
252
238
  <tr><td><code>assets</code> (optional)</td><td>object containing any asset overrides, for available options consult the Assets table below.</td></tr>
253
239
  <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>
255
240
  <tr><td><code>verbiage</code> (optional)</td><td>object containing any verbiage overrides, for available options consult the Verbiage table below.</td></tr>
256
241
  <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>
257
242
  <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>
258
245
  <tr><td><code>debugMode</code> (optional)</td><td>boolean flag to enable on-screen prediction information output. Defaults to false.</td></tr>
259
246
  </table>
260
247
 
@@ -324,7 +311,7 @@ Render a fullscreen capture component that analyzes frames from the user's front
324
311
 
325
312
  ```js
326
313
  IDmissionSDK.renderFaceValidation('#target-element', {
327
- sessionId: 'my-idmission-session-id',
314
+ submissionToken: 'my-idmission-token',
328
315
  onApproved: (submissionResponse) => {
329
316
  alert('Your face is real, proceed to the next checkpoint.')
330
317
  },
@@ -341,14 +328,8 @@ Render a fullscreen capture component that performs IDValidation and FaceValidat
341
328
  **Props**
342
329
 
343
330
  <table>
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>
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>
352
333
  <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>
353
334
  <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
335
  <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>
@@ -361,21 +342,15 @@ Render a fullscreen capture component that performs IDValidation and FaceValidat
361
342
  <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>
362
343
  <tr><td><code>captureAdditionalDocuments</code> (optional)</td><td>array of additional documents to be captured. Each element includes a name and description.</td></tr>
363
344
  <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>
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>
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>
366
346
  <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>
367
347
  <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>
368
348
  <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>
369
349
  <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>
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>
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>
373
352
  <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>
374
353
  <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>
379
354
  <tr><td><code>companyId</code> (optional)</td><td>company identifier to include with submission.</td></tr>
380
355
  <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>
381
356
  <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>
@@ -392,7 +367,6 @@ Render a fullscreen capture component that performs IDValidation and FaceValidat
392
367
  <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>
393
368
  <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>
394
369
  <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>
396
370
  <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>
397
371
  <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>
398
372
  <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>
@@ -410,7 +384,7 @@ Render a fullscreen capture component that performs IDValidation and FaceValidat
410
384
 
411
385
  ```js
412
386
  IDmissionSDK.renderIdAndFaceValidation('#target-element', {
413
- sessionId: 'my-idmission-session-id',
387
+ submissionToken: 'my-idmission-token',
414
388
  onApproved: (submissionResponse) => {
415
389
  alert('Your ID has been validated and your face is real, proceed to the next checkpoint.')
416
390
  },
@@ -427,14 +401,8 @@ Render a fullscreen capture component that performs IDValidation and FaceValidat
427
401
  **Props**
428
402
 
429
403
  <table>
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>
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>
438
406
  <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>
439
407
  <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>
440
408
  <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>
@@ -447,20 +415,14 @@ Render a fullscreen capture component that performs IDValidation and FaceValidat
447
415
  <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>
448
416
  <tr><td><code>captureAdditionalDocuments</code> (optional)</td><td>array of additional documents to be captured. Each element includes a name and description.</td></tr>
449
417
  <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>
451
418
  <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>
452
419
  <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>
453
420
  <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>
454
421
  <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>
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>
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>
458
424
  <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>
459
425
  <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>
464
426
  <tr><td><code>companyId</code> (optional)</td><td>company identifier to include with submission.</td></tr>
465
427
  <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>
466
428
  <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>
@@ -479,7 +441,6 @@ Render a fullscreen capture component that performs IDValidation and FaceValidat
479
441
  <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>
480
442
  <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>
481
443
  <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>
483
444
  <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>
484
445
  <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>
485
446
  <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>
@@ -499,7 +460,7 @@ Render a fullscreen capture component that performs IDValidation and FaceValidat
499
460
 
500
461
  ```js
501
462
  IDmissionSDK.renderCustomerIdAndBiometricsEnrollment('#target-element', {
502
- sessionId: 'my-idmission-session-id',
463
+ submissionToken: 'my-idmission-token',
503
464
  enrollmentId: 'some-guy',
504
465
  });
505
466
  ```
@@ -511,14 +472,8 @@ Render a fullscreen capture component that performs FaceValidation, and then sto
511
472
  **Props**
512
473
 
513
474
  <table>
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>
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>
522
477
  <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>
523
478
  <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>
524
479
  <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>
@@ -531,7 +486,6 @@ Render a fullscreen capture component that performs FaceValidation, and then sto
531
486
  <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>
532
487
  <tr><td><code>captureAdditionalDocuments</code> (optional)</td><td>array of additional documents to be captured. Each element includes a name and description.</td></tr>
533
488
  <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>
535
489
  <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>
536
490
  <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>
537
491
  <tr><td><code>companyId</code> (optional)</td><td>company identifier to include with submission.</td></tr>
@@ -543,7 +497,6 @@ Render a fullscreen capture component that performs FaceValidation, and then sto
543
497
  <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>
544
498
  <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>
545
499
  <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>
547
500
  <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>
548
501
  <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>
549
502
  <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>
@@ -560,7 +513,7 @@ Render a fullscreen capture component that performs FaceValidation, and then sto
560
513
 
561
514
  ```js
562
515
  IDmissionSDK.renderCustomerBiometricsEnrollment('#target-element', {
563
- sessionId: 'my-idmission-session-id',
516
+ submissionToken: 'my-idmission-token',
564
517
  enrollmentId: 'some-guy',
565
518
  });
566
519
  ```
@@ -572,14 +525,8 @@ Render a fullscreen capture component that analyzes frames from the user's front
572
525
  **Props**
573
526
 
574
527
  <table>
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>
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>
583
530
  <tr><td><code>enrollmentId</code></td><td>the unique identifier to match from previously enrolled customers.</td></tr>
584
531
  <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>
585
532
  <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>
@@ -589,7 +536,6 @@ Render a fullscreen capture component that analyzes frames from the user's front
589
536
  <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>
590
537
  <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>
591
538
  <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>
593
539
  <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>
594
540
  <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>
595
541
  <tr><td><code>companyId</code> (optional)</td><td>company identifier to include with submission.</td></tr>
@@ -599,7 +545,6 @@ Render a fullscreen capture component that analyzes frames from the user's front
599
545
  <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>
600
546
  <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>
601
547
  <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>
603
548
  <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>
604
549
  <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>
605
550
  <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>
@@ -612,7 +557,7 @@ Render a fullscreen capture component that analyzes frames from the user's front
612
557
 
613
558
  ```js
614
559
  IDmissionSDK.renderCustomerVerification('#target-element', {
615
- sessionId: 'my-idmission-session-id',
560
+ submissionToken: 'my-idmission-token',
616
561
  enrollmentId: 'some-guy',
617
562
  });
618
563
  ```
@@ -624,14 +569,8 @@ Render a fullscreen capture component that analyzes frames from the user's front
624
569
  **Props**
625
570
 
626
571
  <table>
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>
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>
635
574
  <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>
636
575
  <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>
637
576
  <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>
@@ -639,8 +578,6 @@ Render a fullscreen capture component that analyzes frames from the user's front
639
578
  <tr><td><code>onExitCapture</code> (optional)</td><td>callback function that fires when the user clicks the X button during capture.</td></tr>
640
579
  <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>
641
580
  <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>
644
581
  <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>
645
582
  <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>
646
583
  <tr><td><code>companyId</code> (optional)</td><td>company identifier to include with submission.</td></tr>
@@ -650,7 +587,6 @@ Render a fullscreen capture component that analyzes frames from the user's front
650
587
  <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>
651
588
  <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>
652
589
  <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>
654
590
  <tr><td><code>assets</code> (optional)</td><td>object containing any asset overrides, for available options consult the Assets table below.</td></tr>
655
591
  <tr><td><code>colors</code> (optional)</td><td>object containing any asset overrides, for available options consult the Colors table below.</td></tr>
656
592
  <tr><td><code>verbiage</code> (optional)</td><td>object containing any verbiage overrides, for available options consult the Verbiage table below.</td></tr>
@@ -721,7 +657,7 @@ Render a fullscreen capture component that analyzes frames from the user's front
721
657
  **Example**
722
658
 
723
659
  ```js
724
- IDmissionSDK.renderCustomerIdentification('#target-element', { sessionId: 'my-idmission-session-id' });
660
+ IDmissionSDK.renderCustomerIdentification('#target-element', { submissionToken: 'my-idmission-token' });
725
661
  ```
726
662
 
727
663
  ### VideoIdValidation
@@ -731,14 +667,8 @@ Render a fullscreen capture component that performs IDValidation and FaceValidat
731
667
  **Props**
732
668
 
733
669
  <table>
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>
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>
742
672
  <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>
743
673
  <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>
744
674
  <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>
@@ -776,12 +706,6 @@ Render a fullscreen capture component that performs IDValidation and FaceValidat
776
706
  <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>
777
707
  <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>
778
708
  <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>
785
709
  <tr><td><code>assets</code> (optional)</td><td>object containing any asset overrides, for available options consult the Assets table below.</td></tr>
786
710
  <tr><td><code>colors</code> (optional)</td><td>object containing any asset overrides, for available options consult the Colors table below.</td></tr>
787
711
  <tr><td><code>verbiage</code> (optional)</td><td>object containing any verbiage overrides, for available options consult the Verbiage table below.</td></tr>
@@ -832,7 +756,7 @@ Render a fullscreen capture component that performs IDValidation and FaceValidat
832
756
  **Example**
833
757
 
834
758
  ```js
835
- IDmissionSDK.renderVideoIdValidation('#target-element', { sessionId: 'my-idmission-session-id' });
759
+ IDmissionSDK.renderVideoIdValidation('#target-element', { submissionToken: 'my-idmission-token' });
836
760
  ```
837
761
 
838
762
  ## 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, SubmissionResponse } from '../contexts/SubmissionContext';
4
+ import { SubmissionAction, SubmissionEnvironment, 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
- sessionId: string;
23
+ submissionToken: string;
24
24
  submissionAction?: SubmissionAction;
25
+ submissionEnvironment?: SubmissionEnvironment;
25
26
  submissionUrl?: string;
26
- authUrl?: string;
27
27
  onComplete?: (submissionResponse: SubmissionResponse) => void;
28
28
  };
29
29
  export declare const CompositeWizard: (props: CompositeWizardProps) => ReactElement;
@@ -1,5 +1,4 @@
1
1
  import { FC, PropsWithChildren } from 'react';
2
- import { OnBeforeDocumentUpload, OnDocumentUploaded, OnDocumentUploadFailed, OnDocumentUploadProgress } from '../submission/SubmissionProvider';
3
2
  import { SubmissionRequest, SubmissionResponse } from '../../contexts/SubmissionContext';
4
3
  import { FaceLivenessAssets, FaceLivenessClassNames, FaceLivenessColors, FaceLivenessVerbiage } from '../face_liveness/FaceLivenessWizard';
5
4
  import { AdditionalDocumentCaptureWizardClassNames, AdditionalDocumentCaptureWizardVerbiage } from '../additional_document_capture/AdditionalDocumentCaptureWizard';
@@ -33,14 +32,10 @@ export interface CustomerBiometricsEnrollmentProps extends PropsWithChildren {
33
32
  enrollmentId: string;
34
33
  /** Language code to use. Supported values: 'auto' (detect based on user's OS), 'en' (English), 'es' (Spanish). Defaults to auto. */
35
34
  lang?: LangOption;
36
- /** A session identifier generated with your IDmission credentials. */
37
- sessionId: string | (() => Promise<string>);
35
+ /** A token generated with your IDmission credentials. */
36
+ submissionToken: string;
38
37
  /** URL to hit with all API requests. Defaults to the value specified in your decoded `submissionToken`. */
39
38
  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;
44
39
  /** Company identifier to include with submission. */
45
40
  companyId?: string;
46
41
  /** Boolean flag to indicate if validation of the minimum resolution for an ID document image should be triggered. Defaults to true. */
@@ -67,14 +62,6 @@ export interface CustomerBiometricsEnrollmentProps extends PropsWithChildren {
67
62
  modelLoadTimeoutMs?: number;
68
63
  /** 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`. */
69
64
  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;
78
65
  /** 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. */
79
66
  onBeforeSubmit?: (req: SubmissionRequest) => Promise<SubmissionRequest>;
80
67
  /** 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! */