@regulaforensics/vp-frontend-face-components 8.4.2361-rc → 8.4.2363-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/dist/index.d.ts +168 -1
- package/dist/main.iife.js +20 -20
- package/dist/main.js +2874 -2378
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -49,6 +49,37 @@ export declare interface DetailEvent<A, R> {
|
|
|
49
49
|
data: CustomEventDataType<R> | null;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
+
declare type EnrollConfig = {
|
|
53
|
+
person: EnrollPersonConfig;
|
|
54
|
+
search?: EnrollSearchConfig;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
declare type EnrollPersonConfig = {
|
|
58
|
+
name?: string;
|
|
59
|
+
externalId?: string;
|
|
60
|
+
metadata?: Record<string, any>;
|
|
61
|
+
groups?: string[];
|
|
62
|
+
ttl?: number;
|
|
63
|
+
expireAt?: number;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
declare type EnrollResult = {
|
|
67
|
+
enrolled: boolean;
|
|
68
|
+
person: PersonResult | null;
|
|
69
|
+
search: SearchResult | null;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
declare type EnrollSearchConfig = {
|
|
73
|
+
groupIds?: string[];
|
|
74
|
+
filter?: {
|
|
75
|
+
op: string;
|
|
76
|
+
field: string;
|
|
77
|
+
value: string[];
|
|
78
|
+
};
|
|
79
|
+
threshold: number;
|
|
80
|
+
limit: number;
|
|
81
|
+
};
|
|
82
|
+
|
|
52
83
|
export declare const ErrorTypes: {
|
|
53
84
|
readonly WASM_ERROR: "WASM_ERROR";
|
|
54
85
|
readonly UNKNOWN_ERROR: "UNKNOWN_ERROR";
|
|
@@ -119,6 +150,35 @@ export declare class FaceDetectionWebComponent extends HTMLElement {
|
|
|
119
150
|
|
|
120
151
|
export declare type FaceDictionaries = Partial<Record<Locales, FaceTranslations>>;
|
|
121
152
|
|
|
153
|
+
export declare type FaceEnrollDetailType = DetailEvent<FaceEventActions, FaceEnrollResponseType>;
|
|
154
|
+
|
|
155
|
+
/** web component enroll response */
|
|
156
|
+
export declare type FaceEnrollResponseType = FaceLivenessResponseType & {
|
|
157
|
+
enrollResult: EnrollResult;
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
export declare interface FaceEnrollSettings extends FaceLivenessSettings {
|
|
161
|
+
enroll?: EnrollConfig;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
export declare class FaceEnrollWebComponent extends HTMLElement {
|
|
165
|
+
private _root;
|
|
166
|
+
private _mounted;
|
|
167
|
+
private _translations;
|
|
168
|
+
constructor();
|
|
169
|
+
static get observedAttributes(): Array<string>;
|
|
170
|
+
private onEvent;
|
|
171
|
+
attributeChangedCallback(name: string): void;
|
|
172
|
+
connectedCallback(): void;
|
|
173
|
+
get version(): string;
|
|
174
|
+
set translations(dictionary: FaceDictionaries | null);
|
|
175
|
+
get translations(): FaceDictionaries | null;
|
|
176
|
+
set settings(params: FaceEnrollSettings);
|
|
177
|
+
get settings(): FaceEnrollSettings;
|
|
178
|
+
private render;
|
|
179
|
+
disconnectedCallback(): void;
|
|
180
|
+
}
|
|
181
|
+
|
|
122
182
|
export declare const FaceEventActions: {
|
|
123
183
|
readonly ELEMENT_VISIBLE: "ELEMENT_VISIBLE";
|
|
124
184
|
readonly PRESS_START_BUTTON: "PRESS_START_BUTTON";
|
|
@@ -134,7 +194,7 @@ export declare type FaceEventActions = (typeof FaceEventActions)[keyof typeof Fa
|
|
|
134
194
|
|
|
135
195
|
export declare type FaceLivenessDetailType = DetailEvent<FaceEventActions, FaceLivenessResponseType>;
|
|
136
196
|
|
|
137
|
-
/** web component response */
|
|
197
|
+
/** web component liveness response */
|
|
138
198
|
export declare type FaceLivenessResponseType = {
|
|
139
199
|
images: Array<string>;
|
|
140
200
|
code: number;
|
|
@@ -196,6 +256,35 @@ export declare class FaceLivenessWebComponent extends HTMLElement {
|
|
|
196
256
|
|
|
197
257
|
export declare type FaceTranslations = Partial<Record<Labels, string>>;
|
|
198
258
|
|
|
259
|
+
export declare type FaceVerifyDetailType = DetailEvent<FaceEventActions, FaceVerifyResponseType>;
|
|
260
|
+
|
|
261
|
+
/** web component verify response */
|
|
262
|
+
export declare type FaceVerifyResponseType = FaceLivenessResponseType & {
|
|
263
|
+
verifyResult: VerifyResult;
|
|
264
|
+
};
|
|
265
|
+
|
|
266
|
+
export declare interface FaceVerifySettings extends FaceLivenessSettings {
|
|
267
|
+
verify?: VerifyConfig;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
export declare class FaceVerifyWebComponent extends HTMLElement {
|
|
271
|
+
private _root;
|
|
272
|
+
private _mounted;
|
|
273
|
+
private _translations;
|
|
274
|
+
constructor();
|
|
275
|
+
static get observedAttributes(): Array<string>;
|
|
276
|
+
private onEvent;
|
|
277
|
+
attributeChangedCallback(name: string): void;
|
|
278
|
+
connectedCallback(): void;
|
|
279
|
+
get version(): string;
|
|
280
|
+
set translations(dictionary: FaceDictionaries | null);
|
|
281
|
+
get translations(): FaceDictionaries | null;
|
|
282
|
+
set settings(params: FaceVerifySettings);
|
|
283
|
+
get settings(): FaceVerifySettings;
|
|
284
|
+
private render;
|
|
285
|
+
disconnectedCallback(): void;
|
|
286
|
+
}
|
|
287
|
+
|
|
199
288
|
export declare class FullScreenContainer extends HTMLElement {
|
|
200
289
|
private _root;
|
|
201
290
|
constructor();
|
|
@@ -211,11 +300,19 @@ export declare interface IFaceDetection {
|
|
|
211
300
|
'finish-screen'?: boolean;
|
|
212
301
|
}
|
|
213
302
|
|
|
303
|
+
export declare interface IFaceEnroll extends IFaceLiveness {
|
|
304
|
+
enroll?: EnrollConfig;
|
|
305
|
+
}
|
|
306
|
+
|
|
214
307
|
export declare interface IFaceLiveness extends IFaceDetection {
|
|
215
308
|
url?: string;
|
|
216
309
|
'device-orientation'?: boolean;
|
|
217
310
|
}
|
|
218
311
|
|
|
312
|
+
export declare interface IFaceVerify extends IFaceLiveness {
|
|
313
|
+
verify?: VerifyConfig;
|
|
314
|
+
}
|
|
315
|
+
|
|
219
316
|
declare type Labels = 'showOnlyOneFace' | 'preparingCamera' | 'allowAccessCamera' | 'somethingWentWrong' | 'incorrectCameraId' | 'checkCameraId' | 'preparingService' | 'allowAccessToCamera' | 'error' | 'versionNotSupported' | 'updateBrowser' | 'licenseError' | 'licenseExpired' | 'onlyPortraitOrientation' | 'turnDeviceIntoPortrait' | 'tryAgain' | 'noCameraAvailable' | 'checkCameraConnection' | 'noMaskSunglassesHeaddress' | 'ambientLighting' | 'lookStraight' | 'fitYourFace' | 'moveCloser' | 'moveAway' | 'holdSteady' | 'takeAPhoto' | 'turnHead' | 'removeOcclusion' | 'turnHeadUp' | 'turnHeadDown' | 'turnHeadLeft' | 'turnHeadRight' | 'blinkYourEyes' | 'processing' | 'retryButtonText' | 'followGuidelinesText' | 'letsTryAgainTitle' | 'noCameraPermission' | 'goButton' | 'centerFaceTurnHead' | 'centerFace' | 'selfieTime' | 'errorCode' | 'illumination' | 'cameraLevel' | 'noAccessories' | 'getReady' | 'httpNotSupported' | 'webServerNotCompatible' | 'processCompleted' | 'notSufficientQuality' | 'cleanCameraLens' | 'addMoreLight' | 'wipeOutOcclusions' | 'changeBackground' | 'tooMuchTurn' | 'makeFaceFullyVisible' | 'done' | 'close';
|
|
220
317
|
|
|
221
318
|
declare type LanguageCodes = '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' | 'uz' | 'ku' | 'tg' | 'ky' | 'hy';
|
|
@@ -226,6 +323,17 @@ declare type LocalCodes = 'ru-RU' | 'en-US' | 'de-DE' | 'pl-PL' | 'it-IT' | 'hu-
|
|
|
226
323
|
|
|
227
324
|
export declare type Locales = Languages | string;
|
|
228
325
|
|
|
326
|
+
declare type PersonResult = {
|
|
327
|
+
id: string;
|
|
328
|
+
createdAt: string;
|
|
329
|
+
updatedAt: string;
|
|
330
|
+
name: string | null;
|
|
331
|
+
externalId: string | null;
|
|
332
|
+
metadata: Record<string, any>;
|
|
333
|
+
groups: string[];
|
|
334
|
+
expireAt: string | null;
|
|
335
|
+
};
|
|
336
|
+
|
|
229
337
|
export declare const RecordingProcess: {
|
|
230
338
|
readonly ASYNCHRONOUS_UPLOAD: 0;
|
|
231
339
|
readonly SYNCHRONOUS_UPLOAD: 1;
|
|
@@ -242,6 +350,63 @@ export declare const ResponseCode: {
|
|
|
242
350
|
|
|
243
351
|
export declare type ResponseCode = (typeof ResponseCode)[keyof typeof ResponseCode];
|
|
244
352
|
|
|
353
|
+
declare type SearchPerson = {
|
|
354
|
+
name: string;
|
|
355
|
+
externalId: string;
|
|
356
|
+
metadata: Record<string, any>;
|
|
357
|
+
groups: string[];
|
|
358
|
+
expireAt: string;
|
|
359
|
+
id: string;
|
|
360
|
+
createdAt: string;
|
|
361
|
+
updatedAt: string;
|
|
362
|
+
detection: {
|
|
363
|
+
code: number;
|
|
364
|
+
crop: string;
|
|
365
|
+
detectorType: number;
|
|
366
|
+
hash: string;
|
|
367
|
+
idx: number;
|
|
368
|
+
image: string;
|
|
369
|
+
landmarks: number[];
|
|
370
|
+
landmarksType: number;
|
|
371
|
+
msg: string;
|
|
372
|
+
roi: number[];
|
|
373
|
+
versionSDK: string;
|
|
374
|
+
};
|
|
375
|
+
images: Array<{
|
|
376
|
+
id: string;
|
|
377
|
+
content: string;
|
|
378
|
+
contentType: string;
|
|
379
|
+
createdAt: string;
|
|
380
|
+
updatedAt: string;
|
|
381
|
+
path: string;
|
|
382
|
+
url: string;
|
|
383
|
+
metadata: Record<string, any>;
|
|
384
|
+
similarity: number;
|
|
385
|
+
distance: number;
|
|
386
|
+
}>;
|
|
387
|
+
};
|
|
388
|
+
|
|
389
|
+
declare type SearchResult = {
|
|
390
|
+
persons: SearchPerson[];
|
|
391
|
+
};
|
|
392
|
+
|
|
393
|
+
declare type VerifyConfig = {
|
|
394
|
+
personId: string;
|
|
395
|
+
threshold?: number;
|
|
396
|
+
} | {
|
|
397
|
+
externalId: string;
|
|
398
|
+
threshold?: number;
|
|
399
|
+
};
|
|
400
|
+
|
|
401
|
+
declare type VerifyResult = {
|
|
402
|
+
verified: boolean;
|
|
403
|
+
person: PersonResult | null;
|
|
404
|
+
match: {
|
|
405
|
+
verified: boolean;
|
|
406
|
+
similarity: number;
|
|
407
|
+
} | null;
|
|
408
|
+
};
|
|
409
|
+
|
|
245
410
|
export { }
|
|
246
411
|
|
|
247
412
|
|
|
@@ -250,5 +415,7 @@ declare global {
|
|
|
250
415
|
interface HTMLElementEventMap {
|
|
251
416
|
'face-liveness': CustomEvent<FaceLivenessDetailType>;
|
|
252
417
|
'face-capture': CustomEvent<FaceCaptureDetailType>;
|
|
418
|
+
'face-enroll': CustomEvent<FaceEnrollDetailType>;
|
|
419
|
+
'face-verify': CustomEvent<FaceVerifyDetailType>;
|
|
253
420
|
}
|
|
254
421
|
}
|