@privateid/ultrapass-web-sdk 1.2.0 → 1.3.1-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 -921
- package/dist/apiUtils.js.map +1 -1
- package/dist/application/index.d.ts +7 -7
- package/dist/application/index.js +27 -25
- package/dist/application/index.js.map +1 -1
- 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 -8
- package/dist/application/modules/support/camera/CameraServiceFactory.js +33 -32
- 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 -637
- package/dist/application/modules/support/camera/camera.utils.js.map +1 -1
- package/dist/application/modules/support/camera/index.d.ts +24 -25
- package/dist/application/modules/support/camera/index.js +27 -29
- package/dist/application/modules/support/camera/index.js.map +1 -1
- package/dist/application/modules/support/camera/services/BaseCameraService.d.ts +41 -37
- package/dist/application/modules/support/camera/services/BaseCameraService.js +278 -277
- package/dist/application/modules/support/camera/services/BaseCameraService.js.map +1 -1
- package/dist/application/modules/support/camera/services/DesktopCameraService.d.ts +5 -5
- package/dist/application/modules/support/camera/services/DesktopCameraService.js +46 -45
- package/dist/application/modules/support/camera/services/DesktopCameraService.js.map +1 -1
- package/dist/application/modules/support/camera/services/FirefoxCameraService.d.ts +5 -5
- package/dist/application/modules/support/camera/services/FirefoxCameraService.js +46 -45
- package/dist/application/modules/support/camera/services/FirefoxCameraService.js.map +1 -1
- package/dist/application/modules/support/camera/services/MacSafariCameraService.d.ts +5 -5
- package/dist/application/modules/support/camera/services/MacSafariCameraService.js +47 -46
- package/dist/application/modules/support/camera/services/MacSafariCameraService.js.map +1 -1
- package/dist/application/modules/support/camera/services/MobileCameraService.d.ts +5 -5
- package/dist/application/modules/support/camera/services/MobileCameraService.js +133 -129
- package/dist/application/modules/support/camera/services/MobileCameraService.js.map +1 -1
- 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 -0
- package/dist/application/modules/support/permissions/PermissionsService.js +184 -0
- package/dist/application/modules/support/permissions/PermissionsService.js.map +1 -0
- package/dist/application/modules/support/permissions/index.d.ts +4 -0
- package/dist/application/modules/support/permissions/index.js +3 -0
- package/dist/application/modules/support/permissions/index.js.map +1 -0
- package/dist/application/modules/support/permissions/permission.utils.d.ts +6 -0
- package/dist/application/modules/support/permissions/permission.utils.js +34 -0
- package/dist/application/modules/support/permissions/permission.utils.js.map +1 -0
- package/dist/application/modules/support/permissions/permissions.domain.d.ts +6 -0
- package/dist/application/modules/support/permissions/permissions.domain.js +2 -0
- package/dist/application/modules/support/permissions/permissions.domain.js.map +1 -0
- package/dist/application/modules/support/permissions/permissions.types.d.ts +9 -0
- package/dist/application/modules/support/permissions/permissions.types.js +2 -0
- package/dist/application/modules/support/permissions/permissions.types.js.map +1 -0
- 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 -360
- package/dist/cameraUtils.js.map +1 -1
- package/dist/constants.d.ts +9 -9
- package/dist/constants.js +13 -12
- package/dist/constants.js.map +1 -1
- package/dist/createCallback.d.ts +56 -56
- package/dist/createCallback.js +332 -330
- package/dist/createCallback.js.map +1 -1
- package/dist/dbUtils.d.ts +14 -14
- package/dist/dbUtils.js +148 -147
- package/dist/dbUtils.js.map +1 -1
- package/dist/envUtils.d.ts +4 -4
- package/dist/envUtils.js +16 -15
- package/dist/envUtils.js.map +1 -1
- package/dist/faceModule.d.ts +196 -196
- package/dist/faceModule.js +978 -981
- package/dist/faceModule.js.map +1 -1
- 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 -13
- package/dist/main.js +84 -51
- package/dist/main.js.map +1 -1
- 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 -579
- package/dist/utils.js.map +1 -1
- 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/faceModule.d.ts
CHANGED
|
@@ -1,196 +1,196 @@
|
|
|
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 cameraSwitch.
|
|
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
|
-
* Face login function
|
|
130
|
-
*/
|
|
131
|
-
export declare const faceLogin: (props: FaceLoginProps) => Promise<any>;
|
|
132
|
-
/**
|
|
133
|
-
* This function performs predict, the camera should already be open. the functions performs the identification return the result then restart again.
|
|
134
|
-
* @category Face
|
|
135
|
-
* @param callback Callbacks triggered on the predict operation
|
|
136
|
-
* @param config Configuration recommeded default: { input_image_format: "rgba" }
|
|
137
|
-
* @param element Element id of video tag. (Optional) By default it uses the element id used when opening the camera using openCamera()
|
|
138
|
-
* @param image ImageData, If there is an image passed, it will be predicting the image instead of the video feed.
|
|
139
|
-
*/
|
|
140
|
-
export declare const predictVerify: (props: PredictProps) => Promise<any>;
|
|
141
|
-
export declare const predict: (props: PredictProps) => Promise<any>;
|
|
142
|
-
export declare const predictWithStatus: (props: PredictProps) => Promise<any>;
|
|
143
|
-
export declare const predictConfirmUser: (props: PredictProps) => Promise<any>;
|
|
144
|
-
export declare const predictDeleteUser: (props: PredictProps) => Promise<any>;
|
|
145
|
-
export declare const pkiEncryptData: (payload: any) => Promise<(string | null)[]>;
|
|
146
|
-
export declare const checkIfModelsAreLoaded: (isEnroll: boolean) => Promise<number>;
|
|
147
|
-
interface frontScanInterface {
|
|
148
|
-
callback: (returnData: any) => void;
|
|
149
|
-
config?: any;
|
|
150
|
-
doOcr?: boolean;
|
|
151
|
-
}
|
|
152
|
-
/**
|
|
153
|
-
* @deprecated This function is being replaced with documentScanGovernmentPhotoId.
|
|
154
|
-
*/
|
|
155
|
-
export declare const scanFrontDocument: ({ callback, config }: frontScanInterface) => Promise<{
|
|
156
|
-
result: string;
|
|
157
|
-
} | {
|
|
158
|
-
result: number;
|
|
159
|
-
}>;
|
|
160
|
-
/**
|
|
161
|
-
* @deprecated This function is being replaced with documentScanPassport.
|
|
162
|
-
*/
|
|
163
|
-
export declare const scanPassport: ({ callback, config }: frontScanInterface) => Promise<{
|
|
164
|
-
result: string;
|
|
165
|
-
} | {
|
|
166
|
-
result: number;
|
|
167
|
-
}>;
|
|
168
|
-
interface backScanInterface {
|
|
169
|
-
callback: (returnData: any) => void;
|
|
170
|
-
image?: ImageData;
|
|
171
|
-
config?: any;
|
|
172
|
-
}
|
|
173
|
-
export declare const scanBackDocument: ({ callback, image, config }: backScanInterface) => Promise<{
|
|
174
|
-
result: string;
|
|
175
|
-
} | {
|
|
176
|
-
[x: string]: any;
|
|
177
|
-
result?: undefined;
|
|
178
|
-
} | {
|
|
179
|
-
result: number;
|
|
180
|
-
}>;
|
|
181
|
-
export declare const compareEmbeddings: (embeddingsA: string, embeddingsB: string, config: {}, callback: (result: any) => void, encryptData?: boolean) => Promise<{
|
|
182
|
-
result: number;
|
|
183
|
-
imageData: Uint8ClampedArray;
|
|
184
|
-
height: number;
|
|
185
|
-
width: number;
|
|
186
|
-
}>;
|
|
187
|
-
interface documentOcrInterface {
|
|
188
|
-
inputImage: string;
|
|
189
|
-
callback: (returnData: any) => void;
|
|
190
|
-
config?: any;
|
|
191
|
-
}
|
|
192
|
-
export declare const documentOcr: ({ inputImage, callback, config }: documentOcrInterface) => Promise<{
|
|
193
|
-
result: number;
|
|
194
|
-
}>;
|
|
195
|
-
export declare const freeFrontScanMemory: () => Promise<boolean>;
|
|
196
|
-
export {};
|
|
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 cameraSwitch.
|
|
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
|
+
* Face login function
|
|
130
|
+
*/
|
|
131
|
+
export declare const faceLogin: (props: FaceLoginProps) => Promise<any>;
|
|
132
|
+
/**
|
|
133
|
+
* This function performs predict, the camera should already be open. the functions performs the identification return the result then restart again.
|
|
134
|
+
* @category Face
|
|
135
|
+
* @param callback Callbacks triggered on the predict operation
|
|
136
|
+
* @param config Configuration recommeded default: { input_image_format: "rgba" }
|
|
137
|
+
* @param element Element id of video tag. (Optional) By default it uses the element id used when opening the camera using openCamera()
|
|
138
|
+
* @param image ImageData, If there is an image passed, it will be predicting the image instead of the video feed.
|
|
139
|
+
*/
|
|
140
|
+
export declare const predictVerify: (props: PredictProps) => Promise<any>;
|
|
141
|
+
export declare const predict: (props: PredictProps) => Promise<any>;
|
|
142
|
+
export declare const predictWithStatus: (props: PredictProps) => Promise<any>;
|
|
143
|
+
export declare const predictConfirmUser: (props: PredictProps) => Promise<any>;
|
|
144
|
+
export declare const predictDeleteUser: (props: PredictProps) => Promise<any>;
|
|
145
|
+
export declare const pkiEncryptData: (payload: any) => Promise<(string | null)[]>;
|
|
146
|
+
export declare const checkIfModelsAreLoaded: (isEnroll: boolean) => Promise<number>;
|
|
147
|
+
interface frontScanInterface {
|
|
148
|
+
callback: (returnData: any) => void;
|
|
149
|
+
config?: any;
|
|
150
|
+
doOcr?: boolean;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* @deprecated This function is being replaced with documentScanGovernmentPhotoId.
|
|
154
|
+
*/
|
|
155
|
+
export declare const scanFrontDocument: ({ callback, config }: frontScanInterface) => Promise<{
|
|
156
|
+
result: string;
|
|
157
|
+
} | {
|
|
158
|
+
result: number;
|
|
159
|
+
}>;
|
|
160
|
+
/**
|
|
161
|
+
* @deprecated This function is being replaced with documentScanPassport.
|
|
162
|
+
*/
|
|
163
|
+
export declare const scanPassport: ({ callback, config }: frontScanInterface) => Promise<{
|
|
164
|
+
result: string;
|
|
165
|
+
} | {
|
|
166
|
+
result: number;
|
|
167
|
+
}>;
|
|
168
|
+
interface backScanInterface {
|
|
169
|
+
callback: (returnData: any) => void;
|
|
170
|
+
image?: ImageData;
|
|
171
|
+
config?: any;
|
|
172
|
+
}
|
|
173
|
+
export declare const scanBackDocument: ({ callback, image, config }: backScanInterface) => Promise<{
|
|
174
|
+
result: string;
|
|
175
|
+
} | {
|
|
176
|
+
[x: string]: any;
|
|
177
|
+
result?: undefined;
|
|
178
|
+
} | {
|
|
179
|
+
result: number;
|
|
180
|
+
}>;
|
|
181
|
+
export declare const compareEmbeddings: (embeddingsA: string, embeddingsB: string, config: {}, callback: (result: any) => void, encryptData?: boolean) => Promise<{
|
|
182
|
+
result: number;
|
|
183
|
+
imageData: Uint8ClampedArray;
|
|
184
|
+
height: number;
|
|
185
|
+
width: number;
|
|
186
|
+
}>;
|
|
187
|
+
interface documentOcrInterface {
|
|
188
|
+
inputImage: string;
|
|
189
|
+
callback: (returnData: any) => void;
|
|
190
|
+
config?: any;
|
|
191
|
+
}
|
|
192
|
+
export declare const documentOcr: ({ inputImage, callback, config }: documentOcrInterface) => Promise<{
|
|
193
|
+
result: number;
|
|
194
|
+
}>;
|
|
195
|
+
export declare const freeFrontScanMemory: () => Promise<boolean>;
|
|
196
|
+
export {};
|