idmission-web-sdk 1.0.78 → 1.0.80

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.
@@ -59,6 +59,8 @@ export interface CustomerBiometricsEnrollmentProps extends PropsWithChildren {
59
59
  skipSuccessScreen?: boolean | (() => Promise<boolean>);
60
60
  /** 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. */
61
61
  onBeforeSubmit?: (req: SubmissionRequest) => Promise<SubmissionRequest>;
62
+ /** 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! */
63
+ onSubmit?: (req: SubmissionRequest) => void;
62
64
  /** 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. */
63
65
  onComplete?: (resp: SubmissionResponse, req: SubmissionRequest) => void;
64
66
  /** 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. */
@@ -94,6 +94,8 @@ export interface CustomerEnrollmentProps extends PropsWithChildren {
94
94
  skipSuccessScreen?: boolean | (() => Promise<boolean>);
95
95
  /** 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. */
96
96
  onBeforeSubmit?: (req: SubmissionRequest) => Promise<SubmissionRequest>;
97
+ /** 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! */
98
+ onSubmit?: (req: SubmissionRequest) => void;
97
99
  /** 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. */
98
100
  onComplete?: (resp: SubmissionResponse, req: SubmissionRequest) => void;
99
101
  /** 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. */
@@ -30,6 +30,8 @@ export interface CustomerIdentificationProps extends PropsWithChildren {
30
30
  skipSuccessScreen?: boolean | (() => Promise<boolean>);
31
31
  /** 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. */
32
32
  onBeforeSubmit?: (req: SubmissionRequest) => Promise<SubmissionRequest>;
33
+ /** 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! */
34
+ onSubmit?: (req: SubmissionRequest) => void;
33
35
  /** 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. */
34
36
  onComplete?: (resp: SubmissionResponse, req: SubmissionRequest) => void;
35
37
  /** 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. */
@@ -42,6 +42,8 @@ export interface CustomerVerificationProps extends PropsWithChildren {
42
42
  verbiage?: CustomerVerificationVerbiage;
43
43
  /** 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. */
44
44
  onBeforeSubmit?: (req: SubmissionRequest) => Promise<SubmissionRequest>;
45
+ /** 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! */
46
+ onSubmit?: (req: SubmissionRequest) => void;
45
47
  /** 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. */
46
48
  onComplete?: (resp: SubmissionResponse, req: SubmissionRequest) => void;
47
49
  /** 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. */
@@ -88,6 +88,8 @@ export interface IdAndFaceValidationProps extends PropsWithChildren {
88
88
  onBeforeLivenessCheck?: (req: LivenessCheckRequest) => Promise<LivenessCheckRequest>;
89
89
  /** 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. */
90
90
  onBeforeSubmit?: (req: SubmissionRequest) => Promise<SubmissionRequest>;
91
+ /** 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! */
92
+ onSubmit?: (req: SubmissionRequest) => void;
91
93
  /** 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. */
92
94
  onComplete?: (resp: SubmissionResponse, req: SubmissionRequest) => void;
93
95
  /** Callback function that fires when the user completes both flows with a valid ID and passes the realness check. Arguments: same as `onComplete`. */
@@ -72,6 +72,8 @@ export interface IdValidationProps extends PropsWithChildren {
72
72
  skipSuccessScreen?: boolean | (() => Promise<boolean>);
73
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. */
74
74
  onBeforeSubmit?: (req: SubmissionRequest) => Promise<SubmissionRequest>;
75
+ /** 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! */
76
+ onSubmit?: (req: SubmissionRequest) => void;
75
77
  /** 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. */
76
78
  onComplete?: (resp: SubmissionResponse, req: SubmissionRequest) => void;
77
79
  /** Callback function that fires when the user completes the IDValidation flow with a valid ID. Arguments: same as `onComplete`. */
@@ -12,6 +12,8 @@ export interface SignatureKYCProps extends PropsWithChildren {
12
12
  submissionUrl?: string;
13
13
  /** 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. */
14
14
  onBeforeSubmit?: (req: SubmissionRequest) => Promise<SubmissionRequest>;
15
+ /** 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! */
16
+ onSubmit?: (req: SubmissionRequest) => void;
15
17
  /** 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. */
16
18
  onComplete?: (resp: SubmissionResponse, req: SubmissionRequest) => void;
17
19
  /** 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`. */
@@ -0,0 +1,23 @@
1
+ import React from 'react';
2
+ import { CustomerSuppliedVerbiage } from '../../lib/locales';
3
+ export type ReadTextPromptClassNames = {
4
+ container?: string;
5
+ heading?: string;
6
+ prompt?: string;
7
+ buttonsRow?: string;
8
+ timeRemaining?: string;
9
+ doneBtn?: string;
10
+ };
11
+ export type ReadTextPromptVerbiage = {
12
+ headingText?: CustomerSuppliedVerbiage;
13
+ doneBtnText?: CustomerSuppliedVerbiage;
14
+ };
15
+ export type ReadTextPromptProps = {
16
+ text: CustomerSuppliedVerbiage;
17
+ onComplete?: () => void;
18
+ startedAt?: Date;
19
+ durationMs?: number;
20
+ classNames?: ReadTextPromptClassNames;
21
+ verbiage?: ReadTextPromptVerbiage;
22
+ };
23
+ export declare const ReadTextPrompt: ({ text, onComplete, startedAt, durationMs, classNames, verbiage: rawVerbiage, }: ReadTextPromptProps) => React.JSX.Element;
@@ -2,10 +2,16 @@ import { ReactElement } from 'react';
2
2
  import { IdVideoCaptureGuidesAssets, IdVideoCaptureGuidesVerbiage } from './IdVideoCaptureGuides';
3
3
  import { CustomerSuppliedVerbiage } from '../../lib/locales';
4
4
  import { LoaderButtonColors } from '../common/LoaderButton';
5
+ import { ReadTextPromptClassNames, ReadTextPromptVerbiage } from '../read_text_prompt/ReadTextPrompt';
5
6
  export type Action = 'SHOW_ID_FRONT' | 'FLIP_ID' | 'SHOW_ID_BACK' | 'READ_TEXT';
6
7
  export type IdVideoCaptureAssets = {
7
8
  guides?: IdVideoCaptureGuidesAssets;
8
9
  };
10
+ export type IdVideoCaptureClassNames = {
11
+ container?: string;
12
+ cameraFeed?: string;
13
+ readTextPrompt?: ReadTextPromptClassNames;
14
+ };
9
15
  export type IdVideoCaptureColors = {
10
16
  guidesSatisfiedColor?: string;
11
17
  guidesUnsatisfiedColor?: string;
@@ -13,8 +19,7 @@ export type IdVideoCaptureColors = {
13
19
  };
14
20
  export type IdVideoCaptureVerbiage = {
15
21
  guides?: IdVideoCaptureGuidesVerbiage;
16
- readTextHeading?: CustomerSuppliedVerbiage;
17
- readTextDoneBtnText?: CustomerSuppliedVerbiage;
22
+ readTextPrompt?: ReadTextPromptVerbiage;
18
23
  };
19
24
  export type IdVideoCaptureProps = {
20
25
  onComplete?: (videoUrl: string) => void;
@@ -29,8 +34,9 @@ export type IdVideoCaptureProps = {
29
34
  readTextPrompt?: CustomerSuppliedVerbiage;
30
35
  readTextTimeoutDurationMs?: number;
31
36
  assets?: IdVideoCaptureAssets;
37
+ classNames?: IdVideoCaptureClassNames;
32
38
  colors?: IdVideoCaptureColors;
33
39
  verbiage?: IdVideoCaptureVerbiage;
34
40
  debugMode?: boolean;
35
41
  };
36
- export declare const IdVideoCapture: ({ onComplete, onIdFrontImageCaptured, onIdBackImageCaptured, onFaceNotDetected, idCardFrontDetectionThreshold, idCardFrontFocusThreshold, goodIdCardFrontFramesThreshold, showIdCardBackDurationMs, skipShowIdCardBack, readTextPrompt, readTextTimeoutDurationMs, assets, colors, verbiage: rawVerbiage, debugMode, }: IdVideoCaptureProps) => ReactElement;
42
+ export declare const IdVideoCapture: ({ onComplete, onIdFrontImageCaptured, onIdBackImageCaptured, onFaceNotDetected, idCardFrontDetectionThreshold, idCardFrontFocusThreshold, goodIdCardFrontFramesThreshold, showIdCardBackDurationMs, skipShowIdCardBack, readTextPrompt, readTextTimeoutDurationMs, assets, classNames, colors, verbiage: rawVerbiage, debugMode, }: IdVideoCaptureProps) => ReactElement;
@@ -1,6 +1,16 @@
1
1
  import { ReactElement } from 'react';
2
2
  import { LoaderButtonColors } from '../common/LoaderButton';
3
3
  import { CustomerSuppliedVerbiage } from '../../lib/locales';
4
+ export type IdVideoCaptureSuccessClassNames = {
5
+ container?: string;
6
+ inner?: string;
7
+ heading?: string;
8
+ videoContainer?: string;
9
+ video?: string;
10
+ buttonsRow?: string;
11
+ retryBtn?: string;
12
+ doneBtn?: string;
13
+ };
4
14
  export type IdVideoCaptureSuccessColors = {
5
15
  retryBtn?: LoaderButtonColors;
6
16
  doneBtn?: LoaderButtonColors;
@@ -14,7 +24,8 @@ export type IdVideoCaptureSuccessProps = {
14
24
  videoUrl: string;
15
25
  onDoneClick?: () => void;
16
26
  onRetryClick?: () => void;
27
+ classNames?: IdVideoCaptureSuccessClassNames;
17
28
  colors?: IdVideoCaptureSuccessColors;
18
29
  verbiage?: IdVideoCaptureSuccessVerbiage;
19
30
  };
20
- export declare const IdVideoCaptureSuccess: ({ videoUrl, onDoneClick, onRetryClick, colors, verbiage: rawVerbiage, }: IdVideoCaptureSuccessProps) => ReactElement;
31
+ export declare const IdVideoCaptureSuccess: ({ videoUrl, onDoneClick, onRetryClick, classNames, colors, verbiage: rawVerbiage, }: IdVideoCaptureSuccessProps) => ReactElement;
@@ -1,8 +1,8 @@
1
1
  import { ReactElement } from 'react';
2
2
  import { IdCaptureWizardAssets, IdCaptureWizardClassNames, IdCaptureWizardColors, IdCaptureWizardProps, IdCaptureWizardVerbiage } from '../id_capture/IdCaptureWizard';
3
3
  import { FaceLivenessAssets, FaceLivenessClassNames, FaceLivenessColors, FaceLivenessVerbiage, FaceLivenessWizardProps } from '../face_liveness/FaceLivenessWizard';
4
- import { IdVideoCaptureAssets, IdVideoCaptureColors, IdVideoCaptureVerbiage } from './IdVideoCapture';
5
- import { IdVideoCaptureSuccessColors, IdVideoCaptureSuccessVerbiage } from './IdVideoCaptureSuccess';
4
+ import { IdVideoCaptureAssets, IdVideoCaptureClassNames, IdVideoCaptureColors, IdVideoCaptureVerbiage } from './IdVideoCapture';
5
+ import { IdVideoCaptureSuccessClassNames, IdVideoCaptureSuccessColors, IdVideoCaptureSuccessVerbiage } from './IdVideoCaptureSuccess';
6
6
  import { CustomerSuppliedVerbiage } from '../../lib/locales';
7
7
  import { LivenessCheckRequest, SubmissionResponse } from '../../contexts/SubmissionContext';
8
8
  export type VideoIdWizardAssets = {
@@ -13,6 +13,8 @@ export type VideoIdWizardAssets = {
13
13
  export type VideoIdWizardClassNames = {
14
14
  idCapture?: IdCaptureWizardClassNames;
15
15
  faceLiveness?: FaceLivenessClassNames;
16
+ idVideoCapture?: IdVideoCaptureClassNames;
17
+ success?: IdVideoCaptureSuccessClassNames;
16
18
  };
17
19
  export type VideoIdWizardColors = {
18
20
  idCapture?: IdCaptureWizardColors;