youverify-liveness-web 0.1.0 → 0.1.1
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 +4 -3
- package/dist/index.d.ts +8 -2
- package/dist/index.js +950 -881
- package/dist/index.umd.cjs +11 -11
- package/package.json +11 -39
package/README.md
CHANGED
|
@@ -41,7 +41,7 @@ This could also be called with an array of tasks. The supplied tasks override th
|
|
|
41
41
|
|
|
42
42
|
```js
|
|
43
43
|
const tasks = [{ id: "complete-the-circle" }];
|
|
44
|
-
yvLiveness.start();
|
|
44
|
+
yvLiveness.start(tasks);
|
|
45
45
|
```
|
|
46
46
|
|
|
47
47
|
Full Example:
|
|
@@ -129,8 +129,9 @@ The `onSuccess` and `onFailure` callbacks (if supplied) are passed the following
|
|
|
129
129
|
| Option | Type | Description |
|
|
130
130
|
| --- | --- | --- |
|
|
131
131
|
| `data` | Object | Data passed through callback |
|
|
132
|
-
| `data.
|
|
133
|
-
| `data.
|
|
132
|
+
| `data.faceImage` | File | Face Image of user performing liveness check |
|
|
133
|
+
| `data.passed` | Boolean | Indicator on whether liveness check passed or failed |
|
|
134
|
+
| `data.metadata` | Any | Metadata passed in during initialization |
|
|
134
135
|
|
|
135
136
|
## Credits
|
|
136
137
|
|
package/dist/index.d.ts
CHANGED
|
@@ -6,11 +6,13 @@ declare interface Branding {
|
|
|
6
6
|
declare type CompleteTheCircleTask = TaskBase<"complete-the-circle">;
|
|
7
7
|
|
|
8
8
|
declare interface LivenessData {
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
faceImage: string;
|
|
10
|
+
passed: boolean;
|
|
11
|
+
metadata?: Metadata;
|
|
11
12
|
}
|
|
12
13
|
|
|
13
14
|
declare interface LivenessWebSdkProps {
|
|
15
|
+
publicKey: string;
|
|
14
16
|
presentation?: Presentation;
|
|
15
17
|
tasks?: Array<Task>;
|
|
16
18
|
user?: User;
|
|
@@ -19,8 +21,11 @@ declare interface LivenessWebSdkProps {
|
|
|
19
21
|
onClose?: () => void;
|
|
20
22
|
onSuccess?: (data: LivenessData) => void;
|
|
21
23
|
onFailure?: (data: LivenessData) => void;
|
|
24
|
+
metadata?: Metadata;
|
|
22
25
|
}
|
|
23
26
|
|
|
27
|
+
declare type Metadata = Record<string, any>;
|
|
28
|
+
|
|
24
29
|
declare interface MotionsTask extends TaskBase<"motions"> {
|
|
25
30
|
maxNods?: number;
|
|
26
31
|
maxBlinks?: number;
|
|
@@ -57,6 +62,7 @@ declare class WebSDK {
|
|
|
57
62
|
constructor(props: LivenessWebSdkProps);
|
|
58
63
|
private addResources;
|
|
59
64
|
private removeResources;
|
|
65
|
+
private validateOptions;
|
|
60
66
|
start(tasks?: Array<Task>): Promise<void>;
|
|
61
67
|
close(): void;
|
|
62
68
|
terminate(): void;
|