biometry-sdk 2.1.1 → 2.2.0
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 +13 -124
- package/dist/index.d.ts +0 -1
- package/dist/sdk.js +1 -1
- package/dist/sdk.js.map +1 -1
- package/package.json +2 -10
- package/dist/react.js +0 -1328
- package/dist/react.js.map +0 -1
- package/dist/ui/biometry-enrollment.d.ts +0 -24
- package/dist/ui/index.d.ts +0 -2
- package/dist/ui/process-video.d.ts +0 -50
- package/dist/ui/react/BiometryEnrollment.d.ts +0 -16
- package/dist/ui/react/ProcessVideo.d.ts +0 -25
- package/dist/ui/react/index.d.ts +0 -4
- package/dist/ui/types.d.ts +0 -12
- package/dist/ui.js +0 -1245
- package/dist/ui.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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
|
|
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 and utilities enables biometric enrollment (face and voice), liveness checks, and user consent.
|
|
5
5
|
|
|
6
6
|
## Table of Contents:
|
|
7
7
|
- [Installation](#installation)
|
|
@@ -16,9 +16,6 @@ The **Biometry Web SDK** is a software development kit designed to simplify the
|
|
|
16
16
|
- [Typical FaceMatch Flow](#typical-facematch-flow)
|
|
17
17
|
- [Error Handling](#error-handling)
|
|
18
18
|
- [Security And Privacy Considerations](#security-and-privacy-considerations)
|
|
19
|
-
- [UI Components](#ui-components)
|
|
20
|
-
- [Face Enrollment Component](#face-enrollment-component)
|
|
21
|
-
- [Process Video Component](#process-video-component)
|
|
22
19
|
- [License](#license)
|
|
23
20
|
- [More Information](#more-information)
|
|
24
21
|
- [Quick Reference](#quick-reference)
|
|
@@ -69,7 +66,7 @@ You **must** obtain user authorization consent before performing any biometric o
|
|
|
69
66
|
});
|
|
70
67
|
```
|
|
71
68
|
- The first argument (`true`) indicates that the user has granted consent.
|
|
72
|
-
- The second argument is the user
|
|
69
|
+
- The second argument is the user's full name (used for record-keeping within Biometry).
|
|
73
70
|
|
|
74
71
|
#### 2.2 Give Storage Consent
|
|
75
72
|
You **must** obtain user consent before storing biometric data (Face Enrollment, Voice Enrollment):
|
|
@@ -81,10 +78,10 @@ You **must** obtain user consent before storing biometric data (Face Enrollment,
|
|
|
81
78
|
});
|
|
82
79
|
```
|
|
83
80
|
- The first argument (`true`) indicates that the user has granted consent.
|
|
84
|
-
- The second argument is the user
|
|
81
|
+
- The second argument is the user's full name (used for record-keeping within Biometry).
|
|
85
82
|
|
|
86
83
|
### 3. Face Enrollment
|
|
87
|
-
Enroll a user
|
|
84
|
+
Enroll a user's face for future recognition or matching:
|
|
88
85
|
```javascript
|
|
89
86
|
const faceFile = new File([/* face image bytes */], 'face.jpg', { type: 'image/jpeg' });
|
|
90
87
|
|
|
@@ -94,7 +91,7 @@ Enroll a user’s face for future recognition or matching:
|
|
|
94
91
|
```
|
|
95
92
|
|
|
96
93
|
### 4. Voice Enrollment
|
|
97
|
-
Enroll a user
|
|
94
|
+
Enroll a user's voice for future authentication checks:
|
|
98
95
|
```javascript
|
|
99
96
|
const voiceFile = new File([/* voice audio bytes */], 'voice.wav', { type: 'audio/wav' });
|
|
100
97
|
|
|
@@ -103,7 +100,7 @@ Enroll a user’s voice for future authentication checks:
|
|
|
103
100
|
console.log('Voice Enrollment Response:', voiceResponse);
|
|
104
101
|
```
|
|
105
102
|
### 5. Process Video
|
|
106
|
-
Process a user
|
|
103
|
+
Process a user's video for liveness checks and identity authorization:
|
|
107
104
|
```javascript
|
|
108
105
|
const videoFile = new File([/* file parts */], 'video.mp4', { type: 'video/mp4' });
|
|
109
106
|
const phrase = "one two three four five six";
|
|
@@ -171,16 +168,16 @@ DocAuth is a way to authenticate a user's document. It is useful when you want t
|
|
|
171
168
|
## Advanced Usage And Best Practices
|
|
172
169
|
### Typical FaceMatch Flow
|
|
173
170
|
One common advanced scenario involves document authentication in enrollment face and face matching:
|
|
174
|
-
1. Face Enrollment: Capture the user
|
|
175
|
-
2. Process Video: Capture the user
|
|
176
|
-
3. Face Match: Compare the extracted face from the document with the user
|
|
171
|
+
1. Face Enrollment: Capture the user's live face or the user uploads a picture of their identity document (front side with the face)
|
|
172
|
+
2. Process Video: Capture the user's live face
|
|
173
|
+
3. Face Match: Compare the extracted face from the document with the user's live face to verify identity.
|
|
177
174
|
|
|
178
175
|
Below is a possible flow (method names in your SDK may vary slightly depending on your integration setup):
|
|
179
176
|
```javascript
|
|
180
177
|
// 1. Acquire user storage consent
|
|
181
178
|
await sdk.giveStorageConsent(true, userFullName);
|
|
182
179
|
|
|
183
|
-
// 2. Enroll or capture the user
|
|
180
|
+
// 2. Enroll or capture the user's face
|
|
184
181
|
// (Either using enrollFace or processVideo, depending on your user flow)
|
|
185
182
|
const userFaceFile = new File([/* user selfie bytes */], 'image.jpg', { type: 'image/jpeg' });
|
|
186
183
|
const userVideoFile = new File([/* user selfie bytes */], 'video.mp4', { type: 'video/*' });
|
|
@@ -189,7 +186,7 @@ Below is a possible flow (method names in your SDK may vary slightly depending o
|
|
|
189
186
|
// 3. Acquire user authorization consent. It's required to use enrolled face for using biometric data.
|
|
190
187
|
await sdk.giveAuthorizationConsent(true, userFullName);
|
|
191
188
|
|
|
192
|
-
// 4. Face Match (Compare video face with user
|
|
189
|
+
// 4. Face Match (Compare video face with user's enrolled face)
|
|
193
190
|
const faceMatchResponse = await sdk.faceMatch(
|
|
194
191
|
userFaceFile,
|
|
195
192
|
userVideoFile,
|
|
@@ -198,7 +195,7 @@ Below is a possible flow (method names in your SDK may vary slightly depending o
|
|
|
198
195
|
|
|
199
196
|
// 5. Evaluate the faceMatch result
|
|
200
197
|
if (faceMatchResponse.matchResult === 'match') {
|
|
201
|
-
console.log('User video face matches user
|
|
198
|
+
console.log('User video face matches user's live face. Identity verified!');
|
|
202
199
|
} else {
|
|
203
200
|
console.log('User video face does NOT match. Additional verification needed.');
|
|
204
201
|
}
|
|
@@ -229,117 +226,9 @@ Always wrap calls in try/catch and provide user-friendly messages or fallback lo
|
|
|
229
226
|
3. **Data Minimization:** Only store data that is required for your use case.
|
|
230
227
|
4. **Regulatory Compliance:** Check local regulations (GDPR, CCPA, etc.) for storing and processing biometric data.
|
|
231
228
|
|
|
232
|
-
## UI Components
|
|
233
|
-
In addition to direct SDK methods, the Biometry Web SDK offers reusable Web Components that handle user interactions (camera, video recording, error states) automatically.
|
|
234
|
-
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.
|
|
235
|
-
|
|
236
|
-
### Integration
|
|
237
|
-
**Option 1: Using npm (Recommended for full SDK usage)**
|
|
238
|
-
1. Install the SDK package via **npm**:
|
|
239
|
-
```bash
|
|
240
|
-
npm install biometry-sdk
|
|
241
|
-
```
|
|
242
|
-
2. Import the component in your **index.js** or equivalent JavaScript file:
|
|
243
|
-
```javascript
|
|
244
|
-
// index.js
|
|
245
|
-
import './node_modules/biometry-sdk/dist/biometry-sdk.esm.js';
|
|
246
|
-
```
|
|
247
|
-
**Option 2: Using CDN (Quick Integration)**
|
|
248
|
-
```html
|
|
249
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/biometry-sdk/dist/biometry-sdk.esm.js"></script>
|
|
250
|
-
```
|
|
251
|
-
|
|
252
|
-
### Face Enrollment Component
|
|
253
|
-
This component provides an intuitive interface for enrollment users with their cameras. It integrates directly with the `BiometrySDK backend`, managing camera capture, consent checks, and error handling.
|
|
254
|
-
|
|
255
|
-
### Usage
|
|
256
|
-
**Required attributes:**
|
|
257
|
-
- `api-key`: Your Biometry API key.
|
|
258
|
-
- `user-fullname`: The user’s full name (used in data storage and consent).
|
|
259
|
-
|
|
260
|
-
**Slots:**
|
|
261
|
-
- `video`: Your custom `<video>` element.
|
|
262
|
-
- `button`: Custom capture button.
|
|
263
|
-
- `loading`, `success`, `error-no-face`, `error-multiple-faces`, `error-not-centered`, `error-other`: Custom UI messages for different states.
|
|
264
|
-
|
|
265
|
-
**Basic Usage**
|
|
266
|
-
```html
|
|
267
|
-
<biometry-enrollment
|
|
268
|
-
api-key="your-api-key"
|
|
269
|
-
user-fullname="John Doe">
|
|
270
|
-
</biometry-enrollment>
|
|
271
|
-
```
|
|
272
|
-
|
|
273
|
-
**Advanced Usage**
|
|
274
|
-
```html
|
|
275
|
-
<biometry-enrollment
|
|
276
|
-
api-key="your-api-key"
|
|
277
|
-
user-fullname="John Doe">
|
|
278
|
-
|
|
279
|
-
<video slot="video" autoplay playsinline style="width: 100%; border-radius: 10px;"></video>
|
|
280
|
-
<button slot="button" style="padding: 10px 20px; font-size: 16px;">Capture</button>
|
|
281
|
-
|
|
282
|
-
<!-- Custom Status Messages -->
|
|
283
|
-
<div slot="loading">Please wait while we process your photo...</div>
|
|
284
|
-
<div slot="success">Congratulations! You have been enrolled.</div>
|
|
285
|
-
<div slot="error-no-face">No face detected. Make sure your face is visible.</div>
|
|
286
|
-
<div slot="error-multiple-faces">Multiple faces detected. Please try again alone.</div>
|
|
287
|
-
<div slot="error-not-centered">Align your face with the center of the screen.</div>
|
|
288
|
-
<div slot="error-other">Oops! Something went wrong. Please try again.</div>
|
|
289
|
-
</biometry-enrollment>
|
|
290
|
-
```
|
|
291
|
-
|
|
292
|
-
### Process Video Component
|
|
293
|
-
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.
|
|
294
|
-
|
|
295
|
-
### Usage
|
|
296
|
-
**Basic Usage**
|
|
297
|
-
```html
|
|
298
|
-
<process-video
|
|
299
|
-
api-key="your-api-key"
|
|
300
|
-
user-fullname="John Doe"
|
|
301
|
-
></process-video>
|
|
302
|
-
```
|
|
303
|
-
|
|
304
|
-
**Advanced Usage**
|
|
305
|
-
```html
|
|
306
|
-
<process-video
|
|
307
|
-
api-key="eyJhb...apikey"
|
|
308
|
-
user-fullname="John Doe"
|
|
309
|
-
>
|
|
310
|
-
<!-- Custom video element -->
|
|
311
|
-
<video slot="video" muted playsinline style="border-radius: 1rem;"></video>
|
|
312
|
-
|
|
313
|
-
<!-- Custom buttons -->
|
|
314
|
-
<button slot="record-button">Custom Record</button>
|
|
315
|
-
<button slot="stop-button">Custom Stop</button>
|
|
316
|
-
|
|
317
|
-
<!-- Custom file input -->
|
|
318
|
-
<input slot="file-input" type="file" accept="video/*" />
|
|
319
|
-
|
|
320
|
-
<!-- Custom submit button -->
|
|
321
|
-
<button slot="submit-button">Custom Submit</button>
|
|
322
|
-
|
|
323
|
-
<!-- Custom messages -->
|
|
324
|
-
<div slot="loading">Processing...</div>
|
|
325
|
-
<div slot="error">An error occurred. Please try again.</div>
|
|
326
|
-
<div slot="success">Video submitted successfully!</div>
|
|
327
|
-
</process-video>
|
|
328
|
-
```
|
|
329
|
-
**Note:**
|
|
330
|
-
- All default elements and messages are functional out-of-the-box.
|
|
331
|
-
- Replace slots if you want to customize the UI or functionality.
|
|
332
|
-
- Call giveConsent() before using any biometric methods to ensure compliance with data processing requirements.
|
|
333
|
-
|
|
334
229
|
## License
|
|
335
230
|
|
|
336
231
|
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details.
|
|
337
232
|
|
|
338
233
|
## More Information
|
|
339
|
-
For more detailed information on Biometry
|
|
340
|
-
|
|
341
|
-
- **UI Components:**
|
|
342
|
-
- `<biometry-enrollment ...>` (face enrollment)
|
|
343
|
-
- `<process-video ...>` (video enrollment)
|
|
344
|
-
With these **direct SDK methods**, **UI components**, and advanced **best practices** (faceEnroll + faceMatch flows, reuse of video, error handling), you can build robust, privacy-conscious biometric solutions on your web application.
|
|
345
|
-
|
|
234
|
+
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.
|
package/dist/index.d.ts
CHANGED
package/dist/sdk.js
CHANGED
|
@@ -204,7 +204,7 @@ class BiometrySDK {
|
|
|
204
204
|
if (props?.deviceInfo) {
|
|
205
205
|
headers['X-Device-Info'] = JSON.stringify(props.deviceInfo);
|
|
206
206
|
}
|
|
207
|
-
return await this.request('/api-gateway/check
|
|
207
|
+
return await this.request('/api-gateway/docauth/check', 'POST', formData, headers);
|
|
208
208
|
}
|
|
209
209
|
/**
|
|
210
210
|
* Matches a user's face from video against a reference image.
|
package/dist/sdk.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk.js","sources":["../src/sdk/index.ts"],"sourcesContent":["import { ApiResponse } from \"../types/internal\";\nimport { DocAuthInfo } from \"../types/biometry/doc-auth\";\nimport { ConsentResponse } from \"../types/biometry/consent\";\nimport { FaceEnrollmentResponse, VoiceEnrollmentResponse } from \"../types/biometry/enrollment\";\nimport { FaceMatchResponse } from \"../types/biometry/face-match\";\nimport { ProcessVideoResponse } from \"../types/biometry/process-video\";\nimport { SessionResponse } from \"../types/biometry/session\";\n\nexport class BiometrySDK {\n private apiKey: string;\n private static readonly BASE_URL: string = 'https://api.biometrysolutions.com'; //'https://dev-console.biometrysolutions.com';\n\n constructor(apiKey: string) {\n if (!apiKey) {\n throw new Error('API Key is required to initialize the SDK.');\n }\n\n this.apiKey = apiKey;\n }\n\n private async request<T>(path: string, method: string, body?: any, headers?: Record<string, string>):\n Promise<ApiResponse<T>> {\n const defaultHeaders: HeadersInit = {\n Authorization: `Bearer ${this.apiKey}`,\n };\n\n const requestHeaders = { ...defaultHeaders, ...headers };\n\n if (body && !(body instanceof FormData)) {\n requestHeaders['Content-Type'] = 'application/json';\n body = JSON.stringify(body);\n }\n const response = await fetch(`${BiometrySDK.BASE_URL}${path}`, {\n method,\n headers: requestHeaders,\n body,\n });\n\n if (!response.ok) {\n const errorData = await response.json().catch(() => ({}));\n const errorMessage = errorData?.error || errorData?.message || 'Unknown error occurred';\n\n throw new Error(`Error ${response.status}: ${errorMessage}`);\n }\n\n // Extract response headers\n const responseHeaders: Record<string, string> = {};\n const requestId = response.headers.get(\"X-Request-Id\");\n if (requestId) {\n responseHeaders[\"X-Request-Id\"] = requestId;\n }\n\n const responseBody = await response.json();\n\n return {\n body: responseBody as T,\n headers: responseHeaders\n };\n }\n\n /**\n * Starts a new Session for a user.\n * \n * @returns {Promise<ApiResponse<SessionResponse>>} A promise resolving to the session ID.\n * @throws {Error} - If the request fails.\n */\n async startSession(): Promise<ApiResponse<SessionResponse>> {\n return await this.request<SessionResponse>(\n '/api-gateway/sessions/start',\n 'POST'\n );\n }\n\n /**\n * Submits Authorization consent for a user.\n * Authorization Consent is required to use the services like Face and Voice recognition.\n * \n * @param {boolean} isConsentGiven - Indicates whether the user has given consent.\n * @param {string} userFullName - The full name of the user giving consent.\n * @param {Object} [props] - Optional properties for the consent request.\n * @param {string} [props.sessionId] - Session ID to link this consent with a specific session group.\n * @param {object} [props.deviceInfo] - Device information object containing details about the user's device.\n * This can include properties like operating system, browser, etc.\n * @returns {Promise<ApiResponse<ConsentResponse>>} A promise resolving to the consent response.\n * @throws {Error} - If the user's full name is not provided or if the request fails.\n */\n async giveAuthorizationConsent(\n isConsentGiven: boolean,\n userFullName: string,\n props?: {\n sessionId?: string,\n deviceInfo?: object,\n }\n ): Promise<ApiResponse<ConsentResponse>> {\n if (!userFullName) {\n throw new Error('User Full Name is required to give consent.');\n }\n\n const body = {\n is_consent_given: isConsentGiven,\n user_fullname: userFullName,\n };\n\n const headers: Record<string, string> = {};\n\n if (props?.sessionId) {\n headers['X-Session-ID'] = props.sessionId;\n }\n\n if (props?.deviceInfo) {\n headers['X-Device-Info'] = JSON.stringify(props.deviceInfo);\n }\n\n return await this.request<ConsentResponse>(\n '/api-consent/consent',\n 'POST',\n body,\n headers\n );\n }\n\n /**\n * Submits Storage consent for a user.\n * Storage consent is granted by users, allowing us to store their biometric data for future verification.\n * \n * @param {boolean} isStorageConsentGiven - Indicates whether the user has given storage consent.\n * @param {string} userFullName - The full name of the user giving storage consent.\n * @param {Object} [props] - Optional properties for the consent request.\n * @param {string} [props.sessionId] - Session ID to link this consent with a specific session group.\n * @param {object} [props.deviceInfo] - Device information object containing details about the user's device.\n * This can include properties like operating system, browser, etc.\n * @returns {Promise<ApiResponse<ConsentResponse>>} A promise resolving to the consent response.\n * @throws {Error} - If the user's full name is not provided or if the request fails.\n */\n async giveStorageConsent(\n isStorageConsentGiven: boolean,\n userFullName: string,\n props?: {\n sessionId?: string,\n deviceInfo?: object,\n }\n ): Promise<ApiResponse<ConsentResponse>> {\n if (!userFullName) {\n throw new Error('User Full Name is required to give storage consent.');\n }\n\n const body = {\n is_consent_given: isStorageConsentGiven,\n user_fullname: userFullName,\n };\n\n const headers: Record<string, string> = {};\n\n if (props?.sessionId) {\n headers['X-Session-ID'] = props.sessionId;\n }\n\n if (props?.deviceInfo) {\n headers['X-Device-Info'] = JSON.stringify(props.deviceInfo);\n }\n\n return await this.request<ConsentResponse>(\n '/api-consent/strg-consent',\n 'POST',\n body,\n headers\n );\n }\n\n /**\n * Enrolls a user's voice for biometric authentication.\n * \n * @param {File} audio - The audio file containing the user's voice.\n * @param {string} userFullName - The full name of the user being enrolled.\n * @param {string} uniqueId - A unique identifier for the enrolling process.\n * @param {string} phrase - The phrase spoken in the audio file.\n * @param {Object} [props] - Optional properties for the enrollment request.\n * @param {string} [props.sessionId] - Session ID to link this enrollment with a specific session group.\n * @param {object} [props.deviceInfo] - Device information object containing details about the user's device.\n * This can include properties like operating system, browser, etc.\n * @returns {Promise<ApiResponse<VoiceEnrollmentResponse>>} - A promise resolving to the voice enrolling response.\n * @throws {Error} - If required parameters are missing or the request fails.\n */\n async enrollVoice(\n audio: File,\n userFullName: string,\n uniqueId: string,\n phrase: string,\n props?: {\n sessionId?: string,\n deviceInfo?: object,\n }\n ): Promise<ApiResponse<VoiceEnrollmentResponse>> {\n if (!userFullName) throw new Error('User fullname is required.');\n if (!uniqueId) throw new Error('Unique ID is required.');\n if (!phrase) throw new Error('Phrase is required.');\n if (!audio) throw new Error('Audio file is required.');\n\n const formData = new FormData();\n formData.append('unique_id', uniqueId);\n formData.append('phrase', phrase);\n formData.append('voice', audio);\n\n const headers: Record<string, string> = {\n 'X-User-Fullname': userFullName,\n };\n\n if (props?.sessionId) {\n headers['X-Session-ID'] = props.sessionId;\n }\n\n if (props?.deviceInfo) {\n headers['X-Device-Info'] = JSON.stringify(props.deviceInfo);\n }\n\n return await this.request<VoiceEnrollmentResponse>(\n '/api-gateway/enroll/voice',\n 'POST',\n formData,\n headers\n );\n }\n\n /**\n * Enrolls a user's face for biometric authentication.\n * \n * @param {File} face - Image file that contains user's face.\n * @param {string} userFullName - The full name of the user being enrolled.\n * @param {string} isDocument - Indicates whether the image is a document.\n * @param {Object} [props] - Optional properties for the enrollment request.\n * @param {string} [props.sessionId] - Session ID to link this enrollment with a specific session group.\n * @param {object} [props.deviceInfo] - Device information object containing details about the user's device.\n * This can include properties like operating system, browser, etc.\n * @returns {Promise<ApiResponse<FaceEnrollmentResponse>>} - A promise resolving to the voice enrolling response.\n * @throws {Error} - If required parameters are missing or the request fails.\n */\n async enrollFace(face: File, userFullName: string, isDocument?: boolean, props?: {\n sessionId?: string,\n deviceInfo?: object,\n }):\n Promise<ApiResponse<FaceEnrollmentResponse>> {\n if (!userFullName) throw new Error('User fullname is required.');\n if (!face) throw new Error('Face image is required.');\n\n const formData = new FormData();\n formData.append('face', face);\n if (isDocument) {\n formData.append('is_document', 'true');\n }\n\n const headers: Record<string, string> = {\n 'X-User-Fullname': userFullName,\n };\n\n if (props?.sessionId) {\n headers['X-Session-ID'] = props.sessionId;\n }\n\n if (props?.deviceInfo) {\n headers['X-Device-Info'] = JSON.stringify(props.deviceInfo);\n }\n\n return await this.request<FaceEnrollmentResponse>(\n '/api-gateway/enroll/face',\n 'POST',\n formData,\n headers\n );\n }\n\n /**\n * Check the validity of a documents.\n * \n * @param {File} document - Document image file.\n * @param {string} userFullName - The full name of the user being checked.\n * @param {Object} [props] - Optional properties for the enrollment request.\n * @param {string} [props.sessionId] - Session ID to link this enrollment with a specific session group.\n * @param {object} [props.deviceInfo] - Device information object containing details about the user's device.\n * This can include properties like operating system, browser, etc.\n * @returns {Promise<ApiResponse<DocAuthInfo>>} - A promise resolving to the document authentication information.\n */\n async checkDocAuth(\n document: File,\n userFullName: string,\n props?: {\n sessionId?: string,\n deviceInfo?: object,\n }\n ): Promise<ApiResponse<DocAuthInfo>> {\n if (!document) throw new Error('Document image is required.');\n if (!userFullName) throw new Error('User fullname is required.');\n\n const formData = new FormData();\n formData.append('document', document);\n\n const headers: Record<string, string> = {\n 'X-User-Fullname': userFullName,\n };\n\n if (props?.sessionId) {\n headers['X-Session-ID'] = props.sessionId;\n }\n\n if (props?.deviceInfo) {\n headers['X-Device-Info'] = JSON.stringify(props.deviceInfo);\n }\n\n return await this.request<DocAuthInfo>(\n '/api-gateway/check-doc-auth',\n 'POST',\n formData,\n headers\n );\n }\n\n /**\n * Matches a user's face from video against a reference image.\n * \n * @param {File} image - Reference image file that contains user's face.\n * @param {string} video - Video file that contains user's face.\n * @param {string} userFullName - Pass the full name of end-user to process Voice and Face recognition services.\n * @param {string} processVideoRequestId - ID from the response header of /process-video endpoint.\n * @param {boolean} usePrefilledVideo - Pass true to use the video from the process-video endpoint.\n * @param {Object} [props] - Optional properties for the enrollment request.\n * @param {string} [props.sessionId] - Session ID to link this enrollment with a specific session group.\n * @param {object} [props.deviceInfo] - Device information object containing details about the user's device.\n * This can include properties like operating system, browser, etc.\n * @returns {Promise<FaceMatchResponse>} - A promise resolving to the voice enrolling response.\n * @throws {Error} - If required parameters are missing or the request fails.\n */\n async matchFaces(\n image: File,\n video?: File,\n userFullName?: string,\n usePrefilledVideo?: boolean,\n props?: {\n sessionId?: string,\n deviceInfo?: object,\n }\n ): Promise<ApiResponse<FaceMatchResponse>> {\n if (!image) throw new Error('Face image is required.');\n if ((!usePrefilledVideo) && !video) throw new Error('Video is required.');\n if (usePrefilledVideo && !props?.sessionId) throw new Error('Session ID is required to use a video from the process-video endpoint.');\n\n const formData = new FormData();\n if (video) {\n formData.append('video', video);\n }\n formData.append('image', image);\n\n const headers: Record<string, string> = {};\n\n if (userFullName) {\n headers['X-User-Fullname'] = userFullName;\n }\n\n if (usePrefilledVideo) {\n headers['X-Use-Prefilled-Video'] = 'true';\n }\n\n if (props?.sessionId) {\n headers['X-Session-ID'] = props.sessionId;\n }\n\n if (props?.deviceInfo) {\n headers['X-Device-Info'] = JSON.stringify(props.deviceInfo);\n }\n\n return await this.request<FaceMatchResponse>(\n '/api-gateway/match-faces',\n 'POST',\n formData,\n headers\n );\n }\n\n /**\n * Process the video through Biometry services to check liveness and authorize user\n * \n * @param {File} video - Video file that you want to process.\n * @param {string} phrase - Set of numbers that user needs to say out loud in the video.\n * @param {string} userFullName - Pass the full name of end-user to process Voice and Face recognition services.\n * @param {Object} [props] - Optional properties for the enrollment request.\n * @param {string} [props.sessionId] - Session ID to link this enrollment with a specific session group.\n * @param {object} [props.deviceInfo] - Device information object containing details about the user's device.\n * This can include properties like operating system, browser, etc.\n * @returns {Promise<ApiResponse<ProcessVideoResponse>>} - A promise resolving to the process video response.\n */\n async processVideo(\n video: File,\n phrase: string,\n userFullName?: string,\n props?: {\n sessionId?: string,\n deviceInfo?: object,\n }\n ): Promise<ApiResponse<ProcessVideoResponse>> {\n if (!video) throw new Error('Video is required.');\n if (!phrase) throw new Error('Phrase is required.');\n\n const formData = new FormData();\n formData.append('phrase', phrase);\n formData.append('video', video);\n\n const headers: Record<string, string> = {};\n\n if (userFullName) {\n headers['X-User-Fullname'] = userFullName;\n }\n\n if (props?.sessionId) {\n headers['X-Session-ID'] = props.sessionId;\n }\n\n if (props?.deviceInfo) {\n headers['X-Device-Info'] = JSON.stringify(props.deviceInfo);\n }\n\n return await this.request<ProcessVideoResponse>(\n '/api-gateway/process-video',\n 'POST',\n formData,\n headers\n );\n }\n}"],"names":[],"mappings":"MAQa,WAAW,CAAA;AAItB,IAAA,WAAA,CAAY,MAAc,EAAA;QACxB,IAAI,CA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cAAc,CAAC,GAAG,KAAK,CAAC,SAAS;QAC3C;AAEA,QAAA,IAAI,KAAK,EAAE,UAAU,EAAE;AACrB,YAAA,OAAO,CAAC,eAAe,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,UAAU,CAAC;QAC7D;AAEA,QAAA,OAAO,MAAM,IAAI,CAAC,OAAO,CACvB,4BAA4B,EAC5B,MAAM,EACN,QAAQ,EACR,OAAO,CACR;IACH;;AA9ZwB,WAAA,CAAA,QAAQ,GAAW,mCAAmC,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"sdk.js","sources":["../src/sdk/index.ts"],"sourcesContent":["import { ApiResponse } from \"../types/internal\";\nimport { DocAuthInfo } from \"../types/biometry/doc-auth\";\nimport { ConsentResponse } from \"../types/biometry/consent\";\nimport { FaceEnrollmentResponse, VoiceEnrollmentResponse } from \"../types/biometry/enrollment\";\nimport { FaceMatchResponse } from \"../types/biometry/face-match\";\nimport { ProcessVideoResponse } from \"../types/biometry/process-video\";\nimport { SessionResponse } from \"../types/biometry/session\";\n\nexport class BiometrySDK {\n private apiKey: string;\n private static readonly BASE_URL: string = 'https://api.biometrysolutions.com'; //'https://dev-console.biometrysolutions.com';\n\n constructor(apiKey: string) {\n if (!apiKey) {\n throw new Error('API Key is required to initialize the SDK.');\n }\n\n this.apiKey = apiKey;\n }\n\n private async request<T>(path: string, method: string, body?: any, headers?: Record<string, string>):\n Promise<ApiResponse<T>> {\n const defaultHeaders: HeadersInit = {\n Authorization: `Bearer ${this.apiKey}`,\n };\n\n const requestHeaders = { ...defaultHeaders, ...headers };\n\n if (body && !(body instanceof FormData)) {\n requestHeaders['Content-Type'] = 'application/json';\n body = JSON.stringify(body);\n }\n const response = await fetch(`${BiometrySDK.BASE_URL}${path}`, {\n method,\n headers: requestHeaders,\n body,\n });\n\n if (!response.ok) {\n const errorData = await response.json().catch(() => ({}));\n const errorMessage = errorData?.error || errorData?.message || 'Unknown error occurred';\n\n throw new Error(`Error ${response.status}: ${errorMessage}`);\n }\n\n // Extract response headers\n const responseHeaders: Record<string, string> = {};\n const requestId = response.headers.get(\"X-Request-Id\");\n if (requestId) {\n responseHeaders[\"X-Request-Id\"] = requestId;\n }\n\n const responseBody = await response.json();\n\n return {\n body: responseBody as T,\n headers: responseHeaders\n };\n }\n\n /**\n * Starts a new Session for a user.\n * \n * @returns {Promise<ApiResponse<SessionResponse>>} A promise resolving to the session ID.\n * @throws {Error} - If the request fails.\n */\n async startSession(): Promise<ApiResponse<SessionResponse>> {\n return await this.request<SessionResponse>(\n '/api-gateway/sessions/start',\n 'POST'\n );\n }\n\n /**\n * Submits Authorization consent for a user.\n * Authorization Consent is required to use the services like Face and Voice recognition.\n * \n * @param {boolean} isConsentGiven - Indicates whether the user has given consent.\n * @param {string} userFullName - The full name of the user giving consent.\n * @param {Object} [props] - Optional properties for the consent request.\n * @param {string} [props.sessionId] - Session ID to link this consent with a specific session group.\n * @param {object} [props.deviceInfo] - Device information object containing details about the user's device.\n * This can include properties like operating system, browser, etc.\n * @returns {Promise<ApiResponse<ConsentResponse>>} A promise resolving to the consent response.\n * @throws {Error} - If the user's full name is not provided or if the request fails.\n */\n async giveAuthorizationConsent(\n isConsentGiven: boolean,\n userFullName: string,\n props?: {\n sessionId?: string,\n deviceInfo?: object,\n }\n ): Promise<ApiResponse<ConsentResponse>> {\n if (!userFullName) {\n throw new Error('User Full Name is required to give consent.');\n }\n\n const body = {\n is_consent_given: isConsentGiven,\n user_fullname: userFullName,\n };\n\n const headers: Record<string, string> = {};\n\n if (props?.sessionId) {\n headers['X-Session-ID'] = props.sessionId;\n }\n\n if (props?.deviceInfo) {\n headers['X-Device-Info'] = JSON.stringify(props.deviceInfo);\n }\n\n return await this.request<ConsentResponse>(\n '/api-consent/consent',\n 'POST',\n body,\n headers\n );\n }\n\n /**\n * Submits Storage consent for a user.\n * Storage consent is granted by users, allowing us to store their biometric data for future verification.\n * \n * @param {boolean} isStorageConsentGiven - Indicates whether the user has given storage consent.\n * @param {string} userFullName - The full name of the user giving storage consent.\n * @param {Object} [props] - Optional properties for the consent request.\n * @param {string} [props.sessionId] - Session ID to link this consent with a specific session group.\n * @param {object} [props.deviceInfo] - Device information object containing details about the user's device.\n * This can include properties like operating system, browser, etc.\n * @returns {Promise<ApiResponse<ConsentResponse>>} A promise resolving to the consent response.\n * @throws {Error} - If the user's full name is not provided or if the request fails.\n */\n async giveStorageConsent(\n isStorageConsentGiven: boolean,\n userFullName: string,\n props?: {\n sessionId?: string,\n deviceInfo?: object,\n }\n ): Promise<ApiResponse<ConsentResponse>> {\n if (!userFullName) {\n throw new Error('User Full Name is required to give storage consent.');\n }\n\n const body = {\n is_consent_given: isStorageConsentGiven,\n user_fullname: userFullName,\n };\n\n const headers: Record<string, string> = {};\n\n if (props?.sessionId) {\n headers['X-Session-ID'] = props.sessionId;\n }\n\n if (props?.deviceInfo) {\n headers['X-Device-Info'] = JSON.stringify(props.deviceInfo);\n }\n\n return await this.request<ConsentResponse>(\n '/api-consent/strg-consent',\n 'POST',\n body,\n headers\n );\n }\n\n /**\n * Enrolls a user's voice for biometric authentication.\n * \n * @param {File} audio - The audio file containing the user's voice.\n * @param {string} userFullName - The full name of the user being enrolled.\n * @param {string} uniqueId - A unique identifier for the enrolling process.\n * @param {string} phrase - The phrase spoken in the audio file.\n * @param {Object} [props] - Optional properties for the enrollment request.\n * @param {string} [props.sessionId] - Session ID to link this enrollment with a specific session group.\n * @param {object} [props.deviceInfo] - Device information object containing details about the user's device.\n * This can include properties like operating system, browser, etc.\n * @returns {Promise<ApiResponse<VoiceEnrollmentResponse>>} - A promise resolving to the voice enrolling response.\n * @throws {Error} - If required parameters are missing or the request fails.\n */\n async enrollVoice(\n audio: File,\n userFullName: string,\n uniqueId: string,\n phrase: string,\n props?: {\n sessionId?: string,\n deviceInfo?: object,\n }\n ): Promise<ApiResponse<VoiceEnrollmentResponse>> {\n if (!userFullName) throw new Error('User fullname is required.');\n if (!uniqueId) throw new Error('Unique ID is required.');\n if (!phrase) throw new Error('Phrase is required.');\n if (!audio) throw new Error('Audio file is required.');\n\n const formData = new FormData();\n formData.append('unique_id', uniqueId);\n formData.append('phrase', phrase);\n formData.append('voice', audio);\n\n const headers: Record<string, string> = {\n 'X-User-Fullname': userFullName,\n };\n\n if (props?.sessionId) {\n headers['X-Session-ID'] = props.sessionId;\n }\n\n if (props?.deviceInfo) {\n headers['X-Device-Info'] = JSON.stringify(props.deviceInfo);\n }\n\n return await this.request<VoiceEnrollmentResponse>(\n '/api-gateway/enroll/voice',\n 'POST',\n formData,\n headers\n );\n }\n\n /**\n * Enrolls a user's face for biometric authentication.\n * \n * @param {File} face - Image file that contains user's face.\n * @param {string} userFullName - The full name of the user being enrolled.\n * @param {string} isDocument - Indicates whether the image is a document.\n * @param {Object} [props] - Optional properties for the enrollment request.\n * @param {string} [props.sessionId] - Session ID to link this enrollment with a specific session group.\n * @param {object} [props.deviceInfo] - Device information object containing details about the user's device.\n * This can include properties like operating system, browser, etc.\n * @returns {Promise<ApiResponse<FaceEnrollmentResponse>>} - A promise resolving to the voice enrolling response.\n * @throws {Error} - If required parameters are missing or the request fails.\n */\n async enrollFace(face: File, userFullName: string, isDocument?: boolean, props?: {\n sessionId?: string,\n deviceInfo?: object,\n }):\n Promise<ApiResponse<FaceEnrollmentResponse>> {\n if (!userFullName) throw new Error('User fullname is required.');\n if (!face) throw new Error('Face image is required.');\n\n const formData = new FormData();\n formData.append('face', face);\n if (isDocument) {\n formData.append('is_document', 'true');\n }\n\n const headers: Record<string, string> = {\n 'X-User-Fullname': userFullName,\n };\n\n if (props?.sessionId) {\n headers['X-Session-ID'] = props.sessionId;\n }\n\n if (props?.deviceInfo) {\n headers['X-Device-Info'] = JSON.stringify(props.deviceInfo);\n }\n\n return await this.request<FaceEnrollmentResponse>(\n '/api-gateway/enroll/face',\n 'POST',\n formData,\n headers\n );\n }\n\n /**\n * Check the validity of a documents.\n * \n * @param {File} document - Document image file.\n * @param {string} userFullName - The full name of the user being checked.\n * @param {Object} [props] - Optional properties for the enrollment request.\n * @param {string} [props.sessionId] - Session ID to link this enrollment with a specific session group.\n * @param {object} [props.deviceInfo] - Device information object containing details about the user's device.\n * This can include properties like operating system, browser, etc.\n * @returns {Promise<ApiResponse<DocAuthInfo>>} - A promise resolving to the document authentication information.\n */\n async checkDocAuth(\n document: File,\n userFullName: string,\n props?: {\n sessionId?: string,\n deviceInfo?: object,\n }\n ): Promise<ApiResponse<DocAuthInfo>> {\n if (!document) throw new Error('Document image is required.');\n if (!userFullName) throw new Error('User fullname is required.');\n\n const formData = new FormData();\n formData.append('document', document);\n\n const headers: Record<string, string> = {\n 'X-User-Fullname': userFullName,\n };\n\n if (props?.sessionId) {\n headers['X-Session-ID'] = props.sessionId;\n }\n\n if (props?.deviceInfo) {\n headers['X-Device-Info'] = JSON.stringify(props.deviceInfo);\n }\n\n return await this.request<DocAuthInfo>(\n '/api-gateway/docauth/check',\n 'POST',\n formData,\n headers\n );\n }\n\n /**\n * Matches a user's face from video against a reference image.\n * \n * @param {File} image - Reference image file that contains user's face.\n * @param {string} video - Video file that contains user's face.\n * @param {string} userFullName - Pass the full name of end-user to process Voice and Face recognition services.\n * @param {string} processVideoRequestId - ID from the response header of /process-video endpoint.\n * @param {boolean} usePrefilledVideo - Pass true to use the video from the process-video endpoint.\n * @param {Object} [props] - Optional properties for the enrollment request.\n * @param {string} [props.sessionId] - Session ID to link this enrollment with a specific session group.\n * @param {object} [props.deviceInfo] - Device information object containing details about the user's device.\n * This can include properties like operating system, browser, etc.\n * @returns {Promise<FaceMatchResponse>} - A promise resolving to the voice enrolling response.\n * @throws {Error} - If required parameters are missing or the request fails.\n */\n async matchFaces(\n image: File,\n video?: File,\n userFullName?: string,\n usePrefilledVideo?: boolean,\n props?: {\n sessionId?: string,\n deviceInfo?: object,\n }\n ): Promise<ApiResponse<FaceMatchResponse>> {\n if (!image) throw new Error('Face image is required.');\n if ((!usePrefilledVideo) && !video) throw new Error('Video is required.');\n if (usePrefilledVideo && !props?.sessionId) throw new Error('Session ID is required to use a video from the process-video endpoint.');\n\n const formData = new FormData();\n if (video) {\n formData.append('video', video);\n }\n formData.append('image', image);\n\n const headers: Record<string, string> = {};\n\n if (userFullName) {\n headers['X-User-Fullname'] = userFullName;\n }\n\n if (usePrefilledVideo) {\n headers['X-Use-Prefilled-Video'] = 'true';\n }\n\n if (props?.sessionId) {\n headers['X-Session-ID'] = props.sessionId;\n }\n\n if (props?.deviceInfo) {\n headers['X-Device-Info'] = JSON.stringify(props.deviceInfo);\n }\n\n return await this.request<FaceMatchResponse>(\n '/api-gateway/match-faces',\n 'POST',\n formData,\n headers\n );\n }\n\n /**\n * Process the video through Biometry services to check liveness and authorize user\n * \n * @param {File} video - Video file that you want to process.\n * @param {string} phrase - Set of numbers that user needs to say out loud in the video.\n * @param {string} userFullName - Pass the full name of end-user to process Voice and Face recognition services.\n * @param {Object} [props] - Optional properties for the enrollment request.\n * @param {string} [props.sessionId] - Session ID to link this enrollment with a specific session group.\n * @param {object} [props.deviceInfo] - Device information object containing details about the user's device.\n * This can include properties like operating system, browser, etc.\n * @returns {Promise<ApiResponse<ProcessVideoResponse>>} - A promise resolving to the process video response.\n */\n async processVideo(\n video: File,\n phrase: string,\n userFullName?: string,\n props?: {\n sessionId?: string,\n deviceInfo?: object,\n }\n ): Promise<ApiResponse<ProcessVideoResponse>> {\n if (!video) throw new Error('Video is required.');\n if (!phrase) throw new Error('Phrase is required.');\n\n const formData = new FormData();\n formData.append('phrase', phrase);\n formData.append('video', video);\n\n const headers: Record<string, string> = {};\n\n if (userFullName) {\n headers['X-User-Fullname'] = userFullName;\n }\n\n if (props?.sessionId) {\n headers['X-Session-ID'] = props.sessionId;\n }\n\n if (props?.deviceInfo) {\n headers['X-Device-Info'] = JSON.stringify(props.deviceInfo);\n }\n\n return await this.request<ProcessVideoResponse>(\n '/api-gateway/process-video',\n 'POST',\n formData,\n headers\n );\n }\n}"],"names":[],"mappings":"MAQa,WAAW,CAAA;AAItB,IAAA,W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,SAAS,EAAE;AACpB,YAAA,OAAO,CAAC,cAAc,CAAC,GAAG,KAAK,CAAC,SAAS;QAC3C;AAEA,QAAA,IAAI,KAAK,EAAE,UAAU,EAAE;AACrB,YAAA,OAAO,CAAC,eAAe,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,UAAU,CAAC;QAC7D;AAEA,QAAA,OAAO,MAAM,IAAI,CAAC,OAAO,CACvB,4BAA4B,EAC5B,MAAM,EACN,QAAQ,EACR,OAAO,CACR;IACH;;AA9ZwB,WAAA,CAAA,QAAQ,GAAW,mCAAmC,CAAC;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "biometry-sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/sdk.js",
|
|
6
6
|
"module": "dist/sdk.js",
|
|
@@ -13,14 +13,6 @@
|
|
|
13
13
|
"./sdk": {
|
|
14
14
|
"import": "./dist/sdk.js",
|
|
15
15
|
"types": "./dist/sdk/index.d.ts"
|
|
16
|
-
},
|
|
17
|
-
"./ui": {
|
|
18
|
-
"import": "./dist/ui.js",
|
|
19
|
-
"types": "./dist/ui/index.d.ts"
|
|
20
|
-
},
|
|
21
|
-
"./react": {
|
|
22
|
-
"import": "./dist/react.js",
|
|
23
|
-
"types": "./dist/ui/react/index.d.ts"
|
|
24
16
|
}
|
|
25
17
|
},
|
|
26
18
|
"files": [
|
|
@@ -56,4 +48,4 @@
|
|
|
56
48
|
"dependencies": {
|
|
57
49
|
"fix-webm-duration": "^1.0.6"
|
|
58
50
|
}
|
|
59
|
-
}
|
|
51
|
+
}
|