@privateid/ultrapass-web-sdk 1.7.0 → 2.0.0
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/application/modules/core/document/DocumentService.js +16 -31
- package/dist/application/modules/core/document/DocumentService.js.map +1 -1
- package/dist/application/modules/core/document/document.types.d.ts +151 -0
- package/dist/application/modules/core/document/document.utils.d.ts +23 -1
- package/dist/application/modules/core/document/document.utils.js +123 -20
- package/dist/application/modules/core/document/document.utils.js.map +1 -1
- package/dist/application/modules/core/face/FaceService.d.ts +1 -2
- package/dist/application/modules/core/face/FaceService.js +11 -23
- package/dist/application/modules/core/face/FaceService.js.map +1 -1
- package/dist/application/modules/core/face/face.types.d.ts +104 -2
- package/dist/application/modules/core/face/face.types.js.map +1 -1
- package/dist/application/modules/core/face/face.utils.d.ts +14 -0
- package/dist/application/modules/core/face/face.utils.js +86 -2
- package/dist/application/modules/core/face/face.utils.js.map +1 -1
- package/dist/application/modules/internal/feature-flag/LDFeatureFlagService.js +0 -1
- package/dist/application/modules/internal/feature-flag/LDFeatureFlagService.js.map +1 -1
- package/dist/application/modules/internal/shared/index.d.ts +1 -0
- package/dist/application/modules/internal/shared/index.js +1 -0
- package/dist/application/modules/internal/shared/index.js.map +1 -1
- package/dist/application/modules/internal/shared/shared.types.d.ts +21 -0
- package/dist/application/modules/internal/shared/shared.types.js +2 -0
- package/dist/application/modules/internal/shared/shared.types.js.map +1 -0
- package/dist/application/modules/internal/shared/shared.utils.d.ts +6 -0
- package/dist/application/modules/internal/shared/shared.utils.js +26 -3
- package/dist/application/modules/internal/shared/shared.utils.js.map +1 -1
- package/dist/application/modules/internal/wasm-orchestrator/WasmOrchestratorService.d.ts +0 -1
- package/dist/application/modules/internal/wasm-orchestrator/WasmOrchestratorService.js +87 -208
- package/dist/application/modules/internal/wasm-orchestrator/WasmOrchestratorService.js.map +1 -1
- package/dist/application/modules/internal/wasm-orchestrator/index.d.ts +1 -2
- package/dist/application/modules/internal/wasm-orchestrator/index.js +0 -2
- package/dist/application/modules/internal/wasm-orchestrator/index.js.map +1 -1
- package/dist/application/modules/internal/wasm-orchestrator/wasm-orchestrator.types.d.ts +7 -19
- package/dist/application/modules/internal/wasm-orchestrator/wasm-orchestrator.utils.d.ts +18 -0
- package/dist/application/modules/internal/wasm-orchestrator/wasm-orchestrator.utils.js +69 -10
- package/dist/application/modules/internal/wasm-orchestrator/wasm-orchestrator.utils.js.map +1 -1
- package/dist/application/modules/internal/wasm-orchestrator/wasm-orchestrator.utils.test.d.ts +1 -0
- package/dist/application/modules/internal/wasm-orchestrator/wasm-orchestrator.utils.test.js +218 -0
- package/dist/application/modules/internal/wasm-orchestrator/wasm-orchestrator.utils.test.js.map +1 -0
- package/dist/application/modules/support/camera/CameraServiceFactory.js +0 -1
- package/dist/application/modules/support/camera/CameraServiceFactory.js.map +1 -1
- package/dist/application/modules/support/camera/camera.types.d.ts +8 -3
- package/dist/application/modules/support/camera/camera.types.js +9 -5
- package/dist/application/modules/support/camera/camera.types.js.map +1 -1
- package/dist/application/modules/support/camera/camera.utils.js +0 -1
- package/dist/application/modules/support/camera/camera.utils.js.map +1 -1
- package/dist/application/modules/support/camera/index.d.ts +2 -1
- package/dist/application/modules/support/camera/index.js +1 -0
- package/dist/application/modules/support/camera/index.js.map +1 -1
- package/dist/application/modules/support/camera/services/BaseCameraService.js +0 -3
- package/dist/application/modules/support/camera/services/BaseCameraService.js.map +1 -1
- package/dist/application/modules/support/camera/services/DesktopCameraService.js +0 -1
- package/dist/application/modules/support/camera/services/DesktopCameraService.js.map +1 -1
- package/dist/application/modules/support/camera/services/FirefoxCameraService.js +0 -1
- package/dist/application/modules/support/camera/services/FirefoxCameraService.js.map +1 -1
- package/dist/application/modules/support/camera/services/MacSafariCameraService.js +0 -1
- package/dist/application/modules/support/camera/services/MacSafariCameraService.js.map +1 -1
- package/dist/application/modules/support/camera/services/MobileCameraService.js +1 -3
- package/dist/application/modules/support/camera/services/MobileCameraService.js.map +1 -1
- package/dist/application/modules/support/engine/EngineService.js +0 -2
- package/dist/application/modules/support/engine/EngineService.js.map +1 -1
- package/dist/application/modules/support/engine/engine.types.d.ts +2 -21
- package/dist/application/modules/support/engine/engine.utils.js +1 -3
- package/dist/application/modules/support/engine/engine.utils.js.map +1 -1
- package/dist/application/modules/support/engine/index.d.ts +1 -1
- package/dist/application/modules/support/permissions/PermissionsService.js +0 -2
- package/dist/application/modules/support/permissions/PermissionsService.js.map +1 -1
- package/dist/application/modules/support/permissions/index.js +0 -1
- package/dist/application/modules/support/permissions/index.js.map +1 -1
- package/dist/application/workers/wasm/WasmWorkerService.d.ts +14 -3
- package/dist/application/workers/wasm/WasmWorkerService.js +270 -206
- package/dist/application/workers/wasm/WasmWorkerService.js.map +1 -1
- package/dist/application/workers/wasm/wasm-worker.types.d.ts +19 -1
- package/dist/application/workers/wasm/wasm-worker.utils.d.ts +28 -1
- package/dist/application/workers/wasm/wasm-worker.utils.js +132 -22
- package/dist/application/workers/wasm/wasm-worker.utils.js.map +1 -1
- package/dist/application/workers/wasm/wasm-worker.utils.test.d.ts +1 -0
- package/dist/application/workers/wasm/wasm-worker.utils.test.js +123 -0
- package/dist/application/workers/wasm/wasm-worker.utils.test.js.map +1 -0
- package/dist/index.d.ts +46 -35
- package/dist/index.js +104 -77
- package/dist/index.js.map +1 -1
- package/package.json +19 -11
- package/wasm/ultra/manifest.json +3 -3
- package/workers/wasm-new.worker.js +1 -1
- package/workers/wasm-new.worker.js.map +3 -3
- package/dist/apiUtils.d.ts +0 -46
- package/dist/apiUtils.js +0 -923
- package/dist/apiUtils.js.map +0 -1
- package/dist/cameraUtils.d.ts +0 -77
- package/dist/cameraUtils.js +0 -362
- package/dist/cameraUtils.js.map +0 -1
- package/dist/constants.d.ts +0 -9
- package/dist/constants.js +0 -14
- package/dist/constants.js.map +0 -1
- package/dist/createCallback.d.ts +0 -57
- package/dist/createCallback.js +0 -336
- package/dist/createCallback.js.map +0 -1
- package/dist/dbUtils.d.ts +0 -14
- package/dist/dbUtils.js +0 -149
- package/dist/dbUtils.js.map +0 -1
- package/dist/envUtils.d.ts +0 -4
- package/dist/envUtils.js +0 -17
- package/dist/envUtils.js.map +0 -1
- package/dist/faceModule.d.ts +0 -233
- package/dist/faceModule.js +0 -1021
- package/dist/faceModule.js.map +0 -1
- package/dist/main.d.ts +0 -48
- package/dist/main.js +0 -111
- package/dist/main.js.map +0 -1
- package/dist/types.d.ts +0 -139
- package/dist/types.js +0 -78
- package/dist/types.js.map +0 -1
- package/dist/utils.d.ts +0 -90
- package/dist/utils.js +0 -587
- package/dist/utils.js.map +0 -1
package/dist/faceModule.d.ts
DELETED
|
@@ -1,233 +0,0 @@
|
|
|
1
|
-
import { callbackTypeEnum } from './createCallback';
|
|
2
|
-
import { CameraFaceMode } from './types';
|
|
3
|
-
interface CameraOpenResult {
|
|
4
|
-
stream: MediaStream | null;
|
|
5
|
-
devices: MediaDeviceInfo[] | null;
|
|
6
|
-
faceMode: CameraFaceMode | null;
|
|
7
|
-
settings: MediaTrackSettings | null;
|
|
8
|
-
status: boolean;
|
|
9
|
-
errorMessage?: string | null;
|
|
10
|
-
capabilities: MediaTrackCapabilities | null;
|
|
11
|
-
}
|
|
12
|
-
interface openCameraProps {
|
|
13
|
-
videoElementId: string;
|
|
14
|
-
deviceId?: string;
|
|
15
|
-
requestFaceMode?: CameraFaceMode;
|
|
16
|
-
canvasResolution?: {
|
|
17
|
-
width: number;
|
|
18
|
-
height: number;
|
|
19
|
-
};
|
|
20
|
-
isDocumentScan?: boolean;
|
|
21
|
-
}
|
|
22
|
-
export declare const openCamera: ({ videoElementId, deviceId, requestFaceMode, canvasResolution, isDocumentScan, }: openCameraProps) => Promise<CameraOpenResult>;
|
|
23
|
-
/**
|
|
24
|
-
* This function close camera, and clear all memories related to the camera.
|
|
25
|
-
* @category Face
|
|
26
|
-
* @param domElement id of the video tag
|
|
27
|
-
* @deprecated This function is being replaced with cameraClose.
|
|
28
|
-
*/
|
|
29
|
-
export declare const closeCamera: (element: string) => Promise<void>;
|
|
30
|
-
interface openCameraProps {
|
|
31
|
-
videoElementId: string;
|
|
32
|
-
deviceId?: string;
|
|
33
|
-
requestFaceMode?: CameraFaceMode;
|
|
34
|
-
canvasResolution?: {
|
|
35
|
-
width: number;
|
|
36
|
-
height: number;
|
|
37
|
-
};
|
|
38
|
-
isDocumentScan?: boolean;
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* This function switch camera from front to back on mobile, and to another device on desktop
|
|
42
|
-
* @category Face
|
|
43
|
-
* @param selectedCamera Selected camera either front or back
|
|
44
|
-
* @param device Selected camera ID
|
|
45
|
-
* @param canvasResolution
|
|
46
|
-
* @deprecated This function is being replaced with cameraSwitch.
|
|
47
|
-
*/
|
|
48
|
-
export declare const switchCamera: (selectedCamera: CameraFaceMode | null, device: string, canvasResolution?: {
|
|
49
|
-
width: number;
|
|
50
|
-
height: number;
|
|
51
|
-
} | null) => Promise<{
|
|
52
|
-
capabilities: MediaTrackCapabilities | null;
|
|
53
|
-
settings: MediaTrackSettings | null;
|
|
54
|
-
} | null>;
|
|
55
|
-
interface enrollProps {
|
|
56
|
-
callback: (result: any) => void;
|
|
57
|
-
config?: any;
|
|
58
|
-
element?: string;
|
|
59
|
-
returnPortrait?: boolean;
|
|
60
|
-
}
|
|
61
|
-
export declare const getBaseConfigEnroll: () => {
|
|
62
|
-
input_image_format: string;
|
|
63
|
-
angle_rotation_left_threshold: number;
|
|
64
|
-
angle_rotation_right_threshold: number;
|
|
65
|
-
threshold_high_vertical_enroll: number;
|
|
66
|
-
threshold_down_vertical_enroll: number;
|
|
67
|
-
anti_spoofing_threshold: number;
|
|
68
|
-
threshold_profile_enroll: number;
|
|
69
|
-
blur_threshold_enroll_pred: number;
|
|
70
|
-
threshold_user_too_close: number;
|
|
71
|
-
threshold_user_too_far: number;
|
|
72
|
-
allow_only_one_face: boolean;
|
|
73
|
-
threshold_user_up: number;
|
|
74
|
-
threshold_user_down: number;
|
|
75
|
-
threshold_user_left: number;
|
|
76
|
-
threshold_user_right: number;
|
|
77
|
-
};
|
|
78
|
-
/**
|
|
79
|
-
* @deprecated This function is being replaced with faceEnroll.
|
|
80
|
-
*/
|
|
81
|
-
export declare function enroll({ callback, config, element, returnPortrait }: enrollProps): Promise<ImageData | {
|
|
82
|
-
result: number;
|
|
83
|
-
imageData: Uint8ClampedArray;
|
|
84
|
-
height: number;
|
|
85
|
-
width: number;
|
|
86
|
-
} | {
|
|
87
|
-
result: string;
|
|
88
|
-
}>;
|
|
89
|
-
interface BaseProps {
|
|
90
|
-
callback: (result: any) => void;
|
|
91
|
-
config?: any;
|
|
92
|
-
element?: string;
|
|
93
|
-
returnPortrait?: boolean;
|
|
94
|
-
}
|
|
95
|
-
interface FaceLoginProps extends BaseProps {
|
|
96
|
-
}
|
|
97
|
-
interface PredictProps extends BaseProps {
|
|
98
|
-
image?: ImageData;
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* This function performs faceLogin, the camera should already be open. the functions performs the identification and return the result. This function is more restrictive than predict1Fa.
|
|
102
|
-
* @category Face
|
|
103
|
-
* @param callback Callbacks triggered on the `predict` operation
|
|
104
|
-
* @param config Configuration recommeded default: { input_image_format: "rgba" }
|
|
105
|
-
* @param element Element id of video tag. (Optional) By default it uses the element id used when opening the camera using openCamera()
|
|
106
|
-
*/
|
|
107
|
-
interface FaceLoginProps {
|
|
108
|
-
callback: (result: any) => void;
|
|
109
|
-
config?: any;
|
|
110
|
-
element?: string;
|
|
111
|
-
returnPortrait?: boolean;
|
|
112
|
-
}
|
|
113
|
-
/**
|
|
114
|
-
* @deprecated This function is being replaced with faceAgeEstimation.
|
|
115
|
-
*/
|
|
116
|
-
export declare const estimateAge: (options: Parameters<typeof runUltraProcess>[1]) => Promise<any>;
|
|
117
|
-
type PredictFunction = (images: ImageData[], isSimd: boolean, config: string, resultProxy: any) => Promise<any>;
|
|
118
|
-
declare const runUltraProcess: (fn: PredictFunction, options: {
|
|
119
|
-
callback: (result: any) => void;
|
|
120
|
-
config?: any;
|
|
121
|
-
element?: string;
|
|
122
|
-
image?: ImageData;
|
|
123
|
-
returnPortrait?: boolean;
|
|
124
|
-
useExistingCanvas?: boolean;
|
|
125
|
-
logMessage?: string;
|
|
126
|
-
callbackType?: callbackTypeEnum;
|
|
127
|
-
}) => Promise<any>;
|
|
128
|
-
/**
|
|
129
|
-
* @deprecated This function is being replaced with facePredict.
|
|
130
|
-
*/
|
|
131
|
-
export declare const faceLogin: (props: FaceLoginProps) => Promise<any>;
|
|
132
|
-
/**
|
|
133
|
-
* @deprecated This function is being replaced with facePredict({ type: 'VERIFY' }).
|
|
134
|
-
* This function performs predict, the camera should already be open. the functions performs the identification return the result then restart again.
|
|
135
|
-
* @category Face
|
|
136
|
-
* @param callback Callbacks triggered on the predict operation
|
|
137
|
-
* @param config Configuration recommeded default: { input_image_format: "rgba" }
|
|
138
|
-
* @param element Element id of video tag. (Optional) By default it uses the element id used when opening the camera using openCamera()
|
|
139
|
-
* @param image ImageData, If there is an image passed, it will be predicting the image instead of the video feed.
|
|
140
|
-
*/
|
|
141
|
-
export declare const predictVerify: (props: PredictProps) => Promise<any>;
|
|
142
|
-
/**
|
|
143
|
-
* @deprecated This function is being replaced with facePredict({ type: 'PREDICT' }).
|
|
144
|
-
*/
|
|
145
|
-
export declare const predict: (props: PredictProps) => Promise<any>;
|
|
146
|
-
/**
|
|
147
|
-
* @deprecated This function is being replaced with facePredict({ type: 'PREDICT_STATUS' }).
|
|
148
|
-
*/
|
|
149
|
-
export declare const predictWithStatus: (props: PredictProps) => Promise<any>;
|
|
150
|
-
/**
|
|
151
|
-
* @deprecated This function is being replaced with facePredict({ type: 'CONFIRM_USER' }).
|
|
152
|
-
*/
|
|
153
|
-
export declare const predictConfirmUser: (props: PredictProps) => Promise<any>;
|
|
154
|
-
/**
|
|
155
|
-
* @deprecated This function is being replaced with facePredict({ type: 'ULTRA_VERIFY' }).
|
|
156
|
-
*/
|
|
157
|
-
export declare const ultraVerify: (props: PredictProps) => Promise<any>;
|
|
158
|
-
/**
|
|
159
|
-
* @deprecated This function is being replaced with facePredict({ type: 'DELETE' }).
|
|
160
|
-
*/
|
|
161
|
-
export declare const predictDeleteUser: (props: PredictProps) => Promise<any>;
|
|
162
|
-
/**
|
|
163
|
-
*
|
|
164
|
-
* @deprecated This function is being replaced with engineEncryptData.
|
|
165
|
-
*/
|
|
166
|
-
export declare const pkiEncryptData: (payload: any) => Promise<(string | null)[]>;
|
|
167
|
-
/**
|
|
168
|
-
* @deprecated This function is being replaced with engineCheckModelsAreLoaded.
|
|
169
|
-
*/
|
|
170
|
-
export declare const checkIfModelsAreLoaded: (isEnroll: boolean) => Promise<number>;
|
|
171
|
-
interface frontScanInterface {
|
|
172
|
-
callback: (returnData: any) => void;
|
|
173
|
-
config?: any;
|
|
174
|
-
doOcr?: boolean;
|
|
175
|
-
}
|
|
176
|
-
/**
|
|
177
|
-
* @deprecated This function is being replaced with documentScanGovernmentPhotoId.
|
|
178
|
-
*/
|
|
179
|
-
export declare const scanFrontDocument: ({ callback, config }: frontScanInterface) => Promise<{
|
|
180
|
-
result: string;
|
|
181
|
-
} | {
|
|
182
|
-
result: number;
|
|
183
|
-
}>;
|
|
184
|
-
/**
|
|
185
|
-
* @deprecated This function is being replaced with documentScanPassport.
|
|
186
|
-
*/
|
|
187
|
-
export declare const scanPassport: ({ callback, config }: frontScanInterface) => Promise<{
|
|
188
|
-
result: string;
|
|
189
|
-
} | {
|
|
190
|
-
result: number;
|
|
191
|
-
}>;
|
|
192
|
-
interface backScanInterface {
|
|
193
|
-
callback: (returnData: any) => void;
|
|
194
|
-
image?: ImageData;
|
|
195
|
-
config?: any;
|
|
196
|
-
}
|
|
197
|
-
/**
|
|
198
|
-
* @deprecated This function is being replaced with documentScanBackGovernmentPhotoId.
|
|
199
|
-
*/
|
|
200
|
-
export declare const scanBackDocument: ({ callback, image, config }: backScanInterface) => Promise<{
|
|
201
|
-
result: string;
|
|
202
|
-
} | {
|
|
203
|
-
[x: string]: any;
|
|
204
|
-
result?: undefined;
|
|
205
|
-
} | {
|
|
206
|
-
result: number;
|
|
207
|
-
}>;
|
|
208
|
-
/**
|
|
209
|
-
* @deprecated This function is being replaced with compareImageEmbeddings.
|
|
210
|
-
*/
|
|
211
|
-
export declare const compareEmbeddings: (embeddingsA: string, embeddingsB: string, config: {}, callback: (result: any) => void, encryptData?: boolean) => Promise<{
|
|
212
|
-
result: number;
|
|
213
|
-
imageData: Uint8ClampedArray;
|
|
214
|
-
height: number;
|
|
215
|
-
width: number;
|
|
216
|
-
}>;
|
|
217
|
-
interface documentOcrInterface {
|
|
218
|
-
inputImage: string;
|
|
219
|
-
callback: (returnData: any) => void;
|
|
220
|
-
config?: any;
|
|
221
|
-
}
|
|
222
|
-
/**
|
|
223
|
-
* @deprecated This function is being replaced with documentExtractOCR.
|
|
224
|
-
*/
|
|
225
|
-
export declare const documentOcr: ({ inputImage, callback, config }: documentOcrInterface) => Promise<{
|
|
226
|
-
result: number;
|
|
227
|
-
}>;
|
|
228
|
-
/**
|
|
229
|
-
*
|
|
230
|
-
* @deprecated This function is being replaced with engineFreeMemory.
|
|
231
|
-
*/
|
|
232
|
-
export declare const freeFrontScanMemory: () => Promise<boolean>;
|
|
233
|
-
export {};
|