idmission-web-sdk 1.0.279 → 1.0.280
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/dist/components/CompositeWizard.d.ts +3 -3
- package/dist/components/customer_flows/CustomerBiometricsEnrollment.d.ts +5 -15
- package/dist/components/customer_flows/CustomerIdAndBiometricsEnrollment.d.ts +8 -15
- package/dist/components/customer_flows/CustomerIdentification.d.ts +5 -15
- package/dist/components/customer_flows/CustomerVerification.d.ts +5 -15
- package/dist/components/customer_flows/DocumentCapture.d.ts +2 -13
- package/dist/components/customer_flows/FaceValidation.d.ts +5 -17
- package/dist/components/customer_flows/IdAndFaceValidation.d.ts +8 -15
- package/dist/components/customer_flows/IdValidation.d.ts +5 -15
- package/dist/components/customer_flows/SignatureKYC.d.ts +5 -17
- package/dist/components/customer_flows/VideoIdValidation.d.ts +2 -17
- package/dist/components/customer_identification/CustomerIdentificationWizard.d.ts +3 -2
- package/dist/components/customer_verification/CustomerVerificationWizard.d.ts +3 -2
- package/dist/components/face_liveness/FaceLivenessWizard.d.ts +3 -2
- package/dist/components/id_capture/IdCaptureLoadingGraphic.d.ts +9 -0
- package/dist/components/id_capture/IdCaptureLoadingOverlay.d.ts +15 -1
- package/dist/components/id_capture/IdCaptureLoadingOverlayDefault.d.ts +3 -0
- package/dist/components/id_capture/IdCaptureLoadingOverlayLegacy.d.ts +3 -0
- package/dist/components/id_capture/IdCaptureWizard.d.ts +3 -2
- package/dist/components/selfie_capture/SelfieCaptureLoadingGraphic.d.ts +6 -0
- package/dist/components/selfie_capture/SelfieCaptureLoadingOverlay.d.ts +16 -2
- package/dist/components/selfie_capture/SelfieCaptureLoadingOverlayDefault.d.ts +3 -0
- package/dist/components/selfie_capture/SelfieCaptureLoadingOverlayLegacy.d.ts +3 -0
- package/dist/components/submission/Errors.d.ts +1 -1
- package/dist/components/submission/SubmissionProvider.d.ts +5 -24
- package/dist/components/submission/TokenIssuerNotAllowedErrorOverlay.d.ts +2 -0
- package/dist/components/submission/TokenMissingErrorOverlay.d.ts +2 -0
- package/dist/components/submission/TokenPublicKeyErrorOverlay.d.ts +5 -0
- package/dist/components/video_signature_capture/VideoSignatureWizard.d.ts +4 -2
- package/dist/contexts/SubmissionContext.d.ts +3 -9
- package/dist/index.d.ts +1 -7
- package/dist/lib/locales/es/translation.d.ts +4 -0
- package/dist/lib/locales/index.d.ts +4 -0
- package/dist/lib/utils/dataUrlToBase64.d.ts +0 -2
- package/dist/sdk2.cjs.development.js +2432 -1474
- package/dist/sdk2.cjs.development.js.map +1 -1
- package/dist/sdk2.cjs.production.js +1 -1
- package/dist/sdk2.cjs.production.js.map +1 -1
- package/dist/sdk2.esm.js +2435 -1474
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +2418 -1447
- package/dist/sdk2.umd.development.js.map +1 -1
- package/dist/sdk2.umd.production.js +1 -1
- package/dist/sdk2.umd.production.js.map +1 -1
- package/dist/stories/Components/CompositeWizard/FaceLivenessAndIdCapture.stories.d.ts +9 -0
- package/dist/stories/CustomerFlows/CustomerBiometricsEnrollment.stories.d.ts +1 -5
- package/dist/stories/CustomerFlows/CustomerIdAndBiometricsEnrollment.stories.d.ts +1 -5
- package/dist/stories/CustomerFlows/CustomerIdentification.stories.d.ts +1 -5
- package/dist/stories/CustomerFlows/CustomerVerification.stories.d.ts +1 -5
- package/dist/stories/CustomerFlows/DocumentCapture.stories.d.ts +1 -5
- package/dist/stories/CustomerFlows/FaceValidation.stories.d.ts +22 -5
- package/dist/stories/CustomerFlows/IdAndFaceValidation.stories.d.ts +1 -5
- package/dist/stories/CustomerFlows/IdValidation.stories.d.ts +16 -5
- package/dist/stories/CustomerFlows/SignatureKYC.stories.d.ts +1 -5
- package/dist/stories/CustomerFlows/VideoIdValidation.stories.d.ts +1 -14
- package/dist/themes/index.d.ts +44 -0
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
- package/dist/components/submission/AuthUrlNotAllowedOverlay.d.ts +0 -2
- package/dist/components/submission/SessionIdMissingOverlay.d.ts +0 -2
- package/dist/components/submission/SessionValidationErrorOverlay.d.ts +0 -6
- package/dist/components/submission/SessionValidationFailedOverlay.d.ts +0 -2
- package/dist/contexts/AuthStateContext.d.ts +0 -33
- package/dist/stories/Auth.stories.d.ts +0 -8
- package/dist/stories/utils/sessions.d.ts +0 -13
- package/dist/stories/utils/useLocalStorage.d.ts +0 -1
|
@@ -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
|
-
|
|
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';
|
|
@@ -8,6 +7,7 @@ import { LangOption } from '../../lib/locales';
|
|
|
8
7
|
import { SignatureCaptureClassNames, SignatureCaptureVerbiage } from '../signature_capture/SignatureCapture';
|
|
9
8
|
import { VideoSignatureClassNames, VideoSignatureColors, VideoSignatureVerbiage } from '../video_signature_capture/VideoSignatureWizard';
|
|
10
9
|
import { ThemeInput } from '../../themes';
|
|
10
|
+
import { SelfieCaptureLoadingOverlayMode } from '../selfie_capture/SelfieCaptureLoadingOverlay';
|
|
11
11
|
export type CustomerBiometricsEnrollmentAssets = {
|
|
12
12
|
faceLiveness?: FaceLivenessAssets;
|
|
13
13
|
};
|
|
@@ -32,14 +32,10 @@ export interface CustomerBiometricsEnrollmentProps extends PropsWithChildren {
|
|
|
32
32
|
enrollmentId: string;
|
|
33
33
|
/** Language code to use. Supported values: 'auto' (detect based on user's OS), 'en' (English), 'es' (Spanish). Defaults to auto. */
|
|
34
34
|
lang?: LangOption;
|
|
35
|
-
/** A
|
|
36
|
-
|
|
35
|
+
/** A token generated with your IDmission credentials. */
|
|
36
|
+
submissionToken: string;
|
|
37
37
|
/** URL to hit with all API requests. Defaults to the value specified in your decoded `submissionToken`. */
|
|
38
38
|
submissionUrl?: string;
|
|
39
|
-
/** URL to validate session against. Defaults to https://portal-api.idmission.com. */
|
|
40
|
-
authUrl?: string;
|
|
41
|
-
/** URL to upload captured documents to via Tus. */
|
|
42
|
-
documentServiceUrl?: string;
|
|
43
39
|
/** Company identifier to include with submission. */
|
|
44
40
|
companyId?: string;
|
|
45
41
|
/** Boolean flag to indicate if validation of the minimum resolution for an ID document image should be triggered. Defaults to true. */
|
|
@@ -58,18 +54,12 @@ export interface CustomerBiometricsEnrollmentProps extends PropsWithChildren {
|
|
|
58
54
|
webhooksSendInputImages?: boolean;
|
|
59
55
|
/** Boolean flag to indicate whether processed user-captured images should be included in the submission data when customer-configured webhooks are invoked. */
|
|
60
56
|
webhooksSendProcessedImages?: boolean;
|
|
57
|
+
/** String indicating which loading overlay screen should be used. Supported values: 'default' and 'legacy'. Defaults to 'default'. */
|
|
58
|
+
loadingOverlayMode?: SelfieCaptureLoadingOverlayMode;
|
|
61
59
|
/** The duration of time in milliseconds that the user may try to pass the realness check. Defaults to `15000` (15 seconds). */
|
|
62
60
|
timeoutDurationMs?: number;
|
|
63
61
|
/** Boolean or async function to indicate whether to proceed automatically after capture guidance is satisfied. If an async function is supplied returning a boolean, it will be evaluated at the time of capture guidance satisfaction. Defaults to `false`. */
|
|
64
62
|
skipSuccessScreen?: boolean | (() => Promise<boolean>);
|
|
65
|
-
/** 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. */
|
|
66
|
-
onBeforeDocumentUpload?: OnBeforeDocumentUpload;
|
|
67
|
-
/** Callback function that fires when progress information is available for a document upload. The progress info and metadata are passed in as parameters. */
|
|
68
|
-
onDocumentUploadProgress?: OnDocumentUploadProgress;
|
|
69
|
-
/** 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. */
|
|
70
|
-
onDocumentUploaded?: OnDocumentUploaded;
|
|
71
|
-
/** Callback function that fires when a document failed to upload. The error and metadata are passed in as parameters. */
|
|
72
|
-
onDocumentUploadFailed?: OnDocumentUploadFailed;
|
|
73
63
|
/** 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. */
|
|
74
64
|
onBeforeSubmit?: (req: SubmissionRequest) => Promise<SubmissionRequest>;
|
|
75
65
|
/** 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! */
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { FC, PropsWithChildren, ReactNode } from 'react';
|
|
2
|
-
import { OnBeforeDocumentUpload, OnDocumentUploaded, OnDocumentUploadFailed, OnDocumentUploadProgress } from '../submission/SubmissionProvider';
|
|
3
2
|
import { CardData, PersonalData, SubmissionRequest, SubmissionResponse } from '../../contexts/SubmissionContext';
|
|
4
3
|
import { FaceLivenessAssets, FaceLivenessClassNames, FaceLivenessColors, FaceLivenessVerbiage } from '../face_liveness/FaceLivenessWizard';
|
|
5
4
|
import { IdCaptureWizardAssets, IdCaptureWizardClassNames, IdCaptureWizardColors, IdCaptureWizardVerbiage } from '../id_capture/IdCaptureWizard';
|
|
@@ -11,6 +10,8 @@ import { VideoSignatureClassNames, VideoSignatureColors, VideoSignatureVerbiage
|
|
|
11
10
|
import { ThemeInput } from '../../themes';
|
|
12
11
|
import { IdCaptureRequirementOption } from '../id_capture/IdCaptureRequirementOption';
|
|
13
12
|
import { IdCaptureGuideType } from '../id_capture/IdCaptureGuides';
|
|
13
|
+
import { SelfieCaptureLoadingOverlayMode } from '../selfie_capture/SelfieCaptureLoadingOverlay';
|
|
14
|
+
import { IdCaptureLoadingOverlayMode } from '../id_capture/IdCaptureLoadingOverlay';
|
|
14
15
|
export type CustomerEnrollmentAssets = {
|
|
15
16
|
idCapture?: IdCaptureWizardAssets;
|
|
16
17
|
faceLiveness?: FaceLivenessAssets;
|
|
@@ -39,14 +40,10 @@ export interface CustomerEnrollmentProps extends PropsWithChildren {
|
|
|
39
40
|
enrollmentId: string;
|
|
40
41
|
/** Language code to use. Supported values: 'auto' (detect based on user's OS), 'en' (English), 'es' (Spanish). Defaults to auto. */
|
|
41
42
|
lang?: LangOption;
|
|
42
|
-
/** A
|
|
43
|
-
|
|
43
|
+
/** A token generated with your IDmission credentials. */
|
|
44
|
+
submissionToken: string;
|
|
44
45
|
/** URL to hit with all API requests. Defaults to the value specified in your decoded `submissionToken`. */
|
|
45
46
|
submissionUrl?: string;
|
|
46
|
-
/** URL to validate session against. Defaults to https://portal-api.idmission.com. */
|
|
47
|
-
authUrl?: string;
|
|
48
|
-
/** URL to upload captured documents to via Tus. */
|
|
49
|
-
documentServiceUrl?: string;
|
|
50
47
|
/** Company identifier to include with submission. */
|
|
51
48
|
companyId?: string;
|
|
52
49
|
/** Boolean flag to indicate if validation of the minimum resolution for an ID document image should be triggered. Defaults to true. */
|
|
@@ -83,6 +80,8 @@ export interface CustomerEnrollmentProps extends PropsWithChildren {
|
|
|
83
80
|
webhooksSendProcessedImages?: boolean;
|
|
84
81
|
/** Boolean flag to indicate whether customer-configured webhooks should be invoked upon ID being marked for manual review. */
|
|
85
82
|
webhooksFireOnReview?: boolean;
|
|
83
|
+
/** String indicating which ID capture loading overlay screen should be used. Supported values: 'default' and 'legacy'. Defaults to 'default'. */
|
|
84
|
+
idCaptureLoadingOverlayMode?: IdCaptureLoadingOverlayMode;
|
|
86
85
|
/** String to indicate which types of ID documents should be captured. Valid values: `idCard`, `passport`, `idCardOrPassport`, `idCardAndPassport`. Default is `idCardOrPassport`. */
|
|
87
86
|
idCaptureRequirement?: IdCaptureRequirementOption;
|
|
88
87
|
/** Boolean to indicate whether photos should be captured automatically when guidance conditions are met. Default is `true`. */
|
|
@@ -97,6 +96,8 @@ export interface CustomerEnrollmentProps extends PropsWithChildren {
|
|
|
97
96
|
idCardFocusScoreThreshold?: number;
|
|
98
97
|
/** Number between 0 and 1 at which focus guidance score condition is considered to be met for passports. */
|
|
99
98
|
passportFocusScoreThreshold?: number;
|
|
99
|
+
/** String indicating which face liveness loading overlay screen should be used. Supported values: 'default' and 'legacy'. Defaults to 'default'. */
|
|
100
|
+
faceLivenessLoadingOverlayMode?: SelfieCaptureLoadingOverlayMode;
|
|
100
101
|
/** The duration of time in milliseconds that the user may try to pass the realness check. Defaults to `15000` (15 seconds). */
|
|
101
102
|
faceLivenessTimeoutDurationMs?: number;
|
|
102
103
|
/** 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`. */
|
|
@@ -109,14 +110,6 @@ export interface CustomerEnrollmentProps extends PropsWithChildren {
|
|
|
109
110
|
idCapturePortraitGuidesOnMobile?: boolean;
|
|
110
111
|
/** Boolean to indicate whether loading overlay image should be rotated on when mobile guides are rotated. Defaults to `true`. */
|
|
111
112
|
idCaptureRotateLoadingOverlayImageWhenPortrait?: boolean;
|
|
112
|
-
/** 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. */
|
|
113
|
-
onBeforeDocumentUpload?: OnBeforeDocumentUpload;
|
|
114
|
-
/** Callback function that fires when progress information is available for a document upload. The progress info and metadata are passed in as parameters. */
|
|
115
|
-
onDocumentUploadProgress?: OnDocumentUploadProgress;
|
|
116
|
-
/** 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. */
|
|
117
|
-
onDocumentUploaded?: OnDocumentUploaded;
|
|
118
|
-
/** Callback function that fires when a document failed to upload. The error and metadata are passed in as parameters. */
|
|
119
|
-
onDocumentUploadFailed?: OnDocumentUploadFailed;
|
|
120
113
|
/** 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. */
|
|
121
114
|
onBeforeSubmit?: (req: SubmissionRequest) => Promise<SubmissionRequest>;
|
|
122
115
|
/** 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! */
|
|
@@ -1,20 +1,16 @@
|
|
|
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 { CustomerIdentificationAssets, CustomerIdentificationClassNames, CustomerIdentificationColors, CustomerIdentificationVerbiage } from '../customer_identification/CustomerIdentificationWizard';
|
|
5
4
|
import { LangOption } from '../../lib/locales';
|
|
6
5
|
import { ThemeInput } from '../../themes';
|
|
6
|
+
import { SelfieCaptureLoadingOverlayMode } from '../selfie_capture/SelfieCaptureLoadingOverlay';
|
|
7
7
|
export interface CustomerIdentificationProps extends PropsWithChildren {
|
|
8
8
|
/** Language code to use. Supported values: 'auto' (detect based on user's OS), 'en' (English), 'es' (Spanish). Defaults to auto. */
|
|
9
9
|
lang?: LangOption;
|
|
10
|
-
/** A
|
|
11
|
-
|
|
10
|
+
/** A token generated with your IDmission credentials. */
|
|
11
|
+
submissionToken: string;
|
|
12
12
|
/** URL to hit with all API requests. Defaults to the value specified in your decoded `submissionToken`. */
|
|
13
13
|
submissionUrl?: string;
|
|
14
|
-
/** URL to validate session against. Defaults to https://portal-api.idmission.com. */
|
|
15
|
-
authUrl?: string;
|
|
16
|
-
/** URL to upload captured documents to via Tus. */
|
|
17
|
-
documentServiceUrl?: string;
|
|
18
14
|
/** Company identifier to include with submission. */
|
|
19
15
|
companyId?: string;
|
|
20
16
|
/** Boolean flag to indicate if validation of the minimum resolution for an ID document image should be triggered. Defaults to true. */
|
|
@@ -29,18 +25,12 @@ export interface CustomerIdentificationProps extends PropsWithChildren {
|
|
|
29
25
|
webhooksSendInputImages?: boolean;
|
|
30
26
|
/** Boolean flag to indicate whether processed user-captured images should be included in the submission data when customer-configured webhooks are invoked. */
|
|
31
27
|
webhooksSendProcessedImages?: boolean;
|
|
28
|
+
/** String indicating which loading overlay screen should be used. Supported values: 'default' and 'legacy'. Defaults to 'default'. */
|
|
29
|
+
loadingOverlayMode?: SelfieCaptureLoadingOverlayMode;
|
|
32
30
|
/** The duration of time in milliseconds that the user may try to pass the realness check. Defaults to `15000` (15 seconds). */
|
|
33
31
|
timeoutDurationMs?: number;
|
|
34
32
|
/** 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`. */
|
|
35
33
|
skipSuccessScreen?: boolean | (() => Promise<boolean>);
|
|
36
|
-
/** 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. */
|
|
37
|
-
onBeforeDocumentUpload?: OnBeforeDocumentUpload;
|
|
38
|
-
/** Callback function that fires when progress information is available for a document upload. The progress info and metadata are passed in as parameters. */
|
|
39
|
-
onDocumentUploadProgress?: OnDocumentUploadProgress;
|
|
40
|
-
/** 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. */
|
|
41
|
-
onDocumentUploaded?: OnDocumentUploaded;
|
|
42
|
-
/** Callback function that fires when a document failed to upload. The error and metadata are passed in as parameters. */
|
|
43
|
-
onDocumentUploadFailed?: OnDocumentUploadFailed;
|
|
44
34
|
/** 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. */
|
|
45
35
|
onBeforeSubmit?: (req: SubmissionRequest) => Promise<SubmissionRequest>;
|
|
46
36
|
/** 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! */
|
|
@@ -1,22 +1,18 @@
|
|
|
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 { LangOption } from '../../lib/locales';
|
|
5
4
|
import { CustomerVerificationAssets, CustomerVerificationClassNames, CustomerVerificationColors, CustomerVerificationVerbiage } from '../customer_verification/CustomerVerificationWizard';
|
|
6
5
|
import { ThemeInput } from '../../themes';
|
|
6
|
+
import { SelfieCaptureLoadingOverlayMode } from '../selfie_capture/SelfieCaptureLoadingOverlay';
|
|
7
7
|
export interface CustomerVerificationProps extends PropsWithChildren {
|
|
8
8
|
/** The unique identifier to match from previously enrolled customers. */
|
|
9
9
|
enrollmentId: string;
|
|
10
10
|
/** Language code to use. Supported values: 'auto' (detect based on user's OS), 'en' (English), 'es' (Spanish). Defaults to auto. */
|
|
11
11
|
lang?: LangOption;
|
|
12
|
-
/** A
|
|
13
|
-
|
|
12
|
+
/** A token generated with your IDmission credentials. */
|
|
13
|
+
submissionToken: string;
|
|
14
14
|
/** URL to hit with all API requests. Defaults to the value specified in your decoded `submissionToken`. */
|
|
15
15
|
submissionUrl?: string;
|
|
16
|
-
/** URL to validate session against. Defaults to https://portal-api.idmission.com. */
|
|
17
|
-
authUrl?: string;
|
|
18
|
-
/** URL to upload captured documents to via Tus. */
|
|
19
|
-
documentServiceUrl?: string;
|
|
20
16
|
/** Company identifier to include with submission. */
|
|
21
17
|
companyId?: string;
|
|
22
18
|
/** Boolean flag to indicate if validation of the minimum resolution for an ID document image should be triggered. Defaults to true. */
|
|
@@ -31,6 +27,8 @@ export interface CustomerVerificationProps extends PropsWithChildren {
|
|
|
31
27
|
webhooksSendInputImages?: boolean;
|
|
32
28
|
/** Boolean flag to indicate whether processed user-captured images should be included in the submission data when customer-configured webhooks are invoked. */
|
|
33
29
|
webhooksSendProcessedImages?: boolean;
|
|
30
|
+
/** String indicating which loading overlay screen should be used. Supported values: 'default' and 'legacy'. Defaults to 'default'. */
|
|
31
|
+
loadingOverlayMode?: SelfieCaptureLoadingOverlayMode;
|
|
34
32
|
/** The duration of time in milliseconds that the user may try to pass the realness check. Defaults to `15000` (15 seconds). */
|
|
35
33
|
timeoutDurationMs?: number;
|
|
36
34
|
/** 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`. */
|
|
@@ -45,14 +43,6 @@ export interface CustomerVerificationProps extends PropsWithChildren {
|
|
|
45
43
|
colors?: CustomerVerificationColors;
|
|
46
44
|
/** Object containing any verbiage overrides. */
|
|
47
45
|
verbiage?: CustomerVerificationVerbiage;
|
|
48
|
-
/** 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. */
|
|
49
|
-
onBeforeDocumentUpload?: OnBeforeDocumentUpload;
|
|
50
|
-
/** Callback function that fires when progress information is available for a document upload. The progress info and metadata are passed in as parameters. */
|
|
51
|
-
onDocumentUploadProgress?: OnDocumentUploadProgress;
|
|
52
|
-
/** 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. */
|
|
53
|
-
onDocumentUploaded?: OnDocumentUploaded;
|
|
54
|
-
/** Callback function that fires when a document failed to upload. The error and metadata are passed in as parameters. */
|
|
55
|
-
onDocumentUploadFailed?: OnDocumentUploadFailed;
|
|
56
46
|
/** 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. */
|
|
57
47
|
onBeforeSubmit?: (req: SubmissionRequest) => Promise<SubmissionRequest>;
|
|
58
48
|
/** 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! */
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { FC, PropsWithChildren, ReactNode } from 'react';
|
|
2
2
|
import { ThemeInput } from '../../themes';
|
|
3
3
|
import { LangOption } from '../../lib/locales';
|
|
4
|
-
import { OnBeforeDocumentUpload, OnDocumentUploaded, OnDocumentUploadFailed, OnDocumentUploadProgress } from '../submission/SubmissionProvider';
|
|
5
4
|
import { SubmissionRequest } from '../../contexts/SubmissionContext';
|
|
6
5
|
import { DocumentCaptureWizardClassNames, DocumentCaptureWizardVerbiage } from '../document_capture/DocumentCaptureWizard';
|
|
7
6
|
import { CameraFeedMode } from '../../lib/camera/CameraFeedWrapper';
|
|
@@ -10,22 +9,12 @@ export type DocumentCaptureVerbiage = DocumentCaptureWizardVerbiage;
|
|
|
10
9
|
export interface DocumentCaptureProps extends PropsWithChildren {
|
|
11
10
|
/** Language code to use. Supported values: 'auto' (detect based on user's OS), 'en' (English), 'es' (Spanish). Defaults to auto. */
|
|
12
11
|
lang?: LangOption;
|
|
13
|
-
/** A
|
|
14
|
-
|
|
12
|
+
/** A token generated with your IDmission credentials. */
|
|
13
|
+
submissionToken: string;
|
|
15
14
|
/** URL to hit with all API requests. Defaults to the value specified in your decoded `submissionToken`. */
|
|
16
15
|
submissionUrl?: string;
|
|
17
|
-
/** URL to validate session against. Defaults to https://portal-api.idmission.com. */
|
|
18
|
-
authUrl?: string;
|
|
19
16
|
/** URL to upload captured documents to via Tus. */
|
|
20
17
|
documentServiceUrl?: string;
|
|
21
|
-
/** 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. */
|
|
22
|
-
onBeforeDocumentUpload?: OnBeforeDocumentUpload;
|
|
23
|
-
/** Callback function that fires when progress information is available for a document upload. The progress info and metadata are passed in as parameters. */
|
|
24
|
-
onDocumentUploadProgress?: OnDocumentUploadProgress;
|
|
25
|
-
/** 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. */
|
|
26
|
-
onDocumentUploaded?: OnDocumentUploaded;
|
|
27
|
-
/** Callback function that fires when a document failed to upload. The error and metadata are passed in as parameters. */
|
|
28
|
-
onDocumentUploadFailed?: OnDocumentUploadFailed;
|
|
29
18
|
/** 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. */
|
|
30
19
|
onBeforeSubmit?: (req: SubmissionRequest) => Promise<SubmissionRequest>;
|
|
31
20
|
/** 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! */
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { FC, PropsWithChildren } from 'react';
|
|
2
|
-
import { OnBeforeDocumentUpload, OnDocumentUploaded, OnDocumentUploadFailed, OnDocumentUploadProgress } from '../submission/SubmissionProvider';
|
|
3
2
|
import { LivenessCheckRequest, SubmissionResponse } from '../../contexts/SubmissionContext';
|
|
4
3
|
import { FaceLivenessAssets, FaceLivenessClassNames, FaceLivenessColors, FaceLivenessVerbiage } from '../face_liveness/FaceLivenessWizard';
|
|
5
4
|
import { LangOption } from '../../lib/locales';
|
|
6
5
|
import { ThemeInput } from '../../themes';
|
|
6
|
+
import { SelfieCaptureLoadingOverlayMode } from '../selfie_capture/SelfieCaptureLoadingOverlay';
|
|
7
7
|
export type FaceValidationAssets = FaceLivenessAssets;
|
|
8
8
|
export type FaceValidationClassNames = FaceLivenessClassNames;
|
|
9
9
|
export type FaceValidationColors = FaceLivenessColors;
|
|
@@ -11,14 +11,10 @@ export type FaceValidationVerbiage = FaceLivenessVerbiage;
|
|
|
11
11
|
export interface FaceValidationProps extends PropsWithChildren {
|
|
12
12
|
/** Language code to use. Supported values: 'auto' (detect based on user's OS), 'en' (English), 'es' (Spanish). Defaults to auto. */
|
|
13
13
|
lang?: LangOption;
|
|
14
|
-
/** A
|
|
15
|
-
|
|
14
|
+
/** A token generated with your IDmission credentials. */
|
|
15
|
+
submissionToken: string;
|
|
16
16
|
/** URL to hit with all API requests. Defaults to the value specified in your decoded `submissionToken`. */
|
|
17
17
|
submissionUrl?: string;
|
|
18
|
-
/** URL to validate session against. Defaults to https://portal-api.idmission.com. */
|
|
19
|
-
authUrl?: string;
|
|
20
|
-
/** URL to upload captured documents to via Tus. */
|
|
21
|
-
documentServiceUrl?: string;
|
|
22
18
|
/** Company identifier to include with submission. */
|
|
23
19
|
companyId?: string;
|
|
24
20
|
/** Boolean flag to indicate if validation of the minimum resolution for an ID document image should be triggered. Defaults to true. */
|
|
@@ -33,20 +29,12 @@ export interface FaceValidationProps extends PropsWithChildren {
|
|
|
33
29
|
webhooksSendInputImages?: boolean;
|
|
34
30
|
/** Boolean flag to indicate whether processed user-captured images should be included in the submission data when customer-configured webhooks are invoked. */
|
|
35
31
|
webhooksSendProcessedImages?: boolean;
|
|
32
|
+
/** String indicating which loading overlay screen should be used. Supported values: 'default' and 'legacy'. Defaults to 'default'. */
|
|
33
|
+
loadingOverlayMode?: SelfieCaptureLoadingOverlayMode;
|
|
36
34
|
/** The duration of time in milliseconds that the user may try to pass the realness check. Defaults to `15000` (15 seconds). */
|
|
37
35
|
timeoutDurationMs?: number;
|
|
38
36
|
/** 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`. */
|
|
39
37
|
skipSuccessScreen?: boolean | (() => Promise<boolean>);
|
|
40
|
-
/** String containing a base64 image or document service ID pointing to an ID card front image that should be used to match the user's face against. Leave blank to disable face matching. */
|
|
41
|
-
idCardForFaceMatch?: string;
|
|
42
|
-
/** 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. */
|
|
43
|
-
onBeforeDocumentUpload?: OnBeforeDocumentUpload;
|
|
44
|
-
/** Callback function that fires when progress information is available for a document upload. The progress info and metadata are passed in as parameters. */
|
|
45
|
-
onDocumentUploadProgress?: OnDocumentUploadProgress;
|
|
46
|
-
/** 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. */
|
|
47
|
-
onDocumentUploaded?: OnDocumentUploaded;
|
|
48
|
-
/** Callback function that fires when a document failed to upload. The error and metadata are passed in as parameters. */
|
|
49
|
-
onDocumentUploadFailed?: OnDocumentUploadFailed;
|
|
50
38
|
/** 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. */
|
|
51
39
|
onBeforeSubmit?: (req: LivenessCheckRequest) => Promise<LivenessCheckRequest>;
|
|
52
40
|
/** 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. */
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { FC, PropsWithChildren, ReactNode } from 'react';
|
|
2
|
-
import { OnBeforeDocumentUpload, OnDocumentUploaded, OnDocumentUploadFailed, OnDocumentUploadProgress } from '../submission/SubmissionProvider';
|
|
3
2
|
import { CardData, LivenessCheckRequest, PersonalData, SubmissionRequest, SubmissionResponse } from '../../contexts/SubmissionContext';
|
|
4
3
|
import { FaceLivenessAssets, FaceLivenessClassNames, FaceLivenessColors, FaceLivenessVerbiage } from '../face_liveness/FaceLivenessWizard';
|
|
5
4
|
import { IdCaptureWizardAssets, IdCaptureWizardClassNames, IdCaptureWizardColors, IdCaptureWizardVerbiage } from '../id_capture/IdCaptureWizard';
|
|
@@ -12,6 +11,8 @@ import { ThemeInput } from '../../themes';
|
|
|
12
11
|
import { IdCaptureRequirementOption } from '../id_capture/IdCaptureRequirementOption';
|
|
13
12
|
import { CapturedDocument, CapturedDocuments } from '../id_capture/CapturedDocuments';
|
|
14
13
|
import { IdCaptureGuideType } from '../id_capture/IdCaptureGuides';
|
|
14
|
+
import { SelfieCaptureLoadingOverlayMode } from '../selfie_capture/SelfieCaptureLoadingOverlay';
|
|
15
|
+
import { IdCaptureLoadingOverlayMode } from '../id_capture/IdCaptureLoadingOverlay';
|
|
15
16
|
export type IdAndFaceValidationAssets = {
|
|
16
17
|
idCapture?: IdCaptureWizardAssets;
|
|
17
18
|
faceLiveness?: FaceLivenessAssets;
|
|
@@ -38,14 +39,10 @@ export type IdAndFaceValidationVerbiage = {
|
|
|
38
39
|
export interface IdAndFaceValidationProps extends PropsWithChildren {
|
|
39
40
|
/** Language code to use. Supported values: 'auto' (detect based on user's OS), 'en' (English), 'es' (Spanish). Defaults to auto. */
|
|
40
41
|
lang?: LangOption;
|
|
41
|
-
/** A
|
|
42
|
-
|
|
42
|
+
/** A token generated with your IDmission credentials. */
|
|
43
|
+
submissionToken: string;
|
|
43
44
|
/** URL to hit with all API requests. Defaults to the value specified in your decoded `submissionToken`. */
|
|
44
45
|
submissionUrl?: string;
|
|
45
|
-
/** URL to validate session against. Defaults to https://portal-api.idmission.com. */
|
|
46
|
-
authUrl?: string;
|
|
47
|
-
/** URL to upload captured documents to via Tus. */
|
|
48
|
-
documentServiceUrl?: string;
|
|
49
46
|
/** Company identifier to include with submission. */
|
|
50
47
|
companyId?: string;
|
|
51
48
|
/** Boolean flag to indicate if validation of the minimum resolution for an ID document image should be triggered. Defaults to true. */
|
|
@@ -80,6 +77,8 @@ export interface IdAndFaceValidationProps extends PropsWithChildren {
|
|
|
80
77
|
precapturedDocuments?: CapturedDocuments & {
|
|
81
78
|
selfie: CapturedDocument;
|
|
82
79
|
};
|
|
80
|
+
/** String indicating which ID capture loading overlay screen should be used. Supported values: 'default' and 'legacy'. Defaults to 'default'. */
|
|
81
|
+
idCaptureLoadingOverlayMode?: IdCaptureLoadingOverlayMode;
|
|
83
82
|
/** String to indicate which types of ID documents should be captured. Valid values: `idCard`, `passport`, `idCardOrPassport`, `idCardAndPassport`. Default is `idCardOrPassport`. */
|
|
84
83
|
idCaptureRequirement?: IdCaptureRequirementOption;
|
|
85
84
|
/** Boolean to indicate whether photos should be captured automatically when guidance conditions are met. Default is `true`. */
|
|
@@ -94,6 +93,8 @@ export interface IdAndFaceValidationProps extends PropsWithChildren {
|
|
|
94
93
|
idCardFocusScoreThreshold?: number;
|
|
95
94
|
/** Number between 0 and 1 at which focus guidance score condition is considered to be met for passports. */
|
|
96
95
|
passportFocusScoreThreshold?: number;
|
|
96
|
+
/** String indicating which face liveness loading overlay screen should be used. Supported values: 'default' and 'legacy'. Defaults to 'default'. */
|
|
97
|
+
faceLivenessLoadingOverlayMode?: SelfieCaptureLoadingOverlayMode;
|
|
97
98
|
/** The duration of time in milliseconds that the user may try to pass the realness check. Defaults to `15000` (15 seconds). */
|
|
98
99
|
faceLivenessTimeoutDurationMs?: number;
|
|
99
100
|
/** 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`. */
|
|
@@ -106,14 +107,6 @@ export interface IdAndFaceValidationProps extends PropsWithChildren {
|
|
|
106
107
|
idCapturePortraitGuidesOnMobile?: boolean;
|
|
107
108
|
/** Boolean to indicate whether loading overlay image should be rotated on when mobile guides are rotated. Defaults to `true`. */
|
|
108
109
|
idCaptureRotateLoadingOverlayImageWhenPortrait?: boolean;
|
|
109
|
-
/** 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. */
|
|
110
|
-
onBeforeDocumentUpload?: OnBeforeDocumentUpload;
|
|
111
|
-
/** Callback function that fires when progress information is available for a document upload. The progress info and metadata are passed in as parameters. */
|
|
112
|
-
onDocumentUploadProgress?: OnDocumentUploadProgress;
|
|
113
|
-
/** 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. */
|
|
114
|
-
onDocumentUploaded?: OnDocumentUploaded;
|
|
115
|
-
/** Callback function that fires when a document failed to upload. The error and metadata are passed in as parameters. */
|
|
116
|
-
onDocumentUploadFailed?: OnDocumentUploadFailed;
|
|
117
110
|
/** 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. */
|
|
118
111
|
onBeforeLivenessCheck?: (req: LivenessCheckRequest) => Promise<LivenessCheckRequest>;
|
|
119
112
|
/** 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. */
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { FC, PropsWithChildren, ReactNode } from 'react';
|
|
2
|
-
import { OnBeforeDocumentUpload, OnDocumentUploaded, OnDocumentUploadFailed, OnDocumentUploadProgress } from '../submission/SubmissionProvider';
|
|
3
2
|
import { CardData, PersonalData, SubmissionRequest, SubmissionResponse } from '../../contexts/SubmissionContext';
|
|
4
3
|
import { IdCaptureWizardAssets, IdCaptureWizardClassNames, IdCaptureWizardColors, IdCaptureWizardVerbiage } from '../id_capture/IdCaptureWizard';
|
|
5
4
|
import { AdditionalDocumentCaptureWizardClassNames, AdditionalDocumentCaptureWizardVerbiage } from '../additional_document_capture/AdditionalDocumentCaptureWizard';
|
|
@@ -11,6 +10,7 @@ import { ThemeInput } from '../../themes';
|
|
|
11
10
|
import { IdCaptureRequirementOption } from '../id_capture/IdCaptureRequirementOption';
|
|
12
11
|
import { CapturedDocuments } from '../id_capture/CapturedDocuments';
|
|
13
12
|
import { IdCaptureGuideType } from '../id_capture/IdCaptureGuides';
|
|
13
|
+
import { IdCaptureLoadingOverlayMode } from '../id_capture/IdCaptureLoadingOverlay';
|
|
14
14
|
export type IdValidationAssets = IdCaptureWizardAssets;
|
|
15
15
|
export type IdValidationClassNames = IdCaptureWizardClassNames & {
|
|
16
16
|
additionalDocumentCapture?: AdditionalDocumentCaptureWizardClassNames;
|
|
@@ -28,14 +28,10 @@ export type IdValidationVerbiage = IdCaptureWizardVerbiage & {
|
|
|
28
28
|
export interface IdValidationProps extends PropsWithChildren {
|
|
29
29
|
/** Language code to use. Supported values: 'auto' (detect based on user's OS), 'en' (English), 'es' (Spanish). Defaults to auto. */
|
|
30
30
|
lang?: LangOption;
|
|
31
|
-
/** A
|
|
32
|
-
|
|
31
|
+
/** A token generated with your IDmission credentials. */
|
|
32
|
+
submissionToken: string;
|
|
33
33
|
/** URL to hit with all API requests. Defaults to the value specified in your decoded `submissionToken`. */
|
|
34
34
|
submissionUrl?: string;
|
|
35
|
-
/** URL to validate session against. Defaults to https://portal-api.idmission.com. */
|
|
36
|
-
authUrl?: string;
|
|
37
|
-
/** URL to upload captured documents to via Tus. */
|
|
38
|
-
documentServiceUrl?: string;
|
|
39
35
|
/** Company identifier to include with submission. */
|
|
40
36
|
companyId?: string;
|
|
41
37
|
/** Boolean flag to indicate if validation of the minimum resolution for an ID document image should be triggered. Defaults to true. */
|
|
@@ -66,6 +62,8 @@ export interface IdValidationProps extends PropsWithChildren {
|
|
|
66
62
|
webhooksSendProcessedImages?: boolean;
|
|
67
63
|
/** Boolean flag to indicate whether customer-configured webhooks should be invoked upon ID being marked for manual review. */
|
|
68
64
|
webhooksFireOnReview?: boolean;
|
|
65
|
+
/** String indicating which ID capture loading overlay screen should be used. Supported values: 'default' and 'legacy'. Defaults to 'default'. */
|
|
66
|
+
loadingOverlayMode?: IdCaptureLoadingOverlayMode;
|
|
69
67
|
/** String to indicate which types of documents should be captured. Valid values: `idCard`, `passport`, `idCardOrPassport`, `idCardAndPassport`. Default is `idCardOrPassport`. */
|
|
70
68
|
idCaptureRequirement?: IdCaptureRequirementOption;
|
|
71
69
|
/** Boolean to indicate whether photos should be captured automatically when guidance conditions are met. Default is `true`. */
|
|
@@ -90,14 +88,6 @@ export interface IdValidationProps extends PropsWithChildren {
|
|
|
90
88
|
rotateLoadingOverlayImageWhenPortrait?: boolean;
|
|
91
89
|
/** Object to allow documents that have been previously captured to be submitted. Valid keys: `idCardFront`, `idCardBack , `passport`.*/
|
|
92
90
|
precapturedDocuments?: CapturedDocuments;
|
|
93
|
-
/** 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. */
|
|
94
|
-
onBeforeDocumentUpload?: OnBeforeDocumentUpload;
|
|
95
|
-
/** Callback function that fires when progress information is available for a document upload. The progress info and metadata are passed in as parameters. */
|
|
96
|
-
onDocumentUploadProgress?: OnDocumentUploadProgress;
|
|
97
|
-
/** 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. */
|
|
98
|
-
onDocumentUploaded?: OnDocumentUploaded;
|
|
99
|
-
/** Callback function that fires when a document failed to upload. The error and metadata are passed in as parameters. */
|
|
100
|
-
onDocumentUploadFailed?: OnDocumentUploadFailed;
|
|
101
91
|
/** 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. */
|
|
102
92
|
onBeforeSubmit?: (req: SubmissionRequest) => Promise<SubmissionRequest>;
|
|
103
93
|
/** 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! */
|
|
@@ -1,28 +1,16 @@
|
|
|
1
1
|
import { FC, PropsWithChildren } from 'react';
|
|
2
2
|
import { LangOption } from '../../lib/locales';
|
|
3
3
|
import { SubmissionRequest, SubmissionResponse } from '../../contexts/SubmissionContext';
|
|
4
|
-
import { OnBeforeDocumentUpload, OnDocumentUploaded, OnDocumentUploadFailed, OnDocumentUploadProgress } from '../submission/SubmissionProvider';
|
|
5
4
|
import { VideoSignatureClassNames, VideoSignatureColors, VideoSignatureVerbiage } from '../video_signature_capture/VideoSignatureWizard';
|
|
6
5
|
import { ThemeInput } from '../../themes';
|
|
6
|
+
import { SelfieCaptureLoadingOverlayMode } from '../selfie_capture/SelfieCaptureLoadingOverlay';
|
|
7
7
|
export interface SignatureKYCProps extends PropsWithChildren {
|
|
8
8
|
/** Language code to use. Supported values: 'auto' (detect based on user's OS), 'en' (English), 'es' (Spanish). Defaults to auto. */
|
|
9
9
|
lang?: LangOption;
|
|
10
|
-
/** A
|
|
11
|
-
|
|
10
|
+
/** A token generated with your IDmission credentials. */
|
|
11
|
+
submissionToken: string;
|
|
12
12
|
/** URL to hit with all API requests. Defaults to the value specified in your decoded `submissionToken`. */
|
|
13
13
|
submissionUrl?: string;
|
|
14
|
-
/** URL to validate session against. Defaults to https://portal-api.idmission.com. */
|
|
15
|
-
authUrl?: string;
|
|
16
|
-
/** URL to upload captured documents to via Tus. */
|
|
17
|
-
documentServiceUrl?: string;
|
|
18
|
-
/** 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. */
|
|
19
|
-
onBeforeDocumentUpload?: OnBeforeDocumentUpload;
|
|
20
|
-
/** Callback function that fires when progress information is available for a document upload. The progress info and metadata are passed in as parameters. */
|
|
21
|
-
onDocumentUploadProgress?: OnDocumentUploadProgress;
|
|
22
|
-
/** 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. */
|
|
23
|
-
onDocumentUploaded?: OnDocumentUploaded;
|
|
24
|
-
/** Callback function that fires when a document failed to upload. The error and metadata are passed in as parameters. */
|
|
25
|
-
onDocumentUploadFailed?: OnDocumentUploadFailed;
|
|
26
14
|
/** 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. */
|
|
27
15
|
onBeforeSubmit?: (req: SubmissionRequest) => Promise<SubmissionRequest>;
|
|
28
16
|
/** 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! */
|
|
@@ -31,10 +19,10 @@ export interface SignatureKYCProps extends PropsWithChildren {
|
|
|
31
19
|
onComplete?: (resp: SubmissionResponse, req: SubmissionRequest) => void;
|
|
32
20
|
/** 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. */
|
|
33
21
|
onUserCancel?: () => void;
|
|
22
|
+
/** String indicating which loading overlay screen should be used. Supported values: 'default' and 'legacy'. Defaults to 'default'. */
|
|
23
|
+
loadingOverlayMode?: SelfieCaptureLoadingOverlayMode;
|
|
34
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`. */
|
|
35
25
|
skipSuccessScreen?: boolean | (() => Promise<boolean>);
|
|
36
|
-
/** String containing a base64 image or document service ID pointing to an ID card front image that should be used to match the user's face against. Leave blank to disable face matching. */
|
|
37
|
-
idCardForFaceMatch?: string;
|
|
38
26
|
/** Name of an included theme or object containing theme properties. **/
|
|
39
27
|
theme?: ThemeInput;
|
|
40
28
|
/** Object containing any classNames for inner components. **/
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { FC, PropsWithChildren } from 'react';
|
|
2
2
|
import { CardData, LivenessCheckRequest, PersonalData, SubmissionRequest, SubmissionResponse } from '../../contexts/SubmissionContext';
|
|
3
|
-
import { OnBeforeDocumentUpload, OnDocumentUploaded, OnDocumentUploadFailed, OnDocumentUploadProgress } from '../submission/SubmissionProvider';
|
|
4
3
|
import { CustomerSuppliedVerbiage, LangOption } from '../../lib/locales';
|
|
5
4
|
import { VideoIdWizardAssets, VideoIdWizardClassNames, VideoIdWizardColors, VideoIdWizardVerbiage } from '../video_id/IdVideoCaptureWizard';
|
|
6
5
|
import { IdCaptureWizardProps } from '../id_capture/IdCaptureWizard';
|
|
@@ -28,14 +27,10 @@ export type VideoIdValidationVerbiage = VideoIdWizardVerbiage & {
|
|
|
28
27
|
export interface VideoIdValidationProps extends PropsWithChildren {
|
|
29
28
|
/** Language code to use. Supported values: 'auto' (detect based on user's OS), 'en' (English), 'es' (Spanish). Defaults to auto. */
|
|
30
29
|
lang?: LangOption;
|
|
31
|
-
/** A
|
|
32
|
-
|
|
30
|
+
/** A token generated with your IDmission credentials. */
|
|
31
|
+
submissionToken: string;
|
|
33
32
|
/** URL to hit with all API requests. Defaults to the value specified in your decoded `submissionToken`. */
|
|
34
33
|
submissionUrl?: string;
|
|
35
|
-
/** URL to validate session against. Defaults to https://portal-api.idmission.com. */
|
|
36
|
-
authUrl?: string;
|
|
37
|
-
/** URL to upload captured documents to via Tus. */
|
|
38
|
-
documentServiceUrl?: string;
|
|
39
34
|
/** Company identifier to include with submission. */
|
|
40
35
|
companyId?: string;
|
|
41
36
|
/** Boolean flag to indicate if validation of the minimum resolution for an ID document image should be triggered. Defaults to true. */
|
|
@@ -66,14 +61,6 @@ export interface VideoIdValidationProps extends PropsWithChildren {
|
|
|
66
61
|
webhooksSendProcessedImages?: boolean;
|
|
67
62
|
/** Boolean flag to indicate whether customer-configured webhooks should be invoked upon ID being marked for manual review. */
|
|
68
63
|
webhooksFireOnReview?: boolean;
|
|
69
|
-
/** 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. */
|
|
70
|
-
onBeforeDocumentUpload?: OnBeforeDocumentUpload;
|
|
71
|
-
/** Callback function that fires when progress information is available for a document upload. The progress info and metadata are passed in as parameters. */
|
|
72
|
-
onDocumentUploadProgress?: OnDocumentUploadProgress;
|
|
73
|
-
/** 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. */
|
|
74
|
-
onDocumentUploaded?: OnDocumentUploaded;
|
|
75
|
-
/** Callback function that fires when a document failed to upload. The error and metadata are passed in as parameters. */
|
|
76
|
-
onDocumentUploadFailed?: OnDocumentUploadFailed;
|
|
77
64
|
/** 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. */
|
|
78
65
|
onBeforeSubmit?: (req: SubmissionRequest) => Promise<SubmissionRequest>;
|
|
79
66
|
/** 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! */
|
|
@@ -124,8 +111,6 @@ export interface VideoIdValidationProps extends PropsWithChildren {
|
|
|
124
111
|
idCapturePortraitGuidesOnMobile?: boolean;
|
|
125
112
|
/** Boolean to indicate whether loading overlay image should be rotated on when mobile guides are rotated. Defaults to `true`. */
|
|
126
113
|
idCaptureRotateLoadingOverlayImageWhenPortrait?: boolean;
|
|
127
|
-
/** String containing a base64 image or document service ID pointing to an ID card front image that should be used to match the user's face against. Leave blank to disable face matching. */
|
|
128
|
-
idCardForFaceMatch?: string;
|
|
129
114
|
/** Name of an included theme or object containing theme properties. **/
|
|
130
115
|
theme?: ThemeInput;
|
|
131
116
|
/** Object containing any asset overrides. */
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
import { SubmissionRequest, SubmissionResponse } from '../../contexts/SubmissionContext';
|
|
3
|
-
import { SelfieCaptureLoadingOverlayAssets, SelfieCaptureLoadingOverlayClassNames, SelfieCaptureLoadingOverlayColors, SelfieCaptureLoadingOverlayVerbiage } from '../selfie_capture/SelfieCaptureLoadingOverlay';
|
|
4
3
|
import { CustomerIdentificationCaptureClassNames, CustomerIdentificationCaptureColors, CustomerIdentificationCaptureVerbiage } from './CustomerIdentificationCapture';
|
|
5
4
|
import { CustomerIdentificationSuccessClassNames, CustomerIdentificationSuccessColors, CustomerIdentificationSuccessVerbiage } from './CustomerIdentificationSuccess';
|
|
6
5
|
import { CustomerIdentificationFailureAssets, CustomerIdentificationFailureClassNames, CustomerIdentificationFailureColors, CustomerIdentificationFailureVerbiage } from './CustomerIdentificationFailure';
|
|
6
|
+
import { SelfieCaptureLoadingOverlayMode, SelfieCaptureLoadingOverlayAssets, SelfieCaptureLoadingOverlayClassNames, SelfieCaptureLoadingOverlayColors, SelfieCaptureLoadingOverlayVerbiage } from '../selfie_capture/SelfieCaptureLoadingOverlay';
|
|
7
7
|
export type CustomerIdentificationAssets = {
|
|
8
8
|
loadingOverlay?: SelfieCaptureLoadingOverlayAssets;
|
|
9
9
|
failure?: CustomerIdentificationFailureAssets;
|
|
@@ -33,10 +33,11 @@ export type CustomerIdentificationWizardProps = {
|
|
|
33
33
|
onCaptureGuidanceTimeout?: () => void;
|
|
34
34
|
captureGuidanceTimeoutDurationMs?: number;
|
|
35
35
|
skipSuccessScreen?: boolean | (() => Promise<boolean>);
|
|
36
|
+
loadingOverlayMode?: SelfieCaptureLoadingOverlayMode;
|
|
36
37
|
assets?: CustomerIdentificationAssets;
|
|
37
38
|
classNames?: CustomerIdentificationClassNames;
|
|
38
39
|
colors?: CustomerIdentificationColors;
|
|
39
40
|
verbiage?: CustomerIdentificationVerbiage;
|
|
40
41
|
debugMode?: boolean;
|
|
41
42
|
};
|
|
42
|
-
export declare const CustomerIdentificationWizard: ({ onComplete, onCustomerMatched, onCustomerNotMatched, onExitCapture, onExitAfterFailure, onUserCancel, onCaptureGuidanceTimeout, captureGuidanceTimeoutDurationMs, skipSuccessScreen, assets, classNames, colors, verbiage, debugMode, }: CustomerIdentificationWizardProps) => ReactElement;
|
|
43
|
+
export declare const CustomerIdentificationWizard: ({ onComplete, onCustomerMatched, onCustomerNotMatched, onExitCapture, onExitAfterFailure, onUserCancel, onCaptureGuidanceTimeout, captureGuidanceTimeoutDurationMs, skipSuccessScreen, loadingOverlayMode, assets, classNames, colors, verbiage, debugMode, }: CustomerIdentificationWizardProps) => ReactElement;
|