idmission-web-sdk 1.0.77 → 1.0.79
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/read_text_prompt/ReadTextPrompt.d.ts +23 -0
- package/dist/components/selfie_capture/SelfieCaptureLoadingOverlay.d.ts +1 -1
- package/dist/components/submission/SubmissionProvider.d.ts +40 -2
- package/dist/components/video_id/IdVideoCapture.d.ts +11 -3
- package/dist/components/video_id/IdVideoCaptureSuccess.d.ts +12 -1
- package/dist/components/video_id/IdVideoCaptureWizard.d.ts +4 -2
- package/dist/contexts/SubmissionContext.d.ts +0 -34
- package/dist/sdk2.cjs.development.js +434 -321
- 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 +435 -322
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +434 -321
- 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/CustomerFlows/VideoIdValidation.stories.d.ts +1 -0
- package/dist/themes/index.d.ts +38 -0
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -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;
|
|
@@ -9,10 +9,10 @@ export type SelfieCaptureLoadingOverlayAssets = {
|
|
|
9
9
|
export type SelfieCaptureLoadingOverlayClassNames = {
|
|
10
10
|
container?: string;
|
|
11
11
|
inner?: string;
|
|
12
|
-
headingContainer?: string;
|
|
13
12
|
heading?: string;
|
|
14
13
|
imageContainer?: string;
|
|
15
14
|
image?: string;
|
|
15
|
+
buttonsRow?: string;
|
|
16
16
|
continueBtn?: string;
|
|
17
17
|
cameraAccessDenied?: CameraAccessDeniedOverlayClassNames;
|
|
18
18
|
};
|
|
@@ -1,6 +1,44 @@
|
|
|
1
|
-
import { ReactElement } from 'react';
|
|
2
|
-
import { CardData, LivenessCheckRequest, PersonalData, SubmissionAction, SubmissionEnvironment, SubmissionRequest, SubmissionResponse } from '../../contexts/SubmissionContext';
|
|
1
|
+
import React, { ReactElement } from 'react';
|
|
2
|
+
import { CaptureAttemptMetadata, CardData, LiveCheckResponse, LivenessCheckRequest, PersonalData, SubmissionAction, SubmissionEnvironment, SubmissionRequest, SubmissionResponse, SubmissionStatus } from '../../contexts/SubmissionContext';
|
|
3
|
+
import { UploadedDocument } from '../additional_document_capture/AdditionalDocumentCapture';
|
|
4
|
+
import { SignatureData } from '../signature_capture/data';
|
|
5
|
+
import { NetworkError, SubmissionError } from './Errors';
|
|
3
6
|
export type TokenState = 'NOT_PARSED' | 'PARSING' | 'GOOD' | 'EXPIRED' | 'INVALID_FORMAT' | 'INVALID_SIGNATURE' | 'MISSING' | 'PUBLIC_KEY_LOAD_FAILED';
|
|
7
|
+
export type SubmissionState = {
|
|
8
|
+
submit: () => Promise<SubmissionResponse | null>;
|
|
9
|
+
submissionStatus: SubmissionStatus;
|
|
10
|
+
submissionRequest: SubmissionRequest | null;
|
|
11
|
+
submissionResponse: SubmissionResponse | null;
|
|
12
|
+
submissionError: SubmissionError | NetworkError | null;
|
|
13
|
+
submissionEnvironment: SubmissionEnvironment;
|
|
14
|
+
idFrontImage: string | null;
|
|
15
|
+
idBackImage: string | null;
|
|
16
|
+
passportImage: string | null;
|
|
17
|
+
selfieImage: string | null;
|
|
18
|
+
signatureData: SignatureData | null;
|
|
19
|
+
signatureVideoUrl: string | null;
|
|
20
|
+
idCaptureVideoUrl: string | null;
|
|
21
|
+
idCaptureVideoIdFrontImage: string | null;
|
|
22
|
+
idCaptureVideoIdBackImage: string | null;
|
|
23
|
+
additionalDocuments: UploadedDocument[] | null;
|
|
24
|
+
setIdFrontImage: (image: string) => void;
|
|
25
|
+
setIdBackImage: (image: string) => void;
|
|
26
|
+
setPassportImage: (image: string) => void;
|
|
27
|
+
setSelfieImage: (image: string) => void;
|
|
28
|
+
setSignatureData: (signatureData: SignatureData) => void;
|
|
29
|
+
setSignatureVideoUrl: (videoDataUrl: string) => void;
|
|
30
|
+
setIdCaptureVideoUrl: (videoDataUrl: string) => void;
|
|
31
|
+
setIdCaptureVideoIdFrontImage: (image: string) => void;
|
|
32
|
+
setIdCaptureVideoIdBackImage: (image: string) => void;
|
|
33
|
+
setAdditionalDocuments: (uploadedDocuments: UploadedDocument[]) => void;
|
|
34
|
+
logIdFrontCaptureAttempt: (attempt: CaptureAttemptMetadata) => void;
|
|
35
|
+
logIdBackCaptureAttempt: (attempt: CaptureAttemptMetadata) => void;
|
|
36
|
+
logSelfieCaptureAttempt: (attempt: CaptureAttemptMetadata) => void;
|
|
37
|
+
livenessCheckRequest: LivenessCheckRequest | null;
|
|
38
|
+
checkLiveness: (imageDataUrl: string) => Promise<LiveCheckResponse>;
|
|
39
|
+
retryLocationAccess: () => void;
|
|
40
|
+
};
|
|
41
|
+
export declare const SubmissionContext: React.Context<SubmissionState>;
|
|
4
42
|
export type SubmissionProviderProps = {
|
|
5
43
|
action: SubmissionAction;
|
|
6
44
|
children: ReactElement;
|
|
@@ -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,11 +19,12 @@ export type IdVideoCaptureColors = {
|
|
|
13
19
|
};
|
|
14
20
|
export type IdVideoCaptureVerbiage = {
|
|
15
21
|
guides?: IdVideoCaptureGuidesVerbiage;
|
|
16
|
-
|
|
17
|
-
readTextDoneBtnText?: CustomerSuppliedVerbiage;
|
|
22
|
+
readTextPrompt?: ReadTextPromptVerbiage;
|
|
18
23
|
};
|
|
19
24
|
export type IdVideoCaptureProps = {
|
|
20
25
|
onComplete?: (videoUrl: string) => void;
|
|
26
|
+
onIdFrontImageCaptured?: (imageUrl: string) => void;
|
|
27
|
+
onIdBackImageCaptured?: (imageUrl: string) => void;
|
|
21
28
|
onFaceNotDetected?: () => void;
|
|
22
29
|
idCardFrontDetectionThreshold?: number;
|
|
23
30
|
idCardFrontFocusThreshold?: number;
|
|
@@ -27,8 +34,9 @@ export type IdVideoCaptureProps = {
|
|
|
27
34
|
readTextPrompt?: CustomerSuppliedVerbiage;
|
|
28
35
|
readTextTimeoutDurationMs?: number;
|
|
29
36
|
assets?: IdVideoCaptureAssets;
|
|
37
|
+
classNames?: IdVideoCaptureClassNames;
|
|
30
38
|
colors?: IdVideoCaptureColors;
|
|
31
39
|
verbiage?: IdVideoCaptureVerbiage;
|
|
32
40
|
debugMode?: boolean;
|
|
33
41
|
};
|
|
34
|
-
export declare const IdVideoCapture: ({ onComplete, 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;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { UploadedDocument } from '../components/additional_document_capture/AdditionalDocumentCapture';
|
|
3
|
-
import { SignatureData } from '../components/signature_capture/data';
|
|
4
|
-
import { NetworkError, SubmissionError } from '../components/submission/Errors';
|
|
5
2
|
export declare enum SubmissionAction {
|
|
6
3
|
NONE = "NONE",
|
|
7
4
|
ENROLL = "ENROLL",
|
|
@@ -151,37 +148,6 @@ export type LiveCheckResponse = {
|
|
|
151
148
|
cellPhone: 'true' | 'false';
|
|
152
149
|
};
|
|
153
150
|
};
|
|
154
|
-
export type SubmissionState = {
|
|
155
|
-
submit: () => Promise<SubmissionResponse | null>;
|
|
156
|
-
submissionStatus: SubmissionStatus;
|
|
157
|
-
submissionRequest: SubmissionRequest | null;
|
|
158
|
-
submissionResponse: SubmissionResponse | null;
|
|
159
|
-
submissionError: SubmissionError | NetworkError | null;
|
|
160
|
-
submissionEnvironment: SubmissionEnvironment;
|
|
161
|
-
idFrontImage: string | null;
|
|
162
|
-
idBackImage: string | null;
|
|
163
|
-
passportImage: string | null;
|
|
164
|
-
selfieImage: string | null;
|
|
165
|
-
signatureData: SignatureData | null;
|
|
166
|
-
signatureVideoUrl: string | null;
|
|
167
|
-
idCaptureVideoUrl: string | null;
|
|
168
|
-
additionalDocuments: UploadedDocument[] | null;
|
|
169
|
-
setIdFrontImage: (image: string) => void;
|
|
170
|
-
setIdBackImage: (image: string) => void;
|
|
171
|
-
setPassportImage: (image: string) => void;
|
|
172
|
-
setSelfieImage: (image: string) => void;
|
|
173
|
-
setSignatureData: (signatureData: SignatureData) => void;
|
|
174
|
-
setSignatureVideoUrl: (videoDataUrl: string) => void;
|
|
175
|
-
setIdCaptureVideoUrl: (videoDataUrl: string) => void;
|
|
176
|
-
setAdditionalDocuments: (uploadedDocuments: UploadedDocument[]) => void;
|
|
177
|
-
logIdFrontCaptureAttempt: (attempt: CaptureAttemptMetadata) => void;
|
|
178
|
-
logIdBackCaptureAttempt: (attempt: CaptureAttemptMetadata) => void;
|
|
179
|
-
logSelfieCaptureAttempt: (attempt: CaptureAttemptMetadata) => void;
|
|
180
|
-
livenessCheckRequest: LivenessCheckRequest | null;
|
|
181
|
-
checkLiveness: (imageDataUrl: string) => Promise<LiveCheckResponse>;
|
|
182
|
-
retryLocationAccess: () => void;
|
|
183
|
-
};
|
|
184
|
-
export declare const SubmissionContext: import("react").Context<SubmissionState>;
|
|
185
151
|
export declare function parseJwt(token: string): Record<string, unknown>;
|
|
186
152
|
export declare function determineSubmissionHost(environment: SubmissionEnvironment, token?: string): string;
|
|
187
153
|
export declare function determineSubmissionEndpoint(action: SubmissionAction, hasId: boolean, hasSelfie: boolean, hasToken: boolean): string;
|