@regulaforensics/vp-frontend-face-components 6.2.1381-nightly → 6.2.1382-nightly
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 +57 -43
- package/{lib → dist}/index.d.ts +218 -237
- package/dist/main.iife.js +1123 -45
- package/package.json +4 -4
package/{lib → dist}/index.d.ts
RENAMED
@@ -1,140 +1,222 @@
|
|
1
|
-
type
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
1
|
+
export declare type ComputedCss = {
|
2
|
+
fontFamily?: string;
|
3
|
+
fontSize?: string;
|
4
|
+
onboardingScreenStartButtonBackground?: string;
|
5
|
+
onboardingScreenStartButtonBackgroundHover?: string;
|
6
|
+
onboardingScreenStartButtonTitle?: string;
|
7
|
+
onboardingScreenStartButtonTitleHover?: string;
|
8
|
+
onboardingScreenIllumination?: string;
|
9
|
+
onboardingScreenAccessories?: string;
|
10
|
+
onboardingScreenCameraLevel?: string;
|
11
|
+
cameraScreenSectorTarget?: string;
|
12
|
+
cameraScreenSectorActive?: string;
|
13
|
+
cameraScreenStrokeNormal?: string;
|
14
|
+
retryScreenRetryButtonBackground?: string;
|
15
|
+
retryScreenRetryButtonBackgroundHover?: string;
|
16
|
+
retryScreenRetryButtonTitle?: string;
|
17
|
+
retryScreenRetryButtonTitleHover?: string;
|
18
|
+
processingScreenProgress?: string;
|
19
|
+
cameraScreenFrontHintLabelBackground?: string;
|
20
|
+
cameraScreenFrontHintLabelText?: string;
|
21
|
+
successScreenImage?: string;
|
22
|
+
retryScreenEnvironmentImage?: string;
|
23
|
+
retryScreenPersonImage?: string;
|
24
|
+
};
|
25
|
+
|
26
|
+
export declare type CustomEventDataType<R> = {
|
27
|
+
status: ResponseCode;
|
28
|
+
reason?: ErrorTypes;
|
29
|
+
response?: R;
|
30
|
+
};
|
31
|
+
|
32
|
+
declare type DebugOptions = {
|
33
|
+
faceDebugOutputCanvasFromWasm?: boolean;
|
34
|
+
extendedWasmResponse?: boolean;
|
35
|
+
deviceOrientationPlate?: boolean;
|
36
|
+
videoRecordingSaveVideo?: boolean;
|
37
|
+
};
|
38
|
+
|
39
|
+
export declare interface DetailEvent<A, R> {
|
40
|
+
action: A;
|
41
|
+
data: CustomEventDataType<R> | null;
|
42
|
+
}
|
43
|
+
|
44
|
+
export declare type ErrorTypes = 'WASM_ERROR' | 'UNKNOWN_ERROR' | 'NOT_SUPPORTED' | 'CAMERA_UNKNOWN_ERROR' | 'CAMERA_PERMISSION_DENIED' | 'NO_CAMERA' | 'INCORRECT_CAMERA_ID' | 'CONNECTION_ERROR' | 'LANDSCAPE_MODE_RESTRICTED' | 'TIMEOUT_ERROR' | 'CHANGE_CAMERA' | 'DEVICE_ROTATE' | 'APP_INACTIVE' | 'HTTP_NOT_SUPPORTED';
|
45
|
+
|
46
|
+
export declare type FaceCaptureDetailType = DetailEvent<FaceEventActions, FaceDetectionResponseType>;
|
47
|
+
|
48
|
+
export declare type FaceDetectionResponseType = {
|
49
|
+
capture: Array<string>;
|
50
|
+
};
|
51
|
+
|
52
|
+
export declare interface FaceDetectionSettings {
|
53
|
+
url?: string;
|
54
|
+
debug?: DebugOptions;
|
55
|
+
locale?: Locales | string;
|
56
|
+
copyright?: boolean;
|
57
|
+
cameraId?: string;
|
58
|
+
changeCamera?: boolean;
|
59
|
+
closeDisabled?: boolean;
|
60
|
+
finishScreen?: boolean;
|
61
|
+
startScreen?: boolean;
|
62
|
+
customization?: ComputedCss;
|
63
|
+
nonce?: string;
|
64
|
+
rotationAngle?: number;
|
65
|
+
holdStillDuration?: number;
|
66
|
+
timeoutInterval?: number;
|
67
|
+
workerPath?: string;
|
68
|
+
}
|
69
|
+
|
70
|
+
export declare class FaceDetectionWebComponent extends HTMLElement {
|
71
|
+
private _root;
|
72
|
+
private _mounted;
|
73
|
+
private _translations;
|
74
|
+
constructor();
|
75
|
+
static get observedAttributes(): Array<string>;
|
76
|
+
private onEvent;
|
77
|
+
get version(): string;
|
78
|
+
set translations(dictionary: FaceDictionaries | null);
|
79
|
+
get translations(): FaceDictionaries | null;
|
80
|
+
set settings(params: FaceDetectionSettings);
|
81
|
+
get settings(): FaceDetectionSettings;
|
82
|
+
attributeChangedCallback(name: string): void;
|
83
|
+
connectedCallback(): void;
|
84
|
+
private render;
|
85
|
+
disconnectedCallback(): void;
|
86
|
+
}
|
87
|
+
|
88
|
+
export declare type FaceDictionaries = Partial<Record<Locales, FaceTranslations>>;
|
89
|
+
|
90
|
+
export declare type FaceEventActions = 'ELEMENT_VISIBLE' | 'PRESS_START_BUTTON' | 'PRESS_RETRY_BUTTON' | 'CLOSE' | 'PROCESS_FINISHED' | 'SERVICE_INITIALIZED' | 'RETRY_COUNTER_EXCEEDED';
|
91
|
+
|
92
|
+
export declare type FaceLivenessDetailType = DetailEvent<FaceEventActions, FaceLivenessResponseType>;
|
93
|
+
|
94
|
+
export declare type FaceLivenessResponseType = {
|
95
|
+
images: Array<string>;
|
96
|
+
code: number;
|
97
|
+
metadata: Record<string, any>;
|
98
|
+
estimatedAge: number | null;
|
99
|
+
tag: string;
|
100
|
+
status: number;
|
101
|
+
transactionId: string;
|
102
|
+
type: number;
|
103
|
+
};
|
104
|
+
|
105
|
+
export declare interface FaceLivenessSettings extends Omit<FaceDetectionSettings, 'holdStillDuration' | 'timeoutInterval'> {
|
106
|
+
url?: string;
|
107
|
+
deviceOrientation?: boolean;
|
108
|
+
videoRecording?: boolean;
|
109
|
+
tag?: string;
|
110
|
+
headers?: Record<string, string>;
|
111
|
+
retryCount?: number;
|
112
|
+
metadata?: Record<string, any>;
|
113
|
+
recordingProcess?: RecordingProcess;
|
114
|
+
livenessType?: FaceLivenessType;
|
115
|
+
}
|
116
|
+
|
117
|
+
export declare enum FaceLivenessType {
|
118
|
+
ACTIVE = 0,
|
119
|
+
PASSIVE = 1
|
120
|
+
}
|
121
|
+
|
122
|
+
export declare class FaceLivenessWebComponent extends HTMLElement {
|
123
|
+
private _root;
|
124
|
+
private _mounted;
|
125
|
+
private _translations;
|
126
|
+
constructor();
|
127
|
+
static get observedAttributes(): Array<string>;
|
128
|
+
private onEvent;
|
129
|
+
attributeChangedCallback(name: string): void;
|
130
|
+
connectedCallback(): void;
|
131
|
+
get version(): string;
|
132
|
+
set translations(dictionary: FaceDictionaries | null);
|
133
|
+
get translations(): FaceDictionaries | null;
|
134
|
+
set settings(params: FaceLivenessSettings);
|
135
|
+
get settings(): FaceLivenessSettings;
|
136
|
+
private render;
|
137
|
+
disconnectedCallback(): void;
|
138
|
+
}
|
139
|
+
|
140
|
+
export declare interface FaceTranslations {
|
141
|
+
showOnlyOneFace?: string;
|
142
|
+
preparingCamera?: string;
|
143
|
+
allowAccessCamera?: string;
|
144
|
+
somethingWentWrong?: string;
|
145
|
+
incorrectCameraId?: string;
|
146
|
+
checkCameraId?: string;
|
147
|
+
preparingService?: string;
|
148
|
+
allowAccessToCamera?: string;
|
149
|
+
error?: string;
|
150
|
+
versionNotSupported?: string;
|
151
|
+
updateBrowser?: string;
|
152
|
+
licenseError?: string;
|
153
|
+
licenseExpired?: string;
|
154
|
+
onlyPortraitOrientation?: string;
|
155
|
+
turnDeviceIntoPortrait?: string;
|
156
|
+
tryAgain?: string;
|
157
|
+
noCameraAvailable?: string;
|
158
|
+
checkCameraConnection?: string;
|
159
|
+
noMaskSunglassesHeaddress?: string;
|
160
|
+
ambientLighting?: string;
|
161
|
+
lookStraight?: string;
|
162
|
+
fitYourFace?: string;
|
163
|
+
moveCloser?: string;
|
164
|
+
moveAway?: string;
|
165
|
+
holdSteady?: string;
|
166
|
+
turnHead?: string;
|
167
|
+
processing?: string;
|
168
|
+
retryButtonText?: string;
|
169
|
+
followGuidelinesText?: string;
|
170
|
+
letsTryAgainTitle?: string;
|
171
|
+
noCameraPermission?: string;
|
172
|
+
goButton?: string;
|
173
|
+
centerFaceTurnHead?: string;
|
174
|
+
centerFace?: string;
|
175
|
+
selfieTime?: string;
|
176
|
+
errorCode?: string;
|
177
|
+
illumination?: string;
|
178
|
+
cameraLevel?: string;
|
179
|
+
noAccessories?: string;
|
180
|
+
getReady?: string;
|
181
|
+
}
|
182
|
+
|
183
|
+
export declare class FullScreenContainer extends HTMLElement {
|
184
|
+
private _root;
|
185
|
+
constructor();
|
186
|
+
}
|
187
|
+
|
188
|
+
export declare interface IFaceDetection {
|
189
|
+
locale?: Locales | string;
|
190
|
+
copyright?: boolean;
|
191
|
+
'camera-id'?: string;
|
192
|
+
'change-camera'?: boolean;
|
193
|
+
'start-screen'?: boolean;
|
194
|
+
'close-disabled'?: boolean;
|
195
|
+
'finish-screen'?: boolean;
|
196
|
+
}
|
197
|
+
|
198
|
+
export declare interface IFaceLiveness extends IFaceDetection {
|
199
|
+
url?: string;
|
200
|
+
'device-orientation'?: boolean;
|
201
|
+
}
|
202
|
+
|
203
|
+
export declare type Locales = 'ru' | 'en' | 'de' | 'pl' | 'it' | 'hu' | 'zh' | 'sk' | 'uk' | 'fr' | 'es' | 'pt' | 'ar' | 'nl' | 'id' | 'vi' | 'ko' | 'ms' | 'ro' | 'el' | 'tr' | 'ja' | 'cs' | 'th' | 'hi' | 'bn' | 'he' | 'fi' | 'sv' | 'da' | 'hr' | 'no' | string;
|
204
|
+
|
205
|
+
export declare enum RecordingProcess {
|
206
|
+
ASYNCHRONOUS_UPLOAD = 0,
|
207
|
+
SYNCHRONOUS_UPLOAD = 1,
|
208
|
+
NOT_UPLOAD = 2
|
209
|
+
}
|
210
|
+
|
211
|
+
declare enum ResponseCode {
|
212
|
+
EMPTY = -1,
|
213
|
+
ERROR = 0,
|
214
|
+
OK = 1,
|
215
|
+
TIMEOUT = 2
|
216
|
+
}
|
217
|
+
|
218
|
+
export { }
|
35
219
|
|
36
|
-
interface FaceTranslations {
|
37
|
-
showOnlyOneFace?: string;
|
38
|
-
preparingCamera?: string;
|
39
|
-
allowAccessCamera?: string;
|
40
|
-
somethingWentWrong?: string;
|
41
|
-
incorrectCameraId?: string;
|
42
|
-
checkCameraId?: string;
|
43
|
-
preparingService?: string;
|
44
|
-
allowAccessToCamera?: string;
|
45
|
-
error?: string;
|
46
|
-
versionNotSupported?: string;
|
47
|
-
updateBrowser?: string;
|
48
|
-
licenseError?: string;
|
49
|
-
licenseExpired?: string;
|
50
|
-
onlyPortraitOrientation?: string;
|
51
|
-
turnDeviceIntoPortrait?: string;
|
52
|
-
tryAgain?: string;
|
53
|
-
noCameraAvailable?: string;
|
54
|
-
checkCameraConnection?: string;
|
55
|
-
noMaskSunglassesHeaddress?: string;
|
56
|
-
ambientLighting?: string;
|
57
|
-
lookStraight?: string;
|
58
|
-
fitYourFace?: string;
|
59
|
-
moveCloser?: string;
|
60
|
-
moveAway?: string;
|
61
|
-
holdSteady?: string;
|
62
|
-
turnHead?: string;
|
63
|
-
processing?: string;
|
64
|
-
retryButtonText?: string;
|
65
|
-
followGuidelinesText?: string;
|
66
|
-
letsTryAgainTitle?: string;
|
67
|
-
noCameraPermission?: string;
|
68
|
-
goButton?: string;
|
69
|
-
centerFaceTurnHead?: string;
|
70
|
-
centerFace?: string;
|
71
|
-
selfieTime?: string;
|
72
|
-
errorCode?: string;
|
73
|
-
illumination?: string;
|
74
|
-
cameraLevel?: string;
|
75
|
-
noAccessories?: string;
|
76
|
-
getReady?: string;
|
77
|
-
}
|
78
|
-
|
79
|
-
type FaceDictionaries = Partial<Record<Locales, FaceTranslations>>;
|
80
|
-
|
81
|
-
type ErrorTypes =
|
82
|
-
| 'WASM_ERROR'
|
83
|
-
| 'UNKNOWN_ERROR'
|
84
|
-
| 'NOT_SUPPORTED'
|
85
|
-
| 'CAMERA_UNKNOWN_ERROR'
|
86
|
-
| 'CAMERA_PERMISSION_DENIED'
|
87
|
-
| 'NO_CAMERA'
|
88
|
-
| 'INCORRECT_CAMERA_ID'
|
89
|
-
| 'CONNECTION_ERROR'
|
90
|
-
| 'LANDSCAPE_MODE_RESTRICTED'
|
91
|
-
| 'TIMEOUT_ERROR'
|
92
|
-
| 'CHANGE_CAMERA'
|
93
|
-
| 'DEVICE_ROTATE'
|
94
|
-
| 'APP_INACTIVE'
|
95
|
-
| 'HTTP_NOT_SUPPORTED';
|
96
|
-
|
97
|
-
type FaceEventActions =
|
98
|
-
| 'ELEMENT_VISIBLE'
|
99
|
-
| 'PRESS_START_BUTTON'
|
100
|
-
| 'PRESS_RETRY_BUTTON'
|
101
|
-
| 'CLOSE'
|
102
|
-
| 'PROCESS_FINISHED'
|
103
|
-
| 'SERVICE_INITIALIZED'
|
104
|
-
| 'RETRY_COUNTER_EXCEEDED';
|
105
|
-
|
106
|
-
declare enum ResponseCode {
|
107
|
-
EMPTY = -1,
|
108
|
-
ERROR = 0,
|
109
|
-
OK = 1,
|
110
|
-
TIMEOUT = 2,
|
111
|
-
}
|
112
|
-
|
113
|
-
type CustomEventDataType<R> = {
|
114
|
-
status: ResponseCode;
|
115
|
-
reason?: ErrorTypes;
|
116
|
-
response?: R;
|
117
|
-
};
|
118
|
-
|
119
|
-
interface DetailEvent<A, R> {
|
120
|
-
action: A;
|
121
|
-
data: CustomEventDataType<R> | null;
|
122
|
-
}
|
123
|
-
|
124
|
-
type FaceLivenessResponseType = {
|
125
|
-
images: Array<string>;
|
126
|
-
code: number;
|
127
|
-
metadata: Record<string, any>;
|
128
|
-
estimatedAge: number | null;
|
129
|
-
tag: string;
|
130
|
-
status: number;
|
131
|
-
transactionId: string;
|
132
|
-
type: number;
|
133
|
-
};
|
134
|
-
|
135
|
-
type FaceDetectionResponseType = {
|
136
|
-
capture: Array<string>;
|
137
|
-
};
|
138
220
|
|
139
221
|
declare global {
|
140
222
|
interface HTMLElementEventMap {
|
@@ -143,104 +225,3 @@ declare global {
|
|
143
225
|
}
|
144
226
|
}
|
145
227
|
|
146
|
-
export interface IFaceDetection {
|
147
|
-
locale?: Locales | string;
|
148
|
-
copyright?: boolean;
|
149
|
-
'camera-id'?: string;
|
150
|
-
'change-camera'?: boolean;
|
151
|
-
'start-screen'?: boolean;
|
152
|
-
debug?: boolean;
|
153
|
-
'close-disabled'?: boolean;
|
154
|
-
'finish-screen'?: boolean;
|
155
|
-
}
|
156
|
-
|
157
|
-
export interface IFaceLiveness extends IFaceDetection {
|
158
|
-
url?: string;
|
159
|
-
'device-orientation'?: boolean;
|
160
|
-
}
|
161
|
-
|
162
|
-
export type ComputedCss = {
|
163
|
-
fontFamily?: string;
|
164
|
-
fontSize?: string;
|
165
|
-
onboardingScreenStartButtonBackground?: string;
|
166
|
-
onboardingScreenStartButtonBackgroundHover?: string;
|
167
|
-
onboardingScreenStartButtonTitle?: string;
|
168
|
-
onboardingScreenStartButtonTitleHover?: string;
|
169
|
-
onboardingScreenIllumination?: string;
|
170
|
-
onboardingScreenAccessories?: string;
|
171
|
-
onboardingScreenCameraLevel?: string;
|
172
|
-
cameraScreenSectorTarget?: string;
|
173
|
-
cameraScreenSectorActive?: string;
|
174
|
-
cameraScreenStrokeNormal?: string;
|
175
|
-
retryScreenRetryButtonBackground?: string;
|
176
|
-
retryScreenRetryButtonBackgroundHover?: string;
|
177
|
-
retryScreenRetryButtonTitle?: string;
|
178
|
-
retryScreenRetryButtonTitleHover?: string;
|
179
|
-
processingScreenProgress?: string;
|
180
|
-
cameraScreenFrontHintLabelBackground?: string;
|
181
|
-
cameraScreenFrontHintLabelText?: string;
|
182
|
-
successScreenImage?: string;
|
183
|
-
retryScreenEnvironmentImage?: string;
|
184
|
-
retryScreenPersonImage?: string;
|
185
|
-
};
|
186
|
-
|
187
|
-
declare enum RecordingProcess {
|
188
|
-
ASYNCHRONOUS_UPLOAD = 0,
|
189
|
-
SYNCHRONOUS_UPLOAD = 1,
|
190
|
-
NOT_UPLOAD = 2,
|
191
|
-
}
|
192
|
-
|
193
|
-
declare enum FaceLivenessType {
|
194
|
-
ACTIVE = 0,
|
195
|
-
PASSIVE = 1,
|
196
|
-
}
|
197
|
-
|
198
|
-
interface FaceDetectionSettings {
|
199
|
-
url?: string;
|
200
|
-
debug?: boolean;
|
201
|
-
locale?: Locales | string;
|
202
|
-
copyright?: boolean;
|
203
|
-
cameraId?: string;
|
204
|
-
changeCamera?: boolean;
|
205
|
-
closeDisabled?: boolean;
|
206
|
-
finishScreen?: boolean;
|
207
|
-
startScreen?: boolean;
|
208
|
-
customization?: ComputedCss;
|
209
|
-
nonce?: string;
|
210
|
-
rotationAngle?: number;
|
211
|
-
holdStillDuration?: number;
|
212
|
-
timeoutInterval?: number;
|
213
|
-
}
|
214
|
-
|
215
|
-
interface FaceLivenessSettings extends Omit<FaceDetectionSettings, 'holdStillDuration' | 'timeoutInterval'> {
|
216
|
-
url?: string;
|
217
|
-
deviceOrientation?: boolean;
|
218
|
-
videoRecording?: boolean;
|
219
|
-
tag?: string;
|
220
|
-
headers?: Record<string, string>;
|
221
|
-
retryCount?: number;
|
222
|
-
metadata?: Record<string, any>;
|
223
|
-
recordingProcess?: RecordingProcess;
|
224
|
-
livenessType?: FaceLivenessType;
|
225
|
-
}
|
226
|
-
|
227
|
-
export type FaceLivenessDetailType = DetailEvent<FaceEventActions, FaceLivenessResponseType>;
|
228
|
-
export type FaceCaptureDetailType = DetailEvent<FaceEventActions, FaceDetectionResponseType>;
|
229
|
-
|
230
|
-
export class FullScreenContainer extends HTMLElement {}
|
231
|
-
|
232
|
-
export class FaceDetectionWebComponent extends HTMLElement {
|
233
|
-
get version(): string;
|
234
|
-
set translations(dictionary: FaceDictionaries | null);
|
235
|
-
get translations(): FaceDictionaries | null;
|
236
|
-
get settings(): FaceDetectionSettings;
|
237
|
-
set settings(params: FaceDetectionSettings);
|
238
|
-
}
|
239
|
-
|
240
|
-
export class FaceLivenessWebComponent extends HTMLElement {
|
241
|
-
get version(): string;
|
242
|
-
set translations(dictionary: FaceDictionaries | null);
|
243
|
-
get translations(): FaceDictionaries | null;
|
244
|
-
get settings(): FaceLivenessSettings;
|
245
|
-
set settings(params: FaceLivenessSettings);
|
246
|
-
}
|