youverify-liveness-web 0.1.20 → 0.1.22
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 +14 -0
- package/dist/index.d.ts +6 -2
- package/dist/index.js +1055 -985
- package/dist/index.umd.cjs +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -64,6 +64,7 @@ try {
|
|
|
64
64
|
| Option | Type | Required | Description | Default Value | Possible Values |
|
|
65
65
|
| --- | --- | --- | --- | --- | --- |
|
|
66
66
|
| `presentation` | String | No | Controls how UI is displayed | `modal` | `modal`, `page` |
|
|
67
|
+
| `publicKey` | String | Yes | Your Youverify Public Merchant Key | undefined | Valid Youverify Public Key |
|
|
67
68
|
| `sandboxEnvironment` | Boolean | No | Sets whether session should run in sandbox or live mode | `true` | `true`, `false` |
|
|
68
69
|
| `tasks` | Array | No | Sets tasks that need to be performed for liveness to be confirmed | undefined | See [tasks](#tasks) |
|
|
69
70
|
| `user` | Object | No | Sets details of user for which liveness check is being performed | undefined | See nested options below |
|
|
@@ -123,6 +124,19 @@ User passes task by performing random motions in random sequences, which include
|
|
|
123
124
|
| `maxNods` | Number | No | Maximum amount of nods a user is asked to perform | 5 | Any number
|
|
124
125
|
| `maxBlinks` | Number | No | Maximum amount of nods a user is asked to perform | 5 | Any number |
|
|
125
126
|
|
|
127
|
+
|
|
128
|
+
### Blink
|
|
129
|
+
|
|
130
|
+
User passes task by blinking their eyelids based on number of times set.
|
|
131
|
+
|
|
132
|
+
#### Options
|
|
133
|
+
| Option | Type | Required | Description | Default Value | Possible Values |
|
|
134
|
+
| --- | --- | --- | --- | --- | --- |
|
|
135
|
+
| `id` | String | Yes | Id of task | - | `blink` |
|
|
136
|
+
| `difficulty` | String | No | Sets difficulty of task | `medium` | `easy`, `medium`, `hard` |
|
|
137
|
+
| `timeout` | Number | No | Sets time in milliseconds after which task automatically fails | undefined | Any number in milliseconds |
|
|
138
|
+
| `maxBlinks` | Number | No | Maximum amount of nods a user is asked to perform | 5 | Any number |
|
|
139
|
+
|
|
126
140
|
## Callback Data
|
|
127
141
|
|
|
128
142
|
The `onSuccess` and `onFailure` callbacks (if supplied) are passed the following data:
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
declare interface BlinkTask extends TaskBase<"blink"> {
|
|
2
|
+
maxBlinks?: number;
|
|
3
|
+
}
|
|
4
|
+
|
|
1
5
|
declare interface Branding {
|
|
2
6
|
logo?: string;
|
|
3
7
|
color?: string;
|
|
@@ -34,7 +38,7 @@ declare interface MotionsTask extends TaskBase<"motions"> {
|
|
|
34
38
|
|
|
35
39
|
declare type Presentation = "modal" | "page";
|
|
36
40
|
|
|
37
|
-
declare type Task = CompleteTheCircleTask | MotionsTask | YesOrNoTask;
|
|
41
|
+
declare type Task = CompleteTheCircleTask | MotionsTask | YesOrNoTask | BlinkTask;
|
|
38
42
|
|
|
39
43
|
declare interface TaskBase<T extends TaskId> {
|
|
40
44
|
id: T;
|
|
@@ -44,7 +48,7 @@ declare interface TaskBase<T extends TaskId> {
|
|
|
44
48
|
|
|
45
49
|
declare type TaskDifficulty = "easy" | "medium" | "hard";
|
|
46
50
|
|
|
47
|
-
declare type TaskId = "complete-the-circle" | "yes-or-no" | "facial-expressions" | "motions";
|
|
51
|
+
declare type TaskId = "complete-the-circle" | "yes-or-no" | "facial-expressions" | "motions" | "blink";
|
|
48
52
|
|
|
49
53
|
declare interface User {
|
|
50
54
|
firstName: string;
|