@privateid/ultrapass-web-sdk 1.3.1 → 1.3.2-1300478
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/README.md +75 -75
- package/dist/apiUtils.d.ts +46 -46
- package/dist/apiUtils.js +922 -922
- package/dist/application/index.d.ts +7 -7
- package/dist/application/index.js +27 -27
- package/dist/application/modules/core/document/DocumentService.d.ts +22 -22
- package/dist/application/modules/core/document/DocumentService.js +254 -254
- package/dist/application/modules/core/document/document.constants.d.ts +15 -15
- package/dist/application/modules/core/document/document.constants.js +21 -21
- package/dist/application/modules/core/document/document.domain.d.ts +7 -7
- package/dist/application/modules/core/document/document.domain.js +1 -1
- package/dist/application/modules/core/document/document.types.d.ts +17 -17
- package/dist/application/modules/core/document/document.types.js +1 -1
- package/dist/application/modules/core/document/document.utils.d.ts +3 -3
- package/dist/application/modules/core/document/document.utils.js +58 -58
- package/dist/application/modules/core/document/index.d.ts +3 -3
- package/dist/application/modules/core/document/index.js +1 -1
- package/dist/application/modules/core/face/FaceService.d.ts +33 -33
- package/dist/application/modules/core/face/FaceService.js +228 -221
- package/dist/application/modules/core/face/FaceService.js.map +1 -1
- package/dist/application/modules/core/face/face.constants.d.ts +53 -53
- package/dist/application/modules/core/face/face.constants.js +53 -53
- package/dist/application/modules/core/face/face.domain.d.ts +10 -10
- package/dist/application/modules/core/face/face.domain.js +1 -1
- package/dist/application/modules/core/face/face.types.d.ts +41 -38
- package/dist/application/modules/core/face/face.types.js +1 -1
- package/dist/application/modules/core/face/face.utils.d.ts +15 -15
- package/dist/application/modules/core/face/face.utils.js +101 -101
- package/dist/application/modules/core/face/index.d.ts +3 -3
- package/dist/application/modules/core/face/index.js +1 -1
- package/dist/application/modules/global/shared.constants.d.ts +2 -2
- package/dist/application/modules/global/shared.constants.js +2 -2
- package/dist/application/modules/global/shared.utils.d.ts +25 -25
- package/dist/application/modules/global/shared.utils.js +100 -100
- package/dist/application/modules/global/shared.utils.js.map +1 -1
- package/dist/application/modules/internal/feature-flag/LDFeatureFlagService.d.ts +9 -0
- package/dist/application/modules/internal/feature-flag/LDFeatureFlagService.js +32 -0
- package/dist/application/modules/internal/feature-flag/LDFeatureFlagService.js.map +1 -0
- package/dist/application/modules/internal/feature-flag/feature-flag-init.d.ts +11 -0
- package/dist/application/modules/internal/feature-flag/feature-flag-init.js +24 -0
- package/dist/application/modules/internal/feature-flag/feature-flag-init.js.map +1 -0
- package/dist/application/modules/internal/feature-flag/feature-flag.domain.d.ts +10 -0
- package/dist/application/modules/internal/feature-flag/feature-flag.domain.js +7 -0
- package/dist/application/modules/internal/feature-flag/feature-flag.domain.js.map +1 -0
- package/dist/application/modules/internal/feature-flag/featureFlagInit.d.ts +11 -0
- package/dist/application/modules/internal/feature-flag/featureFlagInit.js +44 -0
- package/dist/application/modules/internal/feature-flag/featureFlagInit.js.map +1 -0
- package/dist/application/modules/internal/feature-flag/index.d.ts +2 -0
- package/dist/application/modules/internal/feature-flag/index.js +3 -0
- package/dist/application/modules/internal/feature-flag/index.js.map +1 -0
- package/dist/application/modules/internal/shared/index.d.ts +2 -0
- package/dist/application/modules/internal/shared/index.js +3 -0
- package/dist/application/modules/internal/shared/index.js.map +1 -0
- package/dist/application/modules/internal/shared/shared.constants.d.ts +2 -0
- package/dist/application/modules/internal/shared/shared.constants.js +3 -0
- package/dist/application/modules/internal/shared/shared.constants.js.map +1 -0
- package/dist/application/modules/internal/shared/shared.utils.d.ts +44 -0
- package/dist/application/modules/internal/shared/shared.utils.js +204 -0
- package/dist/application/modules/internal/shared/shared.utils.js.map +1 -0
- package/dist/application/modules/internal/wasm-orchestrator/WasmOrchestratorService.d.ts +28 -0
- package/dist/application/modules/internal/wasm-orchestrator/WasmOrchestratorService.js +380 -0
- package/dist/application/modules/internal/wasm-orchestrator/WasmOrchestratorService.js.map +1 -0
- package/dist/application/modules/internal/wasm-orchestrator/index.d.ts +6 -0
- package/dist/application/modules/internal/wasm-orchestrator/index.js +9 -0
- package/dist/application/modules/internal/wasm-orchestrator/index.js.map +1 -0
- package/dist/application/modules/internal/wasm-orchestrator/wasm-orchestrator.constants.d.ts +28 -0
- package/dist/application/modules/internal/wasm-orchestrator/wasm-orchestrator.constants.js +35 -0
- package/dist/application/modules/internal/wasm-orchestrator/wasm-orchestrator.constants.js.map +1 -0
- package/dist/application/modules/internal/wasm-orchestrator/wasm-orchestrator.domain.d.ts +51 -0
- package/dist/application/modules/internal/wasm-orchestrator/wasm-orchestrator.domain.js +2 -0
- package/dist/application/modules/internal/wasm-orchestrator/wasm-orchestrator.domain.js.map +1 -0
- package/dist/application/modules/internal/wasm-orchestrator/wasm-orchestrator.types.d.ts +142 -0
- package/dist/application/modules/internal/wasm-orchestrator/wasm-orchestrator.types.js +2 -0
- package/dist/application/modules/internal/wasm-orchestrator/wasm-orchestrator.types.js.map +1 -0
- package/dist/application/modules/internal/wasm-orchestrator/wasm-orchestrator.utils.d.ts +86 -0
- package/dist/application/modules/internal/wasm-orchestrator/wasm-orchestrator.utils.js +201 -0
- package/dist/application/modules/internal/wasm-orchestrator/wasm-orchestrator.utils.js.map +1 -0
- package/dist/application/modules/support/camera/CameraServiceFactory.d.ts +10 -10
- package/dist/application/modules/support/camera/CameraServiceFactory.js +33 -33
- package/dist/application/modules/support/camera/CameraServiceFactory.js.map +1 -1
- package/dist/application/modules/support/camera/camera.constants.d.ts +9 -9
- package/dist/application/modules/support/camera/camera.constants.js +48 -48
- package/dist/application/modules/support/camera/camera.domain.d.ts +15 -15
- package/dist/application/modules/support/camera/camera.domain.js +1 -1
- package/dist/application/modules/support/camera/camera.types.d.ts +42 -42
- package/dist/application/modules/support/camera/camera.types.js +10 -10
- package/dist/application/modules/support/camera/camera.utils.d.ts +157 -157
- package/dist/application/modules/support/camera/camera.utils.js +623 -623
- package/dist/application/modules/support/camera/index.d.ts +24 -24
- package/dist/application/modules/support/camera/index.js +27 -27
- package/dist/application/modules/support/camera/services/BaseCameraService.d.ts +41 -41
- package/dist/application/modules/support/camera/services/BaseCameraService.js +278 -278
- package/dist/application/modules/support/camera/services/DesktopCameraService.d.ts +5 -5
- package/dist/application/modules/support/camera/services/DesktopCameraService.js +46 -46
- package/dist/application/modules/support/camera/services/FirefoxCameraService.d.ts +5 -5
- package/dist/application/modules/support/camera/services/FirefoxCameraService.js +46 -46
- package/dist/application/modules/support/camera/services/MacSafariCameraService.d.ts +5 -5
- package/dist/application/modules/support/camera/services/MacSafariCameraService.js +47 -47
- package/dist/application/modules/support/camera/services/MobileCameraService.d.ts +5 -5
- package/dist/application/modules/support/camera/services/MobileCameraService.js +133 -133
- package/dist/application/modules/support/engine/EngineService.d.ts +15 -0
- package/dist/application/modules/support/engine/EngineService.js +106 -0
- package/dist/application/modules/support/engine/EngineService.js.map +1 -0
- package/dist/application/modules/support/engine/engine.constants.d.ts +33 -0
- package/dist/application/modules/support/engine/engine.constants.js +35 -0
- package/dist/application/modules/support/engine/engine.constants.js.map +1 -0
- package/dist/application/modules/support/engine/engine.domain.d.ts +23 -0
- package/dist/application/modules/support/engine/engine.domain.js +2 -0
- package/dist/application/modules/support/engine/engine.domain.js.map +1 -0
- package/dist/application/modules/support/engine/engine.types.d.ts +32 -0
- package/dist/application/modules/support/engine/engine.types.js +2 -0
- package/dist/application/modules/support/engine/engine.types.js.map +1 -0
- package/dist/application/modules/support/engine/engine.utils.d.ts +65 -0
- package/dist/application/modules/support/engine/engine.utils.js +135 -0
- package/dist/application/modules/support/engine/engine.utils.js.map +1 -0
- package/dist/application/modules/support/engine/index.d.ts +3 -0
- package/dist/application/modules/support/engine/index.js +2 -0
- package/dist/application/modules/support/engine/index.js.map +1 -0
- package/dist/application/modules/support/permissions/PermissionsService.d.ts +55 -55
- package/dist/application/modules/support/permissions/PermissionsService.js +183 -183
- package/dist/application/modules/support/permissions/index.d.ts +4 -4
- package/dist/application/modules/support/permissions/index.js +2 -2
- package/dist/application/modules/support/permissions/permission.utils.d.ts +6 -6
- package/dist/application/modules/support/permissions/permission.utils.js +33 -33
- package/dist/application/modules/support/permissions/permissions.domain.d.ts +6 -6
- package/dist/application/modules/support/permissions/permissions.domain.js +1 -1
- package/dist/application/modules/support/permissions/permissions.types.d.ts +9 -9
- package/dist/application/modules/support/permissions/permissions.types.js +1 -1
- package/dist/application/modules/support/wasm/WasmService.d.ts +25 -25
- package/dist/application/modules/support/wasm/WasmService.js +156 -155
- package/dist/application/modules/support/wasm/WasmService.js.map +1 -1
- package/dist/application/modules/support/wasm/index.d.ts +6 -6
- package/dist/application/modules/support/wasm/index.js +8 -8
- package/dist/application/modules/support/wasm/wasm.constants.d.ts +78 -78
- package/dist/application/modules/support/wasm/wasm.constants.js +86 -86
- package/dist/application/modules/support/wasm/wasm.domain.d.ts +52 -52
- package/dist/application/modules/support/wasm/wasm.domain.js +1 -1
- package/dist/application/modules/support/wasm/wasm.types.d.ts +119 -118
- package/dist/application/modules/support/wasm/wasm.types.js +1 -1
- package/dist/application/modules/support/wasm/wasm.utils.d.ts +88 -88
- package/dist/application/modules/support/wasm/wasm.utils.js +243 -243
- package/dist/application/modules/support/wasm-orchestrator/WasmOrchestratorService.d.ts +28 -0
- package/dist/application/modules/support/wasm-orchestrator/WasmOrchestratorService.js +324 -0
- package/dist/application/modules/support/wasm-orchestrator/WasmOrchestratorService.js.map +1 -0
- package/dist/application/modules/support/wasm-orchestrator/index.d.ts +6 -0
- package/dist/application/modules/support/wasm-orchestrator/index.js +9 -0
- package/dist/application/modules/support/wasm-orchestrator/index.js.map +1 -0
- package/dist/application/modules/support/wasm-orchestrator/wasm-orchestrator.constants.d.ts +36 -0
- package/dist/application/modules/support/wasm-orchestrator/wasm-orchestrator.constants.js +44 -0
- package/dist/application/modules/support/wasm-orchestrator/wasm-orchestrator.constants.js.map +1 -0
- package/dist/application/modules/support/wasm-orchestrator/wasm-orchestrator.domain.d.ts +47 -0
- package/dist/application/modules/support/wasm-orchestrator/wasm-orchestrator.domain.js +2 -0
- package/dist/application/modules/support/wasm-orchestrator/wasm-orchestrator.domain.js.map +1 -0
- package/dist/application/modules/support/wasm-orchestrator/wasm-orchestrator.types.d.ts +136 -0
- package/dist/application/modules/support/wasm-orchestrator/wasm-orchestrator.types.js +2 -0
- package/dist/application/modules/support/wasm-orchestrator/wasm-orchestrator.types.js.map +1 -0
- package/dist/application/modules/support/wasm-orchestrator/wasm-orchestrator.utils.d.ts +91 -0
- package/dist/application/modules/support/wasm-orchestrator/wasm-orchestrator.utils.js +250 -0
- package/dist/application/modules/support/wasm-orchestrator/wasm-orchestrator.utils.js.map +1 -0
- package/dist/application/workers/index.d.ts +42 -42
- package/dist/application/workers/index.js +8 -8
- package/dist/application/workers/wasm/WasmWorkerService.d.ts +66 -0
- package/dist/application/workers/wasm/WasmWorkerService.js +801 -0
- package/dist/application/workers/wasm/WasmWorkerService.js.map +1 -0
- package/dist/application/workers/wasm/index.d.ts +4 -0
- package/dist/application/workers/wasm/index.js +9 -0
- package/dist/application/workers/wasm/index.js.map +1 -0
- package/dist/application/workers/wasm/wasm-worker.constants.d.ts +5 -0
- package/dist/application/workers/wasm/wasm-worker.constants.js +6 -0
- package/dist/application/workers/wasm/wasm-worker.constants.js.map +1 -0
- package/dist/application/workers/wasm/wasm-worker.domain.d.ts +99 -0
- package/dist/application/workers/wasm/wasm-worker.domain.js +2 -0
- package/dist/application/workers/wasm/wasm-worker.domain.js.map +1 -0
- package/dist/application/workers/wasm/wasm-worker.types.d.ts +88 -0
- package/dist/application/workers/wasm/wasm-worker.types.js +2 -0
- package/dist/application/workers/wasm/wasm-worker.types.js.map +1 -0
- package/dist/application/workers/wasm/wasm-worker.utils.d.ts +10 -0
- package/dist/application/workers/wasm/wasm-worker.utils.js +130 -0
- package/dist/application/workers/wasm/wasm-worker.utils.js.map +1 -0
- package/dist/buildConfig.d.ts +3 -0
- package/dist/buildConfig.js +7 -0
- package/dist/buildConfig.js.map +1 -0
- package/dist/cameraUtils.d.ts +77 -77
- package/dist/cameraUtils.js +361 -361
- package/dist/constants.d.ts +9 -9
- package/dist/constants.js +13 -13
- package/dist/createCallback.d.ts +56 -56
- package/dist/createCallback.js +332 -331
- package/dist/createCallback.js.map +1 -1
- package/dist/dbUtils.d.ts +14 -14
- package/dist/dbUtils.js +148 -148
- package/dist/envUtils.d.ts +4 -4
- package/dist/envUtils.js +16 -16
- package/dist/faceModule.d.ts +196 -196
- package/dist/faceModule.js +978 -978
- package/dist/featureFlagInit.d.ts +11 -0
- package/dist/featureFlagInit.js +44 -0
- package/dist/featureFlagInit.js.map +1 -0
- package/dist/index.d.ts +38 -38
- package/dist/index.js +82 -82
- package/dist/main.d.ts +30 -30
- package/dist/main.js +84 -84
- package/dist/types.d.ts +139 -139
- package/dist/types.js +77 -77
- package/dist/utils.d.ts +84 -84
- package/dist/utils.js +580 -580
- package/package.json +102 -102
- package/wasm/ultra/nosimd/{25.11.13-1357710 → 26.01.08-1300478}/privid_fhe_uber.js +18 -18
- package/wasm/ultra/nosimd/{25.11.13-1357710 → 26.01.08-1300478}/privid_fhe_uber.wasm +0 -0
- package/wasm/ultra/nosimd/version.json +2 -2
- package/wasm/ultra/simd/{25.11.13-1357710 → 26.01.08-1300478}/privid_fhe_uber.js +18 -18
- package/wasm/ultra/simd/{25.11.13-1357710 → 26.01.08-1300478}/privid_fhe_uber.wasm +0 -0
- package/wasm/ultra/simd/version.json +2 -2
- package/workers/comlink.min.js +7 -7
- package/workers/comlink.min.js.map +1 -1
- package/workers/wasm.worker.js +936 -924
package/dist/types.d.ts
CHANGED
|
@@ -1,139 +1,139 @@
|
|
|
1
|
-
export type Base64 = ArrayBuffer | string;
|
|
2
|
-
/**
|
|
3
|
-
* @enum
|
|
4
|
-
*/
|
|
5
|
-
export declare enum ImageType {
|
|
6
|
-
original = "original",
|
|
7
|
-
augmented = "augmented"
|
|
8
|
-
}
|
|
9
|
-
export declare enum CameraFaceMode {
|
|
10
|
-
front = "front",
|
|
11
|
-
back = "back"
|
|
12
|
-
}
|
|
13
|
-
export declare enum FacingMode {
|
|
14
|
-
face = "user",
|
|
15
|
-
environment = "environment"
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* @enum
|
|
19
|
-
*/
|
|
20
|
-
export declare enum FaceStatuses {
|
|
21
|
-
VALID_FACE = "VALID_FACE",
|
|
22
|
-
INVALID_FACE = "INVALID_FACE",
|
|
23
|
-
ENROLLING = "ENROLLING",
|
|
24
|
-
PREDICTING = "PREDICTING",
|
|
25
|
-
WASM_RESPONSE = "WASM_RESPONSE",
|
|
26
|
-
ERROR_ENROLL = "ERROR_ENROLL",
|
|
27
|
-
ERROR_PREDICT = "ERROR_PREDICT",
|
|
28
|
-
REDIRECT = "REDIRECT"
|
|
29
|
-
}
|
|
30
|
-
export declare enum VoiceStatuses {
|
|
31
|
-
SET_PHRASES = "SET_PHRASES",
|
|
32
|
-
SET_PROGRESS = "SET_PROGRESS",
|
|
33
|
-
START_RECORDING = "START_RECORDING",
|
|
34
|
-
RECORDING_DONE = "RECORDING_DONE",
|
|
35
|
-
PREDICTION_DONE = "PREDICTION_DONE"
|
|
36
|
-
}
|
|
37
|
-
export declare enum DocType {
|
|
38
|
-
PHOTO_ID_BACK = "PHOTO_ID_BACK",
|
|
39
|
-
PHOTO_ID_FRONT = "PHOTO_ID_FRONT"
|
|
40
|
-
}
|
|
41
|
-
export declare enum LOGTYPE {
|
|
42
|
-
ERROR = "ERROR",
|
|
43
|
-
LOG = "LOG",
|
|
44
|
-
WARN = "WARN"
|
|
45
|
-
}
|
|
46
|
-
export declare enum DLType {
|
|
47
|
-
FRONTDLORIGINAL = "frontDLoriginal",
|
|
48
|
-
FRONTDLHEADSHOT = "frontDLheadshot",
|
|
49
|
-
FRONTDLCROPPED = "frontDLcropped",
|
|
50
|
-
BACKDLORIGINAL = "backDLoriginal",
|
|
51
|
-
BACKDLBARCODE = "backDLbarcode",
|
|
52
|
-
BARCODEJSON = "barcodeJson"
|
|
53
|
-
}
|
|
54
|
-
export declare enum HCType {
|
|
55
|
-
FRONTHCORIGINAL = "frontHCoriginal",
|
|
56
|
-
FRONTHCCROPPED = "frontHCcropped",
|
|
57
|
-
FRONTHCDATA = "frontHCdata"
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* NPM: uploadDl({ id, type, image })
|
|
61
|
-
id (string): GAN token //Required
|
|
62
|
-
type: “frontDLoriginal”, “frontDLheadshot”, “frontDLcropped”, “backDLoriginal”, “backDLbarcode”
|
|
63
|
-
image: string // Base64 //Require
|
|
64
|
-
*/
|
|
65
|
-
export declare enum VerifyType {
|
|
66
|
-
PHONE = "phone",
|
|
67
|
-
EMAIL = "email"
|
|
68
|
-
}
|
|
69
|
-
declare global {
|
|
70
|
-
interface Window {
|
|
71
|
-
opera: any;
|
|
72
|
-
mozIndexedDB: any;
|
|
73
|
-
webkitIndexedDB: any;
|
|
74
|
-
msIndexedDB: any;
|
|
75
|
-
shimIndexedDB: any;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
export type WorkerFunctions = {
|
|
79
|
-
isLoad: (simd: boolean, url: any, session_token: string, public_key: string, debug_type: string, cacheConfig: boolean, timeout: number | null, useCdn: boolean, shouldRegenerateSession?: boolean, wasmFailureCallback?: any, usageScenario?: string, cacheContent?: string) => Promise<string>;
|
|
80
|
-
ultraPredict: (originalImages: Array<ImageData>, simd: boolean, config: string, cb: any) => Promise<{
|
|
81
|
-
result: number;
|
|
82
|
-
href: ImageData[];
|
|
83
|
-
}>;
|
|
84
|
-
ultraAgeEstimate: (imageData: Array<ImageData>, simd: boolean, config: string, cb: any) => Promise<{
|
|
85
|
-
result: number;
|
|
86
|
-
imageData: Uint8ClampedArray | null;
|
|
87
|
-
height: number | null;
|
|
88
|
-
width: number | null;
|
|
89
|
-
}>;
|
|
90
|
-
ultraEnroll: (imageData: ImageData, simd: boolean, config: string, cb: any) => Promise<{
|
|
91
|
-
result: number;
|
|
92
|
-
imageData: Uint8ClampedArray | null;
|
|
93
|
-
height: number | null;
|
|
94
|
-
width: number | null;
|
|
95
|
-
}>;
|
|
96
|
-
compareEmbeddings: () => Promise<{
|
|
97
|
-
result: number;
|
|
98
|
-
imageData: Uint8ClampedArray | null;
|
|
99
|
-
height: number | null;
|
|
100
|
-
width: number | null;
|
|
101
|
-
}>;
|
|
102
|
-
pkiEncrypt: (payload: string) => Promise<{
|
|
103
|
-
call_status: {
|
|
104
|
-
return_status: number;
|
|
105
|
-
operation_tag: string;
|
|
106
|
-
return_message: string;
|
|
107
|
-
mf_token: string;
|
|
108
|
-
operation_id: number;
|
|
109
|
-
operation_type_id: number;
|
|
110
|
-
};
|
|
111
|
-
uber_operation_result: {
|
|
112
|
-
request: (string | null)[];
|
|
113
|
-
};
|
|
114
|
-
}>;
|
|
115
|
-
checkIfModelsLoaded: (isEnroll: boolean) => Promise<number>;
|
|
116
|
-
freeMemory: () => Promise<boolean>;
|
|
117
|
-
ultraScanFrontDocument: (inputImage: ImageData, simd: boolean, config: string, cb: any) => Promise<{
|
|
118
|
-
[x: string]: any;
|
|
119
|
-
}>;
|
|
120
|
-
ultraScanBackDocument: (inputImage: ImageData, simd: boolean, config: string, cb: any) => Promise<{
|
|
121
|
-
[x: string]: any;
|
|
122
|
-
}>;
|
|
123
|
-
ultraCompareEmbeddings: (encryptedEmbeddingsA: string, encryptedEmbeddingsB: string, config: any, cb: any) => Promise<{
|
|
124
|
-
result: number;
|
|
125
|
-
imageData: Uint8ClampedArray | null;
|
|
126
|
-
height: number | null;
|
|
127
|
-
width: number | null;
|
|
128
|
-
}>;
|
|
129
|
-
ultraDocumentOcr: (inputImage: string, config: string, cb: any) => Promise<{
|
|
130
|
-
[x: string]: any;
|
|
131
|
-
}>;
|
|
132
|
-
};
|
|
133
|
-
export interface verificationSessionPayload {
|
|
134
|
-
successUrl?: string;
|
|
135
|
-
failureUrl?: string;
|
|
136
|
-
type?: string;
|
|
137
|
-
productGroupId?: string;
|
|
138
|
-
}
|
|
139
|
-
export type ScreenOrientation = 'landscape' | 'portrait';
|
|
1
|
+
export type Base64 = ArrayBuffer | string;
|
|
2
|
+
/**
|
|
3
|
+
* @enum
|
|
4
|
+
*/
|
|
5
|
+
export declare enum ImageType {
|
|
6
|
+
original = "original",
|
|
7
|
+
augmented = "augmented"
|
|
8
|
+
}
|
|
9
|
+
export declare enum CameraFaceMode {
|
|
10
|
+
front = "front",
|
|
11
|
+
back = "back"
|
|
12
|
+
}
|
|
13
|
+
export declare enum FacingMode {
|
|
14
|
+
face = "user",
|
|
15
|
+
environment = "environment"
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @enum
|
|
19
|
+
*/
|
|
20
|
+
export declare enum FaceStatuses {
|
|
21
|
+
VALID_FACE = "VALID_FACE",
|
|
22
|
+
INVALID_FACE = "INVALID_FACE",
|
|
23
|
+
ENROLLING = "ENROLLING",
|
|
24
|
+
PREDICTING = "PREDICTING",
|
|
25
|
+
WASM_RESPONSE = "WASM_RESPONSE",
|
|
26
|
+
ERROR_ENROLL = "ERROR_ENROLL",
|
|
27
|
+
ERROR_PREDICT = "ERROR_PREDICT",
|
|
28
|
+
REDIRECT = "REDIRECT"
|
|
29
|
+
}
|
|
30
|
+
export declare enum VoiceStatuses {
|
|
31
|
+
SET_PHRASES = "SET_PHRASES",
|
|
32
|
+
SET_PROGRESS = "SET_PROGRESS",
|
|
33
|
+
START_RECORDING = "START_RECORDING",
|
|
34
|
+
RECORDING_DONE = "RECORDING_DONE",
|
|
35
|
+
PREDICTION_DONE = "PREDICTION_DONE"
|
|
36
|
+
}
|
|
37
|
+
export declare enum DocType {
|
|
38
|
+
PHOTO_ID_BACK = "PHOTO_ID_BACK",
|
|
39
|
+
PHOTO_ID_FRONT = "PHOTO_ID_FRONT"
|
|
40
|
+
}
|
|
41
|
+
export declare enum LOGTYPE {
|
|
42
|
+
ERROR = "ERROR",
|
|
43
|
+
LOG = "LOG",
|
|
44
|
+
WARN = "WARN"
|
|
45
|
+
}
|
|
46
|
+
export declare enum DLType {
|
|
47
|
+
FRONTDLORIGINAL = "frontDLoriginal",
|
|
48
|
+
FRONTDLHEADSHOT = "frontDLheadshot",
|
|
49
|
+
FRONTDLCROPPED = "frontDLcropped",
|
|
50
|
+
BACKDLORIGINAL = "backDLoriginal",
|
|
51
|
+
BACKDLBARCODE = "backDLbarcode",
|
|
52
|
+
BARCODEJSON = "barcodeJson"
|
|
53
|
+
}
|
|
54
|
+
export declare enum HCType {
|
|
55
|
+
FRONTHCORIGINAL = "frontHCoriginal",
|
|
56
|
+
FRONTHCCROPPED = "frontHCcropped",
|
|
57
|
+
FRONTHCDATA = "frontHCdata"
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* NPM: uploadDl({ id, type, image })
|
|
61
|
+
id (string): GAN token //Required
|
|
62
|
+
type: “frontDLoriginal”, “frontDLheadshot”, “frontDLcropped”, “backDLoriginal”, “backDLbarcode”
|
|
63
|
+
image: string // Base64 //Require
|
|
64
|
+
*/
|
|
65
|
+
export declare enum VerifyType {
|
|
66
|
+
PHONE = "phone",
|
|
67
|
+
EMAIL = "email"
|
|
68
|
+
}
|
|
69
|
+
declare global {
|
|
70
|
+
interface Window {
|
|
71
|
+
opera: any;
|
|
72
|
+
mozIndexedDB: any;
|
|
73
|
+
webkitIndexedDB: any;
|
|
74
|
+
msIndexedDB: any;
|
|
75
|
+
shimIndexedDB: any;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
export type WorkerFunctions = {
|
|
79
|
+
isLoad: (simd: boolean, url: any, session_token: string, public_key: string, debug_type: string, cacheConfig: boolean, timeout: number | null, useCdn: boolean, shouldRegenerateSession?: boolean, wasmFailureCallback?: any, usageScenario?: string, cacheContent?: string) => Promise<string>;
|
|
80
|
+
ultraPredict: (originalImages: Array<ImageData>, simd: boolean, config: string, cb: any) => Promise<{
|
|
81
|
+
result: number;
|
|
82
|
+
href: ImageData[];
|
|
83
|
+
}>;
|
|
84
|
+
ultraAgeEstimate: (imageData: Array<ImageData>, simd: boolean, config: string, cb: any) => Promise<{
|
|
85
|
+
result: number;
|
|
86
|
+
imageData: Uint8ClampedArray | null;
|
|
87
|
+
height: number | null;
|
|
88
|
+
width: number | null;
|
|
89
|
+
}>;
|
|
90
|
+
ultraEnroll: (imageData: ImageData, simd: boolean, config: string, cb: any) => Promise<{
|
|
91
|
+
result: number;
|
|
92
|
+
imageData: Uint8ClampedArray | null;
|
|
93
|
+
height: number | null;
|
|
94
|
+
width: number | null;
|
|
95
|
+
}>;
|
|
96
|
+
compareEmbeddings: () => Promise<{
|
|
97
|
+
result: number;
|
|
98
|
+
imageData: Uint8ClampedArray | null;
|
|
99
|
+
height: number | null;
|
|
100
|
+
width: number | null;
|
|
101
|
+
}>;
|
|
102
|
+
pkiEncrypt: (payload: string) => Promise<{
|
|
103
|
+
call_status: {
|
|
104
|
+
return_status: number;
|
|
105
|
+
operation_tag: string;
|
|
106
|
+
return_message: string;
|
|
107
|
+
mf_token: string;
|
|
108
|
+
operation_id: number;
|
|
109
|
+
operation_type_id: number;
|
|
110
|
+
};
|
|
111
|
+
uber_operation_result: {
|
|
112
|
+
request: (string | null)[];
|
|
113
|
+
};
|
|
114
|
+
}>;
|
|
115
|
+
checkIfModelsLoaded: (isEnroll: boolean) => Promise<number>;
|
|
116
|
+
freeMemory: () => Promise<boolean>;
|
|
117
|
+
ultraScanFrontDocument: (inputImage: ImageData, simd: boolean, config: string, cb: any) => Promise<{
|
|
118
|
+
[x: string]: any;
|
|
119
|
+
}>;
|
|
120
|
+
ultraScanBackDocument: (inputImage: ImageData, simd: boolean, config: string, cb: any) => Promise<{
|
|
121
|
+
[x: string]: any;
|
|
122
|
+
}>;
|
|
123
|
+
ultraCompareEmbeddings: (encryptedEmbeddingsA: string, encryptedEmbeddingsB: string, config: any, cb: any) => Promise<{
|
|
124
|
+
result: number;
|
|
125
|
+
imageData: Uint8ClampedArray | null;
|
|
126
|
+
height: number | null;
|
|
127
|
+
width: number | null;
|
|
128
|
+
}>;
|
|
129
|
+
ultraDocumentOcr: (inputImage: string, config: string, cb: any) => Promise<{
|
|
130
|
+
[x: string]: any;
|
|
131
|
+
}>;
|
|
132
|
+
};
|
|
133
|
+
export interface verificationSessionPayload {
|
|
134
|
+
successUrl?: string;
|
|
135
|
+
failureUrl?: string;
|
|
136
|
+
type?: string;
|
|
137
|
+
productGroupId?: string;
|
|
138
|
+
}
|
|
139
|
+
export type ScreenOrientation = 'landscape' | 'portrait';
|
package/dist/types.js
CHANGED
|
@@ -1,78 +1,78 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @enum
|
|
3
|
-
*/
|
|
4
|
-
export var ImageType;
|
|
5
|
-
(function (ImageType) {
|
|
6
|
-
ImageType["original"] = "original";
|
|
7
|
-
ImageType["augmented"] = "augmented";
|
|
8
|
-
})(ImageType || (ImageType = {}));
|
|
9
|
-
export var CameraFaceMode;
|
|
10
|
-
(function (CameraFaceMode) {
|
|
11
|
-
CameraFaceMode["front"] = "front";
|
|
12
|
-
CameraFaceMode["back"] = "back";
|
|
13
|
-
})(CameraFaceMode || (CameraFaceMode = {}));
|
|
14
|
-
export var FacingMode;
|
|
15
|
-
(function (FacingMode) {
|
|
16
|
-
FacingMode["face"] = "user";
|
|
17
|
-
FacingMode["environment"] = "environment";
|
|
18
|
-
})(FacingMode || (FacingMode = {}));
|
|
19
|
-
/**
|
|
20
|
-
* @enum
|
|
21
|
-
*/
|
|
22
|
-
export var FaceStatuses;
|
|
23
|
-
(function (FaceStatuses) {
|
|
24
|
-
FaceStatuses["VALID_FACE"] = "VALID_FACE";
|
|
25
|
-
FaceStatuses["INVALID_FACE"] = "INVALID_FACE";
|
|
26
|
-
FaceStatuses["ENROLLING"] = "ENROLLING";
|
|
27
|
-
FaceStatuses["PREDICTING"] = "PREDICTING";
|
|
28
|
-
FaceStatuses["WASM_RESPONSE"] = "WASM_RESPONSE";
|
|
29
|
-
FaceStatuses["ERROR_ENROLL"] = "ERROR_ENROLL";
|
|
30
|
-
FaceStatuses["ERROR_PREDICT"] = "ERROR_PREDICT";
|
|
31
|
-
FaceStatuses["REDIRECT"] = "REDIRECT";
|
|
32
|
-
})(FaceStatuses || (FaceStatuses = {}));
|
|
33
|
-
export var VoiceStatuses;
|
|
34
|
-
(function (VoiceStatuses) {
|
|
35
|
-
VoiceStatuses["SET_PHRASES"] = "SET_PHRASES";
|
|
36
|
-
VoiceStatuses["SET_PROGRESS"] = "SET_PROGRESS";
|
|
37
|
-
VoiceStatuses["START_RECORDING"] = "START_RECORDING";
|
|
38
|
-
VoiceStatuses["RECORDING_DONE"] = "RECORDING_DONE";
|
|
39
|
-
VoiceStatuses["PREDICTION_DONE"] = "PREDICTION_DONE";
|
|
40
|
-
})(VoiceStatuses || (VoiceStatuses = {}));
|
|
41
|
-
export var DocType;
|
|
42
|
-
(function (DocType) {
|
|
43
|
-
DocType["PHOTO_ID_BACK"] = "PHOTO_ID_BACK";
|
|
44
|
-
DocType["PHOTO_ID_FRONT"] = "PHOTO_ID_FRONT";
|
|
45
|
-
})(DocType || (DocType = {}));
|
|
46
|
-
export var LOGTYPE;
|
|
47
|
-
(function (LOGTYPE) {
|
|
48
|
-
LOGTYPE["ERROR"] = "ERROR";
|
|
49
|
-
LOGTYPE["LOG"] = "LOG";
|
|
50
|
-
LOGTYPE["WARN"] = "WARN";
|
|
51
|
-
})(LOGTYPE || (LOGTYPE = {}));
|
|
52
|
-
export var DLType;
|
|
53
|
-
(function (DLType) {
|
|
54
|
-
DLType["FRONTDLORIGINAL"] = "frontDLoriginal";
|
|
55
|
-
DLType["FRONTDLHEADSHOT"] = "frontDLheadshot";
|
|
56
|
-
DLType["FRONTDLCROPPED"] = "frontDLcropped";
|
|
57
|
-
DLType["BACKDLORIGINAL"] = "backDLoriginal";
|
|
58
|
-
DLType["BACKDLBARCODE"] = "backDLbarcode";
|
|
59
|
-
DLType["BARCODEJSON"] = "barcodeJson";
|
|
60
|
-
})(DLType || (DLType = {}));
|
|
61
|
-
export var HCType;
|
|
62
|
-
(function (HCType) {
|
|
63
|
-
HCType["FRONTHCORIGINAL"] = "frontHCoriginal";
|
|
64
|
-
HCType["FRONTHCCROPPED"] = "frontHCcropped";
|
|
65
|
-
HCType["FRONTHCDATA"] = "frontHCdata";
|
|
66
|
-
})(HCType || (HCType = {}));
|
|
67
|
-
/**
|
|
68
|
-
* NPM: uploadDl({ id, type, image })
|
|
69
|
-
id (string): GAN token //Required
|
|
70
|
-
type: “frontDLoriginal”, “frontDLheadshot”, “frontDLcropped”, “backDLoriginal”, “backDLbarcode”
|
|
71
|
-
image: string // Base64 //Require
|
|
72
|
-
*/
|
|
73
|
-
export var VerifyType;
|
|
74
|
-
(function (VerifyType) {
|
|
75
|
-
VerifyType["PHONE"] = "phone";
|
|
76
|
-
VerifyType["EMAIL"] = "email";
|
|
77
|
-
})(VerifyType || (VerifyType = {}));
|
|
1
|
+
/**
|
|
2
|
+
* @enum
|
|
3
|
+
*/
|
|
4
|
+
export var ImageType;
|
|
5
|
+
(function (ImageType) {
|
|
6
|
+
ImageType["original"] = "original";
|
|
7
|
+
ImageType["augmented"] = "augmented";
|
|
8
|
+
})(ImageType || (ImageType = {}));
|
|
9
|
+
export var CameraFaceMode;
|
|
10
|
+
(function (CameraFaceMode) {
|
|
11
|
+
CameraFaceMode["front"] = "front";
|
|
12
|
+
CameraFaceMode["back"] = "back";
|
|
13
|
+
})(CameraFaceMode || (CameraFaceMode = {}));
|
|
14
|
+
export var FacingMode;
|
|
15
|
+
(function (FacingMode) {
|
|
16
|
+
FacingMode["face"] = "user";
|
|
17
|
+
FacingMode["environment"] = "environment";
|
|
18
|
+
})(FacingMode || (FacingMode = {}));
|
|
19
|
+
/**
|
|
20
|
+
* @enum
|
|
21
|
+
*/
|
|
22
|
+
export var FaceStatuses;
|
|
23
|
+
(function (FaceStatuses) {
|
|
24
|
+
FaceStatuses["VALID_FACE"] = "VALID_FACE";
|
|
25
|
+
FaceStatuses["INVALID_FACE"] = "INVALID_FACE";
|
|
26
|
+
FaceStatuses["ENROLLING"] = "ENROLLING";
|
|
27
|
+
FaceStatuses["PREDICTING"] = "PREDICTING";
|
|
28
|
+
FaceStatuses["WASM_RESPONSE"] = "WASM_RESPONSE";
|
|
29
|
+
FaceStatuses["ERROR_ENROLL"] = "ERROR_ENROLL";
|
|
30
|
+
FaceStatuses["ERROR_PREDICT"] = "ERROR_PREDICT";
|
|
31
|
+
FaceStatuses["REDIRECT"] = "REDIRECT";
|
|
32
|
+
})(FaceStatuses || (FaceStatuses = {}));
|
|
33
|
+
export var VoiceStatuses;
|
|
34
|
+
(function (VoiceStatuses) {
|
|
35
|
+
VoiceStatuses["SET_PHRASES"] = "SET_PHRASES";
|
|
36
|
+
VoiceStatuses["SET_PROGRESS"] = "SET_PROGRESS";
|
|
37
|
+
VoiceStatuses["START_RECORDING"] = "START_RECORDING";
|
|
38
|
+
VoiceStatuses["RECORDING_DONE"] = "RECORDING_DONE";
|
|
39
|
+
VoiceStatuses["PREDICTION_DONE"] = "PREDICTION_DONE";
|
|
40
|
+
})(VoiceStatuses || (VoiceStatuses = {}));
|
|
41
|
+
export var DocType;
|
|
42
|
+
(function (DocType) {
|
|
43
|
+
DocType["PHOTO_ID_BACK"] = "PHOTO_ID_BACK";
|
|
44
|
+
DocType["PHOTO_ID_FRONT"] = "PHOTO_ID_FRONT";
|
|
45
|
+
})(DocType || (DocType = {}));
|
|
46
|
+
export var LOGTYPE;
|
|
47
|
+
(function (LOGTYPE) {
|
|
48
|
+
LOGTYPE["ERROR"] = "ERROR";
|
|
49
|
+
LOGTYPE["LOG"] = "LOG";
|
|
50
|
+
LOGTYPE["WARN"] = "WARN";
|
|
51
|
+
})(LOGTYPE || (LOGTYPE = {}));
|
|
52
|
+
export var DLType;
|
|
53
|
+
(function (DLType) {
|
|
54
|
+
DLType["FRONTDLORIGINAL"] = "frontDLoriginal";
|
|
55
|
+
DLType["FRONTDLHEADSHOT"] = "frontDLheadshot";
|
|
56
|
+
DLType["FRONTDLCROPPED"] = "frontDLcropped";
|
|
57
|
+
DLType["BACKDLORIGINAL"] = "backDLoriginal";
|
|
58
|
+
DLType["BACKDLBARCODE"] = "backDLbarcode";
|
|
59
|
+
DLType["BARCODEJSON"] = "barcodeJson";
|
|
60
|
+
})(DLType || (DLType = {}));
|
|
61
|
+
export var HCType;
|
|
62
|
+
(function (HCType) {
|
|
63
|
+
HCType["FRONTHCORIGINAL"] = "frontHCoriginal";
|
|
64
|
+
HCType["FRONTHCCROPPED"] = "frontHCcropped";
|
|
65
|
+
HCType["FRONTHCDATA"] = "frontHCdata";
|
|
66
|
+
})(HCType || (HCType = {}));
|
|
67
|
+
/**
|
|
68
|
+
* NPM: uploadDl({ id, type, image })
|
|
69
|
+
id (string): GAN token //Required
|
|
70
|
+
type: “frontDLoriginal”, “frontDLheadshot”, “frontDLcropped”, “backDLoriginal”, “backDLbarcode”
|
|
71
|
+
image: string // Base64 //Require
|
|
72
|
+
*/
|
|
73
|
+
export var VerifyType;
|
|
74
|
+
(function (VerifyType) {
|
|
75
|
+
VerifyType["PHONE"] = "phone";
|
|
76
|
+
VerifyType["EMAIL"] = "email";
|
|
77
|
+
})(VerifyType || (VerifyType = {}));
|
|
78
78
|
//# sourceMappingURL=types.js.map
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,84 +1,84 @@
|
|
|
1
|
-
import { Base64, ScreenOrientation } from './types';
|
|
2
|
-
export declare const isLoad: (simd: boolean, url: any, session_token: string, public_key: string, debug_type: string, cacheConfig: boolean, timeout: number, useCdn: boolean, shouldRegenerateSession?: boolean, wasmFailureCallback?: any, usageScenario?: string, cacheContent?: string) => Promise<string>, ultraEnroll: (imageData: ImageData, simd: boolean, config: string, cb: any) => Promise<{
|
|
3
|
-
result: number;
|
|
4
|
-
imageData: Uint8ClampedArray;
|
|
5
|
-
height: number;
|
|
6
|
-
width: number;
|
|
7
|
-
}>, ultraPredict: (originalImages: ImageData[], simd: boolean, config: string, cb: any) => Promise<{
|
|
8
|
-
result: number;
|
|
9
|
-
href: ImageData[];
|
|
10
|
-
}>, compareEmbeddings: () => Promise<{
|
|
11
|
-
result: number;
|
|
12
|
-
imageData: Uint8ClampedArray;
|
|
13
|
-
height: number;
|
|
14
|
-
width: number;
|
|
15
|
-
}>, pkiEncrypt: (payload: string) => Promise<{
|
|
16
|
-
call_status: {
|
|
17
|
-
return_status: number;
|
|
18
|
-
operation_tag: string;
|
|
19
|
-
return_message: string;
|
|
20
|
-
mf_token: string;
|
|
21
|
-
operation_id: number;
|
|
22
|
-
operation_type_id: number;
|
|
23
|
-
};
|
|
24
|
-
uber_operation_result: {
|
|
25
|
-
request: string[];
|
|
26
|
-
};
|
|
27
|
-
}>, checkIfModelsLoaded: (isEnroll: boolean) => Promise<number>, ultraScanBackDocument: (inputImage: ImageData, simd: boolean, config: string, cb: any) => Promise<{
|
|
28
|
-
[x: string]: any;
|
|
29
|
-
}>, ultraScanFrontDocument: (inputImage: ImageData, simd: boolean, config: string, cb: any) => Promise<{
|
|
30
|
-
[x: string]: any;
|
|
31
|
-
}>, ultraCompareEmbeddings: (encryptedEmbeddingsA: string, encryptedEmbeddingsB: string, config: any, cb: any) => Promise<{
|
|
32
|
-
result: number;
|
|
33
|
-
imageData: Uint8ClampedArray;
|
|
34
|
-
height: number;
|
|
35
|
-
width: number;
|
|
36
|
-
}>, ultraAgeEstimate: (imageData: ImageData[], simd: boolean, config: string, cb: any) => Promise<{
|
|
37
|
-
result: number;
|
|
38
|
-
imageData: Uint8ClampedArray;
|
|
39
|
-
height: number;
|
|
40
|
-
width: number;
|
|
41
|
-
}>, ultraDocumentOcr: (inputImage: string, config: string, cb: any) => Promise<{
|
|
42
|
-
[x: string]: any;
|
|
43
|
-
}>, freeMemory: () => Promise<boolean>;
|
|
44
|
-
export declare function iOS(): boolean;
|
|
45
|
-
export declare function isMobileFunc(): boolean;
|
|
46
|
-
export declare const getIsSIMD: () => Promise<boolean>;
|
|
47
|
-
export declare const getUrlParameter: (sParam: string, defaultValue: string) => string;
|
|
48
|
-
/**
|
|
49
|
-
* This function does the printing in the console based on the type and will only print based on @param debugType
|
|
50
|
-
* Please make sure to use this so that logs on the module would only print depending on the debug level
|
|
51
|
-
* @param title title of the printing. sample console.log(tiltle, message)
|
|
52
|
-
* @param message message of the printing. sample console.log(tiltle, message) if this is not needed just throw an empy string. sample: printLogs(title, '', debugType)
|
|
53
|
-
* @param debugType this variable will determine the type of printing in the console
|
|
54
|
-
* @param type this variable will determing the type of printing in the console, "LOG", "WARNING" or "ERROR" by default it is "LOG"
|
|
55
|
-
*/
|
|
56
|
-
export declare const getDebugType: () => string;
|
|
57
|
-
export declare const printLogs: (message: string, data: any, type?: string) => void;
|
|
58
|
-
export declare const getPortraitBase64: (content: ImageData) => Promise<Base64>;
|
|
59
|
-
export declare const createImages: (images: Array<ImageData | string>, title: string, action: boolean) => Promise<void>;
|
|
60
|
-
export declare function blobToBase64(blob: Blob): Promise<Base64>;
|
|
61
|
-
export declare const wait: (timeout: number) => Promise<unknown>;
|
|
62
|
-
export declare const arrayToTextDownload: (data: Array<string>, filename: string) => void;
|
|
63
|
-
export declare function setDefaultCameraDeviceId(deviceId: string): void;
|
|
64
|
-
export declare function getDefaultCameraDeviceId(): string;
|
|
65
|
-
export declare const convertCroppedImage: (croppedBarcode: any, cropImageWidth: number, cropImageHeight: number) => Promise<string>;
|
|
66
|
-
export declare const isMobileDevice: () => boolean;
|
|
67
|
-
export declare enum MessageType {
|
|
68
|
-
faceValidation = "Face Validation",
|
|
69
|
-
antispoofStatus = "Antispoof Status"
|
|
70
|
-
}
|
|
71
|
-
export declare const getStatusMessage: (result: number, type?: MessageType) => "" | "Processing hold still" | "Please move back" | "Please move closer" | "Move slightly left" | "Move slightly right" | "Move down" | "Move up" | "Please hold still" | "Remove glasses" | "Remove mask " | "Please look at camera" | "Raise phone level to face" | "Move your chin down" | "Lower phone level to face" | "Move your chin up" | "Too dim - increase lighting" | "Too bright - lower lighting" | "Please close mouth" | "Keep your head straight" | "Face mask and glasses detected" | "Align your face with the white oval" | "Center your face in the circle" | "Looking for face";
|
|
72
|
-
export declare const getRawFaceValidationStatus: (status: number) => "" | "Face mask and glasses detected" | "No Face" | "Valid Face" | "Image Spoof" | "Video Spoof" | "Too Close" | "Too far away" | "Too far to right" | "Too far to left" | "Too far up" | "Too far down" | "Too blurry" | "Glasses on" | "Mask on" | "Chin too far left" | "Chin too far right" | "Chin too far up" | "Chin too far down" | "Image too dim" | "Image too bright" | "Face low confidence value" | "Invalid face background" | "Eyes blink" | "Mouth Open" | "Face rotated right" | "Face rotated left" | "-100 Invalid Image";
|
|
73
|
-
export declare const getRawSpoofStatusMessage: (status: number) => "" | "Generic Error" | "Invalid Face" | "Face Too Close To Edge" | "Mobile Phone Detected" | "No Face Detected" | "Real" | "Spoof Detected";
|
|
74
|
-
export declare const checkPackageSupport: () => Promise<{
|
|
75
|
-
support: boolean;
|
|
76
|
-
message?: string;
|
|
77
|
-
}>;
|
|
78
|
-
export declare const getDocumentValidationStatusMessage: (result: number, isPassport?: boolean) => "" | "Please hold still" | "SYSTEM ERROR. Please try again later." | "Please show ID at the center of the screen" | "Please show identity page at the center of the screen" | "Move back a little" | "Move just a little closer" | "Please remove finger blocking document";
|
|
79
|
-
export declare const getBarcodeValidationStatusMessage: (result: number) => "" | "Barcode not detected" | "Success" | "Unsupported barcode detected" | "Unable to parse barcode data";
|
|
80
|
-
export declare const getFrontDocumentStatusMessage: (result: number) => "" | "Please hold still" | "SYSTEM ERROR. Please try again later." | "Please show ID at the center of the screen" | "Move just a little closer" | "Please remove finger blocking document" | "Success" | "Please show front of the ID";
|
|
81
|
-
export declare const getPassporttStatusMessage: (result: number) => "" | "Please hold still" | "SYSTEM ERROR. Please try again later." | "Please show identity page at the center of the screen" | "Move just a little closer" | "Please remove finger blocking document" | "Success";
|
|
82
|
-
export declare const getBackDocumentStatusMessage: (result: number) => "" | "SYSTEM ERROR. Please try again later." | "Please show ID at the center of the screen" | "Move just a little closer" | "Please remove finger blocking document" | "Success" | "Move the barcode closer" | "Please move the barcode closer" | "Please show barcode in the box";
|
|
83
|
-
export declare function getScreenOrientation(): ScreenOrientation;
|
|
84
|
-
export declare function convertPngBase64ToJpegBase64(pngBase64: string, maxWidth?: number, maxHeight?: number, quality?: number): Promise<unknown>;
|
|
1
|
+
import { Base64, ScreenOrientation } from './types';
|
|
2
|
+
export declare const isLoad: (simd: boolean, url: any, session_token: string, public_key: string, debug_type: string, cacheConfig: boolean, timeout: number, useCdn: boolean, shouldRegenerateSession?: boolean, wasmFailureCallback?: any, usageScenario?: string, cacheContent?: string) => Promise<string>, ultraEnroll: (imageData: ImageData, simd: boolean, config: string, cb: any) => Promise<{
|
|
3
|
+
result: number;
|
|
4
|
+
imageData: Uint8ClampedArray;
|
|
5
|
+
height: number;
|
|
6
|
+
width: number;
|
|
7
|
+
}>, ultraPredict: (originalImages: ImageData[], simd: boolean, config: string, cb: any) => Promise<{
|
|
8
|
+
result: number;
|
|
9
|
+
href: ImageData[];
|
|
10
|
+
}>, compareEmbeddings: () => Promise<{
|
|
11
|
+
result: number;
|
|
12
|
+
imageData: Uint8ClampedArray;
|
|
13
|
+
height: number;
|
|
14
|
+
width: number;
|
|
15
|
+
}>, pkiEncrypt: (payload: string) => Promise<{
|
|
16
|
+
call_status: {
|
|
17
|
+
return_status: number;
|
|
18
|
+
operation_tag: string;
|
|
19
|
+
return_message: string;
|
|
20
|
+
mf_token: string;
|
|
21
|
+
operation_id: number;
|
|
22
|
+
operation_type_id: number;
|
|
23
|
+
};
|
|
24
|
+
uber_operation_result: {
|
|
25
|
+
request: string[];
|
|
26
|
+
};
|
|
27
|
+
}>, checkIfModelsLoaded: (isEnroll: boolean) => Promise<number>, ultraScanBackDocument: (inputImage: ImageData, simd: boolean, config: string, cb: any) => Promise<{
|
|
28
|
+
[x: string]: any;
|
|
29
|
+
}>, ultraScanFrontDocument: (inputImage: ImageData, simd: boolean, config: string, cb: any) => Promise<{
|
|
30
|
+
[x: string]: any;
|
|
31
|
+
}>, ultraCompareEmbeddings: (encryptedEmbeddingsA: string, encryptedEmbeddingsB: string, config: any, cb: any) => Promise<{
|
|
32
|
+
result: number;
|
|
33
|
+
imageData: Uint8ClampedArray;
|
|
34
|
+
height: number;
|
|
35
|
+
width: number;
|
|
36
|
+
}>, ultraAgeEstimate: (imageData: ImageData[], simd: boolean, config: string, cb: any) => Promise<{
|
|
37
|
+
result: number;
|
|
38
|
+
imageData: Uint8ClampedArray;
|
|
39
|
+
height: number;
|
|
40
|
+
width: number;
|
|
41
|
+
}>, ultraDocumentOcr: (inputImage: string, config: string, cb: any) => Promise<{
|
|
42
|
+
[x: string]: any;
|
|
43
|
+
}>, freeMemory: () => Promise<boolean>;
|
|
44
|
+
export declare function iOS(): boolean;
|
|
45
|
+
export declare function isMobileFunc(): boolean;
|
|
46
|
+
export declare const getIsSIMD: () => Promise<boolean>;
|
|
47
|
+
export declare const getUrlParameter: (sParam: string, defaultValue: string) => string;
|
|
48
|
+
/**
|
|
49
|
+
* This function does the printing in the console based on the type and will only print based on @param debugType
|
|
50
|
+
* Please make sure to use this so that logs on the module would only print depending on the debug level
|
|
51
|
+
* @param title title of the printing. sample console.log(tiltle, message)
|
|
52
|
+
* @param message message of the printing. sample console.log(tiltle, message) if this is not needed just throw an empy string. sample: printLogs(title, '', debugType)
|
|
53
|
+
* @param debugType this variable will determine the type of printing in the console
|
|
54
|
+
* @param type this variable will determing the type of printing in the console, "LOG", "WARNING" or "ERROR" by default it is "LOG"
|
|
55
|
+
*/
|
|
56
|
+
export declare const getDebugType: () => string;
|
|
57
|
+
export declare const printLogs: (message: string, data: any, type?: string) => void;
|
|
58
|
+
export declare const getPortraitBase64: (content: ImageData) => Promise<Base64>;
|
|
59
|
+
export declare const createImages: (images: Array<ImageData | string>, title: string, action: boolean) => Promise<void>;
|
|
60
|
+
export declare function blobToBase64(blob: Blob): Promise<Base64>;
|
|
61
|
+
export declare const wait: (timeout: number) => Promise<unknown>;
|
|
62
|
+
export declare const arrayToTextDownload: (data: Array<string>, filename: string) => void;
|
|
63
|
+
export declare function setDefaultCameraDeviceId(deviceId: string): void;
|
|
64
|
+
export declare function getDefaultCameraDeviceId(): string;
|
|
65
|
+
export declare const convertCroppedImage: (croppedBarcode: any, cropImageWidth: number, cropImageHeight: number) => Promise<string>;
|
|
66
|
+
export declare const isMobileDevice: () => boolean;
|
|
67
|
+
export declare enum MessageType {
|
|
68
|
+
faceValidation = "Face Validation",
|
|
69
|
+
antispoofStatus = "Antispoof Status"
|
|
70
|
+
}
|
|
71
|
+
export declare const getStatusMessage: (result: number, type?: MessageType) => "" | "Processing hold still" | "Please move back" | "Please move closer" | "Move slightly left" | "Move slightly right" | "Move down" | "Move up" | "Please hold still" | "Remove glasses" | "Remove mask " | "Please look at camera" | "Raise phone level to face" | "Move your chin down" | "Lower phone level to face" | "Move your chin up" | "Too dim - increase lighting" | "Too bright - lower lighting" | "Please close mouth" | "Keep your head straight" | "Face mask and glasses detected" | "Align your face with the white oval" | "Center your face in the circle" | "Looking for face";
|
|
72
|
+
export declare const getRawFaceValidationStatus: (status: number) => "" | "Face mask and glasses detected" | "No Face" | "Valid Face" | "Image Spoof" | "Video Spoof" | "Too Close" | "Too far away" | "Too far to right" | "Too far to left" | "Too far up" | "Too far down" | "Too blurry" | "Glasses on" | "Mask on" | "Chin too far left" | "Chin too far right" | "Chin too far up" | "Chin too far down" | "Image too dim" | "Image too bright" | "Face low confidence value" | "Invalid face background" | "Eyes blink" | "Mouth Open" | "Face rotated right" | "Face rotated left" | "-100 Invalid Image";
|
|
73
|
+
export declare const getRawSpoofStatusMessage: (status: number) => "" | "Generic Error" | "Invalid Face" | "Face Too Close To Edge" | "Mobile Phone Detected" | "No Face Detected" | "Real" | "Spoof Detected";
|
|
74
|
+
export declare const checkPackageSupport: () => Promise<{
|
|
75
|
+
support: boolean;
|
|
76
|
+
message?: string;
|
|
77
|
+
}>;
|
|
78
|
+
export declare const getDocumentValidationStatusMessage: (result: number, isPassport?: boolean) => "" | "Please hold still" | "SYSTEM ERROR. Please try again later." | "Please show ID at the center of the screen" | "Please show identity page at the center of the screen" | "Move back a little" | "Move just a little closer" | "Please remove finger blocking document";
|
|
79
|
+
export declare const getBarcodeValidationStatusMessage: (result: number) => "" | "Barcode not detected" | "Success" | "Unsupported barcode detected" | "Unable to parse barcode data";
|
|
80
|
+
export declare const getFrontDocumentStatusMessage: (result: number) => "" | "Please hold still" | "SYSTEM ERROR. Please try again later." | "Please show ID at the center of the screen" | "Move just a little closer" | "Please remove finger blocking document" | "Success" | "Please show front of the ID";
|
|
81
|
+
export declare const getPassporttStatusMessage: (result: number) => "" | "Please hold still" | "SYSTEM ERROR. Please try again later." | "Please show identity page at the center of the screen" | "Move just a little closer" | "Please remove finger blocking document" | "Success";
|
|
82
|
+
export declare const getBackDocumentStatusMessage: (result: number) => "" | "SYSTEM ERROR. Please try again later." | "Please show ID at the center of the screen" | "Move just a little closer" | "Please remove finger blocking document" | "Success" | "Move the barcode closer" | "Please move the barcode closer" | "Please show barcode in the box";
|
|
83
|
+
export declare function getScreenOrientation(): ScreenOrientation;
|
|
84
|
+
export declare function convertPngBase64ToJpegBase64(pngBase64: string, maxWidth?: number, maxHeight?: number, quality?: number): Promise<unknown>;
|