@idscan/onboarding 2.2.6 → 2.2.8
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/@types/Fingerprinting/src/@types/Data.d.ts +10 -0
- package/dist/@types/Fingerprinting/src/main.d.ts +29 -0
- package/dist/@types/Fingerprinting/src/modules/batteryInfo.d.ts +7 -0
- package/dist/@types/Fingerprinting/src/modules/browserInfo.d.ts +21 -0
- package/dist/@types/Fingerprinting/src/modules/canvasInfo.d.ts +1 -0
- package/dist/@types/Fingerprinting/src/modules/connectionInfo.d.ts +9 -0
- package/dist/@types/Fingerprinting/src/modules/fontsInfo.d.ts +3 -0
- package/dist/@types/Fingerprinting/src/modules/html5Info.d.ts +8 -0
- package/dist/@types/Fingerprinting/src/modules/ipWebRTCInfo.d.ts +1 -0
- package/dist/@types/Fingerprinting/src/modules/screenInfo.d.ts +14 -0
- package/dist/@types/Fingerprinting/src/modules/timeZoneInfo.d.ts +1 -0
- package/dist/@types/Fingerprinting/src/modules/videoCodecsInfo.d.ts +1 -0
- package/dist/@types/Fingerprinting/src/modules/webGLInfo.d.ts +10 -0
- package/dist/@types/Fingerprinting/src/utils/sha256.d.ts +2 -0
- package/dist/@types/src/@types/Api/Requests.d.ts +20 -0
- package/dist/@types/src/@types/Api/Responses.d.ts +95 -0
- package/dist/@types/src/@types/Data.d.ts +94 -0
- package/dist/@types/src/@types/IDVCTypes.d.ts +5 -0
- package/dist/@types/src/@types/Step.d.ts +41 -0
- package/dist/@types/src/@types/enums.d.ts +34 -0
- package/dist/@types/src/Wrapper.d.ts +43 -0
- package/dist/@types/src/config.d.ts +26 -0
- package/dist/@types/src/entry.d.ts +1 -0
- package/dist/@types/src/errors/ConfigError.d.ts +4 -0
- package/dist/@types/src/errors/FaceAuthorizationError.d.ts +6 -0
- package/dist/@types/src/errors/HttpError.d.ts +4 -0
- package/dist/@types/src/errors/NotValidApplicant.d.ts +4 -0
- package/dist/@types/src/errors/RequestTimeoutError.d.ts +4 -0
- package/dist/@types/src/errors/ValidationError.d.ts +6 -0
- package/dist/@types/src/errors/WrapperError.d.ts +5 -0
- package/dist/@types/src/helpers/fingerPrint.d.ts +40 -0
- package/dist/@types/src/helpers/typeGuard.d.ts +1 -0
- package/dist/@types/src/helpers/utils.d.ts +38 -0
- package/dist/@types/src/helpers/validators.d.ts +6 -0
- package/dist/@types/src/modules/Api.d.ts +17 -0
- package/dist/@types/src/modules/ConsentForm.d.ts +13 -0
- package/dist/@types/src/modules/Lib.d.ts +20 -0
- package/dist/@types/src/modules/Modal.d.ts +27 -0
- package/dist/@types/src/modules/QRCodeModal.d.ts +21 -0
- package/dist/@types/src/modules/Validation.d.ts +21 -0
- package/dist/@types/src/modules/ValidationModal.d.ts +14 -0
- package/dist/css/onboarding.css +1 -1
- package/dist/js/wrapper.js +1 -1
- package/dist/networks/156-9239-chunk.js +1 -0
- package/dist/networks/190-77ed-chunk.js +1 -0
- package/dist/networks/77-9e2f-chunk.js +1 -0
- package/dist/networks/Face-a2b7-chunk.js +1 -0
- package/dist/networks/MRZ-7d62-chunk.js +1 -0
- package/dist/networks/PDF-78d2-chunk.js +1 -0
- package/dist/networks/ZXing-5410-chunk.js +1 -0
- package/package.json +4 -3
- package/readme.md +7 -0
- package/dist/networks/156-6146-chunk.js +0 -1
- package/dist/networks/190-200f-chunk.js +0 -1
- package/dist/networks/77-eca7-chunk.js +0 -1
- package/dist/networks/Face-578d-chunk.js +0 -1
- package/dist/networks/MRZ-4756-chunk.js +0 -1
- package/dist/networks/PDF-8ef7-chunk.js +0 -1
- package/dist/networks/ZXing-e864-chunk.js +0 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type SHA256String = string;
|
|
2
|
+
export type BASE64String = string;
|
|
3
|
+
export interface IFontSize {
|
|
4
|
+
width: number;
|
|
5
|
+
height: number;
|
|
6
|
+
}
|
|
7
|
+
export type FontOffsetSizes = Record<string, IFontSize>;
|
|
8
|
+
export type Context = WebGLRenderingContext | WebGL2RenderingContext;
|
|
9
|
+
export type PrecisionType = 'LOW_FLOAT' | 'MEDIUM_FLOAT' | 'HIGH_FLOAT';
|
|
10
|
+
export type PrecisionFormat = Record<PrecisionType, WebGLShaderPrecisionFormat> | Record<string, any>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import getBrowserInfo from './modules/browserInfo';
|
|
2
|
+
import getScreenResolutionInfo from './modules/screenInfo';
|
|
3
|
+
import getBatteryInfo from './modules/batteryInfo';
|
|
4
|
+
import getConnectionInfo from './modules/connectionInfo';
|
|
5
|
+
import getCanvasInfo from './modules/canvasInfo';
|
|
6
|
+
import getFontsInfo from './modules/fontsInfo';
|
|
7
|
+
import getIpWebRTCInfo from './modules/ipWebRTCInfo';
|
|
8
|
+
import getHTML5Info from './modules/html5Info';
|
|
9
|
+
import getVideoCodecsInfo from './modules/videoCodecsInfo';
|
|
10
|
+
import getTimeZoneInfo from './modules/timeZoneInfo';
|
|
11
|
+
import getWebGLInfo from './modules/webGLInfo';
|
|
12
|
+
import decrypt from './utils/sha256';
|
|
13
|
+
declare const Fingerprint: {
|
|
14
|
+
browserInfo: typeof getBrowserInfo;
|
|
15
|
+
screenInfo: typeof getScreenResolutionInfo;
|
|
16
|
+
batteryInfo: typeof getBatteryInfo;
|
|
17
|
+
connectionInfo: typeof getConnectionInfo;
|
|
18
|
+
canvasInfo: typeof getCanvasInfo;
|
|
19
|
+
fontsInfo: typeof getFontsInfo;
|
|
20
|
+
ipWebRTCInfo: typeof getIpWebRTCInfo;
|
|
21
|
+
HTML5Info: typeof getHTML5Info;
|
|
22
|
+
videoCodecsInfo: typeof getVideoCodecsInfo;
|
|
23
|
+
timeZoneInfo: typeof getTimeZoneInfo;
|
|
24
|
+
webGLInfo: typeof getWebGLInfo;
|
|
25
|
+
utils: {
|
|
26
|
+
sha256: typeof decrypt;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
export default Fingerprint;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface InternationalizationInfo {
|
|
2
|
+
locale: string;
|
|
3
|
+
dateFormat: string;
|
|
4
|
+
calendar: string;
|
|
5
|
+
numberingSystem: string;
|
|
6
|
+
weekInfo: string;
|
|
7
|
+
collations: string;
|
|
8
|
+
}
|
|
9
|
+
export interface INavigatorInfo {
|
|
10
|
+
userAgent: string;
|
|
11
|
+
cookieEnabled: boolean;
|
|
12
|
+
platform: string;
|
|
13
|
+
hardwareConcurrency: number;
|
|
14
|
+
languages: readonly string[];
|
|
15
|
+
}
|
|
16
|
+
export default function getBrowserInfo(): Promise<{
|
|
17
|
+
internationalizationInfo: InternationalizationInfo | Record<string, never>;
|
|
18
|
+
navigatorInfo: INavigatorInfo;
|
|
19
|
+
availableNavigatorApiInfo: Record<string, never> | Record<string, boolean>;
|
|
20
|
+
additionalApiInfo: Record<string, never> | Record<string, boolean>;
|
|
21
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function getCanvasInfo(): Promise<string>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface IConnection {
|
|
2
|
+
effectiveType: 'slow-2g' | '2g' | '3g' | '4g';
|
|
3
|
+
downlink: number;
|
|
4
|
+
rtt: number;
|
|
5
|
+
saveData: boolean;
|
|
6
|
+
type: 'bluetooth' | 'cellular' | 'ethernet' | 'none' | 'wifi' | 'wimax' | 'other' | 'unknown';
|
|
7
|
+
downlinkMax: number;
|
|
8
|
+
}
|
|
9
|
+
export default function getConnectionInfo(): Promise<IConnection | Record<string, never>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function getIp(): Promise<string>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export default function getScreenResolutionInfo(): Promise<{
|
|
2
|
+
width: number;
|
|
3
|
+
height: number;
|
|
4
|
+
availWidth: number;
|
|
5
|
+
availHeight: number;
|
|
6
|
+
colorDepth: number;
|
|
7
|
+
pixelDepth: number;
|
|
8
|
+
orientationAngle: number;
|
|
9
|
+
orientationType: OrientationType;
|
|
10
|
+
innerWidth: number;
|
|
11
|
+
innerHeight: number;
|
|
12
|
+
outerWidth: number;
|
|
13
|
+
outerHeight: number;
|
|
14
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function getTimeZoneInfo(): Promise<string>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function getVideoCodecsInfo(): Promise<Record<string, string>>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Base64Image, DocumentTypeIndex } from '../IDVCTypes';
|
|
2
|
+
export interface IFaceAuthorizationModel {
|
|
3
|
+
faceImageBase64: Base64Image;
|
|
4
|
+
}
|
|
5
|
+
export interface IValidationModel extends IFaceAuthorizationModel {
|
|
6
|
+
frontImageBase64: Base64Image;
|
|
7
|
+
backOrSecondImageBase64: Base64Image;
|
|
8
|
+
trackString: string;
|
|
9
|
+
ssn: string;
|
|
10
|
+
verifyFace: boolean;
|
|
11
|
+
documentType: 0 | DocumentTypeIndex | 10;
|
|
12
|
+
captureMethod: string;
|
|
13
|
+
userAgent: string;
|
|
14
|
+
frontEndMetadata: string | undefined;
|
|
15
|
+
}
|
|
16
|
+
export interface IValidationRequest {
|
|
17
|
+
applicantId: string;
|
|
18
|
+
model: IValidationModel;
|
|
19
|
+
embeddedAppConnectionId: string;
|
|
20
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import json from '../../mocks/validation.json';
|
|
2
|
+
import { DocumentTypeIndex } from '../IDVCTypes';
|
|
3
|
+
import { ResponseStatus } from '../enums';
|
|
4
|
+
type JSON = string;
|
|
5
|
+
type AdditionalData = Record<string, string>;
|
|
6
|
+
interface IDocument {
|
|
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
|
+
interface IValidationStatus {
|
|
35
|
+
expired: boolean;
|
|
36
|
+
documentIsValid: boolean;
|
|
37
|
+
faceIsValid: boolean;
|
|
38
|
+
antiSpoofingIsValid: boolean;
|
|
39
|
+
}
|
|
40
|
+
export interface InvalidDataError {
|
|
41
|
+
code: string;
|
|
42
|
+
message: string;
|
|
43
|
+
}
|
|
44
|
+
interface DocumentValidationTest {
|
|
45
|
+
displayName: string;
|
|
46
|
+
name: string;
|
|
47
|
+
status: number;
|
|
48
|
+
statusString: string;
|
|
49
|
+
reason: string;
|
|
50
|
+
}
|
|
51
|
+
export interface ICompletedApplicant {
|
|
52
|
+
code: string;
|
|
53
|
+
message: string;
|
|
54
|
+
additionalData: AdditionalData;
|
|
55
|
+
propertyErrors: string;
|
|
56
|
+
multipleErrors: string[];
|
|
57
|
+
traceId: string;
|
|
58
|
+
}
|
|
59
|
+
export interface ISuccessConfiguration {
|
|
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 interface ISuccessApplicantValidation {
|
|
70
|
+
documentType: DocumentTypeIndex;
|
|
71
|
+
document: IDocument;
|
|
72
|
+
attemptsLeft: number;
|
|
73
|
+
status: ResponseStatus;
|
|
74
|
+
validationStatus: IValidationStatus;
|
|
75
|
+
invalidDataErrors: InvalidDataError[] | null;
|
|
76
|
+
faceSuccess: boolean;
|
|
77
|
+
documentSuccess: boolean;
|
|
78
|
+
documentHasNotExpired: boolean;
|
|
79
|
+
documentValidationTests: DocumentValidationTest[];
|
|
80
|
+
callBackUrl: string;
|
|
81
|
+
applicantId: string;
|
|
82
|
+
attemptId: number;
|
|
83
|
+
attemptsCount: number;
|
|
84
|
+
}
|
|
85
|
+
export interface IFailedApplicantValidationResult {
|
|
86
|
+
code: string;
|
|
87
|
+
message: string;
|
|
88
|
+
additionalData: AdditionalData;
|
|
89
|
+
propertyErrors: string;
|
|
90
|
+
multipleErrors: string[];
|
|
91
|
+
traceId: string;
|
|
92
|
+
}
|
|
93
|
+
export type ValidationApplicant = ISuccessApplicantValidation & IFailedApplicantValidationResult;
|
|
94
|
+
export type ValidationApplicantResult = Promise<(ValidationApplicant | typeof json.success | never)>;
|
|
95
|
+
export {};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { ValidationStatus } from './enums';
|
|
2
|
+
import WrapperError from '../errors/WrapperError';
|
|
3
|
+
import { IStepCallback, IStepConfig, IStepMode } from './Step';
|
|
4
|
+
import { ValidationApplicant } from './Api/Responses';
|
|
5
|
+
import { DocumentTypeIndex, DocumentTypeName, RealFaceModeType, SupportedLanguage } from './IDVCTypes';
|
|
6
|
+
export type ValidationButtonNames = 'tryAgain' | 'complete';
|
|
7
|
+
export type JSONString = string;
|
|
8
|
+
export type Statuses = Record<string, string>;
|
|
9
|
+
export type ValidationButtonsState = {
|
|
10
|
+
[key in ValidationButtonNames]: boolean;
|
|
11
|
+
};
|
|
12
|
+
export interface IValidationResult {
|
|
13
|
+
type: ValidationStatus;
|
|
14
|
+
header: string;
|
|
15
|
+
content: string;
|
|
16
|
+
buttons: ValidationButtonsState;
|
|
17
|
+
}
|
|
18
|
+
export interface IConsentFormState {
|
|
19
|
+
inputState: string;
|
|
20
|
+
checkboxState: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface IDocumentType {
|
|
23
|
+
type: DocumentTypeName;
|
|
24
|
+
mode?: IStepMode;
|
|
25
|
+
steps: IStepConfig[];
|
|
26
|
+
}
|
|
27
|
+
export interface IDataForSubmit {
|
|
28
|
+
metaData?: string;
|
|
29
|
+
payload?: Record<string, any>;
|
|
30
|
+
steps: IStepCallback[];
|
|
31
|
+
documentType: DocumentTypeIndex | 0;
|
|
32
|
+
}
|
|
33
|
+
export interface IValidateCallbackData extends ValidationApplicant {
|
|
34
|
+
forceComplete?: boolean;
|
|
35
|
+
}
|
|
36
|
+
export interface IDVCConfigCallbacks {
|
|
37
|
+
onRetakeHook?: (data: IStepCallback) => void;
|
|
38
|
+
onReset?: (data: IDataForSubmit) => void;
|
|
39
|
+
onChange?: (data: IStepCallback) => void;
|
|
40
|
+
onCameraError?: (data: Error) => void;
|
|
41
|
+
onMounted?: () => void;
|
|
42
|
+
submit?: (data: IDataForSubmit) => void;
|
|
43
|
+
onValidate?: (data: IValidateCallbackData) => void;
|
|
44
|
+
onReloaded?: () => void;
|
|
45
|
+
onError?: (data: WrapperError) => void;
|
|
46
|
+
}
|
|
47
|
+
export interface IDVCConfig {
|
|
48
|
+
priority: string;
|
|
49
|
+
realFaceMode: RealFaceModeType;
|
|
50
|
+
steps: IStepConfig[];
|
|
51
|
+
types: string[];
|
|
52
|
+
capturingMode: string;
|
|
53
|
+
resizeUploadedImage: number;
|
|
54
|
+
isShowManualSwitchButton: boolean;
|
|
55
|
+
showSubmitBtn: boolean;
|
|
56
|
+
enableLimitation: boolean;
|
|
57
|
+
autoContinue: boolean;
|
|
58
|
+
fixFrontOrientAfterUpload: boolean;
|
|
59
|
+
strictAllowedTypes: boolean;
|
|
60
|
+
useCDN: boolean;
|
|
61
|
+
isShowVersion: boolean;
|
|
62
|
+
showForceCapturingBtn: boolean;
|
|
63
|
+
isShowGuidlinesButton: boolean;
|
|
64
|
+
documentTypes: IWebLibDocument[];
|
|
65
|
+
licenseKey: string;
|
|
66
|
+
el: string;
|
|
67
|
+
networkUrl: string;
|
|
68
|
+
chunkPublicPath?: string;
|
|
69
|
+
language: SupportedLanguage;
|
|
70
|
+
h_stepMode: IStepMode;
|
|
71
|
+
isShowDocumentTypeSelect: boolean;
|
|
72
|
+
useHeic: boolean;
|
|
73
|
+
isShowGuidelinesButton: boolean;
|
|
74
|
+
isSubmitMetaData: boolean;
|
|
75
|
+
}
|
|
76
|
+
export interface IWebLibDocument extends IDocumentType {
|
|
77
|
+
isActive?: boolean;
|
|
78
|
+
}
|
|
79
|
+
export interface IWrapperConfig {
|
|
80
|
+
applicantId: string;
|
|
81
|
+
callbacks?: IDVCConfigCallbacks;
|
|
82
|
+
demoMode?: boolean;
|
|
83
|
+
domainApi: string;
|
|
84
|
+
domainId: string;
|
|
85
|
+
publicKey: string;
|
|
86
|
+
el?: string;
|
|
87
|
+
chunkPublicPath?: string;
|
|
88
|
+
isAuth?: boolean;
|
|
89
|
+
}
|
|
90
|
+
export interface LibConfig {
|
|
91
|
+
IDVCConfig: IDVCConfig;
|
|
92
|
+
CSSStylesConfig: JSONString;
|
|
93
|
+
CSSVariablesConfig: JSONString;
|
|
94
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type DocumentTypeIndex = 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10;
|
|
2
|
+
export type DocumentTypeName = 'ID' | 'Passport' | 'PassportCard' | 'GreenCard' | 'InternationalId' | 'VIN' | 'FaceAuthorization' | 'Barcode';
|
|
3
|
+
export type SupportedLanguage = 'en' | 'es';
|
|
4
|
+
export type RealFaceModeType = 'auto' | 'none' | 'all';
|
|
5
|
+
export type Base64Image = string;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
type StepType = 'auto' | 'mrz' | 'front' | 'pdf' | 'back' | 'face' | 'barcode' | 'photo';
|
|
2
|
+
type Base64Image = string | null;
|
|
3
|
+
export interface IStepMode {
|
|
4
|
+
uploader: boolean;
|
|
5
|
+
video: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface IStepCallback {
|
|
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 interface IStepObj {
|
|
19
|
+
name: string;
|
|
20
|
+
type: StepType;
|
|
21
|
+
camera: VideoFacingModeEnum;
|
|
22
|
+
img: Base64Image;
|
|
23
|
+
err?: string | null;
|
|
24
|
+
text?: string;
|
|
25
|
+
time?: number;
|
|
26
|
+
configs?: IStepConfigMode[];
|
|
27
|
+
}
|
|
28
|
+
export interface Step extends IStepCallback, IStepObj {
|
|
29
|
+
blob?: Blob | null;
|
|
30
|
+
errorCode: string | null | undefined;
|
|
31
|
+
}
|
|
32
|
+
export interface IStepConfig {
|
|
33
|
+
type: StepType;
|
|
34
|
+
name: string;
|
|
35
|
+
mode: IStepMode;
|
|
36
|
+
}
|
|
37
|
+
export interface IStepConfigMode {
|
|
38
|
+
name: 'mode';
|
|
39
|
+
value: IStepMode;
|
|
40
|
+
}
|
|
41
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import '@idscan/idvc2/dist/css/idvc.css';
|
|
2
|
+
import './assets/scss/index.scss';
|
|
3
|
+
import 'core-js/stable';
|
|
4
|
+
import 'regenerator-runtime/runtime';
|
|
5
|
+
import { IWrapperConfig, JSONString } from './@types/Data';
|
|
6
|
+
export default class Wrapper {
|
|
7
|
+
private api;
|
|
8
|
+
private lib;
|
|
9
|
+
private configs;
|
|
10
|
+
private validationOutput;
|
|
11
|
+
private form;
|
|
12
|
+
private validationModal;
|
|
13
|
+
private QRCodeModal;
|
|
14
|
+
private options;
|
|
15
|
+
private embeddedAppConnectionId;
|
|
16
|
+
private readonly config;
|
|
17
|
+
private readonly fingerPrintData;
|
|
18
|
+
constructor(config: IWrapperConfig);
|
|
19
|
+
private beforeMount;
|
|
20
|
+
private get isEmbeddedFromQR();
|
|
21
|
+
private mountQRCodeButton;
|
|
22
|
+
private mount;
|
|
23
|
+
private checkApplicantIsValid;
|
|
24
|
+
updateConfig(newConfig: JSONString): void;
|
|
25
|
+
/**
|
|
26
|
+
* reinitialize the library with new applicant id
|
|
27
|
+
*/
|
|
28
|
+
setApplicant(applicantId: string): Promise<void>;
|
|
29
|
+
private showSpinner;
|
|
30
|
+
private submit;
|
|
31
|
+
private showValidationSuccess;
|
|
32
|
+
private createPostModel;
|
|
33
|
+
private start;
|
|
34
|
+
restart(): Promise<void>;
|
|
35
|
+
private mountQR;
|
|
36
|
+
private loadOptions;
|
|
37
|
+
private forceClose;
|
|
38
|
+
private mountValidationModal;
|
|
39
|
+
private mountQRCodeModal;
|
|
40
|
+
private processEmbeddedAppStart;
|
|
41
|
+
private processEmbeddedAppEnd;
|
|
42
|
+
private onError;
|
|
43
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ISuccessConfiguration } from './@types/Api/Responses';
|
|
2
|
+
import { IDVCConfig, IWrapperConfig, JSONString } 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: ISuccessConfiguration): void;
|
|
11
|
+
faceAuthorizationConfig(jsonSettings: JSONString): any;
|
|
12
|
+
set applicantId(applicantId: string);
|
|
13
|
+
get applicantId(): string;
|
|
14
|
+
get domainId(): string;
|
|
15
|
+
get publicKey(): string;
|
|
16
|
+
get domainApi(): string;
|
|
17
|
+
get onValidate(): (data: import("./@types/Data").IValidateCallbackData) => void;
|
|
18
|
+
get onError(): (data: import("./errors/WrapperError").default) => void;
|
|
19
|
+
get libConfig(): IDVCConfig;
|
|
20
|
+
set libConfig(config: IDVCConfig);
|
|
21
|
+
get cssStylesConfig(): string;
|
|
22
|
+
get cssVariablesConfig(): string;
|
|
23
|
+
get mountElement(): string;
|
|
24
|
+
get demoMode(): boolean;
|
|
25
|
+
get isAuth(): boolean;
|
|
26
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ICompletedApplicant } from '../@types/Api/Responses';
|
|
2
|
+
import WrapperError from './WrapperError';
|
|
3
|
+
export default class FaceAuthorizationError extends WrapperError {
|
|
4
|
+
constructor(error: ICompletedApplicant);
|
|
5
|
+
setHeader({ code }: ICompletedApplicant): void;
|
|
6
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import Fingerprint from '../../Fingerprinting/src/main';
|
|
2
|
+
import { INavigatorInfo } from '../../Fingerprinting/src/modules/browserInfo';
|
|
3
|
+
export declare const createFingerPrintModel: () => Promise<{
|
|
4
|
+
browserMetadata: {
|
|
5
|
+
screenInfo: Promise<{
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
|
+
availWidth: number;
|
|
9
|
+
availHeight: number;
|
|
10
|
+
colorDepth: number;
|
|
11
|
+
pixelDepth: number;
|
|
12
|
+
orientationAngle: number;
|
|
13
|
+
orientationType: OrientationType;
|
|
14
|
+
innerWidth: number;
|
|
15
|
+
innerHeight: number;
|
|
16
|
+
outerWidth: number;
|
|
17
|
+
outerHeight: number;
|
|
18
|
+
}>;
|
|
19
|
+
webGlInfo: ReturnType<typeof Fingerprint.webGLInfo>;
|
|
20
|
+
navigatorInfo: INavigatorInfo;
|
|
21
|
+
canvasInfo: Promise<string>;
|
|
22
|
+
connectionInfo: Promise<Record<string, never> | import("../../Fingerprinting/src/modules/connectionInfo").IConnection>;
|
|
23
|
+
html5Info: ReturnType<typeof Fingerprint.HTML5Info>;
|
|
24
|
+
browserInfo: Promise<{
|
|
25
|
+
internationalizationInfo: import("../../Fingerprinting/src/modules/browserInfo").InternationalizationInfo | Record<string, never>;
|
|
26
|
+
navigatorInfo: INavigatorInfo;
|
|
27
|
+
availableNavigatorApiInfo: Record<string, never> | Record<string, boolean>;
|
|
28
|
+
additionalApiInfo: Record<string, never> | Record<string, boolean>;
|
|
29
|
+
}>;
|
|
30
|
+
batteryInfo: Promise<Record<string, never> | import("../../Fingerprinting/src/modules/batteryInfo").IBattery>;
|
|
31
|
+
fontsInfo: Promise<{
|
|
32
|
+
availableFontsInfo: boolean[];
|
|
33
|
+
}>;
|
|
34
|
+
};
|
|
35
|
+
deviceMetadata: {
|
|
36
|
+
ip: string;
|
|
37
|
+
timeZone: string;
|
|
38
|
+
userLanguage: string;
|
|
39
|
+
};
|
|
40
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isString: (val: unknown) => val is string;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { IDVCConfig } 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 getFilteredConfiguration: (configuration: IDVCConfig) => {
|
|
8
|
+
documentTypes: {
|
|
9
|
+
type: import("../@types/IDVCTypes").DocumentTypeName;
|
|
10
|
+
steps: import("../@types/Step").IStepConfig[];
|
|
11
|
+
}[];
|
|
12
|
+
priority: string;
|
|
13
|
+
realFaceMode: import("../@types/IDVCTypes").RealFaceModeType;
|
|
14
|
+
steps: import("../@types/Step").IStepConfig[];
|
|
15
|
+
types: string[];
|
|
16
|
+
capturingMode: string;
|
|
17
|
+
resizeUploadedImage: number;
|
|
18
|
+
isShowManualSwitchButton: boolean;
|
|
19
|
+
showSubmitBtn: boolean;
|
|
20
|
+
enableLimitation: boolean;
|
|
21
|
+
autoContinue: boolean;
|
|
22
|
+
fixFrontOrientAfterUpload: boolean;
|
|
23
|
+
strictAllowedTypes: boolean;
|
|
24
|
+
useCDN: boolean;
|
|
25
|
+
isShowVersion: boolean;
|
|
26
|
+
showForceCapturingBtn: boolean;
|
|
27
|
+
isShowGuidlinesButton: boolean;
|
|
28
|
+
licenseKey: string;
|
|
29
|
+
el: string;
|
|
30
|
+
networkUrl: string;
|
|
31
|
+
chunkPublicPath?: string | undefined;
|
|
32
|
+
language: import("../@types/IDVCTypes").SupportedLanguage;
|
|
33
|
+
h_stepMode: import("../@types/Step").IStepMode;
|
|
34
|
+
isShowDocumentTypeSelect: boolean;
|
|
35
|
+
useHeic: boolean;
|
|
36
|
+
isShowGuidelinesButton: boolean;
|
|
37
|
+
isSubmitMetaData: boolean;
|
|
38
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
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
|
+
export { notEmptyString, isUUID, isPublicKey, isElExist, };
|
|
6
|
+
export type ValidateFunctions = typeof notEmptyString | typeof isUUID | typeof isPublicKey | typeof isElExist;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IValidationRequest } from '../@types/Api/Requests';
|
|
2
|
+
import { ICompletedApplicant, ISuccessConfiguration, ValidationApplicantResult } from '../@types/Api/Responses';
|
|
3
|
+
export default class Api {
|
|
4
|
+
private readonly baseUrl;
|
|
5
|
+
private readonly baseEmbeddedUrl;
|
|
6
|
+
private HEADERS;
|
|
7
|
+
constructor(publicKey: string, domainApi?: string);
|
|
8
|
+
checkApplicantIdIsNotClosed({ applicantId, demoMode, faceAuth, }: {
|
|
9
|
+
applicantId?: string | undefined;
|
|
10
|
+
demoMode?: boolean | undefined;
|
|
11
|
+
faceAuth?: boolean | undefined;
|
|
12
|
+
}): Promise<boolean> | never;
|
|
13
|
+
getOptions(integrationId: string): Promise<ISuccessConfiguration | never>;
|
|
14
|
+
validateApplicant(data: IValidationRequest, demoMode?: boolean, isFaceAuth?: boolean): ValidationApplicantResult;
|
|
15
|
+
forceClose(applicantId: string): Promise<ICompletedApplicant | never>;
|
|
16
|
+
longPollingRequest(url: string, init: RequestInit, callback: (data: any) => void): Promise<void>;
|
|
17
|
+
}
|