idmission-web-sdk 1.0.51 → 1.0.53

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -4,6 +4,26 @@ Demo: https://websdk2demo.idmission.com
4
4
 
5
5
  Storybook: https://websdk2test.idmission.com
6
6
 
7
+ ## Getting Started
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.
10
+
11
+ To test that your credentials are valid:
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'
21
+ ```
22
+
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.
24
+
25
+ If you are using NodeJS, check out our [auth client for server-side JavaScript](https://www.npmjs.com/package/idmission-auth-client).
26
+
7
27
  ## Basic Usage in Typescript/React
8
28
 
9
29
  ```bash
@@ -22,7 +42,7 @@ render(<IdValidation submissionToken={YOUR_TOKEN} />, document.getElementById('r
22
42
 
23
43
  Add the following script tag to your page's `<head>`:
24
44
  ```html
25
- <script type=“module” src="https://websdk-cdn-dev.idmission.com/websdk/prod/loader.js"></script>
45
+ <script type="module" src="https://websdk-cdn-dev.idmission.com/websdk/prod/loader.js"></script>
26
46
  ```
27
47
 
28
48
  You may subscribe to the `idmission-web-sdk.ready` event to be notified when loading has completed.
@@ -20,31 +20,58 @@ export type CustomerBiometricsEnrollmentVerbiage = {
20
20
  videoSignatureCapture?: VideoSignatureVerbiage;
21
21
  };
22
22
  export interface CustomerBiometricsEnrollmentProps extends PropsWithChildren {
23
+ /** The unique identifier to match from previously enrolled customers. */
23
24
  enrollmentId: string;
25
+ /** Language code to use. Supported values: 'auto' (detect based on user's OS), 'en' (English), 'es' (Spanish). Defaults to auto. */
24
26
  lang?: LangOption;
27
+ /** A token generated with your IDmission credentials. */
25
28
  submissionToken: string;
29
+ /** URL to hit with all API requests. Defaults to the value specified in your decoded `submissionToken`. */
26
30
  submissionUrl?: string;
31
+ /** Company identifier to include with submission. */
27
32
  companyId?: string;
33
+ /** Boolean flag indicating whether submissions from the same user should be de-duplicated. */
28
34
  deduplicationEnabled?: boolean;
35
+ /** Boolean flag indicating whether to wait for de-duplication to complete before allowing the user to proceed. */
29
36
  deduplicationSynchronous?: boolean;
37
+ /** Boolean flag to indicate whether customer-configured webhooks should be invoked after submission. */
30
38
  webhooksEnabled?: boolean;
39
+ /** A customer provided trace id to use when invoking customer-configured webhooks. */
31
40
  webhooksClientTraceId?: string;
41
+ /** Boolean flag to indicate whether non-alphanumeric characters should be removed from the submission data when customer-configured webhooks are invoked. */
32
42
  webhooksStripSpecialCharacters?: boolean;
43
+ /** The duration of time in milliseconds that the user may try to pass the realness check. Defaults to `15000` (15 seconds). */
33
44
  timeoutDurationMs?: number;
45
+ /** 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`. */
34
46
  skipSuccessScreen?: boolean | (() => Promise<boolean>);
47
+ /** 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. */
35
48
  onBeforeSubmit?: (req: SubmissionRequest) => Promise<SubmissionRequest>;
49
+ /** 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. */
36
50
  onComplete?: (resp: SubmissionResponse, req: SubmissionRequest) => void;
51
+ /** Callback function that fires when the user has completed the CustomerBiometricsEnrollment flow successfully. The SubmissionResponse from IDmission's API is passed as an argument to the customer's application for further handling, which indicates whether the user passed the validation check. */
37
52
  onEnrolled?: (resp: SubmissionResponse, req: SubmissionRequest) => void;
53
+ /** Callback function that fires when the user has completed the CustomerBiometricsEnrollment flow but could not be enrolled. The SubmissionResponse from IDmission's API is passed as an argument to the customer's application for further handling, which indicates whether the user passed the validation check. */
38
54
  onDenied?: (resp: SubmissionResponse, req: SubmissionRequest) => void;
55
+ /** Callback function that fires when the user clicks the exit button after completing the IDValidation flow and failing the realness check. */
39
56
  onExitAfterFailure?: () => void;
57
+ /** Boolean or async function indicating whether the user should be prompted to sign the screen before submission. Defaults to `false`. */
40
58
  captureSignature?: boolean | (() => Promise<boolean>);
59
+ /** Boolean or async function indicating whether the user should be prompted to record themselves signing the screen before submission. Defaults to `false`. */
41
60
  captureSignatureVideo?: boolean | (() => Promise<boolean>);
61
+ /** Array of additional documents to be captured. Each element includes a name and description. */
42
62
  captureAdditionalDocuments?: AdditionalDocument[];
63
+ /** Object containing any asset overrides. */
43
64
  assets?: CustomerBiometricsEnrollmentAssets;
65
+ /** Object containing any color overrides. */
44
66
  colors?: CustomerBiometricsEnrollmentColors;
67
+ /** Object containing any verbiage overrides. */
45
68
  verbiage?: CustomerBiometricsEnrollmentVerbiage;
69
+ /** Boolean flag to indicate whether users should be prompted to share their location. Default is `true`. */
46
70
  geolocationEnabled?: boolean;
71
+ /** Boolean flag to indicate whether users should be blocked from proceeding if they block location access. Default is `false`. */
47
72
  geolocationRequired?: boolean;
73
+ /** Boolean flag to enable on-screen prediction information output. Default is `false`. */
48
74
  debugMode?: boolean;
49
75
  }
76
+ /** Render a fullscreen capture component that performs FaceValidation, and then stores the results in IDmission's customer database using the supplied `enrollmentId` for later verification or 1:N matching. */
50
77
  export declare const CustomerBiometricsEnrollment: FC<CustomerBiometricsEnrollmentProps>;
@@ -24,42 +24,82 @@ export type CustomerEnrollmentVerbiage = {
24
24
  videoSignatureCapture?: VideoSignatureVerbiage;
25
25
  };
26
26
  export interface CustomerEnrollmentProps extends PropsWithChildren {
27
+ /** The unique identifier to match from previously enrolled customers. */
27
28
  enrollmentId: string;
29
+ /** Language code to use. Supported values: 'auto' (detect based on user's OS), 'en' (English), 'es' (Spanish). Defaults to auto. */
28
30
  lang?: LangOption;
31
+ /** A token generated with your IDmission credentials. */
29
32
  submissionToken: string;
33
+ /** URL to hit with all API requests. Defaults to the value specified in your decoded `submissionToken`. */
30
34
  submissionUrl?: string;
35
+ /** Company identifier to include with submission. */
31
36
  companyId?: string;
37
+ /** Boolean flag to indicate whether responses should always be reviewed by a human. */
32
38
  manualReviewRequired?: boolean;
39
+ /** Boolean flag to indicate whether the back of the ID card image will be considered in processing decisions. Default is `true`. */
33
40
  idBackImageRequired?: boolean;
41
+ /** Boolean flag to indicate whether ID data should be verified with government databases such as AAMVA, watch lists, etc. */
34
42
  verifyIdWithExternalDatabases?: boolean;
43
+ /** Object of personal data to store with the submitted ID. Valid keys: `uniqueNumber`, `name`, `phone`, `phoneCountryCode`, `email`, `dob`, `gender`, `addressLine1`, `addressLine2`, `city`, `district`, `postalCode`, `country`. */
35
44
  personalData?: PersonalData;
45
+ /** Object of credit/debit card data to store with the submitted ID. Valid keys: `cardToken`, `cardLast4`, `cardExpDate`, `nameOnCard`. */
36
46
  cardData?: CardData;
47
+ /** Boolean flag indicating whether submissions from the same user should be de-duplicated. */
37
48
  deduplicationEnabled?: boolean;
49
+ /** Boolean flag indicating whether to wait for de-duplication to complete before allowing the user to proceed. */
38
50
  deduplicationSynchronous?: boolean;
51
+ /** Boolean flag to indicate whether customer-configured webhooks should be invoked after submission. */
39
52
  webhooksEnabled?: boolean;
53
+ /** A customer provided trace id to use when invoking customer-configured webhooks. */
40
54
  webhooksClientTraceId?: string;
55
+ /** Boolean flag to indicate whether non-alphanumeric characters should be removed from the submission data when customer-configured webhooks are invoked. */
41
56
  webhooksStripSpecialCharacters?: boolean;
57
+ /** Boolean to indicate whether photos should be captured automatically when guidance conditions are met. Default is `true`. */
42
58
  idAutoCaptureEnabled?: boolean;
59
+ /** Number between 0 and 1 at which document detection guidance score condition is considered to be met for ID cards. Defaults to 0.8. */
43
60
  idCardAutoCaptureScoreThreshold?: number;
61
+ /** Number between 0 and 1 at which document detection guidance score condition is considered to be met for Machine Readable Zones. Defaults to 0.5. */
44
62
  mrzDetectionScoreThreshold?: number;
63
+ /** Number between 0 and 1 at which document detection guidance score condition is considered to be met for passports. Defaults to 0.75. */
45
64
  passportAutoCaptureScoreThreshold?: number;
65
+ /** Number between 0 and 1 at which focus guidance score condition is considered to be met for ID cards. */
46
66
  idCardFocusScoreThreshold?: number;
67
+ /** Number between 0 and 1 at which focus guidance score condition is considered to be met for passports. */
47
68
  passportFocusScoreThreshold?: number;
69
+ /** The duration of time in milliseconds that the user may try to pass the realness check. Defaults to `15000` (15 seconds). */
48
70
  faceLivenessTimeoutDurationMs?: number;
71
+ /** 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`. */
49
72
  skipSuccessScreen?: boolean | (() => Promise<boolean>);
73
+ /** 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. */
50
74
  onBeforeSubmit?: (req: SubmissionRequest) => Promise<SubmissionRequest>;
75
+ /** 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. */
51
76
  onComplete?: (resp: SubmissionResponse, req: SubmissionRequest) => void;
77
+ /** Callback function that fires when the user has completed the CustomerIdAndBiometricsEnrollment flow successfully. The SubmissionResponse from IDmission's API is passed as an argument to the customer's application for further handling, which indicates whether the user passed the validation check. */
52
78
  onEnrolled?: (resp: SubmissionResponse, req: SubmissionRequest) => void;
79
+ /** Callback function that fires when the user has completed the CustomerIdAndBiometricsEnrollment flow but could not be enrolled. The SubmissionResponse from IDmission's API is passed as an argument to the customer's application for further handling, which indicates whether the user passed the validation check. */
53
80
  onDenied?: (resp: SubmissionResponse, req: SubmissionRequest) => void;
81
+ /** Callback function that fires when the user clicks the exit button after completing the IDValidation flow and failing the realness check. */
54
82
  onExitAfterFailure?: () => void;
83
+ /** Boolean or async function indicating whether the user should be prompted to sign the screen before submission. Defaults to `false`. */
55
84
  captureSignature?: boolean | (() => Promise<boolean>);
85
+ /** Boolean or async function indicating whether the user should be prompted to record themselves signing the screen before submission. Defaults to `false`. */
56
86
  captureSignatureVideo?: boolean | (() => Promise<boolean>);
87
+ /** Array of additional documents to be captured. Each element includes a name and description. */
57
88
  captureAdditionalDocuments?: AdditionalDocument[];
89
+ /** Object containing any asset overrides. */
58
90
  assets?: CustomerEnrollmentAssets;
91
+ /** Object containing any color overrides. */
59
92
  colors?: CustomerEnrollmentColors;
93
+ /** Object containing any verbiage overrides. */
60
94
  verbiage?: CustomerEnrollmentVerbiage;
95
+ /** Boolean flag to indicate whether users should be prompted to share their location. Default is `true`. */
61
96
  geolocationEnabled?: boolean;
97
+ /** Boolean flag to indicate whether users should be blocked from proceeding if they block location access. Default is `false`. */
62
98
  geolocationRequired?: boolean;
99
+ /** Boolean flag to enable on-screen prediction information output. Default is `false`. */
63
100
  debugMode?: boolean;
64
101
  }
102
+ /**
103
+ * Render a fullscreen capture component that performs IDValidation and FaceValidation sequentially, and then stores the results in IDmission's customer database using the supplied `enrollmentId` for later verification or 1:N matching.
104
+ */
65
105
  export declare const CustomerIdAndBiometricsEnrollment: FC<CustomerEnrollmentProps>;
@@ -3,26 +3,51 @@ import { SubmissionRequest, SubmissionResponse } from '../../contexts/Submission
3
3
  import { CustomerIdentificationAssets, CustomerIdentificationColors, CustomerIdentificationVerbiage } from '../customer_identification/CustomerIdentificationWizard';
4
4
  import { LangOption } from '../../lib/locales';
5
5
  export interface CustomerIdentificationProps extends PropsWithChildren {
6
+ /** Language code to use. Supported values: 'auto' (detect based on user's OS), 'en' (English), 'es' (Spanish). Defaults to auto. */
6
7
  lang?: LangOption;
8
+ /** A token generated with your IDmission credentials. */
7
9
  submissionToken: string;
10
+ /** URL to hit with all API requests. Defaults to the value specified in your decoded `submissionToken`. */
8
11
  submissionUrl?: string;
12
+ /** Company identifier to include with submission. */
9
13
  companyId?: string;
14
+ /** Boolean flag to indicate whether customer-configured webhooks should be invoked after submission. */
10
15
  webhooksEnabled?: boolean;
16
+ /** A customer provided trace id to use when invoking customer-configured webhooks. */
11
17
  webhooksClientTraceId?: string;
18
+ /** Boolean flag to indicate whether non-alphanumeric characters should be removed from the submission data when customer-configured webhooks are invoked. */
12
19
  webhooksStripSpecialCharacters?: boolean;
20
+ /** The duration of time in milliseconds that the user may try to pass the realness check. Defaults to `15000` (15 seconds). */
13
21
  timeoutDurationMs?: number;
22
+ /** 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`. */
14
23
  skipSuccessScreen?: boolean | (() => Promise<boolean>);
24
+ /** 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. */
15
25
  onBeforeSubmit?: (req: SubmissionRequest) => Promise<SubmissionRequest>;
26
+ /** 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. */
16
27
  onComplete?: (resp: SubmissionResponse, req: SubmissionRequest) => void;
28
+ /** 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. */
17
29
  onCustomerMatched?: (resp: SubmissionResponse, req: SubmissionRequest) => void;
30
+ /** Callback function that fires when the user has completed the CustomerIdentification flow but does not match any registered customer. The SubmissionResponse from IDmission's API is passed as an argument to the customer's application for further handling, which indicates whether the user passed the validation check. */
18
31
  onCustomerNotMatched?: (resp: SubmissionResponse, req: SubmissionRequest) => void;
32
+ /** */
33
+ /** Callback function that fires when the user fails the realness check by exceeding the time allotted. */
19
34
  onCaptureGuidanceTimeout?: () => void;
35
+ /** Callback function that fires when the user clicks the exit button after failing the realness check. */
20
36
  onExitAfterFailure?: () => void;
37
+ /** Object containing any asset overrides. */
21
38
  assets?: CustomerIdentificationAssets;
39
+ /** Object containing any color overrides. */
22
40
  colors?: CustomerIdentificationColors;
41
+ /** Object containing any verbiage overrides. */
23
42
  verbiage?: CustomerIdentificationVerbiage;
43
+ /** Boolean flag to indicate whether users should be prompted to share their location. Default is `true`. */
24
44
  geolocationEnabled?: boolean;
45
+ /** Boolean flag to indicate whether users should be blocked from proceeding if they block location access. Default is `false`. */
25
46
  geolocationRequired?: boolean;
47
+ /** Boolean flag to enable on-screen prediction information output. Default is `false`. */
26
48
  debugMode?: boolean;
27
49
  }
50
+ /**
51
+ * Render a fullscreen capture component that analyzes frames from the user's front-facing camera to determine whether the user matches any previously registered customer in IDmission's customer database.
52
+ * */
28
53
  export declare const CustomerIdentification: FC<CustomerIdentificationProps>;
@@ -3,26 +3,50 @@ import { SubmissionRequest, SubmissionResponse } from '../../contexts/Submission
3
3
  import { LangOption } from '../../lib/locales';
4
4
  import { CustomerVerificationAssets, CustomerVerificationColors, CustomerVerificationVerbiage } from '../customer_verification/CustomerVerificationWizard';
5
5
  export interface CustomerVerificationProps extends PropsWithChildren {
6
+ /** The unique identifier to match from previously enrolled customers. */
6
7
  enrollmentId: string;
8
+ /** Language code to use. Supported values: 'auto' (detect based on user's OS), 'en' (English), 'es' (Spanish). Defaults to auto. */
7
9
  lang?: LangOption;
10
+ /** A token generated with your IDmission credentials. */
8
11
  submissionToken: string;
12
+ /** URL to hit with all API requests. Defaults to the value specified in your decoded `submissionToken`. */
9
13
  submissionUrl?: string;
14
+ /** Company identifier to include with submission. */
10
15
  companyId?: string;
16
+ /** Boolean flag to indicate whether customer-configured webhooks should be invoked after submission. */
11
17
  webhooksEnabled?: boolean;
18
+ /** A customer provided trace id to use when invoking customer-configured webhooks. */
12
19
  webhooksClientTraceId?: string;
20
+ /** Boolean flag to indicate whether non-alphanumeric characters should be removed from the submission data when customer-configured webhooks are invoked. */
13
21
  webhooksStripSpecialCharacters?: boolean;
22
+ /** The duration of time in milliseconds that the user may try to pass the realness check. Defaults to `15000` (15 seconds). */
14
23
  timeoutDurationMs?: number;
24
+ /** 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`. */
15
25
  skipSuccessScreen?: boolean | (() => Promise<boolean>);
26
+ /** Object containing any asset overrides. */
16
27
  assets?: CustomerVerificationAssets;
28
+ /** Object containing any color overrides. */
17
29
  colors?: CustomerVerificationColors;
30
+ /** Object containing any verbiage overrides. */
18
31
  verbiage?: CustomerVerificationVerbiage;
32
+ /** 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. */
19
33
  onBeforeSubmit?: (req: SubmissionRequest) => Promise<SubmissionRequest>;
34
+ /** 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. */
20
35
  onComplete?: (resp: SubmissionResponse, req: SubmissionRequest) => void;
36
+ /** Callback function that fires when the user has completed the CustomerVerification flow and matches the specified customer <code>enrollmentId</code>. The SubmissionResponse from IDmission's API is passed as an argument to the customer's application for further handling, which indicates whether the user passed the validation check. */
21
37
  onCustomerMatched?: (resp: SubmissionResponse, req: SubmissionRequest) => void;
38
+ /** Callback function that fires when the user has completed the CustomerVerification flow but does not match the specified customer <code>enrollmentId</code>. The SubmissionResponse from IDmission's API is passed as an argument to the customer's application for further handling, which indicates whether the user passed the validation check. */
22
39
  onCustomerNotMatched?: (resp: SubmissionResponse, req: SubmissionRequest) => void;
40
+ /** Callback function that fires when the user clicks the exit button after failing the realness check. */
23
41
  onExitAfterFailure?: () => void;
42
+ /** Boolean flag to indicate whether users should be prompted to share their location. Default is `true`. */
24
43
  geolocationEnabled?: boolean;
44
+ /** Boolean flag to indicate whether users should be blocked from proceeding if they block location access. Default is `false`. */
25
45
  geolocationRequired?: boolean;
46
+ /** Boolean flag to enable on-screen prediction information output. Default is `false`. */
26
47
  debugMode?: boolean;
27
48
  }
49
+ /**
50
+ * Render a fullscreen capture component that analyzes frames from the user's front-facing camera to determine whether the user matches a specified `enrollmentId` that they have previously registered in IDmission's customer database.
51
+ */
28
52
  export declare const CustomerVerification: FC<CustomerVerificationProps>;
@@ -3,25 +3,46 @@ import { LivenessCheckRequest, SubmissionResponse } from '../../contexts/Submiss
3
3
  import { FaceLivenessAssets, FaceLivenessColors, FaceLivenessVerbiage } from '../face_liveness/FaceLivenessWizard';
4
4
  import { LangOption } from '../../lib/locales';
5
5
  export interface FaceValidationProps extends PropsWithChildren {
6
+ /** Language code to use. Supported values: 'auto' (detect based on user's OS), 'en' (English), 'es' (Spanish). Defaults to auto. */
6
7
  lang?: LangOption;
8
+ /** A token generated with your IDmission credentials. */
7
9
  submissionToken: string;
10
+ /** URL to hit with all API requests. Defaults to the value specified in your decoded `submissionToken`. */
8
11
  submissionUrl?: string;
12
+ /** Company identifier to include with submission. */
9
13
  companyId?: string;
14
+ /** Boolean flag to indicate whether customer-configured webhooks should be invoked after submission. */
10
15
  webhooksEnabled?: boolean;
16
+ /** A customer provided trace id to use when invoking customer-configured webhooks. */
11
17
  webhooksClientTraceId?: string;
18
+ /** Boolean flag to indicate whether non-alphanumeric characters should be removed from the submission data when customer-configured webhooks are invoked. */
12
19
  webhooksStripSpecialCharacters?: boolean;
20
+ /** The duration of time in milliseconds that the user may try to pass the realness check. Defaults to `15000` (15 seconds). */
13
21
  timeoutDurationMs?: number;
22
+ /** 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`. */
14
23
  skipSuccessScreen?: boolean | (() => Promise<boolean>);
24
+ /** 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. */
15
25
  onBeforeSubmit?: (req: LivenessCheckRequest) => Promise<LivenessCheckRequest>;
26
+ /** 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. */
16
27
  onComplete?: (resp: SubmissionResponse | null, req: LivenessCheckRequest | null) => void;
28
+ /** Callback function that fires when the user completes the FaceValidation flow and passes the realness check. Arguments: same as onComplete. */
17
29
  onApproved?: (resp: SubmissionResponse, req: LivenessCheckRequest) => void;
30
+ /** Callback function that fires when the user completes the FaceValidation flow and fails the realness check. Arguments: same as onComplete. */
18
31
  onDenied?: (resp: SubmissionResponse | null, req: LivenessCheckRequest | null) => void;
32
+ /** Callback function that fires when the user clicks the exit button after completing the FaceValidation flow and failing the realness check. */
19
33
  onExitAfterFailure?: () => void;
34
+ /** Object containing any asset overrides. */
20
35
  assets?: FaceLivenessAssets;
36
+ /** Object containing any color overrides. */
21
37
  colors?: FaceLivenessColors;
38
+ /** Object containing any verbiage overrides. */
22
39
  verbiage?: FaceLivenessVerbiage;
40
+ /** Boolean flag to indicate whether users should be prompted to share their location. Default is `true`. */
23
41
  geolocationEnabled?: boolean;
42
+ /** Boolean flag to indicate whether users should be blocked from proceeding if they block location access. Default is `false`. */
24
43
  geolocationRequired?: boolean;
44
+ /** Boolean flag to enable on-screen prediction information output. Default is `false`. */
25
45
  debugMode?: boolean;
26
46
  }
47
+ /** Render a fullscreen capture component that analyzes frames from the user's front-facing camera to determine whether a live human face is present. */
27
48
  export declare const FaceValidation: FC<FaceValidationProps>;
@@ -24,40 +24,78 @@ export type IdAndFaceValidationVerbiage = {
24
24
  videoSignatureCapture?: VideoSignatureVerbiage;
25
25
  };
26
26
  export interface IdAndFaceValidationProps extends PropsWithChildren {
27
+ /** Language code to use. Supported values: 'auto' (detect based on user's OS), 'en' (English), 'es' (Spanish). Defaults to auto. */
27
28
  lang?: LangOption;
29
+ /** A token generated with your IDmission credentials. */
28
30
  submissionToken: string;
31
+ /** URL to hit with all API requests. Defaults to the value specified in your decoded `submissionToken`. */
29
32
  submissionUrl?: string;
33
+ /** Company identifier to include with submission. */
30
34
  companyId?: string;
35
+ /** Boolean flag to indicate whether responses should always be reviewed by a human. */
31
36
  manualReviewRequired?: boolean;
37
+ /** Boolean flag to indicate whether the back of the ID card image will be considered in processing decisions. Default is `true`. */
32
38
  idBackImageRequired?: boolean;
39
+ /** Boolean flag to indicate whether ID data should be verified with government databases such as AAMVA, watch lists, etc. */
33
40
  verifyIdWithExternalDatabases?: boolean;
41
+ /** Object of personal data to store with the submitted ID. Valid keys: `uniqueNumber`, `name`, `phone`, `phoneCountryCode`, `email`, `dob`, `gender`, `addressLine1`, `addressLine2`, `city`, `district`, `postalCode`, `country`. */
34
42
  personalData?: PersonalData;
43
+ /** Object of credit/debit card data to store with the submitted ID. Valid keys: `cardToken`, `cardLast4`, `cardExpDate`, `nameOnCard`. */
35
44
  cardData?: CardData;
45
+ /** Boolean flag to indicate whether customer-configured webhooks should be invoked after submission. */
36
46
  webhooksEnabled?: boolean;
47
+ /** A customer provided trace id to use when invoking customer-configured webhooks. */
37
48
  webhooksClientTraceId?: string;
49
+ /** Boolean flag to indicate whether non-alphanumeric characters should be removed from the submission data when customer-configured webhooks are invoked. */
38
50
  webhooksStripSpecialCharacters?: boolean;
51
+ /** Boolean to indicate whether photos should be captured automatically when guidance conditions are met. Default is `true`. */
39
52
  idAutoCaptureEnabled?: boolean;
53
+ /** Number between 0 and 1 at which document detection guidance score condition is considered to be met for ID cards. Defaults to 0.8. */
40
54
  idCardAutoCaptureScoreThreshold?: number;
55
+ /** Number between 0 and 1 at which document detection guidance score condition is considered to be met for Machine Readable Zones. Defaults to 0.5. */
41
56
  mrzDetectionScoreThreshold?: number;
57
+ /** Number between 0 and 1 at which document detection guidance score condition is considered to be met for passports. Defaults to 0.75. */
42
58
  passportAutoCaptureScoreThreshold?: number;
59
+ /** Number between 0 and 1 at which focus guidance score condition is considered to be met for ID cards. */
43
60
  idCardFocusScoreThreshold?: number;
61
+ /** Number between 0 and 1 at which focus guidance score condition is considered to be met for passports. */
44
62
  passportFocusScoreThreshold?: number;
63
+ /** The duration of time in milliseconds that the user may try to pass the realness check. Defaults to `15000` (15 seconds). */
45
64
  faceLivenessTimeoutDurationMs?: number;
65
+ /** 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`. */
46
66
  skipSuccessScreen?: boolean | (() => Promise<boolean>);
67
+ /** 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. */
47
68
  onBeforeLivenessCheck?: (req: LivenessCheckRequest) => Promise<LivenessCheckRequest>;
69
+ /** 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. */
48
70
  onBeforeSubmit?: (req: SubmissionRequest) => Promise<SubmissionRequest>;
71
+ /** 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. */
49
72
  onComplete?: (resp: SubmissionResponse, req: SubmissionRequest) => void;
73
+ /** Callback function that fires when the user completes both flows with a valid ID and passes the realness check. Arguments: same as `onComplete`. */
50
74
  onApproved?: (resp: SubmissionResponse, req: SubmissionRequest) => void;
75
+ /** Callback function that fires when the user completes both flows with an invalid ID or fails the realness check. Arguments: same as `onComplete`. */
51
76
  onDenied?: (resp: SubmissionResponse | null, req: SubmissionRequest | LivenessCheckRequest | null) => void;
77
+ /** Callback function that fires when the user clicks the exit button after completing the IDValidation flow and failing the realness check. */
52
78
  onExitAfterFailure?: () => void;
79
+ /** Boolean or async function indicating whether the user should be prompted to sign the screen before submission. Defaults to `false`. */
53
80
  captureSignature?: boolean | (() => Promise<boolean>);
81
+ /** Boolean or async function indicating whether the user should be prompted to record themselves signing the screen before submission. Defaults to `false`. */
54
82
  captureSignatureVideo?: boolean | (() => Promise<boolean>);
83
+ /** Array of additional documents to be captured. Each element includes a name and description. */
55
84
  captureAdditionalDocuments?: AdditionalDocument[];
85
+ /** Object containing any asset overrides. */
56
86
  assets?: IdAndFaceValidationAssets;
87
+ /** Object containing any color overrides. */
57
88
  colors?: IdAndFaceValidationColors;
89
+ /** Object containing any verbiage overrides. */
58
90
  verbiage?: IdAndFaceValidationVerbiage;
91
+ /** Boolean flag to indicate whether users should be prompted to share their location. Default is `true`. */
59
92
  geolocationEnabled?: boolean;
93
+ /** Boolean flag to indicate whether users should be blocked from proceeding if they block location access. Default is `false`. */
60
94
  geolocationRequired?: boolean;
95
+ /** Boolean flag to enable on-screen prediction information output. Default is `false`. */
61
96
  debugMode?: boolean;
62
97
  }
98
+ /**
99
+ * Render a fullscreen capture component that performs `IDValidation` and `FaceValidation` sequentially.
100
+ * */
63
101
  export declare const IdAndFaceValidation: FC<IdAndFaceValidationProps>;
@@ -16,36 +16,70 @@ export type IdValidationVerbiage = IdCaptureWizardVerbiage & {
16
16
  videoSignatureCapture?: VideoSignatureVerbiage;
17
17
  };
18
18
  export interface IdValidationProps extends PropsWithChildren {
19
+ /** Language code to use. Supported values: 'auto' (detect based on user's OS), 'en' (English), 'es' (Spanish). Defaults to auto. */
19
20
  lang?: LangOption;
21
+ /** A token generated with your IDmission credentials. */
20
22
  submissionToken: string;
23
+ /** URL to hit with all API requests. Defaults to the value specified in your decoded `submissionToken`. */
21
24
  submissionUrl?: string;
25
+ /** Company identifier to include with submission. */
22
26
  companyId?: string;
27
+ /** Boolean flag to indicate whether responses should always be reviewed by a human. */
23
28
  manualReviewRequired?: boolean;
29
+ /** Boolean flag to indicate whether the back of the ID card image will be considered in processing decisions. Default is `true`. */
24
30
  idBackImageRequired?: boolean;
31
+ /** Boolean flag to indicate whether ID data should be verified with government databases such as AAMVA, watch lists, etc. */
25
32
  verifyIdWithExternalDatabases?: boolean;
33
+ /** Object of personal data to store with the submitted ID. Valid keys: `uniqueNumber`, `name`, `phone`, `phoneCountryCode`, `email`, `dob`, `gender`, `addressLine1`, `addressLine2`, `city`, `district`, `postalCode`, `country`. */
26
34
  personalData?: PersonalData;
35
+ /** Object of credit/debit card data to store with the submitted ID. Valid keys: `cardToken`, `cardLast4`, `cardExpDate`, `nameOnCard`. */
27
36
  cardData?: CardData;
37
+ /** Boolean flag to indicate whether customer-configured webhooks should be invoked after submission. */
28
38
  webhooksEnabled?: boolean;
39
+ /** A customer provided trace id to use when invoking customer-configured webhooks. */
29
40
  webhooksClientTraceId?: string;
41
+ /** Boolean flag to indicate whether non-alphanumeric characters should be removed from the submission data when customer-configured webhooks are invoked. */
30
42
  webhooksStripSpecialCharacters?: boolean;
43
+ /** Boolean to indicate whether photos should be captured automatically when guidance conditions are met. Default is `true`. */
31
44
  idAutoCaptureEnabled?: boolean;
45
+ /** Number between 0 and 1 at which document detection guidance score condition is considered to be met for ID cards. Defaults to 0.8. */
32
46
  idCardAutoCaptureScoreThreshold?: number;
47
+ /** Number between 0 and 1 at which document detection guidance score condition is considered to be met for passports. Defaults to 0.75. */
33
48
  passportAutoCaptureScoreThreshold?: number;
49
+ /** Number between 0 and 1 at which focus guidance score condition is considered to be met for ID cards. */
34
50
  idCardFocusScoreThreshold?: number;
51
+ /** Number between 0 and 1 at which focus guidance score condition is considered to be met for passports. */
35
52
  passportFocusScoreThreshold?: number;
53
+ /** 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`. */
36
54
  skipSuccessScreen?: boolean | (() => Promise<boolean>);
55
+ /** 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. */
37
56
  onBeforeSubmit?: (req: SubmissionRequest) => Promise<SubmissionRequest>;
57
+ /** 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. */
38
58
  onComplete?: (resp: SubmissionResponse, req: SubmissionRequest) => void;
59
+ /** Callback function that fires when the user completes the IDValidation flow with a valid ID. Arguments: same as `onComplete`. */
39
60
  onApproved?: (resp: SubmissionResponse, req: SubmissionRequest) => void;
61
+ /** Callback function that fires when the user completes the IDValidation flow with an invalid ID. Arguments: same as `onComplete`. */
40
62
  onDenied?: (resp: SubmissionResponse, req: SubmissionRequest) => void;
63
+ /** Boolean or async function indicating whether the user should be prompted to sign the screen before submission. Defaults to `false`. */
41
64
  captureSignature?: boolean | (() => Promise<boolean>);
65
+ /** Boolean or async function indicating whether the user should be prompted to record themselves signing the screen before submission. Defaults to `false`. */
42
66
  captureSignatureVideo?: boolean | (() => Promise<boolean>);
67
+ /** Array of additional documents to be captured. Each element includes a name and description. */
43
68
  captureAdditionalDocuments?: AdditionalDocument[];
69
+ /** Object containing any asset overrides. */
44
70
  assets?: IdValidationAssets;
71
+ /** Object containing any color overrides. */
45
72
  colors?: IdValidationColors;
73
+ /** Object containing any verbiage overrides. */
46
74
  verbiage?: IdValidationVerbiage;
75
+ /** Boolean flag to indicate whether users should be prompted to share their location. Default is `true`. */
47
76
  geolocationEnabled?: boolean;
77
+ /** Boolean flag to indicate whether users should be blocked from proceeding if they block location access. Default is `false`. */
48
78
  geolocationRequired?: boolean;
79
+ /** Boolean flag to enable on-screen prediction information output. Default is `false`. */
49
80
  debugMode?: boolean;
50
81
  }
82
+ /**
83
+ * Render a fullscreen ID capture component that instructs the user to photograph both sides of their ID card, or full page of their passport.
84
+ */
51
85
  export declare const IdValidation: FC<IdValidationProps>;
@@ -3,16 +3,28 @@ import { LangOption } from '../../lib/locales';
3
3
  import { SubmissionRequest, SubmissionResponse } from '../../contexts/SubmissionContext';
4
4
  import { VideoSignatureColors, VideoSignatureVerbiage } from '../video_signature_capture/VideoSignatureWizard';
5
5
  export interface SignatureKYCProps extends PropsWithChildren {
6
+ /** Language code to use. Supported values: 'auto' (detect based on user's OS), 'en' (English), 'es' (Spanish). Defaults to auto. */
6
7
  lang?: LangOption;
8
+ /** A token generated with your IDmission credentials. */
7
9
  submissionToken: string;
10
+ /** URL to hit with all API requests. Defaults to the value specified in your decoded `submissionToken`. */
8
11
  submissionUrl?: string;
12
+ /** 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. */
9
13
  onBeforeSubmit?: (req: SubmissionRequest) => Promise<SubmissionRequest>;
14
+ /** Callback function that fires when the user completes the SignatureKYC 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 data submitted by the user. */
10
15
  onComplete?: (resp: SubmissionResponse, req: SubmissionRequest) => void;
16
+ /** 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`. */
11
17
  skipSuccessScreen?: boolean | (() => Promise<boolean>);
18
+ /** Object containing any color overrides. */
12
19
  colors?: VideoSignatureColors;
20
+ /** Object containing any verbiage overrides. */
13
21
  verbiage?: VideoSignatureVerbiage;
22
+ /** Boolean flag to indicate whether users should be prompted to share their location. Default is `true`. */
14
23
  geolocationEnabled?: boolean;
24
+ /** Boolean flag to indicate whether users should be blocked from proceeding if they block location access. Default is `false`. */
15
25
  geolocationRequired?: boolean;
26
+ /** Boolean flag to enable on-screen prediction information output. Default is `false`. */
16
27
  debugMode?: boolean;
17
28
  }
29
+ /** Render a fullscreen capture component that captures a video of the user signing the screen. */
18
30
  export declare const SignatureKYC: FC<SignatureKYCProps>;
@@ -8,35 +8,68 @@ export type VideoIdValidationAssets = VideoIdWizardAssets;
8
8
  export type VideoIdValidationColors = VideoIdWizardColors;
9
9
  export type VideoIdValidationVerbiage = VideoIdWizardVerbiage;
10
10
  export interface VideoIdValidationProps extends PropsWithChildren {
11
+ /** Language code to use. Supported values: 'auto' (detect based on user's OS), 'en' (English), 'es' (Spanish). Defaults to auto. */
11
12
  lang?: LangOption;
13
+ /** A token generated with your IDmission credentials. */
12
14
  submissionToken: string;
15
+ /** URL to hit with all API requests. Defaults to the value specified in your decoded `submissionToken`. */
13
16
  submissionUrl?: string;
17
+ /** Company identifier to include with submission. */
14
18
  companyId?: string;
19
+ /** Boolean flag to indicate whether responses should always be reviewed by a human. */
15
20
  manualReviewRequired?: boolean;
21
+ /** Boolean flag to indicate whether the back of the ID card image will be considered in processing decisions. Default is `true`. */
16
22
  idBackImageRequired?: boolean;
23
+ /** Boolean flag to indicate whether ID data should be verified with government databases such as AAMVA, watch lists, etc. */
17
24
  verifyIdWithExternalDatabases?: boolean;
25
+ /** Object of personal data to store with the submitted ID. Valid keys: `uniqueNumber`, `name`, `phone`, `phoneCountryCode`, `email`, `dob`, `gender`, `addressLine1`, `addressLine2`, `city`, `district`, `postalCode`, `country`. */
18
26
  personalData?: PersonalData;
27
+ /** Object of credit/debit card data to store with the submitted ID. Valid keys: `cardToken`, `cardLast4`, `cardExpDate`, `nameOnCard`. */
19
28
  cardData?: CardData;
29
+ /** Boolean flag to indicate whether customer-configured webhooks should be invoked after submission. */
20
30
  webhooksEnabled?: boolean;
31
+ /** A customer provided trace id to use when invoking customer-configured webhooks. */
21
32
  webhooksClientTraceId?: string;
33
+ /** Boolean flag to indicate whether non-alphanumeric characters should be removed from the submission data when customer-configured webhooks are invoked. */
22
34
  webhooksStripSpecialCharacters?: boolean;
35
+ /** 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. */
23
36
  onBeforeSubmit?: (req: SubmissionRequest) => Promise<SubmissionRequest>;
37
+ /** Callback function that fires when the user has completed all 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. */
24
38
  onComplete?: (resp: SubmissionResponse, req: SubmissionRequest) => void;
39
+ /** Callback function that fires when the user clicks the exit button after completing the IDValidation flow and failing the realness check. */
25
40
  onExitAfterFailure?: (resp: SubmissionResponse | null, req: LivenessCheckRequest | null) => void;
41
+ /** Object containing any overrides for IDValidation. */
26
42
  idCaptureProps?: IdCaptureWizardProps;
43
+ /** Object containing any overrides for FaceLiveness. */
27
44
  faceLivenessProps?: FaceLivenessWizardProps;
45
+ /** Number between 0 and 1 at which document detection guidance score condition is considered to be met for the ID card front during video capture. */
28
46
  idCardFrontDetectionThreshold?: number;
47
+ /** Number between 0 and 1 at which focus guidance score condition is considered to be met for the ID card front during video capture. */
29
48
  idCardFrontFocusThreshold?: number;
49
+ /** Number of good frames of the ID card front that must be captured before moving on during video capture. */
30
50
  goodIdCardFrontFramesThreshold?: number;
51
+ /** The duration of time in milliseconds that the user is instructed to show the back of their ID card during video capture. */
31
52
  showIdCardBackDurationMs?: number;
53
+ /** An optional text prompt to display on screen for the user to read during video capture after the ID card has been shown. */
32
54
  readTextPrompt?: CustomerSuppliedVerbiage;
55
+ /** The duration of time in milliseconds that the user is allowed to spend reading the `readTextPrompt`. */
33
56
  readTextTimeoutDurationMs?: number;
57
+ /** 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`. */
34
58
  skipSuccessScreen?: boolean | (() => Promise<boolean>);
59
+ /** Object containing any asset overrides. */
35
60
  assets?: VideoIdValidationAssets;
61
+ /** Object containing any color overrides. */
36
62
  colors?: VideoIdValidationColors;
63
+ /** Object containing any verbiage overrides. */
37
64
  verbiage?: VideoIdValidationVerbiage;
65
+ /** Boolean flag to indicate whether users should be prompted to share their location. Default is `true`. */
38
66
  geolocationEnabled?: boolean;
67
+ /** Boolean flag to indicate whether users should be blocked from proceeding if they block location access. Default is `false`. */
39
68
  geolocationRequired?: boolean;
69
+ /** Boolean flag to enable on-screen prediction information output. Default is `false`. */
40
70
  debugMode?: boolean;
41
71
  }
72
+ /**
73
+ * Render a fullscreen capture component that performs IDValidation and FaceValidation sequentially, then captures a video of the user holding their ID, and optionally speaking a prompt aloud.
74
+ * */
42
75
  export declare const VideoIdValidation: FC<VideoIdValidationProps>;