@idscan/onboarding 2.10.0 → 2.10.2
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/Wrapper.css +1 -1
- package/dist/Wrapper.d.ts +223 -0
- package/dist/networks/Face-chunk.js +1 -1
- package/dist/networks/MRZ-chunk.js +1 -1
- package/dist/networks/PDF-chunk.js +1 -1
- package/dist/networks/ZXing-chunk.js +1 -1
- package/dist/src/Wrapper.d.ts +2 -1
- package/dist/wrapper.es.js +305 -175
- package/dist/wrapper.umd.js +1 -2
- package/package.json +26 -13
- package/readme.md +7 -0
- package/dist/custom_types/custom.d.ts +0 -20
- package/dist/src/@types/Api/Requests.d.ts +0 -22
- package/dist/src/@types/Api/Responses.d.ts +0 -97
- package/dist/src/@types/Data.d.ts +0 -110
- package/dist/src/@types/IDVCTypes.d.ts +0 -5
- package/dist/src/@types/Step.d.ts +0 -26
- package/dist/src/@types/enums.d.ts +0 -89
- package/dist/src/config.d.ts +0 -35
- package/dist/src/entry.d.ts +0 -1
- package/dist/src/errors/ConfigError.d.ts +0 -4
- package/dist/src/errors/FaceAuthorizationError.d.ts +0 -6
- package/dist/src/errors/HttpError.d.ts +0 -4
- package/dist/src/errors/NotValidApplicant.d.ts +0 -4
- package/dist/src/errors/RequestTimeoutError.d.ts +0 -4
- package/dist/src/errors/ValidationError.d.ts +0 -6
- package/dist/src/errors/WrapperError.d.ts +0 -5
- package/dist/src/helpers/fingerPrint.d.ts +0 -19
- package/dist/src/helpers/mobileChecker.d.ts +0 -15
- package/dist/src/helpers/requestModelCheckers.d.ts +0 -4
- package/dist/src/helpers/typeGuard.d.ts +0 -1
- package/dist/src/helpers/utils.d.ts +0 -9
- package/dist/src/helpers/validators.d.ts +0 -7
- package/dist/src/mocks/defaultValues.d.ts +0 -2
- package/dist/src/mocks/validation.json.d.ts +0 -9
- package/dist/src/modules/Api.d.ts +0 -21
- package/dist/src/modules/ConsentForm.d.ts +0 -19
- package/dist/src/modules/Lib.d.ts +0 -24
- package/dist/src/modules/Modal.d.ts +0 -26
- package/dist/src/modules/QRCodeModal.d.ts +0 -25
- package/dist/src/modules/Validation.d.ts +0 -24
- package/dist/src/modules/ValidationModal.d.ts +0 -15
- package/dist/vite.config.d.ts +0 -2
- package/dist/wrapper.es.js.map +0 -1
- package/dist/wrapper.umd.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@idscan/onboarding",
|
|
3
|
-
"version": "2.10.
|
|
3
|
+
"version": "2.10.2",
|
|
4
4
|
"description": "Wrapper of the IDVC library for DIVE Online.",
|
|
5
5
|
"main": "dist/wrapper.umd.js",
|
|
6
6
|
"module": "dist/wrapper.es.js",
|
|
@@ -14,31 +14,39 @@
|
|
|
14
14
|
"README.md"
|
|
15
15
|
],
|
|
16
16
|
"scripts": {
|
|
17
|
-
"start": "vite",
|
|
17
|
+
"start": "vite --host",
|
|
18
18
|
"build": "vite build",
|
|
19
19
|
"prod": "vite build --mode production",
|
|
20
20
|
"pack": "npm pack",
|
|
21
21
|
"patch": "npm version patch",
|
|
22
|
-
"
|
|
22
|
+
"lint": "eslint \"src/**/*.{js,ts}\" --ignore-pattern \"src/UI/**\"",
|
|
23
|
+
"lint:fix": "eslint \"src/**/*.{js,ts}\" --ignore-pattern \"src/UI/**\" --fix",
|
|
24
|
+
"minor": "npm version minor",
|
|
25
|
+
"storybook": "storybook dev -p 6006",
|
|
26
|
+
"build-storybook": "storybook build",
|
|
27
|
+
"typecheck": "tsc --noEmit"
|
|
23
28
|
},
|
|
24
29
|
"dependencies": {
|
|
25
|
-
"@idscan/idvc2": "3.8.0",
|
|
26
30
|
"qrcode": "^1.5.1",
|
|
27
31
|
"regenerator-runtime": "^0.13.11"
|
|
28
32
|
},
|
|
29
33
|
"devDependencies": {
|
|
34
|
+
"@idscan/idvc2": "3.9.3",
|
|
35
|
+
"@chromatic-com/storybook": "^5.1.2",
|
|
36
|
+
"@idscan/eslint-config": "file:src/UI/eslint/eslint-flat",
|
|
37
|
+
"@storybook/addon-a11y": "^10.3.5",
|
|
38
|
+
"@storybook/addon-docs": "^10.3.5",
|
|
39
|
+
"@storybook/html-vite": "^10.3.5",
|
|
30
40
|
"@types/qrcode": "^1.5.0",
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"eslint-config-airbnb": "^18.2.1",
|
|
35
|
-
"eslint-config-airbnb-base": "^14.2.1",
|
|
36
|
-
"eslint-config-airbnb-typescript": "^17.0.0",
|
|
37
|
-
"eslint-plugin-import": "^2.22.1",
|
|
41
|
+
"eslint-plugin-storybook": "^10.3.5",
|
|
42
|
+
"msw": "^2.13.4",
|
|
43
|
+
"msw-storybook-addon": "^2.0.7",
|
|
38
44
|
"sass": "^1.43.5",
|
|
45
|
+
"storybook": "^10.3.5",
|
|
39
46
|
"typescript": "^5.0.4",
|
|
47
|
+
"vite": "^6.3.5",
|
|
48
|
+
"vite-plugin-checker": "^0.11.0",
|
|
40
49
|
"vite-plugin-dts": "^4.5.4",
|
|
41
|
-
"vite-plugin-eslint": "^1.8.1",
|
|
42
50
|
"vite-plugin-lib-inject-css": "^2.2.2",
|
|
43
51
|
"vite-plugin-mkcert": "^1.17.9",
|
|
44
52
|
"vite-plugin-static-copy": "^3.1.4",
|
|
@@ -53,5 +61,10 @@
|
|
|
53
61
|
"dvs",
|
|
54
62
|
"dive",
|
|
55
63
|
"online"
|
|
56
|
-
]
|
|
64
|
+
],
|
|
65
|
+
"msw": {
|
|
66
|
+
"workerDirectory": [
|
|
67
|
+
".storybook/public"
|
|
68
|
+
]
|
|
69
|
+
}
|
|
57
70
|
}
|
package/readme.md
CHANGED
|
@@ -179,6 +179,13 @@ btn.addEventListener('click', () => {
|
|
|
179
179
|
|
|
180
180
|
## Version history
|
|
181
181
|
|
|
182
|
+
- **2.10.2**
|
|
183
|
+
- fix: Corrected the validation result modal position when an error response is shown
|
|
184
|
+
|
|
185
|
+
- **2.10.1**
|
|
186
|
+
- fix: Fixed QR code modal, spinner animation, and modal header font size
|
|
187
|
+
- fix: Used green check icon for the wrapper passing state
|
|
188
|
+
|
|
182
189
|
- **2.10.0**
|
|
183
190
|
- feat: Added a fingerprint field to the validation model
|
|
184
191
|
- fix: Removed WebRTC IP collection from fingerprint data
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
declare module '*.jpg' {
|
|
2
|
-
const path: string;
|
|
3
|
-
export default path;
|
|
4
|
-
}
|
|
5
|
-
declare module '*.jpeg' {
|
|
6
|
-
const path: string;
|
|
7
|
-
export default path;
|
|
8
|
-
}
|
|
9
|
-
declare module '*.html' {
|
|
10
|
-
const path: string;
|
|
11
|
-
export default path;
|
|
12
|
-
}
|
|
13
|
-
declare module '*.scss' {
|
|
14
|
-
const path: string;
|
|
15
|
-
export default path;
|
|
16
|
-
}
|
|
17
|
-
declare module '*.html?raw' {
|
|
18
|
-
const path: string;
|
|
19
|
-
export default path;
|
|
20
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Base64Image, IDVCDocumentTypeIndex } from '../IDVCTypes';
|
|
2
|
-
export type FaceAuthorizationModel = {
|
|
3
|
-
faceImageBase64: Base64Image;
|
|
4
|
-
};
|
|
5
|
-
export type ValidationModel = FaceAuthorizationModel & {
|
|
6
|
-
frontImageBase64: Base64Image;
|
|
7
|
-
backOrSecondImageBase64: Base64Image;
|
|
8
|
-
trackString: string;
|
|
9
|
-
ssn: string;
|
|
10
|
-
verifyFace: boolean;
|
|
11
|
-
documentType: 0 | IDVCDocumentTypeIndex | 10;
|
|
12
|
-
captureMethod: string;
|
|
13
|
-
userAgent: string;
|
|
14
|
-
frontEndMetadata: string | undefined;
|
|
15
|
-
isBackOrSecondImageProcessingEnabled: boolean;
|
|
16
|
-
isOcrEnabled: boolean;
|
|
17
|
-
};
|
|
18
|
-
export type ValidationRequest = {
|
|
19
|
-
applicantId: string;
|
|
20
|
-
model: ValidationModel;
|
|
21
|
-
embeddedAppConnectionId: string;
|
|
22
|
-
};
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import { default as json } from '../../mocks/validation.json';
|
|
2
|
-
import { IDVCDocumentTypeIndex } from '../IDVCTypes';
|
|
3
|
-
import { ResponseStatus } from '../enums';
|
|
4
|
-
type JSON = string;
|
|
5
|
-
type AdditionalData = Record<string, string>;
|
|
6
|
-
type ApplicantDocument = {
|
|
7
|
-
abbr3Country: string;
|
|
8
|
-
abbrCountry: string;
|
|
9
|
-
address: string;
|
|
10
|
-
city: string;
|
|
11
|
-
class: string;
|
|
12
|
-
country: string;
|
|
13
|
-
dob: string;
|
|
14
|
-
expires: string;
|
|
15
|
-
eyes: string;
|
|
16
|
-
familyName: string;
|
|
17
|
-
firstName: string;
|
|
18
|
-
fullName: string;
|
|
19
|
-
gender: string;
|
|
20
|
-
hair: string;
|
|
21
|
-
height: string;
|
|
22
|
-
id: string;
|
|
23
|
-
idType: string;
|
|
24
|
-
issued: string;
|
|
25
|
-
middleName: string;
|
|
26
|
-
postalBox: string;
|
|
27
|
-
state: string;
|
|
28
|
-
issuedBy: string;
|
|
29
|
-
template: string;
|
|
30
|
-
weight: string;
|
|
31
|
-
zip: string;
|
|
32
|
-
ssn?: string;
|
|
33
|
-
};
|
|
34
|
-
type ValidationStatus = {
|
|
35
|
-
expired: boolean;
|
|
36
|
-
documentIsValid: boolean;
|
|
37
|
-
faceIsValid: boolean;
|
|
38
|
-
antiSpoofingIsValid: boolean;
|
|
39
|
-
};
|
|
40
|
-
type DocumentValidationTest = {
|
|
41
|
-
displayName: string;
|
|
42
|
-
name: string;
|
|
43
|
-
status: number;
|
|
44
|
-
statusString: string;
|
|
45
|
-
reason: string;
|
|
46
|
-
};
|
|
47
|
-
export type InvalidDataError = {
|
|
48
|
-
code: string;
|
|
49
|
-
message: string;
|
|
50
|
-
};
|
|
51
|
-
export type CompletedApplicant = {
|
|
52
|
-
code: string;
|
|
53
|
-
message: string;
|
|
54
|
-
additionalData: AdditionalData;
|
|
55
|
-
propertyErrors: string;
|
|
56
|
-
multipleErrors: string[];
|
|
57
|
-
traceId: string;
|
|
58
|
-
};
|
|
59
|
-
export type SuccessConfiguration = {
|
|
60
|
-
cssStyles: JSON;
|
|
61
|
-
cssVariables: JSON;
|
|
62
|
-
jsonSettings: JSON;
|
|
63
|
-
consentText: string;
|
|
64
|
-
checkboxText: string;
|
|
65
|
-
showConsentForm: boolean;
|
|
66
|
-
verifyFace: boolean;
|
|
67
|
-
showQrCode: boolean;
|
|
68
|
-
};
|
|
69
|
-
export type SuccessApplicantValidation = {
|
|
70
|
-
documentType: IDVCDocumentTypeIndex;
|
|
71
|
-
document: ApplicantDocument;
|
|
72
|
-
attemptsLeft: number;
|
|
73
|
-
status: ResponseStatus;
|
|
74
|
-
isCompleted: boolean;
|
|
75
|
-
validationStatus: ValidationStatus;
|
|
76
|
-
invalidDataErrors: InvalidDataError[] | null;
|
|
77
|
-
faceSuccess: boolean;
|
|
78
|
-
documentSuccess: boolean;
|
|
79
|
-
documentHasNotExpired: boolean;
|
|
80
|
-
documentValidationTests: DocumentValidationTest[];
|
|
81
|
-
callBackUrl: string;
|
|
82
|
-
applicantId: string;
|
|
83
|
-
attemptId: number;
|
|
84
|
-
attemptsCount: number;
|
|
85
|
-
notificationType: number;
|
|
86
|
-
};
|
|
87
|
-
export type FailedApplicantValidationResult = {
|
|
88
|
-
code: string;
|
|
89
|
-
message: string;
|
|
90
|
-
additionalData: AdditionalData;
|
|
91
|
-
propertyErrors: string;
|
|
92
|
-
multipleErrors: string[];
|
|
93
|
-
traceId: string;
|
|
94
|
-
};
|
|
95
|
-
export type ValidationApplicant = SuccessApplicantValidation & FailedApplicantValidationResult;
|
|
96
|
-
export type ValidationApplicantResult = Promise<(ValidationApplicant | typeof json.success | never)>;
|
|
97
|
-
export {};
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import { ValidationStatus } from './enums';
|
|
2
|
-
import { default as WrapperError } from '../errors/WrapperError';
|
|
3
|
-
import { StepCallback, StepConfig, StepMode } from './Step';
|
|
4
|
-
import { SuccessConfiguration, ValidationApplicant } from './Api/Responses';
|
|
5
|
-
import { IDVCDocumentTypeIndex, IDVCDocumentTypeName, RealFaceModeType, SupportedLanguage } from './IDVCTypes';
|
|
6
|
-
type ValidateCallbackData = ValidationApplicant & {
|
|
7
|
-
forceComplete?: boolean;
|
|
8
|
-
};
|
|
9
|
-
export type ValidationButtonNames = 'tryAgain' | 'complete';
|
|
10
|
-
export type JSONString = string;
|
|
11
|
-
export type PackageNumberVersion = string;
|
|
12
|
-
export type Statuses = Record<string, string>;
|
|
13
|
-
export type ValidationButtonsState = {
|
|
14
|
-
[key in ValidationButtonNames]: boolean;
|
|
15
|
-
};
|
|
16
|
-
export type ValidationResult = {
|
|
17
|
-
type: ValidationStatus;
|
|
18
|
-
header: string;
|
|
19
|
-
content: string;
|
|
20
|
-
buttons: ValidationButtonsState;
|
|
21
|
-
};
|
|
22
|
-
export type ConsentFormState = {
|
|
23
|
-
inputState: string;
|
|
24
|
-
checkboxState: boolean;
|
|
25
|
-
};
|
|
26
|
-
export type DocumentType = {
|
|
27
|
-
type: IDVCDocumentTypeName;
|
|
28
|
-
steps: StepConfig[];
|
|
29
|
-
};
|
|
30
|
-
export type DataForSubmit = {
|
|
31
|
-
metaData?: string;
|
|
32
|
-
payload?: Record<string, any>;
|
|
33
|
-
steps: StepCallback[];
|
|
34
|
-
documentType: IDVCDocumentTypeIndex;
|
|
35
|
-
};
|
|
36
|
-
export interface IDVCConfigCallbacks {
|
|
37
|
-
onRetakeHook?: (data: StepCallback) => void;
|
|
38
|
-
onReset?: (data: DataForSubmit) => void;
|
|
39
|
-
onChange?: (data: StepCallback) => void;
|
|
40
|
-
onCameraError?: (data: Error) => void;
|
|
41
|
-
onMounted?: () => void;
|
|
42
|
-
submit?: (data: DataForSubmit) => void;
|
|
43
|
-
onValidate?: (data: ValidateCallbackData) => void;
|
|
44
|
-
onReloaded?: () => void;
|
|
45
|
-
onError?: (data: WrapperError) => void;
|
|
46
|
-
onGetOptionsStart?: () => void;
|
|
47
|
-
onGetOptionsComplete?: (result: SuccessConfiguration) => void;
|
|
48
|
-
}
|
|
49
|
-
export interface IDVCConfig {
|
|
50
|
-
priority: string;
|
|
51
|
-
realFaceMode: RealFaceModeType;
|
|
52
|
-
steps: StepConfig[];
|
|
53
|
-
types: string[];
|
|
54
|
-
capturingMode: string;
|
|
55
|
-
resizeUploadedImage: number;
|
|
56
|
-
isShowManualSwitchButton: boolean;
|
|
57
|
-
showSubmitBtn: boolean;
|
|
58
|
-
enableLimitation: boolean;
|
|
59
|
-
autoContinue: boolean;
|
|
60
|
-
fixFrontOrientAfterUpload: boolean;
|
|
61
|
-
strictAllowedTypes: boolean;
|
|
62
|
-
useCDN?: boolean;
|
|
63
|
-
isShowVersion: boolean;
|
|
64
|
-
showForceCapturingBtn: boolean;
|
|
65
|
-
isShowGuidlinesButton: boolean;
|
|
66
|
-
documentTypes: IWebLibDocument[];
|
|
67
|
-
licenseKey: string;
|
|
68
|
-
el: string;
|
|
69
|
-
networkUrl?: string;
|
|
70
|
-
chunkPublicPath?: string;
|
|
71
|
-
language: SupportedLanguage;
|
|
72
|
-
h_stepMode: StepMode;
|
|
73
|
-
isShowDocumentTypeSelect: boolean;
|
|
74
|
-
useHeic: boolean;
|
|
75
|
-
isShowGuidelinesButton: boolean;
|
|
76
|
-
isSubmitMetaData: boolean;
|
|
77
|
-
hideDocumentTitle?: boolean;
|
|
78
|
-
processingImageFormat?: 'jpeg' | 'png' | 'webp';
|
|
79
|
-
}
|
|
80
|
-
export interface IWebLibDocument extends DocumentType {
|
|
81
|
-
isActive?: boolean;
|
|
82
|
-
}
|
|
83
|
-
export interface IWrapperConfig {
|
|
84
|
-
applicantId: string;
|
|
85
|
-
callbacks?: IDVCConfigCallbacks;
|
|
86
|
-
demoMode?: boolean;
|
|
87
|
-
domainApi: string;
|
|
88
|
-
domainId: string;
|
|
89
|
-
publicKey: string;
|
|
90
|
-
documentTypes?: IWebLibDocument[];
|
|
91
|
-
el?: string;
|
|
92
|
-
chunkPublicPath?: string;
|
|
93
|
-
isAuth?: boolean;
|
|
94
|
-
faceOnly?: boolean;
|
|
95
|
-
useCDN?: boolean;
|
|
96
|
-
preferApiConfig?: boolean;
|
|
97
|
-
networkUrl?: string;
|
|
98
|
-
hideDocumentTitle?: boolean;
|
|
99
|
-
processingImageFormat?: 'jpeg' | 'png' | 'webp';
|
|
100
|
-
wrapperSettings?: Partial<Omit<SuccessConfiguration, 'jsonSettings' | 'cssStyles' | 'cssVariables'>>;
|
|
101
|
-
qrCodeLinkOrigin?: string;
|
|
102
|
-
getApplicantIdFromURL?: boolean;
|
|
103
|
-
IDVCDownloadVersion?: PackageNumberVersion | 'latest';
|
|
104
|
-
}
|
|
105
|
-
export interface LibConfig {
|
|
106
|
-
IdvcConfig: IDVCConfig;
|
|
107
|
-
CSSStylesConfig: JSONString;
|
|
108
|
-
CSSVariablesConfig: JSONString;
|
|
109
|
-
}
|
|
110
|
-
export {};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export type IDVCDocumentTypeIndex = 1 | 2 | 3 | 4 | 6 | 7 | 9 | 10 | 11;
|
|
2
|
-
export type IDVCDocumentTypeName = 'DL' | 'IC' | 'Passport' | 'PassportCard' | 'GreenCard' | 'InternationalId' | 'VIN' | 'Barcode' | 'FaceAuthorization' | 'EmploymentAuthorization';
|
|
3
|
-
export type SupportedLanguage = 'en' | 'es';
|
|
4
|
-
export type RealFaceModeType = 'auto' | 'none' | 'all';
|
|
5
|
-
export type Base64Image = string;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { StepType } from '@idscan/idvc2/dist/types/environment/stepsDescription';
|
|
2
|
-
type Base64Image = string | null;
|
|
3
|
-
export type StepMode = {
|
|
4
|
-
uploader: boolean;
|
|
5
|
-
video: boolean;
|
|
6
|
-
};
|
|
7
|
-
export type StepCallback = {
|
|
8
|
-
img: Base64Image;
|
|
9
|
-
type: StepType;
|
|
10
|
-
isAuto: boolean;
|
|
11
|
-
source?: 'video' | 'file' | '';
|
|
12
|
-
index?: number;
|
|
13
|
-
trackString?: string;
|
|
14
|
-
mrzText?: string;
|
|
15
|
-
mrzImg?: Base64Image;
|
|
16
|
-
text?: string;
|
|
17
|
-
};
|
|
18
|
-
export type StepConfig = {
|
|
19
|
-
type: StepType;
|
|
20
|
-
name: string;
|
|
21
|
-
mode?: StepMode;
|
|
22
|
-
enableDesktopNotification?: boolean;
|
|
23
|
-
autocaptureDelay?: number;
|
|
24
|
-
enableFourCornerCapture?: boolean;
|
|
25
|
-
};
|
|
26
|
-
export {};
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
export declare enum ValidationStatus {
|
|
2
|
-
DANGER = "danger",
|
|
3
|
-
SUCCESS = "success",
|
|
4
|
-
PRIMARY = "primary"
|
|
5
|
-
}
|
|
6
|
-
export declare enum ResponseStatus {
|
|
7
|
-
SUCCESS = 0,
|
|
8
|
-
FAIL = 1,
|
|
9
|
-
INVALID_DATA = 2,
|
|
10
|
-
ERROR = 3,
|
|
11
|
-
COMPLETE = 4
|
|
12
|
-
}
|
|
13
|
-
export declare enum QRCodeModalState {
|
|
14
|
-
READY = "ready",
|
|
15
|
-
VALIDATING = "validating",
|
|
16
|
-
DONE_WITH_SUCCESS = "doneWithSuccess",
|
|
17
|
-
DONE_WITH_ERROR = "doneWithError"
|
|
18
|
-
}
|
|
19
|
-
export declare enum EmbeddedStatus {
|
|
20
|
-
NEVER_OPEN = 0,
|
|
21
|
-
OPEN = 1,
|
|
22
|
-
CLOSED = 2,
|
|
23
|
-
CLOSED_FOREVER = 3
|
|
24
|
-
}
|
|
25
|
-
export declare enum ClientType {
|
|
26
|
-
WebLibStandalone = 0,
|
|
27
|
-
WebLibDashboard = 1,
|
|
28
|
-
Android = 2,
|
|
29
|
-
Ios = 3
|
|
30
|
-
}
|
|
31
|
-
export declare enum WorkMode {
|
|
32
|
-
VALIDATION = "validation",
|
|
33
|
-
FACE_AUTHORIZATION = "faceAuthorization"
|
|
34
|
-
}
|
|
35
|
-
export declare enum NotificationText {
|
|
36
|
-
'' = 0,
|
|
37
|
-
'sent via SMS' = 1,
|
|
38
|
-
'sent via email' = 2,
|
|
39
|
-
'sent via SMS or email' = 3
|
|
40
|
-
}
|
|
41
|
-
export declare enum DocumentTypeIDs {
|
|
42
|
-
'DL' = 1,
|
|
43
|
-
'Passport' = 2,
|
|
44
|
-
'PassportCard' = 3,
|
|
45
|
-
'CommonAccessCardOld' = 4,
|
|
46
|
-
'CommonAccessCard' = 5,
|
|
47
|
-
'GreenCard' = 6,
|
|
48
|
-
'InternationalId' = 7,
|
|
49
|
-
'VIN' = 8,
|
|
50
|
-
'Barcode' = 11,
|
|
51
|
-
'FaceAuthorization' = 10,
|
|
52
|
-
'EmploymentAuthorization' = 9
|
|
53
|
-
}
|
|
54
|
-
export declare enum HttpStatus {
|
|
55
|
-
OK = 200,
|
|
56
|
-
Created = 201,
|
|
57
|
-
Accepted = 202,
|
|
58
|
-
NoContent = 204,
|
|
59
|
-
BadRequest = 400,
|
|
60
|
-
Unauthorized = 401,
|
|
61
|
-
PaymentRequired = 402,
|
|
62
|
-
Forbidden = 403,
|
|
63
|
-
NotFound = 404,
|
|
64
|
-
MethodNotAllowed = 405,
|
|
65
|
-
Gone = 410,
|
|
66
|
-
RequestTimeout = 408,
|
|
67
|
-
Conflict = 409,
|
|
68
|
-
PreconditionFailed = 412,
|
|
69
|
-
LengthRequired = 411,
|
|
70
|
-
PayloadTooLarge = 413,
|
|
71
|
-
RequestEntityTooLarge = 413,
|
|
72
|
-
RequestURITooLong = 414,
|
|
73
|
-
UnsupportedMediaType = 415,
|
|
74
|
-
RangeNotSatisfiable = 416,
|
|
75
|
-
ExpectationFailed = 417,
|
|
76
|
-
ImATextDocument = 423,
|
|
77
|
-
Locked = 423,
|
|
78
|
-
MisdirectedRequest = 421,
|
|
79
|
-
NetworkAuthenticationRequired = 511,
|
|
80
|
-
InternalServerError = 500,
|
|
81
|
-
NotImplemented = 501,
|
|
82
|
-
BadGateway = 502,
|
|
83
|
-
ServiceUnavailable = 503,
|
|
84
|
-
GatewayTimeout = 504,
|
|
85
|
-
HTTPVersionNotSupported = 505,
|
|
86
|
-
VariantAlsoNegotiates = 506,
|
|
87
|
-
InsufficientStorage = 507,
|
|
88
|
-
NetworkConnectTimeoutError = 524
|
|
89
|
-
}
|
package/dist/src/config.d.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { SuccessConfiguration } from './@types/Api/Responses';
|
|
2
|
-
import { IDVCConfig, IWrapperConfig } from './@types/Data';
|
|
3
|
-
export default class Configs {
|
|
4
|
-
private readonly wrapper;
|
|
5
|
-
private IDVCConfig;
|
|
6
|
-
private cssStyles;
|
|
7
|
-
private cssVariables;
|
|
8
|
-
constructor(config: IWrapperConfig);
|
|
9
|
-
validate: () => void;
|
|
10
|
-
parseFromWeb(options: SuccessConfiguration): void;
|
|
11
|
-
faceAuthorizationConfig(jsonSettings: IDVCConfig): IDVCConfig;
|
|
12
|
-
getFirstStepModeState(): () => import('./@types/Step').StepMode | undefined;
|
|
13
|
-
get firstStepMode(): import('./@types/Step').StepMode | undefined;
|
|
14
|
-
set applicantId(applicantId: string);
|
|
15
|
-
get applicantId(): string;
|
|
16
|
-
get domainId(): string;
|
|
17
|
-
get publicKey(): string;
|
|
18
|
-
get domainApi(): string;
|
|
19
|
-
get onValidate(): (data: import('./@types/Api/Responses').SuccessApplicantValidation & import('./@types/Api/Responses').FailedApplicantValidationResult & {
|
|
20
|
-
forceComplete?: boolean;
|
|
21
|
-
}) => void;
|
|
22
|
-
get onError(): (data: import('./errors/WrapperError').default) => void;
|
|
23
|
-
get onGetOptionsStart(): () => void;
|
|
24
|
-
get onGetOptionsComplete(): (result: SuccessConfiguration) => void;
|
|
25
|
-
set libConfig(config: IDVCConfig);
|
|
26
|
-
get libConfig(): IDVCConfig;
|
|
27
|
-
get cssStylesConfig(): string;
|
|
28
|
-
get cssVariablesConfig(): string;
|
|
29
|
-
get mountElement(): string;
|
|
30
|
-
get demoMode(): boolean;
|
|
31
|
-
get isAuth(): boolean;
|
|
32
|
-
get faceOnly(): boolean;
|
|
33
|
-
get qrCodeLinkOrigin(): string;
|
|
34
|
-
get IDVCDownloadVersion(): string;
|
|
35
|
-
}
|
package/dist/src/entry.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { CompletedApplicant } from '../@types/Api/Responses';
|
|
2
|
-
import { default as WrapperError } from './WrapperError';
|
|
3
|
-
export default class FaceAuthorizationError extends WrapperError {
|
|
4
|
-
constructor(error: CompletedApplicant);
|
|
5
|
-
setHeader({ code }: CompletedApplicant): void;
|
|
6
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { CompletedApplicant } from '../@types/Api/Responses';
|
|
2
|
-
import { default as WrapperError } from './WrapperError';
|
|
3
|
-
export default class ValidationError extends WrapperError {
|
|
4
|
-
constructor(error: CompletedApplicant);
|
|
5
|
-
setHeader({ code }: CompletedApplicant): void;
|
|
6
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { default as Fingerprint } from '../../Fingerprinting/src/main';
|
|
2
|
-
import { INavigatorInfo } from '../../Fingerprinting/src/modules/browserInfo';
|
|
3
|
-
export declare const createFingerPrintModel: () => Promise<{
|
|
4
|
-
browserMetadata: {
|
|
5
|
-
screenInfo: ReturnType<typeof Fingerprint.screenInfo>;
|
|
6
|
-
webGlInfo: ReturnType<typeof Fingerprint.webGLInfo>;
|
|
7
|
-
navigatorInfo: INavigatorInfo;
|
|
8
|
-
canvasInfo: ReturnType<typeof Fingerprint.canvasInfo>;
|
|
9
|
-
connectionInfo: ReturnType<typeof Fingerprint.connectionInfo>;
|
|
10
|
-
html5Info: ReturnType<typeof Fingerprint.HTML5Info>;
|
|
11
|
-
browserInfo: ReturnType<typeof Fingerprint.browserInfo>;
|
|
12
|
-
batteryInfo: ReturnType<typeof Fingerprint.batteryInfo>;
|
|
13
|
-
fontsInfo: ReturnType<typeof Fingerprint.fontsInfo>;
|
|
14
|
-
};
|
|
15
|
-
deviceMetadata: {
|
|
16
|
-
timeZone: string;
|
|
17
|
-
userLanguage: string;
|
|
18
|
-
};
|
|
19
|
-
}>;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export declare const isiOS: () => boolean;
|
|
2
|
-
export declare const checkTouchPoints: () => boolean;
|
|
3
|
-
export declare const checkIsTouchScreen: () => boolean;
|
|
4
|
-
/**
|
|
5
|
-
*
|
|
6
|
-
* @param {Number} maxWidth - preferable max width device
|
|
7
|
-
*/
|
|
8
|
-
export declare const isMobile: () => {
|
|
9
|
-
isMobileUserAgent: () => boolean;
|
|
10
|
-
isTouchable: () => boolean;
|
|
11
|
-
isTouchScreen: () => boolean;
|
|
12
|
-
isSurface: () => boolean;
|
|
13
|
-
};
|
|
14
|
-
declare const checkIfMobile: () => boolean;
|
|
15
|
-
export default checkIfMobile;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { StepCallback } from '../@types/Step';
|
|
2
|
-
import { IDVCDocumentTypeIndex } from '../@types/IDVCTypes';
|
|
3
|
-
export declare const checkBackOrSecondImageProcessing: (documentType: IDVCDocumentTypeIndex, steps: StepCallback[]) => boolean;
|
|
4
|
-
export declare const checkOcrEnabled: (documentType: IDVCDocumentTypeIndex, steps: StepCallback[]) => boolean;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const isString: (val: unknown) => val is string;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { DocumentType, IDVCConfig, IWebLibDocument } from '../@types/Data';
|
|
2
|
-
export declare const createGuid: () => string;
|
|
3
|
-
/**
|
|
4
|
-
* 1. Filter Active DocumentTypes
|
|
5
|
-
* 2. Filter Steps that have at least one active mode
|
|
6
|
-
* */
|
|
7
|
-
export declare const getFilteredDocumentTypes: (documentTypes: IWebLibDocument[]) => DocumentType[];
|
|
8
|
-
export declare const prepareDocumentTypes: (config: IDVCConfig) => DocumentType[];
|
|
9
|
-
export declare const getQueryParam: (param: string) => string | null;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
declare const notEmptyString: (val: string) => boolean;
|
|
2
|
-
declare const isUUID: (str: string) => boolean;
|
|
3
|
-
declare const isPublicKey: (str: string) => boolean;
|
|
4
|
-
declare const isElExist: (str: string) => boolean;
|
|
5
|
-
declare const isPackageVersionNumber: (input: string) => boolean;
|
|
6
|
-
export { notEmptyString, isUUID, isPublicKey, isElExist, isPackageVersionNumber, };
|
|
7
|
-
export type ValidateFunctions = typeof notEmptyString | typeof isUUID | typeof isPublicKey | typeof isElExist;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
"success": {"validationResponseId":6223,"validationRequestId":"8151f48d-bab1-4491-037d-08d9b3c5cfec","documentType":1,"document":{"abbr3Country":"USA","abbrCountry":"US","address":"25805 VAN LEUVEN ST 136","city":"LOMA LINDA","class":"C","country":"United States of America","dob":"1961-01-07","expires":"2024-01-07","eyes":"Brown","familyName":"GILMER","firstName":"DARIENNE","fullName":"DARIENNE ELIZABETH GILMER","gender":"Female","hair":"Black","height":"064 IN","id":"C3568758","idType":"DL","issued":"2019-01-07","middleName":"ELIZABETH","postalBox":null,"privateName":"ELIZABETH","state":"CA","template":"09","weight":"77","zip":"92354-0000"},"attemptsLeft":0,"status":0,"validationStatus":{"expired":false,"documentIsValid":true,"faceIsValid":true},"invalidDataErrors":null,"faceSuccess":null,"documentSuccess":null,"documentHasNotExpired":null,"documentValidationTests":[{"displayName":"DMV","name":"DMVValidation","status":0,"statusString":"Failed","reason":"Internal Server Error"},{"displayName":"IdentiFraud","name":"IdentiFraudValidation","status":-1,"statusString":"Disabled","reason":"Integration was turned off"}]},
|
|
3
|
-
"badRequest": {"code":"BadRequest","message":"Request 8151f48d-bab1-4491-037d-08d9b3c5cfec was already completed","propertyErrors":null,"multipleErrors":null,"traceId":"00-79d8750f93829a48b8c46bfd1ac4c8b6-385d90679b4edb45-00"},
|
|
4
|
-
"dataInvalid": {"validationResponseId":6224,"validationRequestId":"fa33df4c-7d5c-4485-037e-08d9b3c5cfec","documentType":0,"document":null,"attemptsLeft":19,"status":2,"validationStatus":{"expired":false,"documentIsValid":false,"faceIsValid":false},"invalidDataErrors":[{"code":"FaceDocNotDetectError","message":"The face has not been found on the document"},{"code":"PDF417Error","message":"Unable to capture data from the back of the document"},{"code":"OCRError","message":"Unable to capture data from the front of the document"}],"faceSuccess":null,"documentSuccess":null,"documentHasNotExpired":null,"documentValidationTests":null},
|
|
5
|
-
"validationFailed": {"validationResponseId":6230,"validationRequestId":"eae11ae1-1c8f-40bd-0381-08d9b3c5cfec","documentType":2,"document":{"abbr3Country":"USA","abbrCountry":"US","address":null,"city":null,"class":null,"country":"United States of America","dob":"1986-07-24","expires":"2030-07-13","eyes":null,"familyName":"LEVELS","firstName":"DAVID HARRISON","fullName":"LEVELS DAVID HARRISON","gender":"M","hair":null,"height":null,"id":"659328258","idType":"PASSPORT","issued":null,"middleName":null,"postalBox":null,"privateName":null,"state":null,"template":null,"weight":null,"zip":null},"attemptsLeft":18,"status":1,"validationStatus":{"expired":false,"documentIsValid":true,"faceIsValid":false},"invalidDataErrors":null,"faceSuccess":null,"documentSuccess":null,"documentHasNotExpired":null,"documentValidationTests":null}
|
|
6
|
-
}
|
|
7
|
-
;
|
|
8
|
-
|
|
9
|
-
export default _default;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ValidationRequest } from '../@types/Api/Requests';
|
|
2
|
-
import { CompletedApplicant, SuccessConfiguration, ValidationApplicantResult } from '../@types/Api/Responses';
|
|
3
|
-
export default class Api {
|
|
4
|
-
private readonly baseUrl;
|
|
5
|
-
private readonly baseEmbeddedUrl;
|
|
6
|
-
private readonly idvcManifestUrl;
|
|
7
|
-
private HEADERS;
|
|
8
|
-
constructor(publicKey: string, domainApi?: string);
|
|
9
|
-
checkApplicantIdIsNotClosed({ applicantId, demoMode, faceAuth, faceOnly, }: {
|
|
10
|
-
applicantId?: string | undefined;
|
|
11
|
-
demoMode?: boolean | undefined;
|
|
12
|
-
faceAuth?: boolean | undefined;
|
|
13
|
-
faceOnly?: boolean | undefined;
|
|
14
|
-
}): Promise<boolean> | never;
|
|
15
|
-
getCurrentIdvcVersion(): Promise<string>;
|
|
16
|
-
getOptions(integrationId: string): Promise<SuccessConfiguration | never>;
|
|
17
|
-
validateApplicant(data: ValidationRequest, demoMode?: boolean, isFaceAuth?: boolean): ValidationApplicantResult;
|
|
18
|
-
forceClose(applicantId: string): Promise<CompletedApplicant | never>;
|
|
19
|
-
closeEmbeddedApplication(applicantId: string, callback: () => void): Promise<void>;
|
|
20
|
-
longPollingRequest(url: string, init: RequestInit, callback: (data: any) => void): Promise<void>;
|
|
21
|
-
}
|