@regulaforensics/vp-frontend-face-components 8.4.2345-rc → 8.4.2346-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 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,33 @@ export declare class FaceDetectionWebComponent extends HTMLElement {
119
150
 
120
151
  export declare type FaceDictionaries = Partial<Record<Locales, FaceTranslations>>;
121
152
 
153
+ /** web component enroll response */
154
+ export declare type FaceEnrollResponseType = FaceLivenessResponseType & {
155
+ enrollResult: EnrollResult;
156
+ };
157
+
158
+ export declare interface FaceEnrollSettings extends FaceLivenessSettings {
159
+ enroll?: EnrollConfig;
160
+ }
161
+
162
+ export declare class FaceEnrollWebComponent extends HTMLElement {
163
+ private _root;
164
+ private _mounted;
165
+ private _translations;
166
+ constructor();
167
+ static get observedAttributes(): Array<string>;
168
+ private onEvent;
169
+ attributeChangedCallback(name: string): void;
170
+ connectedCallback(): void;
171
+ get version(): string;
172
+ set translations(dictionary: FaceDictionaries | null);
173
+ get translations(): FaceDictionaries | null;
174
+ set settings(params: FaceEnrollSettings);
175
+ get settings(): FaceEnrollSettings;
176
+ private render;
177
+ disconnectedCallback(): void;
178
+ }
179
+
122
180
  export declare const FaceEventActions: {
123
181
  readonly ELEMENT_VISIBLE: "ELEMENT_VISIBLE";
124
182
  readonly PRESS_START_BUTTON: "PRESS_START_BUTTON";
@@ -134,7 +192,7 @@ export declare type FaceEventActions = (typeof FaceEventActions)[keyof typeof Fa
134
192
 
135
193
  export declare type FaceLivenessDetailType = DetailEvent<FaceEventActions, FaceLivenessResponseType>;
136
194
 
137
- /** web component response */
195
+ /** web component liveness response */
138
196
  export declare type FaceLivenessResponseType = {
139
197
  images: Array<string>;
140
198
  code: number;
@@ -196,6 +254,33 @@ export declare class FaceLivenessWebComponent extends HTMLElement {
196
254
 
197
255
  export declare type FaceTranslations = Partial<Record<Labels, string>>;
198
256
 
257
+ /** web component verify response */
258
+ export declare type FaceVerifyResponseType = FaceLivenessResponseType & {
259
+ verifyResult: VerifyResult;
260
+ };
261
+
262
+ export declare interface FaceVerifySettings extends FaceLivenessSettings {
263
+ verify?: VerifyConfig;
264
+ }
265
+
266
+ export declare class FaceVerifyWebComponent extends HTMLElement {
267
+ private _root;
268
+ private _mounted;
269
+ private _translations;
270
+ constructor();
271
+ static get observedAttributes(): Array<string>;
272
+ private onEvent;
273
+ attributeChangedCallback(name: string): void;
274
+ connectedCallback(): void;
275
+ get version(): string;
276
+ set translations(dictionary: FaceDictionaries | null);
277
+ get translations(): FaceDictionaries | null;
278
+ set settings(params: FaceVerifySettings);
279
+ get settings(): FaceVerifySettings;
280
+ private render;
281
+ disconnectedCallback(): void;
282
+ }
283
+
199
284
  export declare class FullScreenContainer extends HTMLElement {
200
285
  private _root;
201
286
  constructor();
@@ -211,11 +296,19 @@ export declare interface IFaceDetection {
211
296
  'finish-screen'?: boolean;
212
297
  }
213
298
 
299
+ export declare interface IFaceEnroll extends IFaceLiveness {
300
+ enroll?: EnrollConfig;
301
+ }
302
+
214
303
  export declare interface IFaceLiveness extends IFaceDetection {
215
304
  url?: string;
216
305
  'device-orientation'?: boolean;
217
306
  }
218
307
 
308
+ export declare interface IFaceVerify extends IFaceLiveness {
309
+ verify?: VerifyConfig;
310
+ }
311
+
219
312
  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
313
 
221
314
  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 +319,17 @@ declare type LocalCodes = 'ru-RU' | 'en-US' | 'de-DE' | 'pl-PL' | 'it-IT' | 'hu-
226
319
 
227
320
  export declare type Locales = Languages | string;
228
321
 
322
+ declare type PersonResult = {
323
+ id: string;
324
+ createdAt: string;
325
+ updatedAt: string;
326
+ name: string | null;
327
+ externalId: string | null;
328
+ metadata: Record<string, any>;
329
+ groups: string[];
330
+ expireAt: string | null;
331
+ };
332
+
229
333
  export declare const RecordingProcess: {
230
334
  readonly ASYNCHRONOUS_UPLOAD: 0;
231
335
  readonly SYNCHRONOUS_UPLOAD: 1;
@@ -242,6 +346,63 @@ export declare const ResponseCode: {
242
346
 
243
347
  export declare type ResponseCode = (typeof ResponseCode)[keyof typeof ResponseCode];
244
348
 
349
+ declare type SearchPerson = {
350
+ name: string;
351
+ externalId: string;
352
+ metadata: Record<string, any>;
353
+ groups: string[];
354
+ expireAt: string;
355
+ id: string;
356
+ createdAt: string;
357
+ updatedAt: string;
358
+ detection: {
359
+ code: number;
360
+ crop: string;
361
+ detectorType: number;
362
+ hash: string;
363
+ idx: number;
364
+ image: string;
365
+ landmarks: number[];
366
+ landmarksType: number;
367
+ msg: string;
368
+ roi: number[];
369
+ versionSDK: string;
370
+ };
371
+ images: Array<{
372
+ id: string;
373
+ content: string;
374
+ contentType: string;
375
+ createdAt: string;
376
+ updatedAt: string;
377
+ path: string;
378
+ url: string;
379
+ metadata: Record<string, any>;
380
+ similarity: number;
381
+ distance: number;
382
+ }>;
383
+ };
384
+
385
+ declare type SearchResult = {
386
+ persons: SearchPerson[];
387
+ };
388
+
389
+ declare type VerifyConfig = {
390
+ personId: string;
391
+ threshold?: number;
392
+ } | {
393
+ externalId: string;
394
+ threshold?: number;
395
+ };
396
+
397
+ declare type VerifyResult = {
398
+ verified: boolean;
399
+ person: PersonResult | null;
400
+ match: {
401
+ verified: boolean;
402
+ similarity: number;
403
+ } | null;
404
+ };
405
+
245
406
  export { }
246
407
 
247
408
 
@@ -250,5 +411,7 @@ declare global {
250
411
  interface HTMLElementEventMap {
251
412
  'face-liveness': CustomEvent<FaceLivenessDetailType>;
252
413
  'face-capture': CustomEvent<FaceCaptureDetailType>;
414
+ 'face-enroll': CustomEvent<FaceEnrollDetailType>;
415
+ 'face-verify': CustomEvent<FaceVerifyDetailType>;
253
416
  }
254
417
  }