youverify-liveness-web 0.1.21 → 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 CHANGED
@@ -124,6 +124,19 @@ User passes task by performing random motions in random sequences, which include
124
124
  | `maxNods` | Number | No | Maximum amount of nods a user is asked to perform | 5 | Any number
125
125
  | `maxBlinks` | Number | No | Maximum amount of nods a user is asked to perform | 5 | Any number |
126
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
+
127
140
  ## Callback Data
128
141
 
129
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;