@regulaforensics/idv-face 3.1.239 → 3.2.3-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 CHANGED
@@ -1,6 +1,35 @@
1
- # Face-idv module
1
+ # Face-IDV Module
2
2
 
3
+ The **idv-face** module is an npm package plugin designed to work with **FaceSDK** via a Web Component:
4
+ https://www.npmjs.com/package/@regulaforensics/vp-frontend-face-components
3
5
 
4
- Module which works with face web component.
6
+ It is delivered as part of the **IDV Capturing** solution and has a version synchronized with **idv-capture-web**. Currently, compatibility is guaranteed at the **major.minor** version level.
7
+
8
+ ## What the Module Is
9
+
10
+ The module is an **npm package** that **exports a Web Component**, inside which the **Lit** framework (LitJS) is used for rendering and component logic.
11
+
12
+ ## FaceSDK Versioning
13
+
14
+ This module declares a **peerDependency** on:
15
+ https://www.npmjs.com/package/@regulaforensics/vp-frontend-face-components
16
+ to ensure compatibility with specific versions of FaceSDK.
17
+
18
+ - If the root project already has a version of `vp-frontend-face-components` installed and it matches the allowed versions in `peerDependencies`, that version will be used.
19
+ - If the installed version does **not** match, then starting from **npm v7+**, npm will automatically install a suitable version.
20
+ - In earlier versions of npm, the application developer must manually install the required compatible version.
21
+
22
+ ## How It Works
23
+
24
+ The module receives typed configuration data following the unified interface used by all **idv-capture-web** modules.
25
+ The type definitions for the Face-IDV module configuration are located inside this package.
26
+
27
+ The Web Component then interacts with `vp-frontend-face-components`, which communicates with the **FaceSDK service**.
28
+
29
+ ## Module Output
30
+
31
+ The result of execution can be either:
32
+
33
+ - **Data** for submission to the platform, or
34
+ - A typed **BaseError**, which contains detailed information explaining why the module failed.
5
35
 
6
- Exports React component which can be used in Idv-capture-web-components and IDV Platform
package/dist/index.d.ts CHANGED
@@ -1,38 +1,31 @@
1
- import { FaceLivenessDetailType } from '@regulaforensics/vp-frontend-face-components';
2
- import { FaceLivenessWebComponent } from '@regulaforensics/vp-frontend-face-components';
1
+ import { LitElement } from 'lit';
3
2
  import { RecordingProcess } from '@regulaforensics/vp-frontend-face-components';
3
+ import { TemplateResult } from 'lit-html';
4
4
 
5
5
  declare abstract class BaseModule<TModuleProps = unknown, TModulesConfig = unknown> extends HTMLElement {
6
6
  abstract props: IdvModuleProps<TModuleProps, TModulesConfig> | null;
7
7
  abstract setProps(config: IdvModuleProps<TModuleProps, TModulesConfig>): void;
8
8
  }
9
9
 
10
- declare class FaceIdv extends BaseModule<FaceIdvProps, FaceIdvModulesConfig> {
11
- props: IdvModuleProps<FaceIdvProps, FaceIdvModulesConfig> | null;
12
- webComponent: FaceLivenessWebComponent | null;
13
- private _mounted;
14
- private _isFinishWithExitOnce;
15
- constructor();
16
- static displayName: string;
17
- listener: (data: CustomEvent<FaceLivenessDetailType>) => void;
18
- setProps(props: IdvModuleProps<FaceIdvProps, FaceIdvModulesConfig>): void;
19
- connectedCallback(): void;
20
- render(): void;
21
- disconnectedCallback(): void;
10
+ export declare class FaceIdv extends LitElement implements BaseModule<FaceModuleProps, object> {
11
+ props: IdvModuleProps<FaceModuleProps, object> | null;
12
+ setProps(props: IdvModuleProps<FaceModuleProps, object>): void;
22
13
  static isReady(): boolean;
23
14
  static getSupportedTemplates: () => FaceIdvSteps[];
24
- static initialize(modulesConfig: Record<string, unknown>): void;
15
+ static initialize(_modulesConfig: Record<string, unknown>): void;
25
16
  static deinitialize(): void;
26
17
  static getIdentifier: () => string;
18
+ static displayName: string;
19
+ render(): TemplateResult<1>;
27
20
  }
28
- export { FaceIdv }
29
- export default FaceIdv;
30
21
 
31
- declare type FaceIdvModulesConfig = object;
22
+ declare enum FaceIdvSteps {
23
+ LIVENESS = "LIVENESS"
24
+ }
32
25
 
33
- declare type FaceIdvProps = {
26
+ declare type FaceModuleProps = {
34
27
  config?: {
35
- skipSteps?: ['ONBOARDING_STEP' | 'SUCCESS_STEP'];
28
+ skipSteps?: Array<'ONBOARDING_STEP' | 'SUCCESS_STEP'>;
36
29
  attemptsCount?: number;
37
30
  copyright?: boolean;
38
31
  recordingProcess?: RecordingProcessKeys;
@@ -44,6 +37,44 @@ declare type FaceIdvProps = {
44
37
  workerPath?: string;
45
38
  detectOcclusion?: boolean;
46
39
  metadata?: Record<string, unknown>;
40
+ nonce?: string;
41
+ };
42
+ customization?: {
43
+ onboardingScreenStartButtonBackground?: string;
44
+ onboardingScreenStartButtonTitle?: string;
45
+ onboardingScreenIllumination?: string;
46
+ onboardingScreenAccessories?: string;
47
+ onboardingScreenCameraLevel?: string;
48
+ cameraScreenFrontHintLabelText?: string;
49
+ cameraScreenFrontHintLabelBackground?: string;
50
+ cameraScreenStrokeNormal?: string;
51
+ cameraScreenSectorTarget?: string;
52
+ cameraScreenSectorActive?: string;
53
+ processingScreenProgress?: string;
54
+ successScreenImage?: string;
55
+ retryScreenRetryButtonTitle?: string;
56
+ retryScreenRetryButtonBackground?: string;
57
+ retryScreenHintSubject?: string;
58
+ retryScreenHintEnvironment?: string;
59
+ onboardingScreenStartButton?: string;
60
+ onboardingScreenTitleLabelText?: string;
61
+ onboardingScreenTitleLabel?: string;
62
+ onboardingScreenSubtitleLabelText?: string;
63
+ onboardingScreenSubtitleLabel?: string;
64
+ cameraScreenHintLabel?: string;
65
+ retryScreenTitleLabelText?: string;
66
+ retryScreenTitleLabel?: string;
67
+ retryScreenSubtitleLabelText?: string;
68
+ retryScreenSubtitleLabel?: string;
69
+ retryScreenHintLabelsText?: string;
70
+ retryScreenHintLabels?: string;
71
+ retryScreenRetryButton?: string;
72
+ fontSize?: string;
73
+ fontFamily?: string;
74
+ onboardingScreenStartButtonBackgroundHover?: string;
75
+ onboardingScreenStartButtonTitleHover?: string;
76
+ retryScreenRetryButtonTitleHover?: string;
77
+ retryScreenRetryButtonBackgroundHover?: string;
47
78
  };
48
79
  copyright: boolean;
49
80
  serviceURL?: string;
@@ -54,18 +85,21 @@ declare type FaceIdvProps = {
54
85
  serviceToken?: string;
55
86
  };
56
87
 
57
- declare enum FaceIdvSteps {
58
- LIVENESS = "LIVENESS"
59
- }
60
-
61
88
  declare type IdvModuleProps<TModuleProps, TModulesConfig> = {
62
89
  isProcessing?: (isProcessing: boolean) => void;
63
90
  moduleProps: TModuleProps;
64
91
  modulesConfig?: TModulesConfig;
65
- perform: (data: any) => void;
92
+ perform: (data: any, type?: PerformType) => void;
66
93
  idvEventListener: (module: string, data: any) => void;
67
94
  };
68
95
 
96
+ declare type PerformType = (typeof performType)[keyof typeof performType] | undefined;
97
+
98
+ declare const performType: {
99
+ readonly FORM: "form";
100
+ readonly DATA: "data";
101
+ };
102
+
69
103
  declare type RecordingProcessKeys = keyof typeof RecordingProcess;
70
104
 
71
105
  export { }