@getyoti/react-face-capture 1.4.0 → 2.0.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/CHANGELOG.md +111 -2
- package/README.md +139 -91
- package/index.d.ts +25 -32
- package/index.js +69 -2
- package/index.js.LICENSE.txt +393 -36
- package/package.json +13 -75
- package/vanilla/index.js +98 -3
- package/vanilla/index.js.LICENSE.txt +219 -34
- package/vanilla/index.js.map +1 -1
- package/index.css +0 -1
- package/vanilla/index.css +0 -1
package/index.d.ts
CHANGED
|
@@ -16,6 +16,8 @@ declare module '@getyoti/react-face-capture' {
|
|
|
16
16
|
VIDEO_STREAM_INTERRUPTED = 'VIDEO_STREAM_INTERRUPTED',
|
|
17
17
|
SECURE_SESSION_EXPIRED = 'SECURE_SESSION_EXPIRED',
|
|
18
18
|
EXCEEDED_TIME_TO_LOAD = 'EXCEEDED_TIME_TO_LOAD',
|
|
19
|
+
VERSION_NO_LONGER_AVAILABLE = 'VERSION_NO_LONGER_AVAILABLE',
|
|
20
|
+
INVALID_SECURE_CLIENT_SDK_ID = 'INVALID_SECURE_CLIENT_SDK_ID',
|
|
19
21
|
}
|
|
20
22
|
|
|
21
23
|
/**
|
|
@@ -51,16 +53,6 @@ declare module '@getyoti/react-face-capture' {
|
|
|
51
53
|
LOW = 'low',
|
|
52
54
|
}
|
|
53
55
|
|
|
54
|
-
/**
|
|
55
|
-
* Scenarios in which the countdown will be used.
|
|
56
|
-
*/
|
|
57
|
-
export enum COUNTDOWN_MODES {
|
|
58
|
-
ALWAYS = 'always',
|
|
59
|
-
ONLY_MOBILE = 'only_mobile',
|
|
60
|
-
ONLY_DESKTOP = 'only_desktop',
|
|
61
|
-
NEVER = 'never',
|
|
62
|
-
}
|
|
63
|
-
|
|
64
56
|
/**
|
|
65
57
|
* Politeness setting of the live region supported by the Face Capture.
|
|
66
58
|
*/
|
|
@@ -77,15 +69,6 @@ declare module '@getyoti/react-face-capture' {
|
|
|
77
69
|
FULL_HD = 'full_hd',
|
|
78
70
|
}
|
|
79
71
|
|
|
80
|
-
/**
|
|
81
|
-
* Button sizes supported by the Face Capture.
|
|
82
|
-
*/
|
|
83
|
-
export enum BUTTON_SIZE {
|
|
84
|
-
SMALL = 'SMALL',
|
|
85
|
-
MEDIUM = 'MEDIUM',
|
|
86
|
-
LARGE = 'LARGE'
|
|
87
|
-
}
|
|
88
|
-
|
|
89
72
|
/**
|
|
90
73
|
* Languages supported by the Face Capture.
|
|
91
74
|
*/
|
|
@@ -156,6 +139,8 @@ declare module '@getyoti/react-face-capture' {
|
|
|
156
139
|
SV_SE = 'sv-SE',
|
|
157
140
|
TH = 'th',
|
|
158
141
|
TH_TH = 'th-TH',
|
|
142
|
+
TL = 'tl',
|
|
143
|
+
TL_PH = 'tl-PH',
|
|
159
144
|
TR = 'tr',
|
|
160
145
|
TR_TR = 'tr-TR',
|
|
161
146
|
UK = 'uk',
|
|
@@ -164,6 +149,8 @@ declare module '@getyoti/react-face-capture' {
|
|
|
164
149
|
UR_PK = 'ur-PK',
|
|
165
150
|
VI = 'vi',
|
|
166
151
|
VI_VN = 'vi-VN',
|
|
152
|
+
ZH = 'zh',
|
|
153
|
+
ZH_CN = 'zh-CN',
|
|
167
154
|
}
|
|
168
155
|
|
|
169
156
|
/**
|
|
@@ -177,9 +164,10 @@ declare module '@getyoti/react-face-capture' {
|
|
|
177
164
|
}
|
|
178
165
|
|
|
179
166
|
/**
|
|
180
|
-
* Result entity the FCM will return on the onSuccess callback.
|
|
167
|
+
* Result entity the FCM will return on the onSuccess callback. It is the
|
|
168
|
+
* content that needs to be sent to the Yoti AI services.
|
|
181
169
|
*/
|
|
182
|
-
export interface
|
|
170
|
+
export interface FCMPayload {
|
|
183
171
|
img: string;
|
|
184
172
|
secure?: Secure;
|
|
185
173
|
}
|
|
@@ -195,7 +183,7 @@ declare module '@getyoti/react-face-capture' {
|
|
|
195
183
|
/** If true, the face capture module will use the secure mode. (default:false) */
|
|
196
184
|
secure?: boolean;
|
|
197
185
|
/** Callback called once the result (capture) is complete. */
|
|
198
|
-
onSuccess: (
|
|
186
|
+
onSuccess: (payload: FCMPayload, base64PreviewImage?: string) => void;
|
|
199
187
|
/** Callback called when there is an error. */
|
|
200
188
|
onError?: (e: ERROR_CODE) => void;
|
|
201
189
|
/** Callback called when the face capture module is ready to take images. */
|
|
@@ -206,12 +194,6 @@ declare module '@getyoti/react-face-capture' {
|
|
|
206
194
|
resolutionType?: RESOLUTION_TYPE;
|
|
207
195
|
/** Image format type. (default:jpeg) */
|
|
208
196
|
format?: FORMAT_TYPE;
|
|
209
|
-
/** @deprecated It will be removed in 2.0.0 version. Custom UI of the manual capture button. It uses onClick and disabled as props */
|
|
210
|
-
CustomManualButton?: (props: any) => JSX.Element;
|
|
211
|
-
/** @deprecated It will be removed in 2.0.0 version. Custom UI of the consent button. It uses onClick and disabled as props */
|
|
212
|
-
CustomConsentButton?: (props: any) => JSX.Element;
|
|
213
|
-
/** Indicates when the countdown will be used. Note: It's only used if captureMethod is set to manual. (default:never) */
|
|
214
|
-
countdownMode?: COUNTDOWN_MODES;
|
|
215
197
|
/** imageType select if the image will be the original or it will be cropped in order to improve the timing
|
|
216
198
|
response when processing the image in the API call. (default:original) */
|
|
217
199
|
imageType?: IMAGE_TYPE;
|
|
@@ -221,14 +203,25 @@ declare module '@getyoti/react-face-capture' {
|
|
|
221
203
|
language?: LANGUAGE_CODE;
|
|
222
204
|
/** Determines the politeness setting of the live region used to read out prompts for screen reader users. (default:polite) */
|
|
223
205
|
a11yLiveRegionMode?: A11Y_LIVE_REGION_MODE;
|
|
224
|
-
/**
|
|
225
|
-
|
|
206
|
+
/** showInitialGuidance determines if the initial help guidance will show or not the help section */
|
|
207
|
+
showInitialGuidance?: boolean;
|
|
226
208
|
/** Indicates if the face capture will use the manual capture method because of slow performance. (default:true) */
|
|
227
209
|
manualCaptureFallback?: boolean;
|
|
228
210
|
/** Indicates the time (in milliseconds) to call the onError callback if the module takes that time to load */
|
|
229
211
|
loadTimeout?: number;
|
|
230
|
-
/**
|
|
231
|
-
|
|
212
|
+
/** Identifies your Yoti Hub application. */
|
|
213
|
+
clientSdkId?: string;
|
|
214
|
+
/** If the Get Help button is shown or not. */
|
|
215
|
+
showGetHelpButton?: boolean;
|
|
216
|
+
/** Automatically renews sessions after they expire. */
|
|
217
|
+
autoSessionReload?: boolean;
|
|
218
|
+
/** Gives the possibility to users to retry several times when an error occurs. */
|
|
219
|
+
userRetryError?: boolean;
|
|
220
|
+
/** If the `onSuccess` method will return the base64 image. */
|
|
221
|
+
returnPreviewImage?: boolean;
|
|
222
|
+
/** If the face capture will encrypt the image inside the payload argument
|
|
223
|
+
* on the `onSuccess` callback when it runs the secure mode. */
|
|
224
|
+
encryptImage?: boolean;
|
|
232
225
|
}
|
|
233
226
|
|
|
234
227
|
/**
|