biometry-sdk 1.2.2 → 1.2.4

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,25 +1,16 @@
1
1
  # biometry-sdk
2
2
 
3
3
  ## Overview
4
- The **Biometry Web SDK** is a software development kit designed to simplify the integration of Biometry's API services into your web application. Providing tools, UI components, and utilities enables biometric onboarding (face and voice), liveness checks, and user consent.
5
-
4
+ The **Biometry Web SDK** is a software development kit (SDK) designed to facilitate the integration of Biometry's API services.
6
5
 
7
6
  ## Features
8
- - **Consent Management**:
9
- - Ask a permission to store their biometric data for authentication using Biometry.
10
- - Collect user permission to store their biometric data for authentication using Biometry.
11
- - Important: You must obtain consent before performing any onboarding or video processing.
12
- - **Voice onboarding**:
13
- - Enroll a user’s voice, creating a voice model for future authentication.
7
+ - **Consent management**: Ask a permission to store their biometric data for authentication using Biometry.
8
+ - **Voice onboarding**: Onboard voice for Voice Recognition.
14
9
  - **Face onboarding**: Onboard face for face recognition.
15
- - Onboard a user’s face for facial recognition.
16
- - **Face Onboarding UI Component:** A ready-to-use, customizable component for capturing and processing face data.
17
- - **Face match**:
18
- - Compares an extracted image from a user’s personal document to an image frame captured during onboarding or `/process-video.`
19
- - **Process video**:
20
- - Checks user liveness and authorizes users based on video input.
21
- - **Process Video UI Component:** A ready-to-use, customizable component for capturing and processing video.
22
-
10
+ - Includes a customizable **Face Onboarding UI Component** for streamlined user interactions.
11
+ - **Face match**: Compares extracted image from user’s personal document with the frame from the `/process-video.`
12
+ - **Process video**: Process the video through Biometry services to check liveness and authorize user.
13
+ - (UI Component for this feature coming soon)
23
14
 
24
15
  ## Installation
25
16
  ```bash
@@ -42,30 +33,31 @@ console.log(response);
42
33
 
43
34
  ## Example
44
35
 
45
- You can find an example in the example/ directory. The example demonstrates how you might integrate the BiometrySDK in a React component with the state.
36
+ You can find an example in the example/ directory. The example demonstrates how to integrate the SDK into a React app.
37
+
46
38
  ## UI Components
47
- The Biometry Web SDK includes reusable, customizable web components for crucial features. These components are easy to embed into your application and handle the most common biometric operations with minimal setup.
39
+ The **Biometry Web SDK** includes reusable and customizable web components for key features. These components make it simple to add biometric functionalities to your application.
48
40
 
49
41
  ### Face Onboarding Component
50
- This component provides an intuitive interface for onboarding users with their cameras. It integrates directly with the `BiometrySDK backend`, managing camera capture, consent checks, and error handling.
42
+ The `Face Onboarding` component provides an intuitive interface for onboarding users with their camera. It integrates with the `BiometrySDK` to handle backend communication and error states.
51
43
 
52
44
  ### Integration
53
45
  Here's how to integrate the `Face Onboarding` component into your application:
54
46
 
55
47
  **Option 1: Using npm (Recommended for full SDK usage)**
56
48
  1. Install the SDK package via **npm**:
57
- ```bash
58
- npm install biometry-sdk
59
- ```
49
+ ```bash
50
+ npm install biometry-sdk
51
+ ```
60
52
  2. Import the component in your **index.js** or equivalent JavaScript file:
61
- ```javascript
62
- // index.js
63
- import './node_modules/biometry-sdk/dist/components/biometry-onboarding.js';
64
- ```
53
+ ```javascript
54
+ // index.js
55
+ import './node_modules/biometry-sdk/dist/components/biometry-onboarding.js';
56
+ ```
65
57
  3. Connect the script to your **HTML file** and use the component:
66
- ```html
67
- <script type="module" src="./index.js"></script>
68
- ```
58
+ ```html
59
+ <script type="module" src="./index.js"></script>
60
+ ```
69
61
 
70
62
 
71
63
  **Option 2: Using CDN (Quick Integration)**
@@ -74,14 +66,9 @@ Here's how to integrate the `Face Onboarding` component into your application:
74
66
  ```
75
67
 
76
68
  ### Usage
77
- **Required attributes:**
78
- - `api-key`: Your Biometry API key.
79
- - `user-fullname`: The user’s full name (used in data storage and consent).
69
+ The `api-key` and `user-fullname` attributes are required for the component to function.
80
70
 
81
- **Slots:**
82
- - `video`: Your custom <video> element.
83
- - `button`: Custom capture button.
84
- - `loading`, `success`, `error-no-face`, `error-multiple-faces`, `error-not-centered`, `error-other`: Custom UI messages for different states.
71
+ Custom slots allow you to style and customize UI elements, loading, success, and error states.
85
72
 
86
73
  **Basic Usage**
87
74
  ```html
@@ -111,31 +98,38 @@ Here's how to integrate the `Face Onboarding` component into your application:
111
98
  ```
112
99
 
113
100
  ### Process Video Component
114
- The **Process Video** component enables you to record, upload, and process a video within your application. It integrates with Biometry's services to check liveness and authorize the user.
101
+ The Process Video component allows developers to record, upload, and process video directly within their applications through Biometry services to check liveness and authorize user.
115
102
 
116
103
  ### Integration
117
104
  **Option 1: Install via npm**
105
+
118
106
  1. To include the component in your project, install the biometry-sdk package:
119
- ```bash
120
- npm install biometry-sdk
121
- ```
107
+ ```bash
108
+ npm install biometry-sdk
109
+ ```
110
+
122
111
  2. After installation, import the component into your project:
123
- ```javascript
124
- // index.js
125
- import './node_modules/biometry-sdk/dist/components/process-video.js'
126
- ```
112
+ ```javascript
113
+ // index.js
114
+ import './node_modules/biometry-sdk/dist/components/process-video.js';
115
+ ```
116
+
127
117
  3. Include the component in your HTML:
128
- You can skip the npm installation and include the component directly in your HTML:
129
- ```html
130
- <script type="module" src="./index.js"></script>
131
- <process-video ...></process-video>
132
- ```
133
- **Option 2: Using CDN (Quick Integration)**
118
+ ```html
119
+ <script type="module" src="./index.js"></script>
120
+ <process-video ...></process-video>
121
+ ```
122
+
123
+ **Option 2: Import directly via CDN**
124
+
125
+ You can skip the npm installation and include the component directly in your HTML:
134
126
  ```html
135
127
  <script type="module" src="https://cdn.jsdelivr.net/npm/biometry-sdk/dist/components/process-video.js"></script>
136
128
  <process-video ...></process-video>
137
129
  ```
130
+
138
131
  ### Usage
132
+
139
133
  **Basic Usage**
140
134
  ```html
141
135
  <process-video
@@ -169,35 +163,16 @@ The **Process Video** component enables you to record, upload, and process a vid
169
163
  <div slot="success">Video submitted successfully!</div>
170
164
  </process-video>
171
165
  ```
172
- **Note:**
173
- - All default elements and messages are functional out-of-the-box.
174
- - Replace slots if you want to customize the UI or functionality.
175
- - Call giveConsent() before using any biometric methods to ensure compliance with data processing requirements.
176
-
177
- ## Best Practices
178
- 1. **Always Acquire Consent**
179
- - Before performing Face Onboarding or Process Video, you can call:
180
- ```javascript
181
- sdk.giveConsent(true, userFullName);
182
- ```
183
- - Or directly send a request to the `/consent` in the [official documentation](https://developer.biometrysolutions.com/overview/).
184
-
185
- This ensures legal compliance and user awareness when storing and processing biometric data.
186
- 3. **Handle Errors Gracefully**
187
- - The SDK methods throw errors if something goes wrong (e.g., network, permission, or detection errors). Use try/catch or .catch() to handle them.
188
- 4. **Security**
189
- - Protect your API key. Avoid exposing it in public repositories or client-side code if possible.
190
-
166
+
167
+ **Notes**
168
+ - By default, all elements are functional without customization. Replace slots only if customization is required.
169
+
170
+ - To regenerate the video preview or handle custom actions, use JavaScript to interact with the provided slots or the component's public methods.
171
+
191
172
  ## License
192
173
 
193
174
  This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details.
194
175
 
195
176
  ## More Information
196
- For more detailed information on Biometry’s API endpoints, parameters, and responses, visit the official [Biometry API Documentation](https://developer.biometrysolutions.com/overview/). If you have questions or need help, please reach out to our support team or create a GitHub issue.
197
-
198
- ## Quick Reference
199
- - Install: `npm install biometry-sdk`
200
- - Consent: `sdk.giveConsent(true, userFullName)` (Required before onboarding/processing)
201
- - Voice Onboarding: `sdk.enrollVoice(file, userFullName)`
202
- - Face Onboarding: `sdk.enrollFace(file, userFullName)`
203
- - Process Video: `sdk.processVideo(file, phrase, userFullName)`
177
+
178
+ For more detailed documentation on the Biometry API, visit the [official documentation](https://developer.biometrysolutions.com/overview/).